time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Spice simulation of PSRR and phase noise

AK
Attila Kinali
Fri, Oct 27, 2017 6:19 PM

Hoi Dana,

On Sun, 22 Oct 2017 09:23:26 -0500
Dana Whitlow k8yumdoober@gmail.com wrote:

But I am surprised about the simulation times that you speak of.
Would you be willing to post some information detailing your
methodology and an example "simple" circuit?

As Bruce already mentioned, the simulation times required for
getting decent results is 100-1000 times as long as the lowest
frequency considered. This is basically a statistical issue as
noise simulation, to be accurate, has to average over several
"runs" to remove effects of the noise source behaviour.

Another thing is, that, for the transient simulation to be accurate,
the maximum steps size has to be limited such that the maximum voltage
or current step seen is small. Ie if there is anything in the system
with high slew rates, then the step size has to be adapted to this
slew rate. This in turn makes it slower

Additionally, most spice implementations have quite short running
random number generators (usually with a state space of 2^16 to 2^32,
few with 2^64) which in turn requires some tricks to get decent results
out of it, that again make the simulation time longer.

			Attila Kinali

--
It is upon moral qualities that a society is ultimately founded. All
the prosperity and technological sophistication in the world is of no
use without that foundation.
-- Miss Matheson, The Diamond Age, Neil Stephenson

Hoi Dana, On Sun, 22 Oct 2017 09:23:26 -0500 Dana Whitlow <k8yumdoober@gmail.com> wrote: > But I am surprised about the simulation times that you speak of. > Would you be willing to post some information detailing your > methodology and an example "simple" circuit? As Bruce already mentioned, the simulation times required for getting decent results is 100-1000 times as long as the lowest frequency considered. This is basically a statistical issue as noise simulation, to be accurate, has to average over several "runs" to remove effects of the noise source behaviour. Another thing is, that, for the transient simulation to be accurate, the maximum steps size has to be limited such that the maximum voltage or current step seen is small. Ie if there is anything in the system with high slew rates, then the step size has to be adapted to this slew rate. This in turn makes it slower Additionally, most spice implementations have quite short running random number generators (usually with a state space of 2^16 to 2^32, few with 2^64) which in turn requires some tricks to get decent results out of it, that again make the simulation time longer. Attila Kinali -- It is upon moral qualities that a society is ultimately founded. All the prosperity and technological sophistication in the world is of no use without that foundation. -- Miss Matheson, The Diamond Age, Neil Stephenson
AK
Attila Kinali
Fri, Oct 27, 2017 6:25 PM

Hi Rafael

On Sun, 22 Oct 2017 17:20:52 +0200
Rafael Gajanec rgajanec@vercet.com wrote:

you haven't specified what sort of circuits would you like to simulate,

Simplified, they are differential amplifiers driven into saturation.
A bit more detailed, I am looking at ring oscillator stages and sine-to-square
conversion circuits and their behaviour regarding various key factors
(note: I am not sure what the key factors are, yet)

but maybe the answer is Harmonic Balance.

Hmm.. I didn't know about Harmonic Balance. I have some reading up to do.
Thanks!

HSPICE from Synopsis and ADS from Keysight (which I use) also have the
HB engine.

I am mostly using ngpsice, because it's very easy to script (I have a bunch
of perl scripts that feed simulations into a Grid Engine cluster, extract
data and analyzse it). Is there any big advantage of the commercial spice
engines that would make them worth considering? And would the license alow
to run hundreds of instances in parallel?
(Yes, I am doing crazy things :-)

		Attila Kinali

--
It is upon moral qualities that a society is ultimately founded. All
the prosperity and technological sophistication in the world is of no
use without that foundation.
-- Miss Matheson, The Diamond Age, Neil Stephenson

Hi Rafael On Sun, 22 Oct 2017 17:20:52 +0200 Rafael Gajanec <rgajanec@vercet.com> wrote: > you haven't specified what sort of circuits would you like to simulate, Simplified, they are differential amplifiers driven into saturation. A bit more detailed, I am looking at ring oscillator stages and sine-to-square conversion circuits and their behaviour regarding various key factors (note: I am not sure what the key factors are, yet) > but maybe the answer is Harmonic Balance. Hmm.. I didn't know about Harmonic Balance. I have some reading up to do. Thanks! > HSPICE from Synopsis and ADS from Keysight (which I use) also have the > HB engine. I am mostly using ngpsice, because it's very easy to script (I have a bunch of perl scripts that feed simulations into a Grid Engine cluster, extract data and analyzse it). Is there any big advantage of the commercial spice engines that would make them worth considering? And would the license alow to run hundreds of instances in parallel? (Yes, I am doing crazy things :-) Attila Kinali -- It is upon moral qualities that a society is ultimately founded. All the prosperity and technological sophistication in the world is of no use without that foundation. -- Miss Matheson, The Diamond Age, Neil Stephenson
AK
Attila Kinali
Fri, Oct 27, 2017 6:30 PM

