⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calcsnr.html

📁 toolbox of sdt implementation
💻 HTML
字号:
<html>

	<head>
		<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
		<title>Postprocessing (calcSNR)</title>
		<link href="SDToolbox.css" type="text/css" rel="stylesheet" media="all">
	</head>

	<table width="100%" border=0 cellspacing=0 cellpadding=10 bgcolor="#ffe4b0">
		<tr>
			<td valign=middle>
				<p class="header">SD Toolbox Reference</p>
			</td>
			<td valign=middle width="55">
				<p class="header"><img src="Images/SDT.gif" alt="" height="50" width="50" border="0"></p>
			</td>
		</tr>
	</table>
	<p class="title"><span lang=EN-US style="font-size:24.0pt;color:#990000; mso-ansi-language:EN-US">Postprocessing (calcSNR)</span></p>
	<p class="body">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.</p>
	<p class="section">Library</p>
	<p class="body">SD Toolbox.</p>
	<p class="section">Description</p>
	<p class="body">The SNR and the SNDR of a Sigma-Delta modulator are defined as</p>
	<p class="equation"><img src="Images/calcSNR_Eq1.gif" alt="" height="47" width="320" border="0"></p>
	<p class="body">respectively, where <i>P<sub>S</sub></i> denotes the signal power, <i>P<sub>N</sub></i> the noise power and <i>P<sub>D</sub></i> 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</p>
	<p class="equation"><img src="Images/calcSNR_Eq2.gif" alt="" height="48" width="264" border="0"></p>
	<p class="body">where Delta denotes the input range of the Sigma-Delta modulator, <i>N</i> the number of bits in the quantizer, <i>M</i> the oversampling ratio and <i>L</i> the order of the Sigma-Delta modulator.</p>
	<p class="body">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.</p>
	<p class="body">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 (<i>S</i>) is extracted from the sequence of <i>N<sub>O</sub></i> output data (<i>O<sub>i</sub></i>, at time <i>t<sub>i</sub></i>), typically by computing a Discrete Fourier Transform (DFT) of <i>O</i> at the signal frequency (<i>f<sub>in</sub></i>),</p>
	<p class="equation"><img src="Images/calcSNR_Eq3.gif" alt="" height="115" width="379" border="0"></p>
	<p class="body">where <i>W<sub>i</sub></i> 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 (<i>N<sub>T</sub></i>) which contains only the noise and distortion contributions. In the second step, we calculate the FFT of <i>S</i> and of <i>N<sub>T</sub></i> = <i>N</i> + <i>D</i>, obtaining the spectra of the signal (<i>S<sub>S</sub></i>) and of the noise (<i>S<sub>N</sub></i> + <i>D</i>). The same window <i>W<sub>i</sub></i> used for the DFT has to be used also for the FFT. Finally, the signal (<i>P<sub>S</sub></i>) and noise (<i>P<sub>N</sub></i> + <i>D</i>) power are calculated by integrating the power spectra,</p>
	<p class="equation"><img src="Images/calcSNR_Eq4.gif" alt="" height="54" width="317" border="0"></p>
	<p class="body">where <i>N<sub>B</sub></i> = <i>N<sub>O</sub>BW</i>/<i>f<sub>s</sub></i> denotes the number of samples corresponding to the desired bandwidth (baseband, BW) with sampling frequency <i>f<sub>s</sub></i>. For bandpass modulators, the integration is performed between <i>N<sub>BL</sub></i> = <i>N<sub>O</sub></i>(<i>f<sub>c</sub></i> - <i>BW</i>/2)/<i>f<sub>s</sub></i> and <i>N<sub>BH</sub></i> = <i>N<sub>O</sub></i>(<i>f<sub>c</sub></i> + <i>BW</i>/2)/<i>f<sub>s</sub></i>, <i>f<sub>c</sub></i> denoting the cental frequency of the modulator bandwidth. The SNR (or SNDR) is then obtained as <i>P<sub>S</sub></i>/<i>P<sub>N</sub></i>.</p>
	<p class="section">Synopsis</p>
	<ul>
		<li class="body">[snrdB,ptotdB] = calcSNR(vout,f,fBL,fBH,w,N)
		
		<li class="body">[snrdB,ptotdB,psigdB] = calcSNR(vout,f,fBL,fBH,w,N) 
		<li class="body">[snrdB,ptotdB,psigdB,pnoisedB] = calcSNR(vout,f,fBL,fBH,w,N)
	</ul>
	<p class="section">Parameters</p>
	<ul>
		<li class="body"><span class="parameter">vout</span>: Sigma-Delta bit-stream taken at the modulator output
		<li class="body"><span class="parameter">f</span>: Normalized signal frequency (f<sub>s</sub> = 1)
		<li class="body"><span class="parameter">fBL</span>: Base-band lower limit frequency bins
		<li class="body"><span class="parameter">fBH</span>: Base-band upper limit frequency bins
		<li class="body"><span class="parameter">w</span>: Windowing vector
		<li class="body"><span class="parameter">N</span>: Number of samples
		
	</ul>
	<p class="section">Outputs</p>
	<ul>
		<li class="body"><span class="parameter">snrdB</span>: SNR in dB
		<li class="body"><span class="parameter">ptotdB</span>: Sigma-Delta modulator output power spectral density (vector) in dB
		<li class="body"><span class="parameter">psigdB</span>: Extracted signal power spectral density (vector) in dB
		<li class="body"><span class="parameter">pnoisedB</span>: Noise power spectral density (vector) in dB
		
		
	</ul>
	<table width="100%" border=0 cellspacing=0 cellpadding=10 bgcolor="#ffe4b0">
		<tr>
			<td valign=middle width=20>
				<p class="previous"><a href="ADCDAC.html"><img src="Images/b_prev.gif" height=17 width=17 border=0></a></p>
			</td>
			<td valign=middle>
				<p class="previous">ADC-DAC</p>
			</td>
			<td valign=middle>
				<p class="next">Examples</p>
			</td>
			<td valign=middle width=20>
				<p class="next"><a href="demos.html"><img src="Images/b_next.gif" height=17 width=17 border=0></a></p>
			</td>
		</tr>
	</table>
	

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -