1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Wot, no sinewave ??

Discussion in 'Circuit Simulation & PCB Design' started by alec_t, Mar 3, 2017.

  1. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,259
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Why isn't LTspice showing a sinewave between nodes a and b?
    SpicePuzzle.JPG
     
  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    Add a max time step of 100ns to .TRAN analysis dialog box.
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi alec.
    Mike beat me to it.
    E
     

    Attached Files:

  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,107
    Likes:
    160
    Location:
    Ohio - GMT-5

    I am nowhere near the spice wizards y'all are. Please explain the true nature of the problem, and why this fix fixed it.

    Thanks.

    ak
     
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    The Spice algorithm (and Mike Ehglhart's LTSpice guru's enhancements) try to speed up the calculations by stepping over times steps where it thinks not much is going on. Some times the time step guesstimate fails, and the algorithm needs some guidance.

    Alec's example poses a problem for the speed-up guess. He provides a 1mV change on top of a 3V level. The algorithm sees a node V(b) where relative to 3V, not much is changing, and thinks it can speed up by changing the time step to one that is large enough to skip over the detail. Specifying a max time step of 100ns force an evaluation of the circuit at least that often, so the detail of what is actually happening on node V(b) is revealed.
     
    • Informative Informative x 1
  7. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,107
    Likes:
    160
    Location:
    Ohio - GMT-5
    I know that level of inner detail and gotchas in my schematic and layout software, but I'm still relatively new to LTS. Somewhere in the future, you just saved me days.

    Tang Yew Berry Mulch.

    ak
     
    Last edited: Mar 3, 2017
  8. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,259
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Thanks guys. I've still got a long way to go up the LTS learning hill. For some reason I nearly always forget to consider/limit the timestep. In this case I didn't think a 1k sinewave would bother LTS one jot.
    I was hoping to create a sim .SUBCKT model including a similar setup of voltage sources, but clearly this would have the timestep issue. I know .tran directives within a model are ignored, so is there any other way of enforcing the timestep limit by something in the model itself?
     
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
  10. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,259
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Morning Eric. Thanks for the link. A useful reference.
    When using LTS it feels like I'm a novice pilot at the controls of the Starship Enterprise. All those switches, knobs and levers but which one does what? :D
     
  11. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi alec,
    I feel the same way, its an interesting learning curve and I am still on it.
    I find checking over other peoples LTS post solutions very informative, they often have a more novel way of solving a problem.

    E
     

Share This Page