Electronics-Related.com
Forums

SPICE tarnsient analysis of oscillators - sampling time

Started by Unknown March 5, 2019
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. 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.
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
John Larkin <jjlarkin@highlandtechnology.com> wrote:

> 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.
You are doing something wrong. Are you using the modified trap option? Are you using a pure sine wave as a comparison? I get 120 milliseconds difference in zero crossings after 1,000 cycles with no time step specified. That is 120 ppm. Always specify the maximum time step.
On Wed, 06 Mar 2019 09:35:27 GMT, Steve Wilson <no@spam.com> wrote:

>John Larkin <jjlarkin@highlandtechnology.com> wrote: > >> 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. > >You are doing something wrong. Are you using the modified trap option? Are >you using a pure sine wave as a comparison? > >I get 120 milliseconds difference in zero crossings after 1,000 cycles with >no time step specified. That is 120 ppm.
After 10 cycles, I see about 500 PPM in my LC. Not so different. It means that you might not want to design crystal oscillators in time domain.
> >Always specify the maximum time step.
The thing I remember about my previous much-maligned dual sine wave experiment is that setting a small dt fixed the frequency error. So it wasn't a simple ESR problem. I'll try to find that one. LT Spice is mathematically chaotic, especially when it uses its default time step algorithm. There are probably cases that are especialy bad, and maybe I get lucky finding them. I am usually lucky. I'm not doing anything wrong. I design electronics and most of it works first time, and we sell it. You just have to be careful when you drive things. And not believe everything just because a computer was involved. -- John Larkin Highland Technology, Inc lunatic fringe electronics
John Larkin <jjlarkin@highlandtechnology.com> wrote:

> After 10 cycles, I see about 500 PPM in my LC. Not so different. It > means that you might not want to design crystal oscillators in time > domain.
You need time domain to adjust the crystal drive. Too little and the oscillator may not start. Too much and you may fracture the crystal. You cannot get this information any other way. Crystal oscillators have a long startup time due to the high Q. You cannot make meaningful measurements after hundreds of milliseconds of cycles. I show how to bypass the long startup in my oscillator.zip article which you ignored https://drive.google.com/open?id=1ZsbpkV0aaKS5LURIb1dfu_ndshsSaYtf
>>Always specify the maximum time step.
> The thing I remember about my previous much-maligned dual sine wave > experiment is that setting a small dt fixed the frequency error. So it > wasn't a simple ESR problem. I'll try to find that one.
Your problem was ESR. You took the difference between the LC and the sine signals but you didn't know the default ESR for an inductor is 1 milliohm. So the LC signal decayed. Your measurement cannot tell the difference between phase and amplitude changes and you came to the wrong conclusion.
> LT Spice is mathematically chaotic, especially when it uses its > default time step algorithm. There are probably cases that are > especialy bad, and maybe I get lucky finding them. I am usually lucky.
LTspice repeats exactly given the same data. There is nothing chaotic about it. Always specify the maximum time step.
> I'm not doing anything wrong. I design electronics and most of it > works first time, and we sell it.
That has nothing to do with the topic.
> You just have to be careful when you drive things. And not believe > everything just because a computer was involved.
Nonsense. You use the computer for everything. When was the last time you picked up a slide rule. You just have to be careful about the data you enter. LTspice is as accurate as the models you give it.
On Wed, 06 Mar 2019 19:51:36 GMT, Steve Wilson <no@spam.com> wrote:

>John Larkin <jjlarkin@highlandtechnology.com> wrote: > >> After 10 cycles, I see about 500 PPM in my LC. Not so different. It >> means that you might not want to design crystal oscillators in time >> domain. > >You need time domain to adjust the crystal drive. Too little and the >oscillator may not start. Too much and you may fracture the crystal. > >You cannot get this information any other way. > >Crystal oscillators have a long startup time due to the high Q. You cannot >make meaningful measurements after hundreds of milliseconds of cycles. I >show how to bypass the long startup in my oscillator.zip article which you >ignored > >https://drive.google.com/open?id=1ZsbpkV0aaKS5LURIb1dfu_ndshsSaYtf > >>>Always specify the maximum time step. > >> The thing I remember about my previous much-maligned dual sine wave >> experiment is that setting a small dt fixed the frequency error. So it >> wasn't a simple ESR problem. I'll try to find that one. > >Your problem was ESR. You took the difference between the LC and the sine >signals but you didn't know the default ESR for an inductor is 1 milliohm. >So the LC signal decayed. Your measurement cannot tell the difference >between phase and amplitude changes and you came to the wrong conclusion. > >> LT Spice is mathematically chaotic, especially when it uses its >> default time step algorithm. There are probably cases that are >> especialy bad, and maybe I get lucky finding them. I am usually lucky. > >LTspice repeats exactly given the same data. There is nothing chaotic about >it. > >Always specify the maximum time step. > >> I'm not doing anything wrong. I design electronics and most of it >> works first time, and we sell it. > >That has nothing to do with the topic. > >> You just have to be careful when you drive things. And not believe >> everything just because a computer was involved. > >Nonsense. You use the computer for everything. When was the last time you >picked up a slide rule. You just have to be careful about the data you >enter. > >LTspice is as accurate as the models you give it.
Are you here to discuss electronics, or just to be obnoxious? -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
John Larkin <jjlarkin@highland_snip_technology.com> wrote:

> On Wed, 06 Mar 2019 19:51:36 GMT, Steve Wilson <no@spam.com> wrote: > >>John Larkin <jjlarkin@highlandtechnology.com> wrote: >> >>> After 10 cycles, I see about 500 PPM in my LC. Not so different. It >>> means that you might not want to design crystal oscillators in time >>> domain. >> >>You need time domain to adjust the crystal drive. Too little and the >>oscillator may not start. Too much and you may fracture the crystal. >> >>You cannot get this information any other way. >> >>Crystal oscillators have a long startup time due to the high Q. You >>cannot make meaningful measurements after hundreds of milliseconds of >>cycles. I show how to bypass the long startup in my oscillator.zip >>article which you ignored >> >>https://drive.google.com/open?id=1ZsbpkV0aaKS5LURIb1dfu_ndshsSaYtf >> >>>>Always specify the maximum time step. >> >>> The thing I remember about my previous much-maligned dual sine wave >>> experiment is that setting a small dt fixed the frequency error. So it >>> wasn't a simple ESR problem. I'll try to find that one. >> >>Your problem was ESR. You took the difference between the LC and the >>sine signals but you didn't know the default ESR for an inductor is 1 >>milliohm. So the LC signal decayed. Your measurement cannot tell the >>difference between phase and amplitude changes and you came to the wrong >>conclusion. >> >>> LT Spice is mathematically chaotic, especially when it uses its >>> default time step algorithm. There are probably cases that are >>> especialy bad, and maybe I get lucky finding them. I am usually lucky. >> >>LTspice repeats exactly given the same data. There is nothing chaotic >>about it. >> >>Always specify the maximum time step. >> >>> I'm not doing anything wrong. I design electronics and most of it >>> works first time, and we sell it. >> >>That has nothing to do with the topic. >> >>> You just have to be careful when you drive things. And not believe >>> everything just because a computer was involved. >> >>Nonsense. You use the computer for everything. When was the last time >>you picked up a slide rule. You just have to be careful about the data >>you enter. >> >>LTspice is as accurate as the models you give it. > > Are you here to discuss electronics, or just to be obnoxious?
I discussed electronics and system design. I posted links to oscillator design that you ignored. I showed your ignorance of LTspice caused you to make false claims about its performance. You completely failed to acknowledge any of my posts and still insisted your original erroneous analysis about the accuracy of LTspice was correct. LTspice is vital in electronics design. If you can show that any of my replies is wrong, please post.
On Wed, 06 Mar 2019 22:56:41 GMT, Steve Wilson <no@spam.com> wrote:

>John Larkin <jjlarkin@highland_snip_technology.com> wrote: > >> On Wed, 06 Mar 2019 19:51:36 GMT, Steve Wilson <no@spam.com> wrote: >> >>>John Larkin <jjlarkin@highlandtechnology.com> wrote: >>> >>>> After 10 cycles, I see about 500 PPM in my LC. Not so different. It >>>> means that you might not want to design crystal oscillators in time >>>> domain. >>> >>>You need time domain to adjust the crystal drive. Too little and the >>>oscillator may not start. Too much and you may fracture the crystal. >>> >>>You cannot get this information any other way. >>> >>>Crystal oscillators have a long startup time due to the high Q. You >>>cannot make meaningful measurements after hundreds of milliseconds of >>>cycles. I show how to bypass the long startup in my oscillator.zip >>>article which you ignored >>> >>>https://drive.google.com/open?id=1ZsbpkV0aaKS5LURIb1dfu_ndshsSaYtf >>> >>>>>Always specify the maximum time step. >>> >>>> The thing I remember about my previous much-maligned dual sine wave >>>> experiment is that setting a small dt fixed the frequency error. So it >>>> wasn't a simple ESR problem. I'll try to find that one. >>> >>>Your problem was ESR. You took the difference between the LC and the >>>sine signals but you didn't know the default ESR for an inductor is 1 >>>milliohm. So the LC signal decayed. Your measurement cannot tell the >>>difference between phase and amplitude changes and you came to the wrong >>>conclusion. >>> >>>> LT Spice is mathematically chaotic, especially when it uses its >>>> default time step algorithm. There are probably cases that are >>>> especialy bad, and maybe I get lucky finding them. I am usually lucky. >>> >>>LTspice repeats exactly given the same data. There is nothing chaotic >>>about it. >>> >>>Always specify the maximum time step. >>> >>>> I'm not doing anything wrong. I design electronics and most of it >>>> works first time, and we sell it. >>> >>>That has nothing to do with the topic. >>> >>>> You just have to be careful when you drive things. And not believe >>>> everything just because a computer was involved. >>> >>>Nonsense. You use the computer for everything. When was the last time >>>you picked up a slide rule. You just have to be careful about the data >>>you enter. >>> >>>LTspice is as accurate as the models you give it. >> >> Are you here to discuss electronics, or just to be obnoxious? > >I discussed electronics and system design. I posted links to oscillator >design that you ignored. I showed your ignorance of LTspice caused you to >make false claims about its performance. You completely failed to >acknowledge any of my posts and still insisted your original erroneous >analysis about the accuracy of LTspice was correct. > >LTspice is vital in electronics design. If you can show that any of my >replies is wrong, please post.
OK, obnoxious. -- John Larkin Highland Technology, Inc lunatic fringe electronics
>"Steve Wilson" wrote in message >news:XnsAA09C7295E7F8idtokenpost@69.16.179.23...
>> 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.
This is way, way to tight and will result in unnecessary run times and large files. The maximum step time for oscillators should typically be set to around 1/50 to 1/100 of the period, on rare occasions maybe to as low as 1/500. What mainly governs the max time step choice, is the requirement to get the oscillator to start. To get accuracy reltol should be set. Typically 100u, although for low phase noise (-180dBc) using PSS/PNOISE in a simulator supporting such analysis, going down to 10u or 1u may be necessary. The adaptive time step control of Spice will automatically set the time steps to whatever is required to satisfy the accuracy setting, without evaluation of millions of redundant time points. It will go down to 10^-21 if necessary. If you need to set the max time step to 1/1e4 of the period, something is wrong. -- Kevin Aylward http://www.anasoft.co.uk - SuperSpice http://www.kevinaylward.co.uk/ee/index.html
"Steve Wilson"  wrote in message 
news:XnsAA0AB68B337B6idtokenpost@69.16.179.22...

John Larkin <jjlarkin@highland_snip_technology.com> wrote:

> On Wed, 06 Mar 2019 19:51:36 GMT, Steve Wilson <no@spam.com> wrote: > >>John Larkin <jjlarkin@highlandtechnology.com> wrote: >> >>> After 10 cycles, I see about 500 PPM in my LC. Not so different. It >>> means that you might not want to design crystal oscillators in time >>> domain. >> >>You need time domain to adjust the crystal drive. Too little and the >>oscillator may not start. Too much and you may fracture the crystal. >> >>You cannot get this information any other way. >> >>Crystal oscillators have a long startup time due to the high Q. You >>cannot make meaningful measurements after hundreds of milliseconds of >>cycles. I show how to bypass the long startup in my oscillator.zip >>article which you ignored >> >>https://drive.google.com/open?id=1ZsbpkV0aaKS5LURIb1dfu_ndshsSaYtf >> >>>>Always specify the maximum time step. >> >>> The thing I remember about my previous much-maligned dual sine wave >>> experiment is that setting a small dt fixed the frequency error. So it >>> wasn't a simple ESR problem. I'll try to find that one. >> >>Your problem was ESR. You took the difference between the LC and the >>sine signals but you didn't know the default ESR for an inductor is 1 >>milliohm. So the LC signal decayed. Your measurement cannot tell the >>difference between phase and amplitude changes and you came to the wrong >>conclusion. >> >>> LT Spice is mathematically chaotic, especially when it uses its >>> default time step algorithm. There are probably cases that are >>> especialy bad, and maybe I get lucky finding them. I am usually lucky. >> >>LTspice repeats exactly given the same data. There is nothing chaotic >>about it. >> >>Always specify the maximum time step. >> >>> I'm not doing anything wrong. I design electronics and most of it >>> works first time, and we sell it. >> >>That has nothing to do with the topic. >> >>> You just have to be careful when you drive things. And not believe >>> everything just because a computer was involved. >> >>>Nonsense. You use the computer for everything. When was the last time >>>you picked up a slide rule. You just have to be careful about the data >>>you enter. >> >>>LTspice is as accurate as the models you give it. > >> Are you here to discuss electronics, or just to be obnoxious?
>I discussed electronics and system design. I posted links to oscillator >design that you ignored. I showed your ignorance of LTspice caused you to >make false claims about its performance. You completely failed to >acknowledge any of my posts and still insisted your original erroneous >analysis about the accuracy of LTspice was correct.
>LTspice is vital in electronics design. If you can show that any of my >replies is wrong, please post.
Ahmmmmm.... I am assuming you mean Spice. LTSpice has some deficiencies. -- Kevin Aylward http://www.anasoft.co.uk - SuperSpice http://www.kevinaylward.co.uk/ee/index.html