The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> RF Simulators >> How pnoise is computed
https://designers-guide.org/forum/YaBB.pl?num=1565624996

Message started by scc28x on Aug 12th, 2019, 8:49am

Title: How pnoise is computed
Post by scc28x on Aug 12th, 2019, 8:49am

I have been trying to intuitively understand how pnoise is computed after running a PSS simulation. My grasp is that a circuit is linearized about its periodic operating point when driven by a periodic waveform. During pnoise analysis, the spectrum of the noise sources (provided by device model) is then translated to the output via the transfer function obtained in PSS. As a result, the output noise has the correlation/folding effects of all the noise sources.

My questions is with regard to the following statement in the cadence manual: ...the simulation computes the total time-average noise at an
output over a given frequency range...

Also, in a separate presentation (unfortunately, I forgot the source), it is mentioned that "pnoise computes the time-averaged noise over one period of the periodic steady state".

I have a tough time thinking through what "time-average noise" means. I gather from K. Kundert's "Introduction to RF simulation and its application" that pnoise is similar to a spectral analyzer which computes the time-averaged PSD of one particular node. I understand this in the sense that PSD displayed can be thought of as taking the average of multiple FFT over the span of time in a cyclostationary system to get an idea of noise performance of a system because its PSD is never constant. Is that what "time-average" means in the simulator as well?

If so, why does the simulator need to do time-average? It already has the PSD of the devices provided by the model. Doesn't the simulator just take the PSD and use the PXF to transfer the noise profile to the output? What is actually "time-averaged"? Also, why is it "time-averaged" over the period of the PSS? What does this statement mean?

Any insight is appreciated. Thanks.

Title: Re: How pnoise is computed
Post by Ken Kundert on Aug 12th, 2019, 11:59am

I don't believe that understanding the details of how PNnoise works is helpful in its use. Instead, the important insights come when you understand what you already know, that the circuit is linearized about a periodic operating point and a periodically time-varying representation is created that allows small signal analysis. That is really as deep as you need to go as far as how the analysis works.

I will correct one misconception you have. It is true that PNoise computes the time-average noise, but that is a post-processing step that is used to produce a widely useful result. The underlying analysis does not average the noise. In fact there are many variants of PNoise that do not average the noise or average the noise in specialized ways. Examples include the sampled noise and correlated noise variants.

I encourage you to take a look at Noise in mixers, oscillators, samplers, and logic: an introduction to cyclostationary noise.

-Ken

Title: Re: How pnoise is computed
Post by scc28x on Aug 12th, 2019, 12:25pm

I found the following thread:
https://designers-guide.org/forum/YaBB.pl?num=1554838519

which is a similar question. Quoting there:
"SpectreRF performs a detailed noise analysis including all correlations, and then presents the time-average of the noise. So the time-averaging only occurs after the noise leaves the circuit and is being processed for display.

This is very analogous to the case where you are observing the noise of a circuit with a spectrum analyzer. The circuit processes the noise including the effect of all correlations, and the result is observed by the spectrum analyzer when then computes the time-average of the noise before displaying it."


Unfortunately, I am still not able to picture what pnoise is doing which is "time-averaging". For example, let's say PSS is obtained at period = 1 second. If we have 1024 data points of system output voltage within 1 second, we will observe 1024 different noise values due to operating point change of the circuit (cyclostationary nature). What is getting time-averaged exactly?


Title: Re: How pnoise is computed
Post by scc28x on Aug 12th, 2019, 1:09pm

Thanks for your comment, Ken. I read through "An introductory to cyclostationary noise". So when literature says:

When noisetype=sources (older version of ADE) is chosen, the "time-average" of the noise at the output is computed as a spectral density versus frequency.

Does that "time-average" phrase refer specifically to the autocorrelation procedure which is applied to the time-domain noise data?

Essentially, is it similar to the post-processing that we would have to do ourselves after running "transient noise" simulation? That is, to take the fourier transform of the autocorrelation function to obtain the PSD? People refer to this entire routine as "taking time average noise"?

Thanks again.

Title: Re: How pnoise is computed
Post by Ken Kundert on Aug 12th, 2019, 2:56pm

PNoise starts with a PXF analysis on the periodically time varying linear representation of the circuit about it periodic operating point, which is used to compute the transfer functions from every noise source to the output. The output noise is then computed by processing the raw noise sources by these transfer functions and accumulating the resulting output noise. The averaging is effectively done in the frequency domain rather than the time domain, so it is done 'over all time'. The PSS period and time points are only used when constructing the periodically time-varying linear representation. As such, they play no role in the averaging.

-Ken

Title: Re: How pnoise is computed
Post by scc28x on Aug 12th, 2019, 4:06pm

So, the "time" in noisetype=timeaverage has nothing to do with time domain, but it is referring to averaging of PSD throughout all "times" in the PSS period in freq domain. I understand that now. Thank you.

A more practical question I have about your spectral analyzer analogy: Is it true that PSD in a LTV but cyclostationary system, under a real spectral analyzer, is really like what we should see in PNoise result?

Let's say if I have a very high bandwidth spectral analyzer, will I be seeing the PSD changing as my system operating point is changing?

For example, if I am measuring the PSD of a switched capacitor filter via a spectral analyzer in baseband, and able to slow down the switching frequency dramatically, I suppose I will be seeing two different PSD's at the two different clock phases. In that case, wouldn't the PNoise result be incorrect since it is taking "time-averaged" PSD of the two phases and giving me only one PSD profile?

Thanks again.


Title: Re: How pnoise is computed
Post by Ken Kundert on Aug 12th, 2019, 5:07pm

All real spectrum analyzers have a bandwidth. That bandwidth sets the effective averaging period. If the characteristics of the signal are changing at a rate that is above the bandwidth they are averaged, if they change at a rate below the bandwidth, then output of the spectrum analyzer follow the changes.

To see this, imagine you have a high frequency signal generator that turns on and off once a second. If you set the bandwidth of the spectrum analyzer to be significantly above 1Hz, then you will see the signal level displayed by the analyzer pop up and down at a rate of 1Hz.  If you set the bandwidth of the analyzer to be significantly below 1Hz, then you will see an averaged result.  Of course, in this second case the spectrum analyzer updates much more slowly, taking well over 1 second for each update.

With PNoise the effective bandwidth is 0Hz, meaning it is as if the analysis starts averaging before the big bang and continues beyond the heat-death of the universe, and then displays the results.

Thus, I would say you have it backward. It is not the results from PNoise that are inaccurate for slow variations, it is the spectrum analyzer. After all what is promised is the time-average of the result, which is what PNoise provides. The averaging provided by the spectrum analyzer breaks down if the characteristics of the signal are changing slowly.

-Ken

Title: Re: How pnoise is computed
Post by scc28x on Aug 12th, 2019, 5:26pm

bravo! Wonderful day at work. Appreciate your time.

Title: Re: How pnoise is computed
Post by Vuvuzela on Jan 24th, 2020, 1:17am

I also have been confused on how pnoise is computed, I'm learning a lot here.

Title: Re: How pnoise is computed
Post by Slater on Jan 24th, 2020, 10:42am

Hi Ken and all,

This is very interesting. Does this apply to other PSS-related analysis, such as PSTB?

That is, we know for a LTI system linearized around a bias point, a small signal input results in a small signal output at the same frequency.
For a periodic system linearized around a periodic steady state, then a small signal input results in small signal outputs at various different frequencies.
Are these different outputs all "time-averaged" in the frequency domain, and then correlated to the input frequency? Is it a straight average or a weighted average, and why is that the "correct" thing to do?

I have struggled to understand how the loop gain plots of PSTB can be generated, but this thread is helping.

Thanks.


Title: Re: How pnoise is computed
Post by Ken Kundert on Jan 24th, 2020, 1:20pm

Pstb analysis is little more than two PAC analyses combined with some post processing. To understand it you need to understand two rather unrelated topics: how PAC works, and how STB analysis work.

PAC:
The first step in PAC is to compute the POP, the periodic operating point. This is the LTV representation of the circuit with the large-signal clock applied. The second step is to apply a small signal stimulus at a single frequency. This signal is modulated by the POP as it traverses the circuit, resulting in a comb spectrum that is offset by the stimulus frequency.  PAC then outputs the offset comb spectrum. The only averaging that occurs is done by the Fourier analysis when computing the coefficients of each member of the comb spectrum (the sidebands).

STB:
Loop gain is only easily defined and measured on abstract feedback loops, loops where the amplifier and feedback are ideal (unilateral with no loading effects). Abstract loops do not exist in real circuits, however because we are linearizing the circuit, we can play all kinds of tricks with linear equivalent circuits. The easiest way to understand this is to think about Grey & Meyer's method. They replace the circuit with a linear two port equivalent circuit, and then mathematically compute the loop gain using two-port parameters. Tian's method, which is used in Spectre, is similar.

-Ken

Title: Re: How pnoise is computed
Post by Slater on Jan 27th, 2020, 5:10pm


Ken Kundert wrote on Jan 24th, 2020, 1:20pm:
The second step is to apply a small signal stimulus at a single frequency. This signal is modulated by the POP as it traverses the circuit, resulting in a comb spectrum that is offset by the stimulus frequency.  PAC then outputs the offset comb spectrum.


But isn't the small-signal frequency a swept parameter in PAC analysis?
For a standard AC analysis, a small signal input results in an output at the same frequency, so as the input frequency is swept, the magnitude/phase are computed independently per point.

If the input frequency is swept for a PAC analysis, there will be multiple output spectrums, one for each input frequency. So then how is the magnitude/phase computed, if an input frequency sweep creates multiple spectrums? I thought this thread was saying the spectrums were averaged, but I misunderstood.

BTW thanks for all the literature you've written about this Ken, I've found it greatly helpful in my various internet searches.

Title: Re: How pnoise is computed
Post by Ken Kundert on Jan 27th, 2020, 11:42pm

A swept frequency domain  analysis is nothing more than a collection of independent single frequency analyses. No averaging is performed over frequency.

In the context of this thread, the averaging occurs over time. Specifically, in a noise analysis the noise is averaged over a clock cycle.

To be more specific, imagine examining the detailed noise waveform over many many clock cycles. Chop the waveform into individual cycles and line them up. There will be small differences between them due to the noise. Because of modulation effects from the circuit, the variation between the cycles will vary over the cycle. At some points in the cycle the variation will be large, at other points it will be small. Consider the output being a digital signal. The variation will tend to be small when the signal is high or low, but the variation will be high as it is transitioning between high and low. In this case, imagine sampling the output waveform once per cycle, and the same phase in each cycle. If you sample when the output is either high or low, then the variation will be small. If you sample during the transition it will be large. Now imagine sampling the noise at 100 points over the cycle and averaging them. That would be the time-average noise.

PNoise is like that, but it breaks each output frequency into a different analysis. So it starts by limiting the noise to a single frequency and computing the average noise over one cycle. Then it repeats that process over and over for each of the frequencies.

-Ken


Title: Re: How pnoise is computed
Post by Slater on Jan 28th, 2020, 3:50pm

Thanks Ken, that makes sense. Then let's say I use this knowledge for my understanding of PAC and PSTB:

First, Spectre finds the periodic operating point.
A single PAC point would apply a small signal at a single frequency f0. The output would be a comb spectrum shifted by f0.
Then a PAC sweep over frequency would be this process repeated for each frequency [f0, f1, f2, f3....] . The output spectrum of a PAC sweep is the sum of the comb spectrums from each individual input frequency.

Then according to Tian's method, PSTB is two PAC analyses which calculate both forward and reverse loop transmission, and are post-processed to output the true loop gain.

Do I have that right or am I missing something?

Title: Re: How pnoise is computed
Post by Ken Kundert on Jan 28th, 2020, 10:41pm


Quote:
The output spectrum of a PAC sweep is the sum of the comb spectrums from each individual input frequency.


No, the comb spectra are not summed. Each Fourier coefficient in a spectrum is placed into a different transfer function. Each Fourier coefficient represents a different sideband, and there is a different transfer function represents a different sideband.

With PSTP, you are interested only in the 0 sideband.

Title: Re: How pnoise is computed
Post by Slater on Jan 29th, 2020, 2:44pm

Thank you so much Ken. One last question, appreciate your patience.

So PSTB only uses the transfer function that corresponds to when the input and output are the same frequency (sideband 0). Is there a particular reason for this? Intuitively, it seems like the logical choice and I don't have anything against it, but I haven't found any literature that says why sideband 0 is used.

Title: Re: How pnoise is computed
Post by Ken Kundert on Jan 29th, 2020, 7:18pm

PSTB uses the zero sideband because you are interested in loop gain. Loop gain needs the input and output to be the same point at the same frequency.

Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 15th, 2020, 1:21pm


Ken Kundert wrote on Jan 27th, 2020, 11:42pm:
In the context of this thread, the averaging occurs over time. Specifically, in a noise analysis the noise is averaged over a clock cycle.

For my understanding I like to propose a thought experiment:
Say I would only have access to the output of PSS and sampled Pnoise analyses; what should I do to arrive at the corresponding time-average noise?
(Possibly combining something like: pnoise noisetype=timedomain noiseskipcount=0 with the corresponding PSS step sizes? Or is the sampling process filtering too much?)

Title: Re: How pnoise is computed
Post by Ken Kundert on Oct 15th, 2020, 3:40pm

I feel like this is a trick question, but here we go ...

The time average noise is the noise power averaged over the period. So you would integrate the noise power over the cycle and then divide by the length of the cycle.

-Ken

Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 16th, 2020, 1:18am

No trick question; More that I feel confident with the matter to a certain degree, but still miss that part that allows me to put it into practice. To be able to play with the matter, I mean. And feel confident.

Say that I request sampled Pnoise for the noise output at consecutive time points t1, t2, .. along the PSS cycle. Next, I could try to accumulate these noise outputs with the goal to come up with the corresponding time-average noise, but my question is: how should I do this? (I can imagine that the correlation between these separate noise outputs plays a role. I can also imagine that the sampling process itself already filters too much of the data that I need.)

So in short, would I be able to translate the output of sampled Pnoise analysis to the output of time-average Pnoise analysis? (Is it possible in theory and if so, could I access the required data?)

Title: Re: How pnoise is computed
Post by Ken Kundert on Oct 16th, 2020, 5:42pm

No, you just average them. You just have to do it using power or power spectral densities.

In stationary noise, there is one type of correlation, correlation over time. That is responsible for coloring in the noise, or a variation in the noise power spectrum over frequency.

In cyclostationary noise there is also correlation over frequency, specifically the modulation frequency. When you sample the noise, you are sampling at the modulation frequency. As a result, the modulation disappears from the sampled output (you are sampling at the same phase of the modulation period, and so the modulation disappears). The resulting sampled noise is stationary, but it is still colored. It is fully represented by a simple power-spectrum.  To get the time-average power spectrum of the entire waveform, you just have to average the power spectrums from each sample point. Of course, if the sample points are not evenly spaced you need to weight them accordingly. This is why I said you integrate the noise spectrums and then divide by the modulation period.

There is a lot of complexity to these calculations, but fortunately most of that complexity is hidden in the simulator and is being used to compute the sampled noise.

-Ken

Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 17th, 2020, 2:01am

That clarifies and simplifies a lot! Thank you so much. For some reason I imagined that the sampling process complicated matters instead of simplifying them. I had it backward!

Now, say we have carried out the integration and ended up with a single (time-averaged) PSD. How should I set time-averaged Pnoise analysis to reach a match? (usb, lsb, am or pm*)

