# Operational amplifier applications

Main article: Operational amplifier

A non-ideal op amp's equivalent circuit has a finite input impedance, a non-zero output impedance, and a finite gain. This article illustrates some typical applications of operational amplifiers. A real op amp has a number of non-ideal features as shown in the diagram, but here a simplified schematic notation is used, and the reader is reminded that many details such as device selection and power supply connections are not shown. Operational amplifiers are optimised for use with negative feedback, and this article discusses only negative-feedback applications. When positive feedback is required, a comparator is usually more appropriate. See Comparator applications for further information.

## Practical considerations

### Operational amplifiers parameter requirements

In order for a particular device to be used in an application, it must satisfy certain requirements. The operational amplifier must

• have large open-loop signal gain (voltage gain of 200,000 is obtained in early integrated circuit exemplars), and
• have input impedance large with respect to values present in the feedback network.

With these requirements satisfied, the op amp is considered ideal, and one can use the method of virtual ground to quickly and intuitively grasp the 'behavior' of any of the op amp circuits below.

### Component specification

Resistors used in practical solid-state op-amp circuits are typically in the kΩ range. Resistors much greater than 1 MΩ cause excessive thermal noise and make the circuit operation susceptible to significant errors due to bias or leakage currents.

### Input bias currents and input offset

Practical operational amplifiers draw a small current from each of their inputs due to bias requirements (in the case of bipolar junction transistor-based inputs) or leakage (in the case of MOSFET-based inputs).

These currents flow through the resistances connected to the inputs and produce small voltage drops across those resistances. Appropriate design of the feedback network can alleviate problems associated with input bias currents and common-mode gain, as explained below. The heuristic rule is to ensure that the impedance "looking out" of each input terminal is identical.

To the extent that the input bias currents do not match, there will be an effective input offset voltage present, which can lead to problems in circuit performance. Many commercial op amp offerings provide a method for tuning the operational amplifier to balance the inputs (e.g., "offset null" or "balance" pins that can interact with an external voltage source attached to a potentiometer). Alternatively, a tunable external voltage can be added to one of the inputs in order to balance out the offset effect. In cases where a design calls for one input to be short-circuited to ground, that short circuit can be replaced with a variable resistance that can be tuned to mitigate the offset problem.

Operational amplifiers using MOSFET-based input stages have input leakage currents that will be, in many designs, negligible.

### Power supply effects

Although power supplies are not indicated in the (simplified) operational amplifier designs below, they are nonetheless present and can be critical in operational amplifier circuit design.

#### Supply noise

Power supply imperfections (e.g., power signal ripple, non-zero source impedance) may lead to noticeable deviations from ideal operational amplifier behavior. For example, operational amplifiers have a specified power supply rejection ratio that indicates how well the output can reject signals that appear on the power supply inputs. Power supply inputs are often noisy in large designs because the power supply is used by nearly every component in the design, and inductance effects prevent current from being instantaneously delivered to every component at once. As a consequence, when a component requires large injections of current (e.g., a digital component that is frequently switching from one state to another), nearby components can experience sagging at their connection to the power supply. This problem can be mitigated with appropriate use of bypass capacitors connected across each power supply pin and ground. When bursts of current are required by a component, the component can bypass the power supply by receiving the current directly from the nearby capacitor (which is then slowly recharged by the power supply).

#### Using power supply currents in the signal path

Additionally, current drawn into the operational amplifier from the power supply can be used as inputs to external circuitry that augment the capabilities of the operational amplifier. For example, an operational amplifier may not be fit for a particular high-gain application because its output would be required to generate signals outside of the safe range generated by the amplifier. In this case, an external push–pull amplifier can be controlled by the current into and out of the operational amplifier. Thus, the operational amplifier may itself operate within its factory specified bounds while still allowing the negative feedback path to include a large output signal well outside of those bounds.[1]

## Amplifiers

We begin these examples with that of the differential amplifier, from which many of the other applications can be derived, including the inverting, non-inverting, and summing amplifier, the voltage follower, integrator, differentiator, and gyrator.

### Differential amplifier (difference amplifier)

Amplifies the difference in voltage between its inputs.

The name "differential amplifier" must not be confused with the "differentiator," which is also shown on this page.
The "instrumentation amplifier," which is also shown on this page, is a modification of the differential amplifier that also provides high input impedance.

The circuit shown computes the difference of two voltages, multiplied by some gain factor. The output voltage:

${\displaystyle V_{\text{out}}={\frac {\left(R_{\text{f}}+R_{1}\right)R_{\text{g}}}{\left(R_{\text{g}}+R_{2}\right)R_{1}}}V_{2}-{\frac {R_{\text{f}}}{R_{1}}}V_{1}=\left({\frac {R_{1}+R_{\text{f}}}{R_{1}}}\right)\cdot \left({\frac {R_{\text{g}}}{R_{\text{g}}+R_{2}}}\right)V_{2}-{\frac {R_{\text{f}}}{R_{1}}}V_{1}.}$

Or, expressed as a function of the common mode input Vcom and difference input Vdif

${\displaystyle V_{\text{com}}=(V_{1}+V_{2})/2;V_{\text{dif}}=V_{2}-V_{1}\,,}$

the output voltage is

${\displaystyle V_{\text{out}}{\frac {R_{1}}{R_{\text{f}}}}=V_{\text{com}}{\frac {R_{1}/R_{\text{f}}-R_{2}/R_{\text{g}}}{1+R_{2}/R_{\text{g}}}}+V_{\text{dif}}{\frac {1+(R_{2}/R_{\text{g}}+R_{1}/R_{\text{f}})/2}{1+R_{2}/R_{\text{g}}}}.}$

In order for this circuit to produce a signal proportional to the voltage difference of the input terminals, the coefficient of the Vcom term (the common-mode gain) must be zero, or

${\displaystyle R_{1}/R_{\text{f}}=R_{2}/R_{\text{g}}}$

With this constraint[nb 1] in place, the common-mode rejection ratio of this circuit is infinitely large, and the output

${\displaystyle V_{\text{out}}={\frac {R_{\text{f}}}{R_{1}}}V_{\text{dif}}={\frac {R_{\text{f}}}{R_{1}}}\left(V_{2}-V_{1}\right).}$

where the simple expression Rf / R1 represents the closed-loop gain of the differential amplifier.

The special case when the closed-loop gain is unity is a differential follower, with:

${\displaystyle V_{\text{out}}=V_{2}-V_{1}.\,}$

### Inverting amplifier

An inverting amplifier is a special case of the differential amplifier in which that circuit's non-inverting input V2 is grounded, and inverting input V1 is identified with Vin above. The closed-loop gain is Rf / Rin, hence

${\displaystyle V_{\text{out}}=-{\frac {R_{\text{f}}}{R_{\text{in}}}}V_{\text{in}}\!\,}$.

The simplified circuit above is like the differential amplifier in the limit of R2 and Rg very small. In this case, though, the circuit will be susceptible to input bias current drift because of the mismatch between Rf and Rin.

To intuitively see the gain equation above, calculate the current in Rin:

${\displaystyle i_{\text{in}}={\frac {V_{\text{in}}}{R_{\text{in}}}}}$

then recall that this same current must be passing through Rf, therefore (because V = V+ = 0):

${\displaystyle V_{\text{out}}=-i_{\text{in}}R_{\text{f}}=-V_{\text{in}}{\frac {R_{\text{f}}}{R_{\text{in}}}}}$

A mechanical analogy is a seesaw, with the V node (between Rin and Rf) as the fulcrum, at ground potential. Vin is at a length Rin from the fulcrum; Vout is at a length Rf. When Vin descends "below ground", the output Vout rises proportionately to balance the seesaw, and vice versa.[2]

### Non-inverting amplifier

A non-inverting amplifier is a special case of the differential amplifier in which that circuit's inverting input V1 is grounded, and non-inverting input V2 is identified with Vin above, with R1R2. Referring to the circuit immediately above,

${\displaystyle V_{\text{out}}=\left(1+{\frac {R_{\text{2}}}{R_{\text{1}}}}\right)V_{\text{in}}\!\,}$.

To intuitively see this gain equation, use the virtual ground technique to calculate the current in resistor R1:

${\displaystyle i_{1}={\frac {V_{\text{in}}}{R_{1}}}\,,}$

then recall that this same current must be passing through R2, therefore:

${\displaystyle V_{\text{out}}=V_{\text{in}}+i_{1}R_{2}=V_{\text{in}}\left(1+{\frac {R_{2}}{R_{1}}}\right)}$

Unlike the inverting amplifier, a non-inverting amplifier cannot have a gain of less than 1.

A mechanical analogy is a class-2 lever, with one terminal of R1 as the fulcrum, at ground potential. Vin is at a length R1 from the fulcrum; Vout is at a length R2 further along. When Vin ascends "above ground", the output Vout rises proportionately with the lever.

The input impedance of the simplified non-inverting amplifier is high, of order Rdif × AOL times the closed-loop gain, where Rdif is the op amp's input impedance to differential signals, and AOL is the open-loop voltage gain of the op amp; in the case of the ideal op amp, with AOL infinite and Rdif infinite, the input impedance is infinite. In this case, though, the circuit will be susceptible to input bias current drift because of the mismatch between the impedances driving the V+ and V op amp inputs.

### Voltage follower (unity buffer amplifier)

Used as a buffer amplifier to eliminate loading effects (e.g., connecting a device with a high source impedance to a device with a low input impedance).

${\displaystyle V_{\text{out}}=V_{\text{in}}\!\ }$
${\displaystyle Z_{\text{in}}=\infty }$ (realistically, the differential input impedance of the op-amp itself, 1 MΩ to 1 TΩ)

Due to the strong (i.e., unity gain) feedback and certain non-ideal characteristics of real operational amplifiers, this feedback system is prone to have poor stability margins. Consequently, the system may be unstable when connected to sufficiently capacitive loads. In these cases, a lag compensation network (e.g., connecting the load to the voltage follower through a resistor) can be used to restore stability. The manufacturer data sheet for the operational amplifier may provide guidance for the selection of components in external compensation networks. Alternatively, another operational amplifier can be chosen that has more appropriate internal compensation.

### Summing amplifier

A summing amplifier sums several (weighted) voltages:

${\displaystyle V_{\text{out}}=-R_{\text{f}}\left({\frac {V_{1}}{R_{1}}}+{\frac {V_{2}}{R_{2}}}+\cdots +{\frac {V_{n}}{R_{n}}}\right)}$
• When ${\displaystyle R_{1}=R_{2}=\cdots =R_{n}}$, and ${\displaystyle R_{\text{f}}}$ independent
${\displaystyle V_{\text{out}}=-{\frac {R_{\text{f}}}{R_{1}}}(V_{1}+V_{2}+\cdots +V_{n})\!\ }$
• When ${\displaystyle R_{1}=R_{2}=\cdots =R_{n}=R_{\text{f}}}$
${\displaystyle V_{\text{out}}=-(V_{1}+V_{2}+\cdots +V_{n})\!\ }$
• Output is inverted
• Input impedance of the nth input is ${\displaystyle Z_{n}=R_{n}}$ (${\displaystyle V_{-}}$ is a virtual ground)

### Instrumentation amplifier

Combines very high input impedance, high common-mode rejection, low DC offset, and other properties used in making very accurate, low-noise measurements

## Oscillators

### Wien bridge oscillator

Produces a very low distortion sine wave. Uses negative temperature compensation in the form of a light bulb or diode.

## Filters

Main article: Active filter

Operational amplifiers can be used in construction of active filters, providing high-pass, low-pass, band-pass, reject and delay functions. The high input impedance and gain of an op-amp allow straightforward calculation of element values, allowing accurate implementation of any desired filter topology with little concern for the loading effects of stages in the filter or of subsequent stages. However, the frequencies at which active filters can be implemented is limited; when the behavior of the amplifiers departs significantly from the ideal behavior assumed in elementary design of the filters, filter performance is degraded.

## Comparator

Main article: Comparator

An operational amplifier can, if necessary, be forced to act as a comparator. The smallest difference between the input voltages will be amplified enormously, causing the output to swing to nearly the supply voltage. However, it is usually better to use a dedicated comparator for this purpose, as its output has a higher slew rate and can reach either power supply rail. Some op-amps have clamping diodes on the input that prevent use as a comparator.[3]

## Integration and differentiation

### Inverting integrator

Main article: Op amp integrator

The integrator is mostly used in analog computers, analog-to-digital converters and wave-shaping circuits.

Integrates (and inverts) the input signal Vin(t) over a time interval t, t0 < t < t1, yielding an output voltage at time t = t1 of

${\displaystyle V_{\text{out}}(t_{1})=V_{\text{out}}(t_{0})-{\frac {1}{RC}}\int _{t_{0}}^{t_{1}}V_{\text{in}}(t)\,\operatorname {d} t}$

where Vout(t0) represents the output voltage of the circuit at time t = t0. This is the same as saying that the output voltage changes over time t0 < t < t1 by an amount proportional to the time integral of the input voltage:

${\displaystyle -{\frac {1}{RC}}\int _{t_{0}}^{t_{1}}V_{\text{in}}(t)\,\operatorname {d} t}$

This circuit can be viewed as a low-pass electronic filter, one with a single pole at DC (i.e., where ${\displaystyle \omega =0}$) and with gain.

In a practical application one encounters a significant difficulty: unless the capacitor C is periodically discharged, the output voltage will eventually drift outside of the operational amplifier's operating range. This can be due to any combination of:

• The input Vin has a non-zero DC component,
• Input bias current is non-zero,
• Input offset voltage is non-zero.[4]

A slightly more complex circuit can ameliorate the second two problems, and in some cases, the first as well.

Here, the feedback resistor Rf provides a discharge path for capacitor Cf, while the series resistor at the non-inverting input Rn, when of the correct value, alleviates input bias current and common-mode problems. That value is the parallel resistance of Ri and Rf, or using the shorthand notation ||:

${\displaystyle R_{\text{n}}={\frac {1}{{\frac {1}{R_{\text{i}}}}+{\frac {1}{R_{\text{f}}}}}}=R_{\text{i}}||R_{\text{f}}}$

The relationship between input signal and output signal is now:

${\displaystyle V_{\text{out}}(t_{1})=V_{\text{out}}(t_{0})-{\frac {1}{R_{i}C_{f}}}\int _{t_{0}}^{t_{1}}V_{\text{in}}(t)\,\operatorname {d} t}$

### Inverting differentiator

Differentiates the (inverted) signal over time.

${\displaystyle V_{\text{out}}=-RC\,{\frac {\operatorname {d} V_{\text{in}}}{\operatorname {d} t}}\,\qquad {\text{where }}V_{\text{in}}{\text{ and }}V_{\text{out}}{\text{ are functions of time.}}}$
• This can also be viewed as a high-pass electronic filter. It is a filter with a single zero at DC (i.e., where angular frequency ${\displaystyle \omega =0}$ radians) and gain. The high-pass characteristics of a differentiating amplifier (i.e., the low-frequency zero) can lead to stability challenges when the circuit is used in an analog servo loop (e.g., in a PID controller with a significant derivative gain). In particular, as a root locus analysis would show, increasing feedback gain will drive a closed-loop pole toward marginal stability at the DC zero introduced by the differentiator.

## Synthetic elements

### Inductance gyrator

Main article: Gyrator

Simulates an inductor (i.e., provides inductance without the use of a possibly costly inductor). The circuit exploits the fact that the current flowing through a capacitor behaves through time as the voltage across an inductor. The capacitor used in this circuit is smaller than the inductor it simulates and its capacitance is less subject to changes in value due to environmental changes.

