📄 buck_boost_pcm_load_reg.m
字号:
function buck_boost_PCM_load_reg( Vg,V,Iomax,rg,rL,rS,rC,rD,VD,R1,R2,RS,L,Ts,Ma,Ae)Vg=input('please give the input voltage Vg=');V=input('please give the output voltage V=');Iomax=input('please give the output current Iomax=');Iomin=input('please give the output current Iomin=');rg=input('please give the resistance of the input voltage source rg=');rL=input('please give the resistance of the inductor rL=');rS=input('please give the resistance of the switch rS=');rC=input('please give the resistance of the capacitor rC=');rD=input('please give the resistance of the diode rD=');VD=input('please give the voltage of the diode VD=');R1=input('please give the lower sampling resistance R1=');R2=input('please give the upper sampling resistance R2=');RS=input('please give the sampling resistance of the inductor current RS=');L=input('please give the inductance L(uH)=');Ts=input('please give the switch period Ts(us)=');L=L*10^(-6);Ts=Ts*10^(-6);Ma=input('please give the slope compensation coefficient Ma=');Ae=input('please give the DC gain of the error amplifier Ae=');Rb=R1+R2;D2min=(-Vg-Iomax*(rS-rD+rg)-((Vg+Iomax*(rS-rD+rg))^2+4*(V-VD-Vg)*Iomax*(rS+rL+rg))^0.5)/(2*(V-VD-Vg));D2max=(-Vg-Iomin*(rS-rD+rg)-((Vg+Iomin*(rS-rD+rg))^2+4*(V-VD-Vg)*Iomin*(rS+rL+rg))^0.5)/(2*(V-VD-Vg));Fb=R1/Rb;deltaV=Iomax*RS/(D2min*Ae*Fb)-Iomin*RS/(D2max*Ae*Fb);fprintf('deltaV/V=%6.2f%%\n',100*deltaV/V);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -