|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#16
|
||||
|
||||
|
Re: Autonomous: Mixing Drive Distance PID's with Turn Angle PID's.
Quote:
I got a pretty nice fit using just 2 cubics by splitting the curve into 2 sections. See attached screenshot. Cells A2-A21 and C2-C21 are pulse and volts data from the link you provided. I normalized that data to the range +/-1 for command and output in cells B2-B21 and D2-D21. I copied the positive half of the curve to cells A27-B38, reversing the cmd & out to get the inverse function, and divided it into 2 sections: cells E27-F33 and E35-F41. Then I fit a cubic to each section. The equations are in the two graphs at the bottom. I spliced the 2 cubics together and you can see the net result at the top. It's a pretty nice fit, and for not much math. To use it, test your desired (positive) command. If it's less than 0.842 use the first cubic, otherwise use the second. If it's zero, use zero. You could use the same cubics for the negative half of the curve, or create new curves for that half. Last edited by Ether : 17-11-2011 at 18:00. Reason: typo |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|