Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

transformer in spectre

Status
Not open for further replies.

wjlzhx

Member level 5
Joined
Apr 14, 2005
Messages
82
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,288
Activity points
1,785
how to get a transformer in cadence using spectre,
I am design a AC-DC circuit .

please help me
thanks
 

Hi, wjlzhx.
You can write Verilog-A model of transformer. It will be rather ideal, but it's better than nothing i think.
 

thanks , but i still do not know how to write it?

does anybody can help me .

thanks a lot
 

There is a transformer primitive in analogLib (xfmr) but you have
to supply a model, and I've never looked into what that might
look like. For my uses I stick with ind (L) and mind (M) where you
just have to specify primary and secondary inductors and their
coupling, which is easy to get "close enough" if you believe no
core losses, etc.

I think there is also a core / winding duo that would let you get
real fancy, but you're even more on your own for that.
 

thanks you dick_freebird

now i am using ind (L) and mind (M).
 

Hi
Here verilogA code for transformer


// VerilogA for edaboard, transformer, veriloga

`include "constants.vams"
`include "disciplines.vams"

module transformer(pr1,pr2,sec1,sec2);
inout pr1,pr2,sec1,sec2;
electrical pr1,pr2,sec1,sec2;

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 secondary winding
parameter real L = 1n from (0:inf); //inductance per one turn in H
parameter real k = 0.97 from [0:1]; //mutual coupling factor
parameter real R1 = 1.0 from [0:inf); //resistance of primary winding in Ohm
parameter real R2 = 3.0 from [0:inf); //resistance of secondary winding in Ohm

real F1,F2;
analog begin
F1 = L*(n1*I(pr1,pr2)-k*n2*I(sec1,sec2)); //magnetic flow through primary winding
F2 = L*(n2*I(sec1,sec2)-k*n1*I(pr1,pr2)); //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);

end
endmodule

Appreciate any suggestions about improving it.
Regards.
 

but i have three winding ,so how to write the model??

thanks
 

Hi, wjlzhx.
For three winding transformer code would be the following:
// 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


If smth doesn't work - always ready to answer.:D
Regards.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top