SD Toolbox Reference |

Postprocessing (calcSNR)

The function calcSNR performs all the postprocessing step required to obtain the power spectral density (PSD) and the signal-to-noise ratio (SNR) from the output of a Sigma-Delta modulator.

Library

SD Toolbox.

Description

The SNR and the SNDR of a Sigma-Delta modulator are defined as

respectively, where PS denotes the signal power, PN the noise power and PD the power of the harmonics of the signal. In an ideal Sigma-Delta modulator, the SNR is determined only by the quantization noise according to

where Delta denotes the input range of the Sigma-Delta modulator, N the number of bits in the quantizer, M the oversampling ratio and L the order of the Sigma-Delta modulator.

However, the other noise or distortion sources increase the total noise power of the data converter above the quantization noise level and contribute to both the SNR and the SNDR.

The calculation of the SNR or SNDR of a Sigma-Delta modulator starting from the raw output data (output samples) is performed in two steps. In the first step, the sinusoidal signal (S) is extracted from the sequence of NO output data (Oi, at time ti), typically by computing a Discrete Fourier Transform (DFT) of O at the signal frequency (fin),

where Wi denotes the desired window for the data (typically the Hanning window). The obtained signal is then subtracted from the raw output signal in the time domain, thus obtaining a signal (NT) which contains only the noise and distortion contributions. In the second step, we calculate the FFT of S and of NT = N + D, obtaining the spectra of the signal (SS) and of the noise (SN + D). The same window Wi used for the DFT has to be used also for the FFT. Finally, the signal (PS) and noise (PN + D) power are calculated by integrating the power spectra,

where NB = NOBW/fs denotes the number of samples corresponding to the desired bandwidth (baseband, BW) with sampling frequency fs. For bandpass modulators, the integration is performed between NBL = NO(fc - BW/2)/fs and NBH = NO(fc + BW/2)/fs, fc denoting the cental frequency of the modulator bandwidth. The SNR (or SNDR) is then obtained as PS/PN.

Synopsis

- [snrdB,ptotdB] = calcSNR(vout,f,fBL,fBH,w,N)
- [snrdB,ptotdB,psigdB] = calcSNR(vout,f,fBL,fBH,w,N)
- [snrdB,ptotdB,psigdB,pnoisedB] = calcSNR(vout,f,fBL,fBH,w,N)

Parameters

- vout: Sigma-Delta bit-stream taken at the modulator output
- f: Normalized signal frequency (fs = 1)
- fBL: Base-band lower limit frequency bins
- fBH: Base-band upper limit frequency bins
- w: Windowing vector
- N: Number of samples

Outputs

- snrdB: SNR in dB
- ptotdB: Sigma-Delta modulator output power spectral density (vector) in dB
- psigdB: Extracted signal power spectral density (vector) in dB
- pnoisedB: Noise power spectral density (vector) in dB

| ADC-DAC | Examples |