Maker Pro
Maker Pro

Cycle counting in LTSpice?

P

Paul Burridge

Jan 1, 1970
0
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.
 
H

Hernán Sánchez

Jan 1, 1970
0
I usually do an FFT analysis.

Right click on transient graphic and select FFT.

Hernán Sánchez
 
J

James Meyer

Jan 1, 1970
0
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.

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

Jim
 
G

Genome

Jan 1, 1970
0
Paul Burridge said:
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.

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.
 
P

Paul Burridge

Jan 1, 1970
0
Well, notwithstanding the fact that I think your a basic Fucking Idiot......

Whereas *you* are a basic, drunken 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.....

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!
DNA

"Paul Burridge"

Thumb up bum, Brain in neutral.

Have another swig of gin and go back to sleep.
;->
 
K

Ken Smith

Jan 1, 1970
0
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,

You can make a model of a frequency counter and add it to the system.
 
P

Paul Burridge

Jan 1, 1970
0
You can make a model of a frequency counter and add it to the system.

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.
 
J

John Larkin

Jan 1, 1970
0
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.

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
 
P

Paul Burridge

Jan 1, 1970
0
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.

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!
 
J

John Larkin

Jan 1, 1970
0
Thanks, John.
I've noticed that the time step is critical for this type of
simulation.

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
 
J

John Woodgate

Jan 1, 1970
0
I read in sci.electronics.design that John Larkin <jjlarkin@highlandSNIP
techTHISnologyPLEASE.com> wrote (in <89n440pfpjj4kduc244a7nrcm7tsqu64l6@
4ax.com>) about 'Cycle counting in LTSpice?', on Sun, 29 Feb 2004:
Yes, the real universe probably doesn't have time steps.

Isn't the time quantum supposed to be the time it takes light to travel
the Planck distance? I expect Kevin knows.
 
G

Genome

Jan 1, 1970
0
Paul Burridge said:
Idiot......

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.
;->
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!

Exactly, know thyself.

DNA
 
K

Kevin Aylward

Jan 1, 1970
0
John said:
I read in sci.electronics.design that John Larkin


Isn't the time quantum supposed to be the time it takes light to
travel the Planck distance? I expect Kevin knows.

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
[email protected]
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.
 
Top