# How to solve the transfer function for this OP-AMP circuit?

I've came across the circuit below in EDN. This circuit is a "DC Offset Compensator" according to the article. It is used in an ultrasonic sensor circuit which requires self-adjustment to the level of an AC input signal. Also, this circuit accommodates the signal's unknown and variable DC bias voltage.

IC1 is a single supply, high input impedance, rail-to-rail input, rail-to-rail output dual operational amplifier.

I've tried to simulate this circuit using LTSpice, with LTC6241. However, the output stays the same as $V_{REF}$. Below is my spice netlist.

I have tried to solve the circuit using below equation, the general equation of operational amplifiers, however it gets too messy too soon.

$V_{Out}=A_{OL}*(V^{+}-V^{-})$

Can you, with details, explain me how to solve the transfer function of this circuit? SPICE Netlist:

XU1 N001 N004 0 Vcc N002 LTC6241
XU2 N002 N005 0 Vcc N003 LTC6241
R1 N005 ss 1.5k
R2 N003 N005 43k
R3 N004 N003 100k
R4 Vcc N001 1k
R5 N001 0 1k
C1 N002 N004 1µ
V1 Vcc 0 5
V2 Signal 0 SINE(1.25 1 40k)
V3 ss 0 AC 1
.ac oct 100 1 1Meg
.lib LTC4.lib
.backanno
.end


I'll use the opamp's pin numbers to name voltages.

$\begin{cases} V_6 = \dfrac{R3}{R3+R4} (V_O - V_{IN}) + V_{IN} \\ \\ \\ V_O - V_2 = I_{R2} R2 \\ \\ \\ I_{R2} = j \omega \text{ } C1 (V_2 - V_5) \end{cases}$

The opamps will regulate their output so that $V_6 = V_5$ and $V_2 = V_{REF}$. Then, solving for $V_O$:

$V_O = \dfrac{(R3 + R4)(1 + j \omega \text{ } C1 R2) \text{ } V_{REF} + j \omega \text{ } C1 R2 (2 R3 + R4) \text{ } V_{IN}}{(R3 + R4) + j \omega \text{ } C1 R2 R3}$

or

$V_O = \dfrac{j \omega \text{ } C1 R2 (2 R3 + R4)}{(R3 + R4) + j \omega \text{ } C1 R2 R3} V_{IN} +\dfrac{(R3 + R4)(1 + j \omega \text{ } C1 R2)}{(R3 + R4) + j \omega \text{ } C1 R2 R3} V_{REF}$

Filling in the component values:

$V_O = \dfrac{j \omega \text{ } 4600 \text{ } \Omega s}{44500 \text{ } \Omega + j \omega \text{ } 150 \text{ } \Omega s} V_{IN} +\dfrac{44500 \text{ } \Omega + j \omega \text{ } 4450 \text{ } \Omega s}{44500 \text{ } \Omega + j \omega \text{ } 150 \text{ } \Omega s} V_{REF}$

• but why did you write those equations? :) – madrivereric Jun 16 '12 at 15:16
• @madrivereric - He did ask for the transfer function, didn't he? – stevenvh Jun 16 '12 at 15:20
• Thanks for the great answer! That was exactly what I was struggling for. Great to see and -with the explaining of @madrivereric, understand that it is safe to assume $V^+=V^-$. My Op-Amp analysis will be easier from now on! – abdullah kahraman Jun 17 '12 at 17:13

I've tried to simulate this circuit using LTSpice, with LTC6241. However, the output stays the same as VREF. ... Can you, with details, explain me how to solve the transfer function of this circuit?

The DC level of the output should be the same as Vref, by design.
The output AC level should be ~= 27 x Vin_AC.
Vin_DC should not affect the output signal.

For practical purposes the gain is G = (R4 + R3) / R3 = 29.666r ~= 27
This is all provided by IC1b

A notional but not actual complication is added by IC1a which is an integrator with a "corner frequency of 2.Pi.R2.C1 ~= 0.5 hZ. It compares the output DC level of IC1b with Vref and adjusts the DC level on IC1b's non-inverting input so that IC1b DC output = Vref.

Also, this circuit accommodates the signal's unknown and variable DC bias voltage.

This DC adjusting feature which is provided by IC1a will have essentially zero effect on the gain at ultrasonic frequencies.

From their description what it actually does is not clear. IC1a causes the ouput AC signal to have a mean DC level equal to the DC level set by trim-pot R1.

Operation:

Input is an ultrasonic AC signal with a DC offset from ground.

DC component:

IC1a+ is set to a DC level = Vref by R1.
This level is compared to the DC level in IC1b-.
If IC1b- is low relative to Vref then IC1a_out will be high.
IC1b+ will be driven high, IC1b_out will go high and C1 will experience net input current via R2 until Vat IC1a- rises to equal IC1a+.
The stable end point will have IC1a- = IC1a+ = Vref.
The DC stable operating point for IC1B will be set by the voltage on IC1b+.

It is important to note that the Voltage on IC1A_out will almost always NOT equal Vref. Rather it will be adjusted so that the gain of IC1b causes its DC output to equal Vref. [Which occurs when IC1b+= Vin + Vref/gain]

AC component

IC1b acts as a standard inverting amplifier with gain = (R4+R3)/R3.
The integrator = low pass filter formed by IC1a will try to track the Ac signal but as F_ultrasonic >>> time constant R2 x C1, the output of IC1a is essentially unaffected by ultrasonic AC.

@Russell nicely explained the function of the circuit and @stevenvh clearly wrote the equations needed find the transfer function; however, he didn't explain why he used those equations. The op-amp transfer function you tried to use, while correct and true, is not very helpful.

Op-amp circuits can be very easy to solve if you assume that they are operating as ideal or near-ideal op amps and there is negative feedback present. This is usually a very safe assumption in practical, functioning circuits. As expected, it is true in this case (C1 (ac only) for opamp 1, R4 for op amp 2; & R2 provides feedback for the cascade).

1. Write a node (KCL) equation at all nodes, except for op-amp output terminals
2. Apply the Ideal Op-Amp Assumptions to the system of equations to simplify them. These assumptions are:
• Assumption 1: The op-amp input current is zero, i.e. $i^-=0$ and $i^+=0$
• Assumption 2: There is zero voltage between the input terminals, i.e. $v^-=v^+$
3. Solve the system of equations
4. Check for saturation by confirming the output voltage for each op-amp is within its power supply range.

@stevenh wrote a single equation for opamp2's negative input and his remaining equations are for opamp1. The op-amp assumptions were incorporated when he wrote those equations.

• [service message] The "@" in front of a user name has no function in questions or answers, only in comments. You use them to notify a user of your comment, but it only works for users who already commented themselves on that answer. The answerer gets automatically notified. – stevenvh Jun 16 '12 at 16:35
• Thanks for the additional info. I know that it is really easy to solve this circuit applying Ideal Op-Amp Assumptions, however, I didn't know that Assumption 2 was safe to use in practical circuits. What are the places that is not safe? – abdullah kahraman Jun 17 '12 at 17:11
• When the op amp saturates the input voltages may diverge since it is no longer able to make the input voltages equal. Depending on how hard the op amp is saturated, the voltages may still be "close enough" that the analysis is still useful. Other cases include bad op-amps, wiring/construction errors, etc. – madrivereric Jun 18 '12 at 1:42