• 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 calculate THD using calculator?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 126
  • Views 18894
  • 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 calculate THD using calculator?

greatqs
greatqs over 14 years ago

I found the thd() in calculator only has  5 arguments (e.g. from, to, # samples, fundamental frequency).

For example, I'm doing a FFT with sample frequency of 8192KHz with from=1ms to=2ms and fundamental frequency is 5KHz.

I want to calculate the THD within 20 ~ 20KHz instead of 0 ~ 4096KHz which thd() does since it doesn't include Fmin/Fmax arguments.

 

Thanks,

qs

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 11 years ago
    The THD, as a parameter, is defined as the rms sum of all the fundamentally related harmonics in a signal. Hence, the function, I believe, computes the total harmonic distortion in a manner consistent with the definition (given the FFT length).

    To compute the harmonic distortion for a lesser number of harmonics or over a particular frequency range, simply determine the power (or value of the dft function) for the relevat harmonics and perform the rms sum to compare it with the power in the fundamental.

    An alternative might be to actually include a filter in your circuit analysis simulation that limits the bandwidth to the range of interest and then use the THD function on its output.

    I hope this provides some help!

    Shawn

    http://www.aspowertechnologies.com/resources/pdf/Total%20Harmonic%20Distortion.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 11 years ago
    The THD, as a parameter, is defined as the rms sum of all the fundamentally related harmonics in a signal. Hence, the function, I believe, computes the total harmonic distortion in a manner consistent with the definition (given the FFT length).

    To compute the harmonic distortion for a lesser number of harmonics or over a particular frequency range, simply determine the power (or value of the dft function) for the relevat harmonics and perform the rms sum to compare it with the power in the fundamental.

    An alternative might be to actually include a filter in your circuit analysis simulation that limits the bandwidth to the range of interest and then use the THD function on its output.

    I hope this provides some help!

    Shawn

    http://www.aspowertechnologies.com/resources/pdf/Total%20Harmonic%20Distortion.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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