EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 The purpose of this experiment is to use your

H-bridge inverter as an audio amplifier and analyze its performance. Step A of the experiment can be performed at any lab bench. Step B requires you to use our CD music test station. Sign up for a one-hour time slot for the music test station, and please be considerate of others who are waiting to use it. You are welcome to try out the display inverter and music test station anytime. But for purposes of your lab report, you must use your own inverter.

A. Inverter Performance with Input from Sinusoidal Waveform Generator (perform this step at any lab bench)
1. 2. 3. 4. 5. No DBR power to the inverter yet! Make sure that both 10µF input and output capacitors are connected to your inverter. Make sure that the scope is plugged in through a “ground buster.” Connect a three-headlight load to your inverter output. Turn on the benchtop waveform generator. Adjust the settings for 100Hz sinusoidal output and 5V peak. Note – the benchtop waveform generator will display 5Vpp. It is important that you have no DC offset in the waveform.

6.

7. 8. 9. 10. 11.

Either 1. Use a BNC-to-wall-wart-plug cable to connect the waveform generator output to the jack of the inverter ma control potentiometer, or 2. use a BNC-to-alligator cable to connect the waveform generator output across the outer two terminals of your 500Ω ma control potentiometer. Note – if you do this at one of the Labview-equipped stations, pay attention to polarity because the scope and waveform generator chasses may be connected together in back. View the waveform generator output on the scope, confirm 5V peak, and adjust the waveform generator output voltage if necessary. Plug in the DC wall wart. Use the scope to confirm that your triangle wave generator chip is producing a symmetric triangular wave output. If necessary, adjust the skewness. With ma = 0, use a multimeter to measure the DC value of VGS for each MOSFET. Expect about 4.0Vdc. Use a scope probe to view, one by one, all four VGS waveforms to confirm that your inverter is firing properly.

Page 1 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 12. 13. With the variac “off” and its control knob set to zero, connect a variac, 25V transformer, and DBR to provide DC power to your inverter. Use the variac to raise the DC voltage to 35-40V. Connect scope probe #1 and its ground clip to view Vcont, and scope probe #2 and its ground clip to view the inverter output voltage. Use the “averaging over one cycle” feature of the scope to denoise the scope trace. Adjust the ma potentiometer so that ma is slightly less than 1 (i.e., the “fuzzy” flat spot at the maximum and minimum of the sine wave disappears). Measure the rms value of Vcont with a multimeter. Measure –Vcont with the same multimeter. If necessary, adjust the gain of the op amp so that –Vcont has the same rms value as Vcont. Confirm that the H-bridge inverter is working properly and producing a replica of Vcont.

14. 15.

16.

Dead spots at zero crossings are characteristic of PWM because of blanking

Waveform generator output

Inverter output

100Hz Test 17. 18. Disconnect scope probe #1. Using a span of 1kHz, a center frequency of 500Hz, a Hanning window, and an FFT sampling rate of 10kSa/s, display the FFT of the inverter output voltage (i.e., Channel #2) and save a screen snapshot. For your report, you will estimate the THD of the voltage waveform using the most significant harmonics (see Appendix).

Page 2 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008

1kHz span, 500Hz center

Save screen snapshot #1 FFT of inverter output with 100Hz input signal

19.

Raise the benchtop waveform generator frequency to 1kHz, and repeat Step 18. This time, for the FFT use a span of 10kHz, a center frequency of 5kHz, and a sampling rate of 100kSa/s.

10kHz span, 5kHz center

Save screen snapshot #2 FFT of inverter output with 1kHz input signal

Page 3 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008

B. Inverter Performance with Input from CD Player (sign up for a one-hour slot and perform this portion at the Music Test Station)

Four 8Ω speakers in series present 32Ω to the inverter

495µF in series with speakers to block the flow of DC current Page 4 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008

The CD player is modified to produce a Vcont input signal for our inverters

Two small 1:1 audio transformers sum the CD stereo channel outputs to produce a mono signal. Each transformer is energized by one stereo channel. The two output windings are connected in series to yield the mono signal.

