• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » WEBENCH® Design Center » Simulation and Models Forum » calculating THD
Share
WEBENCH® Design Center
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

calculating THD

This question is answered
Deepak Mathew
Posted by Deepak Mathew
on Jul 02 2012 10:08 AM
Prodigy60 points

Hello ,

I am observing that depending on how small I keep the TR maximum step [s] option in the analysis parameters I keep getting better and better THD . So exactly what value should this be?. Actually what does this parameter decide ? Does it in anyway decide the source purity ?

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Herman Theodorus - WEBENCH Design Center
    Posted by Herman Theodorus - WEBENCH Design Center
    on Jul 02 2012 14:08 PM
    Intellectual870 points

    Deepak,

    What simulator are we talking about here?Based on my experience,

    If it's TINA-TI, using perfect voltage source you can get better than -200dBc

    If it's Pspice, using perfect voltage source, we can get anywhere between -160 dBc to -200dBc

    If it's TIspice, using perfect voltage source, we can get better than -200dBc.

    Thus, the at one point, depending on the simulator, you should get diminishing return of THD (certain THD floor) with more time step manipulation.

    If you can tell me what simulator you use and what circuit you work on, I think that will help to understand better.

    Herman

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JC Zhu - WEBENCH Design Center
    Posted by JC Zhu - WEBENCH Design Center
    on Jul 02 2012 15:04 PM
    Verified Answer
    Verified by Deepak Mathew
    Intellectual1110 points

    Deepak,

    What you observed is correct. When you ask a simulator to give you the THD, it samples the transient waveform based on the number of harmonics you are interested in, then does an FFT. If you want to know the THD up to the 10th harmonic, for example, it will sample 1024 points inside one period of the base frequency signal.

    Since the transient waveform calculated by the simulator is a piecewise linear signal, sampling (or interpolating) will inevitable introduce errors and these errors will be deemed as part of the distortion of the real signal (continuous). However, the more points you have in the transient waveform, the smaller those errors are.

    This is why you see improvements by reducing TMAX, or the maximum time step. Basically you are making the waveform smoother, less piecewise. This means less sampling errors will be introduced. It is not about the source purity. The source is correct at each time step.

    Some simulators go one step further. They don't use the adptive time step control, but a fixed time step when THD is required. And this fixed time step is determined by the base frequency and the number of harmonics you care about. So for the THD up to the 10th harmonics, it will calculate all 1024 time points inside one period of the base frequecy, there's no sampling needed and the FFT is performed on the calculated points, hence the THD value is more accorate.

    Regards,
    JC

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Deepak Mathew
    Posted by Deepak Mathew
    on Jul 02 2012 23:37 PM
    Prodigy60 points

    Thank you Mr.Zhu . Is it possible to d fixed time step simulation for calculating THD in TINA -TI .

    Thanks and Regards

    Deepak Mathew

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Herman Theodorus - WEBENCH Design Center
    Posted by Herman Theodorus - WEBENCH Design Center
    on Jul 03 2012 05:27 AM
    Intellectual870 points

    I could be wrong, but it seems TINA-TI does not allow fixed time step simulation. Again i could be worng here.

    It has the Fourier Analysis -> Fourier Series where it will calculate the time step automatically.

    On Pspice, you can specify the fixed time step by doing period/2^n.

    In any kind of spice, you should get about the same THD result assuming you pick enough samples. In this case

    for THD around -100dBc, usually 1024, 2048 or 4096 are more than enough. If you pick too little such

    as 512 or 256 or even smaller, then you can get large variation of THD (or improvement of THD with more samples)

    On TINA-TI Fourier Analysis, usually, I use the following for optimum result:

    1. Sampling start time = 1 period. Thus for 1kHz signal, I choose 1m (make sure 1st on transient analysis box, the end time is bigger than 1ms)

    2. Base Frequency. If you use single stone, usually it will pick up the base frequency for you automatically from the voltage generator.

    3. Number of samples, TINA default of 4096 is usually ok for most cases (especially for those worse than 100dBc performance)

    4. Format, I usually use the RMS, phase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Deepak Mathew
    Posted by Deepak Mathew
    on Jul 03 2012 08:28 AM
    Prodigy60 points

    I think my problem is that I am trying to get the THD of a100Khz sine wave . So even though tina takes equally spaced points ,  I think it simply interpolates existing data to get the data at these points .So when I decrease the time step the there  will be more data points and hence the interpolation would be  more precise  , hence better THD .

    Thanks and Regards

    Deepak Mathew

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Herman Theodorus - WEBENCH Design Center
    Posted by Herman Theodorus - WEBENCH Design Center
    on Jul 03 2012 16:23 PM
    Verified Answer
    Verified by Deepak Mathew
    Intellectual870 points

    I did a quick experiment on 100kHz sine wave, I was able to get a THD floor of around 1E-11% whether the Max time step is 1ps, 10ps or 100ps (which is around 1 million per period), but as you're alluding, as I step into 1ns for instance, the THD gets around 1E-10%, then as we make the Max time step bigger, the THD gets worse. Needless to say, I thikn as you said, this precisioness of method is due to measurement on pure voltage source which probably won't necessarily apply to real circuit (on TINA-TI) which tends to float around -100dBc of THD performancr rather than -250dBc type for performance.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Deepak Mathew
    Posted by Deepak Mathew
    on Jul 03 2012 23:51 PM
    Prodigy60 points

    Thank you guys , actually I was trying to simulate the performance of my bench setup which gave me more than 100 dB THD dBFS . I guess the process will reducing max step size is the only way . 

    Thanks and Regards

    Deepak Mathew

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use