¿ªÔÆÌåÓý

Re: THD of a sine with a small dent at crossover


 

Hello Mark,

You could use my uploaded THD simulation. The results from
.FOUR agree with my formula. Give it a try.

THD = 100%*2*pi*sqrt(1/3*(D/T)^3)
=================================

Files > Temp > crossover_distortion.asc
Best regards,
Helmut

--- In LTspice@..., "Echidna" <mchambin@...> wrote:

Thanks a lot, you found where I was wrong.

Indeed, I was tricked by the .FOUR function default calculation on 9 harmonics only.
I tried with 99 harmonics and got a much different result.

The calculated THD is very sensitive to the number of harmonics
With D = 10 us ; T = 1ms
9 harmonics THD = 0.25%
49 harmonics THD = 0.56%
99 harmonics THD = 0.66%
199 harmonics THD = 0.69%
999 harmonics THD = 0.71%

I had done your calculation and did find THD proportional to (D/T)^1.5
Then, to check it, I used LTspice simulations giving me wrong results.
Then got confused.

I am confident the (D/T)^1.5 is right.
However I am unable to check it with LTspice simulations. It is so sensitive about the number of harmonics, I am not sure these simulation results make sense.

Best regards,
Marc.


--- In LTspice@..., "qrx3" <fredh@> wrote:

Greetings,

If we make some assumptions then the math becomes easy enough that even I can do it. First, imagine that you are taking a pure sinewave and subtracting a small signal from it to create the waveform you want. The pure sinewave has no distortion, while the small signal looks roughly like a tiny triangle starting at 0V and reaching some maximum voltage before dropping back to 0V, symmetrically at each zero crossing. That maximum voltage is sine(2 pi D / T), for small values of D/T this is about linear.

If we assume that your 'dent' is small enough that it does not appreciably affect the energy at the fundamental frequency (i.e. the distortion is 'small'), then the total distortion is roughly the ratio of the RMS value of small pulse divided by the RMS voltage of the fundamental.

It's simple to show that the RMS value of a triangular pulse is proportional to (D/T)^1.5 as Helmut stated in the other thread, so that should be what you observe in THD also. The reason this disagrees with what you found has to do with the way THD is calculated by the .FOUR function. Notice that the error log shows Fourier components up to 9th order, or 9kHz in your example. Note also that the magnitude of the distortion components is the SAME for each one (since your signal is symmetric there will only be odd components, ignore the even ones as they are noise), it has not started to drop off by the 9th. The calculated THD is based on only those four frequencies, it should be easy to imagine that if you calculated more components the THD would keep going up.

How many do you need? To get an idea, look at the width of your distortion pulse, 10us in your example. It's a good bet that the 'missing' pulse has components up to at least 100kHz. So you may need to go past the 99th harmonic to get anything accurate. Or, remove the fundamental and measure the RMS of what remains, much easier.

Once this is understood it's easy to see why your observation came out too low (not enough coefficients included in the measurement) and also why the observed exponent is too high (as D increases the number of important coefficients will be reduced, so the THD will not increase as fast as you observed, exponent of 1.5 instead of 2).

HTH,
Fred

--- In LTspice@..., "Helmut" <helmutsennewald@> wrote:

Hello Echidna,

Crossover Distortion
--------------------

I calculated the formula with Fourier series and approximation.

sin(x) = x-1/6*x^3

1-x^2 = 1-2*x

THD = 100%*2*pi*sqrt(1/3*(D/T)^3)
=================================

Files > Temp > crossover_distortion.asc

You can check the distortion calculated by .FOUR with
View -> SPICE Error log

Best regards,
Helmut


--- In LTspice@..., "Echidna" <mchambin@> wrote:

Hello.
How to calculate, using maths and definitions, the THD of this signal: A sine with a small dent at the crossovers.

S(t) = 0 for 0 < t < D where D is much smaller than T
S(t) = sin omega*t for D < t < T/2 where omega is 2*pi/T
S(t) = 0 for T/2 < t < T/2 + D
S(t) = sin omega*t for T/2 + D < t < T

Using LTspice simulations I find THD = 25*( D/T )^2
In this simulation I used a 1000 HZ SINE combined with a PULSE with values of D like 0.1u 0.2u 0.5u 1u 2u 5u 10u 20u 50u
These simulations gave me a THD that perfectly fits with 25*( D/T )^2

Here is the issue.
I was enable to prove this result with maths
(instead of simulations ).
I started computing the RMS value of the error signal (the dents at the crossovers)
With sin omega*t = omega*t ( valid for t << T )
I don' t get the 25*( D/T )^2 result, I do get a fonction of D/T, so far so good, but I don't get the right exponant. It seems my approach is wrong.

Is there a signal theory / maths guru who can give the proof that for such a signal S(t) ( with D << T ) we have THD = 25*( D/T )^2

Join [email protected] to automatically receive all group messages.