DPRG
DPRG List  



[DPRG] PWM vs. voltage motor control

Subject: [DPRG] PWM vs. voltage motor control
From: R. Bickle rbickle at swbell.net
Date: Tue Jun 12 16:44:49 CDT 2001

Clay,

You are right about the PWM at low duty cycles. However, If the PID
algorithm is working and tuned correctly, it should account for the
nonlinear PWM characteristic. Since the PID system is closed loop, you only
need to specify the speed of the motor as an encoder frequency. The PID
algorithm will adjust the PWM as needed to achieve the correct output. If
tuned correctly, the PID should ramp very quickly to the set speed and not
oscillate about the set point. In other words, it will be critically damped.

Whether you have pure voltage level or PWM control circuitry, you still
cannot account for varying motor loads as say your robot climbs a hill, or
carries more weight. I'm hoping that the PID control will handle this
correctly. Of course, I don't have it all working yet, so I'm no expert.
I'll let you know when I get there. :-)

Rick Bickle


-----Original Message-----
>From: dprglist-admin at dprg.org [mailto:dprglist-admin at dprg.org]On Behalf
Of Clay Timmons
Sent: Tuesday, June 12, 2001 2:42 PM
To: dprglist at dprg.org
Subject: [DPRG] PWM vs. voltage motor control




Just wanted to throw in my thoughts on PWM vs. voltage motor control.

I use PWM on Eye Robot with a PWM rate of about 100Hz.  Yes you
can hear the motors buzzing.   I had difficulty getting good speed control
at low RPMs.  Ed Koeffman said that I would get better results with
a higher PWM frequency of say 20Khz.   I tested this by hooking my
bench function generator to a large mosfet driving a motor.  I could vary
the PWM frequency and duty cycle.   I set the PWM to 20Khz but
still found that the motor had virtually no torque at low RPM.

I also took the same motor and hooked it up to the bench power supply.
The 12v motor ran fine down to around 1.5 - 2 volts and it had plenty
of torque!   I was not able to get the low speed torque from PWM
no matter what frequency and duty cycle I tried.

Another thing I noticed is that PWM control is horribly non-linear.
I plotted the motor RPM vs voltage on the power supply.  It
was a nice perfect flat linear response.  Next I plotted motor RPM
vs.  PWM duty cycle from 5-95%.   It was a very steep curve
flatting out to almost level.  Not linear at all.  I spoke with David
Anderson
about the non-linearity of PWM.  He confirmed this and said he
uses a look up table to linearize motor speed via PWM.

I also confirmed PWM is no-linear with a quick C code simulation.
I computed the RMS value of a PWM signal from 5-95% duty cycle
and saw the same non-linear response.

>From my experience PWM sucks for getting low speeds out of a motor.
If anyone can show me otherwise I'd like to see it.   Note that David
Anderson
can get good low speed control with PWM but only after linearizing it and
using a PID controller on top of that.

I'm thinking of using a pure voltage contoller on my next motor controller.
Critics say that it wastes power.  Well I say...  It only wastes power at
low speeds.  My robot software goes as fast as possible and only
goes slow for fine control.   Thus it would only "waste" power
when slowing down to grab a can, etc.   A bit of power is a reasonable
price to pay for the ability to have control at low speeds.   Besides
robot contests are only a few minutes long.  Who cares how much
power I waste for 5 minutes!


Later,

-Clay Timmons-






_______________________________________________
DPRGlist mailing list
DPRGlist at dprg.org
http://nimon.ncc.com/mailman/listinfo/dprglist



More information about the DPRG mailing list