I can imagine that to match with the AM and PM options seperately I would have needed to use correlation data over frequency, but what about the total of AM and PM options? And for USB and LSB options, probably I could reach a match with the total of both? Also, do the USB and LSB options result in different PSDs?

*According to the manual [spectre -h pnoise] all of these use single sideband convention, half of the total power.

Title: Re: How pnoise is computed
Post by Ken Kundert on Oct 17th, 2020, 3:38pm

usb, lsb, am or pm: it is not any of those. I think you want noisetype=timeaverage. That is what the simulator is expecting, I don't know how to specify that from the environment.

-Ken

Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 18th, 2020, 3:05am

When setting noisetype=timeaverage this setting seems always active and defaults to usb, from [spectre -h pnoise]:

Code:
34      noiseout=usb      Specify noise output. You can set a vector like noiseout=[usb am pm]. And all are using single sideband(SSB) convention, half of the total power. Possible values are usb, lsb, am and pm.


Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 19th, 2020, 11:30pm

This text explains recent changes in the Spectre interface: https://community.cadence.com/cadence_blogs_8/b/cic/posts/virtuoso-video-diary-performing-noise-simulation-in-spectre-rf-using-the-improved-pnoise-and-direct-plot-form-options

At the same time it does not describe the most recent Spectre (v20.1) interface, from [spectre -h pnoise]:

Code:
22      noisetype=timeaverage      Specifies computation of time-averaged or time-sampled noise information. Possible values are timeaverage, correlations, timedomain, pmjitter and sampled.


Possibly Andrew could shed some light on this?

Title: Re: How pnoise is computed
Post by Paul Geraedts on Oct 22nd, 2020, 2:45am

Ken,

You are probably right: noisetype=timeaverage should do.

Everything slowly comes back. Thank you for your time.

Title: Re: How pnoise is computed
Post by Andrew Beckett on Nov 14th, 2020, 2:57am


Paul Geraedts wrote on Oct 19th, 2020, 11:30pm:
This text explains recent changes in the Spectre interface: https://community.cadence.com/cadence_blogs_8/b/cic/posts/virtuoso-video-diary-performing-noise-simulation-in-spectre-rf-using-the-improved-pnoise-and-direct-plot-form-options

At the same time it does not describe the most recent Spectre (v20.1) interface, from [spectre -h pnoise]:

Code:
22      noisetype=timeaverage      Specifies computation of time-averaged or time-sampled noise information. Possible values are timeaverage, correlations, timedomain, pmjitter and sampled.


Possibly Andrew could shed some light on this?


Sorry for the delay - bit behind on my Designer's Guide posts...

That blog was written before the cleanup of the various modes related to sampling (timedomain, pmjitter). Some of the modes remain for legacy reasons - but the choices that are now used are timeaverage and sampled. The timeaverage mode is pretty much covered in the blog - unfortunately some of the terminology used in the noiseout choice is rather confusing unless you're simulating an oscillator - for driven circuits, most likely the terms usb, lsb, am and pm don't mean so much. Usually you'd want to use "usb" in that case - this is equivalent to the old "sources" mode (mostly people didn't know what "sources" meant either, so that was not great terminology as well) - it's what you'd get on a spectrum analyser and is the easiest to understand. The other modes make more sense when you are (say) simulating the noise around a carrier frequency (e.g. an oscillator output) and you want to observe the noise in the upper sideband, the lower sideband, or find the AM or PM components from the two sidebands. This used to be computed via the "correlations" mode (under the hood from the UI), but it suffered from some accuracy problems (particularly with getting accurate AM noise).

The sampled mode allows you to compute the sampled output noise in various different ways; you can use "Edge Crossing", "Edge Delay" or "Sampled Phase" for the timing event; the first allows you to measure the sampled noise at one node based on a threshold crossing at another node (could be the same node); the Edge Delay allows you to measure the jitter delay between one node and another, and the Sampled Phase is essentially a way to strobe at an arbitrary time or set of times (i.e. the same as the old "timedomain" mode).

Not entirely sure what info you were after - but hopefully that's a high level summary that covers things well enough?

Andrew

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.