Hoi Bruce,

On Mon, 23 Oct 2017 09:58:40 +1300 (NZDT)
Bruce Griffiths bruce.griffiths@xtra.co.nz wrote:

Since close in phase noise can result from up conversion of supply noise
etc via circuit non linearities, using an AC analysis won't work.

Only transient simulation or perhaps analytical modelling of the various
non linearities will provide accurate estimates of upconverted PN.

Unfortunately, my understanding of transistors is far from being good.
Hence doing accurate analytical analysis is beyond me. Hence my reliance
on spice to do the "hard work."

If you use transient simulation techniques increasing the level of the
various noise sources above the actual levels encountered in real circuits
and then correcting the resultant PN back to the level that would be
encountered in the actual circuit (using the results of analytical modelling)
may be a useful way to reduce simulation time or at least overcome some of
the challenges associated with accurately determining low level PN from a
simulation.

This is a good idea, thanks!

There are some in the LTSpice Yahoo group attempting this but they seem
way out of touch with the amount of simulation data required. I've provided
them with the appropriate formulae to extract PN from the the amplitude
spectra. At the moment they appear bogged down with some somewhat trivial
peripheral issues.

I tried to read the yahoo groups... but god! is the interface bad!
I only found a few mails from last August that go into that direction.
Is there anything else that might be interesting?

		Attila Kinali

--
It is upon moral qualities that a society is ultimately founded. All
the prosperity and technological sophistication in the world is of no
use without that foundation.
-- Miss Matheson, The Diamond Age, Neil Stephenson

Hoi Bruce, On Mon, 23 Oct 2017 09:58:40 +1300 (NZDT) Bruce Griffiths <bruce.griffiths@xtra.co.nz> wrote: > Since close in phase noise can result from up conversion of supply noise > etc via circuit non linearities, using an AC analysis won't work. > > Only transient simulation or perhaps analytical modelling of the various > non linearities will provide accurate estimates of upconverted PN. Unfortunately, my understanding of transistors is far from being good. Hence doing accurate analytical analysis is beyond me. Hence my reliance on spice to do the "hard work." > If you use transient simulation techniques increasing the level of the > various noise sources above the actual levels encountered in real circuits > and then correcting the resultant PN back to the level that would be > encountered in the actual circuit (using the results of analytical modelling) > may be a useful way to reduce simulation time or at least overcome some of > the challenges associated with accurately determining low level PN from a > simulation. This is a good idea, thanks! > There are some in the LTSpice Yahoo group attempting this but they seem > way out of touch with the amount of simulation data required. I've provided > them with the appropriate formulae to extract PN from the the amplitude > spectra. At the moment they appear bogged down with some somewhat trivial > peripheral issues. I tried to read the yahoo groups... but god! is the interface bad! I only found a few mails from last August that go into that direction. Is there anything else that might be interesting? Attila Kinali -- It is upon moral qualities that a society is ultimately founded. All the prosperity and technological sophistication in the world is of no use without that foundation. -- Miss Matheson, The Diamond Age, Neil Stephenson
RG
Rafael Gajanec
Sat, Oct 28, 2017 11:36 AM

Hi Attila,

On 27-Oct-17 8:25 PM, Attila Kinali wrote:

Hi Rafael

On Sun, 22 Oct 2017 17:20:52 +0200
Rafael Gajanecrgajanec@vercet.com  wrote:

you haven't specified what sort of circuits would you like to simulate,

Simplified, they are differential amplifiers driven into saturation.
A bit more detailed, I am looking at ring oscillator stages and sine-to-square
conversion circuits and their behaviour regarding various key factors
(note: I am not sure what the key factors are, yet)

Oscillator design - that's what I found HB simulation particularly
useful for. It gives you almost instant results, compared to the
transient simulation, say 10 seconds instead of 5 hours! Just imagine
what it means if you are trying to tune several parameters of an
oscillator... The only other reasonably fast and accurate way I can
think of is to build the bloody circuit and measure it using some
expensive equipment.

but maybe the answer is Harmonic Balance.

Hmm.. I didn't know about Harmonic Balance. I have some reading up to do.
Thanks!

HSPICE from Synopsis and ADS from Keysight (which I use) also have the
HB engine.

I am mostly using ngpsice, because it's very easy to script (I have a bunch
of perl scripts that feed simulations into a Grid Engine cluster, extract
data and analyzse it). Is there any big advantage of the commercial spice
engines that would make them worth considering? And would the license alow
to run hundreds of instances in parallel?
(Yes, I am doing crazy things :-)

Attached are some results of a simple transient simulation using Hspice
M 2017.03, BBspice A/D 5.2.3 and ADS 2016.01. It's basically *V1 1 0 SIN
0 1 1Meg *and then .FOUR 1Meg V(1) in Hspice, VspecTran in ADS and
spectra computed using postprocessor in BBspice and ADS. As you can see,
there are some differences... To be fair, possibly there are some
simulator-specific settings/methods that could improve the results and
you should figure it out yourself what's the way to get the best results
from your spice. See
http://www.audio-perfection.com/spice-ltspice/distortion-measurements-with-ltspice.html

Commercial spice engines may have lower computational noise and shorter
simulation times. For example my out-dated BBspice (which is commercial
too by the way) crashed several times before I got some results, while
it used little RAM and only about 10-12% of available processor
resources... I intended to get you Pspice results of this simulation as
well, but I gave up after half an hour and about 1% of progress.

		Attila Kinali

Best regards,
Rafael Gajanec

Hi Attila, On 27-Oct-17 8:25 PM, Attila Kinali wrote: > Hi Rafael > > On Sun, 22 Oct 2017 17:20:52 +0200 > Rafael Gajanec<rgajanec@vercet.com> wrote: > >> you haven't specified what sort of circuits would you like to simulate, > Simplified, they are differential amplifiers driven into saturation. > A bit more detailed, I am looking at ring oscillator stages and sine-to-square > conversion circuits and their behaviour regarding various key factors > (note: I am not sure what the key factors are, yet) Oscillator design - that's what I found HB simulation particularly useful for. It gives you almost instant results, compared to the transient simulation, say 10 seconds instead of 5 hours! Just imagine what it means if you are trying to tune several parameters of an oscillator... The only other reasonably fast and accurate way I can think of is to build the bloody circuit and measure it using some expensive equipment. > >> but maybe the answer is Harmonic Balance. > Hmm.. I didn't know about Harmonic Balance. I have some reading up to do. > Thanks! > >> HSPICE from Synopsis and ADS from Keysight (which I use) also have the >> HB engine. > I am mostly using ngpsice, because it's very easy to script (I have a bunch > of perl scripts that feed simulations into a Grid Engine cluster, extract > data and analyzse it). Is there any big advantage of the commercial spice > engines that would make them worth considering? And would the license alow > to run hundreds of instances in parallel? > (Yes, I am doing crazy things :-) Attached are some results of a simple transient simulation using Hspice M 2017.03, BBspice A/D 5.2.3 and ADS 2016.01. It's basically *V1 1 0 SIN 0 1 1Meg *and then *.FOUR 1Meg V(1)* in Hspice, VspecTran in ADS and spectra computed using postprocessor in BBspice and ADS. As you can see, there are some differences... To be fair, possibly there are some simulator-specific settings/methods that could improve the results and you should figure it out yourself what's the way to get the best results from your spice. See http://www.audio-perfection.com/spice-ltspice/distortion-measurements-with-ltspice.html Commercial spice engines may have lower computational noise and shorter simulation times. For example my out-dated BBspice (which is commercial too by the way) crashed several times before I got some results, while it used little RAM and only about 10-12% of available processor resources... I intended to get you Pspice results of this simulation as well, but I gave up after half an hour and about 1% of progress. > > Attila Kinali Best regards, Rafael Gajanec
BK
Bob kb8tq
Sat, Oct 28, 2017 3:08 PM

Hi

The “fun part” of harmonic balance is making sure you are not off in a corner
case where the results are not as good as they might otherwise be. Maybe not
as much an issue for a VCO as for some other structures.

Bob

On Oct 28, 2017, at 7:36 AM, Rafael Gajanec rgajanec@vercet.com wrote:

Hi Attila,

On 27-Oct-17 8:25 PM, Attila Kinali wrote:

Hi Rafael

On Sun, 22 Oct 2017 17:20:52 +0200
Rafael Gajanecrgajanec@vercet.com  wrote:

you haven't specified what sort of circuits would you like to simulate,

Simplified, they are differential amplifiers driven into saturation.
A bit more detailed, I am looking at ring oscillator stages and sine-to-square
conversion circuits and their behaviour regarding various key factors
(note: I am not sure what the key factors are, yet)