This circuit is unsuitable for applications relying on the back EMF property of an inductor as this will be limited in a gyrator circuit to the voltage supplies of the op-amp.

### Negative impedance converter (NIC)

Creates a resistor having a negative value for any signal generator.

In this case, the ratio between the input voltage and the input current (thus the input resistance) is given by:

${\displaystyle R_{\text{in}}=-R_{3}{\frac {R_{1}}{R_{2}}}}$

In general, the components ${\displaystyle R_{1}}$, ${\displaystyle R_{2}}$, and ${\displaystyle R_{3}}$ need not be resistors; they can be any component that can be described with an impedance.

## Non-linear

### Precision rectifier

Main article: Precision rectifier

The voltage drop VF across the forward biased diode in the circuit of a passive rectifier is undesired. In this active version, the problem is solved by connecting the diode in the negative feedback loop. The op-amp compares the output voltage across the load with the input voltage and increases its own output voltage with the value of VF. As a result, the voltage drop VF is compensated and the circuit behaves very nearly as an ideal (super) diode with VF = 0 V.

The circuit has speed limitations at high frequency because of the slow negative feedback and due to the low slew rate of many non-ideal op-amps.

### Logarithmic output

• The relationship between the input voltage Vin and the output voltage Vout is given by:
${\displaystyle V_{\text{out}}=-V_{\text{T}}\ln \left({\frac {V_{\text{in}}}{I_{\text{S}}\,R}}\right)}$
where IS is the saturation current and VT is the thermal voltage.
• If the operational amplifier is considered ideal, the inverting input pin is virtually grounded, so the current flowing into the resistor from the source (and thus through the diode to the output, since the op-amp inputs draw no current) is:
${\displaystyle {\frac {V_{\text{in}}}{R}}=I_{\text{R}}=I_{\text{D}}}$
where ID is the current through the diode. As known, the relationship between the current and the voltage for a diode is:
${\displaystyle I_{\text{D}}=I_{\text{S}}\left(e^{\frac {V_{\text{D}}}{V_{\text{T}}}}-1\right).}$
This, when the voltage is greater than zero, can be approximated by:
${\displaystyle I_{\text{D}}\simeq I_{\text{S}}e^{\frac {V_{\text{D}}}{V_{\text{T}}}}.}$
Putting these two formulae together and considering that the output voltage is the negative of the voltage across the diode (Vout = −VD), the relationship is proven.

This implementation does not consider temperature stability and other non-ideal effects.

### Exponential output

• The relationship between the input voltage ${\displaystyle V_{\text{in}}}$ and the output voltage ${\displaystyle V_{\text{out}}}$ is given by:
${\displaystyle V_{\text{out}}=-RI_{\text{S}}e^{\frac {V{\text{in}}}{V_{\text{T}}}}}$

where ${\displaystyle I_{\text{S}}}$ is the saturation current and ${\displaystyle V_{\text{T}}}$ is the thermal voltage.

• Considering the operational amplifier ideal, then the negative pin is virtually grounded, so the current through the diode is given by:
${\displaystyle I_{\text{D}}=I_{\text{S}}\left(e^{\frac {V_{\text{D}}}{V_{\text{T}}}}-1\right)}$

when the voltage is greater than zero, it can be approximated by:

${\displaystyle I_{\text{D}}\simeq I_{\text{S}}e^{\frac {V_{\text{D}}}{V_{\text{T}}}}.}$

The output voltage is given by:

${\displaystyle V_{\text{out}}=-RI_{\text{D}}.\,}$

## Other applications

1. ^ If you think of the left-hand side of the relation as the closed-loop gain of the inverting input, and the right-hand side as the gain of the non-inverting input, then matching these two quantities provides an output insensitive to the common-mode voltage of ${\displaystyle V_{1}}$ and ${\displaystyle V_{2}}$.