“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 it was not very suitable for high-sensitivity devices such as audio. However, in recent years, many 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 20 Hz to 22 kHz. This article will discuss how to use PWM digital technology to achieve the performance of traditional analog audio equipment.
“
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 it was not very suitable for high-sensitivity devices such as audio. However, in recent years, many 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 20 Hz to 22 kHz. 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.
A simple amplifier has only one active device, such as a transistor. The transistor needs a bias circuit, so no matter how large 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 (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 has much lower distortion. 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.
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 one used for 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 either 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 enough sum frequency, it is possible to obtain acceptable control characteristics and good audio effects. It should be 16 bits (or greater), and the PWM carrier frequency should not be less than 12 times the audio bandwidth, which is 25 times. Like other audio equipment, improving the dynamic range is also very important. The 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, which is 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, without any processing in many cases.
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 the filter order and the simpler it is. 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 in the on state. 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.
The Links: LM12S471 EL640.200-SK