Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #534430

Re: SPICE tarnsient analysis of oscillators - sampling time

From John Larkin <jjlarkin@highlandtechnology.com>
Newsgroups sci.electronics.design
Subject Re: SPICE tarnsient analysis of oscillators - sampling time
Date 2019-03-05 22:47 -0800
Organization highland technology
Message-ID <anqu7e5bsfh7dp7is3orl2df04bj0r0cph@4ax.com> (permalink)
References (2 earlier) <XnsAA09B4969AAFDidtokenpost@69.16.179.22> <jkvt7e1mu51gueopgk7lodptq5imp5vjru@4ax.com> <XnsAA09C7295E7F8idtokenpost@69.16.179.23> <nu7u7etriqsc78ppv47im5kfb6dj4cdaff@4ax.com> <XnsAA09D967F22DCidtokenpost@69.16.179.22>

Show all headers | View raw


On Wed, 06 Mar 2019 02:22:18 GMT, Steve Wilson <no@spam.com> wrote:

>John Larkin <jjlarkin@highlandtechnology.com> wrote:
>
>> On Wed, 06 Mar 2019 00:34:42 GMT, Steve Wilson <no@spam.com> wrote:
>> 
>>>John Larkin <jjlarkin@highland_snip_technology.com> wrote:
>>>
>>>> On Tue, 05 Mar 2019 22:45:09 GMT, Steve Wilson <no@spam.com> wrote:
>>> 
>>>>>John Larkin <jjlarkin@highlandtechnology.com> wrote:
>>>>>
>>>>>> On Tue, 5 Mar 2019 02:54:14 -0800 (PST), dakupoto@gmail.com wrote:
>>> 
>>>>>>>Could some electronics guru here please clarify this a bit ?
>>>>>>>I am experimenting with SPICE transient analysis of oscillator, and
>>>>>>>I am unsure as to what to set as the ideal sampling time,  given
>>>>>>>that most oscillators will generate a fundamental and a few
>>>>>>>harmonics. For example, suppose that I have a 500 MHz differential
>>>>>>>oscillator, and I set the sampling time as 1/(15.0*time period of
>>>>>>>fundamental), would that be sufficient to satisfy the Nyquist
>>>>>>>criterion, and also capture the fundamental and the first two
>>>>>>>harmonics ? The reason I ask is that I have noticed that with this
>>>>>>>scheme,  the fundamental is always at 250 MHz, and the first
>>>>>>>harmonic is at 500 MHz. This is peculiar. Is there something wrong
>>>>>>>in my assumption ? Thanks in advance. 
>>> 
>>>>>> LT Spice goes for sim speed, so it tends to use coarse time steps.
>>>>>> If you shock a simple LC and let it ring, at default settings the
>>>>>> resonant frequency will be off by percentages. Similarly, oscillator
>>>>>> sims will be unrealistic. 
>>>
>>>>>False. Your sim took the difference between the LC tank and a sine
>>>>>wave. 
>>>
>>>>>You didn't know the default series resistance of an inductor is 1
>>>>>milliohm, so the tank voltage decayed. Your measurement could not tell
>>>>>the difference between phase and amplitude (simple trig) so you
>>>>>claimed a frequency error. How you converted your measurement to
>>>>>frequency error is beyond me. 
>>>
>>>>>I have attached a simple sim showing the frequency error is
>>>>>unmeasurable when you set the tank ESR to zero. Let it run for 1,000
>>>>>cycles. After 1,000 cycles, the tank voltage and sine wave overlap
>>>>>exactly. The frequency difference is too small to measure. 
>>> 
>>>> Maybe so, but I often have to force the time step down to get a useful
>>>> simulation. And that sometimes makes simulation times silly. There is
>>>> a reason that the max time step can be set. When precision matters, I
>>>> reduce it until the sim doesn't change. 
>>> 
>>>> Make a pure, 1 volt, 1 Hz sine wave V source. Run that for 5 seconds
>>>> and zoom the top of the sine. It's chunky line segments. Change the
>>>> time step to 1 us and it looks a lot better. 
>>> 
>>>The optimum time step depends on dv/dt. For sinusoidal waveforms I
>>>usually start at period/1e4. For picosecond waveforms, you may have to
>>>go way down. 
>> 
>> My point, which was disputed, is that one often has to override LT's
>> default (adaptive?) time step. You seem to agree.
>
>That is not what I said. I said specificantly to set the time step to 
>tau/1e4 for sinusoidal waveforms then crank down as needed. Fast risetimes 
>may reqire smaller time steps. I think doing a transient anlysis without 
>setting the maximum time step is a big mistake. It will simply waste your 
>time.

For most things, like opamp circuits and simple RC stuff, the default
is good enough. For tweaking say an oscillator, it pays to explore the
effect of setting the time step.

>
>Without it, the resulting waveform can show straight line segments. You can 
>set 
>
>.options plotwinsize=0
>
>but this requires more disk space.
>
>You are completely ignoring the superb accuracy of LTspce as I pointed out 
>in my first post. It is far better than the several percent error you 
>claim. After much trial and error, I found the discrepancy to be in the 
>parts per billion. That is far better than any components you can find.

I tried a 1 Hz ringing LC with parasitic-free L and C. The difference
in ringing frequency between the transient default (no time step
specified) and specifying 1 or 10 us max time step was about 400 PPM,
but some time steps were kind of weird; the change of ring period vs
step size was not monotonic.




-- 

John Larkin         Highland Technology, Inc

lunatic fringe electronics 

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

SPICE tarnsient analysis of oscillators - sampling time dakupoto@gmail.com - 2019-03-05 02:54 -0800
  Re: SPICE tarnsient analysis of oscillators - sampling time Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-03-05 11:08 +0000
  Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-05 08:51 -0800
    Re: SPICE tarnsient analysis of oscillators - sampling time Winfield Hill <hill@rowland.harvard.edu> - 2019-03-05 12:30 -0800
    Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-05 22:45 +0000
      Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-05 15:11 -0800
        Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-06 00:34 +0000
          Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-05 17:19 -0800
            Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-06 02:22 +0000
              Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-05 22:47 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-06 09:35 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-06 07:27 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-06 19:51 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-06 12:50 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-06 22:56 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-06 20:25 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-07 18:56 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-07 12:05 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-08 16:12 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-08 08:37 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-08 19:25 +0000
          Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-07 18:55 +0000
        Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-08 16:13 +0000
          Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-08 08:40 -0800
            Re: SPICE tarnsient analysis of oscillators - sampling time "Kevin Aylward" <kevinRemovAT@kevinaylward.co.uk> - 2019-03-08 19:25 +0000
              Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-08 11:48 -0800
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-09 02:41 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-10 14:33 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-10 14:40 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-11 07:06 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-11 07:02 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-12 06:44 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-12 06:47 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-12 21:34 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highland_snip_technology.com> - 2019-03-12 15:51 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-13 10:05 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-13 07:22 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Jasen Betts <jasen@xnet.co.nz> - 2019-03-14 05:09 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time John Larkin <jjlarkin@highlandtechnology.com> - 2019-03-14 08:13 -0700
                Re: SPICE tarnsient analysis of oscillators - sampling time Allan Herriman <allanherriman@hotmail.com> - 2019-03-14 05:04 -0500
                RE: Re: SPICE tarnsient analysis of oscillators - sampling time A_george <jcustom@heliost.org> - 2019-03-16 13:13 +0000
                Re: SPICE tarnsient analysis of oscillators - sampling time Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-03-16 09:32 -0400
                Re: SPICE tarnsient analysis of oscillators - sampling time Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-03-16 09:30 -0400
      Re: SPICE tarnsient analysis of oscillators - sampling time Steve Wilson <no@spam.com> - 2019-03-05 23:14 +0000
  Re: SPICE tarnsient analysis of oscillators - sampling time bloggs.fredbloggs.fred@gmail.com - 2019-03-05 09:56 -0800

csiph-web