# Circuit Analysis: Obtaining Close Loop OP - AMP Transfer function

Trying to figure out the Close Loop System transfer function of an op-amp, however the math isn't working out as it should.

Circuit In question:

simulate this circuit – Schematic created using CircuitLab

Using this as the foundation of calculating the Close loop transfer function:

Where A is the Transfer function (open loop) of the LM1875 which taken from the bode plot obtained here: LM1875 DataSheet. TF should be $$\ A = H(s) = \frac{31.62}{\mathrm{707*10}^{-9}*s+1}$$

Where B is the transfer function of the negative feedback $$\ B = G(s) = \frac{R2}{R1}+1 = \frac{1000k\Omega}{1000k\Omega}+1 = 2$$

The close loop Equation $$\ CL(s) = \frac{H(s)}{1+H(s)*G(s)}$$

$$\ CL(s) = \frac{\frac{31.62}{\mathrm{707*10}^{-9}*s+1}}{1+(\frac{31.62}{\mathrm{707*10}^{-9}*s+1})*(2)}$$

$$\ CL(s) = \frac{\frac{31.62}{\mathrm{707*10}^{-9}*s+1}}{1+(\frac{63.24}{\mathrm{707*10}^{-9}*s+1})}$$

$$\ CL(s) = \frac{\frac{31.62}{\mathrm{707*10}^{-9}*s+1}}{\frac{\mathrm{707*10}^{-9}*s+1}{\mathrm{707*10}^{-9}*s+1}+(\frac{63.24}{\mathrm{707*10}^{-9}*s+1})}$$

$$\ CL(s) = \frac{\frac{31.62}{\mathrm{707*10}^{-9}*s+1}}{\frac{\mathrm{707*10}^{-9}*s+1+63.24}{\mathrm{707*10}^{-9}*s+1}}$$

$$\ \require{cancel} CL(s) = \frac{31.62}{\cancel{\mathrm{707*10}^{-9}*s+1}} * \frac{\cancel{\mathrm{707*10}^{-9}*s+1 }}{\mathrm{707*10}^{-9}*s+1+63.24}$$

$$\ \require{cancel} CL(s) = \frac{31.62}{\mathrm{707*10}^{-9}*s+64.24}$$

Using FVT as $$\ S\xrightarrow{}0$$ :

$$\ \require{cancel} CL(0) = \frac{31.62}{\mathrm{707*10}^{-9}*(0)+64.24} = \frac{31.62}{64.24} = 0.4922 = DC Gain$$

Where did I go wrong? I know this is wrong as the DC gain should be around 2V/V

• Shouldn't that "plus" symbol be a "difference", instead? – Digiproc Mar 21 at 17:44
• Where? exactly? – Pllsz Mar 21 at 17:46

I believe your mistake is to assume $$\ B = G(s) = \frac{R2}{R1}+1 = \frac{1000k\Omega}{1000k\Omega}+1 = 2$$ B is actually 1/2, as it is the output voltage divided by 2, that is $$\ B = G(s) = \frac{R1}{R1+R2}$$ Where the ratio comes from the $$\R1,R2\$$ voltage divider.

With this value of B, you would obtain $$\ CL(0) = \frac{31.62}{16.81} = 1.85$$

• I am just flustered how I got the opposite transfer function for B. electronics-tutorials.ws/opamp/opamp_3.html They got the same TF as me – Pllsz Mar 21 at 17:49
• So, how did I assume the transfer function for the feedback of the non inverting amp. What is the proper approach to obtain the transfer function then – Pllsz Mar 21 at 17:53
• @Pllsz I'm not sure I understand what you are asking now. I think you just computed B to be the actual gain of your circuit, but the feedback signal is actually the voltage at the inverting input of the op amp. – xuva Mar 21 at 18:00
• Sorry, it will be kinda hard for me to explain this. Ill tell you the way how I got the B part. But I think I am starting to understand what you're trying to say. I believe I assumed B to be the close loop transfer function instead of the Open loop transfer function. Is that correct? And towards the end of your answer, wouldnt it be 16.81 instead of 15.81 as there's a + 1 in the denominator ? – Pllsz Mar 21 at 18:03
• Here we have an open-loop TF, given by A, a feedback TF, given by B, and a closed-loop TF, given by A/(1+AB). You assumed B to be the closed loop TF instead of the feedback TF (the one you call H) – xuva Mar 21 at 18:08

B is actually this:

so B is equal to

$$\ \frac{1000}{1000+1000}=1/2\$$

if the math is done with 1/2 instead of 2 for B you should get the right answer.

• Ah, I see that would fix everything. Just kinda confused. I think that Topology is different than oppose to having the op amp? Vin for the op amp is where its connected to more than one branch. Why is it the opposite? – Pllsz Mar 21 at 17:46
• The place where you have B wrong is you need to consider it like it's own network, usually this is done by "cutting" the circuit at points finding the in and out ports. A transfer function is one way, it has an in and an out point. After you cut the circuit into A and B portions and analyze them on their own, it makes sense. – laptop2d Mar 21 at 18:28
• Yeah thats how I figured it out thank you. This may sound stupid but ill try my best to explain it. When looking at B separated/isolated and have its Vin/Vo is the Vin the Vo of the op amp essentially? Just want an insanity check. – Pllsz Mar 21 at 18:31

