📄 buck_boost_pcm_simulink_in.m
字号:
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 resistance R1=');R2=input('please give the upper sampling resistance 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-rD+rg)-((Vg+Io*(rS-rD+rg))^2+4*(V-VD-Vg)*Io*(rS+rL+rg))^0.5)/(2*(V-VD-Vg));IL=Io/D2; D=1-D2; rp=D*(rg+rS+rL)+D2*(rD+rL); Vp=Vg-V+IL*rD-IL*rS-IL*rg+VD;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -