• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. sum of sampled_noise output spectrum, how to access the...

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 128
  • Views 9230
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sum of sampled_noise output spectrum, how to access the phase information?

NewScreenName
NewScreenName over 2 years ago

Hi all,

I am trying to simulate the pnoise of a circuit whose output of interest is then passed through a high pass FIR filter x(n)-x(n-1)+x(n-2)-x(n-3)+x(n-4)-...-x(n-L-1) with L even number.

Because the noise I am interested in, is the one after this filtering process, I have tried to implement this filter in a verilogA model, where I had to put the ignore hidden states option, but the result is I get 0 noise at the output of such model. Is that because the noise is not retained once electrical nets are assigned to variables within the verilog model?

As an alternative, I tried to simulate L cycles of the circuit, performing one pnoise_sampled point for each of these. The idea was to then take the L output noise power spectra and sum/subtract them accordingly to the FIR operation. However this is not yielding expected results. I see the output noise spectrum is not a complex number, therefore I guess it is just showing the absolute values and this would explain why I do not see the expected cancelation of the noise within certain portion of the frequency spectrum.

Is there a way to have a meaningful sum of the output noise at different time points, like for example by accessing the actual output power spectrum with its phase information?

Are there maybe more suitable ways to simulate this? (transient noise would require me very long simulations, so would be the last option if possible

Thank you

Best regards)

  • Cancel
