Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Op amp circuit analysis

In the previous section, we learned how to analyze simple op amp circuits using realistic or idealized op amp models. In this section, we will build on that knowledge to analyze more complicated op amp circuits.

Ideal op amp circuit analysis

All the circuits in this section use negative feedback, so we assume the ideal op amp assumptions hold. As a reminder, the op amp has three terminal:

Ideal op amp with input and output terminals labeled.

Figure 1:Ideal op amp with input and output terminals labeled.

The ideal op amp assumptions are:

Iin=0(no input current)V+=V(equal input voltages)\boxed{\begin{aligned} I_\textsf{in} &= 0 &&\textsf{(no input current)} \\ V_+ &= V_- &&\textsf{(equal input voltages)} \end{aligned}}

We wrote the currents and voltages with upper-case letters because we will be using the impedance method to analyze circuits from now on.

Let’s take a look at some common op amp circuits, starting with amplifiers.

Example: non-inverting amplifier

A non-inverting amplifier circuit is shown below.

Non-inverting amplifier circuit.

Figure 2:Non-inverting amplifier circuit.

To analyze the circuit, we first label the nodes. Let the voltage at the inverting input terminal be VAV_A, and let the current through resistors R1R_1 and R2R_2 be II (the same current flows through both resistors since no current flows into the op amp input terminal). We now write the constitutive equations for the circuit elements and for the op amp:

VA=R1I(Resistor R1)VoutVA=R2I(Resistor R2)VA=Vin(ideal op amp assumption)\begin{aligned} V_A &= R_1 I &&\textsf{(Resistor $R_1$)} \\ V_\textsf{out}-V_A &= R_2 I &&\textsf{(Resistor $R_2$)} \\ V_A &= V_\textsf{in} &&\textsf{(ideal op amp assumption)} \end{aligned}

We have three equations and three unknowns: VAV_A, II, and VoutV_\textsf{out}. We can first eliminate VAV_A by substituting VinV_\textsf{in} for VAV_A in the first two equations:

Vin=R1IVoutVin=R2I\begin{aligned} V_\textsf{in} &= R_1 I\\ V_\textsf{out}-V_\textsf{in} &= R_2 I \end{aligned}

Next, we can solve the first equation for II and substitute it into the second equation:

VoutVin=R2R1Vin\begin{aligned} V_\textsf{out}-V_\textsf{in} &= \frac{R_2}{R_1} V_\textsf{in} \end{aligned}

Finally, we can solve for VoutV_\textsf{out}:

Vout=(1+R2R1)Vin\boxed{V_\textsf{out} = \left(1 + \frac{R_2}{R_1}\right) V_\textsf{in}}

This circuit amplifies the input voltage by a factor of 1+R2R11 + \frac{R_2}{R_1}. Of course, we remain limited by the op amp’s supply voltages, so the output voltage cannot exceed those limits.

Picking R1R_1 and R2R_2 appropriately allows us to set the gain of the amplifier to any desired value greater than or equal to 1. If we want a gain between 0 and 1, we can use a buffered voltage divider circuit such as the one shown in the previous section in Figure 8 (right) but with two different resistor values.

Example: inverting amplifier

If we want to amplify and invert a signal, we can use an inverting amplifier circuit such as the circuit shown below.

Inverting amplifier circuit.

Figure 3:Inverting amplifier circuit.

We can analyze this circuit using the same approach as before. Label the voltages and currents as before and write the constitutive equations:

VinVA=R1I(Resistor R1)VAVout=R2I(Resistor R2)VA=V+(ideal op amp assumption)V+=0(non-inverting terminal grounded)\begin{aligned} V_\textsf{in} - V_A &= R_1 I &&\textsf{(Resistor $R_1$)} \\ V_A - V_\textsf{out} &= R_2 I &&\textsf{(Resistor $R_2$)} \\ V_A &= V_+ &&\textsf{(ideal op amp assumption)} \\ V_+ &= 0 &&\textsf{(non-inverting terminal grounded)} \end{aligned}

