Connect with us

spice: ideal transformer

Discussion in 'Electronic Design' started by Michael Zedler, Mar 23, 2007.

Scroll to continue with content
  1. Hello,

    I've google/google groups'ed a bit but anyhow I cannot make an *ideal*
    transformer to work. The file

    --
    ideal transformator

    ..control
    ac dec 20 1k 1g
    plot vdb(3)
    ..endc

    ..subckt transformer 1 2 3 4
    vsense 1 2 dc 0
    e1 1 2 3 4 1
    f1 3 4 vsense -1
    ..ends

    v1 1 0 dc 0 ac 1
    r1 1 2 10
    X1 2 0 3 0 transformer
    r2 3 0 1k

    ..end
    --

    makes Macspice hang... Please note that for my purpose I cannot use 'K'
    coupled inductors. DC behaviour of the ideal transformer is of no interest.

    Cheers,
    Michael
     
  2. Tom Bruhns

    Tom Bruhns Guest

    OK, let's look just at the transformer. You have a short circuit (a
    DC voltage source set to zero volts) across nodes 1 and 2. And you
    have a dependent voltage source e1 which is also across those
    terminals. It is not a good idea to put two voltage sources in
    parallel. I would suggest you try putting them in series. Does that
    help? Then you can have a primary (1-2) voltage controlled by what
    the secondary voltage is, while still using vsense to sense the
    current in the primary.


    Cheers,
    Tom
     

  3. Hello Michael,

    It looks similar to the ideal transformer from this article.

    http://www.elecdesign.com/Articles/Print.cfm?ArticleID=6204

    I have made a subcircuit from this example:

    Plese change the voltage ratio "10" to the desired value.
    For a 1: transformer replace the 10 by 1 and the -10 by -1.

    * prim: (+)1 (-)2
    * sec: (+)3 (-)4
    * ratio Vsec/Vprim = 10
    ..SUBCKT TRAFO 1 2 3 4
    F1 1 2 VSENSE -10
    E1 30 4 1 2 10
    VSENSE 3 30 0
    ..ENDS

    Best regards,
    Helmut



    PS: If you have some kind of Windows emulator, you could try LTspice.
    It also runs with WINE in Linux. LTspice has a state of the art graphical
    interface for schematics and waveforms.
    http://www.linear.com/designtools/software/switchercad.jsp
    http://tech.groups.yahoo.com/group/LTspice/


    A full blown version of the ideal trafo with parameter passing for LTspice

    * prim: (+)1 (-)2
    * sec: (+)3 (-)4
    ..SUBCKT TRAFO 1 2 3 4 N1={N}
    * N1 = N = Vsec/Vprim
    F1 1 2 VSENSE {-N1}
    E1 30 4 1 2 {N1}
    VSENSE 3 30 0
    ..ENDS

    How a netlist for a TRAFO-instance could look in LTspice:

    XU1 10 0 50 0 TRAFO N=1

    Normally one would use a symbol in the schematic of course.

    Symbol file, name it trafo.asy

    Version 4
    SymbolType BLOCK
    RECTANGLE Normal 80 64 -48 -80
    TEXT -22 -48 Left 0 TRAFO
    WINDOW 39 17 24 Center 0
    SYMATTR Prefix X
    SYMATTR SpiceModel TRAFO
    SYMATTR Description Ideal Transformer
    SYMATTR SpiceLine N=1
    PIN -48 -64 NONE 8
    PINATTR PinName 1
    PINATTR SpiceOrder 1
    PIN -48 48 NONE 8
    PINATTR PinName 2
    PINATTR SpiceOrder 2
    PIN 80 -64 NONE 8
    PINATTR PinName 3
    PINATTR SpiceOrder 3
    PIN 80 48 NONE 8
    PINATTR PinName 4
    PINATTR SpiceOrder 4
     
  4. joseph2k

    joseph2k Guest

    How very strange, i am used to making ideal and real transformers with an Lm
    term coupling "normal" inductors. Almost sure to be a better simulation of
    any possible real circuit.
     
  5. Works like a charm, thank you!

    Michael
     
  6. In most cases your statement may be correct, but not for this one:
    Joint simulation of some lumped elements together with a distributed
    microwave circuit (the latter represented by a canonical Foster
    equivalent circuit which requires ideal transformers).

    Michael
     
  7. joseph2k

    joseph2k Guest

    OK. What is going on with the Foster equivalent circuit that normal Lm
    ideal transfromers will not work.
     
  8. An ideal transformer is needed; no parasitic inductance, coupling of 1.
    Again, this is an *equivalent* circuit. It models the distributed
    circuit. And if non-ideal transformers were used essentially the
    transfer function of the destributed (physical) (multiport-)circuit were
    altered.

    Michael
     
  9. joseph2k

    joseph2k Guest

    OK, i do not understand "parasitic inductance" in this context. I have a
    little experience (near trivial) with "transmission line transformers" in
    PWB and MMIC arenas. Please elucidate.
     
  10. joseph2k

    joseph2k Guest

    In the meantime i did some googling on Foster equivalent circuit. Wow, was
    i ever on the wrong track. Not only was my suggention of using standard Lm
    terms waste lots of simulation time to no good; it would actually
    completely destroy the integrity of the simulation.
    I have to admit though that the basic idea is wonderful, it makes analysis
    of something wierd like a fractal antenna doable.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-