Parents
  • Frank Wiedmann
    Frank Wiedmann over 2 years ago

    How about taking the spectrum of the sampled noise and multiplying it by the transfer function of the FIR filter in the frequency domain?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Frank Wiedmann
    Frank Wiedmann over 2 years ago

    How about taking the spectrum of the sampled noise and multiplying it by the transfer function of the FIR filter in the frequency domain?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Frank Wiedmann

    Dear NewScreenName,

    In addition to Frank's good suggestion, I would like to add a few comments if I may regarding your post and some of the observations in your post.

    1. I think a little more background regarding the nature of the circuit subject to the FIR filter might allow for some more specific suggestions from the experts, such as Frank, who monitor this Forum. For example, is its output quantized or does it undergo quantization as part of your FIR filter? What generic type of circuit are you simulating? Is the follow-on FIR filter used as an anti-aliasing filter or representing some type of noise filter to provide a standards based measurement? Are your signals periodic?

    2.

    NewScreenName said:
    Is that because the noise is not retained once electrical nets are assigned to variables within the verilog model?

    Assigning an input signal (i.e., the terminal voltage of a verilog-A block) to an internal verilog-A signal will retain the terminal voltage - irrespective if it is noise. However, if you are averaging the terminal voltage over some period of time and it is zero-mean based noise, its average may be zero. Are you doing any averaging?

    3.

    NewScreenName said:
    I see the output noise spectrum is not a complex number,

    The computed noise spectrum can be a complex number. For example, the ViVA dft() function returns a real and imaginary component at each spectral frequency. When plotted in ViVA, it will display the magnitude. You can access the real and imaginary components. The psd() function, by its nature, is a real quantity.

    4.

    NewScreenName said:
    Is there a way to have a meaningful sum of the output noise at different time points, like for example by accessing the actual output power spectrum with its phase information?

    I'm not sure I understand what you mean by "time points" as computing a spectrum from a time domain simulation requires a finite time window of simulation data. Hence, computing a spectrum from "different timepoints" is not something I think I understand. You could use take the dft() over a number of time intervals separated in time if that is close to what you are looking to do. It will retain phase information as I noted in my item 3.

    5.

    NewScreenName said:

    Are there maybe more suitable ways to simulate this? (transient noise would require me very long simulations, so would be the last option if possible

    I really need to better understand the nature of your circuit and your goal to provide a suggestion that might be useful - sorry!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to Frank Wiedmann

    Dear Frank, thanks for your reply.

    First some extra context, as suggested by ShawnLogan: I am simulating an OSR ADC, with a sampling frequency of 1/Ts, and the FIR filter's goal is noise filtering. Chopping is employed, therefore every sample swaps the polarity of input signal. However at this point I am looking at the noise at the input of the comparator (no quantization accounted for, I just want to see the noise at that point in the system).

    The simulation I have done is a pnoise where the pss has a duration L*Ts and I looked at L sampled noise (one each period Ts at the time point of interest)


    The reason why I have not done it how you suggest, is that the filter acts on L samples to yield one output (OSR ADC) and chopping is employed, therefore, the inputs are swapped, reason why I believe I cannot just take the sampled noise of one of the L samples and pass it through the FIR transfer function, I must first obtain the spectrum affected by the chopping operation.

    I was hoping to get that in facts by summing and subtracting the output noise power given by the L samples according to the FIR equation, I'd expect this to shift tom higher frequencies part of the flicker noise in my circuit, and perform also the filtering.

    Maybe you will have a better suggestion, but in the meantime I was wondering, is there a mistake in the way I sum the output noise power spectra? I just plot them from direct plot -> main form, send to calculator and sum/subtract L of them according to the FIR equation. Maybe this way ma I just summing the magnitudes?

    Thank you

    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to ShawnLogan

    Dear ShawnLogan,

    Regarding your points:

    1. For the background, I hope my reply to Frank gave enough?

    2. the input signal of the Verilog-A model internally was not assigned to an internal signal (by signal I suppose you meant an electrical net, right?) but just to a real variable. This is why I wondered whether this approach would be correct for the pnoise small signal analysis? I suspect those real variables (not electrical) cannot retain noise?

    3. How can I access that? When I do imag(getData("out" ?resultsDir ?result "pnoise_sample_pm1"))) for example, I will get a zero signal across all spectrum, which I would not really expect. Am I doing something wrong here?

    4. I hope after giving more context it sounds clearer now? I run a pss simulation, of L periods of my ADC sampling frequency, and chose L time points where to compute the pnoise

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to NewScreenName

    Dear NewScreenName,

    NewScreenName said:
    . For the background, I hope my reply to Frank gave enough?

    Yes - your description was very good and very helpful to better understand your methodology and question!

    NewScreenName said:
    2. the input signal of the Verilog-A model internally was not assigned to an internal signal (by signal I suppose you meant an electrical net, right?) but just to a real variable.

    I think I might need to see an example to better understand why the noise cannot be captured by the verilog-A model. Sorry!

    NewScreenName said:
    3. How can I access that? When I do imag(getData("out" ?resultsDir ?result "pnoise_sample_pm1"))) for example, I will get a zero signal across all spectrum, which I would not really expect. Am I doing something wrong here?

    Now that I understand your methodology better, I can make a comment or two. The reason you cannot access the imaginary part of your signal "pnoise_sample_pm1" that it represents a power spectral density and hence is a real quantity. Therefore, your proposed methodology to use the two different phase noise spectrum in an arithmetic operation to obtain the chopped spectrum does not appear to be a good estimate of the chopped spectrum.

    After thinking about your basic problem, I am thinking a transient noise simulation may be the most appropriate simulation to estimate your filtered output noise. I will continue to think about it, but that is my current thinking.

    Shawn 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to ShawnLogan

    Dear ShawnLogan,

    Thank you very much for your help. That is what I suspected, the output noise power is given as real quantity, however I suppose internally the simulator computes the transfer function of the noise sources to the sampled time point, to properly take into account the time varying nature of the circuit? And therefore if this quantity was somehow accessible my approach should work, but because I guess the output of the noise simulation is already given as an absolute value, the relationship between different sampled time points is lost. Is this correct? If so, and if there was a way to access the output noise together with both magnitude and phase this would have already been mentioned?

    Regarding the verilogA model, here it is the verilogA code:

    (* ignore_hidden_state *) module noise_filter(vss, vdd, vin_meas_clk, rst_clk, vin_p, vin_m, is_even_smpl, vout_filtered);

    inout vss, vdd;
    input vin_meas_clk, rst_clk, is_even_smpl, vin_p, vin_m;
    output vout_filtered;

    electrical vss, vdd;
    electrical vin_meas_clk, rst_clk, is_even_smpl, vin_p, vin_m;
    electrical vout_filtered;

    parameter integer OSR = 8 from [1:inf);

    real vout_filtered_r;

    analog begin

    @initial_step begin
    vout_filtered_r = 0;
    end

    @cross( V(vin_meas_clk)-V(vdd)/2, +1) begin
    vout_filtered_r = V(is_even_smpl) > V(vdd)/2 ? vout_filtered_r + V(vin_p,vin_m) : vout_filtered_r - V(vin_p,vin_m);
    end


    V(vout_filtered)<+transition(vout_filtered_r/(1.0*OSR), 0, 10p, 10p);

    @cross( V(rst_clk)-V(vdd)/2 , +1) begin
    vout_filtered_r = 0;
    end


    end
    endmodule

    Regarding your last point, I agree on the transient noise, however given the very low noise frequencies into play, it would take very long simulations and was hoping for a faster solution during the first design phase.

    Thank you very much

    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to NewScreenName

    A few thoughts on this:

    1. Adding the ignore_hidden_state is risky in this case - it's very likely to just give the wrong output for vout_filtered because vout_filtered_r absolutely is a hidden state variable (it's only updated on crossing points of the clocks, and the state is retained between these events; PSS has no visibility of that). All you've done is suppress the check - it will not make the model work correctly. If you need that, you'd need to use some kind of node-based storage (see Ken Kundert's use of a titrating capacitor in Hidden state in SpectreRF)
    2. Noise analyses by necessity compute the total noise power - that's done by summing up the total noise power from each contributor.
    3. Even if there was some way of retaining the phase of the noise powers somehow, I don't think would do what you want anyway. The sampled pnoise analysis gives you the time-averaged noise with an ideal sampler sampling at the strobe/sample point that has been requested. Since you can't get this information, it's a moot point anyway!
    4. You can certainly see how the noise power varies over the period at different sample points.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to Andrew Beckett

    Dear Andrew,

    Thank you for your feedback. Regarding some of your points:

    3. I am not sure if I understand what you mean. You mention: "The sampled pnoise analysis gives you the time-averaged noise with an ideal sampler sampling at the strobe/sample point that has been requested. Since you can't get this information, it's a moot point". I could not understand which information can't I get?

    Also, according to my understanding I would assume that low frequencies noise components (say around  20Hz) would be counted as nearly constant by the pnoise when sampled in two time points which differ by, say 100ns. Now clearly when I subtract the noise obtained in these two points, if no phase information is retained, I will get a meaningless result, however if the the phase information was retained I would expect to have the noise components around 20Hz to be canceled, isn't it?

    I guess then the only viable solution is transient noise? Or should I see the proper cancellation effect when I do this filtering operation within the pnoise, by a properly written verilogA model (no hidden states), and avoiding instead the workaround (which I discussed here) of summing the output noise powers at different time points?

    4. This however will not tell me what would happen when those different sample points are combined together via summation, subtraction as phase information is missing, right?

    A further question, related (but I will post a separate post if preferrable): I followed the instructions here: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000007MViHEAW&pageName=ArticleContent to print noise summary to a txt file. Unfortunately it seems to work for noise analysis, or pnoise when noise type is "timeaverage", however when it is "sampled(jitter)" it doesn't work anymore. What I tried to do was to simply replace noiseSummary('integrated ?result "pnoise" ?from 1000 ?to 100000 ?output "./noise_pnoise.txt" ?hierLevel 1 ?deviceType 'all ?noiseUnit "V^2") with noiseSummary('integrated ?result "pnoise_sample_pm0" ?from 1000 ?to 100000 ?output "./noise_pnoise.txt" ?hierLevel 1 ?deviceType 'all ?noiseUnit "V^2") but I just obtain an eval err (as well as with leaving ?result "pnoise"). How can I get the same noise summary printed when I am doing sampled(jitter) pnoise?

    Thank you

    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to NewScreenName
    NewScreenName said:
    I could not understand which information can't I get?

    What I meant was that it's only got the power information and no phase, you can't get what you want, so to some extent it's irrelevant what's happening inside the simulator.

    NewScreenName said:
    however if the the phase information was retained I would expect to have the noise components around 20Hz to be canceled, isn't it?

    It's very hard to imagine what might have been the output given that it doesn't work that way! You don't have the phase information and it can't produce that, so this is the kind of "moot point" I was talking about. It's a bit pointless theorising about what you might be able to do if the simulator worked differently.

    NewScreenName said:
    This however will not tell me what would happen when those different sample points are combined together via summation, subtraction as phase information is missing, right?

    No. I'm not sure combining the results from different sample points makes sense - if you want to do that, you could use a Verilog-A model to do that, I guess (sorry, I didn't read through the full details of what you are trying to do with your Verilog-A model - it's a holiday here...)

    NewScreenName said:
    A further question, related (but I will post a separate post if preferrable):

    I'll have to check that out to see what happens.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Andrew Beckett

    Dear NewScreenName,

    As I read through your recent posts, in your most recent, you noted:

    NewScreenName said:
    What I tried to do was to simply replace noiseSummary('integrated ?result "pnoise" ?from 1000 ?to 100000 ?output "./noise_pnoise.txt" ?hierLevel 1 ?deviceType 'all ?noiseUnit "V^2") with noiseSummary('integrated ?result "pnoise_sample_pm0" ?from 1000 ?to 100000 ?output "./noise_pnoise.txt" ?hierLevel 1 ?deviceType 'all ?noiseUnit "V^2") but I just obtain an eval err (as well as with leaving ?result "pnoise").

    You mentioned in an earlier response that your sampled pss/pnoise analysis was run for L*Ts where Ts is the period of your ADC clock (i.e., Ts = 1/fs, fs in Hz) and L is the number of sample periods. If you run a sampled jitter analysis, there is an inherent bandwidth limitation of 1/2 the sample frequency. With a pss period of L*Ts, I think your upper frequency limit will be 1/(2*L*Ts). I don't know your variables L and Ts, but might the value of 1/(2*L*Ts) be less than your specified minimum integration limit of 1000?

    In fact, your upper pnoise analysis frequency should not exceed 1/(2*L*Ts).

    As an example, suppose your ADC fs = 100 kHz, and L = 100, then the maximum upper frequency should be set to:

    1/(2*100*(1/100e3))  = 500 Hz.

    Is there any chance your value of 1/(2*Ls*Ts) is less than the 1000 Hz "?from" value in your noiseSummary() expression for sampled jitter?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to ShawnLogan

    Dear ShawnLogan,

    I used a Ts*L period in the pss because I hoped to get the low frequencies filtering discussed above via linear combination of the L sampled noise power. The actual sampling frequency of the ADC is 1/Ts, hence the folding due to sampling, according to me should be limited up to 1/(2*Ts). After the FIR filter action which "averages" or anyway processes the L samples into one result, then the bandwidth limitation would become 1/(2*L*Ts).

    The integration limits you refer to are arbitrary, as they come from a separate testbench used purely to test the noiseSummary functionality on sampled(jitter) pnoise.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information