View Single Post
  #7   Spotlight this post!  
Unread 03-02-2009, 22:09
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
Re: Are motor speeds proportional to PWM value?

With most small (toy type) motors, their unloaded rpm (after settling, as I'll explain later) is directly proportional to the voltage they get. However, I don't know about the larger motors we are using and how they behave under load. Plus, the PWM output from the motor controllers may not drive a motor to behave the same way as the average voltage would. In addition, the motor controller's outputs aren't perfect - most of them are nonlinear, as I read (this is my first year so I don't have much personal experience.) In the end, they are probably very nonlinear, due to all the factors affecting your perfect relationship.

If you look at the math, in a closer to instantaneous standpoint, the PWM (or average voltage) setting would actually control motor acceleration (get more instantaneous and you get into the back EMF and weird effects such as some motors, depending on how they are wound, actually speeding up when power is cut.) Plus, instantaneously, the PWM wouldn't cycle immediatly. The motor controller would take something around 1/(operating frequency) seconds to change the outputs, and over time it is averaged my the motor's behavior to act as an average voltage.

At the speed you would probably run your program (20-1000 Hz for an overly large range estimate) you would probably (using the encoders) detect the motor behaving as if the PWM output is proportional to acceleration. Most programs (except traction control and other fancier ones) just run the commanded power to the PWM outputs, and assume (over time, correctly) the PWM output has a one-to-one relationship with average motor velocity.