Saturday, December 5, 2020

Audio Amplifier Feedback - Amp with Frequency Dependent Gain

This post is a part of the series on audio amplifier feedback. The contents of the series can be found here.

In the last posts, I looked at the feedback theory basics and at how it applies to an opamp in both inverting and non-inverting configuration.

No amplifier can have a constant gain over an infinite bandwidth, as that would require infinite power. Any real amplifier's gain sooner or later goes down as the frequency goes up. For example, for most opamps designed in the past 50 years, their open loop gain (that without any feedback applied) starts going down at 100Hz or less:

The open loop gain Aol keeps going all the way down to unity (0dB) at a rate 20 dB/decade. At the same time, the phase (dashed line) at the output starts lagging that at the input (the opamp has a pole):

Eventually, the lag reaches (almost) 90 degrees. (Should there be more poles, each would add its own 20 dB/decade decline to the gain and up to 90 degrees phase shift. For now, I am going to look at just one pole.)

If such an opamp is connected to a feedback network (a resistor voltage divider) with gain 1/10:

setting the closed loop gain Acl=1/B at x10, or 20 dB, the error transfer function ETF and signal transfer function STF become frequency dependent:

At low frequencies, the magnitude of STF is 20dB, and the phase is constant - feedback stabilizes the gain of the opamp. The magnitude of ETF is -80dB (in this example), that is, any distortion that the opamp may generate will be reduced by a factor of 10,000. As frequency goes up, however, the open-loop gain Acl falls, and ETF grows. At 20kHz, ETF is only -27dB, so the distortion is reduced by only 20 times.

Loop gain LG is the product of open loop gain Acl and feedback network gain B, which is the same at the ratio of Acl and 1/B and, on the log plot, is simply the vertical distance between Acl and 1/B curves. The point where Acl meets 1/B is the crossover point - the loop gain become unity (0 dB), and feedback ceases to stabilize the STF and correct any distortion:


For large loop gains, ETF is approximately equal to loop gain, so commonly, it is the loop gain and not the ETF that is considered the measure of feedback's power to correct distortion. The more loop gain, the more distortion is reduced by feedback.

Loop gain falling with frequency shifts the spectrum of uncorrected distortion to higher frequencies, which creates a peculiar sonic signature - the bass, largely unaffected by distortion, become incredibly powerful and "tight", which is frequently attributed to the low damping factor or massive power supply of the audio amplifier.

There is an opinion, not scientific but useful, that, in case an amplifier has insufficient loop gain to correct distortion, it is sonically better to have loop gain, and thus distortion, approximately equal across audio range of frequencies, rather than allow loop gain to fall, and distortion to grow, with frequency as above.

Next week, I will look into what happens when the amplifier has multiple poles.

Friday, November 27, 2020

Audio Amplifier Feedback - Inverting and Differential OpAmp

This post is a part of the series on audio amplifier feedback. The contents of the series can be found here.

Last week, I examined how the basic feedback theory applies to a non-inverting opamp. 

Let's look at the other common way of connecting an opamp - the inverting amplifier:

In the diagram:
  • $A$ is the gain of the amplifier with no feedback applied (its open loop gain)
  • $x$ is the input signal
  • $y$ is the output signal
The feedback network consists of two resistors $R_1$ and $R_2$. The gain $B$ of the feedback network is that of a voltage divider: $$B=-{R_1 \over R_1+R_2}$$The minus sign here accounts for the fact that the feedback is applied to the inverting input of the opamp. This is the same as in the non-inverting configuration.

Unlike in the non-inverting configuration, the input signal arrives at the amplifier's input via a divider consisting of the same resistors $R_1$ and $R_2$. Effectively, the inverting configuration is a superposition of two circuits, one for feedback:
and one for the input signal:


The gain of the input divider is: $$-{R_2 \over R_1+R_2}$$As before, the minus sign here accounts for the fact that the attenuated input signal is applied to the inverting input of the opamp.

Now we can write down the Signal Transfer Function, the Error Transfer Function and the Loop Gain:
$$STF=-{A*{R_2 \over R_1+R_2} \over (1+A*{R_1 \over R_1+R_2})}$$
$$ETF={1 \over (1-A*B)}={1 \over (1+A*{R_1 \over R_1+R_2})}$$
$$LG=A*B=A*{R_1 \over R_1+R_2}$$
As $A$ (and hence $LG$) increases, $STF$ approaches the familiar $-{R_2 \over R_1}$.
 
The differential connection with R1=R3 and R2=R4 has the same STF and ETF as the inverting:


Friday, November 20, 2020

Audio Amplifier Feedback - Non-Inverting OpAmp

This post is a part of the series on audio amplifier feedback. The contents of the series can be found here.

Let us see how the feedback theory from my last week's post applies for a opamp in a typical non-inverting configuration:

In the diagram:
  • $A$ is the gain of the amplifier with no feedback applied (its open loop gain)
  • $x$ is the input signal
  • $y$ is the output signal
The feedback network consists of two resistors $R_1$ and $R_2$. The gain $B$ of the feedback network is that of a voltage divider: $$B=-{R_1 \over R_1+R_2}$$The minus sign here accounts for the fact that the feedback is applied to the inverting input of the opamp.

Using the formulas from last week's post:
$$STF={A \over (1-A*B)}={A \over (1+A*{R_1 \over R_1+R_2})}$$
$$ETF={1 \over (1-A*B)}={1 \over (1+A*{R_1 \over R_1+R_2})}$$
$$LG=A*B=A*{R_1 \over R_1+R_2}$$
As $A$ (and hence $LG$) increases, $STF$ approaches the familiar ${R_1+R_2 \over R_1}=1+{R_2 \over R_1}$.

One special case here is an opamp connected as a unity gain buffer:

This is equivalent to the general non-inverting connection with $R_1$ open and $R_2$ shorted. In this case, $B=-1$ and 
$$STF={A \over (1-A*B)}={A \over (1+A)}$$
$$ETF={1 \over (1-A*B)}={1 \over (1+A)}$$
$$LG=A*B=A$$
$LG$ equals $A$ - in this configuration, all available open loop gain is applied to reduce the output error. As $A$ increases, $STF$ approaches unity.

In the next post, I will look at the opamp in the inverting configuration.

Friday, November 13, 2020

Audio Amplifier Feedback - Basics

This post is a part of the series on audio amplifier feedback. The contents of the series can be found here.

To make sure everyone is on the same page, here is a super simplified feedback loop that can be found in an audio amplifier:

In the diagram:
  • $A$ is the gain of the amplifier with no feedback applied (its open loop gain)
  • $B$ is the gain of the feedback network (typically, the feedback network attenuates the signal, so $|B|<1$) 
  • $x$ is the input signal
  • $\epsilon$ is the error (noise, distortion) that the amplifier adds to the signal
  • $y$ is the resulting output signal
That is, the amplifier receives the input signal $x$, amplifies it by $A$, adds some noise and distortion $\epsilon$, resulting in the output signal $y$. A portion $B$ of the output signal $y$ is fed back to the input by adding it to the input signal (hence 'feedback').

Working from the right side of the diagram to the left, we can write:
$$y=\epsilon+A(x+y*B)$$
Solving for $y$:
$$y={A \over (1-A*B)}*x+{1 \over (1-A*B)}*\epsilon$$
The output signal $y$ has two components:
  • Input signal $x$ amplified by ${A \over (1-A*B)}$
  • Distortion $\epsilon$ amplified by ${1 \over (1-A*B)}$
Let us call the input signal amplification factor ${A \over (1-A*B)}$ the Signal Transfer Function, or $STF$, and distortion amplification factor ${1 \over (1-A*B)}$, the Error Transfer Function, or $ETF$:
$$STF={A \over (1-A*B)}$$ $$ETF={1 \over (1-A*B)}$$
The promise of feedback is that, as the open loop gain $A$ increases, the $ETF$ approaches zero, while the $STF$ approaches $-{1 \over B}$. In other words, the contribution of noise and distortion in the output signal becomes small, and the closed loop gain of the amplifier becomes independent of the amplifier's open loop gain $A$.

The sum of the input signal $x$ and the feedback $y*B$ that the amplifier sees at its input is normally small and gets smaller as $A$ increases: $$x+y*B={1 \over (1-A*B)}*x+{B \over (1-A*B)}*\epsilon$$
The quantity $A*B$ is called loop gain, and is the correct term for the "amount of feedback". We can rewrite $STF$ and $ETF$ with the loop gain $LG$:
$$STF={LG \over (1-LG)}*{1 \over B}$$ $$ETF={1 \over (1-LG)}$$
In the next post, I will show how the above math applies to an opamp.

Friday, November 6, 2020

Audio Amplifier Feedback - Introduction and Contents

An apple was laying in the grass, a good apple with just a small rotten spot. The teacher picked it up and said: "There are two options. One can eat the apple as is, right away. Or one can take a knife, cut out the rot, and eat then. It would take some work, but the apple without the bad spot will be more enjoyable, and you would probably have more of it, as you won't need to avoid the rotten part. These are two different takes on anything you do." He took a knife, cut out the rotten spot and started eating. "Will you share with us?" - "No," he joked, "so that you remember".

This is the first post in a series of posts on audio amplifier feedback, written in the spirit of that parable. The focus of the series will be on the common feedback networks in audio power amplifiers and their effect on distortion and stability, with simulations and some formulas.

The contents of the series:

  1. Feedback Basics (definitions, etc.)
  2. Feedback in a Non-Inverting Amplifier
  3. Feedback in Inverting and Differential Amplifiers
  4. Feedback in an Amplifier with Frequency Dependent Gain
  5. Feedback with Multiple Poles Inside Feedback Loop
  6. A Realistic Power Amplifier and its Phase Margin
  7. Dominant Pole (Miller) Compensation
  8. Limitations of Dominant Pole Compensation
  9. Nested Feedback Loops
  10. Input Stage Linearity
  11. Transient Intermodulation Distortion (TIM)
  12. Two-Pole Compensation
  13. NCore style compensation
  14. LTP with Frequency Dependent Load
  15. LTP with LR compensation
  16. Lead Compensation
  17. Rate-of-Closure (ROC)
  18. Lag Compensation
  19. Lead-Lag Compensation
  20. Estimating Poles in Lead-Lag Compensation Scheme
  21. Hawksford's Error Correction (H.ec)
  22. Hawksford's Error Correction and "Distortion Selector"
  23. High Precision Composite Op-Amps, Part 1
  24. High Precision Composite Op-Amps, Part 2  
  25. High Precision Composite Op-Amps, Part 3
  26. High Precision Composite Op-Amps, Part 4 
  27. High Precision Composite Op-Amps, Part 5
  28. Bootstrapped Collector Loads
  29. Current Dumping Revisited  
  30. Zeno, Feedback Loops, and the Difference Between a Phenomenon and Its Description
  31. Where Does Feedback Actually Reduce Distortion? 


Friday, May 1, 2020

Aikido Cathode Follower Preamplifier

After all that work removing hum from the Aikido ACF-2 board (see the previous post), it would be a shame not to make a complete preamplifier with it, and this is what I did.

The enclosure is from Modushop with front and rear panels custom made and engraved by Front Panel Express.

The rear panel has three pairs of gold plated RCA input connectors and two pairs of outputs (connected in parallel), plus an AC power inlet.
Inside, besides the ACF-2 board, are a toroidal power transformer, an output muting board from Pete Millett, a volume control, and and input switch. The input switch is mounted in the rear and is connected by a shaft extender to the front panel knob. All connections are made by teflon insulated, sliver plated copper wire.
The front panel has a sub-panel holding the volume control potentiometer (ALPS RK27) and the bearing for the extended switch shaft. The sub-panel allows hiding the bottoms of the knobs inside the front panel for a more professional look.
The tubes are E88CC.




Sunday, April 26, 2020

Removing hum from Aikido Cathode Follower

A while ago, I purchased from Glass-Ware.com an Aikido Cathode Follower 2 (ACF-2) All-in-One 9-Pin PCB, designed by John Broskie, the editor of Tube Cad Journal (tubecad.com).

The PCB holds a pair of cathode followers, each loaded by a triode current source, and a respective power supply. In my build, a JJ E88CC with 220ohm cathode resistors shows 0.003% THD @1kHz 1Vrms with pure 2nd harmonic distortion.

As I tested my ACF, I noticed audible buzz at its outputs @0.15% THD+N - that's 1.5mVrms(!), well above the THD, and it was not a grounding problem.

A careful look at the schematic (below), confirmed by some Spice simulation, revealed that the "Aikido" in the ACF-2 relies on the exact match of the voltages across the capacitors C18 and C19, including the hum component. These capacitors are in series for the rectifier (e.g. hum) current and, together with R4/R7, are in parallel for the signal current. In the ideal Aikido world, the hum voltage across C18 would cancel that across C19, providing hum-free signal output.

In reality, ACF-2 provides no rejection of the hum caused by the mismatch of the AC components of B+ vs. B-. A mismatch is easily created by e.g. C18 and C19 having slightly different capacitance. Mismatched electrolytic capacitors are common - they usually have 20% tolerance, and the capacitance changes with time and temperature, so an ideal match never happens.

My SPICE model shows that a 1% mismatch between C18 and C19 would produce about 3.5mV of imbalance in the 120Hz components between the positive and negative rails. In ACF-2, 50% of that imbalance goes to the output - that’s 1.75mV of hum not cancelled by Aikido - and can be easily audible. Larger mismatch would produce more hum. 

One solution (see the schematic below) would be to split C4 into two capacitors, one connected between B+ and the ground, the other between B- and ground - see the attached schematic. That wouldn't eliminate any mismatch but would make it less relevant, as there would be a lower impedance path for the signal current to ground from the anode of U1a (U2a) and the bottom end of R5. The PCB is not designed for this, unfortunately, but one can place two radial capacitors in the space allocated for C4, connecting them to C4 pads and to the ground pad nearby. I ended up installing 2x 470uF 200V caps in each channel and leaving in place C5. This reduced the hum from 0.15% to ~0.001%.


Another solution was suggested by John Broskie himself, and that is to replace R12 to R15 with jumper wires and then place a 100 to 1k ohms resistor in series with the secondary center-tap and the PCB's ground pad. Better still would be to use a choke in place of the series resistor. This would create an RC (LC with the choke) filter with that series resistor/choke and C18/C19. The two solutions are not mutually exclusive and can be used together for even better results.

Note: the attached schematic was designed by John Broskie and published in his Tube CAD Journal. John is the author; I just built his design. I reproduced the original schematic to illustrate the post above.