You've got B wrong. The voltage gain (or in this case attenuation) from output to summing node is R1/(R2+R1). The equation you listed is the closed loop gain (at DC at least) for the entire system. see: https://www.electronics-tutorials.ws/opamp/opamp_3.html

I'm also surprised at the transfer function you're using for the op amp. The DC gain should be much higher than 30. If you're going by this image below, note that the gain axis is in dB, so that 30 should be more like 1000.

You have the DC gain right. I was assuming 10db/decade, not 20dB/decade as I should have for voltage gain. 10^1.5=31.6

• Even the link you provided as the exact same equation that I have in the question. Youre 100% right I am just confused how did I end up getting the opposite haha. Yeah The open loop gain is very small, maybe its due to being made targeting for audio applications – Pllsz Mar 21 at 17:48
• Can you please further explain the equation I listed what the difference is, and how does one properly obtain the transfer function – Pllsz Mar 21 at 17:54
• If you showed me the circuit you've drawn and asked for the gain (Vout/Vin) at DC, I know from the topology that it's 1+R2/R1. But you're deriving it fresh, and B is not the gain of the whole ciruit but the "gain" of the feedback network, which is really just a voltage divider with a "gain" of 1/2. Stop doing complex math and just think "what voltage needs to be on the output for the inverting node to equal the non-inverting node?" As far as the op-amp transfer function, do you really need the whole transfer function? The corner frequency is at ~200kHz, and this is an audio amplifier. – miles60 Mar 21 at 18:08
• I see, well I guess I am sorry trying to figure out things. I guess I don't really anything could just copy paste op amp equations, but I want reinforce my understanding as you can clearly see it isn't where I wanted it to be. After this I can say I definitely learn something which is worth it for me. – Pllsz Mar 21 at 18:14
• You're right on the DC gain being 31. I was mistaking power dB (10dB per decade) for voltage db (20dB per decade). – miles60 Mar 21 at 18:14

As others have stated, the fundamental flaw is in the feedback gain which is 1/2, not 2. However, I believe there's also a small error in the closed-loop equation. Let's try to derive it from the circuit above. Note, the feedback is attached to the inverting input of the op amp so there is a differencing block at the input, not summing. First, start at the output which I will label Y, and then follow it through the loop. The input is labeled X.

Output: $$Y$$ Negative feedback gain: $$BY$$ Input to the op amp: $$X-BY$$ Output of the op amp: $$A(X-BY)$$ Which is also equal to the output: $$A(X-BY)=Y$$ Now we have the loop equation. Next, derive the closed-loop gain as Output divided by Input: $$AX - ABY = Y$$ $$AX = Y + ABY$$ $$H = \frac{Y}{X} = \frac{A}{1+AB}$$ $$H = \frac{Y}{X} = \frac{A}{AB+1}$$ Let's calculate B first. If we assume that the input impedance of the op amp's inverting input is much, much larger than the impedance of the resistor feedback network, we can ignore any current draw it has from the feedback network. Larger means at least 10 times, but preferable 100 time or more. That would be about 100kΩ which I'm sure is smaller than the value on the datasheet. In that case, the current through both resistors is identical. We calculate the voltage drop of each path over it's total resistance. I will call the midpoint V and the ground point 0 in the following. The feedback gain B will be the output at the midpoint V divided by the input which happens to be Y in this system: $$\frac{V - 0}{R2} = \frac{Y - 0}{R1 + R2}$$ $$\frac{V}{R2} = \frac{Y}{R1 + R2}$$ $$V = \frac{R2}{R1 + R2}Y$$ $$B = \frac{V}{Y} = \frac{R2}{R1 + R2}$$ $$B = \frac{1kΩ}{1kΩ + 1kΩ} = \frac{1}{2} = 1/2$$ One goal of any good op amp is to have a very, very large open-loop gain which we represent by A. To simplify the equation, we can take the limit as A approached infinity to find the ideal gain of our system: $$lim_{A\to\infty} H = \frac{A}{AB+1} = \frac{A}{AB} = \frac{1}{B}$$ Since AB >> 1, we can drop the + 1 and with B being 1/2, H is 2 as the open-loop gain approaches infinity. Now, you care about the non-ideal op amp where A is less than infinity. Let's just see what happens if A is only 10: $$lim_{A\to10} H = \frac{A}{AB+1} = \frac{10}{10(1/2)-1} = \frac{10}{5+1}$$ $$lim_{A\to10} H = \frac{10}{6} = 5/3 \approx 1.67$$ Our actual gain drops. Put in the number from your datasheet here to find your expected gain which should be close, but slightly smaller than 2. Also, this still assumes an infinite input impedance on the op amp. That will affect the feedback gain B and should be accounted for to get a more accurate calculation. Hopefully, this helps clear up the confusion.