Stepped sine THD and N calculation

Tranzorb

Registered
Thread Starter
Joined
Dec 21, 2018
Messages
4
More  
Main Amp
DIY
DAC
Topping D70
Other Equipment
Cosmos E1DA ADC
Hello John,

First of all thank you for making REW and all that it makes possible.

I am currently using REW for distortion measurements of a DIY 100W power amplifier, with the usual idea to make it as quiet and distortion less as possible. Currently I am measuring around 0.00015% distortion @50W, up to 10Khz, with around 27uV noise (over 22kHz bandwidth, ie 170nV/sqrt(Hz)), at a gain of 27dB.
For the matter I am using the RTA window, and Stepped sine.

I am currently facing a kind of a dead end issue, because if I understand well the stepped sine measurement calculate the THD on a maximum of ten harmonics.
On the other hand, the RTA THD is calculated up to 50 harmonics, which is fair for the purpose of an amplifer measurement.
However, those measurements are not totally correct depending on the bandwidth we want to measure.

PLS correct me if I misunderstood of course.

Example :
Measurement with HP filter set @22kHz, fundamental 500Hz :
  1. Stepped Sine : THD will be calculated up to 5kHz (9 harmonics), so the 17kHz above (to reach 22kHz) are not included in the calculation, and the result is much lower than the true one.
  2. RTA : THD will be calculated up to 25kHz (50 harmonics), and limited to the bandwidth 22kHz (which is exactly what we want). So the result is correct there.
We see that for a given bandwidth (say Fbw), the minimum fundamental that will give precise results is Fbw/50. For 22kHz this yields 440Hz. For 30Khz which is a kind of "standard", this will yield 600Hz

There is also another difference that I noticed, between RTA and Stepped Sine :
Stepped sine makes it mandatory to use at least 2 averages. Howerver, it seems that this averaging is not accounted for for noise calculation. The result is a lower noise figure in stepped sine than what should be, and it is made clearly visible when comparing with RTA (if my understanding is correct once again).

So, to make a long story short, it would be great if :
  1. THD calculation in Stepped sine could be made over the selected bandwidth, or if it is too tricky calculate it for 50 harmonics, limited to bandwidth (as in RTA).
  2. Noise calculation in Stepped sine was corrected, maybe only allowing no averaging would do.
Maybe it could be part of the Pro Upgrade Licence to compensate for the work, I really think it would be worth it for electronics DIYers.

Thank you very much for taking the time to read this and excuse my english which is not my native language, I hope it was understandable enough.

Best regards,

Frederic
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,349
if I understand well the stepped sine measurement calculate the THD on a maximum of ten harmonics
No, stepped sine measurements are RTA measurements and use as many harmonics as are included in the bandwidth set by the Distortion LP setting or by the "Highest harmonic in THD" setting, whichever is lower.

it seems that this averaging is not accounted for for noise calculation.
I'm not sure what you mean by that. Averaging for noise is rms, the noise figure will be a little more stable with averaging but it shouldn't be significantly different unless you have some transient instability during measurement.
 

Tranzorb

Registered
Thread Starter
Joined
Dec 21, 2018
Messages
4
More  
Main Amp
DIY
DAC
Topping D70
Other Equipment
Cosmos E1DA ADC
Thank you very much for your reply.
I hope not to be too insisting, just maybe I am not reading correctly.

However, unless I have not found the item in the menus, the settings in Distortion on the main page do not allow to use more than 9 harmonics (cf Stepped settings.jpg), and measurements are not consistent between RTA and Stepped Sine.
Please note that in RTA, Distortion settings I have set Highest Harmonic in THD to 50.

Please find attached some measurements. All were made with the same settings.

Stepped sine @1kHz :
THD(2-9) : -124.6dB measured on graph (Stepped 1kHz disto.jpg)
THD+N : -114.5dB measured on graph (Stepped 1kHz THDN.jpg)
Noise : -115dB


RTA @1kHz :
THD(2-22):-116.6dB
THD+N : -112.4dB

On the other hand, if I limit Highest Harmonic to 9 in Distortion Settings, I have the same result than in Stepped sine measurement (see RTA 1kHz 9Harm.jpg) :
THD2-9 : -123.4dB (-124.6dB actually in Stepped Sine)

Furthermore, I confirm that the THD+N figure in Stepped Sine, as displayed in the Distortion screen in main menu, is made out of THD2-9+Noise :

THD+N=10log10(10^(-115/10)+10^(-124.6/10))=-114.5dB which is exactly the result displayed on the Stepped sine graph as reported above. So the actual result we have in this graph is THD2-9+N, not over the bandwidth or until 50 harmonics (once again there is maybe a config I missed somewhere)

It seems that the correct result should be :

THD+N=10log10(10^(-115/10)+10^(-116.6/10))=-112.7dB, which is the result displayed in RTA (112.4dB actually).

So unless there is a way somewhere to have distortion calculated for n harmonics in Stepped sine, what I found seems to show that the result is currently limited to the 9 first harmonics.

So if you could check for this, or be kind enough to indicated where is the setting, it would be great.

Thank you again.

PS : averaging seems not to make any difference indeed, sorry for that.
 

Attachments

  • RTA 1kHz 9Harm.jpg
    RTA 1kHz 9Harm.jpg
    126.3 KB · Views: 12
  • RTA 1kHz.jpg
    RTA 1kHz.jpg
    126.7 KB · Views: 14
  • Stepped 1kHz disto.jpg
    Stepped 1kHz disto.jpg
    109.5 KB · Views: 12
  • Stepped 1Khz THDN.jpg
    Stepped 1Khz THDN.jpg
    109.5 KB · Views: 12
  • Stepped settings.jpg
    Stepped settings.jpg
    113.8 KB · Views: 15

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,349
Thanks, I see the problem. Only the first 9 harmonics are transferred when the measurement is generated, I'll make a change to transfer all harmonic data and allow the distortion graph THD setting to go up to 50. I can send you a test build to try if you like, let me know.
 

Tranzorb

Registered
Thread Starter
Joined
Dec 21, 2018
Messages
4
More  
Main Amp
DIY
DAC
Topping D70
Other Equipment
Cosmos E1DA ADC
Thanks, I see the problem. Only the first 9 harmonics are transferred when the measurement is generated, I'll make a change to transfer all harmonic data and allow the distortion graph THD setting to go up to 50. I can send you a test build to try if you like, let me know.
You are most welcome, happy to help.
If you can send me a test build it would be awesome. I will tell you how it does.
Thanks again.
 

Tranzorb

Registered
Thread Starter
Joined
Dec 21, 2018
Messages
4
More  
Main Amp
DIY
DAC
Topping D70
Other Equipment
Cosmos E1DA ADC
Now working perfectly, thank you for being so reactive and efficient.

Frédéric
 
Top Bottom