View Single Post
  #7   Spotlight this post!  
Unread 04-02-2016, 23:32
Dan Waxman Dan Waxman is offline
Registered User
FRC #0263 (Aftershock)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Long Island
Posts: 34
Dan Waxman is an unknown quantity at this point
Re: Problems with Encoders

Quote:
Originally Posted by Ether View Post

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.
Reply With Quote