Page 5 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 You are welcome to use your own music CD if you prefer. The songs on Dr. Grady’s CD are Track 1. The Hollies, “Long Cool Woman in a Black Dress” Track 2. Eagles, “Peaceful Easy Feeling” Track 3. America, “Sister Golden Hair” Track 4. Electric Light Orchestra, “Don’t Bring Me Down” Track 5. Charlie Dore, “Pilot of the Airways” Track 6. The Beach Boys, “Help Me, Rhonda” Track 7. The Moody Blues, “Your Wildest Dreams” Track 8. Ronnie Milsap, “Any Day Now” Track 9. Fleetwood Mac, “You Make Loving Fun” Track 10. Steppenwoulf, “Magic Carpet Ride” Track 11. Roger Miller, “Chug-A-Lug” iPod update • • • An iPod interface cable is provided so that you can play your iPOD into the CD player, and use the CD player to convert stereo to mono Vcont. The interface cable connects to the CD player’s channel A and B auxiliary audio inputs. Use the CD player’s AUX mode. Turn Vdc all the way down, turn the CD player volume to max, turn the Vcont potentiometer to max, and turn the iPod volume to about ½. View Vcont on the scope. Adjust the iPod volume control until the peaks of Vcont are about 3.5 to 4.0V. Avoid clipping.

The audio output signal of a portable CD player or radio drives the small speakers inside. You will use this signal as the Vcont input for your inverter, drive the four-speaker unit with the inverter output, and compare inverter input and output waveforms. We use two small audio transformers to add the two stereo output channels of the CD player to create a mono signal. The DBR provides the power to drive the speakers. The CD player is used only to provide the Vcont signal. 20. 21. 22. No DBR power to the inverter yet! Connect the mono audio output signal of the CD player to the jack of your ma potentiometer. Lower the ma control potentiometer to the minimum. Play a song, and observe the mono output of the CD player on a scope. Raise the CD volume control to the maximum. There should be no clipping. If clipping occurs, reduce the CD volume control. See the figure on the next page for an example of clipping.

Page 6 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008

Audio output of CD player – no clipping

With some desktop radios, clipping occurs at about ± 3V

Page 7 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 23. 24. 25. 26. Connect a variac, transformer, and DBR. Start with zero Vdc. Set the variac knob to zero. Raise the ma control potentiometer to the maximum. Even with no Vdc, you will hear weak music because the MOSFET gates are firing. Gradually raise the DBR voltage to about 15V. Simultaneously view the CD player output and the inverter output on a scope. You can carefully raise Vdc to 40V, but it will be loud! Comment on the audio quality of the amplifier.

CD player output

Inverter output

Save screen snapshot #3 Top curve: Audio output of CD player to inverter, Bottom curve: Output of inverter to speakers (scope set to average over one cycle) 27. Borrow the clamp-on ammeter from Dr. Grady or a TA. Select DC milliamps, and press the meter “zero” button to zero the reading.

28.

Clamp the ammeter around one of the DBR output wires. Measure the current to the inverter while the music is playing.

Page 8 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 29. 30. Multiply your Vdc by the average current to obtain average power to the speakers. Your value should be less than 25W. (Your inverter can easily produce 200W!) Examine the two transfer function graphs near the back of this document. Then, loosen one leg of the inverter’s 10µF output capacitor to electrically remove it, and listen to the difference. The output capacitor was originally selected for 60Hz inverter operation and yielded an output filter resonant peak near 5kHz. Without it, the 100µH inductor yields a smooth high-frequency roll off, without the resonant peak. Comment on the difference in sound quality with and without the capacitor. Does the difference make sense after comparing the two transfer functions? Turn off the equipment and make it ready for the next team.

31. 32.

