# Finding transfer function of a compensator circuit similar to a type 2 compensator topology

I know how to find transfer functions of op-amp circuits using equations derived from using Kirchhoff's current law (nodal analysis), and normally I don't have any problems solving them. However, I came across a design of a circuit that very closely resembles a type 2 compensator, with one difference - there's an extra resistor between the voltage divider and the feedback impedance.

This circuit is used in a switching regulator, so Vout is fed to further electronics internal to the IC, and Vin is the regulated output voltage feedback of the system.

simulate this circuit – Schematic created using CircuitLab

When I use nodal analysis to solve this circuit, I always end up with an extra constant term in the equation, making me unable to get a Vout/Vin relationship.

The simplest equation I can get looks like this:

$$\left(\frac{V_{in}}{R_1}\right)+V_x\left(\frac{1}{R_3}-A\left(\frac{Z_f+R_3}{Z_f}\right)\right)=-AV_{out}$$

where

$$A=\frac{R_0R_1+R_1R_3+R_0R_3}{R_0R_1R_3}$$

and where Zf is the feedback impedance consisting of C1, C2, and R1.

The problem I encounter is with the Vx term. I'm not sure how to get the transfer function Vout/Vin from this equation. In a normal type 2 compensator, R3 isn't there. My algebra might be off a bit, but I double checked a few times and don't see any problems. Even if the algebra was off somewhere, I expect Vx would still show up.

I suspect R3 plays into the input resistance, which is normally determined only by R1 in a typical type 2 compensator, but I cannot be sure that the resistance for the compensator would simply be R1+R3. In the past, I've designed type 2 compensators that utilize a voltage follower between Va and R3 so you can adjust the input resistance without having to tweak the other side of the voltage divider, but while similar, this design forgoes the follower.

Any help would be greatly appreciated. And, to be clear, this isn't a homework problem.

• R0//R1+R3 can be lumped together or not depends on drivers. The purpose may be to pullup and down the open drain phase detector charge pumps and if so that the driver is a switch and the R0//R1 changes Req/d with duty cycle thus integration gain reduces with phase error. so denominator part of gain is R0//R1 /d + R3 where d is %phase error and duty cycle. Not a linear type but faster capture and slower on lock Feb 2, 2017 at 21:56

A contribution: Using the Thevenin's Theorem it is possible to transform the circuit to a simpler one:

Using the superposition principle, the output $V_{out}$ is:

$$V_{out}=\left [ 1 + \frac{Z_f(R_1+R_0)}{R_0R_1+R_0R_3+R_1R_3}\right ]V_{ref} - \frac{Z_fR_0}{R_0R_1+R_0R_3+R_1R_3}V_{in}$$

You can't get a transfer function in closed form relating $V_{out}$ and $V_{in}$. This situation is similar to what happens in control systems, when the plant has two inputs: Reference and disturbance. In that case, the principle of superposition can be used, resulting in two separate transfer functions: one relating the output to the reference input and the other relating the output to the disturbance input.

However, assuming that $V_{ref}$ is constant, a transfer function related to input with the output can be obtained, considering the ratio between the variations of these quantities (linear relationship):

$$\frac{\Delta V_{out}}{\Delta V_{in}} = G_1$$

where:

$$G_1 = - \frac{Z_fR_0}{R_0R_1+R_0R_3+R_1R_3}$$

• That makes sense - Vref is indeed constant as you said (2.5V), and I need to find the relation of Vout with respect to Vin. Since Vref isn't changing at all, it doesn't play into the relation between Vin and Vout. Would it be correct to say Vref does not affect the stability of the system because it does not change with respect to the input? Ultimately I'm trying to generate Bode plots to look at phase and gain margins. In general, can I use the superposition principle and remove all constant voltages and generate TFs in this way? It's been a few years since I took my controls classes. Feb 3, 2017 at 14:14
• Correct. Regarding to stability, the frequency response will be equivalent to circuit AC analysis (no DC bias). Feb 3, 2017 at 14:54
• Dirceu, thanks so much. Another way that helps me think about it is picturing a simple closed-loop control system. I'm only trying to find the transfer function of the compesator, not of the entire closed loop system; putting Vref into the equation won't give me the transfer function of the compensator by itself. I'm going to go back and review my controls notes, it's been too long and I've grown too dependent on topologies I've already solved. Feb 3, 2017 at 16:11

This circuit represents a type 2 compensator, featuring a zero and an origin pole. I can obtain its ac transfer function using Thévenin as previously detailed:

$R_{th}=R_0||R_1$

$Z_1(s)=(R_2+\frac{1}{sC_2})||(\frac{1}{sC_1})$

$G(s)=-\frac{R_0}{R_0+R_1}\frac{Z_1(s)}{R_{th}+R_3}$

If you develop, you will obtain a moderately-complicated high-entropy expression: you won't see where the gain, poles and zeros are located and trying to express the result in a clear and ordered form will require some extra energy. However, nothing insurmountable here. If you do the maths ok and rearrange, you should get

$G(s)=-\frac{R_0}{C_1+C_2}\frac{1+sR_2C_2}{s(R_0(R_1+R_3)+R_1R_3)(1+sR_2\frac{C_1C_2}{C_1+C_2})}$

We can also determine this transfer function using Fast Analytical Circuits Techniques or FACTs especially if we want to consider a non-infinite open-loop gain that I call $A_{OL}$. I start by calculating the dc transfer function for $s=0$ which means I open all capacitors:

$G_0=-A_{OL}\frac{R_0}{R_1+R_0}$

Then, I will determine the resistance "seen" from capacitor $C_1$ while $C_2$ is open (that will give me $\tau_1$) and the resistance "seen" from capacitor $C_2$ while $C_1$ is open (that will give me $\tau_2$). I can determine these resistances by installing a current source $I_T$ over the connecting terminals of $C_1$ and determine the voltage $V_T$ across the current source. The ratio of $V_T$ over $I_T$ will give me the resistance I need. If I do that properly, I should find:

$\tau_1=C_1((R_3+R_1||R_0)(1+A_{OL})$

$\tau_2=C_2((R_3+R_1||R_0)(1+A_{OL})+R_2)$

Adding these two time constants gives $b_1=\tau_1+\tau_2$

I will now determine the resistance "seen" from capacitor $C_2$ when $C_1$ is placed in its high-frequency state (a short circuit). This resistance is simply $R_2$. The second-order coefficient is then determined by

$b_2=\tau_1\tau_{12}=C_1((R_3+R_1||R_0)(1+A_{OL})R_2C_2$

The denominator $D(s)$ is then equal to $D(s)=1+sb_1+s^2b_2$. The numerator is immediately found by inspection: what condition in the transformed circuit (in which caps are replaced by their impedance definitions) would prevent the excitation from producing a response? Otherwise stated, when $V_{in}$ is tuned to the zero frequency, what condition can produce a so-called output null $V_{out}=0\;V$? If the branch made of $C_2$ and $R_2$ is a transformed short circuit. In other words, the root of this series impedance is $s_z=-\frac{1}{R_2C_2}$. This is it, we have our transfer function including the impact of the op amp open-loop gain equal to:

$G(s)=G_0\frac{1+\frac{s}{\omega_z}}{1+b_1s+b_2s^2}$

If I now consider the low-$Q$ approximation ($Q<<1$), the second-order polynomial form can be replaced by two cascaded poles placed at $1/b_1$ and $b_1/b_2$. If you develop everything, rearrange and consider $A_{OL}$ approching infinity, then you should find the following nice low-entropy form:

$G(s)=G_0\frac{1+\frac{\omega_z}{s}}{1+\frac{s}{\omega_p}}$

in which:

$G_0=-\frac{R_0}{R_0+R_1}\frac{R_2C_2}{(C_1+C_2)(R_3+R_1||R_0)}$ $\omega_z=\frac{1}{R_2C_2}$ $\omega_p=\frac{C_1+C_2}{C_1C_2R_2}$

This is truly a low-entropy form featuring an inverted zero in the numerator.

The dynamic response of this circuit is shown below

As you can see, we have an excellent agreement between the expressions.

The FACTs are truly unbeatable in terms of execution speed. You obtain a low-entropy format very quickly (a format in which you see gains, poles and zeros immediately). If you are interested - and I encourage you all to acquire this skill - please have a look at