• 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 30931
  • 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 Frank Wiedmann

    Dear Frank,

     

    Yes, I have already read through these answers felt 100 times before , and honestly, I couldn’t get all the ideas out of those specific ones (there are other answers from you where I could get out 100%). Why so? :

     

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

    “After the first sampler, the circuit can no longer distinguish between a frequency f and a frequency n*fs+f or n*fs-f”

    If I am correct, the reverse conclusion out of this sentence is: As soon as I use a sampler in the circuit, it automatically must follow a DT signal on its output.  –  However, this doesn’t seem to be the case if you watch my circuit at the very top at this post and follow the blue curve ( = node “Vo_sh1” , after the sampler): The spectrum is NOT being DT.

    I have understood:

    *) You basically say:      Install a sampler in the circuit and its output is DT.         <== This would be also logical to “my theory”!

    *) PAC sampled, however, says:      Although a sampler installed in the circuit, its output is still CT (blue curve).

    For me this is a contradiction. Where is the error??

     

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

     “However, you will not get the sinc shaping from the zero-order hold at the output (or effects from anything else that happens between the sampled points).”

    Ok, clear is for me the 2nd part in the parentheses. Not clear is the first part:  Why from DC to fs/2 I shouldn’t see the first sampler’s sinc. shaping effect (e.g. its attenuation of already non-negligible ca. 4 dB at fs/2)??

     

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

    I have also re-visited the topic how conceptionally the PAC sampled is done, and now really have found perfect matching between doing in praxis your verbal description and the real PAC sampled output result. I’m sorry that you had to repeat here an already given answer, but now I got it.

    For the other readers, I show here clearly the result what Frank means:

    In the source V1 I included the AC source “pacm = 1” as well as a sinusoid of 1V with 500 MHz ( = fs/2 here):

     

    So I take the output "out" and do (max-min)/2, so: Manual calculation: “20*log10( 9.887E-3 / 2 ) = -46.12 dB”

    I found out that the small difference from -46.12 dB to -46.06 dB to the “real PAC” comes from the non-steady-state condition where the marker points are taken from.

    So including steady-state-condition it perfectly fits to what Frank has written (not shown here).

     

    What for me is still NOT clear, as written already above, is: As soon as I take the regularly sampled values (here the red curve) why the response is not automatically DT? (here it is, but not in all the cases, as e.g. for my pure analog RC-LPF at the very top).

     

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

    You write: “The normal PAC result of a DT circuit with a ZOH at the output is the sampled PAC * sinc”

    So the equation “pac_normal=pac_sampled.*sinc(f*ts);” seems only valid for above type of circuit. If I would put the same equation but when simulating a CT circuit, as the RC-LPF, I would get wrong results.

    So, I would like to have a general valid statement between the relation of the normal PAC and sampled PAC. Is it maybe just to leave away the “sample” command and take the normal output (e.g. in above picture to take the cyan instead of the red curve) ?

     

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

    “In order to be entirely precise, sampled PAC analysis does not generate a sampled output spectrum, but it samples the transfer function”

    Although I have found it to be for sure a very important info, I am also not completely sure about what you meant here exactly with “samples the tf.” How can something sample a tf? If my tf is e.g. in CT domain, e.g. “mytf = 1/(s+1)”, how can you “sample” that thing? A tf is an equation in my opinion, either in s or in z I know. You also could not mean to do a la: “sample( freqresp ( mytf ))”, because the freqresp is what just the PAC tries to generate.

     

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

    “Wikipedia explains why going from a signal consisting of Dirac impulses to a piecewise constant signal in the time domain corresponds to a multiplication by the sinc function in the frequency domain."

    But I do not have a signal consisting of Dirac impulses. I have an analog sinusoid input source and on the output a ZOH. For me this Wikipedia page is not answering my specific question here, or I do not get the point all the time – could be!

     

    In the other forum topic (goto: “51410”), you write: “if you sample a signal in the time domain (by multiplying it with the sampling function), you need to convolute the spectra …” So yes, we sample in TD. But in your Matlab example you still do a multiplication in FD “... = pac_sampled.*sinc( ...” and the result seems to be correct.

     

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

    Last: Can I force SpectreRF to produce a DT Bode diagram? (Independently of the schematics)

    I guess: “Possibly No”, because I already searched some weeks ago before I asked this question inside the PAC menu options for a while but I didn’t find any hint about forcing a DT response and maybe a conversion method to it , BUT: Just because _ I _ did not find, it does NOT mean: There isn’t any available!!! Often, things are hidden or one can apply some tricks. So, here I just can repeat myself: It would be nice, if some-one from Cadence could make a clarifying statement: “YES” or “NO”, and if “yes”, how!

     

     

    Thanks a lot, mainly to you Frank of course for all your effort, but you see, I already came huge steps forward because of you!

    Many nice greetings,

    bernd2700

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

    I don't really have the time to answer all your questions in detail right now, but here is a quick suggestion: Take your example circuit where you have examined with a TRAN analysis how the sampled PAC analysis conceptually works and compare the results for the switched-capacitor (SC) lowpass filter to those for the equivalent RC lowpass filter. I suggest that you use a frequency above fs/2 for this, because it will make the differences much clearer. The key is that in the SC circuit, the filter function is applied to the aliased signal.

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

    “After the first sampler, the circuit can no longer distinguish between a frequency f and a frequency n*fs+f or n*fs-f”

    If I am correct, the reverse conclusion out of this sentence is: As soon as I use a sampler in the circuit, it automatically must follow a DT signal on its output.  –  However, this doesn’t seem to be the case if you watch my circuit at the very top at this post and follow the blue curve ( = node “Vo_sh1” , after the sampler): The spectrum is NOT being DT.

    I have understood:

    *) You basically say:      Install a sampler in the circuit and its output is DT.         <== This would be also logical to “my theory”!

    *) PAC sampled, however, says:      Although a sampler installed in the circuit, its output is still CT (blue curve).

    For me this is a contradiction. Where is the error??

    The first sampler does cause aliasing, but you will only see an effect of this if you have a frequency-dependent circuit after the first sampler, not if you sample its output directly.

    bernd2700 said:
    So, I would like to have a general valid statement between the relation of the normal PAC and sampled PAC.

    There is no such statement, because the relation depends on the shape of the output signal. For a piecewise constant signal, the results are related by the sinc function; for a sinusoidal signal, they are the same.

    bernd2700 said:

    “In order to be entirely precise, sampled PAC analysis does not generate a sampled output spectrum, but it samples the transfer function”

    Although I have found it to be for sure a very important info, I am also not completely sure about what you meant here exactly with “samples the tf.” How can something sample a tf?

    Ok, a better formulation would be: "The sampled PAC analysis samples the output signal and uses the result (consisting of Dirac impulses) to calculate the transfer function."

    bernd2700 said:

    “Wikipedia explains why going from a signal consisting of Dirac impulses to a piecewise constant signal in the time domain corresponds to a multiplication by the sinc function in the frequency domain."

    But I do not have a signal consisting of Dirac impulses. I have an analog sinusoid input source and on the output a ZOH. For me this Wikipedia page is not answering my specific question here, or I do not get the point all the time – could be!

    What we are comparing here is the result of a sampled PAC (Dirac impulses) and a normal PAC (piecewise constant signal).

    bernd2700 said:
    In the other forum topic (goto: “51410”), you write: “if you sample a signal in the time domain (by multiplying it with the sampling function), you need to convolute the spectra …” So yes, we sample in TD. But in your Matlab example you still do a multiplication in FD “... = pac_sampled.*sinc( ...” and the result seems to be correct.

    When you go from Dirac impulses to a piecewise constant signal, you convolute in the time domain (with the rect function), so you need to multiply in the frequency domain.

    bernd2700 said:
    Last: Can I force SpectreRF to produce a DT Bode diagram? (Independently of the schematics)

    Not if you have a CT circuit like a simple RC filter.

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

    Dear Frank,

    Many thanks for your detailed reply!

    You write: “The first sampler does cause aliasing, but you will only see an effect of this if you have a frequency-dependent circuit after the first sampler, not if you sample its output directly.”

    It seems to be again an important answer from you. Ok, clear is the first part: That it does aliasing, because it’s a sampler.

    Not clear:

    1. Which “effect” do I see? You probably mean the effect of getting a “DT” response instead of getting a “CT”?
    2. And why there is a difference between if I sample the output directly or if I have an additional frequency-dependent circuit AFTER the first sampler?? I tried to imagine this, but I couldn’t. Please, Frank, could you explain this in a bit more detail what is going on here?
    3. More a rhetorical question is: "What would happen if I have an additional circuit after the 1st sampler but not a frequency-dependent one, like a gain block (e.g. a resistor divider)?" Because I think, if once I fully have understood it, I can give the answer by myself what happens for any type of circuit installed after the first sampler.

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

    You write: “the relation” (between the normal PAC and PAC sampled) “depends on the shape of the output signal”.

    I had this fear, that this is the case. But this maybe explains why I’m having difficulties to find a general flow diagram in frequency-domain for the PAC analysis stuff. E.g. I therefore canNOT generally write “pac_normal=pac_sampled.*sinc(f*ts);”, because it seems circuit dependent if this equation holds true or not. That’s a pity, because I would have liked to write general valid equations for the relation. But you clearly write: “There is no such statement”.

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

    You write: “What we are comparing here is the result of a sampled PAC (Dirac impulses) and a normal PAC (piecewise constant signal).”

    So from this section, I understand:

    1. a) Sampled PAC = Dirac impulses
    2. b) Normal PAC = Piecewise constant signal

    What I’ve learned from you and from Wikipedia is: The procedure clearly is:

    ==> “In order to come from a) to b), install a ZOH in-between”!

    For me, from this section here, this clearly looks to be circuit INdependent, because to get from a) to b), one MUST install the ZOH, there is no other way to obtain a piecewise constant signal out of Dirac impulses, is there?

    As a consequence, it’s still a contradiction for me! : From this section it seems to be generally valid, from the very above section it depends on the circuit I use, if I do need a ZOH not to go from Sampled to Normal PAC. Fu**, I am again confused now about this.

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

    You write: “The sampled PAC analysis samples the output signal and uses the result (consisting of Dirac impulses) to calculate the transfer function.”

    Did you try to just express in other words, what we do anyway, or is there more to it which I maybe miss? :  Ok, the PAC samples the output, and then for the tf. calculation, it just does “(max-min)/2” (if the input is normalized to “1”), correct? Or do I miss something here for the “calculation of the tf.”? There is no additional tf. calculation inside the PAC, correct?

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

    And why: As soon as I take the regularly sampled values (at n*Ts), why then in Cadence PAC sampled the response is not automatically forced DT?

    Isn’t a DT spectrum just a consequence out of regularly sampled points in time? Obviously in Cadence PAC sampled: No (Otherwise I couldn’t get out a CT response of my normal RC-LPF circuit.)

    But, if in contrast, I do a DFT (in Matlab e.g.), the spectrum IS automatically DT ( = being symm. around fs/2), and I guess, it’s not the “fft” process itself which makes it DT, but it’s the regularly sampling process which is responsible for the DT spectrum. So ???

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

    Ok, this point is solved now: I cannot _schematic-independently_ FORCE a DT response from the Spectre PAC. Up to now, there is no such selectable option in its menu implemented to do so. => Thanks for stating this very clearly!! (Would be nice for the future to see such a thing there.)

     

     

    Again, “1000 * Thank you”, Frank to bring some clarity on this, as it seems for me that no book in this world is able to write this nicely and in simple sentences, so that everyone can understand.

    bernd2700

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 3 years ago in reply to bernd2700
    bernd2700 said:
    What would happen if I have an additional circuit after the 1st sampler but not a frequency-dependent one, like a gain block (e.g. a resistor divider)?

    How do you want to see a repeating gain pattern as the result of aliasing if your DT circuit has a gain that is constant over frequency?

    bernd2700 said:
    There is no additional tf. calculation inside the PAC, correct?

    There is an important difference between the spectrum of a sampled signal and the result of a sampled PAC analysis. For a sampled signal, due to aliasing you generally don't know the original frequency of the signal (unless its bandwidth was limited before the sampler). Due to this, all possible frequencies are often shown in the spectrum, which automatically leads to the well-known repeating and symmetrical spectrum of a sampled signal.

    In sampled PAC analysis, however, the frequency of the input signal is known and is used as the x-axis for plotting the result. As a consequence, you will only see a repeating and symmetrical pattern if it is caused by the circuit itself, for example by a frequency-dependent circuit after aliasing by a sampler.

    bernd2700 said:
    Normal PAC = Piecewise constant signal

    The normal PAC of course uses whatever shape the output signal actually has. For many DT circuits (like the example used here), this is a piecewise constant signal, so you get the sinc relation. For a CT circuit like a simple RC filter, with a sinusoidal input you will of course also get a sinusoidal output, which is why normal PAC, sampled PAC and AC analysis will all give the same result in this case.

    bernd2700 said:
    Ok, this point is solved now: I cannot _schematic-independently_ FORCE a DT response from the Spectre PAC. Up to now, there is no such selectable option in its menu implemented to do so. => Thanks for stating this very clearly!! (Would be nice for the future to see such a thing there.)

    A CT circuit like a simple RC filter does not produce a DT response, so I doubt that you will ever see this.

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

    Dear Frank,

    Thank you VERY much for your answer containing some other important info and clarifications!!! Now, just please gimme some time again. I do and try now a lot of different things, and I need time to digest all this in combination with your answers.  As said, I do not like to "only ask a question" to the audience here, just in order to create work on you. So the better choice is: I will come back with well prepaired questions (if not everything is solved in the meantime, hahaha) but it needs a while...

    Again, many thanks so far,

    bernd2700

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

    Dear Frank,

    I made an additional graphical representation of my subsequent verbal description. It’s maybe easier to follow then.

    From below figure, you can see: I simulated 2 circuits as Device Under Test (DUT): A) Ken Kundert’s “Ideal S&H”, and B) Your SC-Filter (with modified frequencies, Period = 1ms instead).

    For both, I did the Cadence internal PAC sampled as well as an own generated AC analysis & compared the results of all.

    Explanation of my own AC analysis: It works as follows: At the input of the DUT, I fed a Multi-Tone (MT) stimulus, that are hundreds of automatically stacked sinusoid sources with each 1V amplitude and frequencies reaching from ca. 10mHz until 5 kHz (log. spaced). With the exported transient data over Cadence’s calculator command “sample”, I then do a DFT from both, the input node “u”, as well as from the concerned output nodes. Then I do a division of the 2 DFT results and a Bode diagram of it. (It was some work to get everything done correctly.)

                                                                                        (click to enlarge)

    For both cases A) and B), I honestly would have expected a DT Bode diagram = a repeating pattern around the circuit’s sampling frequencies of 1 kHz, as there is both existent, namely *) no band-limitation before the first sampler (thus aliasing) and also *) equidistant sampling “n*Ts”.

    For case A), you see: Although Aliasing + Equidistant sampled („n*Ts“) signal => I do NOT get a DT Bode plot.

    I was thinking: I always automatically get a DT response ( = a repeating gain pattern around the sampling freq.) as soon as I start doing equidistant sampling in time “n*Ts”, and moreover, regardless of if I have additional aliasing caused by anything or not. Both is obviously wrong: Neither do I get a DT Bode plot when just doing equidistant sampling “n*Ts”, nor when doing equidistant sampling plus aliased signal.

    How then will I obtain a DT response? => You will say: If the circuit itself doesn’t give it, then I won’t get it. Which sounds true to me especially now after those experiments, and as you have written, too: “... you will only see a repeating and symmetrical pattern if it is caused by the circuit itself ...”.

    But why the hell then Mr. Kundert has written in his (already above cited) article: “You must understand up front the difference between the continuous-time and discrete time behavior of your circuit, and you must decide which behavior you are interested in.”. But it now seems, if the circuit is fixed, I do not have anymore the freedom to decide, if I want to see the circuit’s CT or DT behaviour, do I? It seems now, that either the circuit gives a DT Bode plot or not. Thus, for me, your statement ( = you will only get DT if caused by the circuit, no “user” decision) is then in contradiction to Ken Kundert’s statement ( = think and decide already upfront if you want to see the CT or DT response of a circuit). I am sure, you both are somehow correct, but:

    => Where is my thinking error which causes this contradiction?

     

    You wrote: “you will only see a repeating and symmetrical pattern if it is caused by the circuit itself, for example by a frequency-dependent circuit after aliasing by a sampler”.

    Perhaps this is the key message and I read 100 times this. If I only could understand it! The only thing I can think of how to do this, is to add some transfer-function in “z” after the sampler, because I am already now in digital domain, because I have values which are valid only at n*Ts. But then, this DT behaviour is not caused by the circuit itself but by this another added tf. . For instance: Of course, if I add after the first sampler a discrete integrator “1/(1-z^-1)”, I surely get a DT answer. Acc. to you, I really would not get it, if I just add a non freq. dep. tf. (in magnitude you mean, I guess), such as a plain delay "z^-1", correct? Or possibly I think in the wrong direction...

     

    And: Both A) and B) are sample and hold circuits with each 1kHz (or 1ms sampling period) and for both the input stimuli are up to at least 5 kHz, so both should produce aliasing.

    => Why for case A) I obviously get a CT Bode plot, whereas for B) I get a DT Bode plot (Of course, I also remember what you have written: The cyan curve here looks “very similar to the result of the time-continuous filter, but it is really the red curve multiplied by the sinc function due to the zero-order hold at the output”. => Is the cyan curve here now a CT or a DT response? At least, the pattern is not repeating.

     

    Thus, is my following statement true or false:

    *) Repeating pattern => DT response

    *) No repeating pattern => CT response

    In my head (until now) the following statement does NOT exist:

    *) No repeating pattern => Nevertheless possibly a DT response

     

    And: E.g. for case B) : What / where is the difference between: [“PAC sample: n*Ts” (red, green curve)] and [“Calculator sample: n*TS” with DFT (blue)] ? If I manually sample and do DFTs, I get the blue curve, if do the PAC sampled, I get the red or green curve. Both do "n*Ts" sampling, but the results are very different.

     

    Thanks a lot for your help in advance & best regards,

    bernd2700

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

    Thus, is my following statement true or false:

    *) Repeating pattern => DT response

    *) No repeating pattern => CT response

    If by "DT response" you mean the result of a sampled PAC analysis, it is clearly false (as you have shown with your own experiments). Also, your transient analysis does not really represent what a sampled PAC analysis does, because you sample a piecewise constant signal with a period of 1 ms every 0.1 ms, getting 10 equal samples in a row each time. I am not going to try and interpret the results of this strange setup.

    You really need to distinguish between the spectrum of a sampled signal and the transfer function resulting from a sampled PAC analyisis:

    Frank Wiedmann said:

    There is an important difference between the spectrum of a sampled signal and the result of a sampled PAC analysis. For a sampled signal, due to aliasing you generally don't know the original frequency of the signal (unless its bandwidth was limited before the sampler). Due to this, all possible frequencies are often shown in the spectrum, which automatically leads to the well-known repeating and symmetrical spectrum of a sampled signal.

    In sampled PAC analysis, however, the frequency of the input signal is known and is used as the x-axis for plotting the result. As a consequence, you will only see a repeating and symmetrical pattern if it is caused by the circuit itself, for example by a frequency-dependent circuit after aliasing by a sampler.

    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.

    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.

    bernd2700 said:
    But why the hell then Mr. Kundert has written in his (already above cited) article: “You must understand up front the difference between the continuous-time and discrete time behavior of your circuit, and you must decide which behavior you are interested in.”.

    I believe that he was talking about the difference between a track-and-hold and a sample-and-hold. Sampled PAC analysis with Dirac impulses did not exist back then. At that time, I was emulating it with sampled PNOISE analysis and separate noise sources for every Nyquist band.

    bernd2700 said:
    Of course, if I add after the first sampler a discrete integrator “1/(1-z^-1)”, I surely get a DT answer. Acc. to you, I really would not get it, if I just add a non freq. dep. tf. (in magnitude you mean, I guess), such as a plain delay "z^-1", correct?

    Correct. 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). By the way, you will also get a repeating and symmetrical result of the sampled PAC analysis if you add an RC filter after the ideal S&H.

    bernd2700 said:
    Is the cyan curve here now a CT or a DT response? At least, the pattern is not repeating.

    It is the result of a normal PAC analysis of a switched-capacitor (and thus sampling) lowpass filter with a piecewise constant output signal, looking only at the frequency component at the input frequency.

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

    Dear Frank,

    Just very quickly to the point difference "Spectrum of sampled signal" and "PAC sampled":

    You wrote: “Ok, a better formulation would be: "The sampled PAC analysis samples the output signal and uses the result (consisting of Dirac impulses) to calculate the transfer function." ” , and “In sampled PAC analysis, however, the frequency of the input signal is known and is used as the x-axis for plotting the result ”

     

    In my opinion, with my “MT AC analysis” I do like Cadence “PAC sampled” does, therefore I did all this experiments (and so, the necessary equations I can type and port to any mathematical program, whereas e.g. in Matlab I cannot say: “Please perform a ‘PAC sampled’ analysis.”):

    *) “PAC sampled” samples the output signal. => Also my “MT AC analysis” samples the output signal. (Over Cadence’s calculator command “sample”).

    *) “PAC sampled” calculates the tf. => Also my “MT AC analysis” calculates the tf. (by dividing the 2 DFTs “output/input”). (And I tested my script to be sure that it works properly!)

    *) “PAC sampled” knows its input frequency and uses it as x-axis for plotting. => Also my “MT AC analysis” knows the input frequency and uses it as x-axis for the Bode plot (as of course I also have plotted the values ONLY at those input frequencies of the MT stimulus, not at all the others as well).

    *) “PAC sampled” even looks until 100 kHz which is far above the circuit’s fs = 1kHz. => Also my “MT AC analysis” looks far above 1 kHz, namely at least until 5 kHz (the transient analysis for this took already approx. 1 hour), to also be able to “see” what happens above 500 Hz ( = fs/2 of the circuits), so which spectrum I will obtain, a repeating one or not. (I do not have a clue, why you call this “strange setup”, because I think, this is also what the “PAC sampled” does, just that this even goes further until 100 kHz in this case.)

    => Where is the difference between “PAC sampled” and my “MT AC analysis” then?? (Apart from “PAC sampled” is much faster and only needs approx. 1 minute).

    Thx,

    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
<>

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