# Introduction

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.

# Motivation

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 V_{mot_avg} and V_{g} are of the same polarity but V_{g} 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.

# Basic operation

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:

Mapping A | Q1 | Q2 | Q3 | Q4 |

on-time state | close | open | open | close |

off-time state | close | open | open | open |

Mapping B | Q1 | Q2 | Q3 | Q4 |

on-time state | close | open | open | close |

off-time state | open | open | open | close |

Mapping C | Q1 | Q2 | Q3 | Q4 |

on-time state | open | close | close | open |

off-time state | open | open | close | open |

Mapping D | Q1 | Q2 | Q3 | Q4 |

on-time state | open | close | close | open |

off-time state | open | close | open | open |

(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 V_{bat}, 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 V_{bat}. 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:

- t
_{on}is the on-time - t
_{off_conduct}is the portion of the off-time when the bridge is conducting current - t
_{off_zero}is the portion of the time when the current is 0.

There are some obvious relationships between these:

- t
_{off_conduct}+t_{off_zero}= t_{off} - t
_{on}+t_{off}= t_{cycle}

Finally there’s another time metric, worth introducing, which is the conduction time:

- t
_{conduct}= t_{on}+t_{off_conduct}

Using this terminology, the difference between continuous and discontinuous current modes is if t_{off_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 = (V_{bat} – V_{g} – I_{mot_avg}*R_{m})/L_{m} during the on-time, and

dI/dt = (– V_{g} – I_{mot_avg}*R_{m})/L_{m} 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, V_{g}. In other words the motor voltage during this period should be V_{g}. Now, using that knowledge, we can calculate the average motor voltage:

V_{mot_avg} = (V_{bat}*t_{on} + V_{g}*t_{off_zero})/t_{cycle}

It’s also beneficial to introduce another voltage, which is the average voltage the motor sees during the time the bridge conducts current:

V_{avg_conduct} = V_{bat}*t_{on}/t_{conduct}

Note, that if the bridge is in continuous current mode, the two values are equal as t_{cycle} = t_{conduct} and t_{off_zero} is 0.

# Steady state

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:

I_{ripple} = (V_{bat} – V_{g} – I_{mot_avg}*R_{m})/L_{m}*t_{on} = (V_{g} + I_{mot_avg}*R_{m})/L_{m}*t_{off_conduct}

Expressing V_{g} from this, we get:

V_{g} = V_{bat} * t_{on}/t_{conduct} – I_{mot_avg}*R_{m}

which is the same as:

V_{g} = V_{avg_conduct} – I_{mot_avg}*R_{m}

And solving it for the average motor current, we get:

**I _{mot_avg} = (V_{avg_conduct} – V_{g}) / R_{m}**

Now, let’s put this back into the ripple-current equation:

**I _{ripple} = 1/L_{m} * V_{avg_conduct} * t_{off_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 t
_{cycle} - The duty-cycle, represented by D (D = t
_{on}/t_{cycle}) - The battery voltage V
_{bat} - The speed of the motor – or the generator voltage, represented by V
_{g} - The motor parameters R
_{m}and L_{m}

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:

I_{mot_avg} * t_{cycle} = 1/2 * I_{ripple} * t_{conduct}

Putting the expressions for I_{mot_avg} and I_{ripple} into this and expressing V_{g}, we get:

V_{g} = V_{avg_conduct} * (1 – 1/2 * R_{m}/L_{m} * t_{conduct} * t_{off_conduct} / t_{cycle})

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 t_{off_zero} is zero as well:

For this special-case we can do some simplifications to the previous equation, and after substituting D_{critical} = t_{on}_{_critical}/t_{cycle}, we get:

V_{bat} * D_{critical} * (1 – 1/2*R_{m}/L_{m}*t_{cycle}*(1-D_{critical})) = V_{g}

This is a quadratic equation for D_{critical}:

D_{critical}^{2} – D_{critical}*(1+2 * L_{m}/R_{m} * 1/t_{cycle}) + 2 * L_{m}/R_{m} * 1/t_{cycle} * V_{g}/V_{bat} = 0

This equation has at most two roots. However, as long as V_{g} has the same polarity as V_{bat} (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:

D_{critical} = 1/2 + L_{m}/R_{m} * 1/t_{cycle} – sqrt[ (1/2 + L_{m}/R_{m} * 1/t_{cycle})^{2} + 2 * L_{m}/R_{m} * 1/t_{cycle} * V_{g}/V_{bat} ]

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 V
_{g}/V_{bat}, in other words the relative speed of the motor. - The second is L
_{m}/R_{m}* 1/t_{cycle}. Since L_{m}/R_{m}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 L_{m}/R_{m} * 1/t_{cycle} 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 V_{g}: If V_{g} is negative (that is opposing V_{bat}), the off-time current will never be able to close the diode as V_{g} biases the diode in the forward direction. So in that case, the bridge is always in continuous current mode.

## Finding t_{conduct}

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:

_{g} = V_{avg_conduct} * (1 – 1/2 * R_{m}/L_{m} * t_{conduct} * t_{off_conduct} / t_{cycle})

From this, we get (after expressing V_{avg_conduct} from V_{bat} and rearranging things):

V_{g}/V_{bat}*t_{conduct} = t_{on} * (1 – 1/2 * R_{m}/L_{m} * t_{conduct} * (t_{conduct}-t_{on}) / t_{cycle})

This is a quadratic equation for t_{conduct}. 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 t_{cycle}.

# 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 V_{g}) 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 R_{m}. In this case V_{g} is close to -V_{bat}/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 V_{g}. This current will start increasing (decrease in absolute value) during the on-time, as V_{bat} 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 R_{m}), according the following equation:

I_{mot}(t) = I_{mot}(0) + (V_{bat}/R_{m} – I_{mot}(0)) * (1 – e^{-t/(Lm/Rm)})

Note that I_{mot}(0), the initial current through the motor when the change in the duty-cycle happens is negative, so is I_{mot}(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:

I_{mot}(0) + (V_{bat}/R_{m} – I_{mot}(0)) * (1 – e^{-tstop/(Lm/Rm)}) = 0

Now, solving it for t_{stop}, we get:

t_{stop} = – L_{m}/R_{m} * ln(1 – I_{mot}(0) / (V_{bat}/R_{m} – I_{mot}(0)) )

Next, to do the integral, we have to find the primitive function of the current curve. It is the following:

V_{bat}/R_{m} * t + (L_{m}/R_{m}) * (V_{bat}/R_{m} – I_{mot}(0)) * e^{-t/(Lm/Rm)} + C

With these two, we can calculate the integral. After some simplifications, the total charge released is the following:

Q_{reverse} = – L_{m}/R_{m} * (I_{mot}(0) – (V_{bat}/R_{m}) * ln(1 – I_{mot}(0) / (V_{bat}/R_{m} – I_{mot}(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 I_{mot}(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:

Q_{reverse_max} = L_{m}/R_{m} * (I_{max} + (V_{bat}/R_{m}) * ln(1 + I_{max} / (V_{bat}/R_{m} + I_{max}) )

This charge changes the capacitor voltage following the familiar formula: V_{ripple_max} = Q_{release_max}/C. If we know how much ripple voltage the circuit can tolerate, we can calculate the size of the capacitor needed:

C = L_{m}/R_{m} * (I_{max} + (V_{bat}/R_{m}) * ln(1 + I_{max} / (V_{bat}/R_{m} + I_{max}) ) / V_{ripple_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/R_{m}.

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 V_{bat}/R_{m}, so if we put that in the place of I_{max} in the previous equation we get some nice simplifications:

C = 1.405 * L_{m}/R_{m}^{2} * V_{bat}/V_{ripple_max}

This is much easier to comprehend, but as you can see it has an inverse quadratic relationship to R_{m}. That is understandable since in the previous calculations we’ve assumed I_{max} to be independent of R_{m}, while in here it’s not the case anymore.

# Summary

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

mechanicalenergy 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,

Andras Tantos

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.

Andras

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.

Hello,

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.

Regards,

Andras Tantos

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.

Hi Andras,

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.

Thanks,

Miguel

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?

Andras

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?

Prapan,

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,

Andras

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?

Thanks

It’s not that you can’t turn off all FETs, it’s that you shouldn’t. If you did, the motor inductor current

willcontinue to flow and

willfind 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

voltage.

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.