# Frequency Response of Ideal and Real Type III Compensator

I'm trying to develop a Buck Converter with a Voltage-Mode Control, using a Type III Compensator, just like the one below.

So I calculated its transfer function, and then with the correct values of poles and zeros I calculated the values of the passive components, to get the expected frequency response. My problem is: When I simulate the circuit in LTspice using an ideal and real (OP27 by Analog Devices) Op. Amp., this is the magnitude response that I get.

I'm not understanding why the gain at low frequencies is dropping so much. Why is the real circuit not behaving like the ideal one?

Vout1 is the output of ideal of the ideal one and Vout3 is the output of the real one. In the first image, Vout' is actually the input of the compensator and $$\V_c\$$ its output. So in the graph, it should be vc1 and vc3, but I think now it became clear.

Here are the schematics:

• Nobody understand except you what Vout3 or Vout1 is. Also, you should show your LTSpice schematics for ideal and actual op-amps. Please try and be as clear as you can. Feb 27, 2022 at 14:31
• Sorry about that, just made the correction :) The schematics is just equal to the image in the first picture. The only difference is that first I used a ideal opamp and then a real one. The question is not about the simulation, but actually about what's happening in the real circuit that is making it difference from the theory. Feb 27, 2022 at 14:39
• Show the LTSpice schematics you used please. I did ask for that earlier. It's irrelevant that you think they are not needed. Make sure all power supplies are visible and clear. Please show all the values of components. Feb 27, 2022 at 14:42
• I think it is always the same problem. People forget about the bias point which they should always check before considering SPICE results. I am quite sure the OP27 is railing up or down and that is the reason why you don't have the correct response. Please check my answer and implement the correct biasing circuit. Also, be aware that you are pushing crossover quite high and the OP27 own ac response will influence the Bode plot. Feb 27, 2022 at 15:40
• @LuizGustavoMartins The ideal opamp that you're using, U1, is just a VCCS plus a parallel RC underneath. It will work for mV, GV, anywhere, flawlessly. Try using UniverslOpamp[2,3a,3b] for better results. Those will be influenced by inappropriate biasing. Feb 28, 2022 at 16:38

I'm not understanding why the gain at low frequencies is dropping so much. Can anyone explain me why the real circuit is not behaving like the ideal one? Thanks a lot in advance.

The OP-27 is not noted for it's low supply operation. You have set it to run with +/- 3 volts but the minimum recommended by TI is +/- 4 volts: -

I'm not saying that there aren't other problems; this one is clearly a problem and quite possibly, the simulation model is also getting affected at low supply rails.

Consider this at a slightly deeper level: -

You already have a +1 volt offset on VREF so you are at the limit of the input voltage range with a low supply voltage. Then, if you check the output drive capability, the data sheet states it can deliver maybe +/- 12 volts when powered with 15 volt rails. If you extend that down to a supply of +/- 3 volts, the op-amp output is stuck at 0 volts with no ability to raise or lower from that point.

When looking at op-amp-based compensators or any active filters especially those featuring a pole at the origin, I recommend setting the circuit using an auto-bias network. This additional circuit will force the op-amp output to be within its operating rails, e.g. a few volts where it is linear. Otherwise, without the exact input bias tweaked with a few tens of µV precision, the high open-loop gain will make the op-amp to rail up or down and mess up the ac response.

The below circuit runs on the free SIMPLIS demo version and implements an automated type 3 compensator. Enter the crossover frequency you want in the right-side window and components will be calculated to provide the expected phase boost based on k factor:

The voltage-controlled voltage source E1 provides the exact bias to the type 3 compensator so its output remains within the rails and does not saturate. As you can see below, the auto-bias delivers 12 V to maintain op-amp U2's output at 2.6 V or so and the ac response is what is expected with a wanted 10-dB gain at 10 kHz.

Always look at the bias point in a simulator and check it is meaningful. The compensator example can be downloaded from my website here and works with Elements, the free demo version.