## 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: