The OPAMP

Introduction

The name OPAMP is the abbreviation of Operational Amplifier. So it is a kind of amplifier and the adjective "Operational" suggests that i can do some operations. Later we will see that an OPAMP can actually do static operations like summing, subtracting but also time depending operations like integrating and differentiating. The OPAMP is not just some amplifier, but an amplifier with a huge amplification . A common OPAMP has an amplification of 100 000 or more. With the exception of power OPAMPs, a common OPAMP has no high power output stage, so the output current is limited to an order of magnitude of tens of mA. A power OPAMP can source and sink currents in the order of magnitude of several amperes and can be used for f.e. DC motor drivers, power supplies, low end audio amplifiers.
What is the practical use of an amplifier with such a huge amplification and why do we need such high amplifications ?
To understand that, we need to go into the theory of feedback systems.

Feedback systems

Below you see a picture with an amplifier with a very big amplification A. It has an input and it has an output.
The output voltage = the input voltage * amplification A.
We call this an open loop system because there is no feedback from the output back to the input.
The open loop system has an open loop gain = amplification A.
So far nothing special here.

Now we are going to apply a feedback around the amplifier so we get a closed loop system.

Negative and positive feedback

When we feed back a part, all or a multiple of the output and subtract this from the input before it goes into the amplifier, we call this type of feedback : negative feedback.
See the top picture below showing that the output is fed back using a factor F and subtracted (minus sign) from the input.
The input minus this fed back signal is then amplified by the amplifier.

When we feed back a part, all or a multiple of the output and add this to the input before it goes into the amplifier, we call this type of feedback : positive feedback .
See the bottom picture below showing that the output is fed back using a factor F and added (plus signal) to the input.
The input plus this fed back signal is then amplified by the amplifier
With either negative or positive feedback applied to an open loop system, we call it a closed-loop system.
Next we will talk about what the effect is of this kind of feedback and what is it is used for.

Let's see what happens when we take an amplifier with a huge amplification A and close the loop using negative feedback with a factor F.
Intuitively we can deduce that when we subtract something from the input that is proportional to the input, then the output must become smaller.
But to get a better understanding of what the negative feedback does, we need the help of some mathematics.
In the picture below the mathematical derivation of the formula for the output of a closed loop system with negative feedback is shown.

So if we use an amplifier with a huge amplification A and we apply negative feedback to it by feeding the output back to the input using a factor F, then the closed loop amplification = output / input = A / (1 + (A * F)).

What does this formula tell us ?

  • Let's assume that F = 1, meaning that all of the output is fed back and subtracted from the input before it is amplified.
    The formula will be : Output / Input = A / (1 + A).
    With an amplification A that is huge, we get : Output / Input = A / ( 1 + A) = huge / (1 + huge) = 100000/100001 = ca. 1

  • Let's assume that F = 0.1, meaning that one tenth of the output is fed back and subtracted from the input before it is amplified.
    The formula will be : Output / Input = A / (1 + (A * 0.1)).
    With an amplification A that is huge, we get : Output / Input = A / ( 1 + (A * 0.1)) = huge / (1 + (0.1 * huge)) = 100000 / 10001 = ca. 10

  • Let's assume that F = 10, meaning that the output times ten is fed back and subtracted from the input before it is amplified.
    The formula will be : Output / Input = A / (1 + (A * 10)).
    With an amplification A that is huge, we get : Output / Input = A / ( 1 + (A * 10)) = huge / (1 + (10 * huge)) = 100000 / 1000001 = ca. 0.1

Summarizing, we can state that the closed loop amplification is equal to the inverse of the negative feedback factor F,
so :
Output / Input = (1 / F).
Essential is that the open loop amplification A is very high, because the higher the open loop amplification,
the closer the output will follow the inverse of the feedback factor.

Let's assume that the Input = 1V :

  • With F = 0.1, the amplification = 10, so the output will be 10V.
    The error signal that goes into the amplifier = Input - (Output * F) = 1V - (10V * 0.1) = 0V.

  • With F = 1, the amplification = 1, so the output will be 1V.
    The error signal that goes into the amplifier = Input - (Output * F) = 1V - (1V * 1) = 0V.

  • With F = 10, the amplification = 0.1, so the output will be 0.1V
    The error signal that goes into the amplifier = Input - (Output * F) = 1V - (0.1V * 10) = 0V.


So the higher the feedback factor F, the lower the output voltage, because a higher feedback factor F lowers the closed loop amplification.
We also see that, no matter what input voltage or what feedback factor we apply, the signal that goes into the amplifier always seems to be 0. That means that negative feedback will always force the output to a value that will make the "error" signal going into the amplifier equal to 0.
Essential in all this is that the open loop amplification A is very high, because the higher the open loop amplification,

the closer the output will follow the input * (1 / F).
So the higher the open loop amplification, the lower the distortion at the output of the closed loop system will be.


Also interesting to note is that :

  • when F < 1, the output voltage will be higher than the input voltage, so we have an amplification.

  • when F > 1, the output voltage will be lower than the input voltage, so we have an attenuation.

  • when F = 1, the output voltage is equal to the input voltage, so we have a buffer.

The ideal OPAMP

In the picture below, the feedback element F is removed, so only the amplifier with the huge amplification is left, together with the input (input+) and the input- that was previously used for the negative feedback and subtracted from the input (input+).

When we take a look at the symbol of an OPAMP 0at the bottom of the picture below, we see clearly see the resemblance with the open-loop system at the top of the picture below : The OPAMP has 2 inputs, input+ and input- that we are called respectively the non-inverting and the inverting input.
It has a huge amplification factor of at least 100000 times and it has an output. Further the OPAMP is powered by a symmetrical power supply. That means it has a positive and a negative power supply. It is not strictly necessary to use a symmetrical power supply.
Ideally the input impedance of input+ and input- is infinite, meaning that the current going into the 2 inputs = 0.

Note :
An OPAMP can also be powered using a positive power supply and ground. In that case the biasing of the inputs require some attention to make sure that the inputs of the OPAMP can not go negative even when applying a signal that goes positive and negative.

The OPAMP as a comparator

Since there is no feedback, the output will be defined by the open loop gain : output = amplification A * (input+ - input-) = 100000 * (input+ - input-).
So when there is a positive voltage difference of 1 mV between input+ and input-, the output will be 100V. Of course this is not possible because the output of the OPAMP can never be higher than the power supply voltage of the OPAMP. So in practise the output voltage will slam against the positive power rail and stay there. When there is a negative voltage difference of 1 mV between input+ and input-, meaning that input- is 1 mV higher than input+, the output will slam against the negative power rail and stay there.
Not very useful, except when you want to use the OPAMP as a comparator as we just described to compare the voltage on the non-inverting input with the voltage on the inverting input. Even at the slightest voltage difference between the 2 inputs, the very high amplification of the OPAMP pushes its output against the positive or negative power rail. This is also called : saturation, because the output saturates against the power rail.

The OPAMP as a buffer

When we want to build a circuit with an OPAMP that gives us a well-defined amplification and so the OPAMP follows the input without any clipping or distortion, we need to apply negative feedback to the OPAMP.In the picture below we added a feedback loop with F = 1 around the amplifier with amplification A , meaning that all of the output is fed back to the input and subtracted from the input before going into the amplifier. According to the formula defining the output in function of the input, the output will be equal to the input. So we made ourselves a buffer of which the output simply follows the input. The equivalent circuit of the OPAMP is also shown in the picture below. A feedback with F = 1 means that all of the output is fed back, so we simply connect the output to the inverting input (input-) with a wire and we have an OPAMP functioning as a buffer. What is interesting about the OPAMP buffer is that for an ideal OPAMP, the current going into the either of the inputs = 0. That means that the non-inverting input has an infinite impedance and will not present a load to the input signal that we want to buffer. Ideal OPAMPs don't exist, so there will be a small current (in the order of magnitude of hundreds of nA to tens of pA) going into the non-inverting input, but this can be neglected, certainly when compared to a transistor emitter follower buffer, where the base input current will be in the order of magnitude of tens of uA. Also the output of the buffer will not perfectly follow the input because the output of a real OPAMP has an offset voltage of several millivolts to tens of microvolts. But that is also negligible compared with a transistor emitter follower buffer, where the output voltage at the emitter is a diode voltage drop below the input voltage at the base. So all in all the OPAMP buffer is a very good buffer.

The OPAMP as a non-inverting amplifier

In the previous example we made a buffer by applying a feedback of F = 1.
When we want to make an amplifier, we saw that the negative feedback gives us an amplification that is equal to the inverse of the feedback factor F, when the open loop amplification A is very high. The latter is always the case with an OPAMP, so if we want to make an amplifier with an amplification of 10x, we need to apply a negative feedback of 1 / 10 = 0.1. So 1/10 of the output needs to be fed back to the inverting input of the OPAMP. We can do this using a resistive divider that divides the output down to 1 / 10 and connecting the output of the resistive divider to the inverting input of the OPAMP.
In the picture below is shown how this is done. The resistive divider is formed by R1 and R2.
The voltage over R2 = (output / (R1 + R2)) * R2 = (output / 10k) * 1k = output / 10. The voltage over R2 is fed back to the inverting input of the OPAMP, forming a negative feedback with factor F = 0.1. We can state that F = R2 / (R1 + R2)
The amplification of the closed loop system will be 1/F, thus = (R1 + R2) / R2 = (R1/R2) + 1 = 9k/1k + 1 = 9 + 1 = 10.
Because the feedback factor F can never be higher than 1 when using a resistive divider, the amplification will be 1 or lower than 1.
The OPAMP buffer is a special case of the non-inverting amplifier where R1 = 0 and R2 = infinite, giving an amplification of 1 + R1/R2 = 1 + 0/infinite = 1.
The non-inverting amplifier is called non-inverting because the output follows the input without a phase shift. In other words, the output is in phase with the input. When the input is positive, the output will also be positive.

The OPAMP as an inverting amplifier

The OPAMP can also be used in a configuration where it becomes an inverting amplifier. This means that the output is 180 degrees phase shifted compared with the input. When the input is positive, the output will be negative.
Now we will use another approach to find out how the circuit works, because we can also analyse the circuit using some basic rules about OPAMPs :

  • The current flowing into the non-inverting and inverting input of the OPAMP is both = 0

  • When negative feedback is applied and the output does not saturate and there is no non-linearity in the feedback loop, the voltage difference between the 2 inputs of the OPAMP will be 0V. In other words, the voltage on the non-inverting input is equal to the voltage on the inverting input.

With these 2 basic rules, we can analyse the circuit below and derive the formula for the closed loop amplification, being Vout/Vin as shown below.
We can state that Vf = 0, because the voltage of the non-inverting = voltage on the inverting input.
We can state that i1 = i2, because the current i going into the inverting input = 0, so all of i1 also flows through R2 (Kirchhoffs first law).
We find that the closed loop gain = - R2/R1. So the amplification is defined by the ratio of the resistors.
The negative sign indicates that the output is inverted compared with the input. Therefor we call this an inverting amplifier.

  • Vf is also called a virtual ground, because it is not a "hard"ground, but has the same voltage potential as the ground connection on the non-inverting input.

  • We also see that with the non-inverting amplifier, the input impedance will be lower than with a non-inverting amplifier, because when looking into the input, we see a resistor R1 that is connected to the virtual ground. So the input impedance will be less or equal to R1 = 1k. With a non-inverting amplifier the input impedance is defined by the current flowing into the input, which ideally is 0. So the input impedance of a non-inverting amplifier is very high.

  • With the non-inverting amplifier we can only get amplifications higher than 1. With the inverting amplifier we can have amplifications higher than 1 but also lower than 1. In other words, the inverting amplifier can also attenuate.

The OPAMP as an inverting summing amplifier

Another application of the OPAMP, that is related to the inverting amplifier, is the inverting summing amplifier that is shown in the picture below.
When comparing the circuit with the circuit of the inverting amplifier, we see that another input source with an input resistor is added.
The input sources are V1 and V2.
The mathematical derivation is given and is similar to the one of the inverting amplifier.
We find that the closed loop amplification = -R2/R1 * (V1 + V2). So the amplifier amplifies the sum of the 2 input voltages and the negative sign indicates that the output is the inverted sum of the 2 input voltage. The amplification is proportional to the ratio of the resistors R2 and R1 and R2 and R3.

The OPAMP as a differential amplifier

The following OPAMP application is the differential amplifier.
This circuit can be explained using the formula's for the non-inverting amplifier and the inverting amplifier, because the differential amplifier is a combination of the 2 in disguise.
In the picture below is shown how to analyse the circuit in a simple way.

The OPAMP as a non-inverting attenuator

When we talked about the non-inverting amplifier, we found that the amplification of a non-inverting amplifier can not be less than 1. With the inverting amplifier it is possible to have amplifications less than 1, in other words attentuation instead of amplification.
Suppose we also want a non-inverting amplfier that can attentuate. We could attentuate the input signal before it goes into the standard non-inverting amplifier to do so, but then the input signal will be loaded with the resistive divider that we need to attentuate the input signal.
We learned that for a system with negative feedback, the amplification is the inverse of the feedback factor, so A = 1/F. If we want an A < 1, so an attenuation, F needs to be bigger than 1.
In the picture below, this is realized.
The closed loop amplification of the circuit is 0.1, so the circuit has an attenuation of 10 and it is a non-inverting attenuator.
With a standard non-inverting amplifier, we used a resistive divider in the feedback loop to feedback only a portion of the output. This results in a feedback factor < 1. To make a non-inverting attenuator, we need a feedback factor > 1, so instead of a divider in the feedback loop, we need an amplifier in the feedback loop. And the amplifier in the feedback loop needs to be a non-inverting amplifier in order to have negative feedback . An inverting amplifier would result in positive feedback.
So if we put a non-inverting amplifier with a gain of 10 in the feedback loop, we get a F=10, resulting in a closed loop gain for the complete circuit of 0.1.

The OPAMP as a high gain inverting amplifier with improved input impedance

When we need a high gain with an inverting amplifier, we need to make R2 very high and/or R1 very small. There is limit to making R2 high, simply because the high value resistance will cause issues as : extra noise, extra interference, lower bandwidth (the gain-bandwidth product of an OPAMP is a constant, so high gain gives reduced bandwith, thus a limited frequency range) . On the other hand, there is also a limit to making R1 very small, because it will decrease the input impedance of the circuit. R1 is connected between the input and the so-called virtual ground of the inverting amplifier. This means that the input impedance is mainly determined by the value of R1. Making R1 very small will also make the input impedance very small. A low input impedance means that the input source will be loaded more heavily. A voltage source should be connected to a high impedance for an efficient transfer of power, so a low input impedance is not desired.
There are several methods to increase the input impedance of the inverting amplifier. One of them is shown in the picture below.
In the top circuit below, we show an inverting amplifier with a gain of -1000, using a high value for R2 and a rather low value for R1.
In the bottom circuit below, the output signal is first divided down by R3 and R4 with a factor 1000 = R4 * (R3 + R4) and this is then fed back to the inverting input using R2 and R1 having a ratio of 100k / 100k = 1. So the total amplification is -1000 * 1 = -1000. We get the same amplification but because we are dividing the output down before feeding it back, we can keep the ratio between R2 and R1 small. So R2 does not have to be very high and R1 doesn't have to be very small to still get a fairly high amplification.
In the example below the top circuit has an input impedance of roughly 1k (value of R1) and the bottom circuit has an input impedance of 100k (value of R1).