Audio Amplifier Design and Testing

By John Broskie


Testing an amplifier usually involves seven core measurements: distortion, frequency response, input impedance, power output, output impedance, PSRR, and loop gain. In B2 A/D Spice, these measurements are easy to perform.

Audio amplifiers differ from other electronic circuits, such as, timer circuits, oscillators, and voltage regulators. Most electronic circuits are but cookie cutter efforts, lifted from a few established sources, such as manufacturer white papers and data books, circuit encyclopedias, and textbooks; they provoke little controversy and gain few advocates or detractors. Audio amplifiers, on the other hand, they have more character. They are often personal design statements that do find advocates or detractors. For example solid-state and tube amplifiers offer different technologies, different sounds, different emotional responses, and different partisans. The difference lies in the subjective evaluation that audio amplifiers invite, as we all have a set of ears and a viewpoint. While a SPICE program cannot help with subjective evaluation, it can help with objective evaluation. In SPICE’s virtual test bench, an amplifier’s performance can be readily evaluated with a few techniques.

Frequency Plots
Flat from 20Hz to 20kHz is specification everyone wants to see, as it covers the range of human hearing (your dog would prefer a 20Hz to 50kHz specification and a bat would prefer…). We have the range, but what is being measured? For an audio amplifier, the answer is output voltage; for a loudspeaker, sound pressure. A flat output usually means the range of frequencies that do not deviate by more than –3 dB from the output at some reference frequency, usually 1kHz. SPICE offers a quick and simple frequency response test in the form of a small signal AC sweep. Here the DC operating point is first calculated, and then all non-linear elements are replaced with their small signal models. Small signal models? The Berkeley SPICE engine efficient and it takes every short cut it can. Why? In part, because when SPICE was developed computers were much slower than today’s computers with gigahertz CPUs and because circuits can grow amazingly complex.

So rather than actually simulating the entire circuit, SPICE engine simply cascades each individual parts’ frequency response into the next part down the line. The results are close to the amplifier’s actual performance with small magnitude signals, but without the processing overhead. (To see this trick in action run an AC Sweep test with an op-amp that has no connection to a power supply! The frequency response will be plotted nonetheless, as the SPICE engine didn’t need the power supply information.) If this scenario bothers you, you are not alone. However, once you realize that SPICE’s function is not to exactly reproduce reality, but to offer same results as reality, you will appreciate this design decision. Furthermore, SPICE is best for helping you with what you don’t know, not what you already know. For example, there is no point to modeling a complete power supply, with transformer, diodes, and filter capacitors, if you know that the actual power supply has an output voltage of +30 volts and a 100mV of 120Hz ripple; instead, just use a voltage source with the same attributes. Unless, that is, you need to know how the power supply will behave in the first half second of operation.

Having said all that, we come upon a wrinkle when the device under test is a power amplifier. An amplifier’s frequency response is usually taken at two output levels: at 1 watt and at full output, not at some undefined small signal. So how do get the results we want at that those two output voltages? First we have find out what those two voltages are. While each amplifier will have its own maximum power output, we do know that 1 watt into an 8-ohm load equals 2.828 volts peak and 0.3535 amperes peak. The next step is to place voltage source in series with the amplifier’s input and to specify a sine-wave whose amplitude is equal to the amplifier’s gain divided by 2.828. But at what frequency?

If we run a small signal AC Sweep, we will have a good idea where the amplifier departs from flat. So, for example, if the –3dB points are 30Hz and 30kHz, then we should start first at 1kHz and then begin stepping down at 40Hz (in 1Hz increments) and then climbing from 20kHz (in 1kHz increments). Now we must run a set of Transient Sweep tests to get the spot frequency values.

Full-power bandwidth testing requires finding the maximum power at 1kHz, and then measuring the peak voltage. This voltage is then divided by the amplifier’s gain and then to specify this value as the voltage source’s value. Next all the spot frequency test are run and the results are tabulated.

Measuring distortion in amplifier topologies is one of the SPICE’s main features. B2 A/D Spice provides two measuring techniques. The first is DISTO, which is the quick and dirty measure of distortion. Much like the small signal AC sweep test, this test looks into the SPICE models for distortion information, rather than actually measuring the actual dynamic distortion. And much like the small signal AC sweep test, this test is better suited to large, complex circuits than small, simple circuits.

Well, what if we want full monty of distortion information, then the Fourier test is the better place to look and it is found in Transient Sweep test setup. The first stp is to confirm input signal’s frequency match the Fourier test’s fundamental frequency, otherwise the results will be nonsense. The next step is to specify an adequate period of time for the test frequency to unfold.

After running the test, the graph will display the Fourier analysis’ results.

Well, this does not look very promising. The problem is that too much information is offered: the peak magnitude, the normalized output (the peak value is “normalized” by treating its value as 1 and then all the other lower values are displayed relative to 1), the phase of each harmonic’s value, and the normalized display of the phase information. Why so much information? B2 A/D Spice does not know what you are looking for, so it default is to display all of the relevant to the circuit under test. It is better, however, to have too much information, than too little, as we can easily switch off the display of unneeded results.

Right-mouse button clicking on the graph brings up its popup menu, and from there, we select the “Edit Plot List” dialog window. Next we turn off the display of all the default plots in the graph. Then we press the “Add New Custom Plot to Graph…” button to add a new plot of our own design.

The new plot must have a name and a color that will show up against the graph’s background and, most importantly, an expression that defines what the plat displays. In this case, the plot will display the harmonics of the test frequency. The fundamental will be notched out, as the dB expression of 1 is 0. Below, we the 2nd through 9th harmonics display as being so many dBs down relative to the fundamental frequency, which is exactly what we want.

This offers more information than a simple THD percentage, as it displays each harmonics contribution to the distortion figure. Translating the dBs into percent of distortion is easy enough.


The actual formula used is: Percent = 100 x 10(dB/20)

Remember that the dBs are negative in this case. How do we get the total harmonic distortion figure for the amplifier, rather the figure for each harmonic? The easiest way is select both graph and table at the bottom of the Transient Sweep test setup dialog box.

When this option is selected, a spreadsheet like table is created that allows easy viewing of the individual harmonics’ contribution to the total distortion.

First of all, do not confuse the numbers at the extreme left as representing the harmonics number, as the numbers are off by 1 because they only refer to the row count. The next step is to ignore the fundamental (+1.000) and add all the remaining harmonics together and multiply this sum by 100. In the example above, the total comes in at 0.010571% THD.

Measuring Input Impedance
An amplifier’ input impedance can be an important piece of information, as many amplifiers are often cascaded and one amplifier’s input impedance becomes another amplifier’s load impedance. Unintended audio band low-pass filters can be created if one amplifier’s coupling capacitor sees too little a load impedance.

An amplifier’s input can often be determined by mere visual inspection of the schematic. For example, an op-amp or vacuum tube circuit with a 47k resistor from input to ground has an input impedance of 47k. But not always. If the tube circuit uses a grounded-grid input stage, the input impedance can be quite low or if a current-feedback op-amp is used and its inverting input is used, then it too will offer an extremely low input impedance.

Measuring the input impedance is easy enough. The first step is to place a current source in series with ground and the amplifier’s input. The source’s current value should be set to some innocuous value, such as 1µA and 1kHz. Next we perform a Transient Sweep test and plot the ensuing sine wave at the amplifier’s input. As the waveform is unlikely to be perfectly symmetrical, we measure the peak-to-peak value and divide this value by twice the current (2µA) to get the average input impedance at 1kHz.

Measuring Output Impedance
An amplifier’s output impedance and the load impedance define the amplifier’s damping factor, as the damping factor is but the ratio of load impedance divided by the output impedance, thus the ridiculously high values of 400 or even 1000.

Measuring the output impedance evolves the strategy as the measuring of the input impedance. Once again a current source is added to the circuit with a low current value, say 1mA, and once again1kHz is specified. This time the source is placed between ground and the amplifier’s output. A Transient Sweep test is run and sine wave created at the amplifier’s output is plotted. Then the peak-to-peak output voltage value is divided by twice the current value, which results in the output impedance in ohms.

For most, this will be all that is needed, but for a few power users, this information does not go far enough. More information will be desired. For example, what is the output impedance of across the frequency spectrum?

Creating a frequency against output impedance requires setting the current source’s transient properties to DC, with 0 volts as an offset, and then setting its Magnitude to 1mA under the Small Signal AC and Distortion tab.

Then we need to run a Small Signal AC Sweep test. Once again we will be given many plots, but not quite the one we want. So the next step is to turn 0ff all the existing plots and to define a new plot:

This plot takes the absolute of output voltage against 1000, the inverse of 1mA. Now the plot displays the output impedance in ohms.

Measuring Maximum Output Power
An amplifier’s maximum power output is the one specification that everyone, no matter how non-technical, want to know. Fortunately, this is one of the easier measurements to make in SPICE. In short, a voltage source is placed at the input of the amplifier and its AC value is incremented until the waveform distorts and then the output voltage is converted to an RMS value. RMS stands for the Root equals the Mean of sum all the instantaneous values within a period Squared. The Root refers to the equivalent DC value that would result in the same power dissipation. For example, a 1-ohm across a 5-volt DC power supply will generate 25W of heat, but requires a 7.07-volt AC sine wave or a 8.66-volt triangle wave to generate the same amount of heat. Why the difference?

The waveform stipulates the percentage of power that would be generated by a DC voltage and the percentage varies with the waveform. For example, a square wave produces the same amount of heat as the DC voltage, which makes perfect sense, as a square wave is really a DC voltage that periodically switches polarity. A 5-volt square wave starts at +5 volts and then instantly switches to –5 volts and then back again. So as a thought experiment, imagine a 1-ohm resistor placed across a 5 volt battery; the resistor will dissipate 25 watts as long it is connected to the battery. Now, if the resistor is flipped across the battery’s terminals, will the resistor dissipate more or less heat? Obviously, the dissipation will remain the same in both cases. Increasing the number switches in any given time period make no difference, assuming the switch time is instantaneous.

The triangle waveform, assuming equal rise and fall slopes, will only produce one third the heat that the DC voltage would, so its RMS value is equal to V/ 1.7332. If you guessed one half instead, the geometry probably misled you. Yes half the area is covered, but wattage is the result of the voltage being squared, not linearly multiplied against the resistance; half the voltage equals one forth the power.

The sine wave’s curves make for more complex math, but the quick answer is that the sine wave produces 1/v2 or 0.707107 times as much heat as a DC voltage that equals the waves peak value.

Thus, as Ohms law tells us that power equals voltage squared divided by resistance for DC voltages, when the waveform is a sine wave, we must divide the peak voltage by 1.414 or multiply by 0.707 first. This also applies to peak currents, so when taking a sine wave’s peak voltage and current, we divide both by the square root of 2, before multiplying each against each other to get the amount of power dissipated. Notice that since both values are being reduced by 0.707, 0.707 is being effectively squared as well, which results in 0.5, the inverse of 2. thus, we can multiply the peak voltage and current values and then divide by 2 to get the same result. Much easier.

In B2 A/D Spice, we can place a current meter in series with the load and a voltage meter in parallel with the load to measure these values. Then by defining a new plot, we can display power delivered into the load impedance in a graph.

Note that we are including the RMS transformation of the voltage and current into account in the plot’s expression. Now when we view the graph the peak of the sine wave will equal the power delivered into the load.

Measuring PSRR
PSRR stands for Power Supply Rejection Ratio. It is the measure of an amplifier’s ability reject or prevent the power supply noise at its output. It is usually express in dBs, which means that a ratio is implied. The ratio is between a circuit's change at its output relative to the disturbance at the power supply that caused it. In other words, we take the power supply noise’s value and then divide it by the same noise at the output. For example, 2V of noise at the power supply rail might give rise to only 2mV of noise that the output, which would represent a 1000 to 1 reduction in noise, or a 60dB improvement, as PSRR in dB = 20Log(Vps/Vout).

The first problem we face is that the voltage sources used in SPICE are problem free, in that they can source infinite current, exhibit no impedance, and add no noise. The last problem is easily taken care of in B2 A/D Spice.

In the voltage source’s prosperities setup dialog box above, the DC value is set to 45 volts and the “noise” is set to 2 volts at 120Hz. Now when we run a Transient Sweep test with the amplifier’s input shorted to ground, we can measure the amount of signal at 120Hz at the output. We could try to let B2 A/D Spice display the PSRR figure for us by creating a new plot, but it is unlikely to prove as accurate as doing it by hand, as the waveforms might differ in phase or symmetry. And since our goal is the find the worst case failing, some judgment is required in choosing the right data for our formulas. For example, in the graph below, we see that the negative going part of the output’s waveform is greater than the positive going part. Thus, we use the absolute value of the negative trough to divide into the 1 volt peak of noise.

Measuring Loop Gain
Most amplifier use feedback to extend bandwidth, lower distortion and noise and output impedance. The feedback is fueled by having more open-loop gain than closed-loop gain. The interesting problem that comes up in SPICE simulations of feedback-based amplifiers is how to measure the open-loop gain. Interesting because it is difficult to test an amplifier with an open loop, whether in reality or in simulation. Opening the loop will throw off the DC bias points, which rely on the feedback loop to stabilize, without the feedback the output latches up to one of the power supply rails. So, the secret is not to open the feedback loop, while measuring the open loop gain.

First we add an AC voltage source in series with the output and the feedback resistor. Its DC value is set to 0 volts and the AC voltage is set to some nominal value, such as 10mV.

Then we measure the gain experienced at the output relative to the inverting input, which allows the DC points to stay in place. In other words, the output voltage is divided by the signal at the inverting input and this result equals the open-loop gain.

More information on this technique is outlined in an article by Dr. R. D. Middlebrook in International Journal of Electronics, volume 38, number 4, 1975.