Oscillator design - that's what I found HB simulation particularly useful for. It gives you almost instant results, compared to the transient simulation, say 10 seconds instead of 5 hours! Just imagine what it means if you are trying to tune several parameters of an oscillator... The only other reasonably fast and accurate way I can think of is to build the bloody circuit and measure it using some expensive equipment.

but maybe the answer is Harmonic Balance.

Hmm.. I didn't know about Harmonic Balance. I have some reading up to do.
Thanks!

HSPICE from Synopsis and ADS from Keysight (which I use) also have the
HB engine.

I am mostly using ngpsice, because it's very easy to script (I have a bunch
of perl scripts that feed simulations into a Grid Engine cluster, extract
data and analyzse it). Is there any big advantage of the commercial spice
engines that would make them worth considering? And would the license alow
to run hundreds of instances in parallel?
(Yes, I am doing crazy things :-)

Attached are some results of a simple transient simulation using Hspice M 2017.03, BBspice A/D 5.2.3 and ADS 2016.01. It's basically *V1 1 0 SIN 0 1 1Meg *and then .FOUR 1Meg V(1) in Hspice, VspecTran in ADS and spectra computed using postprocessor in BBspice and ADS. As you can see, there are some differences... To be fair, possibly there are some simulator-specific settings/methods that could improve the results and you should figure it out yourself what's the way to get the best results from your spice. See http://www.audio-perfection.com/spice-ltspice/distortion-measurements-with-ltspice.html

Commercial spice engines may have lower computational noise and shorter simulation times. For example my out-dated BBspice (which is commercial too by the way) crashed several times before I got some results, while it used little RAM and only about 10-12% of available processor resources... I intended to get you Pspice results of this simulation as well, but I gave up after half an hour and about 1% of progress.

		Attila Kinali

Best regards,
Rafael Gajanec
<Hspice.png><BBspice.png><ADS.png>_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi The “fun part” of harmonic balance is making sure you are not off in a corner case where the results are not as good as they might otherwise be. Maybe not as much an issue for a VCO as for some other structures. Bob > On Oct 28, 2017, at 7:36 AM, Rafael Gajanec <rgajanec@vercet.com> wrote: > > Hi Attila, > > On 27-Oct-17 8:25 PM, Attila Kinali wrote: >> Hi Rafael >> >> On Sun, 22 Oct 2017 17:20:52 +0200 >> Rafael Gajanec<rgajanec@vercet.com> wrote: >> >>> you haven't specified what sort of circuits would you like to simulate, >> Simplified, they are differential amplifiers driven into saturation. >> A bit more detailed, I am looking at ring oscillator stages and sine-to-square >> conversion circuits and their behaviour regarding various key factors >> (note: I am not sure what the key factors are, yet) > Oscillator design - that's what I found HB simulation particularly useful for. It gives you almost instant results, compared to the transient simulation, say 10 seconds instead of 5 hours! Just imagine what it means if you are trying to tune several parameters of an oscillator... The only other reasonably fast and accurate way I can think of is to build the bloody circuit and measure it using some expensive equipment. >> >>> but maybe the answer is Harmonic Balance. >> Hmm.. I didn't know about Harmonic Balance. I have some reading up to do. >> Thanks! >> >>> HSPICE from Synopsis and ADS from Keysight (which I use) also have the >>> HB engine. >> I am mostly using ngpsice, because it's very easy to script (I have a bunch >> of perl scripts that feed simulations into a Grid Engine cluster, extract >> data and analyzse it). Is there any big advantage of the commercial spice >> engines that would make them worth considering? And would the license alow >> to run hundreds of instances in parallel? >> (Yes, I am doing crazy things :-) > Attached are some results of a simple transient simulation using Hspice M 2017.03, BBspice A/D 5.2.3 and ADS 2016.01. It's basically *V1 1 0 SIN 0 1 1Meg *and then *.FOUR 1Meg V(1)* in Hspice, VspecTran in ADS and spectra computed using postprocessor in BBspice and ADS. As you can see, there are some differences... To be fair, possibly there are some simulator-specific settings/methods that could improve the results and you should figure it out yourself what's the way to get the best results from your spice. See http://www.audio-perfection.com/spice-ltspice/distortion-measurements-with-ltspice.html > > Commercial spice engines may have lower computational noise and shorter simulation times. For example my out-dated BBspice (which is commercial too by the way) crashed several times before I got some results, while it used little RAM and only about 10-12% of available processor resources... I intended to get you Pspice results of this simulation as well, but I gave up after half an hour and about 1% of progress. > >> >> Attila Kinali > > Best regards, > Rafael Gajanec > <Hspice.png><BBspice.png><ADS.png>_______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.