....Its what happens at the output that confuses me, and in particular the split rails and dual output devices.
.....
Why i had problems understanding dead time in a Class D amp, was that if it worked as i had supposed, and that switchover from one rail to the other only happened ever zero crossing of the input, i could see no reason for dead time during the handover, since relatively huge amounts of "dead time" occur between pulses anyway as part of the mark-space nature of the PWM stream, and because it seemed to me that the pulses would be at there shortest with a low level signal.
Apparently this is not how it works - although i confess i can see no reason why it could not work this way. I will continue to try and imagine various ways in which this might work, until i hit on something which makes sense.
The split rails are there for the same reason like in class AB amps.
You have to drive the speaker with positive and negative polarity, so you will need split rails or when running from single rails an output capacitor or bridged configuration.
Two devices you also need to provide both current directions.
Substituting one of it by resistor would cause a poor efficiency.
A PWM pattern as you were thinking of would basically also be possible, but more complex to be generated and would also cause the difficulty to control the change from upper half wave to lower half wave with low distortion.
In addition, even if done perfect your PWM pattern would lead to an intrisically lower damping factor, which also becomes a function of the signal level.
Nothing impossible, but not tempting for audiophile minds.
Regarding the dead time discussion.
The transitions from upper MosFet to the lower MosFet are not digital, when looking into the detail. It takes some ns for the MosFet to change from non conductive to conductive and even more ns for the change from conductive to non conductive.
In fact the description that no cross conduction at would be allowed is to simple.
Possible di/dt are not unlimited and for low distortion it makes sense to adjust an amp at the beginning of some crossconduction peaks.
You just need some precise timing.
Proper transition times are in the sub 50ns range and imperfections of some single ns typically are acceptable.
Based on questions like What is dead time and the like, I think diyaudio should establish a "Class D for beginners" section, where all this questions are moved to. Control theory discussions, projects, measurements, etc.could remain here.
Beginners would not need to go through 1000s of highly technical threads but easily find their basic questions answered in one of those threads.
Beginners would not need to go through 1000s of highly technical threads but easily find their basic questions answered in one of those threads.
Dont forget that the timing pulses are at least 5-10 times faster then ever the absolute highest frequency of the audio signal. The output stage is turning on each mosfet in turn at over 500khz in most class D amps, sometimes up to 1mhz or even higher in some special amps.
Thats probably the most important thing to understand. The switching on and off has NOTHING to do with the actual audio frequency. It does it no matter if the input is even disconnected, those mosfets are still happily switching away at a 50:50 mark space ratio that averages out to "zero" output.
The turning on and off has absoutely no relationship to the audio signal. Its the TIME that each side stays on for is what is related to the audio signal.
Thats probably the most important thing to understand. The switching on and off has NOTHING to do with the actual audio frequency. It does it no matter if the input is even disconnected, those mosfets are still happily switching away at a 50:50 mark space ratio that averages out to "zero" output.
The turning on and off has absoutely no relationship to the audio signal. Its the TIME that each side stays on for is what is related to the audio signal.
Last edited:
Thanks to Rainwulf for the detailed description.
I never actually had any trouble understanding why there would need to be some minimum time between switching from one device and rail to the other - i just could not understand why the output stage would ever need to have extra time added "dead time" since the pulses already have a space between them as a natural part of the PWM technique.
I still cannot fully understand how the output stage actually works from Rainwulfs description. It makes sense when at one extreme or the other. For example when the signal is at maximum level (full output) the positive going pulses would be at their maximum, with plenty of current flowing into the load, and the negative going pulse would be at its minimum, almost effectively off, and thereby doing more or less nothing. What i cannot understand is the idle state and other states at lower levels. In the idle state, with a 50/50 mark space ratio, the output stage seems to be rapidly pushing then pulling current into the output, which seems inefficient, whearas with my scheme the output stage would simply be doing nothing - e.g. both devices would be turned off all the time. How is this scheme beneficial? It seems to be inefficient, and its need to introduce dead time adds distortion which would otherwise simply not exist. What sort of trade off is this?
When i try to imagine a situation where the output is, say, half way to maximum power in the positive direction, with a 80/20 mark space ratio positive, and a 20/80 (or some other ratio) of mark space negative, you would seem to be again wasting power, where you push some power into the output, then take some of it back, as if the output stage is in the grip of constant indecision. To output 75% positive power, would it not be simpler to punch out a positive power of 75% on the positive rail and nothing on the negative, rather than punch out 100% power on the positive rail, and then take 25% back during the negative swing?
I understand that some of this energy is stored in the filter and so maybe somehow returns to the power supply and is not actually disipated, but i still fail to see the advantages of this what seems a very odd kind of setup.
I never actually had any trouble understanding why there would need to be some minimum time between switching from one device and rail to the other - i just could not understand why the output stage would ever need to have extra time added "dead time" since the pulses already have a space between them as a natural part of the PWM technique.
I still cannot fully understand how the output stage actually works from Rainwulfs description. It makes sense when at one extreme or the other. For example when the signal is at maximum level (full output) the positive going pulses would be at their maximum, with plenty of current flowing into the load, and the negative going pulse would be at its minimum, almost effectively off, and thereby doing more or less nothing. What i cannot understand is the idle state and other states at lower levels. In the idle state, with a 50/50 mark space ratio, the output stage seems to be rapidly pushing then pulling current into the output, which seems inefficient, whearas with my scheme the output stage would simply be doing nothing - e.g. both devices would be turned off all the time. How is this scheme beneficial? It seems to be inefficient, and its need to introduce dead time adds distortion which would otherwise simply not exist. What sort of trade off is this?
When i try to imagine a situation where the output is, say, half way to maximum power in the positive direction, with a 80/20 mark space ratio positive, and a 20/80 (or some other ratio) of mark space negative, you would seem to be again wasting power, where you push some power into the output, then take some of it back, as if the output stage is in the grip of constant indecision. To output 75% positive power, would it not be simpler to punch out a positive power of 75% on the positive rail and nothing on the negative, rather than punch out 100% power on the positive rail, and then take 25% back during the negative swing?
I understand that some of this energy is stored in the filter and so maybe somehow returns to the power supply and is not actually disipated, but i still fail to see the advantages of this what seems a very odd kind of setup.
just to sum up
Thanks to all those who have responded to my confusion! 🙂
I thought i might sum up what i think i now understand about the conventional class-d output stage.
In using a 50/50 mark space ratio to represent the zero level of the signal, the pwm stream is rather like a class A biased analogue amp, which represents the quiescent condition with a signal roughly mid way between the voltage extremes.
I understand that if this stream were presented to a single output device with a single rail, with a no signal condition the amp would output a continuous DC output through into the load, or indeed with any signal there would be a continuous DC level superimposed on the output.
A similar situation would occur with a single rail class A analogue amp output, which is usually solved by the simple expedient of a blocking capacitor in series with the load.
In the case of the dual rail class D amp as described by Rainwulf and others, I see now how the dual rail output with its rapid positive/negative switching achieves the same thing as the blocking capacitor with a single rail class A amp - cancelling the DC bias (50/50 mark space ratio) of the PWM stream. Quite ingenious.
It does leave me with the feeling that there might be other ways of doing this that might be better from a hi fidelity point of view.
For example, why not use a single rail supply an a 50/50 quiescent ratio and block the output DC with a series capacitor? I understand this adds cost and bulk which would not be acceptable for compact equipment or low-fi applications, but in the case of hi-fi might not the extra cost and bulk of an output capacitor be worth getting rid of dead time and the resulting distortion (and risk of destroying the output devices). Surely much easier to add an output capacitor than wrestle with dead time issues.
Or there is the concept of using a class B type class D output stage along the lines of the way i though class D actually worked - namely split rail dual output stage but using separate positive and negative streams and a 0/100 mark space ratio for a no signal condition. It seems to me it would work (for what that is worth), and would need no output capacitor or dead time.
I will keep my thinking cap on a bit longer on this one.
Exlectronics certainly are fascinating, are they not.
🙂
Thanks to all those who have responded to my confusion! 🙂
I thought i might sum up what i think i now understand about the conventional class-d output stage.
In using a 50/50 mark space ratio to represent the zero level of the signal, the pwm stream is rather like a class A biased analogue amp, which represents the quiescent condition with a signal roughly mid way between the voltage extremes.
I understand that if this stream were presented to a single output device with a single rail, with a no signal condition the amp would output a continuous DC output through into the load, or indeed with any signal there would be a continuous DC level superimposed on the output.
A similar situation would occur with a single rail class A analogue amp output, which is usually solved by the simple expedient of a blocking capacitor in series with the load.
In the case of the dual rail class D amp as described by Rainwulf and others, I see now how the dual rail output with its rapid positive/negative switching achieves the same thing as the blocking capacitor with a single rail class A amp - cancelling the DC bias (50/50 mark space ratio) of the PWM stream. Quite ingenious.
It does leave me with the feeling that there might be other ways of doing this that might be better from a hi fidelity point of view.
For example, why not use a single rail supply an a 50/50 quiescent ratio and block the output DC with a series capacitor? I understand this adds cost and bulk which would not be acceptable for compact equipment or low-fi applications, but in the case of hi-fi might not the extra cost and bulk of an output capacitor be worth getting rid of dead time and the resulting distortion (and risk of destroying the output devices). Surely much easier to add an output capacitor than wrestle with dead time issues.
Or there is the concept of using a class B type class D output stage along the lines of the way i though class D actually worked - namely split rail dual output stage but using separate positive and negative streams and a 0/100 mark space ratio for a no signal condition. It seems to me it would work (for what that is worth), and would need no output capacitor or dead time.
I will keep my thinking cap on a bit longer on this one.
Exlectronics certainly are fascinating, are they not.
🙂
That is the basic principles of Class D, it does return the PSU as a "queiscent current" and can also actually cause problems if the pcb layout is incorrect and causes whats called bus pumping, which is also another issue that Class D designers have to deal with.
The filter is an LC filter, and its designed to not allow any of the "fundamental" frequency through.
So yes, it is continously pushing into and pulling current out of the filter, but since the inductor in the LC filter blocks the fundamental frequency, its actually only a very tiny amount of current.
By the time the inductor has inverted its magnetic field and has responded to the change in input, the mosfets have switched again.
There is no actual space between them with the PWM technique. At zero output its nearly a perfect square wave, there is no time at all when both mosfets are off, they take turns, continously.
The pwm system used in class D is a bit different to the PWM you are thinking off. The pwm you are thinking of is from say 1 to 100 percent mark space, but with one active device only. So its only say .. earthing the load for 50 percent of the time, which would give you 50 percent output.
That's the system used to control lights and motors, its not complimentary which means it can only sink current, (or source current) but not both.
With the totem pole output of a class D amp, it can both sink and source current (in turns) It just does it very fast.
You are correct in fact, that the output stage IS in constant indecision. In fact, thats how some class D amps actually work.
They flip back and forth so quickly, and then compare the output of the filter with the input.
Dont forget also that the dead time is a tiny tiny percentage of the mark space ratio and the fundamental clock frequency.
Its in the realm of nanoseconds.
Its not actually crossover distortion because in dead time, there is no current at all flowing in either device, so it cant contribute distortion itself. (it does by actually not allowing any residual current to go back into the rails from the inductor.)
In essence it "IS" wasting power by pushing then pulling current into/from the LC filter.
HOWEVER. the LC filter is designed to pretty well block any current at all at that fundamental frequency, so in the end, the current that flows is tiny. Queiscent current in a Class D amp, which is exactly that, the "Wastage" as the output pushes then pulls current out of the filter is very tiny, in the milliamp range, as the LC filter is very efficent. (hopefully)
Its why output inductors on class D amps are so critical. Its one of the most difficult parts of a class D amp to design, because if that inductor is wrong, or leaks too much, or has too high DCR, or to much leakage flux, or too much capacitance, or too large or small a gap (ad neasum) the output stage blows up, shorts out, or best case, works but is very inefficient, and the queiscent current goes through the roof, or lets through way to much of the fundamental, and overheats the inductor, or emits huge amounts of RFI. It can also return current through the wrong mosfet, artifically inflating the rails and causing damage, or once again blowing up the mosfets.
(500khz is in the AM radio band)
Class D is a highly complex system for what is basically a high frequency oscillator that cant make up its mind 🙂
The speakers are nearly incidental in the process, just letting you know what the mark space ratio is, in the form of an analog voltage.
The filter is an LC filter, and its designed to not allow any of the "fundamental" frequency through.
So yes, it is continously pushing into and pulling current out of the filter, but since the inductor in the LC filter blocks the fundamental frequency, its actually only a very tiny amount of current.
By the time the inductor has inverted its magnetic field and has responded to the change in input, the mosfets have switched again.
There is no actual space between them with the PWM technique. At zero output its nearly a perfect square wave, there is no time at all when both mosfets are off, they take turns, continously.
The pwm system used in class D is a bit different to the PWM you are thinking off. The pwm you are thinking of is from say 1 to 100 percent mark space, but with one active device only. So its only say .. earthing the load for 50 percent of the time, which would give you 50 percent output.
That's the system used to control lights and motors, its not complimentary which means it can only sink current, (or source current) but not both.
With the totem pole output of a class D amp, it can both sink and source current (in turns) It just does it very fast.
You are correct in fact, that the output stage IS in constant indecision. In fact, thats how some class D amps actually work.
They flip back and forth so quickly, and then compare the output of the filter with the input.
Dont forget also that the dead time is a tiny tiny percentage of the mark space ratio and the fundamental clock frequency.
Its in the realm of nanoseconds.
Its not actually crossover distortion because in dead time, there is no current at all flowing in either device, so it cant contribute distortion itself. (it does by actually not allowing any residual current to go back into the rails from the inductor.)
In essence it "IS" wasting power by pushing then pulling current into/from the LC filter.
HOWEVER. the LC filter is designed to pretty well block any current at all at that fundamental frequency, so in the end, the current that flows is tiny. Queiscent current in a Class D amp, which is exactly that, the "Wastage" as the output pushes then pulls current out of the filter is very tiny, in the milliamp range, as the LC filter is very efficent. (hopefully)
Its why output inductors on class D amps are so critical. Its one of the most difficult parts of a class D amp to design, because if that inductor is wrong, or leaks too much, or has too high DCR, or to much leakage flux, or too much capacitance, or too large or small a gap (ad neasum) the output stage blows up, shorts out, or best case, works but is very inefficient, and the queiscent current goes through the roof, or lets through way to much of the fundamental, and overheats the inductor, or emits huge amounts of RFI. It can also return current through the wrong mosfet, artifically inflating the rails and causing damage, or once again blowing up the mosfets.
(500khz is in the AM radio band)
Class D is a highly complex system for what is basically a high frequency oscillator that cant make up its mind 🙂
The speakers are nearly incidental in the process, just letting you know what the mark space ratio is, in the form of an analog voltage.
Last edited:
Yes - Rainwolf explains it very well. It's all in the duty cycle of the square waves, and in the very high impedance of the output at that frequency. The duty cycle determines which direction the current flows, and the output filter means that the RF current is tiny. It can't flow into the speakers, the impedance of the speakers, and the output filter is too high. The current that can flow, is the change in the duty cycle. That's the audio.
If you could see it on an oscilloscope, it would be much easier to understand.
If you could see it on an oscilloscope, it would be much easier to understand.
I once built a Single ended Class D set up using just a single output FET and it worked very good!!
I got 0V to 5V DC out of it and the sine test wave was very clean as well.
Although I didn't use it as an amplifier, it was just to learn how it worked.
It was very simple to build with just a dual opamp, a comparator and a FET.
It was a very fun project.
I am waiting on some FET drivers to build a bipolar version.
Also to simplify things I have discovered the LTC6992's that have everything you need to create the PWM signal accurately on one tiny little chip.
Then you can choose drivers that introduce the dead time automatically to drive the FET's.
jer 🙂
I got 0V to 5V DC out of it and the sine test wave was very clean as well.
Although I didn't use it as an amplifier, it was just to learn how it worked.
It was very simple to build with just a dual opamp, a comparator and a FET.
It was a very fun project.
I am waiting on some FET drivers to build a bipolar version.
Also to simplify things I have discovered the LTC6992's that have everything you need to create the PWM signal accurately on one tiny little chip.
Then you can choose drivers that introduce the dead time automatically to drive the FET's.
jer 🙂
Did you use a current source or just a resistor?
It would work, but would waste a bit of current as when the mosfet is on, it would just be shorting it to rail/earth.
It would work, but would waste a bit of current as when the mosfet is on, it would just be shorting it to rail/earth.
I used a resistor for as a current source feeding the FET.
I wasn't meant for any large amount of power.
Then I fed the output (at the junction of resistor and the FET) in to a hand wound coil that I had laying around of about 1.7mh or so.
What I got was a nice ripple free dc output and when it was modulated it followed exactly what the input voltage was without any NFB.
Then I fed that through a DC blocking capacitor into a small speaker.
It worked very well as to my surprise!
My switching frequency was variable and was about 100khz and greater to maybe about 1Mhz.
It was quite a while ago so I don't remember many details but I do still have the same little board I made to do it.
From there I went on to learning how cascode (stack) FET's so that I could use them at higher voltages.
But that is another topic all by itself.
So, I didn't spend a lot of time on it but it was a very cool little project besides.
jer 🙂
I wasn't meant for any large amount of power.
Then I fed the output (at the junction of resistor and the FET) in to a hand wound coil that I had laying around of about 1.7mh or so.
What I got was a nice ripple free dc output and when it was modulated it followed exactly what the input voltage was without any NFB.
Then I fed that through a DC blocking capacitor into a small speaker.
It worked very well as to my surprise!
My switching frequency was variable and was about 100khz and greater to maybe about 1Mhz.
It was quite a while ago so I don't remember many details but I do still have the same little board I made to do it.
From there I went on to learning how cascode (stack) FET's so that I could use them at higher voltages.
But that is another topic all by itself.
So, I didn't spend a lot of time on it but it was a very cool little project besides.
jer 🙂
Last edited:
- Status
- Not open for further replies.
- Home
- Amplifiers
- Class D
- what is dead time?