Comments • Your inverter, which is used mostly for motor drives and power-to-grid purposes, is also known as a Class D amplifier. It is very efficient, but the music quality is not as good as conventional linear amplifiers (which, by the way, have only 50% max efficiency). • Better music quality can be achieved by raising the switching frequency to 100kHz. Of course, higher switching frequency means higher losses. • Class D amplifiers are best suited for powerful bass applications. Extra parts for the student parts bin, screw cabinet, and TA parts bin • Same as for H-bridge lab Other items in ENS212 • Clamp-on ammeter (Extech #380942, Mouser #685-380942) • The audio transformers are Triad Magnetics #TY-145P, 1:1 turns ratio, 600Ω CT on each side (Mouser #553-TY145P).

Page 9 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 Appendix. Analysis of Inverter Voltage Transfer Function, With and Without DC Blocking Capacitor
c c c c c c c program inverter_transfer_function determines the transfer function of the inverter with Case 1. Case 2. L,C1 low pass filter and R load L,C1 low pass filter, C2 dc blocking capacitor, and R load

L in H, C1 and C2 in F, R in ohms real l complex zc1,zc1_r,zl complex zc2,zc2_r,zc1_c2_r pi = 4.0 * atan(1.0)

c c c c c c

L is the inverter output series inductor C1 is the inverter output shunt capacitor C2 is the speaker bank series capacitor R is the speaker ohms l c1 c2 r = = = = 100e-6 10e-6 495e-6 32.0

open(unit=1,file="inverter_filter.csv") write(1,*) "L = ",L * 1e6 write(1,*) "C1 = ",C1 * 1e6 write(1,*) "C2 = ",C2 * 1e6 write(1,*) "R = ",R do 10 klog = 0,50 freq = 10.0 ** (klog / 10.0) omega = 2 * pi * freq c c c transfer function for case 1 zc1 zc1_r zl h1 c c c = = = = 1.0 / cmplx(0.0,omega * c1) zc1 * r / (zc1 + r) cmplx(0.0, omega * l) cabs(zc1_r / (zc1_r + zl))

transfer function for case 2 zc2 = 1.0 / cmplx(0.0,omega * c2) zc2_r = r + zc2 zc1_c2_r = zc1 * zc2_r / (zc1 + zc2_r) h2 = cabs(zc1_c2_r / (zc1_c2_r + zl)) * cabs(r / (r + zc2)) write(*,*) omega,freq,omega,h1,h2 write(1,*) omega,",",freq,",",h1,",",h2 10 continue stop end

Page 10 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008

Inverter Filter Performance with 10uF Output Cap
12 10

Vout/Vin

8 6 4 2 0 1 10 100 1000 10000 100000

Inverter Filter Performance without 10uF Output Cap
1.2 1

Vout/Vin

0.8 0.6 0.4 0.2 0 1 10 100 1000 10000 100000

Inverter Vout/Vin Transfer Function with 32Ω Resistive Load

Page 11 of 12

EE362L, Power Electronics, H-Bridge as Audio Amplifier Version November 13, 2008 Appendix. Total Harmonic Distortion (THD) The THD (in percent) of a waveform is defined as the rms value of the harmonics divided by the rms value of the fundamental, or
⎡ V 2 +V 2 +V 2 +L⎤ 2 3 4 ⎥ • 100% , THD (%) = ⎢ ⎥ ⎢ V1 ⎦ ⎣

where V1 is the fundamental frequency component, V2 is the second harmonic, etc. If the harmonics are given in per unit of the fundamental, a more convenient form of the expression is

⎡ THD(%) = ⎢ ⎢ ⎢ ⎣

⎤ 2 2 2 ⎛ V2 ⎞ ⎛ V3 ⎞ ⎛ V4 ⎞ ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟ + L ⎥ • 100% . ⎜V ⎟ ⎜V ⎟ ⎜V ⎟ ⎥ ⎝ 1⎠ ⎝ 1⎠ ⎝ 1⎠ ⎥ ⎦

When one harmonic, e.g. harmonic k, is much greater than the others, it dominates the sum of squares, and the expression becomes
⎡V ⎤ THD (%) ≈ ⎢ k ⎥ • 100% . ⎣ V1 ⎦

Consider the 100Hz scope trace shown in this document as Screen snapshot #1. The 3rd harmonic (i.e., 300 Hz) dominates the other harmonics and is 36.2dB down from the V fundamental. This yields a ratio 5 of 0.0155. Thus, the THD(%) is approximately 1.55%. V1

Page 12 of 12