[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: How to use Transformer in gschem



Hi Hari,

If you want to simply model the bidirectional behaviour of a
transformer to see - very roughly - what the input to the transformer
looks like but are not too worried about the ac behaviour then an
ideal transformer like this will do the job.

******************************
* This is the driving source
******************************
V1 N002 0 PULSE(0 1 0 10n 10n 5u 10u)
R1 N003 N002 1
******************************
* Turns ratio
******************************
.param N=10
******************************
* This is the transformer.
* Note that R2 provides
* the dc ground return
* path that SPICE
* requires because
* current sources are
* effectively infinite
* impedance.
******************************
G1 0 N001 N003 0 1
G2 0 N001 N004 0 {1/N}
G3 N003 0 N001 0 1
G4 N004 0 N001 0 {1/N}
R2 N001 0 1G
******************************
* This is the load
******************************
R3 N004 0 100
******************************
* Simulation command
******************************
.tran 100u
*

It represents an ideal transformer (it works down to DC!) with two
windings. N is the turns ratio.

Although probably not an issue in your application, this tends to run
faster than the K coupled inductor model in switching circuits.


For some more insight into basic transformer modelling including
adding primary and leakage inductances to this ideal DC model, this
page may help:

http://ltwiki.org/index.php5?title=Transformers

Although it is written around LTspice, I think the information on the
ideal transformer with the added elements is valid for - and the
example netlist will run in - Ngspice.

(Note that in this example, the 1G resistor to ground is no longer
needed because the primary inductance Lm provide the DC path.)

The exceptions will be that:

i) Ngspice supports the expression defined behavioural inductor model
(ngspice user manual sect 3.2.10 - 3.2.12) but that is not quite the
same as the LTspice flux defined model;

ii) Ngspice does not have the the same implementation of the Chan
inductor model. However, it does have inductive coupling and core
models (Ngspice manual 13.2.16, 13.2.17).

Non-linear transformer modelling quickly gets to be a full time job
all on its own ...

The Ngspice manual is here:

http://ngspice.sourceforge.net/docs/ngspice21-manual.pdf

:)

         Andy.

www.signality.co.uk



On 1 July 2010 18:32, John Doty <jpd@xxxxxxxxx> wrote:
>
> On Jul 1, 2010, at 8:41 AM, hari venkatesh wrote:
>
>>   I want to simulate a rectifier circuit in gEDA, while i am generating
>>   the netlist for the circuit.
>>   i have given the refdes as T1, during netlist generation it is giving
>>   error, refdes=T1 not found
>>   Could u please mail me the list attributes that should be attached for
>>   the transformer
>>   Eg: refdes, value, model, footprint etc
>
> Modeling transformers in SPICE requires some specialized knowledge. SPICE represents a transformer as inductors ("L"elements) with mutual inductance coupling ("K" elements). The "catalog" specs typically do not include the necessary information to formulate such a model, so measurement or informed guesswork is required.
>
> Probably the easiest solution is to use a AC independent source (vac-1.sym in gschem) to drive the rectifier, and forget about modeling the transformer.
>
> John Doty              Noqsi Aerospace, Ltd.
> http://www.noqsi.com/
> jpd@xxxxxxxxx
>
>
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user