Hello Almarg.
Reciprocating your respect, truly, I wouldn't expect you to have encountered it before.
I bought a UNIX box in 1999 to do simulation research with Maple (the pro math package). Then I found that, sadly, the journals don't like results which don't parrot the mainstream "wisdom". So I did recreational things like investigating this. In any case, it's unpublished, so you'll have to do it yourself.
The algorithm is quite simple: set the number N of samples per waveform, calculate the step functions appropriately, and calculate the difference squared between that and a sine wave. Divide by the area under the sine. That gives you RMS distortion.
Let N increase. At about N=250 you will see the distortion falling towards 5%.
Oversampling does not help much. Unless the original signal is also processed this way, you merely end up with a curve that more closely approximates a distorted sine.
Regards,
Terry
Reciprocating your respect, truly, I wouldn't expect you to have encountered it before.
I bought a UNIX box in 1999 to do simulation research with Maple (the pro math package). Then I found that, sadly, the journals don't like results which don't parrot the mainstream "wisdom". So I did recreational things like investigating this. In any case, it's unpublished, so you'll have to do it yourself.
The algorithm is quite simple: set the number N of samples per waveform, calculate the step functions appropriately, and calculate the difference squared between that and a sine wave. Divide by the area under the sine. That gives you RMS distortion.
Let N increase. At about N=250 you will see the distortion falling towards 5%.
Oversampling does not help much. Unless the original signal is also processed this way, you merely end up with a curve that more closely approximates a distorted sine.
Regards,
Terry