Forums

PWM and motor control -- request clarification

Started by Daku December 26, 2011
Could some electronics guru please clarify the following.
I understand that Pulse Width Modulation (PWM) uses
a high fixed frequency carrier signal (e.g., triangle wave)
and a low frequency modulation signal -- or even a DC
level.
If I were to use PWM for motor control, and use a fixed
frequency triangle wave carrier, what would be the
modulating signal in this case ? Is the output PWM
signal being fed back in ?
Any hints, suggestions would be helpful.
On 2011-12-26, Daku <dakupoto@gmail.com> wrote:
> Could some electronics guru please clarify the following. > I understand that Pulse Width Modulation (PWM) uses > a high fixed frequency carrier signal (e.g., triangle wave) > and a low frequency modulation signal -- or even a DC > level. > If I were to use PWM for motor control, and use a fixed > frequency triangle wave carrier, what would be the > modulating signal in this case ? Is the output PWM > signal being fed back in ? > Any hints, suggestions would be helpful.
That would depend on the kind of motor. For DC motors, the modulation signal can simply be a DC level. For AC motors, it will generally be a sine signal. What you basically want to do is to feed the motor with a signal that, when smoothed out, will resemble the signal you would normally want to feed. There are several advantages to this approach, including a harmonic content that's easier to filter and a conceptually simpler control (once you get the hang of it) with good efficiency. Unless you want to do some additional fancy control and processing, you don't normally need to feed the output PWM signal back in. -- weland@sdf.org SDF Public Access UNIX System - http://sdf.org % grep me no patterns and I'll tell you no lines
On Dec 26, 6:14=A0am, Daku <dakup...@gmail.com> wrote:
> Could some electronics guru please clarify the following. > I understand that Pulse Width Modulation (PWM) uses > a high fixed frequency carrier signal (e.g., triangle wave) > and a low frequency modulation signal -- or even a DC > level. > If I were to use PWM for motor control, and use a fixed > frequency triangle wave carrier, what would be the > modulating signal in this case ? Is the output PWM > signal being fed back in ? > Any hints, suggestions would be helpful.
You are seriously confused. The triangular wave isn't any kind of carrier, but a signal generated inside the controlling electronics which is fed into a comparator along with a DC level. The output of the comparator is the PWM signal which controls the power feeds to the motor. The motor coil spends its time clamped to either the positive or the negative supply rail.Careful designers make sure that the connection to the positve rail is cut before the connection to the negative rail is made and vice versa - search on "shoot-through current". http://www.maxim-ic.com/glossary/definitions.mvp/term/shoot-through-current= /gpk/1040 The frequency of the triangular wave determines how often the coil switches between the rails, while the DC level controlls the ratio between the time spent connected to the positive ril and time spent connected to the negative rail. -- Bill Sloman, Nijmegen
Bill Sloman wrote:
> On Dec 26, 6:14 am, Daku <dakup...@gmail.com> wrote: > >>Could some electronics guru please clarify the following. >>I understand that Pulse Width Modulation (PWM) uses >>a high fixed frequency carrier signal (e.g., triangle wave) >>and a low frequency modulation signal -- or even a DC >>level. >>If I were to use PWM for motor control, and use a fixed >>frequency triangle wave carrier, what would be the >>modulating signal in this case ? Is the output PWM >>signal being fed back in ? >>Any hints, suggestions would be helpful. > > > You are seriously confused. The triangular wave isn't any kind of > carrier, but a signal generated inside the controlling electronics > which is fed into a comparator along with a DC level. The output of > the comparator is the PWM signal which controls the power feeds to the > motor. > > The motor coil spends its time clamped to either the positive or the > negative supply rail.Careful designers make sure that the connection > to the positve rail is cut before the connection to the negative rail > is made and vice versa - search on "shoot-through current". > > http://www.maxim-ic.com/glossary/definitions.mvp/term/shoot-through-current/gpk/1040 > > The frequency of the triangular wave determines how often the coil > switches between the rails, while the DC level controlls the ratio > between the time spent connected to the positive ril and time spent > connected to the negative rail. > > -- > Bill Sloman, Nijmegen >
You are not in any position to tell some one what is and what isn't. Hell you don't even know what a carrier is, obviously. Go back to bed in the insane asylum, you neighbor, next bed over, is wondering where you are. Or do they share beds there ? I get confused at times. Socialistic GOV.s do try to save money at times so that the King can add another cruise liner to his inventory of private bays. Jamie
Daku wrote:

> Could some electronics guru please clarify the following. > I understand that Pulse Width Modulation (PWM) uses > a high fixed frequency carrier signal (e.g., triangle wave) > and a low frequency modulation signal -- or even a DC > level. > If I were to use PWM for motor control, and use a fixed > frequency triangle wave carrier, what would be the > modulating signal in this case ? Is the output PWM > signal being fed back in ? > Any hints, suggestions would be helpful.
The triangle wave is only a reference to a voltage comparator circuit. If you were to use a comparator you can use lets say the (+) input to place your triangle reference to and the (-)input as the modulated signal, to regulate output. Remember that since in this example, you are using a (-) input for the set point, you must think backwards, unless you invert your control signal to correct the behavior, which most people do. Ok, so lets say your speed set point is at near 0 volts on the (-) input of the comparator, since this does work backwards, it would mean that when the triangle wave is at the very bottom of the base line or just above the value of the (-) input, it'll force the comparator to a full on state. This will give you a nice looking fast raise in the wave. Because you are now turning this on virtually at base you'll see either a pulse train that has a near 100% duty cycle, meaning, the off state is very short. You can even adjust it so that it remains on constantly for 100% output. Normally this signal drives a switching transistor into saturation so that no heat is generated in the transistor, because it is virtually 0 ohms or not much above it, depending on the device you use as the switch. A Mosfet is a good candidate for this. Now, when you adjust your (-) input to 50% of the level of your triangle wave, the comparator will not switch on the output until the triangle reaches the same or slightly higher voltage than the (-) input. you will see a 50% duty cycle at this point which will give a DC motor full power 50% of the time. Now for some helpful tips in selecting base frequency that carries this PWM signal, What I do is determine the induction of the motor and set the base frequency so that you'll get 50% current at 50% duty cycle. This ofrcouse only holds true with a DC motor at or near locked/stalled rotor. When they get spinning they back generate, like a DC generator would and thus it is like having an increase of induction which will relieve the load from your supply. Of course, if you have a load on the shaft that back generation isn't going to happen so much and thus your supply will feel the pain! :) As far as feed back is concerned? You can operate what is called armature feed back to maintain speed or using some kind of resolver, encoder, tach what ever to monitor the actual rotor speed. In precision applications this is required. In armature feed back, speed sensing can be tricky because you need to separate the PWM on duty time verses the regenerated energy coming back. The regenerated energy is what you need to look at for a precise speed reference however, for a general purpose reference, many simply take the output with motor connector and pass it through a smoothing filter RC network that gives them and average between the on cycle and the return energy as a feed back to add to the (-) input in this example, which would throttle back the width of the demand. as motor speed picks up, so does the regenerated energy and this keeps happening until they find a happy stable home! With no load, you may find the output signal looking like there is very little PWM pulse higth there, at full speed. It may look like a stair step shape with a variable height on the step going down. so, if you were to use a dual comparator you could use one as the PWM referenced from your triangle source and speed set point and another comparator to trigger cancel effect from the feed back of your speed demand.. I hope you enjoyed that long winded explanation, I am still recovering from yesterdays Xmas. P.S. If you need base line examples? We can plot some idea here in ASCII text. Jamie
On Dec 26, 2:17=A0pm, Jamie
<jamie_ka1lpa_not_valid_after_ka1l...@charter.net> wrote:
> Bill Sloman wrote: > > On Dec 26, 6:14 am, Daku <dakup...@gmail.com> wrote: > > >>Could some electronics guru please clarify the following. > >>I understand that Pulse Width Modulation (PWM) uses > >>a high fixed frequency carrier signal (e.g., triangle wave) > >>and a low frequency modulation signal -- or even a DC > >>level. > >>If I were to use PWM for motor control, and use a fixed > >>frequency triangle wave carrier, what would be the > >>modulating signal in this case ? Is the output PWM > >>signal being fed back in ? > >>Any hints, suggestions would be helpful. > > > You are seriously confused. The triangular wave isn't any kind of > > carrier, but a signal generated inside the controlling electronics > > which is fed into a comparator along with a DC level. The output of > > the comparator is the PWM signal which controls the power feeds to the > > motor. > > > The motor coil spends its time clamped to either the positive or the > > negative supply rail.Careful designers make sure that the connection > > to the positve rail is cut before the connection to the negative rail > > is made and vice versa - search on "shoot-through current". > > >http://www.maxim-ic.com/glossary/definitions.mvp/term/shoot-through-c... > > > The frequency of the triangular wave determines how often the coil > > switches between the rails, while the DC level controlls the ratio > > between the time spent connected to the positive ril and time spent > > connected to the negative rail. > > > -- > > Bill Sloman, Nijmegen > > =A0 You are not in any position to tell some one what is and what isn't. > Hell you don't even know what a carrier is, obviously.
Perhaps you might be kind enough to inform us what the carrier wave might be in a PWM motor control circuit. The concept is useful in FM and AM radio, but no explanation of PWM that I've ever read has felt the need to invoke it.
> =A0 Go back to bed in the insane asylum, you neighbor, next bed over, is > wondering where you are. Or do they share beds there ? I get confused at > times. Socialistic GOV.s do try to save money at times so that the King > can add another cruise liner to his inventory of private bays.
Jamie, you seem to be confused pretty much all the time. The current Dutch government would resent being described as socialist, even though they do continue to run a system of universal health care, paid for by the system of compulsory health insurance originally invented by that notorious socialist, Bismark. The Netherlands has a Queen at the moment, rather than a King. She does have a royal yacht http://en.wikipedia.org/wiki/De_Groene_Draeck at the moment, but it's scarcely a cruise liner, and may yet fall victim to government economies. For tonight my bed is in the Grand Hotel des Terreaux in Lyon (not an insane ayslum) and my neighbour is my wife, who knows exactly where I am. If there is a lunatic aslyum anywhere in the universe of discourse, it would be the one accomodating your poor deluded imagination. -- Bill Sloman, Nijmegen
On Sun, 25 Dec 2011 21:14:19 -0800, Daku wrote:

> Could some electronics guru please clarify the following. I understand > that Pulse Width Modulation (PWM) uses a high fixed frequency carrier > signal (e.g., triangle wave) and a low frequency modulation signal -- or > even a DC level.
Well, not really. PWM uses a _square_ wave of varying duty cycle ("duty cycle" means the ratio of on time to total cycle time). This square wave is usually at a high enough frequency that the motor current is significantly smoothed by the motor inductance (but not always, depending on the goal of the system designer). One way that you _can_ generate a PWM signal is to have a triangle (or other sawtooth) wave generator, and compare that with a DC level using a comparator. But that's just one way -- the "modern" way to do this is to use a microcontroller, DSP chip, or FPGA with a purpose-built PWM generator that does everything digitally. There are yet more methods -- just brainstorm on how you might make a variable duty cycle square wave; if you can think of it, it's probably been done.
> If I were to use PWM for motor control, and use a fixed frequency > triangle wave carrier, what would be the modulating signal in this case > ? Is the output PWM signal being fed back in ? > Any hints, suggestions would be helpful.
If you're generating your PWM with a triangle wave generator and comparator, then you would be getting the DC duty cycle command from some form of feedback from your motor or following mechanism, plus some controller circuitry. Probably the most common feedback would be the average current in the motor, since controlling the motor current will provide fairly direct control of the motor torque. The second-most common would be the motor speed or position, to make a servo mechanism out of the whole thing. Again, possibilities abound, it all depends on what you want to do. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Sun, 25 Dec 2011 21:14:19 -0800 (PST), Daku <dakupoto@gmail.com> wrote:

>Could some electronics guru please clarify the following. >I understand that Pulse Width Modulation (PWM) uses >a high fixed frequency carrier signal (e.g., triangle wave) >and a low frequency modulation signal -- or even a DC >level. >If I were to use PWM for motor control, and use a fixed >frequency triangle wave carrier, what would be the >modulating signal in this case ? Is the output PWM >signal being fed back in ? >Any hints, suggestions would be helpful.
Minimum would be the speed control level, then add ramping, reversing, current limit and braking controls, depends on motor use. Grant.
On Dec 26, 9:14=A0am, Jamie
<jamie_ka1lpa_not_valid_after_ka1l...@charter.net> wrote:
> Daku wrote: > > Could some electronics guru please clarify the following. > > I understand that Pulse Width Modulation (PWM) uses > > a high fixed frequency carrier signal (e.g., triangle wave) > > and a low frequency modulation signal -- or even a DC > > level. > > If I were to use PWM for motor control, and use a fixed > > frequency triangle wave carrier, what would be the > > modulating signal in this case ? Is the output PWM > > signal being fed back in ? > > Any hints, suggestions would be helpful. > > =A0 The triangle wave is only a reference to a voltage comparator circuit=
.
> > =A0 If you were to use a comparator you can use lets say the (+) input to > place your triangle reference to and the (-)input as the modulated > signal, to regulate output. > > =A0 =A0Remember that since in this example, you are using a (-) input for=
the
> set point, you must think backwards, unless you invert your control > signal to correct the behavior, which most people do. > > =A0 Ok, so lets say your speed set point is at near 0 volts on the (-) > input of the comparator, since this does work backwards, it would mean > that when the triangle wave is at the very bottom of the base line or > just above the value of the (-) input, it'll force the comparator to a > full on state. This will give you a nice looking fast raise in the wave. > > =A0 Because you are now turning this on virtually at base you'll see > either a pulse train that has a near 100% duty cycle, meaning, the off > state is very short. You can even adjust it so that it remains on > constantly for 100% output. Normally this signal drives a switching > transistor into saturation so that no heat is generated in the > transistor, because it is virtually 0 ohms or not much above it, > depending on the device you use as the switch. A Mosfet is a good > candidate for this. > > =A0 =A0Now, when you adjust your (-) input to 50% of the level of your > triangle wave, the comparator will not switch on the output until the > triangle reaches the same or slightly higher voltage than the (-) input. > =A0 =A0you will see a 50% duty cycle at this point which will give a DC m=
otor
> full power 50% of the time. > > =A0 =A0Now for some helpful tips in selecting base frequency that carries > this PWM signal, What I do is determine the induction of the motor and > set the base frequency so that you'll get 50% current at 50% duty cycle. > =A0 This ofrcouse only holds true with a DC motor at or near > locked/stalled rotor. When they get spinning they back generate, like a > DC generator would and thus it is like having an increase of induction > which will relieve the load from your supply. Of course, if you have a > load on the shaft that back generation isn't going to happen so much and > thus your supply will feel the pain! :) > > =A0 =A0As far as feed back is concerned? You can operate what is called > armature feed back to maintain speed or using some kind of resolver, > encoder, tach what ever to monitor the actual rotor speed. In precision > applications this is required. > > =A0 =A0 In armature feed back, speed sensing can be tricky because you ne=
ed
> to separate the PWM on duty time verses the regenerated energy coming > back. The regenerated energy is what you need to look at for a precise > speed reference however, for a general purpose reference, many simply > take the output with motor connector and pass it through a smoothing > filter RC network that gives them and average between the on cycle and > the return energy as a feed back to add to the (-) input in this > example, which would throttle back the width of the demand. as motor > speed picks up, so does the regenerated energy and this keeps happening > until they find a happy stable home! With no load, you may find the > output signal looking like there is very little PWM pulse higth there, > at full speed. It may look like a stair step shape with a variable > height on the step going down. > > =A0 =A0 so, if you were to use a dual comparator you could use one as the=
PWM
> referenced from your triangle source and speed set point and another > comparator to trigger cancel effect from the feed back of your speed > demand.. > > =A0 =A0I hope you enjoyed that long winded explanation, I am still > recovering from yesterdays Xmas. > > =A0 P.S. > =A0 =A0 If you need base line examples? We can plot some idea here in ASC=
II
> text. > > =A0 Jamie
Thanks for the detailed explanation. As for the regenerated energy that you mention, are referring to the case when the when the motor inductor reverses polarity and causes the current to flow in the reverse direction -- back EMF. I have used PWM before, using a triangle wave carrier and a sine wave modulator, but for the DC motor case, I was not sure about what would the second input signal (other than the triangle wave) to the basic comparator based PWM scheme.
On Mon, 26 Dec 2011 20:49:11 -0800, Daku wrote:

> Thanks for the detailed explanation. As for the regenerated > energy that you mention, are referring to the case when the > when the motor inductor reverses polarity and causes the > current to flow in the reverse direction -- back EMF.
Motors *always* generate a back EMF, opposing the applied voltage, while ever they're rotating. That's why the current goes up when you load them, and the speed falls. Think of a motor as a reverse EMF, proportional to rotational speed, in series with the resistance of the windings, brushgear, etc.
> I have used PWM before, using a triangle wave carrier and a >sine wave > modulator, but for the DC motor case, I was not sure about what would > the second input signal (other than the triangle wave) to the basic > comparator based PWM scheme.
The "second signal" would be the controlling DC voltage. It's customary to incorporate some sort of current feedback, to make the controlling voltage into a current, ie. torque, demand. -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)