• 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. How to obtain Discrete-Time (DT) response from a switched...

Stats

  • Locked Locked
  • Replies 52
  • Subscribers 127
  • Views 30957
  • 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

How to obtain Discrete-Time (DT) response from a switched-cap (SC) circuit (integrator)?

bernd2700
bernd2700 over 3 years ago

Hello everybody!

Before I start my questions, first I have to cite from Mr. Ken Kundert’s excellent paper “sc-filters  -  Simulating with Cadence SpectreRF” the following: “Usually, with switched-capacitor circuits, designers are interested in the discrete-time behavior as switched-capacitor filters are embedded in sampled-data systems. SpectreRF is set up to report on the continuous-time behavior. As such, you must take steps to get the discrete-time behavior if that is what you need. The PNoise analysis does provide a built-in feature that can be invoked in order to determine the noise of a filter acting as a discrete-time system. Otherwise you will need to add a idealized sample-and-hold to your circuit.”

 

He wrote to me at forum “designers-guide.org/.../YaBB.pl” the following: “I'm afraid I have no experience with sampled PAC”, because this was implemented later. So I count on you, Cadence guys that hopefully YOU have an answer to me:

 

Q1: I thought (wrongly) I would obtain the DT response of a system if I specify the special option “SAMPLED” of SpectreRF Periodic-AC (PAC). This is not the case. So, if anyone please could tell me what to do to get the DT frequency response for the PAC analysis? (see graphs below)

 

Q2: Do YOU have an idea which feature can be invoked to obtain the DT system response in the PNoise analysis? As you see above, Ken Kundert indicated so, but did not say which feature. Once, he wrote to me: “I think they confused autonomous sampling (sample very T seconds) and triggered sampling (sample at a threshold crossing), and assumed that triggered sampling in PNoise was enough”.

Ad Q1:

You see an CT (Conttinuous-Time) analog Low-Pass-Filter (LPF) which is simulated with Cadence SpectreRF PAC _sampled and the result of it below.

Ok, this time, it's not a SC circuit, but this is not the topic. It rather is: How to obtain the Bode diagram of the _DT_ response of any circuit.

You can recognize the obtained spectrum is NOT symmetrical around half the sampling frequency fs/2, as I was expecting, but it still seems to show the CT response.

Many thanks in advance and best regards,

bernd2700

  • Cancel
