• 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. Continuous & Discrete-Time behaviour of a Switched-Cap....

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 127
  • Views 8133
  • 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

Continuous & Discrete-Time behaviour of a Switched-Cap. Integrator circuit

bernd2700
bernd2700 over 3 years ago

Dear guys,

I would have the following question at the end of this text.

Since I have read that Andrew Beckett also seems to have extremely profound experiecne  here (e.g. topic "custom-ic-design/48795/noise-figure-of-track-and-hold-circuit"), I have the little hope now, that, if I try it here, he or someone could bring a little bit of light into this to me unclear topic.

Many thanks in advance for that!

I also posted my question in the forum “designers-guide.org/.../YaBB.pl (Moderator edit - DG post is here: https://designers-guide.org/forum/YaBB.pl?num=1636713101 ) which also helped me further (many thanks again to Ken Kundert), but on this point now I am stuck. I furthermore posted it on "">electronics.stackexchange.com/.../612337" but also there without success. Hopefully one of you guys might have a good (= intuitive, explaining, not 10 pages of equations, pls.) answer.

To the topic itself: Before starting the question, I have to bring everyone to a common understanding and so, I need to develop it a bit first and make some statements.

I tried to be as precise and short as possible, but as long as necessary.

 

#1) A Zero-Order-Hold (“ZOH”) (Sample & Hold “S&H”) block stand-alone:

First, we watch the Bode plot for this block stand-alone (s=j*2*pi*f ; Ts=sample time). We notice:

*) The envelope of the transfer-function goes “DOWN” (with -20dB/dec).

*) The nulls go down to –INFINITY (only because of resolution, not as much in this graph).

*) At half the sampling frequency “fs/2”, in this example 500 Hz, the magnitude is down by approx. -4 dB.

I compared the Bode diagram of this ZOH above, to the “_SAMPLE_ & Hold (S&H)” from Ken Kundert (“sqrt( (sinc(f*Ts)).^2 );” f=frequency). The result: The MAGNITUDES are completely IDENTICAL (proof not shown here). However, the phase information from Kundert's S&H is missing ( = constantly 0°). => As a result, I say: “Approx., a ZOH = S&H”.

 

#2) Reference circuit to be modelled: A switched-cap (SC.) integrator:

The following circuit shall be my reference, which I want to model with Matlab at a later stage: It shows a (parasitic-sensitive), lossy switched-cap. integrator, operated at sampling frequency fs = 1 kHz. As input stimulus, I put an AC source with 1V magnitude. (I thought about replacing the schematic details just by the block diagram, but maybe the details are important, it is often the case to know what was done _exactly_!)

To obtain the following Bode plot, I do the “PAC sampled” analysis (at rising edge) in the Cadence SpectreRF simulator, since I am interested in its Discrete-Time (DT) behaviour:

We notice:

*) As requested by theory, the DT (Discrete-Time) answer of the sampled output node of the circuit is symmetrical around fs/2 (500 Hz), at fs (=1kHz), the magnitude goes up again to the DC value (+80 dBV). (If one would do a linear frequency axis plot, one would see the symmetry around fs/2 better.)

*) So the “nulls” at multiples of fs go up only to the DC gain of +80 dBV, not to +infinity. (Because of resolution some are not even reaching +80 dBV, but this is an artefact I have understood and shall not be a topic for further discussion here.)

*) At fs/2 at 500 Hz, the magnitude is -6 dBV.

So far, so good.

 

#3) Try: Matlab model of integrator from #1  …

#3a) ... try model over Discrete-Time (DT):

Everything here is clear and there is no question from my side. I just wanted to list it for completeness. So if I model over the following Matlab commands “z=exp(j*w*Ts);   Aol=10000;   f=1-1/Aol;   Int_z=-z^-0.5/(1-z^-1*f);”, I get the following bode plot which is fine and exactly what I expected.

We see from the above cyan graph that at fs/2, we also get -6 dBV, further, it is symmetrical around fs/2 (500 Hz) and so, at fs (1 kHz), the magnitude gets up to +80 dBV again.

So far, so good.

 

#3b) ... try model over Continuous-Time (CT) with subsequent sampling:

Now I would like to model the real circuit from #2 over a CT model with subsequent sampling applied.

Because then, it allows me to also model the speed limit of the opamp for instance (and for more reasons (noise)).

I expect the same results as from the SpectreRF simulator (shown in #2 in green color) if I sample the CT integrator output afterwards with a Sample&Hold (ZOH, shown in #1).

We see from below graph:

*) The pink curve shows the Matlab model of the CT integrator (reaching -10 dBV at fs/2).

*) The blue curve shows the Matlab model of the CT integrator DIVIDED     subsequently by the ZOH from #1.

*) The red  curve shows the Matlab model of the CT integrator MULTIPLIED subsequently by the ZOH from #1.

We further notice:

If we DIVIDE the CT response (pink) of the Matlab model by the S&H (ZOH, orange, see #1) transfer-function, we get the blue curve. Doing so, yields:

*) A PERFECT match at fs/2 at least of the Matlab model (blue) to the DT response of the Cadence circuit (green): The -10 dB from the pink DIVIDED by the ZOH (thus +4dB), gives together the blue curve, which has also the -6 dBV at fs/2. So from this point of view, the procedure, what I do, is good ( = divide the CT tf. by the ZOH).

*) However, what is not matching so well, is, that the result is not completely symmetrical around fs/2. Ok, the “nulls” at multiples of fs go up also here, but not just to the DC gain limit of +80 dBV, but to theoretically +infinity (since the ZOH from #1 shows -infinity nulls). So from this point of view, the procedure, what I do, is not so good.

 

#4) Questions:

Now, there come my 2 questions:

If I try to model the real Cadence switched-cap. (SC.) integrator circuit (in green color from #2) by a Continuous-Time (CT) integrator Matlab model (in “s”) (in #3b) which is then sampled by a ZOH (S&H) to get the DT response:

Q1 ==> Why the hell it seems I have to DIVIDE by the ZOH (S&H) transfer-function and NOT to MULTIPLY by it to get somehow matching results (blue curve) to the Cadence SC circuit (green)??

 

To account equivalently for the “_SAMPLED” option of the Cadence PAC analysis in the real circuit, also in this model, for me, this means (maybe I am wrong here??) I logically would have to subsequently MULTIPLY the integrator output by the S&H transfer function. This is my interpretation, because the strange thing is (= above question), obviously, I have to DIVIDE the integrator output by the ZOH transfer function, and not to multiply by it in order that the “nulls” go also up, and not down, as in the S&H stand-alone case. Then the Bode diagram of this result (blue color) matches approx. the real Cadence SC. circuit (green), apart from the nulls going up higher than just to the +80 dB DC gain limit, as said. Of course, then, there is no symmetry around fs/2 anymore (ok, I also probably do not have a DT signal which is valid only at 1/fs time points but still a CT signal whose value is held constant until the next point in time). So,

 

Q2 ==> Which mathematical operation I do have to for the CT Matlab model in order to also get out the DT response ?? Just sampling (with the S&H or ZOH) seems to be too less!

 

Thanks for any hint in advance,

bernd2700

  • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700

    You should be able to get the same response from a sampled PAC analysis of a switched circuit in Spectre and from a DT system in MATLAB. It is not possible to get an exact match between a CT and a DT system (see https://mathworks.com/help/ident/ug/continuous-discrete-conversion-methods.html), but you should be able to get pretty close with c2d (and after all, your circuit in Spectre is also a DT system). You are probably also aware that the bode function of MATLAB plots the response of a DT system only up to the Nyquist frequency (in order to avoid redundancy), but according to point 3a of your original question, you seem to have found a way to plot higher frequencies as well.

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

    Dear Frank,

     

    Yes, your whole text of your last answer is completely clear to me. I know that there will be differences between CT and DT, and as Mr. Kundert has written: I am interested in the DT domain at the end. What I don’t know, is, at which stage(s) I should do in my Matlab model the “transition(s)” from CT to DT over “quasi DT” to say it loosely (both “switch1” with cap. “Cs” and the “ideal S&H” at the end of the reference switched-cap. circuit do NOT deliver a “real DT” spectrum with symm. around fs/2 as I learned now, nonetheless they sample. So it somehow is still a bit CT and this is very grey in my head.

    I know this Matlab link already, and I am searching how Cadence PAC sampled analysis is done in an equivalent way (so a flow diagram (with not too many equations) would be helpful also now for the Cadence PAC to know what’s going on internally there).

    Do you maybe also have an opinion about my questions, especially Q5 in my “Fig. a)” (= the flow / block diagram for a Matlab model) from my post from 1.4.22?

    For you (& others): The trick to plot beyond the Nyquist frequency in DT Matlab is to set: “z = exp( j * w_vec * Ts )” whereas “Ts = 1/fs” ( & fs the sampling frequency in Hz) and “w_vec = f_vec * 2 * pi” and “f_vec” is the desired frequency vector in Hz.

     

    Many nice greetings,

    bernd2700

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

    I suggest that you take a look at the example under https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/51410/how-to-obtain-discrete-time-dt-response-from-a-switched-cap-sc-circuit-integrator that shows how to use the c2d function to go from a CT system to a DT system.

    • 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