• 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 simulate Large signal bandwidth of amplifier

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 126
  • Views 12927
  • 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 simulate Large signal bandwidth of amplifier

Senan
Senan over 2 years ago

Hello,

I would like to ask you about how to simulate the large signal bandwidth of amplifier in cadence. I know the basic test that requires to sweep a large signal sinusoidal condition and record the output frequency response (with defined closed loop setting) and then determine the bandwidth straight forward. But I want to make this operation more automated like a real Bode blode measurement with by sweeping the sinusoidal signal frequency.

Does Cadence Virtuoso support a a sine source with sweeping frequency?

Thank you in advance for your help

Best Regards

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 2 years ago

    Dear Senan,

    Senan said:

    But I want to make this operation more automated like a real Bode blode measurement with by sweeping the sinusoidal signal frequency.

    Does Cadence Virtuoso support a a sine source with sweeping frequency?

    If I may, I will add a suggestion, but will not pretend to suggest it is the most efficient nor automated means of determining the large signal transfer characteristic of an amplifier. However, I have used the procedure many times and it served my needs.

    Senan said:
    Does Cadence Virtuoso support a a sine source with sweeping frequency?

    There is a sine wave source whose frequency can be a variable. I am not aware of a sine wave source that has an innate frequency sweep as part of its CDF. However, even if there were, I think it will not be as useful for your application as using a sine wave source whose frequency is a variable. Let me explain my comments with a bit more clarity.

    1. To determine the gain and phase of an amplifier at a given frequency fo in a large-signal transient simulation, there are a few things to consider

    a. The settling time of the amplifier to a given frequency may be frequency dependent (either a fixed time or dependent on frequency if AC coupled)

    b. The simulation time must include N periods of the input frequency fo (time of N/fo) after its settling time to accurately measure steady-state gain and phase

    c. The gain of the amplifier at each frequency must be considered. For a gain that varies with frequency, the amplitude of the applied signal must be less than that which results in non-linear behavior with  expected high gain values and greater than that required to exceed simulator/device noise for frequencies that have significant attenuation.

    For these reasons, and I am sure there are others, I prefer to sweep a frequency variable of a sinusoid source fo. I then set the simulation time, settling time, amplitude, and simulation accuracy settings to variables dependent on the applied frequency fo. I also use the simulation time (which is a function of fo) and fo to set the analysis period for the Fourier analysis. I compute the gain from a Fourier analysis of the input and output waveforms. I use a Fourier analysis to minimize the noise of the measurement. The phase can be measured in the time domain using the input and scaled output waveform (scaled by gain). Since there will be single gain and phase measurement per corner (since each distinct frequency of your sweep is a corner), one can plot the gain and phase data as a function of freqeuncy directly in Assembler/Explorer. This provides your "Bode" plot function.

    As mentioned, this is a method that I've used and may be less efficient than others might suggest. However, I wanted to at least pass the thought by you.

    Shawn

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

    Doing this with transient is always going to be a pain. If you truly need the large-signal frequency response (presumably because the circuit is not responding linearly at the input signal level you've chosen), I would use one of the RF analyses (shooting PSS or harmonic balance (hb) - hb almost certainly makes most sense as I would expect that the circuit won't be hugely nonlinear and a relatively small number of harmonics should be sufficient). Then you could parameterise the frequency of the source and sweep that - and make the frequency of the tone in hb the same. Then you could plot the magnitude of the 1st harmonic of the output signal and then you'd get that versus your frequency sweep.

    Much easier than having to mess around trying to get FFTs to give accurate results over a wide range of frequencies, and the simulation will naturally give you the steady-state result at each frequency.

    Andrew

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

    Dear Shawn and Andrew,

    Thank you very much for your nice and helpful explanation. Now I am in front of several solutions, I will try to go one by one and give you feedback individually.

    The first one I am gonna try is to use the sine wave with parametrized frequency, I will run the transient simulation for several periods to be sure that amplifier is settled and I will adjust the simulation time to be function of the signal frequency.

    Let me assume I am going to run the sine wave with 8 cycles. I usually clip the first two cycles from my output results using the clip function from Calculator, so I will be ended with 6 clean cycles.

    Usually I use the clip function with defined time, e.g, clip from 2 µs to 10 µs. However, with the above setup, the frequency is going to change and so on the time, therefore my first question here how can I set the clip function to be dynamic.

    My second question is about the logarithmic varying of the frequency. I can find this option available from the variable panel, but I am wondering if I can do a variation similar to the AC simulation, that is I need to run 100 simulation per decade. Is that possible? 

    Thank you in advance

    Best Regards

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

    Dear Senan,

    Senan said:
    The first one I am gonna try is to use the sine wave with parametrized frequency, I will run the transient simulation for several periods to be sure that amplifier is settled and I will adjust the simulation time to be function of the signal frequency.

    If it is helpful at all, I usually do something like the following to define a simulation stop time when running a set of simulations over frequency.

    1. Define a variable for the input frequency. As an example, perhaps choose "input_freq_Hz"

    2. Define a settling time (independent or nearly so of frequency) as, for example, "t_settle_sec".

    3. Define a simulation stop time as, for example, "t_stop_sec"  where t_stop_sec = t_settle_sec + 8/input_freq_Hz

    As the variable input_freq_Hz is varied, your simulation will have a common settling time followed by an additional 8 cycles of the input waveform.

    Senan said:

    I usually clip the first two cycles from my output results using the clip function from Calculator, so I will be ended with 6 clean cycles.

    Usually I use the clip function with defined time, e.g, clip from 2 µs to 10 µs. However, with the above setup, the frequency is going to change and so on the time, therefore my first question here how can I set the clip function to be dynamic.

    The use of the variables I mentioned in response to your first question allows one to clip the waveform for exactly 6 cycles using the clip() function as follows:

    clip("/vout" (t_stop_sec - 6/input_freq_Hz) t_stop_sec)

    I believe this will create a clipped waveform for each value of your input_freq_Hz frequency of length 6 cycles.

    Senan said:
    My second question is about the logarithmic varying of the frequency. I can find this option available from the variable panel, but I am wondering if I can do a variation similar to the AC simulation, that is I need to run 100 simulation per decade. Is that possible? 

    Unless I am not fully understanding your question Senan, which is always possible, you can choose a logarithmic sweep for any variable in the Corners setup. When you select a variable, you can choose how you want to sweep the variable as well as the values to sweep between. Figure 1 from the Assembler manual illustrates the selections required to perform a logarithmic sweep with N/points per decade.

    Shawn

    Figure 1

    from URL:support.cadence.com/.../techpubDocViewerPage

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

    Dear Shawn,

    Thank you very much for your suggestion, I tried it and it is working perfectly, but only one thing was not able to execute it, that is the function of the clip that you have suggested clip("/vout" (t_stop_sec - 6/input_freq_Hz) t_stop_sec)

    where Cadence gives me this error

    Thank you once again for your kind help

    Regards

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

    Dear Senan,

    Senan said:

    I tried it and it is working perfectly, but only one thing was not able to execute it, that is the function of the clip that you have suggested clip("/vout" (t_stop_sec - 6/input_freq_Hz) t_stop_sec)

    where Cadence gives me this error

    Thank you for letting me know Senan...one step forward...but one step back too!

    1. Did you define t_stop_sec as:

    t_settle_sec + 8/input_freq_Hz

    and include a value for t_settle_sec?

    if yes, in your corners setup where you sweep variable input_freq_Hz, did you also include a value of input_freq_Hz that is zero? A value of zero would result in division by zero which would produce an unbound variable. Finally, you might try to modify the syntax to make sure the division performed results in a double in lieu of an integer as follows:

    t_stop_sec = t_settle_sec + (8.0/input_freq_Hz)

    Shawn

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

    Dear Shawn,

    Thank you very much for your response,

    Exactly I have done the steps before like you already suggested, so th value of the settling time is defined from the variable pane, that is how the simulation was running correctly and stop time is well responding to the equation.

    For the frequency variable I starts from a value like 1 or 10, never try  zero, otherwise it will be a problem as you explained.

    Today I have tried your modification to the syntax to be t_stop_sec = t_settle_sec + (8.0/input_freq_Hz),

    Unfortunately, it is still complaining with the same error 'I shared before.

    As I am wandering why the Clip function is showing unbonding to t_settle_sec, I tried to redefine it as shown in the figure below

    After evaluation, the Cadence shift this error now to input_freq_Hz as shown below

    Thank you in advance for your kind help

    Regards

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

    Dear Senan,

    Senan said:

    Today I have tried your modification to the syntax to be t_stop_sec = t_settle_sec + (8.0/input_freq_Hz),

    Unfortunately, it is still complaining with the same error 'I shared before.

    As I am wandering why the Clip function is showing unbonding to t_settle_sec, I tried to redefine it as shown in the figure below

    Ahah! I see you are using the Calculator to create your expression. I did not realize this. As a result, I think you need to use the VAR() function with the clip function. Might I suggest you try:

    clip("/vout" (VAR("t_stop_sec") - 6/VAR("input_freq_Hz")) VAR("t_stop_sec"))

    or with your new expression:

    I hope this helps Senan!

    Shawn

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

    Dear Shawn,

    Thank you so much for your help, 

    yes I am using the calculator, and you are right I must had use the VAR as you thankfully suggested. I have tried it for your first suggested formula (clip("/vout" (t_stop_sec - 6/input_freq_Hz) t_stop_sec)) as you can see from the image below

    Now Cadence is not complaining about the unbonded variable. Unfortunately, I have to inform you that the clip function is not clipping the signal, it passes it as it is as you can see from the simulation down for the above function

    Thank you for your patience and help

    Best Regards

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

    Dear Senan,

    Thank you for your update! However, I don't think you used the VAR() function correctly and hence the clip() function did not clip the waveform. The syntax I suggested was:

    From: 100u + (8/VAR("input_freq_Hz")) - (6/VAR("input_freq_Hz"))
    To: 100u + (8/VAR("input_freq_Hz"))

    Hence:
    clip(VT("/vout") (100u + (8/VAR("input_freq_Hz")) (6/VAR("input_freq_Hz"))) (100u + (8/VAR("input_freq_Hz"))))

    I think this will work correctly.

    The variable "input_freq_Hz" is defined in your netlist and hence VAR("input_freq_Hz") will produce its value.

    If I understand the expression you created:

    clip(VT("/vout") VAR("t_stop_sec - (6/input_freq_Hz)") VAR("t_stop_sec"))

    There is not a variable "t_stop_sec - (6/input_freq_Hz)" and hence it will not appear in the netlist as a variable. If you defined a new variable, say, "start_clip_sec" as:

    start_clip_sec = t_stop_sec - (6/input_freq_Hz)

    and then use the expression:

    clip(VT("/vout") VAR("start_clip_sec") VAR("t_stop_sec"))

    I think that will work.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Senan

    Dear Senan,

    Thank you for your update! However, I don't think you used the VAR() function correctly and hence the clip() function did not clip the waveform. The syntax I suggested was:

    From: 100u + (8/VAR("input_freq_Hz")) - (6/VAR("input_freq_Hz"))
    To: 100u + (8/VAR("input_freq_Hz"))

    Hence:
    clip(VT("/vout") (100u + (8/VAR("input_freq_Hz")) (6/VAR("input_freq_Hz"))) (100u + (8/VAR("input_freq_Hz"))))

    I think this will work correctly.

    The variable "input_freq_Hz" is defined in your netlist and hence VAR("input_freq_Hz") will produce its value.

    If I understand the expression you created:

    clip(VT("/vout") VAR("t_stop_sec - (6/input_freq_Hz)") VAR("t_stop_sec"))

    There is not a variable "t_stop_sec - (6/input_freq_Hz)" and hence it will not appear in the netlist as a variable. If you defined a new variable, say, "start_clip_sec" as:

    start_clip_sec = t_stop_sec - (6/input_freq_Hz)

    and then use the expression:

    clip(VT("/vout") VAR("start_clip_sec") VAR("t_stop_sec"))

    I think that will work.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • Senan
    Senan over 2 years ago in reply to ShawnLogan

    Dear Shawn,

    Thanks a lot, that was a wonderful help, it is working now perfectly :)

    I could now simulate the large signal bandwidth of my circuit. For the purpose of the test I have verified it with a simple single poleLPF circuit,

    I have defined a math function to calculate the gain in db by dividing the peak-to-peak value of the output signal to the input as you can see from the image below, the clip function helped me to take the clean part of the signals.

    One thing remaining for this approach is how to plot the phase response of the circuit from this time domain simulation.

    Thank you very much once again and I do appreciate your kind help and support

    Regards

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

    Dear Senan,

    Senan said:

    I could now simulate the large signal bandwidth of my circuit. For the purpose of the test I have verified it with a simple single poleLPF circuit,

    I have defined a math function to calculate the gain in db by dividing the peak-to-peak value of the output signal to the input as you can see from the image below, the clip function helped me to take the clean part of the signals.

    Excellent and very good work Senan!! There are other means to more precisely determine the large-signal gain, but if the amplitude of your input and output signals are sufficiently large with respect to numerical noise, and your amplifier does not produce significant harmonic distortion, and the accuracy requirement for your transfer function/bandwidth estimate is under 1 dB, your method is probably fine.

    Senan said:
    One thing remaining for this approach is how to plot the phase response of the circuit from this time domain simulation

    The phase response can be estimated using a series of time domain measurements of the normalized input and output waveforms if you're up for another "challenge". I will send you an example shortly.

    Shawn

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

    Dear Senan,

    ShawnLogan said:
    The phase response can be estimated using a series of time domain measurements of the normalized input and output waveforms if you're up for another "challenge". I will send you an example shortly.

    I've completed an example of the methodology using a 1 MHz lowpass single-pole filter and documented a few notes on the masher in which the phase is computed from the normalized input and output waveforms (assuming sinusoidal). They may be a bit brief, but I was trying to get you something quickly to consider. I hope this helps.

    Shawn

    transfer_function_gain_phase_1 MHz_example_sml_021423.pdf

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

    Dear Senan,

    I took some time to better explain the algorithm to determine the large signal transient response when the input and output waveforms are nearly sinusoidal and corrected one error in my prior note. Please  ignore the prior document to avoid any confusion and refer to the following document:

    If I try to include this as a link, it will be flagged as spam, so I have to include it as a graphic - sorry! However, if you just enter the first part of the address into your browser and append it with:

    /s/z7bljbf3l539u87/transfer_function_gain_phase_1%20MHz_example_sml_021523v1p1.pdf?dl=0

    it may be less "painful" to access the note. My apologies for the added effort Senan!

    Shawn

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

    Dear Senan,

    I updated the note to include the manner in which the gain was computed to version 1.2. Unfortunately, the address was changed even thought I attempted to keep it the same. The last segment of the updated note address (and correct address) is:

    /s/9ok4tyy8iz8sp4i/transfer_function_gain_phase_1%20MHz_example_sml_021623v1p2.pdf?dl=0

    Shawn

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

    transfer_function_gain_phase_1 MHz_example_sml_021623v1p2.pdf

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

    Dear Shawn,

    I am so grateful for your great help and dedicated time to answer my post. I will soon recover my access to Cadence after my vacation and give you feedback on your suggested method.

    Thank you very much once again 

    Best Regards

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

    Dear Senan,

    Senan said:
    I will soon recover my access to Cadence after my vacation

    I just hope it is somewhat helpful - but vacation must come first Senan! Enjoy!

    Shawn

    • 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