This widget could not be displayed.

SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Window function reduces SNR calculation

1st question:

 

I had a problem in explaining the FFT analysis results of signalexpress and labview.

 

typically speaking, I expect to have a lower SINAD value than that of SNR from FFT analysis of a signal with harmonics and distortion.

I made an experiment to create an analog sinusoidal wave of ~1Khz 1Vrms with added gaussian white noise 100mVrms. Both of these

time waves are synthesized by fs=100Khz (block size~100K and integer cycles of samples for the sinusoidal wave) arithmetically added together.

if "integer cycles of samples or N periods" is selected,  and window function is set to "none" in the "tone measurement" functionality provided within

labview and signalexpress, I obtained a very close SNR and SINAD (but SINAD is still slightly larger than SNR. but why ?). If I added

a window function to the combined input, the SNR would be more degraded while SINAD  was almost unchanged. Can NI engineers

advise where I perhaps mis-use the sub-vi provided from signalexpress and labview ? Thank you very much !

 

2nd question:

Is the SNR analyzer vi of labview defined by (S+N) /N or S/N where S=power of fundamental tone ?

 

I am attaching a few useful definitions from National Instruments online help.

Hopefully these web pages can also be helpful to someone who is also looking for similar information.

 

Tim

 

 

 

Note: a few useful definitions from National Instruments web site:

http://zone.ni.com/reference/en-XX/help/372416A-01/sndvibtk/snr_no_harm/

http://zone.ni.com/reference/en-XX/help/372416A-01/TOC3.htm

http://zone.ni.com/reference/en-XX/help/372416A-01/TOC2.htm

 

 

SNR (without harmonics) returns the measured signal to noise ratio (SNR) defined as the ratio of the root-mean-square (RMS) energy of the fundamental tone to the RMS energy of the noise in the specified frequency range.

 

SINAD returns the measured signal in noise and distortion (SINAD), which is defined as the ratio of the RMS energy of the input signal (which includes fundamental tone, noise and harmonics) to the RMS energy of the input signal less the RMS energy of the fundamental tone.

 

*     I have to say this is sometimes confusing because quite a lot of engineers actually define SINAD, or SNRD or SNDR as the ratio of the RMS energy of fundamental tone to the RMS energy of the input signal less the RMS energy of the fundamental tone. If this is how SINAD is defined, then we can be sure that SNR>=SINAD.

 

THD returns the measured total harmonic distortion (THD), which is defined as the ratio of the RMS energy of the harmonics to the RMS energy of the fundamental tone.

0 Kudos
Message 1 of 6
(11,033 Views)

Hi Tim,

 

Theoretically SNR should be greater than or equal to SINAD since SNR = (S+N)/N, and SINAD = (S+N+D)/(N+D). So it's kind of weird that you got a larger SINAD. However, I did a simple experiment to check the result:

 

 

The signal wanted is a sine wave of 1000Hz with amplitude 1V.
Harmonic distortion is a sine wave of 3000Hz with amplitude 1E-5V.

Gaussian white noise with amplitude 5E-6V.

 

 

Allison Y

Applications Engineering

National Instruments

0 Kudos
Message 2 of 6
(11,006 Views)

hi, allison:

your SNR definition SNR=(S+N)/N is sligtly different from the official definition on my posted web pages of NI. I think all the NI help manuals define SNR as F1/(N), where F1 is the RMS power of fundamental tone.  Are you suggesting that indeed the software algorithm calculates SNR by (F1+N)/N, where N is RMS noise power within specified band.

I am attaching an example seproj for your trial. Under the "Tone Measurement" -> check the SNR, SINAD; and compare it to the SNR calculated under "Noise Measurement".

The example creates an analog single tone with added white noise. The distortion can actually be negligible for this ideal single tone. Therefore SNR should be very close to SINAD.

If the calculated SNR is somehow smaller than SINAD, this SNR becomes questionable. Let me know if you can open the attached seproj for your evaluation. Meanwhile I will run your test case at my side. Many thanks.

Tim

0 Kudos
Message 3 of 6
(11,001 Views)

Hi Tim,

 

The definition varies so that's why we need to specify each term. As you can see, the following two links suggest different SINAD's.


http://en.wikipedia.org/wiki/SINAD

http://www.analog.com/en/other/militaryaerospace/ad10200/products/tutorials/CU_tutorials_MT-003/reso...

 

The former one suggests SINAD = S/(N+D) or, more precisely, (S+N+D)/(N+D).

The latter one suggests SINAD = S/(N+D).

However, what we really care about is not just the absolute value of SNR, SINAD, and THD, but the relative value, say, a higher SNR means that it is better or cleaner than a lower SNR.

 

According to the explanation you posted, I would say that in this VI, SNR = S/N, and SINAD = (S+N+D)/(N+D). If it is S/N v.s. (S+N+D)/(N+D), it is possible that SNR is less than SINAD mathematically, especially when the noise is heavy. You can simply put some numbers inside the equations to check the result, say if I make S = 100, N = 10, D = 1, then S/N = 100/10 = 10, while (S+N+D)/(N+D) = 111/11 = 10.09.

 

And the function of windows is to reduce spectral leakag. The fundamental form of Fourier Transform is an integrable function, from negative infinity to positive infinity. However, in practical applications, we can only obtain a finite number of samples of the signal, so when you don't sample an integer number of cycles, discontinuities between successive periods occur. This leads to very high frequency components in the spectrum. Use windowing will help reduce spectral leakage by smoothing, but it kind of degrades the energy of the signal as well, so you might get a lower SNR. When it talks to SINAD, since the numerator contains not only S but also N and D, the change after windowing to SINAD might not be that significant compared to that to SNR. This is what I assume from mathematical models. Just for your reference.

 

Allison Y

Applications Engineering

National Instruments

0 Kudos
Message 4 of 6
(10,977 Views)
Hi, Allison:Thank you very much for sharing a good point explaining the heavy noise condition.

The following link gives a quick examination of 3 parameters, SNR, THD and SINAD (but the SINAD defined in the web page is actually defined by F1/(N+D), where F1, N and D are RMS power of fundamental tone, Noise and total harmonic dist.)

  

http://www.analog.com/Analog_Root/static/techSupport/designTools/interactiveTools/utility/snr.html

 

Let us tentatively define power ratios, SNRD=F1/(N+D), SINAD=(F1+N+D)/(N+D) and SNRD=SINAD-1. Then we can plug in the calculated SNR, THD, SNDR in terms of dB into this calculator and check if the THD, SINAD, and SNR obtained from my attached seproj can have some matched results.

And let us make integral cycles of samples for the F1 and take the “none” window option. Can you still obtain larger SNR than converted SNRD? I attached a screen dump of my project results for your examination for my potential mistake in setting up the measurement where I lowered the noise floor much more (changed from 100mVrms to 1mVrms gaussian white noise).

Tim
0 Kudos
Message 5 of 6
(10,959 Views)

Hi Tim

 

首先謝謝您所提到的 NI 定義,他們的確是正確的。此外我將 LabVIEW 對於 THD 及 SINAD 的定義也附上供您參考。

 

針對您的問題,「 I expect to have a a signal with harmonics and distortion have a lower SINAD value than that of SNR 」

我想我們可以從定義中得到答案:

 

 

以下定義皆為 LabVIEW 運算的定義。(請參考附檔)

 

 

 

案例一:Signal with noise (1mV) only

 

SNR = Fund / Noise

SINAD = (Fund+Noise) / Noise = SNR + 1

 

  因此 SNR 小於 SINAD 是正常的。

 

Fund  - Fundamental Frequency Component 

Noise - Background Noise 

 

案例二:Signal with noise  (1mV) & harmonics

 

SNR = Fund / Noise

SINAD = (Fund+Harmonics+Noise) / (Harmonics+Noise)

 

單純從公式看來,在同樣案例一的 Noise level 下,若Harmonics 夠大,SNR 是有可能大於 SINAD 的。 

 

案例三:Signal with 3rd harmonics

 

SNR = Fund / 0 = INF

SINAD = (Fund + Harmonics) / Harmonics = Fund/Harmics + 1

Expect: SNR > SINAD

 

單純從公式看來, SNR 確實必須遠大於 SINAD

 

SNR_vs_SINAD.png 

從附上的範例中,我們套入參數後,得到的結果如下

 

 

案例一:Signal with noise (1mV) only

 

SNR = Fund / Noise

SINAD = (Fund+Noise) / Noise = SNR + 1


 

Expect: SNR < SINAD

 

Results:  65.7355 < 67.9976 dB (Window: Hanning)

67.1775 < 68.0206 dB (Window: None)

 

 案例二:Signal with noise  (1mV) & 3rd Harmonics

 

SNR = Fund / Noise

SINAD = (Fund+Harmonics+Noise) / (Harmonics+Noise)

 
Results: 67.662 > 10.0001 dB (Window: Hanning)
68.9901 > 9.9999 dB (Window: None)

 

 案例三:Signal with 3rd harmonics

 

SNR = Fund / 0 = INF (實際情況不可能無限大,會限於取樣理論及雜訊定義而有所影響)

SINAD = (Fund + Harmonics) / Harmonics = Fund/Harmics + 1

Expect: SNR > SINAD

 

Results: 

291.625 > 10 dB (Window: Hanning)

  76.716 > 10 dB (Window: None) 

 
 
結論:
  1. 在純訊號 + 雜訊的模擬情況下,若沒有任何harmonics的情況下,SNR < SINAD(公式推導 & 實際結果)

  2. 在純訊號 + 雜訊+ harmonics同時存在時,SNR 通常則會大於 SINAD,但並非絕對
  3. 在純訊號 + Harmonics 時, SNR > SINAD(公式推導 & 實際結果)
 
 
您所指的 「 signal with harmonics and distortion have a lower SINAD value than that of SNR 」則屬於第三類案例
但您之前實驗的訊號「1kHz Sin + gaussian white noise 100mVrms」則是第一類案例
 
所以才會導致您發現實驗的結果和預期不同。
 
 
希望以上資訊能替您解惑。
 
 
 
 NI 應用工程師
James 敬上
 
 
 
 
附上實驗設定:
SNR_vs_SINAD_setting.png 
0 Kudos
Message 6 of 6
(10,095 Views)