TI E2E Community
WEBENCH® Design Center
Simulation and Models Forum
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 ?
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.
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.
Thank you Mr.Zhu . Is it possible to d fixed time step simulation for calculating THD in TINA -TI .
Thanks and Regards
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
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 .
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.
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 .
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.