Connect with us

Cycle counting in LTSpice?

Discussion in 'Electronic Design' started by Paul Burridge, Feb 27, 2004.

Scroll to continue with content
  1. Hi,

    I've been running simulations were I'm looking for slight frequency
    variations in the output for certain changes to the component values
    in the circuit under test. Is there a way of getting LT to count the
    number of cycles output during the course of say a 1uS portion of
    transient analysis?
    Thanks,

    p.
     
  2. I usually do an FFT analysis.

    Right click on transient graphic and select FFT.

    Hernán Sánchez
     
  3. James Meyer

    James Meyer Guest

    When the only tool a man has is a hammer, all his problems begin to look
    like nails.

    Jim
     
  4. Genome

    Genome Guest

    Well, notwithstanding the fact that I think your a basic Fucking Idiot......

    I would recommend that you take your finger out of your ass and prod on the
    televison thing in front of you whilst going...... 1, 2, 3.....

    DNA

    "Paul Burridge"

    Thumb up bum, Brain in neutral.
     
  5. Whereas *you* are a basic, drunken idiot.
    Not practical for slight frequency variations at HF (clue: you'd have
    to count tens of thousands of cycles to get any meaningful result.
    Pretty tedious one-round, let alone for repeated passes!
    Have another swig of gin and go back to sleep.
    ;->
     
  6. Ken Smith

    Ken Smith Guest

    You can make a model of a frequency counter and add it to the system.
     
  7. He! That's a novel solution!
    Actually I've adopted Herman's suggestion after Mike Englehart posted
    a demo of how it worked on the cad group.
     
  8. John Larkin

    John Larkin Guest

    For things like crystal oscillators, where you're interested in PPM
    variations in frequency, I usually just break the loop somewhere and
    do a narrow-span AC plot of loop phase versus frequency, and look for
    the zero-phase crossing. That's way faster than trying to derive
    oscillation frequency from a transient analysis, and the slope of the
    phase crossing is useful to see, too. For a transient analysis to be
    frequency-accurate, you need to use an absurdly small time step and
    wait out a lot of cycles - tens of thousands, sometimes - for
    steady-state.

    The AC phase thing assumes linearity, so it has limitations of its
    own.

    John
     
  9. Thanks, John.
    I've noticed that the time step is critical for this type of
    simulation. Small changes in fequency result in zero output for some
    strange reason, until the time step is re-adjusted to compensate for
    it whereupon oscillation mysteriously reappears at the new frequency.
    This completely threw me for 24 hours late last week as it appeared as
    if the circuit under test would produce a waveform that totally
    collapsed upon the slightest change in its output frequency!
     
  10. John Larkin

    John Larkin Guest

    Yes, the real universe probably doesn't have time steps.

    And speaking of injection locking, I'd suspect that a simulated
    oscillator will tend to lock to the Spice time steps.

    John
     
  11. I read in sci.electronics.design that John Larkin <[email protected]
    techTHISnologyPLEASE.com> wrote (in <[email protected]
    4ax.com>) about 'Cycle counting in LTSpice?', on Sun, 29 Feb 2004:
    Isn't the time quantum supposed to be the time it takes light to travel
    the Planck distance? I expect Kevin knows.
     
  12. Genome

    Genome Guest

    Exactly, know thyself.

    DNA
     
  13. Qualitatively yes. It certainly seems that time *must* be discrete.
    Simple logic rules out simple continuous existence of any physical
    construct. An infinite number of real physical points between 0 and 1 is
    simply absurd. All measurements must always ultimately resolve to one of
    a measurement of length so therefore, so must time.

    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.

    http://www.anasoft.co.uk/NewBeginning.mp3

    "quotes with no meaning, are meaningless" - Kevin Aylward.
     
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

-