Quote:
Originally Posted by Michael DiRamio
We started by plotting programming output vs victor voltage output (as well as programming output vs shooter speed) and used this to come up with a curve of best fit for the victor output.
We then used Mathematica to generate the inverse of this function. It was pretty ugly so we hacked it a bit by plotting the values from 0 - 1 and then finding a curve of best fit for this (which became the linearization function).
There's definitely a lot of room for improvement/higher accuracy in the function, but we found this linearization made a HUGE difference in the performance of our PID loops.
|
If you plot your data so that the joystick command is on the
Y axis, and the actual Vic output is on the
X axis, then you don't need to invert anything analytically. It's already inverted. All you have to do is fit the trendline and you've got your linearization function. See the Excel file link in my previous post in this thread.