Class-D explained, Part 1

AVForums

Help Support AVForums:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

pwatts

AVForums Grandmaster
*
Joined
Aug 30, 2006
Messages
2,501
Reaction score
909
Location
CT
Since there seems to be confusion over the various types of Class-D amplifiers and their operating principles, I've cobbled together a VERY basic explanation of them and how the different philosophies of a holistic system instead of the individual components coincide or differ.

Firstly, it should be noted that no class-D amp, or any amp for that matter, is "digital" in absolute terms. The "D" does not stand for digital. All class-D amps rely on pulse-width modulation techniques, that is purely analog. This is exactly the same principles used in switching power supplies typically found in low-cost high-power appications such as PC power supplies.

The basic concept of PWM is that of a DC-AC converter: a high-frequency carrier is used to modulate a reference input signal and recreate it by demodulation (merely a lowpass filter) at the output. PWM in basic terms means that any signal can be approximated by a series of square waves with varying widths. The ratio of high vs low state per wave period is called the duty cycle. 100% duty cycle would mean a continuous high, 0% a continuous low, and 50% that the wave is high and low for half the time of the period respectively. A simple practical explanation of how this can be advantageous is to explain the influence of an analog voltmeter. If you would connect a SPDT toggle switch to the meter that switches between -5V and 5VDC, the meter will jump to the corresponding value when the switch is toggled. However, what would happen if the switch is toggled very fast at equal intervals; faster than the needle's reaction time? The needle will remain fixed at 0V, or halfway between the two switching states. It is therefore easy to see that the duty cycle is in direct proportion to the eventual DC output - if the switch is connected to 5V for 90% of a period and to -5V for 10% (i.e. a 90% duty cycle), the DC output would be 90% of 5V added to 10% of -5V, i.e. 4V.

So, we know that we can create a varying DC output by switching between two DC levels at a fast, constant frequency and controlling the ratio of on vs off time per switching period. If we therefore use the instantaneous value of an analog audio signal to control the switch (and thus duty cycle), we will have a DC output that changes as the signal changes. It should be obvious that this will only be useful if this switching happens very fast, and common switching speeds are between 200 and 400kHz. So let's say we use a sine wave from a signal generator as our analog signal. Remember the analog signal isn't used by the switches directly; it's only used to CONTROL the duty cycle of the switches. When the sinewave crosses 0V, for that brief period the sinewave's instantaneous value is 0V. When it's at its positive peak, it's normalized value is 1V, and anything inbetween follows the same pattern. If the switches are switching very fast; much faster than the bandwidth of the input signal, the duty cycle of the produced squarewave would be 50% when the input signal crosses the 0V line, 100% when it's at it's positive peak and 0% at it's negative. If we now go back to the voltmeter example, it should be clear that the DC value at the output of the switches changes according to the analog signal controlling the switches. Since the switches operate at such high frequency however, the DC level changes very fast and actually "becomes" AC. We can therefore say that the low-frequency audio signal is "carried" by the higher-frequency squarewaves of rapidly changing width.

The method how this can be used for power amplifiers should now become evident. There is a low-level circuit that generates this varying duty cycle square waves according to the input signal (This is usually done by comparing the input signal to a sawtooth or triangle wave). This "pulse-train" is typically between -5V and 5V. These square waves are then used to drive the gates of two MOSFETs. The MOSFET's can also be seen as switches, driven by the earlier switches described. A useful practical example would be to use a small relay's output to drive a larger relay. The one MOSFET has its drain connected to the positive power supply rail; let's assume 40VDC, and its source to a reference point. The other MOSFET has its drain connected to this reference point and its source to the negative voltage rail of -40VDC. This is therefore just a higher-voltage copy of the same principle depicted earlier - the reference point (the speaker) is literally connected to the DC rails for _very_ short periods.

So we can now replace the voltmeter needle with the speaker motor. When the amplifier is fed with a 0V input signal (silence), the speaker is actually connected to + and -40VDC at a rate of e.g. 400 000 times per second, but the connection to +40V is for the same duration per switching period as the -40VDC, and thus the cone stands still and no power is dissipated. If the ratio of one rail to the other is higher (higher duty cycle), the cone would move in or out correspondingly, and therefore be a representation of the actual input signal. This method is also the reason why efficiency is so good in class-D amps - the only losses is in the MOSFET's themselves. In an ideal environment 100% should be obtainable. After copper and switching losses has been factored in, this figure usually drops to around 90% that is still damn good compared to normal analog amps. Controlling the volume is also very simple - just change the power supply voltage! Indeed so, many integrated class-D amps' volume control really is just an adjustable power supply.

Even though the switching frequency is far above the audible range, demodulation (lowpassing to remove the carrier/switching frequency) is actually implicit and implemented to a certain degree by the woofer voice coil inductance. However, the high-frequency energy that has to pass to the speaker along the speaker cable is then actually a high-power broadcast antenna, and it can also heat up a tweeter voice coil in certain instances. To combat this, a lowpass filter (usually just a series inductor and shunt capacitor) is used between the output stage and the speaker. This filter is the subject of great debate. Too high and too much ripple current can pass through and EMI increases. Too low and the audible bandwidth is affected. To make things worse, the filter has a resonant peak, and that peak usually is somewhere in the audioband. The DC resistance of the choke is also an important consideration regarding efficiency and power delivery, so usually a ferrite-core inductor with very thick wire is used. And lastly, this filter interacts with the loudspeaker and its crossover. Post-filter feedback as used in some amps help a lot here.

It should also be noted that the MOSFET's are always switching complementary - when one is turned on, the other is turned off. This should be obvious, as the output should only be connected to one DC rail at a time. If something goes wrong that causes both to turn on at the same time, well... the power supply rails are in effect shorted out, leading to catastrophic failure of the MOSFET's and often the speaker too.

Obviously, this technology has some serious issues that need to be addressed before it can be considered safe and suitable for audio. The four most challenging design problems for class-D amps are
1) to get the pulse widths as accurate as possible
2) to have the MOSFET's switching as fast as possible, i.e. to limit the time elapsing from giving the gate signal until the FET has actually connected the voltage rail to the load
3) to prevent simultaneous switching of the FET's
4) to implement overcurrent protection - because the FET's switch so fast, this is extremely difficult to implement fool-proof, and on high-current power supplies such as one we've built for Eskom, this stage often is the most challenging.

All class-D amplifiers operate on the described principle. Some are slightly different. The output stage described is a half-bridge type that switches between two opposite voltage rails. Another type known as full-bridge is the same, but with twice the MOSFET's and driving the speaker between the two output sets instead of to ground. This should sound famaliar and is exactly the same principle used when bridging an analog amplifier. These two versions of output stages are common to all class-D amps irrespective of how the preceding circuitry works for generating the PWM signal driving the FET's.

The most basic form of class-D amps is called Naturally Sampled PWM. It generates the pulse-widths by using a comparator and a ramp generator (sawtooth or triangle wave operating at the switching frequency), and compares the value of the ramp with the incoming audio signal. This is how most class-D amps worked until recently, and it's still a cheap and simple solution for car audio and other high-power low cost and low fidelity applications. The precision of the ramp generator is critical to the success of the amp, and they depend on an equally critical clock.

A newer type is more complex, but it uses feedback and is called a free-oscillating/self-resonant design. This is a much better method and eliminates the need for a ramp generator and thus a clock by constantly ensuring oscillation using feedback and adjusting the swiching frequency accordingly. The feedback is also useful to address the effects of the lowpass filter used to remove the carrier. This is the approach followed by the ZapPulse, Tripath and Hypex amplifiers, all highly successful designs. The Hypex ones in particular are excellent value almost irrespective of cost, with superb specifications.

[Continued in part two, needed due to max message length]
 
Top