boost_pcm_simulink_in.m

来自「基于平均法的boost型DC/DC建模步骤」· M 代码 · 共 35 行

M
35
字号
Vg=input('please give the input voltage Vg=');V=input('please give the output voltage V=');Io=input('please give the output current Io=');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 resistor R1=');R2=input('please give the upper sampling resistor R2=');R=input('please give the load resistance r=');RS=input('please give the sampling resistance of the inductor current RS=');L=input('please give the inductance L(uH)=');C=input('please give the capacitance C(uF)=');Ts=input('please give the switch period Ts(us)=');L=L*10^(-6);C=C*10^(-6);Ts=Ts*10^(-6);Ma=input('please give the slope compensation coefficient Ma=');C1=input('please give the parasitic capacitance of the lower sampling resistor C1(pF)=');C2=input('please give the parasitic capacitance of the upper sampling resistor C2(pF)=');C1=C1*10^(-12);C2=C2*10^(-12);Ae=input('please give the DC gain of the error amplifier Ae=');Re=input('please give the output resistance of the error amplifier Re=');Rc=input('please give the compensation resistance of the error amplifier Rc=');Cc=input('please give the compensation capacitance of the error amplifier Cc(pF)=');Cc=Cc*10^(-12);Rb=R1+R2;D2=(Vg+Io*rS-Io*rD+((Vg+Io*rS-Io*rD)^2-4*(V+VD)*Io*(rS+rL+rg))^0.5)/(2*(V+VD));IL=Io/D2;D=1-D2;rP=rL+rg+D2*rD+D*rS;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?