Sei sulla pagina 1di 1

Department of Electronic & Electrical Engineering Investigation of the quality of PWM audio

Sylvain Jeangirard Supervisor: Frank Boland


1. Background
Electronic devices are getting smaller and smaller and their use more and more mobile, the components used in these devices need to be smaller and consume less energy. In the field of audio the Class D amplifier based on Pulse Width Modulation (PWM) can reach 90% efficiency or even better where conventional audio amplifiers rarely exceed 20-50% efficiency in use. The class D amplifier also produces less heat and has a lower supply current thus it provides longer battery life to portable devices. Class D amplifiers are also easier to interface to digitals signals. The aim of my project is to study the PWM process and the audio quality of amplifiers using such technology.

2012

2. Pulse width modulation signals


A Pulse Width Modulation signal is shaped like a rectangle wave and has a fixed repetition frequency. It is characterized by its two states: high and low, which are most of the time denoted as V+ and V- , frequently V-=0. The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power signal because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on. PWM are often used in power supplies because of its good efficiency: the loss during the switching of the device is very low, when the switch is off there is practically no current and when it is on there is almost no voltage drop across the switch, thus the power loss (product of voltage and current) is close to zero.

3. Class D Amplifiers
In a Class D amplifier the input signal is compared with a triangular wave form by a comparator which delivers high or low logical values, this process creates a PWM signal. This type of modulation is also often referred to as "natural sampling" where the triangle-wave oscillator acts as the sampling clock. The PWM signal obtained will drive the power stage. In a basic class D amplifier the power stage is a push pull stage, two output MOSFET transistors. The amplified signal is then applied to a low pass filter to remove the PWM oscillating frequency and retrieves the sinusoidal audio signal. The oscillating frequency (fSW) for most Class D amplifiers is typically between 250 kHz and 1.5MHz.

4. SimuLink and MatLab investigations


An investigation over the quality of Class D amplifiers was conducted using Total Harmonic Distortion (THD) measurements, it is defined as the ratio of the sum of the powers of all higher harmonic frequencies to the power at the first harmonic, or fundamental, frequency. The THD is the most used technique in order to measure the distortion of a signal, a pure sine wave is applied to the input of the device and then the harmonics of the output are analysed, the deviation is expressed as a series of harmonics of the fundamental frequency due to the device error. The simulation aimed to calculating the THD for a simple Class D amplifier in the SimuLink modeling, simulating and analyzing tool. In this simulation the signals were sent to the Matlab workspace using the To Workspace block in order to calculate the THD. Using a MatLab script that implemented a Fast Fourier Transform the amplitudes of the harmonics were collected and the THD calculated. The results are : THD in function of the frequency for filtered and unfiltered signals at fSW=250kHz
1 0,9 0,8

5. MatLab investigations on PWM quality


The second simulation consisted of directly simulating the PWM process in MatLab. In this case the signal used to compare the input signal was not a triangle but a saw tooth signal. The signals were directly created in MatLab using the saw tooth and sinusoid MatLab function and a simulation sampling frequency of 25GHz in order to recreate a normally analog process. Similarly the THD was calculated by calculating the FFT of the output signal and extracting the harmonics amplitudes. The result is the following: THD of the output signal in function of the input sine wave frequency for a saw tooth signal at 250 kHz
0,5 0,45

THD for a non filtered signal in function of the carrier signal frequency for a sine wave at 10kHz
THD(%)
1,2 1 0,8

0,4 0,35 0,3 0,25 0,2 0 5000 10000 15000 20000 25000

THD (%)

0,7 0,6 0,5 0,4 0,3 0 5000 10000 15000 20000 25000

THD(%)

0,6 0,4 0,2 0 0 200000 400000 600000 800000 1000000

Oscillating sinewave frequency (Hz)

Frequency (Hz)

THD un-fil(%)

THD filtered(%)

Carrier frequency (Hz)

6. Speech investigation in MatLab


Using the same script as previously and a computer with a 64bit operating system and 8GByte memory to avoid Out of memory errors, the PWM process was applied to a speech signal. The aim of the simulation was to conclude whether the PWM process damaged the speech signal. The original speech signal and the output of the PWM process were then anonymously played to 25 people to know if they could hear a difference. Input Speech signal Can you hear a difference between the two signals ?
Yes 0%

7. Conclusion
Regarding the MatLab simulation, with a THD under 1% for the Class D amplifier and under 0,5% for the PWM process we can conclude that PWM is a sustainable quality audio process. It must be taken into consideration that these simulations only simulated a simple Class D amplifier, in the manufacturers literature the THD is often under 0,2%. Regarding the Speech simulation we can conclude that the distortion of the signal by the PWM process is minimal, on the plots of the two signals but also for the users as 100% of them did not hear a difference. The next step could be to investigate filterless Class D amplifiers that reduce the cost and space of Class D amplifiers

Output PWM downsampled signal


No 100%

Potrebbero piacerti anche