• 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 plot THD against output voltage?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 125
  • Views 12681
  • 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 plot THD against output voltage?

sahand1400
sahand1400 over 3 years ago

Hi,

I want to calculate THD for OTA and plot the value against output voltage. I do not know which parameter I must be sweep to vary output .can somebody help me step by step to do this to get the following plot? The caption of figure explains the fixed value for input photocurrent and small value for amplitude . Which parameter changes The output voltage in this figure?  thanks

  • Cancel
  • ShawnLogan
    ShawnLogan over 3 years ago

    Dear sahand1400,

    sahand1400 said:
    I want to calculate THD for OTA and plot the value against output voltage.

    Your questions are rather open and it would help me, anyway, if you provide a set of specific questions. I, for one, have no idea of the design of your specific LNA, nor what Cadence tool(s) you are using, nor your familiarity with the tools you are using (and the their respective versions). Hence, I can only guess at these to provide a few thoughts. As a result, my comments may not be relevant or I may have totally misunderstood your questions - sorry!

    1. Since the input amplitude appears to be referred to as "small" from the caption of your attached "Figure 14", I assume it remains constant. Therefore, either the gain of the LNA or the load impedance (used to establish the gain if the LNA is acting to increase only the current) of the LNA may the parameter which is varied to change the total harmonic distortion.

    sahand1400 said:
    I want to calculate THD for OTA and plot the value against output voltage. I do not know which parameter I must be sweep to vary output .can somebody help me step by step to do this to get the following plot?

    2. If you are using ADE Explorer or Assembler, this is a simple set of corner simulations where you set, if my assumptions about your LNA are correct, its gain or the load impedance. You create a Calculator expression that computes the THD for each of the simulations in your set of simulations and define it as an output expression and enable the plot option for this output. You may then plot the expression against the output voltage (expressed as a scalar using an Calculator function such as average(output_voltage_net_name) or rms(output_voltage_net_name) or its peak-to-peak value using ViVA.

    I am sorry I cannot provide more detailed information sahand1400, but just don't have any insight on the items I mentioned in my response!

    Shawn

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

    Dear ShawnLogan

     Thanks for your help and consideration. I try to simulate an optical receive. I use virtuoso version 6.1.4 (IC6.1.4.485) for simulation. The input stage is a TIA so the input of my circuit is current with the frequency of 1Hz. The following picture shows the blocks of our receiver. I want to evaluate the linearity of the AFE. According to base article, I do the simulation. I must plot the variation of THD against vout(vpp) as past mentioned figure.

    figure(1)

    I try three methods to calculate THD:

    First, using hb analysis with the following settings figure (2). Then I save the output using calculator expression. I calculate the vp-p using calculator too, then I do a parametric analysis by defining the amplitude of input current as a variable and changing its value from 1n to 500n.Then in the figure by changing the axis I could plot THD versus Vp-p. I reach the figure (3) but the results are very different from the base article.

     figure(2)-the setting of hb analysis   Figure 3-THD against vp-p

    Second, I try to calculate the THD using PSS analysis and sweeping iac(input amplitude) but the output results shows the fixed value for THD  as shown in figure4  is very strange.

    Third, I do a transient analysis and select output voltage and select THD function from calculator but it appears this error dialog. I don’t know where is wrong.

    I would appreciate you if you let me know which of mentioned procedure is right?

    regard

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

    Dear sahand1400,

    Thank you for your added information. It does provide some help to my understanding. I have noticed a number of items that I may be related to your various questions about simulation methodology and THD results.

    1. You noted the photodiode frequency is 1 Hz with an amplitude sweep of 1n to 500n. However, in studying your circuit and simulation settings, there are several items:

    a. I am concerned your transient analysis simulation time may not be long enough to capture enough waveform cycles of a 1 Hz signal. What is your simulation time?

    b. I am also concerned that the first stage may end up clipping its output as the amplitude increases to 500 nA. If it does, the output will be totally distorted and the THD is really bad. It would be far better to study the THD at the output of your first stage initially and then add in one more stage to verify its output is not saturated.

    c. Between your first two stages, there is an AC coupling capacitor as well as a number of filter capacitors. This will take a number of cycles f=of your input waveform to establish its steady-state DC voltages on each side of it. Are you allotting enough simulation time for the voltages on each side of the AC coupling capacitor to settle to their steady-state values? If the DC voltages on each side are not settled, the DC operating point, and resulting distortion, of your second stage may be totally incorrect.

    d. If your amplifier at any stage is clipping, the use of a harmonic balance analysis is not warranted as the waveforms will not be "sinusoidal" in nature - but closer to square waves. Hence, using a HB analysis is not advised.

    e. I would recommend you add a tstab period and save it with a shooting algorithm pss simulation and visually inspect the waveform to verify it is close to steady-state before starting the pss shooting algorithm.

    Shawn

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

    Dear Shawn

     Thank you for your time and consideration and valuable information. In the case of simulation time, the transient simulation time is 5 second. About the second case, That's absolutely true. thanks for remembering this important  note that I ignored. I am tankful for the advice on how to overcome this problem.

    e. I don't know how to set the tstab period? In other word, how i can determine the best value for tstab ?

    regards,

    sahand

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

    Dear sahand1400,

    Thank you for your note and I was very happy to read you found some of my thoughts helpful at all!

    sahand1400 said:
    e. I don't know how to set the tstab period? In other word, how i can determine the best value for tstab ?

    The tstab interval of the pss portion of the analysis is designed to allow transients of your netlist to settle out such that for simulation times > tstab, the signal nodes are somewhat close to their steady-state waveforms. In this fashion, the remainder of the pss portion of the simulation can successfully converge on a good estimate of the steady-state waveforms. Hence, an "ideal" value for tstab is one where your various signal nets are close to their steady-state values. In your specific case, I noted that you have at least one AC coupling capacitor whose value I don't know (C1, I believe, between your TIA and SA) and I was concerned that the average voltages on either side of C1 may not have settled close to their steady-state values. In essence, the high-pass filter corner frequency determined partly by C1 may be much lower than 1 Hz and will required a LOT mode time to settle. As a result, the DC bias points of your SA input node and TIA output node may not be representative of their average values in the steady-state. This is especially the case since your sinusoidal input has such a low frequency (1 Hz) and you are only simulating for 5 seconds (5 periods of your input 1 Hz frequency).

    To estimate a reasonably value for tstab, you might perform a longer conventional transient analysis and a DC analysis where you save the DC operating point. From the DC operating points, inspect the DC node voltages on either side of all your capacitors. After the conventional transient simulation completes, examine the same respective node voltages as a function of time and verify to yourself that a time exists where their average values are reasonably close to the DC node voltages. This would suggest to me that your simulation time when you inspect the average voltages provides node voltages that are close enough to their steady-state values will provide an excellent starting point for the pss analysis to estimate their steady-state waveforms. Suppose the simulation time of the conventional transient analysis you perform provides average nodal voltages that are close enough to their respective DC voltages is Tss. Then, set your pss parameter tstab to Tss, and run the pss analysis followed by your THD analysis for the various input amplitudes to estimate the THD characteristic as a function of input amplitude. As I also noted, it might be best to examine the waveforms at the outputs of your TA, SA, etc to make sure there is no internal clipping over the range of amplitudes you simulate. If there is clipping at any internal stage, perhaps you should measure the THD not at your vout node, but at the output of the last stage that shows no clipping.

    I hope my comments are sufficiently clear sahand1400 and, most importantly, I understood your question correctly!

    Shawn

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

    HI,

    Dear Shawn

    thank you very much for your patient in replying my questions.  Your comments are all helpful and instructive for me. Thanks for your detailed and step by step guidance. here, this is the first place I refer to find a certain answer for my questions.

    best regards. 

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

    Dear sahand1400,

    sahand1400 said:
    thank you very much for your patient in replying my questions.  

    I am very happy to read I, at least, understood your questions correctly! Thank you for letting us know and my best wishes for good luck in your simulations!

    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