This is like graph straightening in physics right?

Um. So, to sum it up, do some straightening and then do linear regression, then substitute back, right?

In VEX I see this will be useful with the motor voltage vs. practical speed curve.

I guess you can do all sorts of regression, radical, quadratic, logarithmic, fairly easily in Excel or whatever computation software for practical competition use. But it is useful to know how exactly it is done.

Pretty much.

Yes

I can read thank you very much.

Chill man, he was just answering you question.

Just clarifying that I had already seen and understood @OverlyOptimisticProgramer 's answer to my question. Nothing more and nothing less.

well he probably also wanted to answer it as well.

This is something that worked really well for 81M back in Sack Attack. It worked so well it allowed for a single driver for lifting sacks and keeping the arm in a perfect 45 degree scoop hold as you drove around. Another button changed the target to either lift or floor level formula.

Make a function of two variables - when the arm pot says this, your target scoop pot will be something else. Yours had Flywheel speed vs distance. So if you have distance from goal, you could change the flywheel speed dynamically. You could also do angle if you had a variable lift angle on a pinball shooter.

However Excel makes it so much easier. Using the linear regression formulas within the graph works just as well as the by hand methods. So for sack attack, it was a two stage arm and you want to not drop the sacks out too early as you drive. So using a level app on your iPhone can get you the proper angle you want as you adjust the lift arm and make a function of arm potentiometer vs scoop petentiometer to make a set 45 degree scoop where the sacks don’t fall out.

Linest() in Excel is also how you can do it by hand, but add the regression lines right on the graph in one click. Look at the R-squared value to see how close you are to fitting the function. You can go back and back calculate at the function against the typical positions to make sure the error is not practically too far off. See the attached for the graph.

P1020304 by Glenn McMillen, on Flickr

Put that function as the basis of an error in a PID loop, and it will be pretty darn good. Your error is not going against a fixed value but against what you want for that arm position. In yours it would be distance from goal to flywheel speed.

Getting hyper accurate distance calculations as you move is another discussion… (figure out shear, then rotate, then translation)