Quote:
Originally Posted by Ether
I could use a bit of help understanding what you wrote. Could you clarify what you mean by the following phrases please?
"motors don't overcome inertia until a certain point"
"map the entire range into the effective range"
"minimum percent that overcomes the inertia" By the way, I agree with you that writing your own PID can be an effective learning experience, for those so inclined.
|
By "overcoming inertia" I just mean go from not moving to moving. Overcoming inertia was probably not the best terminology, but I couldn't think of a better term.
So I'll explain what I mean by effective range by example. With the CIM I was testing this with originally, I found the motor started moving at around .14. This means that everything from -.13 to .13 wouldn't move the motor at all. So what my function did is just make every value -1.0 to 1.0 move the motor. For that motor, the equation is:
.86x + .14
So if we take a speed the PID Controller would output that originally wouldn't move the motor like maybe .05, we'd fine that now .05 would set the motor to .183, therefore moving the motor.
Sorry for having to clarify. Like I said before I'm incredibly tired right now so my writing is bound to be a little cloudy.
Edit: Forgot to mention: with this solution, you do have to specially test for zero, and you do have to negate the equation if x is negative.