# H(s) in closed loop transfer function incorrect?

I need some help verifying the transfer function of this amplifier circuit stage. The below circuit has a gain of 20 from the result of Rf and Rg.

Below is the nodal analysis equation where G is used to show conductance.

The problem I am having is that I have 2 transfer functions in a feedback loop. G(s) and H(s), the op amp open loop transfer function and the closed loop transfer function. When they combine in feedback loop I get a final transfer function of G(s)/(1+G(s)*H(s))

My output transfer function however seems to have gain bode plot of less than unity!

• Green curve = output transfer function
• Blue curve = G(s) op amp open loop transfer function
• Orange curve = close loop H(s)

Shouldn't the amplifier stage, well, amplify? I can clearly see that the math works out to make it less than unity gain, but how is the output voltage going to be amplified? For example: at DC the math works out to be -26dB, gain of ~1/20. Similarly, the closed loop gain is around +26dB.

When applying H(s) to G(s), in feedback it became net negative. But to apply a real voltage at the input and expect an output, let's say for 1 volt input @DC, Vi=1, Vo=ViTF -> Vo=10.05011=0.05011.

The problem here is I am missing 1/x somewhere to get the proper gain of 20. I thought the transfer function is Vo=TF*Vi not Vo=1/TF *Vi?

• What gain & phase do you want at all critical frequencies? Must define!this is trivial on Falstad’s Bode Plotter but you can compute easier with Admittance for parallel feedback to 1/Rg for gain so compute 1/Av(f) the Y(f) for each part attenuates the inverse gain. Aug 18, 2020 at 21:43
• as the net phase shifts past 90 deg it starts towards positive feedback and boosts the breakpoint gain of Green Aug 18, 2020 at 21:50
• I am sorry, I don't understand. I want a gain of 20 at most frequencies. My phase just has to be enough so that it isn't ringy-dingy. Why would the green curve (output transfer function) be under unity gain? The amplifier transfer function should amplify! Aug 18, 2020 at 22:03

I am not familiar with Mathematica.

G should be of the format $$\\frac{V3}{V1}\$$. i.e. V1 is input, V3 is output of G(s)

H should be of the format $$\\frac{V1}{V3}\$$. i.e. V3 is input and V1 is output of H(s).

However, your image seems to show that HofS1 is a function which takes V1 as input and produces V3 as output. I think that this actually represents 1/H(s).

So the line SystemsModelFeedbackConnect(..) is actually doing

$$\\frac{G(s)}{1 + G(s)\frac{1}{H(s)}} = \frac{G(s)H(s)}{H(s) + G(s)} \$$

So for large values of G(s) (below 10^7 Hz?) you may be effectively plotting H(s) which is supported by the observation that green plot and yellow plot are symmetric about 0 dB.

• This answer is trying to answer "The problem here is I am missing 1/x somewhere to get the proper gain of 20". I don't know Mathematica, so I cannot check.
– AJN
Aug 19, 2020 at 17:26
• This is the answer! I fixed this and it worked thanks again @AJN! Aug 19, 2020 at 18:33

Use a PID (or a PI controller rather:

The P is the gain term, you want this to be 20.

$$\ K_p = 20 = \frac{R_2}{R_1}\$$

The I term will be where you want the pole to be (you only get one with the PI controller with a -20db/dec rolloff)

$$\ K_I = 2\pi f = R_2 C_2 \$$

If you really do need the output non-inverted, then use another inverting stage with a gain of 1 after the first one.

• Thanks, the circuit topology is one part of an instrumentation amplifier so it needs to be noninverting. I am just not sure why the transfer function curve is below unity gain when it does amplify in a SPICE program. Aug 18, 2020 at 23:26
• If both sides of the instrumentation amplifier are not balanced it will destroy your common mode voltage range Aug 19, 2020 at 0:17
• I think I need to swap solving for V3/V1 and solve for V1/V3 since input is actually output in a feedback system! Aug 19, 2020 at 15:02
• Why are you using an inst amp for this? Aug 19, 2020 at 16:36
• I was encountering stability problems in an existing in-amp circuit. Doing the control theory analysis was my next step in order to improve gain margin Aug 19, 2020 at 18:38