|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
我在
http://bbs.eetop.cn/viewthread.php?tid=325241&highlight=%B1%E4%D1%B9%C6%F7%C4%A3%D0%CD
看到[size=1em]peterlin2010发的一篇关于变压器的Veriloga模型文件。
// VerilogA for edaboard, transformer, veriloga
`include "constants.vams"
`include "disciplines.vams"
module transformer(pr1,pr2,sec1,sec2,th1,th2);
inout pr1,pr2,sec1,sec2,th1,th2;
electrical pr1,pr2,sec1,sec2,th1,th2;
parameter real n1 = 1.0 from [1:inf); //number of turns in primary winding
parameter real n2 = 3.0 from [1:inf); //number of turns in second winding
parameter real n3 = 3.0 from [1:inf); //number of turnes in third winding
parameter real L = 1n from (0:inf); //inductanse per one turn in H
parameter real k12 = 0.97 from [0:1]; //coupling between first and second, first and third windings
parameter real R1 = 1.0 from [0:inf); //resistance of primary winding in Ohm
parameter real R2 = 3.0 from [0:inf); //resistance of second winding in Ohm
parameter real R3 = 3.0 from [0:inf); //resistance of third winding in Ohm
real k13,F1,F2,F3;
analog begin
@(initial_step or initial_step("dc")) begin
k13 = k12;
end
F1 = L*(n1*I(pr1,pr2)-k12*n2*I(sec1,sec2)-k13*n3*I(th1,th2)); //magnetic flow through primary winding
F2 = L*(n2*I(sec1,sec2)-k12*n1*I(pr1,pr2)+n3*I(th1,th2)); //magnetic flow through secondary winding
F3 = L*(n3*I(th1,th2)-k13*n1*I(pr1,pr2)+n2*I(sec1,sec2)); //magnetic flow through secondary winding
V(pr1,pr2)<+R1*I(pr1,pr2)+n1*ddt(F1);
V(sec1,sec2)<+R2*I(sec1,sec2)+n2*ddt(F2);
V(th1,th2)<+R3*I(th1,th2)+n3*ddt(F3);
end
endmodule
我仿真后波形都是正确的,可是根据原边电流上升的斜率来计算得到的原边电感(Lp=Vdc/k(k是原边电流上升的斜率))总很与模型中原本设置(Lp=L*n1(n1是原边的匝数,L是每一圈的电感量))的不相等。二者相差很大!
请问这是怎么回事?求教!谢谢了!
我的邮箱:2013xpc@gmail.com |
|