📄 i_flyback.m
字号:
function flyback_i = I_flyback(u)
global last_i_tcr;
global a_ab1;
global a_bc1;
global a_ca1;
global a_ab2;
global a_bc2;
global a_ca2;
if isempty(a_ab1)
a_ab1=3*pi/4;
end
if isempty(a_bc1)
a_bc1=3*pi/4;
end
if isempty(a_ca1)
a_ca1=3*pi/4;
end
if isempty(a_ab2)
a_ab2=3*pi/4;
end
if isempty(a_bc2)
a_bc2=3*pi/4;
end
if isempty(a_ca2)
a_ca2=3*pi/4;
end
if isempty(last_i_tcr)
last_i_tcr=[0 0];
end
state_t=u(4,1);
switch state_t %根据compare.m中计算出来的状态值选择计算哪相电抗器电流
case 0
last_i_tcr(1,1)=0;
last_i_tcr(1,2)=0;
case 11
last_i_tcr(1,1)=11;
last_i_tcr(1,2)=base_currut(a_ab1,u(1,1));
case 12
last_i_tcr(1,1)=12;
last_i_tcr(1,2)=base_currut(a_ab2,u(1,1));
case 13
last_i_tcr(1,1)=13;
last_i_tcr(1,2)=base_currut(a_bc1,u(2,1));
case 14
last_i_tcr(1,1)=14;
last_i_tcr(1,2)=base_currut(a_bc2,u(2,1));
case 15
last_i_tcr(1,1)=15;
last_i_tcr(1,2)=base_currut(a_ca1,u(3,1));
case 16
last_i_tcr(1,1)=16;
last_i_tcr(1,2)=base_currut(a_ca2,u(3,1));
otherwise
end
flyback_i=last_i_tcr;
function I1 = base_currut(a,current)
I1=abs(2*current*(a-pi-sin(2*a)/2)/(pi*(1+cos(a))));%基波电流峰值
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -