Type-III compensator design tutorial
Ming Sun / December 08, 2022
28 min read • ––– views
Type-III compensator - OTA based
Fig. 1 shows a Type-III compensator, where an OTA is being used. Different than the Opamp case, Type-III compensator implemented by OTA does not have local feedback loop[1]. Type-III compensator can be used to boost the phase margin for voltage-mode controlled switching regulators.
Where,
- R1 and R2 is the feedback resistor
- R3 and C3 is part of the compensation network of Type-III compensator
- Vref is the input referent voltage for EA (error amplifier)
- ro is the output impedance of the EA
- R4, C4 and C5 is part of the compensation network of Type-III compensator
Fig. 1 can be rearranged to be two groups. One group is the feedback network and another group is the Type-II compensator. Here in the AC analysis, we can assume the contant DC voltage source vref to be AC ground as shown in Fig. 2.
The transfer function of Type-III compensator is defined as:
Feedback network transfer function derivation - H1(s)
The feedback network transfer function is defined as:
The Matlab script used to derive H1(s) is as shown below.
clc; clear; close all;
syms s R1 R2 R3 C3
syms Vout Vfb H1
eqn1 = (Vout-Vfb)/R1 + (Vout-Vfb)/(R3+1/s/C3) == Vfb/R2;
eqn2 = H1 == Vfb/Vout;
results = solve(eqn1,eqn2,[Vfb,H1]);
H1 = simplify(results.H1)
The derived result of H1(s) is as shown in Fig. 3.
Next, we can use wxMaxima to simplify the result as shown in Fig. 4.
From Fig. 4, we have:
As a designer, we have the freedom to choose the resistor and capacitor values for Eq. 3. Here we can choose a value so that:
Therefore, Eq. 3 can be simplified as:
Then we can factor out the DC term as:
Or,
The pole and zero location can be calculated as:
The zero is at lower frequency than the pole frequency. As a result, we can achieve some amount of phase boost by H1(s). To gain the maximum phase boost, it is preferred that R1 is chosen to be much greater than R2. However, there is a drawback. The feedback divider ratio is typically determined by the VOUT and Vref. Once VOUT and Vref are chosen, we do not really have too much freedom to modify the phase boost here through H1(s).
The Matlab script used for sweeping capacitor C3 is as shown below.
clc; clear; close all;
Vout = 1.8;
Vref = 1.2;
Rtot = 1e6;
C3 = [10e-12, 100e-12, 1e-9];
ratio = Vref/Vout;
R2 = Rtot*ratio;
R1 = Rtot*(1-ratio);
Rpar = R1*R2/(R1+R2);
s = tf('s');
for i=1:1:length(C3)
H1 = R2/(R1+R2)*(1+s*R1*C3(i))/(1+s*Rpar*C3(i));
h = bodeplot(H1); % Plot the Bode plot of H1(s)
setoptions(h, 'FreqUnits', 'Hz'); % change frequency scale from rad/sec to Hz
set(findall(gcf,'type','line'),'linewidth',2)
grid on;
hold on;
end
legend("C3=10pF","C3=100pF","C3=1nF")
Fig. 5 shows the H1(s) Bode plot for different C3.
From Fig. 6, we can easily tell that once the feedback resistor ratio is fixed, the amount of phase boost we can achieved for H1(s) is pretty much fixed. Changing compensation capacitor C3 value does not change the phase boost amount. Instead, it just changes the maximum phase boost frequency position.
Here let us keep the total output impedance to be constant at 1MΩ and start to sweep the feedback divider ratio. The Matlab script is as shown below.
clc; clear; close all;
Vout = 1.8;
Vref = 1.2;
Rtot = 1e6;
C3 = 10e-12;
ratio = [0.5,1,2,5,10];
s = tf('s');
for i=1:1:length(ratio)
R2 = Rtot*ratio(i);
R1 = Rtot*(1-ratio(i));
Rpar = R1*R2/(R1+R2);
H1 = R2/(R1+R2)*(1+s*R1*C3)/(1+s*Rpar*C3);
h = bodeplot(H1); % Plot the Bode plot of H1(s)
setoptions(h, 'FreqUnits', 'Hz'); % change frequency scale from rad/sec to Hz
set(findall(gcf,'type','line'),'linewidth',2)
grid on;
hold on;
end
legend("ratio=0.5","ratio=1","ratio=2","ratio=5","ratio=10");
Fig. 7 shows the H1(s) Bode plot sweep for different feedback ratio.
OTA based the Type-III compensator is not widely used in the industry. This is because the AC and DC transfer functions are coupled with each other and we do not have too much feedom to achieve the phase boost we desired.
Type-III compensator - Opamp based
The Opamp based Type-III compensator is as shown in Fig. 8.
Here we have a local feedback network which is comprised of R4, C4 and C5. Due to the local feedback network, Vfb is virtually connected to Vref which is AC ground. Therefore, the voltage across resistor R2 is 0V and there is no AC current flowing through resistor R2. As a result, resistor R2 can be considered as an open circuit and can be removed from the small signal model, as shown in Fig. 9.
The following Matlab script can be used to derive the Opamp based Type-III compensator.
clc; clear; close all;
syms Vout Vea
syms R1 R3 C3 R4 C4 C5
syms H s
eqn1 = Vout/R1 + Vout/(R3+1/s/C3) + Vea*s*C5 + Vea/(R4+1/s/C4) == 0;
eqn2 = H == Vea/Vout;
results = solve(eqn1,eqn2,[Vea, H]);
H = simplify(results.H)
The derived transfer function from Matlab is as shown in Fig. 10.
Let us make the following assumption to further simplify the transfer function.
The simplified transfer function by wxMaxima is as shown in Fig. 11.
From Fig. 11, we have:
Fig. 12 visually shows the components which generate the poles and zeros in Eq. 9.
Next, we can use the following Matlab script to check the Bode plot for the Opamp based Type-III compensator transfer function.
clc; clear; close all;
s = tf('s');
Rtot = 1e6;
Vref = 1.2;
Vout = 1.8;
ratio = Vref/Vout;
R2 = ratio*Rtot;
R1 = (1-ratio)*Rtot;
C3 = 100e-12;
R3 = 1e3;
C4 = 50e-12;
R4 = 500e3;
C5 = 100e-15;
p1 = 1/2/pi/R3/C3;
p2 = 1/2/pi/R4/C5;
z1 = 1/2/pi/R1/C3;
z2 = 1/2/pi/R4/C4;
H = -(1+s*R1*C3)*(1+s*R4*C4)/s/R1/C4/(1+s*R3*C3)/(1+s*R4*C5);
h = bodeplot(H); % Plot the Bode plot of H1(s)
setoptions(h, 'FreqUnits', 'Hz'); % change frequency scale from rad/sec to Hz
set(findall(gcf,'type','line'),'linewidth',2)
grid on;
hold on;
ax = findobj(gcf, 'type', 'axes');
phase_ax = ax(1);
mag_ax = ax(2);
xlim([100, 100e6]);
yrange = ylim(mag_ax);
plot(mag_ax, [p1,p1], yrange, ':', 'LineWidth', 2, "Color", "#3B82F6");
plot(mag_ax, [z1,z1], yrange, ':', 'LineWidth', 2, "Color", "#EF4444");
plot(mag_ax, [p2,p2], yrange, '--', 'LineWidth', 2, "Color", "#3B82F6");
plot(mag_ax, [z2,z2], yrange, '--', 'LineWidth', 2, "Color", "#EF4444");
legend(mag_ax, "Bode plot","pole1","zero1","pole2","zero2");
The Bode plot is as shown in Fig. 13.
Simplis verification
To verify the Mathematical derivation, the Type-III compensator test bench is created in Simplis as shown in Fig. 14.
The AC simulation results are as shown in Fig. 15.
Then, we can import the Simplis results into Matlab and compare the Bode plot. The Matlab script is as shown below.
clc; clear; close all;
s = tf('s');
Rtot = 1e6;
Vref = 1.2;
Vout = 1.8;
ratio = Vref/Vout;
R2 = ratio*Rtot;
R1 = (1-ratio)*Rtot;
C3 = 100e-12;
R3 = 1e3;
C4 = 50e-12;
R4 = 500e3;
C5 = 100e-15;
p1 = 1/2/pi/R3/C3;
p2 = 1/2/pi/R4/C5;
z1 = 1/2/pi/R1/C3;
z2 = 1/2/pi/R4/C4;
H = -(1+s*R1*C3)*(1+s*R4*C4)/s/R1/C4/(1+s*R3*C3)/(1+s*R4*C5);
h = bodeplot(H); % Plot the Bode plot of H1(s)
setoptions(h, 'FreqUnits', 'Hz'); % change frequency scale from rad/sec to Hz
set(findall(gcf,'type','line'),'linewidth',2)
grid on;
hold on;
ax = findobj(gcf, 'type', 'axes');
phase_ax = ax(1);
mag_ax = ax(2);
xlim([100, 100e6]);
% read simplis simulation results from csv file
data = csvread("simplis.csv", 1, 0);
freq_simplis = data(:,1);
mag_simplis = data(:,2);
phase_simplis = data(:,3);
plot(phase_ax, freq_simplis, phase_simplis, 'r--', 'LineWidth', 2);
plot(mag_ax, freq_simplis, mag_simplis, 'r--', 'LineWidth', 2);
legend('Math', 'Simplis')
Fig. 16 shows that the Mathematics derivation perfectly matches with the Simplis AC simulation results.
Conclusion
Fig. 17 visually shows the components which generate the poles and zeros in Opamp-based Type-III compensator.
There may be different cases for the Bode plot, which is determiend by how we choose the compensation network resistor and capacitor values. The following shows three cases, which demonstrate how the Bode plot midband gain is affected by the poles and zeros.
- In the first case, the zero formed by R4C4 is at lower frequency than R1C3.
- In case 2, the zero formed by R4C4 is at higher frequency than R1C3.
- In case 3, the pole formed by R3C3 is at higher frequency than R4C5.
References and downloads
[1] Demystifying Type II and Type III Compensators Using OpAmp and OTA for DC/DC Converters
[2] Opamp based Type-III compensator test bench in Simplis - pdf
[3] Opamp based Type-III compensator test bench in Simplis - download