The last two equations force VA=0V_A=0. In such situations, we call node AA a virtual ground. This is different from simply grounding node AA, since here we can do it without drawing any current from ground. Eliminating II as before and solving for VoutV_\textsf{out} gives:

Vout=R2R1Vin\boxed{V_\textsf{out} = -\frac{R_2}{R_1} V_\textsf{in}}

This time, picking R1R_1 and R2R_2 appropriately allows us to set the gain of the amplifier to any negative value, again subject to the limits imposed by the op amp’s supply voltages.

Example: more complex amplifier

We can also analyze more complex op amp circuits once we recognize the basic building blocks. Consider the following circuit.

More complex amplifier circuit.

Figure 4:More complex amplifier circuit.

Our goal is twofold:

  1. Find an expression relating the output voltage VoutV_\textsf{out} to the input voltage VinV_\textsf{in}

  2. Interpret the behavior of the circuit when R2R_2 is disconnected.

Solution: To analyze this circuit, we could apply our usual approach: label all the node voltages and branch currents, write the constitutive equations for each element, write KCL at all junctions, and solve the resulting system of equations.

However, we can simplify our work by making some observations.

  1. The resistor RgR_g can be ignored because no current flows into the non-inverting input terminal, so no current flows through RgR_g. Thus, there is no voltage drop across RgR_g, and it’s as if the non-inverting input terminal is directly connected to ground.

  2. We can now see that the rest of the circuit is just an inverting amplifier, where the feedback impedance is (CR2)(C \parallel R_2) and the input impedance is R1R_1.

Combining these observations, we have the following equivalent circuit.

More complex amplifier of  with aggregated impedances.

Figure 5:More complex amplifier of Figure 4 with aggregated impedances.

And now we can directly apply the inverting amplifier formula from (8):

Vout=Z2Z1=(1R1Cs+1R2)Vin\boxed{V_\textsf{out} = -\frac{Z_2}{Z_1} = -\left(\frac{\frac{1}{R_1}}{Cs + \frac{1}{R_2}}\right) V_\textsf{in}}

We can also write the formula above as a differential equation by multiplying it out and recognizing that multiplication by ss corresponds to differentiation in the time domain:

Cv˙out+1R2vout=1R1vinC\, \dot v_\textsf{out} + \frac{1}{R_2}v_\textsf{out} = -\frac{1}{R_1} v_\textsf{in}

Now to answer the second part of the question, we consider what happens when we disconnect R2R_2. This is the same as taking R2R_2 \to \infty, so the ODE simplifies to:

Cv˙out=1R1vinC\, \dot v_\textsf{out} = -\frac{1}{R_1} v_\textsf{in}

Or, written another way:

vout(t)=1R1C0tvin(τ)dτv_\textsf{out}(t) = - \frac{1}{R_1 C} \int_0^t v_\textsf{in}(\tau) \, \dd\tau

In other words, this circuit is an inverting integrator!

Cascaded op amp circuits

We can also analyze circuits with multiple op amps connected in series (cascaded). Consider the following circuit.

Cascaded op amp circuit.

Figure 6:Cascaded op amp circuit.

The first step is recognizing that each op amp stage is just an inverting amplifier with impedances. Thus, we can analyze each stage separately using the formula from (8). Let’s start by aggregating the impedances in each stage. We will also label the intermediate voltage between the two stages as VAV_A.

Cascaded op amp circuit of  with aggregated impedances.

Figure 7:Cascaded op amp circuit of Figure 6 with aggregated impedances.

Since we have two inverting amplifier stages, we can write:

VA=Z2Z1Vin(first stage)Vout=Z4Z3VA(second stage)\begin{aligned} V_A &= -\frac{Z_2}{Z_1} V_\textsf{in} &&\textsf{(first stage)} \\ V_\textsf{out} &= -\frac{Z_4}{Z_3} V_A &&\textsf{(second stage)} \end{aligned}

Where the impedances are:

Z1=1C1s+1R1,Z2=1C2s+R2,Z3=R3,Z4=R4\begin{aligned} Z_1 &= \frac{1}{C_1 s + \frac{1}{R_1}}, & Z_2 &= \frac{1}{C_2 s} + R_2, & Z_3 &= R_3, & Z_4 &= R_4 \end{aligned}

