Smart applications
How to Use PWM Digital Technology to Realize the Performance Design of Class D Amplifier
Pulse width modulation (PWM) is popular because of its high efficiency and ease of use. In the past, people generally thought that it was only suitable for power or digital devices, but not very suitable for high-sensitivity devices such as audio. However, in recent years, many well-known audio amplifier manufacturers have begun to produce a series of PWM audio amplifiers, which were originally subwoofer amplifiers, and now cover the entire audio frequency spectrum from 20Hz to 22kHz. This article will discuss how to use PWM digital technology to achieve the performance of traditional analog audio equipment.
Classification of amplifiers
Power amplifiers are generally divided into four categories: A, B, AB and C.
The simplest amplifier has only one active device, such as a transistor. The transistor needs a bias circuit, so no matter how big the input signal is, it can never be completely turned on or completely off. This non-cut-off/non-conduction region is the so-called linear region. The output distortion of the amplifier working in the linear region is extremely low, but the efficiency is also very low. It is a class A amplifier.
Class B amplifiers consist of two transistors that push and pull each other, one outputs current and the other sinks current. Suppose you want to amplify a sine wave whose positive and negative half cycles are symmetric about the zero point, then one transistor amplifies the upper half of the sine wave (above the zero point), and the other amplifies the lower half (the part below the zero point). In other words, the amplification is completed by two transistors in turn, so the efficiency of the Class B amplifier is higher. The problem with this type of amplifier is that there is a non-linear region, that is, the small area where the sine wave has just passed through the zero point. At this time, one transistor has just turned off and the other has just turned on. Since the transistor needs a short transition time to turn on, it will cause distortion due to the nonlinear state.
Class AB amplifier is a combination of Class A and Class B amplifiers. Its structure is very similar to a class B amplifier, but it uses a circuit that can provide a small bias current to each transistor, so each transistor will not be completely cut off. It consumes more power like a Class A amplifier, but the distortion is much lower. It is also like a class B amplifier, two transistors cooperate to complete the task, so the overall performance is better.
Class C amplifiers are generally used for radio frequency or oscillators, because distortion is not a problem at this time, so I won't discuss it in depth here.
How to Use PWM Digital Technology to Realize the Performance Design of Class D Amplifier
Class D amplifier with PWM technology
Class D amplifiers use PWM technology, which can control the duty cycle of a fixed frequency square wave and express the input value through the duty cycle. Because PWM can obtain higher efficiency, it is often used in high-power equipment. The power amplifier used in electric vehicles is a class D amplifier, and the return current in a wind turbine is also a class D amplifier. So, can this industrial technology be used to process music?
As far as amplifiers are concerned, the efficiency of Class D amplifiers is indeed very high (generally up to 90%). Since transistors are almost always either on or off, they only enter the linear region when they switch from one state to another, so their power consumption is much smaller than that of linear amplifiers. In a linear amplifier, the transistor spends a large part of its time in the linear region.
For class D audio amplifiers, the load is placed in the middle of the H bridge (see Figure 1). This has the advantage that the output can be positive or negative, which can greatly increase the power to four times that of a class A or B amplifier.
From a practical point of view, as long as the PWM has sufficient accuracy and frequency, it is possible to obtain acceptable control characteristics and good audio effects. The precision should be 16 bits (or greater), and the PWM carrier frequency should not be less than 12 times the audio bandwidth, preferably 25 times. Like other audio equipment, it is also important to improve the accuracy of the dynamic range. The accuracy of a standard CD player is 16 bits.
Filter removes high frequency harmonics
Before starting the design, the PWM carrier must be removed from the audio.
If you want to design a subwoofer class D amplifier, its typical bandwidth is 20Hz to 500kHz. This requires the over-sampling frequency to be at least 6kHz, preferably 12.5kHz. In simple applications, the audio codec can be used as the input of the DSP, and the digital output can be used to drive the on-board peripherals of the PWM. In many cases, no processing is required.
To remove the PWM carrier from the audio output, as long as a suitable filter can complete the task, the structure of the filter—that is, the cutoff frequency and the order—is determined by the oversampling frequency or the PWM frequency. The higher the PWM frequency, the lower and the simpler the filter order. In Figure 1, there is a loudspeaker between two second-order LC filters, and a filter for each half of the bridge. These filters remove the carrier and other harmonics from the output.
Dead-band distortion is the second problem to be solved by filters. The large power transistors that make up the H-bridge require time to turn on and off, so some time must be allocated to prevent one transistor from turning on while the other is still on. If this happens, there will be a so-called "breakdown" phenomenon. In order to avoid this kind of situation, the controller must ensure that the upper and lower transistors of each pin are cut off for a period of time before being turned on. This period of time is called the dead band time, which will cause distortion similar to the class B amplifier. The use of filters can solve this distortion problem.
Butterworth or Bessel filters are generally sufficient, and the passbands of both are relatively flat. The Bessel filter also has the advantage of linear phase.
The H bridge in Figure 1 has two filters, one on each speaker pin. If you are accustomed to single-ended filter design, changing them to equalization filters is a trivial matter. A simple calculation is performed on a filter with a half-rated load, and then the L and C values obtained can be used.