The following article will go though a drive mode where the catch diodes are conducting for a significant amount of time in each cycle. If you haven’t read the introductory page of the series and you’re not familiar with H-bridge concepts, I suggest you do and only than continue reading this article. I also strongly suggest you read the page on sign-magnitude drive because much of the discussion here will build on the material covered over there.
If however you did read that introductory article, you might be a little surprised. There I put together a neat little taxonomy of available drive modes, and concluded that there’s only two reasonable variants. Those, the sign-magnitude drive and the lock anti-phase drive’ we’ve already covered in previous chapters. So what’s all this about than?
Well, as it turns out, I’ve lied. To be more precise, I didn’t tell the whole truth. Before we talk about the details and the reasons however, let’s review the basics! Our motor control circuit is an H-bridge, with the following configuration: The load, the DC motor is a complex beast, but we will mostly use just a very simple model for it: For this discussion we won’t be able to ignore the internal resistance for the most part.
Finally, a warning: while the previously discussed drive modes are in wide use, I haven’t found too many resources that describe what I’m about to here. That means that many of the terms I’m using (including the name actually) I came up with and may not correspond to the industry-standard nomenclature. If you find that misleading or know the official term for something in here, please let me know so I can make the appropriate corrections.
The principle assumption leading to the original analysis and the resulting two possible drive modes was that we wanted the switches to conduct during both the on-time and the off-time. Our intention was to minimize heat dissipation on the switches and since in most cases the voltage drop on the switch would be less than that on the diode, it’s better to use the switches for conducting current.
As it turns out, both the lock anti-drive drive and the sign-magnitude drive suffer from a serious problem: regenerative braking. I say problem, because this phenomena, while sounds cool at first – putting energy back into the battery – complicates system design quite a bit and pretty much forces closed-loop control of the bridge with additional sensing circuitry.
If we look back at what causes regeneration, we’ll see that it happens whenever Vmot_avg and Vg are of the same polarity but Vg is the greater of the two. Under those circumstances, the average current starts flowing in the reverse direction, recharging the battery. The current could reverse direction, because our switches allow current to flow both ways. If there was a way to block the current from reversing – at least through the battery – we could potentially make an H-bridge which doesn’t have any state with regeneration. Turns out, such reverse-current protected elements are diodes, and we already have four of them in the bridge. The question is, can we make use of them. And we’ll investigate the answer in the next chapter.
The switching patterns of this drive mode are a modification of the sign-magnitude drive. The idea is that during the off-time we’ll leave only one of the four switches closed, instead of two as with the sign-magnitude drive. This will force the off-time current to flow through one of the catch-diodes. There are four reasonable ways of doing that:
(If you are pedantic, you’ll notice that there are four other possibilities, bur they are effectively identical to the four I have listed at least as far as the discussion here is concerned.)
The four combinations are the four possible answers to the two binary questions:
- Is the on-time voltage applied in the forward or reverse direction?
- Does the high- or low-side switch stay closed during the off-time?
There usually is a control signal deciding the answer to the first question, while the second one is usually answered during the design of the bridge (there are exceptions we’ll talk about in a later article).
For the general discussion it doesn’t matter too much which direction the on-time voltage is applied, so I’m going to stick with my old habit of choosing one where the motor is driven in the forward direction (mapping A or B). For the most part, I’ll assume that we keep the high-side switch closed, so I’ll use ‘mapping A’ from now on.
Let’s take a look at the switching diagram first:
You see that during the off-time, I drew the ‘b-side’ motor potential being slightly above Vbat, and at the same time, the motor voltage being slightly negative. To understand the reasons for that, let’s look at the current flow diagrams! During the on-time, the current does what it always does: flows through the two closed switching elements.
When the switch-over happens to the off-time, Q4 opens and only Q1 stays closed. At that point the motor current (being an inductive load) will have to continue flowing and the only way it can is through forward-biasing D3. So, the off-time current flow will be the following:
In order for current to flow through D3 however, the b-side lead of the motor needs to be at a slightly higher potential than Vbat. This voltage is the forward-bias voltage of the diode, and is in the range of 0.2 and 1V depending on construction, current, temperature among other things. In the following discussions I will disregard this little voltage difference though, and assume that the diode drop is 0. Just keep in mind, that for more precise calculations, you will have to take that forward drop into consideration as well.
In other drive modes (mapping B for example) it’s the low-side diode and switch that conducts the current:
In both cases however, essentially the motor is short-circuited, the same way as in sign-magnitude drive. Consequently the current diagram of the motor doesn’t change much either.
Continuous and Discontinuous Current
Now, before we go any further, we’ll have to discuss the topic of current flow a little deeper. What happens, when (during the off-time) the current decreases to 0? In both of the sign-magnitude and lock anti-phase drive modes the current is free to turn negative, as the conducting elements are bi-directional. Not the case here! The conducting diode (D3 for example) will close as soon as the current reaches 0. If that happens, there’s no current flow in the circuit for the rest of the cycle. So, depending on the slopes of the on-time and off-time currents (and the times spent in each state) the current might flow continuously or discontinuously in the system:
This phenomena has some nice benefits as we’ll see later, but unfortunately means that our equations will become messier as their form changes depending on which of the two distinct operating mode the bridge is in.
You can see that I introduced three time-periods:
- ton is the on-time
- toff_conduct is the portion of the off-time when the bridge is conducting current
- toff_zero is the portion of the time when the current is 0.
There are some obvious relationships between these:
- toff_conduct+toff_zero = toff
- ton+toff = tcycle
Finally there’s another time metric, worth introducing, which is the conduction time:
- tconduct = ton+toff_conduct
Using this terminology, the difference between continuous and discontinuous current modes is if toff_zero is zero or not.
While many things are different, some of the knowledge that we’ve gained by analyzing the simpler drive modes, carries over. For example, the slope of the current change during the on- and off-time (as long as it conducts) can be found by the following equations:
dI/dt = (Vbat – Vg – Imot_avg*Rm)/Lm during the on-time, and
dI/dt = (– Vg – Imot_avg*Rm)/Lm during the off-time.
As I promised, I am already involving the voltage drop on the internal resistance in these equations: we will need to make use of them pretty soon.
Average motor voltage
In order to be able to calculate the average motor voltage, there’s one last thing we’ll have to discuss: what is the voltage on the motor terminals in discontinuous current mode, when the current is 0? The answer is fairly simple: Since the current doesn’t change, the inductor of the motor should see 0 voltage difference. The internal resistance drops 0 as well, since the current is 0. This means that the motor terminal voltage must cancel out the generator voltage, Vg. In other words the motor voltage during this period should be Vg. Now, using that knowledge, we can calculate the average motor voltage:
Vmot_avg = (Vbat*ton + Vg*toff_zero)/tcycle
It’s also beneficial to introduce another voltage, which is the average voltage the motor sees during the time the bridge conducts current:
Vavg_conduct = Vbat*ton/tconduct
Note, that if the bridge is in continuous current mode, the two values are equal as tcycle = tconduct and toff_zero is 0.
Our steady-state is defined when the parameters of the bridge stay constant from cycle-to-cycle. This means both electrical and mechanical characteristics: currents, voltages, torque, acceleration etc. If that’s true, the current-change during the on-time and off-time must chancel each other out, and the change (the ripple-current) is the following:
Iripple = (Vbat – Vg – Imot_avg*Rm)/Lm*ton = (Vg + Imot_avg*Rm)/Lm*toff_conduct
Expressing Vg from this, we get:
Vg = Vbat * ton/tconduct – Imot_avg*Rm
which is the same as:
Vg = Vavg_conduct – Imot_avg*Rm
And solving it for the average motor current, we get:
Imot_avg = (Vavg_conduct – Vg) / Rm
Now, let’s put this back into the ripple-current equation:
Iripple = 1/Lm * Vavg_conduct * toff_conduct
Finding the operating mode
Let’s see if we can figure out if the bridge at a given operating point is in continuous or discontinuous mode. The external conditions that define the operating point are the following:
- The operating frequency represented by tcycle
- The duty-cycle, represented by D (D = ton/tcycle)
- The battery voltage Vbat
- The speed of the motor – or the generator voltage, represented by Vg
- The motor parameters Rm and Lm
Before we can attack this problem, we’ll have to do one more thing. It turns out, we can arrive at the average current for discontinuous current mode in a different way as well. For this operating mode, that is when the current starts from 0 in each cycle, the area under the current ‘triangle’ should be the same as the area under the average current rectangle:
Note, that this approach doesn’t work for continuous current mode, as the current doesn’t reach zero during the cycle.
From this insight, we get this:
Imot_avg * tcycle = 1/2 * Iripple * tconduct
Putting the expressions for Imot_avg and Iripple into this and expressing Vg, we get:
Vg = Vavg_conduct * (1 – 1/2 * Rm/Lm * tconduct * toff_conduct / tcycle)
The final insight is this: there’s a critical point where the continuous and discontinuous current modes meet: at this point the off-time current just reaches zero at the very end of the off-time. So in that case, the above equation is correct, while toff_zero is zero as well:
For this special-case we can do some simplifications to the previous equation, and after substituting Dcritical = ton_critical/tcycle, we get:
Vbat * Dcritical * (1 – 1/2*Rm/Lm*tcycle*(1-Dcritical)) = Vg
This is a quadratic equation for Dcritical:
Dcritical2 – Dcritical*(1+2 * Lm/Rm * 1/tcycle) + 2 * Lm/Rm * 1/tcycle * Vg/Vbat = 0
This equation has at most two roots. However, as long as Vg has the same polarity as Vbat (we’ll talk about what happens if it’s not in a minute), only one of the roots is between 0 and 1, leaving us with exactly one physically valid root:
Dcritical = 1/2 + Lm/Rm * 1/tcycle – sqrt[ (1/2 + Lm/Rm * 1/tcycle)2 + 2 * Lm/Rm * 1/tcycle * Vg/Vbat ]
Not a nice equation, but at least a solution. Finally we’re at the point where we can figure out in what operating mode the bridge is in: With the operational parameters, we calculate the critical duty-cycle. If the actual duty-cycle is above this critical value, the bridge operates in continuous current mode. If it is below that, the bridge is in discontinuous current mode.
If you look carefully at the solution, you’ll see that it depends on a few ratios only:
- First, it’s the ratio of Vg/Vbat, in other words the relative speed of the motor.
- The second is Lm/Rm * 1/tcycle. Since Lm/Rm is the electrical time constant of the motor, this ratio is the relative time constant of the motor to the bridge cycle time.
Usually a bridge operates at lower cycle time as the motor time constant and even if it didn’t the calculations above assumed that; We assumed the current change to be linear during the on-time and the off-time and that is only true if the bridge operates much faster than the motor time constant. So Lm/Rm * 1/tcycle must always be – for our purposes at least – bigger than 1.
I’ve plotted a few of these curves in the following graph:
You can see that each of the curves cut the square which represents all possible duty-cycle and relative motor speed combinations (in the forward direction) into two. The area above the curves is the land of continuous current mode operation, the area below them is for discontinuous current modes. You can see that the curves don’t deviate too much from the diagonal, so a good first-order approximation is that if the relative motor speed is less than the duty cycle, the bridge operates in discontinuous current mode. This approximation has a roughly 15% error, but the error is less and less if you increase the operating frequency of the bridge.
Finally, the promised explanation for negative Vg: If Vg is negative (that is opposing Vbat), the off-time current will never be able to close the diode as Vg biases the diode in the forward direction. So in that case, the bridge is always in continuous current mode.
The last topic to discuss is this: let’s say your bridge operates in discontinuous current mode. What is the portion of the time it spend conducting?
For the answer, we’ll have to go back to the equation in the previous chapter:
Vg = Vavg_conduct * (1 – 1/2 * Rm/Lm * tconduct * toff_conduct / tcycle)
From this, we get (after expressing Vavg_conduct from Vbat and rearranging things):
Vg/Vbat*tconduct = ton * (1 – 1/2 * Rm/Lm * tconduct * (tconduct-ton) / tcycle)
This is a quadratic equation for tconduct. I’m not going to give you the closed-form solution, because it’s an eye-sore and it’s actually easier to substitute numbers into this equation and solve if for a particular case, than to derive the parametric solution. What is important to note here is that just as before, from the two possible solutions, only one will be physically meaningful, that is between 0 and tcycle.
Transient states and input capacitor
So far it seems it’s impossible for the current to flow in the reverse direction, and we’ve really covered quite a bit of ground. The previous discussion not only applies to steady-speed operation but to acceleration, deceleration as well as long as the cycle-to-cycle averages don’t change.
When one of the parameters (mainly D or Vg) changes, it takes time for the system to settle in the new steady-state. In that transient, the current can flow in the reverse direction during the on-time. Let’s take a quick example to understand why!
Let’s say we operate the bridge in the reverse direction at 50% duty-cycle and under relatively heavy loads. Let’s also assume the motor has a really low Rm. In this case Vg is close to -Vbat/2 and the average motor current is a relatively high positive number. Because of the bridge operates in the reverse direction, the motor current flows through the battery in the positive direction as well, discharging the battery.
Now, let’s imagine that we abruptly change the bridge top operate in the forward direction, still with 50% duty-cycle. The first cycle with the changed duty-cycle will see the motor current to be opposite to the battery voltage, just as Vg. This current will start increasing (decrease in absolute value) during the on-time, as Vbat is applied in the opposite direction to the motor current now, but for the moment it still is flowing into the battery, recharging it.
When the off-time comes along, something strange happens: As Q4 closes but Q1 stays open, the motor current (still flowing in the negative direction) will have to find a way to continue flowing. It can’t flow through D3, since that diode can’t conduct in the reverse direction. The only way the current can flow is through D4:
What that means, is that the bridge is essentially in the same mode for both the on- and the off-time. The only difference is that it’s the diode and not the switch that conducts the current, but it flows through the same leg in the same direction.
This also means that the current will continue increasing (decrease in absolute value) during the off-time as well.
The next on-time will continue in the same way just as the next off-time and so on. This process continues as long as the motor current reaches 0 (coming from the negative side) at which point the normal operation of the bridge will resume: the off-time current will start flowing through D3 as usual.
From this example, the following can be derived: in the transient, the motor current increases through potentially several cycles from it’s initial negative value to 0. The increase will not depend on the timing of the bridge as the current flow and voltages stay the same during the on- and off-times. The current change will follow an exponential curve (we can no longer assume linear process as the current change is too large to assume a constant voltage drop on Rm), according the following equation:
Imot(t) = Imot(0) + (Vbat/Rm – Imot(0)) * (1 – e-t/(Lm/Rm))
Note that Imot(0), the initial current through the motor when the change in the duty-cycle happens is negative, so is Imot(t). Of course only the portion of the curve where the current is negative is valid:
As we’ve discussed it several times, current flowing back to the battery is a problem in most implementations. The main goal with using this switching pattern to begin with was to get rid of this reverse-current! Well, apparently we weren’t completely successful.
However, as long as we can put a limit on the charge that this reverse current pushes back into the battery, we can handle it by putting a capacitor on the input on the bridge that can temporarily soak up the extra charge.
So, let’s figure out if there’s an upper bound to this charge? The total charge delivered is the integral of the current over time, so the first order of business is to figure out how long does the current flow. It stops flowing when the motor current reaches 0, so:
Imot(0) + (Vbat/Rm – Imot(0)) * (1 – e-tstop/(Lm/Rm)) = 0
Now, solving it for tstop, we get:
tstop = – Lm/Rm * ln(1 – Imot(0) / (Vbat/Rm – Imot(0)) )
Next, to do the integral, we have to find the primitive function of the current curve. It is the following:
Vbat/Rm * t + (Lm/Rm) * (Vbat/Rm – Imot(0)) * e-t/(Lm/Rm) + C
With these two, we can calculate the integral. After some simplifications, the total charge released is the following:
Qreverse = – Lm/Rm * (Imot(0) – (Vbat/Rm) * ln(1 – Imot(0) / (Vbat/Rm – Imot(0)) )
As expected, the sign is negative, so the charge is coming out of the bridge, into the battery (or the capacitor we’re trying to size).
So what is the maximum value of this charge? It is when Imot(0) is maximal (in absolute value). So how big this current can be? We can take two approaches, just as we did in the lock anti-phase drive. We can take either the short-circuit current of the motor or the current-limit of the bridge into account. The latter is still a very conservative estimation and is usually much lower than the short-circuit current of the motor, so let’s use that. In the following equations, I’ve changed the signs so that we substitute the positive bridge current:
Qreverse_max = Lm/Rm * (Imax + (Vbat/Rm) * ln(1 + Imax / (Vbat/Rm + Imax) )
This charge changes the capacitor voltage following the familiar formula: Vripple_max = Qrelease_max/C. If we know how much ripple voltage the circuit can tolerate, we can calculate the size of the capacitor needed:
C = Lm/Rm * (Imax + (Vbat/Rm) * ln(1 + Imax / (Vbat/Rm + Imax) ) / Vripple_max
Let’s see an example! Let’s say our motor has a 30uH inductance, and a 1Ω resistance. Let’s say we operate from a 20V supply and the bridge can sustain a 10A current. Finally let’s assume that we can tolerate 5% ripple current. The result is a 473µF.
If we want to build a bridge with a 100A current delivery capability, the input capacitance needed would jump to almost 10x, or around 3500µF.
If we assume a much lower resistance, let’s say 100mΩ only (and still 10A current limit), the capacitor value jumps to over 5000µF. That is a trend: for low resistances, the capacitance required is more or less proportional to 1/Rm.
You can also play around with the equation to get a feel to how the various parameters affect the solution.
Another interesting experiment is this: what if we want to calculate the capacitance needed for the stall-current of the motor? The stall current is Vbat/Rm, so if we put that in the place of Imax in the previous equation we get some nice simplifications:
C = 1.405 * Lm/Rm2 * Vbat/Vripple_max
This is much easier to comprehend, but as you can see it has an inverse quadratic relationship to Rm. That is understandable since in the previous calculations we’ve assumed Imax to be independent of Rm, while in here it’s not the case anymore.
We started this article with the idea to construct an H-Bridge drive mechanism that doesn’t suffer from regenerative braking. After a lot of ugly math I hope I convinced you that it is in deed possible. There are of course down-sides to this approach:
- The catch diodes conduct for a significant portion of the time and that is usually going to generate more heat than if the switches conduct the current.
- The bridge has two operating modes: continuous and discontinuous current mode and the operating parameters, including the motor torque (average motor current) behaves differently in those two modes. This change in behavior complicates closed-loop speed-control design.
- We still need to employ an input capacitor to handle transient states, and the capacitor value can be rather large, especially for high-current bridges.
- The analysis of the bridge is significantly more complicated due to the non-linear behavior of the diodes.
With all that, this drive mode has one huge advantage, one that in many cases outweighs the negatives: it is inherently safe, as it can’t over-charge the battery during braking.
Where to go from here?
If you’re really pedantic, you’ll notice that there’s another possible drive mode we haven’t discussed so far: you can take the lock anti-phase drive and modify it to work in an asynchronous fashion just as we did with the sign-magnitude drive here. I will leave that operating mode alone at least for now as I don’t see too much practical value to it.
So now that we’ve finished with the detailed analysis of all interesting drive modes, we’re almost ready to move on and discuss drive circuitry and component selection. However before we jump into that topic, the next installment will start with a comparison of the drive modes we’ve discussed here to be able to see the differences and the similarities side-by-side.
In the truth table (mapping 1-4), in which conditions there is braking mode?
As my understanding all off-times are the braking modes aren’t they?
I guess it depends a bit on your definition of braking. I like to say, that the bridge is braking, when it takes mechanical energy out of the system. This happens in many cases, the easiest when the average motor current flows in the opposite direction to the supply voltage (that is the current is flowing back to the battery). It’s called regenerative braking. There are other braking modes as well, when the mechanical energy is converted to heat on the internal resistance of the motor. In these instances, the average motor current may or may not reverse.
Note however that I talk about average current. While the motor current of course is a function of the driving mode, and the instantaneous current may flow one way or the other during the off-cycle, it doesn’t directly corresponds to (this definition of) braking. The average motor current depends on a lot of other things than just the mapping mode: the battery voltage, the duty cycle, the mechanical load, etc.
I hope this helps,
Isn’t there a third sign-magnitude drive mode where all switches are off during the off cycle? Won’t this will completely stop the reverse current during the off cycle?
Not really. One does not simply ‘stop’ the current from flowing through an inductor. It *will* flow and it *will* find a way to continue flowing. If you try to stop it by turning all FETs off, you force the motor to generate a huge voltage spike across it’s terminals. The amplitude of the spike will be just enough to make the current flow again – probably through some destroyed structure inside the FETs. So no, please don’t do that.
Dear said, in some application notes from ST Microelectronics you can find information about mode you are talking about. They advising in some designs examples for motors that store large amount energy in windings to fast decay this current via reverse biased Schottky diodes. Diodes needs to be rated to motor nominal current. They are conducting for quite short period of time because all happens over Vsup+Vbemf.
In this case, I think, the current will flow through D1 and D4, or D2 and D3, from ground to the power supply. Therefore, the FETs won’t be destroyed. If there is a capacitor at the power supply, the current will charge the capacitor.
Am I correct?
The more I think about it, the more I realize, you might be correct. When you stop the current from flowing, the voltage on the motor will invert (decreasing current on an inductor will lead to this) which will forward-bias either D1 and D4 or D2 and D3 as you said. You essentially implemented a asynchronous version of lock-anti-phase drive.
In a lot of websites are schematic of using the L298 H-bridge with the pwm signal on the enable pins and using the IN pins just to set direction, what do you think about it?
That is essentially asynchronous sign-magnitude drive (http://www.modularcircuits.com/blog/articles/h-bridge-secrets/asynchronous-sign-magnitude-drive/) with all of it’s pros and cons.
First of all, thanks for your very informative posts.
It is similar but not the same: I reckon when the bridge is disabled all switches are off, so the current will flow through the protective diodes to the power supply (or h-bridge capacitor), while the asynchronous sign-magnitude drive one switch is kept on during the PWM-off period.
If you turn off all switches, the diodes won’t allow for the motor current to continue to flow. You have to keep at least one of the switches on to allow the current to continue flowing.
Please correct me if I am wrong, but …
if Vmot > Vbat won’t the diodes will allow current to flow back to the supply? (I use Vmot instead of Vg because when the motor coil current is interrupted, the motor coil voltage can and will grow higher than the counter electromotive force Vg and so diodes will allow current to flow back to the battery ).
I understand that keeping one switch open will help current to flow and it will reduce the heating of one diode though.
Let’s imagine the following: let’s say D4 closes (starts conducting), and as you’ve said, Vmot > Vbat. In that case, the right-side terminal of the motor is at (essentially) 0V. Consequently, the left-side terminal is at Vmot. The top side of the bridge of course is at Vbat, which is lower than Vmot. As such, D1 is reverse-biased and will not conduct. D2 is reverse-biased as well since its cathode is at a higher potential than it’s anode. This means no current can flow through the motor. You can follow similar reasoning, starting with the initial assumption of any of the four diodes conducting.
Great articles! Just a thought, would it be possible to replace the catch diodes with grounded pmos components? Being that the Vf of the conducting MOSFET can be similar to that of the discrete diodes, and the Rds may be in the 10 to maybe 100 mohm range, heat dissipation would be leaa of an issue, no?
I’m not sure I understand your point. To open a MOSFET you need a gate-source voltage of at least Vth. If you connect the gate to the drain (grounded as you’ve said) you would need at least that much between the source and the drain as well before the FET starts conducting. Most power FETs have a higher Vth than the forward voltage drop of a (schottky) diode. Or did I miss something?
You said about brake which meaning is decelerate to new lower speed right?
What about when motor is rotating then want to reverse that, if that case? How to analyze that?
And another 2 thing is: someone rotate motor , push a car for example. Will that harm component? Should I float all FET gate input?
And if motor in brake state what if I rotate motor , same like push a car. What will be happen?
For reverse i mean suppose motor is rotate clockwise , now I want to counter-clockwise. What is the good way to do that quickly?
If suddenly reverse mapping then current will be double that what your analyze or not? Some component need to change rating or not? Or there is a better way?
By deceleration I mean applying negative torque, that is counter-acting the direction of rotation. If you do that until the motor stops and your torque doesn’t decrease to 0 in the meantime, the motor will start rotating in the other direction and your deceleration becomes acceleration.
As far as applying an external torque to a motor (by pushing the car in your example) that’s not all that different from the normal operation of the motor. When the motor does work, it does so by counteracting some external torque. There are two things you have to be careful about, but that’s not limited to your example.
One is that as you rotate the motor, that motor will generate some voltage. That voltage can (theoretically at least) go high enough to cause trouble if you push it high enough. The biggest problem your going to see most likely is that the motor (as a dynamo) will try to charge the battery (or whatever supply you have attached to it). That battery might not be all that happy about you pushing charge back to it.
The other problem you might see is this: say you try to keep the shaft stationary by simply shorting the motor terminals (to GND for the sake of example). When you start rotating the shaft, the induced voltage generates a current through the shorted winding of the motor. This will generate heat. Essentially you are converting mechanical energy (you turning the shaft) to heat through the motor. This heat can be damaging to the motor. A variant of this problem is if you have closed-loop control system that tries to keep the shaft stationary. In that case, it will do its best to counter-act you turning the shaft and generate even more heat. Worst, it will do that at very low (ideally 0) speed, so there’s no air-flow through your motor to cool it down.
Hope this helps,
Is there any way to get good braking control in this drive mode?
In regular sign-magnitude drive mode, average motor current is proportional to (Vbus * Duty) – Vemf, so reducing the duty cycle while staying in forward drive mode (or reverse) gives us a way to achieve precise control of braking torque. We have to deal with the regen current, of course – in my case, I plan to use an extra pair of MOSFETS to switch out the battery and turn in a bleeder resistor between Vbus and GND.
But in this asynchronous sign-magnitude mode, I don’t see how to get good braking control. If I reduce the duty cycle so that (Vbus * Duty) < Vemf, the motor current will start to reverse direction, but – in my experience – it will get 'stuck' at zero amps, because conduction through the body diodes does not occur with very small motor currents. This appears to be the same reason that this drive mode requires a higher duty cycle to start a motor than the regular sign-magnitude mode, all else being equal. Either way, the end result is free-wheeling, not driving or braking!
The other braking mechanisms – applying reverse drive, or shorting the motor terminals – are not feasible in many cases, because of the extreme amount of current involved if there is substantial Vemf when we begin braking.
You are right: if you try braking the motor by reducing the duty-cycle of the drive, you pretty soon find yourself in discontinuous drive mode. That doesn’t mean you get no braking effect, it just means, it’s less effective: the energy bleeding off of the motor is dissipated on the motor resistance and on the H-bridge elements while the bride conducts in the off-cycle. You have no (electrical) braking in the part of the off-cycle when there’s no conduction.
To overcome that (as you’ve mentioned) you have to reverse the polarity of the drive – and yes, that can mean large currents, though that can be managed by the duty-cycle, at least after the initial current transition.
It is definitely a down-side to this drive-mode, something that can confuse the control loop as well: the behavior of the bridge, especially during braking is highly non-linear. What you get in return is no regenerative braking which is a big headache on its own.
Hello and thanks for a great post.
As other people mentioned is it not possible to turn off all the mosfets during the “off-time” of the PWM? You mentioned elsewhere that this would cause a voltage Spike. Where would this spike occur? When I implement this method by applying the PWM to the enable pins rather than the IN pins it is non linear (speed with respect to duty) but seems to be more efficient (draws less current for a given input voltage). From my understanding this is switching from ON to COAST instead of from ON to BRAKE or ON to REVERSE?
It’s not that you can’t turn off all FETs, it’s that you shouldn’t. If you did, the motor inductor current will
continue to flow and will find a way. That way will most likely will be to the capacitor in parallel with the motor
(that you will need anyways for other reasons). The voltage across this capacitor will start shooting up while the motor current
decreases. If you wait long enough, you’ll see the process reverse itself as the resonator formed by the inductor and the capacitor
sloshes the energy back and forth between the inductive and magnetic fields. To get some actual numbers, let’s start with the numbers
I’ve worked out a long time ago here.
The motor has an inductance of 170uH and a resistance of 2.8Ohm. Also assume that the parallel capacitor is 100nF. Finally let’s assume
that you’re driving the motor from a 12V supply.
If you run the switch at very low frequencies, you clearly see this oscillation happening. The frequency of it is around 38kHz, the
amplitude though is +/-150V!
If you’ve chosen switches that can sustain your 12V supply, they would probably get destroyed by this
Now let’s say you do selected parts that can deal with this kind of thing, why wouldn’t you do it? There are many reasons, one of
the chief ones is generated noise. You see a 300Vpp pulse at 38kHz will generate a ton of radio emissions that will cause you all
sorts of trouble. Even if you consider that DC motors are in general noisy buggers (EMI-wise).
But let’s say you don’t care about that either. Let’s also assume you operate with a PWM rate of 20kHz (and 50% duty cycle). Even
in that case you’ll see a full cycle of the voltage swings, in this case, about a 200V peak-peak voltages. The average current is
1.15A over the inductor, which is proportional to the torque you’re getting.
As you’ve said, the current is highly non-linear with
the duty cycle, maybe you now see why: the off-time current oscillates so the average current highly depends on what phase of the
this oscillation the bridge turns back on. So this would be another reason not to do this kind of drive.
Here’s the LTSpice model I’ve used for these experiments, you can play around with it yourselves as well.
Of course your numbers could be significantly different, depending on the particularities of your motor and your drive.
I am constructing a motor drive, and this method seems perfect for me, because it has possibility to measure Ug, and easy to use but I have some questions.
-During Off-time in Discontinuous Current mode, the time needs for the current to decrease “zero” is *equivalent with the electrical time constant (Tau = Lm/Rm), or the equation has more elements? (*basically 5*Tau as I think)
-If I want to brake the motor, basically I need to switch on Q3 (If D3 was used during off-time), then “negative” current can flow (rheostatic braking). Am I correct?
-I want to measure the speed of the motor with measuring the Ug. But if my second question is correct, I need very low frequencies for that. (My motor’s Tau is 0,45ms. If I say I only use maximum 50% PWM, I need to use maximum 1 kHz. Of course I would like to use 80-90% PWM so the frequency should be much lower. So what do you think about the following idea: Using example 10khz PWM frequency, but every 0.5 or 1 seconds I stop the drive in Off-time until the Current drops to 0 (I hope it is 5*Tau), measure the Ug, then the normal operation continues.
And Finally, According to your name, I think you are Hungarian. If yes, can you tell me the Hungarian names of the drive modes you described here in the blog? 🙂
Thank you for this awesome blog!
1. The current decay is exponential, but, because Vg is opposite to the inductor voltage, it doesn’t decay to zero, it decays to a negative value (it is going to be -Vg/Rm). However this decay is cut short by the catch diode that ‘clamps’ the current to zero. So, the time it takes to decay to zero cannot be easily computed without knowing Vg, unfortunately.
2. In some ways you will always apply some amount of braking torque to the motor, during the off periods. It can be more or less, depending on what you do. If you don’t want current flowing back to the supply, the best you can do, I believe is to short the motor terminals (Q3 or otherwise) and burn the extra energy on Rm.
3. Yes, your thinking in general is correct. Your PWM will have to be very low in deed. Your idea about using a high-speed PWM and interrupt it every once in a while to do measurements is a good one, but it’s not without it’s problems either. Whatever you do, the interruption of the drive will generate vibrations and a lot of noise. Also, if you want to get to high PWM rates, you will still have to wait a long time for the field to collapse, resulting in poor peak-to-average ratios.
4. Igen, Magyar vagyok, de sajnos nem tudok segíteni: a neveket vagy olvastam valahol (angolul) vagy én találtam ki őket. Ami kevésre a műegyetemi órákrból emlékszem, ott leginkább nagy, váltóáramú motor hajtásokról tanultunk, amik zömmel lineáris, nem PWM rendszerek.