Substituting the first stage equation into the second stage equation gives:

Vout=(Z4Z3)(Z2Z1)Vin=(1C2s+R2)R4(1C1s+1R1)R3VinV_\textsf{out} = \left(-\frac{Z_4}{Z_3}\right) \left(-\frac{Z_2}{Z_1} \right)V_\textsf{in} \\ = \frac{\left(\frac{1}{C_2 s} + R_2\right) R_4}{\left(\frac{1}{C_1 s + \frac{1}{R_1}}\right) R_3} V_\textsf{in}

which simplifies to:

Vout=R4(R1C1s+1)(R2C2s+1)R1R3C2sVin\boxed{V_\textsf{out} = \frac{R_4 (R_1C_1 s+1) (R_2C_2 s+1)}{ R_1 R_3 C_2s} V_\textsf{in}}

Another way to write this is in terms of the transfer function from input to output:

VoutVin=(VAVin)(VoutVA)\frac{V_\textsf{out}}{V_\textsf{in}} = \left(\frac{V_A}{V_\textsf{in}}\right) \left(\frac{V_\textsf{out}}{V_A}\right)

When we know the transfer function for each stage of the cascade, we can multiply them together to get the overall transfer function.


Test your knowledge

Solution to Exercise 1 #

We begin by labeling any relevant node voltages and branch currents. Since no current can flow in or out of the op amp input terminals, the capacitor and R1R_1 share the same current, as do the two resistors R2R_2 and R3R_3. Here is our labeled circuit:

Op amp circuit from  with annotated currents .

Figure 11:Op amp circuit from Figure 10 with annotated currents .

Next, we write the constitutive equations for each element and for the op amp:

VinV+=1CsI1(capacitor C)V+=R1I1(resistor R1)VoutV=R2I2(resistor R2)V=R3I2(resistor R3)V+=V(ideal op amp)\begin{aligned} V_\textsf{in} - V_+ &= \frac{1}{Cs} I_1 &&\textsf{(capacitor $C$)} \\ V_+ &= R_1 I_1 &&\textsf{(resistor $R_1$)} \\ V_\textsf{out} - V_- &= R_2 I_2 &&\textsf{(resistor $R_2$)} \\ V_- &= R_3 I_2 &&\textsf{(resistor $R_3$)} \\ V_+ &= V_- &&\textsf{(ideal op amp)} \end{aligned}

We have five equations and five unknowns: V+V_+, VV_-, I1I_1, I2I_2, and VoutV_\textsf{out}. We can first eliminate V+V_+ and VV_- by substituting the second and fourth into the remaining equations:

Vin=(1Cs+R1)I1Vout=(R2+R3)I2R1I1=R3I2\begin{aligned} V_\textsf{in} &= \left( \frac{1}{Cs} + R_1 \right) I_1 \\ V_\textsf{out} &= \left( R_2 + R_3 \right) I_2 \\ R_1 I_1 &= R_3 I_2 \end{aligned}

Dividing the second equation by the first and substituting the third equation gives:

VoutVin=(R2+R3)I2(1Cs+R1)I1=(R2+R3)(1Cs+R1)R1R3\frac{V_\textsf{out}}{V_\textsf{in}} = \frac{(R_2 + R_3) I_2}{\left( \frac{1}{Cs} + R_1 \right) I_1} = \frac{(R_2 + R_3)}{\left( \frac{1}{Cs} + R_1 \right)} \cdot \frac{R_1}{R_3}

Simplifying, we obtain our final answer:

VoutVin=R1(R2+R3)CsR3(R1Cs+1)\boxed{\frac{V_\textsf{out}}{V_\textsf{in}} = \frac{R_1 (R_2 + R_3) Cs}{R_3 (R_1 Cs + 1)}}

Although this circuit isn’t a standard amplifier configuration, its output VoutV_\textsf{out} is connected to the output of the op amp, so if we wanted to drive a load, we could do so without affecting the transfer function. In other words, if we cascaded several such stages, the overall transfer function would simply be the product of the individual transfer functions.