I'm trying to represent on Desmos what my C++ Vex robotics flywheel control code would do, so that I can close in on an optimal constant in the equation without testing it on the robot, because that is 10s of x more time consuming, and imprecise. I have three equations:
The bottom one is obviously incorrect but I am including it because it explains more concisely than words could what I want the function to be. The image below also shows what I know the graph of the speed control would look like, oscillation down towards minimal error, a threshold at which I would tell it to give up oscillating and just put in the end voltage; I didn't include that here because I didn't want more of a struggle with Desmos.
If you know an answer that uses another software besides Desmos, that's fine with me, I just use Desmos because it's what I know and it generally works great for me. I'm basically asking what is the syntax for representing this with a graphing software; I could write it in C++ code, but then I wouldn't see what it looks like, and seeing it greatly helps me find solutions faster.
In the desmos image, b is the initial velocity at the first check, since the flywheel will be stimulated before the first check. v is the desired velocity of the flywheel. I also found this equation:
which returns 0 if x>n; 1 if x<=n. This might help with the conditional function I'm looking for. Thank you.

I'll preface this by stating that I'm not entirely sure if I understand what kind of function you are trying to achieve.
Some points I noticed:
I think that the path of least resistance for you would be to code the function in C++ and output its values to a .csv file and then plot that.