Connect with us

LTSpice: Still 2-pole trouble

Discussion in 'CAD' started by Chris Carlen, Nov 6, 2003.

Scroll to continue with content
  1. Chris Carlen

    Chris Carlen Guest

    Hi:

    Here is an example with the new 2-pole model. It seems to have trouble
    with asymmetrical power rails:


    Version 4
    SHEET 1 880 928
    WIRE -672 624 -672 592
    WIRE -560 624 -560 592
    WIRE 80 272 112 272
    WIRE 80 304 80 272
    WIRE 80 368 80 400
    WIRE 80 400 112 400
    WIRE -672 512 -672 464
    WIRE -560 512 -560 464
    WIRE 48 352 16 352
    WIRE 16 352 16 400
    WIRE 48 320 -16 320
    WIRE 32 208 -16 208
    WIRE -16 208 -16 320
    WIRE -16 320 -64 320
    WIRE 112 208 208 208
    WIRE 208 208 208 336
    WIRE 208 336 112 336
    WIRE 208 336 272 336
    WIRE -144 320 -208 320
    WIRE -208 896 -208 864
    WIRE -208 784 -208 672
    WIRE 96 624 128 624
    WIRE 96 656 96 624
    WIRE 96 720 96 752
    WIRE 96 752 128 752
    WIRE -32 672 0 672
    WIRE 48 560 0 560
    WIRE 0 560 0 672
    WIRE 0 672 64 672
    WIRE 128 560 208 560
    WIRE 208 560 208 688
    WIRE 208 688 128 688
    WIRE 208 688 272 688
    WIRE 32 752 32 704
    WIRE 32 704 64 704
    WIRE -112 672 -208 672
    WIRE -208 672 -208 320
    FLAG -672 624 0
    FLAG -560 624 0
    FLAG 112 272 Vpos
    FLAG 112 400 Vneg
    FLAG -672 464 Vpos
    FLAG -560 464 Vneg
    FLAG 16 400 0
    FLAG -208 896 0
    FLAG 128 624 Vpos
    FLAG 128 752 Vneg
    FLAG 32 752 0
    SYMBOL Opamps\\2pole 80 336 R0
    WINDOW 38 34 27 Left 0
    SYMATTR InstName U1
    SYMBOL voltage -672 496 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V1
    SYMATTR Value 10
    SYMBOL voltage -560 496 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V2
    SYMATTR Value -5
    SYMBOL res 16 224 R270
    WINDOW 0 32 56 VTop 0
    WINDOW 3 0 56 VBottom 0
    SYMATTR InstName R1
    SYMATTR Value 10k
    SYMBOL res -160 336 R270
    WINDOW 0 32 56 VTop 0
    WINDOW 3 0 56 VBottom 0
    SYMATTR InstName R2
    SYMATTR Value 10k
    SYMBOL voltage -208 768 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V3
    SYMATTR Value SINE(0 15 50)
    SYMBOL Opamps\\1pole 96 688 R0
    WINDOW 38 22 36 Left 0
    SYMATTR InstName U2
    SYMBOL res 32 576 R270
    WINDOW 0 32 56 VTop 0
    WINDOW 3 0 56 VBottom 0
    SYMATTR InstName R3
    SYMATTR Value 10k
    SYMBOL res -128 688 R270
    WINDOW 0 32 56 VTop 0
    WINDOW 3 0 56 VBottom 0
    SYMATTR InstName R4
    SYMATTR Value 10k
    TEXT -666 776 Left 0 !.tran 60m



    --
    ____________________________________
    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
     
  2. * Copyright © Linear Technology Corp. 2003. All rights reserved.
    *
    ..subckt 2pole 1 2 3 4 5
    S1 5 3 N002 5 Q
    S2 4 5 5 N002 Q
    A1 2 1 0 0 0 0 N003 0 OTA G={Avol/Rout} ref={Vos}
    + Iout={slew*Cout} Cout={Cout} en={en} enk={enk}
    + in={in} ink={ink} Vhigh=1e308 Vlow=-1e308 Rout={Rout}
    C3 5 4 1p
    C4 3 5 1p
    S3 N002 0 4 N002 C
    S4 0 N002 N002 3 C
    R3 3 2 1G noiseless
    G1 0 N002 N003 0 {1/Rout}
    R1 3 N002 {2*Rout} noiseless
    R2 N002 4 {2*Rout} noiseless
    C1 N002 0 {X*Cout/Avol}
    S5 0 N003 N003 3 C
    S6 N003 0 4 N003 C
    R4 3 1 1G noiseless
    R5 1 4 1G noiseless
    R6 2 4 1G noiseless
    ..model C SW(Ron=100 Roff=1T Vt=2 Vh=-1 noiseless)
    ..param Rout=100Meg
    ..param Cout={Avol/GBW/2/pi/Rout}
    ..model Q SW(Ron=10 Roff=10Meg Vt=0 Vh=-.1 Vser={Rail}
    + ilimit={Ilimit} noiseless)
    ..param Avol=1Meg GBW=10Meg Slew=10Meg rail=0 Vos=0 ilimit=25m
    ..param en=0 enk=0 in=0 ink=0 phimargin=45
    ..param X table(phimargin,29.4,3.5,32.1,2.9,33.8,2.6,35.8,2.3,
    +38.1,2,40.9,1.7,43.2,1.5,45.9,1.3,49.2,1.1,53.2,0.9,58.2,0.7,
    +64.7,0.5,73,0.3,86.1,0.05)
    ..ends 2pole
     
  3. Jim Thompson

    Jim Thompson Guest

    What happened to the three-line OpAmp ?:)

    ...Jim Thompson
     
  4. Chris Carlen

    Chris Carlen Guest


    This one doesn't work with a 0 volt negative or positive rail.




    --
    ____________________________________
    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
     
  5. * Copyright © Linear Technology Corp. 2003. All rights reserved.
    *
    ..subckt 2pole 1 2 3 4 5
    S1 5 3 N002 5 Q
    S2 4 5 5 N002 Q
    A1 2 1 0 0 0 0 N003 0 OTA G={.1*Avol/Rout} ref={Vos}
    + Iout={.1*slew*Cout} Cout={Cout} en={en} enk={enk}
    + in={in} ink={ink} Vhigh=1e308 Vlow=-1e308 Rout={Rout}
    C3 5 4 1p
    C4 3 5 1p
    R3 3 2 1G noiseless
    G1 0 N002 N003 0 {10/Rout}
    R1 3 N002 {2*Rout} noiseless
    R2 N002 4 {2*Rout} noiseless
    C1 N002 0 {X*Cout/Avol}
    S5 0 N003 N003 3 C
    S6 N003 0 4 N003 C
    R4 3 1 1G noiseless
    R5 1 4 1G noiseless
    R6 2 4 1G noiseless
    ..model C SW(Ron=100 Roff=1T Vt=2 Vh=-1 noiseless)
    ..param Rout=100Meg
    ..param Cout={Avol/GBW/2/pi/Rout}
    ..model Q SW(Ron=10 Roff=10Meg Vt=0 Vh=-.1 Vser={Rail}
    + ilimit={Ilimit} noiseless)
    ..param Avol=1Meg GBW=10Meg Slew=10Meg rail=0 Vos=0 ilimit=25m
    ..param en=0 enk=0 in=0 ink=0 phimargin=45
    ..param X table(phimargin,29.4,3.5,32.1,2.9,33.8,2.6,35.8,2.3,
    +38.1,2,40.9,1.7,43.2,1.5,45.9,1.3,49.2,1.1,53.2,0.9,58.2,0.7,
    +64.7,0.5,73,0.3,86.1,0.05)
    ..ends 2pole
     
  6. Chris Carlen

    Chris Carlen Guest


    Thanks Mike!

    --
    ____________________________________
    Christopher R. Carlen
    Principal Laser/Optical Technologist
    Sandia National Laboratories CA USA
     
  7. Hello Mike,
    where can I find a help on "OTA" and its parameters.
    A1 2 1 0 0 0 0 N003 0 OTA G={.1*Avol/Rout} ref={Vos}
    OTA = operational transconductance amplifier?
    Other parameters for OTA?

    Are there more useful A-devices we can't see in the help file
    of LTSPICE?

    Best Regards
    Helmut
     
  8. Helmut,
    Each A-device is an entry point to a compiler
    whose definition changes with every release. The
    definition changes to accommodate new SMPS models.
    Basic devices like gates don't change, so they're
    documented, first by examples and now also in the
    help. The OTA's behavior won't change to break
    the 1pole/2pole examples, but it's a pretty
    complicated part that compiles expressions and
    executes the object code at simulation time for
    various aspects of their behavior. It also
    contains a small library of transfer functions.
    The default is hyperbolic tangent like one gets
    from a diff pair. The idea is to use a nonlinear
    transconductance into the dominate pole to model
    slew rate in a manner which will also exhibit
    the onset of slew rate limited distortion below
    the hard slew limit.

    I've avoided documenting this device because it
    would take a great deal of time to do so and it
    would look strange because its default behavior
    is pretty bizarre since it was originally written
    to model an obscure error amp of a SMPS product.

    There's about thirty major entry points to the
    A-device compiler. The OTA is one and the gates
    are another. Anybody who really wants to know
    what these A-devices do would have to join
    the commercial interest of the LTspice team and
    help develop them. In the defense industry they
    say, "I could tell you, but then I'll have to
    kill you". Here it's a case of I could tell you,
    but then I'd have to hire you.

    Best Regards,

    --Mike
     
  9. Hello Mike,
    thanks a lot for this information. It has been very helpful to
    understand the simulation results.

    I have made two example circuits containing all the gathered information
    about A-OTA and your 2pole opamp model.
    It can be downloaded from the LTSPICE user's group.
    http://groups.yahoo.com/group/LTspice/files/lib/The A model OTA/
    PS: You have to register if you want access it, but it's free.

    Best Regards
    Helmut
     
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

-