Friday, November 27, 2020

Audio Amplifier Feedback - 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}$.




Friday, November 20, 2020

Audio Amplifier Feedback - Non-Inverting OpAmp

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.

Friday, November 13, 2020

Audio Amplifier Feedback - Basics

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.