• 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 33177
  • 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
  • bernd2700
    bernd2700 over 3 years ago in reply to bernd2700

    Dear Frank, dear all,

     

    Ok, also thanks for stating this that clearly ( = that there isn’t really the chance for properly modelling PAC sampled, edge triggered (ris./fal.) option). I think this closes then this forum thread.

    I have written here a summary for me and for all the other readers as well, for the most important points made, as follows:

    (I try to be as accurate as possible, nevertheless I would wish to ask you, Frank, to read through it and - in case – give a corrective action please, if you find any irregularities. Or also add something, if I forgot an important point made.)

     

    ================

    ||   S U M M A R Y :   ||

    ================

     

    CT or DT answer of a circuit:

    The original topic was: “How to obtain Discrete-Time (DT) response from a switched-cap (SC) circuit (integrator)?”

    My whole question started based on Mr. Ken Kundert’s paper “sc-filters  -  Simulating with Cadence SpectreRF”: In there, he basically wrote: “... you must understand upfront if you are interested in the Continuous-Time (CT) or in the Discrete-Time (DT) response of a system.”

    Following this, I originally thought, the user can freely chose through the analysis type (e.g. by chosing “Normal PAC” or “PAC sampled”, if he/she is interested in the CT or DT behaviour of the DUT ( = circuit). This turned out to be wrong, as Frank correctly has written: “If the circuit isn’t DT, you won’t get a DT response” – as simulations with the testcase / Device-Under-Test “purely analog RC-LPF” have proven.

    Most probably, Ken Kundert meant in his article: If you have for instance any purely CT circuit (e.g. this RC-LPF) and want to see its DT response (because e.g. it will get sampled at a later stage by someone else, so by a subsequent, additional CIRCUIT), you as well will have to introduce additional steps if you also want to see what will this DT behavior look like at the end (so you will have to MODIFY your CIRCUIT, e.g. install an additional “Ideal S&H” block). But in any case, you will have to do changes to your circuit, to see a DT for a purely CT DUT, like the RC-LPF, because a CT circuit does not have a DT answer!

    Frank said: “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”.

     

    Cadence PSS and PAC analsyes:

    There are several options to either chose:

        1) “Normal PAC”

        2) “PAC sampled” ...

        2a) ... selectable option “time averaged”

        2b) ... selectable option “edge” triggered (rising or falling) , “autonomous” sampling

    A personal statement from Ken Kundert is: Do not confuse “autonomous sampling (sample very T seconds) and triggered sampling (sample at a threshold crossing)”. The “PAC sampled” of course, uses “autonomous sampling (sample very T seconds)”.

    Frank made the following important statements about Cadence’s Spectre RF “PSS” and “PAC” analyses:

    *) 1) = 2a)  , so this means: “Normal PAC” yields the same analysis result as “PAC sampled”, option “time averaged”.

    *) “Fundamentally, however, normal PAC and sampled PAC are different analysis types and there is no direct way to generate one result from the other.”

    *) From another thread: “Sampled PAC analysis in Spectre performs ideal Dirac sampling”.

    *) If one can see a repeating pattern with multiple of fs in the Bode plot: “The repetition in the frequency domain comes from the circuit, not from the sampled PAC analysis by itself.”

    *) How can I imagine, the PAC sampled, “edge (ris./fal.)“ is working? => “Conceptually, you can get the amplitude of the result of a sampled PAC analysis result in the following way: Apply a sine with the frequency of interest at the input (with an amplitude that is still within the linear range of the circuit), then note all the values of the output signal at the sampling timepoints (given by the threshold crossings of the sampling signal). The difference between the maximum and the minimum of these values is twice the output amplitude (because you are measuring peak-to-peak).”  => So one has to do “(max-min)/2”, and I also add the following remark: Be sure that the transient sim. is long enough to has reached steady-state condition in order to really match to the PAC sampled, ris./fal. edge analysis.

    *) How can I imagine the “PAC sampled, time avg.” to be working then? => “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.“ However, “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.”

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

    *) “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.”

    *) “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.”

    *) “you cannot choose a PSS period that is smaller than the periodicity of the circuit”.

    *) “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.”

     

    How to model the Cadence PSS and PAC analyses themselves

    Then, I would have liked to “reproduce” the two PAC sampled options 2a) and 2b) over a Multi-Tone analysis (That was: Generating Multi-Sinusoids with Matlab, use that as input stimulus for a Cadence transient simulation and import back the data to Matlab again) and tried to compare this to Cadence PAC with the following 3 test-circuits (DUTs):

    *) A purely analog RC-LPF

    *) An “Ideal Sample & Hold” from Ken Kundert

    *) A Switched-Cap lossy integrator = SC. Low-Pass-Filter

    It always was very nicely and “easily” possible to match to Cadence PAC for option “time avg.” for 3 all test-cases (at least sometimes then with higher sampling rate & then forget last frequencies or max. decade when getting close to fs/2), so just to blindly apply the AC-analysis-over-MT-procedure without knowing the DUT (circuit).

    For the PAC, option “edge” (ris./fal.), this is different. A perfect match can be possible if you KNOW your circuit (DUT), but unfortunately GENERALLY it is NOT easily possible to find a comparable procedure which can be applied blindly to any DUT. The reason is that Cadence PAC does sampling with the PSS fundamental frequency (clock e.g. set to 1 kHz) , which can only be equal or lower than the operating frequencies of the DUT (e.g. 1 kHz), and thus, if there is aliasing ( = if the Bode plot at higher frequencies is requested, e.g. at 100 kHz), it does not matter, because it injects only 1 sinusoid at a time, knowing of course its input frequency and thus be able to plot the output amplitude also it at this frequency).

    However, to be able to reproduce the PAC:

    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).”

    Thus, for my MT AC analysis, as there are more tones at a time, to be comparable to the Cadence PAC sampled “edge” option, I had to stay with the sampling freq. equal or below the DUTs operating frequencies (e.g. 1 kHz), to not create aliasing and therefore to be able to distinguish them blindly for any case. But then of course I can only plot until up to fs/2 (e.g. 500 Hz) which is (much) smaller than the DUTs freq., resulting in only seeing a (small) part of the Bode plot compared to Cadence PAC. So the comparison is of limited use. And if doing a work-around and choosing the input tones in a wise way (as Frank proposed in his above example = to be able to distinguish between the orig. input and aliased frequencies), nevertheless you again have to exactly know your DUT (its operating freq., e.g. 1 kHz), so again no general valid procedure unfortunately.

     

    As said, I hope, I above summarized all the important points made & again, I want to explicitly express my gratitude to Frank Wiedmann, for all his valuable inputs!

     

    Have fun,

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    A personal statement from Ken Kundert is: Do not confuse “autonomous sampling (sample very T seconds) and triggered sampling (sample at a threshold crossing)”. The “PAC sampled” of course, uses “autonomous sampling (sample very T seconds)”.

    In my example from the beginning of this discussion, the timepoint for sampling is given by the rising zero crossing of the voltage at the smp node. However, for this ideal circuit with a piecewise constant output, it does not really matter at which point of the PSS period the sampling is done (it does matter when you have a real sample-and-hold with settling behavior).

    • 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