- Joined
- Jan 22, 2008
- Messages
- 52,409
- Helped
- 14,749
- Reputation
- 29,780
- Reaction score
- 14,095
- Trophy points
- 1,393
- Location
- Bochum, Germany
- Activity points
- 298,048
Yes, I understood the same as you until he showed the formula he is using in post #17.I fail to recognize how the said "vout/verr" transfer function is different from the loop gain already derived at the start of this thread, but evaluated for a different loop, the outer voltage control.
I agree, theoretically, but not in PLECS. Do that in PLECS and see that it displays nothing. :grin: You must do it as I did in order to get the result.Your "control-to-ouput transfer function" (vout/iref ) is the voltage control loop gain with the PI gain set to constant 1.
I agree, theoretically, but not in PLECS. Do that in PLECS and see that it displays nothing. You must do it as I did in order to get the result.
Regarding your original question: Why "vout/verr" is different than the loop gain showed in post #4 ?
Look the description in PLECS of "Small Signal Perturbation" and the "Small Signal Gain". They are different.
How do you measure the control-to-output transfer function with the loop gain setup ? By setting PI gain to "1", I have no results (blank Bode plot).So as far as I see, no other setups than the classical loop gain measurement are required.
Differences in the measurement method, not the perturbation.Not sure with other difference you are referring to.
/%% the Data: value of the Boost converter´s element
%% christophe basso 225
Vin=20; % voltage input
Vout=40; % voltage output
r_cf=0.1 ; %Output capacitor ESR
r_lf =0.1 ; %inductr ESR
R= 200; %Load resistor
C= 10.7e-6; %Output Capacitor
L= 20e-6; %inductor
M= Vout/Vin; %conversion ration Vout/Vin
D=1-1/M; %on duty cycle
D_=1-D; %Off duty cycle, also denoted by 1 – D, depending on the mood
Fsw=2.2e6; % switching frequency
Tsw=1/Fsw; %Switching period
Ri=1; %sense resistor in current mode
S1=Vin/L; %(S_1)inductor on slope, Vin/L for a boost converter
S2=(Vout-Vin)/L; %inductor off slope, (Vout-Vin)/L
Sa=0.5*S2; %external ramp compensation slope
mc=1+Sa/S1; %compensation ramp according to ridley notation [2]:mc=1+Se/Sn;
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% it must under a condition to awitch between the DCM and CCM if Icrit>IL or k_crit
%%Current mode, CCM(reference equations 1):
k=(R/(2*Ri))*(Vin/Vout); %% DC gain
b=(((1+(Sa/S1))*D_)-0.5)/Fsw;
a=1/((pi*Fsw)^2);
w_z1=1/(r_cf*C);
w_z2=(R*(D_^2))/L; % Righ half plane zero
w_p1=2/(R*C);
%G(s)=Vout(s)/Verr(s)
%G1
G1=tf(k*[1/w_z1 1], [1/w_p1 1]);
%G2
G2=tf([-1/w_z2 1],[a b 1]);
G_ccm=G1*G2;
bode(G1,{10,1e7});
bode(G2,{10,1e7});
options = bodeoptions;
options.FreqUnits = 'Hz'; % or 'rad/second', 'rpm', etc.
bode(G_ccm,options,{10,1e7})
grid on
%%
%%Vout(s)/Vin(s)
gain=Vout/(2*Vin);
G_in_o=tf(gain*[1/w_z1 1],[1/w_p1 1]);
bode(G_in_o,{10,1e7})
grid on
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%current mode, DCM (reference equations 1)
tau=L/(R*Tsw);
M=1+sqrt(1+(2*(D^2))/tau)/2;
Fm=1/(S1*mc*Tsw);
Hd= ((2*Vout)/D)*(M-1)/(2*M-1);
w_z1d=1/(r_cf*C);
w_z2d= R/((M^2)*L);
w_p1d=(2*M-1)/((M-1)*(R*C));
w_p2d=2*Fsw*((1-(1/M))/D)^2;
G1d=tf(Fm*Hd*[1/w_z1d 1],[1/w_p1d 1]);
G2d=tf([-1/w_z2d 1],[1/w_p2d 1]);
G_dcm=G1d*G2d;
options = bodeoptions;
options.FreqUnits = 'Hz'; % or 'rad/second', 'rpm', etc.
bode(G_dcm,options,{10,1e7})
grid on
%%
I simulated the circuit provided in post #1 and took the value "Iref" had in steady state.cataN, in #22 you have used Vc as Verr and calculated it as 0.438 and took it from the closed loop . can you please tell how did you arrive to such value?
Explained in posts #13, #16 and #24.but why on earth it does not give the same result (with DC gain) like in the first circuit as it seems as you have showed without the voltage feedback but just with Iref calculated after the block+/-?. I mean the Iref is the same as when you used directly the constant Iref (value you got from teh steady state) and when I use the voltage feedback. look like I miss something in understanding PLECS small analysis tools and thanks again
%Coefficient of the Compensator selected (PID transfer function)
fc=110e3; %crossover frequency
Ppm=60; %phase margin
Pps=-100; %phase of the power stage at crosseover frequency fc
Pboost=-90+Ppm-Pps; %phase boost necessary to have a closed loop phase larger than th phase margin
Kboost=tand(45+(Pboost/2)); % k factor
fz=fc/Kboost; % freqeuncy of the zero
wz=2*pi*fz;
fp=fc*Kboost; %frequency of the pole
wp=2*pi*fp;
%%
%gains
Gpsd=-16.8;%gain of the power stage at corssover frequency in decibel
Gps=10^(abs(Gpsd/20));%gain of the power stage at corssover frequency
Gc=1/Gps;%gain of the compensator at corssover frequency
Kc=2*pi*fz/Gps; %gain of the compensator
%%
%%transfer function of the compensator
%%1 zero, 1 pair zero-pole
G1=Kc*tf([1/wz 1],[1 0]);
G2=tf( [0 1],[1/wp 1]);
Gc=G1*G2 % transfer function of the compensator
%bodw plot of teh compensator
options = bodeoptions;
options.FreqUnits = 'Hz'; % or 'rad/second', 'rpm', etc.
bode(Gc,options,{10,1e7})]
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?