View Single Post
  #1   Spotlight this post!  
Unread 05-01-2006, 20:28
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Warning: Long response

Quote:
Originally Posted by Rickertsen2
Do you have any other information on the interaction between the inductance of the coils, and the commutor and the PWM switching? I find this interesting.
Almost all my experience is from my former life in the auto industry.

There are 3 cases that are applicable to this discussion. Each of them involve cases where the normal behavior of motors did not behave as simple motor models would have us expect.

One was a small motor doing a very big job. We had to do a lot of work in a small amount of time and we only had a 280 series motor can to work with. We had peak current specs, actuation times and actuation forces competing for the design space. We almost had it but we could not meet the peak current spec because the brushes bridged commutators and cause very short, very high current spikes. We ended up getting relief on the specs for current.

The second was a largish motor (a Power Sliding Door motor). We were playing with PWM frequency to try to meet sound specs. PWM frequency can have a big effect on sound if you happen to be PWMing at or near a natural frequency of the body panels. As we varied PWM freq. we notice that as we increased the PWM frequency, we often had to increase the duty cycle of the motors (significantly at low duty cycles) in order to get the same performance of the motor. A simple analysis says that changing the PWM duty cycle is like changing the voltage on the motor. But this is not true, it is only a first order approximation. The approximation gets worse and worse as the PWM frequency grows. We believe that the main reason for this is that by increasing the PWM freq by a couple orders of magnitude, we started to get into the area where the inductance of the motor count not be neglected.

The third was a small motor driving a very lightly loaded actuator (it was lightly loaded most of the time, some times we need every inch-ounce the motor could provide). We were having impact problems at the end of the travel. "No problem," we thought. We had a plan: we could reduce the PWM duty cycle, this would be like reducing the voltage to the motor, which (we all know) reduces the free speed of the (almost unloaded) motor. This plan was based on our assumption that changing the PWM duty cycle is like changing the voltage on the motor -- not exactly true.

To our surprise, the free speed of the motor was basically flat as we reduced the duty cycle. Our tests were clear but our brains were fussy. What was going on?

As it turns out, not all PWMing is created equal.

Most PWMing (IFI's Victor included) switches between Vbatt and Open Circuit. This is what we were using. There are other types, but you can read my P.S. to learn about them.

In this case, it turned out that both the mechanical time constant and the electrical time constanst were fast with respect to our PWM period. What would happen is that in one PWM pulse (even at low duty cycles) the motor would accelerate to the Vbatt freespeed.* Once the motor was at Vbatt free speed, it would stop accelerating. When the PWM pulse ended it would cause an open circuit between the motor leads. But an open circuit motor that is lightly loaded will coast at basically the same speed. So it would coast, slowing down a little but not much, until... ...the next PWM pulse would come along and give the motor another kick, back up to the Vbatt freespeed.

It was not until the duty cycle got down to near the electrical or mechanical time constants of the motor that it slowed down at all. A very unexpected result, given our assumptions. By the way, other forms of PWM do not share this problem and are better for slow speed control of motors as a result.

So. That is that. Probably more than you wanted but you got anyway...

Joe J.

*FYI, back in the 70's when Permanent Magnet (PM) motors were new to the auto industry (and the world actually), GM did some tests on a 280 series lock unlock motor. An unloaded motor got up to its 12V free speed (12Krpm) from a dead start IN 1/4 TURN!!!!

P.S. There are at least 2 other methods of driving motors that are called PWMing.

Recall the first type is to switch between Vbatt and Open Circuit.

You can also switch between Vbatt and Shorting the motor leads (connecting both leads either to ground or to Vbatt, it makes little difference to the motor - it can make a lot of differenced to the voltage spikes the rest of the system sees -- but that is a different message). In my opinion, this is the type of PWMing we would like to use in almost all FIRST applications because it is easier to do control tasks that involve speed control using this method. The reasons are complicated, but there is a term in the equations of motion that help make the speed of the motor less sensitive to changes in load. This term is particularly effective at slow speeds so when you want to control something at slow speeds it helps you the most. Who has had fits and sleepless nights trying to get a FIRST robot arm to behave? Some of those lost winks could have been yours if IFI would implement a method to implement this type of motor driver.

You can also switch between Vbatt and -Vbatt (this kind of motor driver is sometimes called locked anti-phase -- see what Brother Barello has to say about it here). This sounds crazy because in order to get the motor to turn OFF you have to kick it half the time with Vbatt and half the time with -Vbatt. The reason I bring this up at all is that if it were not for inductive limitations on the current through the motor, OFF would essential be stalling the motor. I have never used this type of drive but the PWM frequency must be high enough to limit the current because people DO use this method. I should actually play with this method because it sort of seems too crazy to actually believe. The fact that people are not generally stupid (especial folks who build robots) and yet they use them must mean that they have something to offer (more than Barello's only 1 I/O pin required argument).


I just did some digging. I found this quote (here):
Quote:
Locked anti-phase for the motor controller. Anti-phase is the easiest to hook up. For a discussion of the difference between locked anti-phase and sign magnitude (the two basic types) see National Semiconductor Note AN-694 (AN-694). When using locked anti-phase, the frequency of the PWM should be relatively high so that the motor coils can act as a filter to turn the pulses into an average DC output. Try to run the PWM at 19 kHz or higher when starting and then adjust to see how it works.
So there it is, high frequency is a must.

From the National Semiconductor app note referenced above:
Quote:
If the ripple current through the load ever wants to reverse its
direction it is free to do so. This is due to the fact that two
switches are always driven ON and are always able to
conduct current of either polarity. Another benefit of this type
of control is that the voltage across the load is always
defined by the state of the switches, regardless of the direction
the load current wants to flow.
In applications where fast dynamic control of inertial loads
(i.e., the rapid reversal of the direction of rotation of a motor)
it is important that the “regeneration” of net average power
from the load back to the supply be able to take place. With
two switches ON there is always a path for this regenerative
energy.
So, it seems to me that perhaps dynamic control would be improved too. Hmmm.... much to think about... ...JJ
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2

Last edited by Joe Johnson : 05-01-2006 at 22:06.