Parents
  • SpiceMonkey
    SpiceMonkey over 3 years ago

    You have got the right DT bode plot.

    For time-averaged PAC, you have got a response looks like sinc function (green one, it looks right)
    For sampled PAC, you should get a replica response in every Fs frequecncy (blue one, it also looks right)

    The blue one seems not that accurate, if you change you frequncy display type, or try linear with smaller step, or logrithm with 100 points per decade, you will get a more accurate response: exact replica every fs and each has fs/2-symmetry .

    For CT circut, I think you could also get a sampled PAC: just place a vpulse without any connection,  then use vpulse's frequecy as pss-beat-frequency and use it's posedge as sampled event. (make sure your circuit is periodic or just simply set the input transient signal = zero).

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to SpiceMonkey

    Dear SpiceMonkey,

    Thank you for your reply!

    You write “For sampled PAC, you should get a replica response in every Fs frequecncy (blue one, it also looks right)”. Yes, you are exactly correct, I “SHOULD GET”, but I think I unfortunately “do NOT get” if I watch the blue curve. Why? Because a DT spectrum must be symmetrical around fs/2, and fs/2 in my case is 500 Hz. So I would have expected that the line is up at 0 dB again at fs = 1kHz in the Bode diagram, as it is also 0 dB for DC (here at e.g. 1 mHz since it’s a log plot). But it does NOT show 0 dB at fs = 1kHz. Instead, it goes further down with e.g. -20dB/dec, which, as a consequence, tells me, it is NOT the DT spectrum / response what I get but something else. Which simulator setup do I miss, or what I am doing wrong here? So, what to do, in order to obtain the Bode plot’s DT response, since Mr. Kundert perfectly has written in an article: “... you must understand upfront if you are interested in the CT or in the DT response of a system” => And yes, I am interested in the DT response and was thinking: This, I will get with the “PAC _sampled_” analysis at a specific (e.g. rising or falling) edge (every 1 ms), but as the Bode plot reveals, for me ( = not being symm. around fs/2) I still did NOT obtain the DT response.

    I even have 1000 points per decade, and from the below picture, you see, it is NOT symm. around fs/2 = 500 Hz, therefore your first sentence “You have got the right DT bode plot” confuses me.

    If you look at my schematic, it is exactly what I already did what you propose: I added a vpulse with 1kHz and used it for the PSS, see voltage “v1” and node “p1” there.

    Above Fig.: SpectreRF PAC sampled analysis, e.g. at rising edge (@ 500us): There is NO line going up to 0 dB again at fs=1kHz => No DT Bode plot!

    Thanks a lot so far and I am curious about your answer(s),

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700

    The problem I see with your approach is that you are trying to simulate all input frequencies at once and are going beyond the Nyquist frequency of the circuit at the same time. A sine at the input of these circuits will not just cause a frequency component at the input frequency in the output signal, but also at other frequencies (where you also might have an input signal). Have you already looked at the output spectrum when you just have a single frequency at the input?

    But the reason why you are not seeing a repetition in the result for circuit B) is probably that you are sampling the piecewise constant output signal, which causes a multiplication by the sinc function and gives you the cyan curve as a result. You could try to model Dirac sampling by only keeping every 10th sample and setting the other 9 identical samples to zero. Maybe this will give you the result you are looking for.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    Aaahhhhhhhh, Yeeeesssssssss, clear!! How easy! As you proposed, I will check with 1 freq. at a time only.

    (I would like to also do this freq. sweep automatically, but for this, I would also need then hundreds of transient sims in Cadence (1 takes currently ca. 1 hour) + DFTs + manually export the data hundreds of times + combine all this into 1 plot. Is there maybe another way what I do not think of in this moment?)

     

    Also one other thing is now clear (For the other readers, here clearly stated): By sampling with 10 kHz an already sampled signal with 1 kHz, I get, as Frank correctly said, 10 times the same value, before it changes to the next one. That can be called a “Repeater”. And a “repeater” is mathematically identical, as far as I know, with zero stuffing ( = as you propose, set the other 9 identical values to 0) PLUS a comb filter of first order, so “(1+z^-1+z^-2 ... z^-9)^1”, which causes this sinc. behaviour. I will do this (need a bit of time to do properly).

    So I obviously INADVERTEDLY created an additional, 2nd sinc. filter by doing the repeater (the first one is already inside the “DUT”), killing my expected repeating spectrum at 1 kHz at the output. Things are getting much clearer now!

     

    However, what I also need to think about in more detail, is, when now looking quickly at once glance to the following: With the 2 times in series sinc. filter for e.g. (also?) circuit A), I would expect either:

    *) Because of my 2nd inadvertedly indroduced sinc filter by doing repeating upsampling, shouldn’t for case A) the blue curve be attenuated more than the green one from the PAC (see zoomed fig. below), or:

    *) The result from the Cadence “PAC sampled time averaged” (green) should exactly match the blue, if e.g. the “PAC sampled time average” does the same effect, so to also introduce a sinc (I don’t know what does “time average” exactly)

    Or maybe this ca. 3 dB difference (from -19.82 dB to -22.98) already close to "DFT fs/2" comes from another effect?

                           (Case A, zoomed)

     

    And then, why I see a constant line with ca. 0 dB for “PAC sampled edge ris. or fal.” (not shown in this graph)? Because 1x sinc. filter should still be present from the DUT, only the 2nd one from upsampling is gone when performing the internal Cadence “PAC sampled ris./fal. edge”, because this is doing, I learned from you “ideal Dirac sampling” which doesn't show sinc behaviour. You wrote “This is also the reason why you get a straight line at 0 dB if you do a sampled PAC analysis at the output of an ideal S&H (and the result of the normal PAC analysis is simply the sinc function in this case)”. But I solely did a “PAC sampled”, not a “normal PAC”, and I still can chose to either get a “sinc.” shape (with option “time averaged” or approx. a straight line (with option rising or falling edge). But BOTH are “PAC sampled” analysis (only sub-options to select). Or, as my question from previous, I may repeat: Is statement: “PAC sampled, time avg.” = “normal PAC”, true or false? So ???

    But one step after the other ...

     

    Anyway, 1000 thanks - Very nice, Frank, that you bring it to the point!!

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    Is there maybe another way what I do not think of in this moment?

    There will be no problem with your approach if all input sources are in the same Nyquist zone, so you don't need one simulation per input frequency, just one per Nyquist zone. And of course this method will only work for a linear circuit.

    bernd2700 said:
    Or maybe this ca. 3 dB difference (from -19.82 dB to -22.98) already close to "DFT fs/2" comes from another effect?

    Without analyzing this in further detail, I would guess that it is the same effect that you see at fs/2 in this plot:

    Frank Wiedmann said:

    Here are the simulation results:

    bernd2700 said:
    And then, why I see a constant line with ca. 0 dB for “PAC sampled edge ris. or fal.” (not shown in this graph)?

    If you perform Dirac sampling at the output of an ideal S&H with the same sampling frequency, you will get exactly the same samples as if you perform Dirac sampling at the input of the ideal S&H.

    bernd2700 said:
    Or, as my question from previous, I may repeat: Is statement: “PAC sampled, time avg.” = “normal PAC”, true or false?

    True, as far as I know (Andrew, please correct me if I'm wrong).

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank ( & others),

     

    As said, thank you for pointing this out with the zero-stuffing. For all: Here is the proof, at least now for case B) : In the graphs below, the blue curve is the sampled data (with Cadence’s calculator “sample” command) with period = 100us (and thus the same values are repeated 10 times, because the period of the circuit’s switches is 1ms), and we do NOT see a DT spectrum. That is, because it was filtered away by the inherent comb filter which exists when doing repeating. If I do zero-stuffing (so as Frank proposed: set the other 9 values to 0) and thus only do “Ideal Dirac sampling”, I really get my expected DT response (red curve = symm. around the circuit’s fs/2 = 500 Hz, repeating pattern with 1 kHz)! As theory predicted, by subsequent comb-filtering the red curve, I finally get the magenta curve, which is again identical to the blue, q.e.d. .

    And if we compare this to the internal Cadence PAC (green and cyan), everything now fits nicely!

    It was a lot of work to come to this point, but everything definitely was worth it to do, and so: “Thanks Frank!” Without your help, I would not have been able to do all this completely alone by myself.

    Side info: You have to be careful with the things: DFT, zero-stuffing, comb-filtering, shifting, to do all this very properly (otherwise you easily can get sinc. behaviour at wrong frequencies, etc.). But also here is the advantage of doing this completely by oneself: You understand what's going on behind the scenes, because you know exactly what you did. (I cannot show all the details here, since it would explode the frame of this post, but at least this hint from my side.)

     

    I will now apply the same procedure for the other cases (for case A) and for the purely analog RC-LPF) and check, if finally everything fits to my expectation. 

     

    Many nice greetings so far,

    Bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to bernd2700

    Dear Frank ( & others),

     

    As said, I did now the same game for test-case “A)”. And I like it! : My manually applied procedure also here is fitting pretty well to the internal Cadence PAC, as you can see below: The blue curve is the sampled data at fs_DFT = 10kHz with repeated 10x values, because the circuit’s “fs_S&H = 1kHz. The red curve is the zero-stuffed out of the blue, so “Ideal Dirac sampling” done and thus fits to the internal “Cadence PAC sampled: ris. or fal. edge”. The cyan is the comb-filtered red and thus perfectly fits to the blue again (as previously explained). And I think, the red line can be called a DT response (everywhere 0dB is thus also symm. around fs/2!)

    What fits perfectly at lower frequencies and deviates more and more apart as frequency is increasing, is the (blue or cyan) compared to the green PAC sampled, time averaged. Around 4.5 kHz, I get a difference of 3 dB (ca. -20 dB for the blue and cyan, and -23 dB for the green). But as you said, Frank, it might be the same what you were  showing, when going close to DFT fs/2 = 5 kHz, and things would maybe resolve, if I do the game with fs_DFT sampling up to 100 kHz and thus getting the spectrum up to 50 kHz, instead of only up to 5 kHz. (Then, the transient sim. would be probably very long, so I did not do it. However what I quickly did, is to do a PAC only until 10 kHz (thus showing a spectrum until 5 kHz), but it is exactly the green curve, just plotted until 5 kHz.)

                                                          (click to enlarge)

    --------

    For my curiosity, I now input instead of a MT, only exactly 1 tone, namely with ca. 4559 Hz, and the result is:

    Here, everything sounds logical: I get alias components at fs – fin = 5 kHz – ca. 4559 Hz = ca. 441 Hz, and all its replica. As it should be now, exactly as the Cadence PAC does, only 1 input tone, I was expecting to see at 4559 Hz also this -23 dB. But instead, I see -20.07 dB.

    I also now tried to look what the PAC does. As you proposed, I take the output from the transient analysis with only that input tone of ca. 4559 Hz (in steady state condition, so close at the end of the sim. at 104.8 s) and again do “(max-min)/2” from the values. As we also see at one glance, I roughly get this 0 dB (exactly being: 20*log10(1.9556/2) = -0.19 dB), as the PAC sampled: ris. / fal. edge delivers (the straight line at 0 dB). But how does the PAC sampled, option “time averaged” work here? What to measure to get the -23 dB instead? For sure, there is also a way, but how?

    Thanks,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    But as you said, Frank, it might be the same what you were  showing, when going close to DFT fs/2 = 5 kHz, and things would maybe resolve, if I do the game with fs_DFT sampling up to 100 kHz and thus getting the spectrum up to 50 kHz, instead of only up to 5 kHz. (Then, the transient sim. would be probably very long, so I did not do it.

    I don't think that you actually need to run the simulation. Just modify your sampled signal so that you now have 100 identical samples instead of 10 indentical samples in a row.

    bernd2700 said:
    But how does the PAC sampled, option “time averaged” work here?

    This is just the nomal PAC analysis without any sampling, so you simply need to run an FFT on the output signal in order to get the result in the frequency domain.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    In principle, a good idea to do every 100th sample, but I think it will not work, as I really do not produce input tones above 5 kHz, and so my AC analysis will divide then just mathematical “noise”. Moreover, I think if I set just the parameter “fs = 100 kHz”, all the frequency vectors with the real injected sinusoids will get misaligned then (or if I increase all by factor 10, everything is just shifted by factor 10, or… ).

    --------------

    What is much more important, is:

    The following procedure EVERYTIME perfectly (almost) fits to the Cadence PAC sampled, time averaged analysis: Generate multi-sinusoids, then run a tran. analysis of the DUT, then sample the transient data (calc. command “sample”), then doing the DFTs and divide output/input. So this is my blue curve. And, I think I can summarize and state with confidence now:

     

         [ My manual MT AC analysis over the 2 DFTs ( = blue curve) ] matches [ PAC sampled, time averaged ]

     

    --------------

    However, what did only work out for test-case “A)” and B), is: By further manually doing zero-stuffing out of the blue curve, and so doing “Ideal Dirac sampling”, this (my red curves) then fits to the “Cadence PAC sampled, e.g. rising edge”, because:

    --------------

    I now tried to apply the same procedure - as completely successfully done with test-case “A)” and B) - also now for the purely analog RC-LPF circuit, and it does not fit to the PAC sampled, e.g. rising edge. The results can be seen in below graph:

    My blue curve again fits perfectly to the Cadence PAC sampled (green), e.g. time-averaged option. But this time, all options of PAC sampled produce the very same result: “rising edge”, “falling edge”, “time averaged”.

    And so, by blindly applying the same procedure again as done with the previous test cases A and B, (Sampling, DFTs, then zero-stuffing, then comb filtering), this time I get garbage (red and cyan), because the circuit this time does NOT have an (inherent) ZOH at its output where the data is repeated 10 times the same value.

    --------------

    My problem now is: I of course cannot include “switch - case” statements in my analysis, depending on a circuit! A la: If there is a ZOH-like-thing in the circuit, then the red line will fit to PAC sampled rising edge; if not, the blue curve already will fit to PAC sampled rising edge. The analysis itself is stupid and cannot know the circuit (and the circuit’s fs), and thus, the procedure has to work for EVERY circuit analyzed with it, as the Cadence PAC does!

     

    => So what can I do about that I not only get a more or less perfect matching to the “PAC sampled, time avg. option” with my own analysis, but also for the “PAC sampled, ris. or fal. edge option”, regardless of the DUT I have?

     

    Pleeeeeeaaase, give me an advice.

     

    Thanks a lot,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to bernd2700

    Sorry, guys, this phenomenon, I just saw, has nothing to do with the PAC sampled, it also occurs when I stay purely in Matlab.

    I did the following test: I got the idea and simulated the same pure analog RC-LPF, but now completely inside Matlab (over Matlab's "lsim"), and subsequently applied the very same procedure (just with other fs and number of samples) as always done now, and I get below result:

    I expect that the cyan curve will be the same as the blue, but it isn’t!

    So please, for the moment being, forget my question of the previous post (that applying the same procedure does not fit for Cadence PAC sampled, ris. or fal. edge).

    I quickly wanted to update you now with this info.

    So I just have to debug it what’s going on here ...

     

    Sorry for having asked too early, before I did this test case over pure Matlab, but my idea came just now.

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to bernd2700

    Case “Purely analog RC-LPF”: Matlab internal comparison

    First of all, case “Pure analog RC-LPF” from just above post: I did not find any errors in my scripts, so I think when doing zero stuffing, I just lose information (because concerned samples then replaced with the value “0”), and it can be proven, that the less I do zero-stuffing, the more the cyan or red line resembles the orig. blue line (graphs not shown to not overload this post).

    --------------

    Case A) = “Ideal S&H”: Comparison with extended frequency range

    The sim. results are here from my MT DFT analysis, now in extended frequency range. Originally, I sampled up to 5kHz, and now until up to 50 kHz. As expected, the results do fit perfectly also until approx. a factor 10 more in frequency, as we can see from below graphs: On the left, there is a repeated 1:1 copy from the old post just for remembering, on the right, also including the new yellow extended freq. analysis result. We see, the blue orig. 3 dB deviation at 4.5 kHz to the green Cadence PAC, time avg. is completely gone now. Now, the yellow curve fits perfectly to the green until approx. 10 kHz.

        Case A) “Ideal S&H”:

        Left figure: Repeated 1:1 copy from prev. post   ;         Right fig.: Now + yellow curve with extended MT freq. range.

    --------------

    Case “Purely analog RC-LPF”: Comparison Cadence PAC <=> My MT AC analysis

    I extended the frequency range for my MT analysis also for this case now up to 50 kHz.

    As we see, the results from my MT AC analysis below (blue), and from the Cadence PAC sampled, time avg. (also below, also blue line) PERFECTLY match!

    With my analysis’ frequency range increase from 5kHz to 50 kHz, you can see from the result below, the cyan line perfectly fits the blue line now also up to some kHz, as expected.

    Although I now additionally also used a 2nd period only out of the base frequency of some mHz and thus have steady-state condition for my DFT, we still must clearly say from approx. 5 kHz up to DFT fs/2 = 50 kHz, the cyan line does not fit the blue line. And my red line does not fit the PAC sampled, rising edge (red and orange).

    For the Cadence PAC sampled, rising edge, this performs somehow better when looking to the higher frequencies, say from 10 kHz onwards up to its fs/2: The internal deviation from the PAC sampled, ris. edge (red and orange) is not so big to its time averaged option (blue and black), as my internal deviation over my MT AC analysis between red and blue - this is bigger.

    We can compare the both red curves, one from my above MT AC analysis and one from the Cadence PAC sampled rising edge, and they should approx. yield the same result. But they do not.

    Maybe the Cadence PAC does some internal additional calibration before and / or does higher oversampling even though not requested (I have reduced, as you see, also the maxacfreq. for this purpose. But also for case A) the 2 time avg. results are really look-alike up to even fs/2 ; graph not shown here).

    => I don’t know, but maybe you, Frank, why the internal Cadence PAC sampled, ris. edge (red) is closer to its time-avg. option (black), than my MT AC analysis “Ideal Dirac sampled” (red) to my “normal DFT” (blue)? So, in other words: Why Cadence PAC sampled, rising edge seems to do not lose so much information in doing also “Ideal Dirac” sampling as mine? Which factor Cadence PAC sampled does? I here used a factor of 10 (so 1x the value, 9x zero).

     

    Thanks a lot,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700

    The sampled analyses of Spectre always sample exactly once per period (as given by the PSS fundamental frequency). You only needed to do the "zero-stuffing" because in your transient analysis, you were sampling the output with a higher frequency than the frequency of the sample-and-hold (which is not possible in sampled PAC). When you do the "zero-stuffing" on the time-continuous circuit, you effectively (down-)sample the output at a lower frequency, resulting in aliasing effects in your red curve.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700

    The sampled analyses of Spectre always sample exactly once per period (as given by the PSS fundamental frequency). You only needed to do the "zero-stuffing" because in your transient analysis, you were sampling the output with a higher frequency than the frequency of the sample-and-hold (which is not possible in sampled PAC). When you do the "zero-stuffing" on the time-continuous circuit, you effectively (down-)sample the output at a lower frequency, resulting in aliasing effects in your red curve.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    Many thanks for your answer! Unhappily, I did not understand all parts of it. Starting with the unclear parts. I always like examples.

    So, watching my simulated circuit below again: For a test I have changed now the sampling frequency of the “Ideal S&H” from orig. 1 kHz to now 10 kHz (period=100u) to not be the same as the clock source “V0” (per=1m). This still defines my fundamental beat frequency unchanged with 1 kHz in the PSS.

    You wrote: “you were sampling the output with a higher frequency than the frequency of the sample-and-hold (which is not possible in sampled PAC).”

    Yes, with my MT AC analysis, I sampled the output with a higher freq., namely with 100 kHz. But also, the Cadence PAC sampled, I tell: “Please plot me the freq. response until 100 kHz”. And so, as far as I understood correctly, when reaching this frequency, 1 sinusoid only with 100 kHz is injected into the DUT (with 1 V, I have specified). As a consequence, the PAC must sample the output with at least 200 kHz to properly fulfill Shannon (Nyquist). And so: [Output sample freq. with 200 kHz with sampled PAC] >> [Freq. of “Ideal S&H” with 10 kHz]. This is possible. But possibly, you were meaning something else, but what??

     

    You write: “The sampled analyses of Spectre always sample exactly once per period (as given by the PSS fundamental frequency).”

    So again my example: If I want to see the freq. response at, say, 100 kHz, the “PAC sampled” must sample with >= 200 kHz. If this is, as you write “once per period”, then this period is 5us. But the PSS fundamental freq. is given with period 1ms. So it is 200 times per period. So for me, it is either not once per period or not given by the PSS fundamental period. So also here, sorry, I have no clue, what you mean. For me, the PSS is there to find a large-signal valid operating point of the circuit.

     

    You write: “When you do the "zero-stuffing" on the time-continuous circuit, you effectively (down-)sample the output at a lower frequency, resulting in aliasing effects in your red curve.”

    Ok, yes, this part is clear, because I did not allow even a still higher sampling frequency for my RC-LPF DFT result. I somehow wanted to compare my MT AC analysis to PAC sampled: And if I tell the PAC (or PSS in that case) “maxacfreq. = 100 kHz”, then I expected also comparable results. Indeed, we see, in repeated below graphs, that also the red PAC sampled curve with ”PSSmaxacfreq=100k” is indeed “noisy”, especially above 20 kHz, and the spikes of the red curve deviate to the blue line by also really a lot of dB, but in-between, the red curve reaches the blue again, and so I feel, the PAC sampled performs still “better” than my MT AC analysis, where between the peaks, my red curve does not reach the blue curve again (see yellow circles).

           Left: Cadence PAC sampled                          Right:      My MT AC analysis

           Case “Purely analog RC-LPF”, output node "Vo":

     

    Explanation for all the other readers (which seem to be quite a lot for this special topic, as I saw now with 2330 views, wow!):

    I have chosen “fs_DFT = 100kHz” (as said to be comparable to Cadence PAC sampled with maxacfreq.=100k), so my samples are e.g. [y1 y2 y3 ...] for the CT “RC-LPF” circuit. As you have proposed, Frank (but for case B) ), I do zero-stuffing also here with the same procedure [ y1 zeros y11 zeros y21 zeros ... ], so I throw away the samples y2 until y10 and so on. This means from signal-processing point of view, I did a “brute-force” decimation (by factor 10), I mean, without an additional anti-aliasing LPF, therefore Frank has written “... resulting in aliasing effects in your red curve”.

    So I will change now my procedure for the zero-stuffing method and will try in the following: [ y1 zeros y2 zeros y3 zeros ... ]. But this means, I have to effectively increase the sample rate now to fs_DFT = 1MHz (if I keep factor 10). And I will check, if I will obtain a DT for cases A) and B) and a CT response for the case “purely analog RC-LPF”.

     

    Short Summary about CT and DT response of a circuit:

    Because for cases A) and B), it’s the circuit which delivers more times the same value and in the case “RC-LPF” not. That’s why you, Frank, have written “If the circuit isn’t DT, you won’t get a DT response”. Now you made it clear to me, Frank (1000 Thanks!!!), but originally, it completely confused me from Ken Kundert’s statement: “You must decide upfront if you are interested in the CT or DT behavior of a circuit”. And so, I thought then, I can freely chose, which is not true. Ken Kundert means: If you have any purely CT circuit (e.g. this RC-LPF) and want to see its DT response (because e.g. it gets sampled later by a customer, so by a subsequent, additional CIRCUIT), you have to do steps if you also want to see what will this DT behavior be in the end (so you have to modify your CIRCUIT, e.g. install an additional “Ideal S&H” block). But in any case, you have to change your circuit, to see a DT for a purely CT DUT, like the RC-LPF. If you only change your analysis type (e.g. from “PAC sampled, option time averaged” to “PAC sampled, option rising edge”) for a purely CT DUT, you should see every time the same Bode plot, because a CT circuit does not have a DT answer. Correct, Frank?

    And this I will check if it is true not only for the Cadence PAC for all types of CT and DT DUTs, but also over my MT AC analysis procedure, now with “real” zero-stuffing (up-sampling) (but it will take some time)...

     

    Many thanks and nice greetings,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    As a consequence, the PAC must sample the output with at least 200 kHz to properly fulfill Shannon (Nyquist).

    No, sampled PAC always samples with the PSS fundamental frequency. Of course it is possible to sample with a frequency that does not fulfill Shannon (Nyquist), you just have to deal with aliasing in this case. There are always many ways to interpret a sampled signal; sometimes knowledge about the frequency of the input signal helps with the correct interpretation. I already told you earlier:

    Frank Wiedmann said:
    The sampled PAC analysis only looks at the output at the input frequency (because I chose maxsideband=0 as a parameter) and only plots it at this frequency. The fact that the sampled output signal could also be interpreted as coming from different (aliased) frequencies is not taken into account here. If you also want to see the result at the aliased frequencies, you can set maxsideband to a larger value, which will give you copies of the result shifted by multiples of the pss fundamental frequency.

    bernd2700 said:
    And if I tell the PAC (or PSS in that case) “maxacfreq. = 100 kHz”, then I expected also comparable results.

    Setting maxacfreq too low will simply give you an inaccurate PAC result. The maxacfreq parameter of the PSS analysis limits the maximum timestep, so that high frequencies in the following small-signal analyses (PAC, PXF, etc.) can be represented with the required accuracy.

    bernd2700 said:
    So I will change now my procedure for the zero-stuffing method

    I am not sure if it is very useful to invest a lot of effort into these "zero-stuffing" experiments. As I told you:

    Frank Wiedmann said:
    You only needed to do the "zero-stuffing" because in your transient analysis, you were sampling the output with a higher frequency than the frequency of the sample-and-hold (which is not possible in sampled PAC).
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    Yes, obviously I have a lack of understanding the PAC, and as a consequence, you unfortunately have to tell me: “I already have written you this and that”. But, believe me, it is NOT because I haven’t read all your messages carefully!

     

    So, I dare to summarize what you have said so far in my own words now, how I can imagine the PAC sampled is working. Please have a look:

    If I want to know what is the output amplitude at e.g. 4559 Hz for testcase A) ( = the circuit with the “Ideal S&H” only), I simply inject a sinusoid of only this frequency, run a transient analysis (with setting “maxstep” equal “1/maxacfreq”) until to be in steady-state condition. Then basically should I have the same accuracy as the PAC receives, correct? Subsequently, over the Cadence calculator’s function “sample”, I sample the output with my PSS fundamental frequency with 1kHz e.g. on every rising edge of the PSS clock source “V0”, and then measure the amplitude result by doing “(max-min)/2”. Correct? Then, I think, I have fulfilled your statements: I sample only once per fundamental PSS period, just at the right edge (to also have the phase correct), and I will get aliased components as well.

    ==> What is NOT clear to me, is the following: This “(max-min)/2” takes place in Time-Domain (TD). But you also write “The sampled PAC analysis only looks at the output at the input frequency”. So how the PAC can distinguish this, if something comes from an aliased frequency or not, if the operation is done in TD??

    And obviously, I got the results of -0.19 dB (so the straight 0 dB line) by doing “(max-min)/2” for the “PAC sampled, rising EDGE”, to be more precisely.

    ==> How can I imagine then / what does PAC internally do, in order to get from this “edge” to the “time averaged” option? I do not have to run it again, but only select this option of the already calculated results.

     

    Why I am asking this? Because without having understood how the PAC works, I think, it will be hard to find a valid procedure, that will then produce the same (or at least similar + understood limitations) results as the PAC itself. At the end, I want to tell my AC analysis over MT: “Please give me the equivalent result of PAC sampled rising edge” or “now please for time averaged”. Of course, for every DUT, exactly the same procedure shall hold true (Not: For circuit A do zero-stuffing, for circuit B another thing to get the same results as PAC option X). I have the feeling that I am near, but not still there: I think, I could reproduce all the PAC results of all options ("edge", "time avg.") of all the 3 test-circuits (DUTs), but I had to apply different procedures (1x DFT + zero-stuffing, and 1x DFT without it, to be equivalent to the “PAC sampled rising edge”, for instance).

     

    Many thanks,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    But you also write “The sampled PAC analysis only looks at the output at the input frequency”. So how the PAC can distinguish this, if something comes from an aliased frequency or not, if the operation is done in TD??

    More precisely, I should probably have said: "With maxsideband=0, the sampled PAC analysis interprets the output as a signal at the input frequency and also plots it at this frequency." Actually, the sampled PAC analysis does not run an additional time-domain simulation but uses the internal results of the time-domain PSS analysis.

    bernd2700 said:
    How can I imagine then / what does PAC internally do, in order to get from this “edge” to the “time averaged” option? I do not have to run it again, but only select this option of the already calculated results.

    When I look at the directory where Spectre saves its simulation results, I can see that when I run a sampled PAC analysis, Spectre also generates all the files for a normal PAC analysis. Probably, the corresponding calculations are either a prerequisite for the sampled PAC analysis or don't cause much additional computational effort (maybe Andrew or someone else from Cadence can comment on this). Fundamentally, however, normal PAC and sampled PAC are different analysis types and there is no direct way to generate one result from the other.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank ( & Andrew),

     

    Yes, ok, that the PAC measures the amplitude and just plots it at the already known input frequency. => I am sorry, this was a stupid one, I don’t know, how it could not have been clear to me without your last add-on. But is the rest of my short summary so far ok at least, “how I can imagine the PAC sampled is working”?

    --------------

    However, an important stuff is the following: For case B) (= the SC-filter), you proposed to do zero-stuffing ( = only take every 10th sample and just REPLACE the others by “0”). This then was matching to the PAC sampled, option “ris. edge” perfectly (!!), because I also did herewith “ideal Dirac sampling” (but with additional unfiltered decimation by factor 10), see e.g. in below picture the black, red, orange columns “B”, “L”, and “V” for easier understanding. Subsequently, for comparison, I also did a zero-stuffing with up-sampling ( = higher fs). See the black, blue, green, and pink values. Herewith, I “suddenly” now match to the “PAC sampled, option “time averaged”. My “DT response” (see red line, left graph) is gone (see red line, right graph), even BEFORE it is flavored with the comb-filtering (right pic, cyan). And, moreover, if I do the “replacing zero-stuffing procedure” but with factor 5 or 20, I get again other results than the PAC (not shown, e.g. 2 "peaks" at only 2kHz and 4kHz instead). It just was “by chance” the factor 10 correct, but I mean, I cannot adapt my analysis each time to the DUT! The analysis process has to be stupidly every time the same, regardless which circuit I am analyzing with it! So:

    ==> What can I do, in order to match with the same procedure of any DUT to the same PAC option every time? Maybe my idea now is to sample even again e.g. a factor 10 higher and then do not look to the results from (fs/2)/10 until (fs/2) ?? (A sim. for that is running already, but it is running since some days now for just this little circuits.)

    I would like to can say: With doing “brute-force zero-stuffing” = a reasonable factor, say 10, for doing ideal Dirac sampling and thus replacing the rest with zeros, I always resemble from DC until “(fs/2)/10” the PAC sampled, option “(ris./fal.) edge”. And when I subsequently comb-filter it, I always resemble the PAC sampled, option “time avg.” So something like this I have in mind.

    (click to enlarge)

    Left: Orig & Zero-stuffed with same fs (“replace by 0”)        Right: Orig & Zero-stfd. w. higher fs (“up-sample”), shown to orig. fs/2

    --------------

    You write: “normal PAC and sampled PAC are different analysis types”. We previously said: “normal PAC = “PAC sampled, time avg.” (e.g. Andrew: Correct?). To be now more precise, we can re-write it into: “ ‘PAC sampled, time avg.’ and ‘PAC sampled, (ris. or fal.) edge’ are different analysis types”. You said, I can imagine the later to do “(min-max)/2” (see above for details) which perfectly worked.

    => How can I imagine the “PAC sampled, time avg.” to be working then?

    --------------

    Obviously, this thread has caught the interest of a lot of other people in the meantime, and so I say to you “Thanks so much for your help again”, it seems to be not only good for me...

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    For case B) (= the SC-filter), you proposed to do zero-stuffing ( = only take every 10th sample and just REPLACE the others by “0”).

    The factor 10 was because in your transient simulation, you were sampling at a 10x higher frequency than the frequency at which your sample-and-hold was running, so that you were getting 10 identical samples in a row each time.

    bernd2700 said:
    What can I do, in order to match with the same procedure of any DUT to the same PAC option every time?

    For the sampled PAC analysis, sample the result of the transient simulation at the same frequency as the PSS fundamental frequency (and at the same position in the PSS period as is specified by the setup for the sampled PAC analysis).

    bernd2700 said:
    How can I imagine the “PAC sampled, time avg.” to be working then?
    Frank Wiedmann said:
    This is just the nomal PAC analysis without any sampling, so you simply need to run an FFT on the output signal in order to get the result in the frequency domain.

    What is probably confusing you is that fact that this result is also available in the Direct Plot Form after a sampled PAC analysis. When you sample the output of the transient simulation at higher and higher frequencies, your result is simply getting closer and closer to a Fourier transform of the complete output signal (which in this case is the piecewise constant output of the sample-and-hold).

    Frank Wiedmann said:
    By the way, the normal PAC analysis with maxsideband=0 like in my example also only looks at the output signal at the input frequency. For a piecewise constant signal, there will be additional frequency components in the spectrum, possibly with much larger amplitudes.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    You wrote: “When you sample the output of the transient simulation at higher and higher frequencies, your result is simply getting closer and closer to a Fourier transform of the complete output signal (which in this case is the piecewise constant output of the sample-and-hold).”

    Ok, on the one side, it sounds very logical to me what you write, and I really get a more & more “complete output signal” ( = the ZOH effect for case A) ) with my normal MT AC analysis (as described in the Visio drawing somewhere above), so I see it perfectly matching to Cadence PAC sampled, time avg. option, just until higher & higher frequencies.

    On the other side, I thought, to as well match to the other option of the PAC sampled, namely e.g. “rising edge”, if sample high enough and therefore can even afford doing factor 10 “brute-force” zero stuffing then, I maybe also resemble “Ideal Dirac sampling”, so what you wrote once, this option of the PAC sampled does. And so, I thought, I also would get the frequency response of the DUT ( = a 0 dB straight line for testcase A ) , matching to PAC sampled e.g. ris. edge option at least until (fs/2)/10 = 5 kHz. (We have seen, that the DFT generally starts to become “effects” when getting close to its end (as also your sim. has shown), so let’s ignore  frequencies above this (fs/2)/10, and I fully would be satisfied with it.)

     

    You write: “For the sampled PAC analysis, sample the result of the transient simulation at the same frequency as the PSS fundamental frequency”

    Ok, first many thanks, Frank, for this important info!!

    It sounded great in the first seconds when reading this, but now, I think, what does this really mean for my testcase A) ? : In other words, what will not get clear in my mind now, is the following: As it seems to work also with the other “time avg.” option, is there as well an equivalent general way ( = without knowing exactly the DUTs behaviour!) to match to the PAC sampled, e.g. rising edge option, at least until (fs/2)/10 ? Or is it _theoretically_ maybe not possible at all, to solve for this option in general (e.g. sample 100 times higher and do 10x zero stuffing or I don’t know what)? It really would be a pity, because WITH knowing the DUT (= just doing exactly factor 10x zero-stuffing), I already saw, my AC MT matches even _perfectly_ to Cadence PAC sampled, rising edge results!

    If I put a higher PSS fund. freq. (e.g. 10kHz) than my highest DUT freq., here of the S&H circuit ( = 1kHz), the PAC reports just constantly “-6.4 kdB” for both options. But on the other hand, I need a significantly higher sampling rate for my MT AC analysis than 1kHz, because I can plot until fs/2 and maybe in addition do not look at frequencies from (fs/2)/10 ... fs/2. So, if I chose to “sample the result of the transient simulation at the same frequency as the PSS” to obtain the “same” results, and e.g. I chose it to be 100 Hz, then I can plot only until max. 50 Hz over my MT AC analysis without aliasing, giving really good results until maybe 5 Hz. But this is bad, if the DUTs frequency is already much higher with 1kHz in this case. (As a sim shows, for the PAC, it seems it does NOT make a difference, if I chose my clock source and thus the PSS fundamental frequency to be 1kHz or 100 Hz, I every time get the same 0dB straight line for testcase A) if I chose “ris. edge” option, or the comb filter effect if I chose “time avg.” option.)

    ==> Frank, what would you propose for this testcase A) to be able to somehow at least produce similar results with a general applied procedure over my MT AC analysis, say at least until 5 kHz, as the PAC sampled, “edge” option?

    You as an expert, it seems, of course you have the complete picture in your head, what in my case is good or bad to do in order to reach this? Also in the past, only _after_ explanation from you, the one or other thing got clear to me, and so also here: I would appreciate really a lot, if you could give me an advice for this case what to do. Possibly, I overlook something, again and again, but for me, it is at the moment: If to sample at the same freq. as PSS fund., and sample with 10kHz, the PAC is probably correct but no good (-6.4kdB). If sampling at 1 kHz or lower, the PAC has good results, but I cannot compare to it since I do not even see the complete freq. response of the DUT which is at 1 kHz. (I know now, PAC produces just 1 tone, but I already got perfect matching at least WITH knowing my DUT over my Multi-Tone!)

    (Besides I also tried to read again Mr. Kundert’s article above and in the internet to get some more insight about the PSS, but I couldn’t gain or bring down the info to answer my above question for this case.)

     

    You write: “This is just the nomal PAC analysis without any sampling, so you simply need to run an FFT on the output signal in order to get the result in the frequency domain.”

    Yes, of course, also here, I remembered your sentence, but I meant: What does this mean in the time-domain? So an equivalent formula or something like this “(max-min)&/2” as for the “PAC sampled, edge triggering”. By the way, for my MT AC analysis I always have to sample with the Cadence calc. cmd. “sample” (e.g. with 100kHz) to be able port the data to Matlab!

     

    Many, many thanks, Frank, for all the past answers, and of course now in advance! I am really happy that you are both: a) an expert person, & who is b) in addition willing to write back!

     

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    And so, I thought, I also would get the frequency response of the DUT ( = a 0 dB straight line for testcase A )

    You will only get this if you sample with the same frequency at which the sample-and-hold is running (which the sampled PAC analysis does automatically), otherwise you will get a sinc shape from the piecewise constant function. And if you want to see a repeating pattern in the frequency domain (that does not contain any additional information, however), you can put any number of zeros between every two "real" samples in order to model Dirac sampling.

    bernd2700 said:
    If I put a higher PSS fund. freq. (e.g. 10kHz) than my highest DUT freq., here of the S&H circuit ( = 1kHz), the PAC reports just constantly “-6.4 kdB” for both options.

    This is just nonsense, you cannot choose a PSS period that is smaller than the periodicity of the circuit (it's surprising that the PSS analysis converges at all in this case) and -6.4 kdB is simply Cadence's way of expressing 0 in dB.

    bernd2700 said:

    You write: “This is just the nomal PAC analysis without any sampling, so you simply need to run an FFT on the output signal in order to get the result in the frequency domain.”

    Yes, of course, also here, I remembered your sentence, but I meant: What does this mean in the time-domain?

    I'm afraid that there is no direct equivalent in the time domain. You need to transform the result into the frequency domain in order to compare it to the result of the normal PAC analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • bernd2700
    bernd2700 over 3 years ago in reply to Frank Wiedmann

    Dear Frank,

     

    Higher PSS fund than circuit:

    Because of the result, it was clear that it is obviously nonsense, but what was not clear to me: _When_ will happen this nonsense results, I mean, which parameters need to be in which way to (not) happen. => Therefore I thank you very much for stating the “rule” behind that easily and clearly: “Never chose PSS period smaller than the periodicity of the circuit”.

    Side question: What is the difference if I chose PSS fund. 100 Hz or 1 kHz for testcase A), the “IdealS&H”? From looking at the overlaid Bode plots, I don’t see any. Or in other words: When, if at all, this becomes relevant (e.g. for this circuit)?

     

    Equiv. operation for normal PAC in TD:

    Also here, thank you for stating this clearly, because otherwise I never know: Is there maybe any, or is there not? And exactly this important info you find nowhere else written (at least I didn’t find it).

     

    Constant 0 dB straight line for testcase A) for PAC sampled “ris. edge”:

    You write: “You will only get this if you sample with the same frequency at which the sample-and-hold is running (which the sampled PAC analysis does automatically)”.

    Again here, thanks for this clear statement, Frank! However, here the things are not so clear anymore to me, because:

    First, just for safety to repeat: The PAC is giving me a constant 0 dB line, regardless if I chose its fund. freq. to be 100 Hz or 1kHz (the S&H’s update rate is given with 1kHz).

    Now, I just repeat a former question & answers:

    Q.:) “What can I do, in order to match with the same procedure of any DUT to the same PAC option every time?”

    A.:) “For the sampled PAC analysis, sample the result of the transient simulation at the same frequency as the PSS fundamental frequency (and at the same position in the PSS period as is specified by the setup for the sampled PAC analysis)”

    And:

    “The sampled analyses of Spectre always sample exactly once per period (as given by the PSS fundamental frequency). You only needed to do the "zero-stuffing" because in your transient analysis, you were sampling the output with a higher frequency than the frequency of the sample-and-hold (which is not possible in sampled PAC).”

     

    So, let’s assume I follow your answer, and I sample with the same freq. as the PSS fund., let’s chose e.g. 100 Hz, so doing “sample(v("/Vo_sh" ?result "tran") 0 ‘stoptime’ "linear" 0.01)”.

    With the PAC itself, it’s nevertheless possible to plot the Bode diagram until the frequency I want (e.g. up to 100 kHz). However, if I don’t overlook something, with my MT AC analysis, if I follow the “restrictions” from above ( = use same freq.), the sinusoidal input stimuli can therefore go up to max. 50 Hz in this case to not get aliasing (because in contrast to PAC I put many of them at the same time) and I can plot the results also only until max. 50 Hz, where I see nothing how the DUT behaves around its period of 1ms. What I remember, is: Doing multiple MT AC analyses, each for every Nyquist band, so one from 0..50Hz, the 2nd from 50..100 Hz, until the frequency I want. I hope there is another doable way (because doing 100 MT analyses to see up to e.g. 5kHz I cannot reasonably do), or don’t I have a chance over my MT AC analsyis for comparing to PAC sampled edge option in a general way? Modelling ideal Dirac sampling with 10x higher fs and subsequent brute-force zero-stuffing did not work out for my DUT “purely analog RC-LPF”.

    So what I am not able at the moment to answer from my knowledge point of view, is: Do I search for a “good combination” where there cannot be one from theory, or _is_ there a solution and I just haven’t found it yet?

    With “solution”, I mean, I would like to as well be able to set up a general rule for the PAC sampled (ris./fal. edge), as I already did successfully for the “time avg.” option: Here, the rule / solution for my MT AC analysis to match to Cadence is, I discovered, simply: Sample with fs = 10 times as fast as I want to really compare the results to Cadence and just “forget” the last decade, so e.g. (I like examples:) Sample testcase A) with fs=100 kHz, and look at the results only until (fs/2)/10 = 5 kHz and I will automatically get a nice matching to Cadence PAC sampled time avg. until at least 5kHz, maybe even 10 kHz, time avg. option (see right picture with the dark yellow added curve 17 days ago). And this rule seems to ALWAYS work with ANY DUT.

     

    Thanks a lot,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    The PAC is giving me a constant 0 dB line, regardless if I chose its fund. freq. to be 100 Hz or 1kHz (the S&H’s update rate is given with 1kHz).

    You can of course choose the PSS period to be a multiple of the circuit period, but this usually only has disadvantages, so nobody is doing it.

    bernd2700 said:
    Doing multiple MT AC analyses, each for every Nyquist band, so one from 0..50Hz, the 2nd from 50..100 Hz, until the frequency I want. I hope there is another doable way (because doing 100 MT analyses to see up to e.g. 5kHz I cannot reasonably do), or don’t I have a chance over my MT AC analsyis for comparing to PAC sampled edge option in a general way?

    In general, you don't have a chance because you cannot distinguish between aliased signals from different Nyquist bands after sampling. The only workaround that I can see would be to choose the input frequencies in the different Nyquist bands in such a way that there is no aliasing between them and then assign them to their (unique) original frequency for plotting.

    For example, if you sample with 1 kHz and have input frequencies of 200 Hz, 400 Hz, 600 Hz and 800 Hz, this will not work because 200 Hz will alias with 800 Hz and 400 Hz will alias with 600 Hz and you will not be able to distinguish them. However, if you set the input frequencies at 250 Hz, 450 Hz, 650 Hz and 850 Hz, you will be able to uniquely identify all frequencies because you know that there is no input signal at 150 Hz or 350 Hz.

    And just as a reminder:

    Frank Wiedmann said:
    And of course this method will only work for a linear circuit.
    • 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