Page MenuHomec4science

3_oversampling.tex
No OneTemporary

File Metadata

Created
Thu, Mar 13, 14:50

3_oversampling.tex

\documentclass[aspectratio=169]{beamer}
\def\stylepath{../styles}
\usepackage{\stylepath/com303}
\begin{document}
\begin{comment}
\begin{frame} \frametitle{1bps oversampling}
\begin{figure}
\center %\small
\begin{dspBlocks}{.4}{0.3}
$x[n]$~~ & \BDfilterMulti{$K$-times\\ oversampling} & & \BDfilterMulti{$1$-bit\\ quantizer} & & \BDfilter{D/A} & ~~$x_c(t)$ \\
$R$ bps, $F_s$ & & $R$ bps, $KF_s$ & & $1$ bps, $KF_s$
\psset{linewidth=1.5pt}
\ncline{-}{1,1}{1,2}
\ncline{->}{1,2}{1,4}\taput{$~~~~~x_{K}[n]$}
\ncline[linestyle=dashed]{->}{1,4}{1,6}\taput{$~~~~~\hat{x}_{\mathrm{1B}}[n]$}
\ncline{->}{1,6}{1,7}
\end{dspBlocks}
\end{figure}
\end{frame}
\newcommand{\BDthreshold}[1][0.53em]{%
\newskip\tmpLen \tmpLen=#1%
\raisebox{-1.5\tmpLen}{%
\psframebox[linewidth=\BDwidth]{%
\psset{unit=#1,linearc=0,linewidth=1.5pt}%
\pspicture(-3.1,-2)(3,2)%
\psline[linewidth=0.5pt]{-}(-2,0)(2,0)%
\psline{-}(-1.5,-1.6)(0,-1.6)(0,1.6)(1.5,1.6)
\endpspicture}}}
\begin{frame} \frametitle{1st order sigma delta}
\begin{figure}
\center %\small
\begin{dspBlocks}{1}{1.3}
$x_K[n]$~~ & \BDadd & \BDfilter{$H(z)$} & \BDthreshold & \BDsplit & ~$~~\hat{x}_{\mathrm{1B}}[n]$ \\
~ & & & &
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,2}\ncline{->}{1,2}{1,3}\ncline{->}{1,3}{1,4}\ncline{-}{1,4}{1,5}\ncline{->}{1,5}{1,6}
\ncline{-}{1,5}{2,5}\ncline{-}{2,5}{2,2}\ncline{->}{2,2}{1,2}\tlput{$-1$}
\end{dspBlocks}
\end{figure}
\end{frame}
\begin{frame} \frametitle{linearized sigma delta}
\begin{figure}
\center %\small
\begin{dspBlocks}{1}{1}
& & & $e[k]$ \\
$x_K[n]$~~ & \BDadd & \BDfilter{$H(z)$} & \BDadd & \BDsplit & ~$~~\hat{x}_{\mathrm{1B}}[n]$ \\
~ & & & &
\psset{linewidth=1.5pt}
\ncline{->}{2,1}{2,2}\ncline{->}{2,2}{2,3}\ncline{->}{2,3}{2,4}\ncline{-}{2,4}{2,5}\ncline{->}{2,5}{2,6}
\ncline{-}{2,5}{3,5}\ncline{-}{3,5}{3,2}\ncline{->}{3,2}{2,2}\tlput{$-1$}
\ncline{->}{1,4}{2,4}
\end{dspBlocks}
\end{figure}
\end{frame}
\begin{frame} \frametitle{2nd order sigma delta}
\begin{figure}
\center %\small
\begin{dspBlocks}{0.7}{1.3}
$x_K[n]$~~ & \BDadd & \BDfilter{$H(z)$} & \BDadd & \BDfilter{$H(z)$} & \BDthreshold & \BDsplit & ~$\hat{x}_{\mathrm{1B}}[n]$ \\
~ & & & \BDsplit & & & &
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,2}\ncline{->}{1,2}{1,3}\ncline{->}{1,3}{1,4}\ncline{->}{1,4}{1,5}\ncline{->}{1,5}{1,6}\ncline{->}{1,6}{1,8}
\ncline{-}{1,7}{2,7}\ncline{-}{2,7}{2,2}\ncline{->}{2,2}{1,2}\tlput{$-1$}\ncline{->}{2,4}{1,4}\tlput{$-1$}
\end{dspBlocks}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{Basic setup}
\setbeamercovered{invisible}
\begin{figure}[t]
\center %\small
\begin{dspBlocks}{1.5}{0.3}
$x_c(t)$~~ & \BDsamplerFramed[0.5em] & \BDfilter{$H(z)$} & \BDsinc[0.5em] & ~~$y_c(t)$ \\
& $T_s$ & & $T_s$ \\
\psset{linewidth=1.5pt}
\ncline{-}{1,1}{1,2}
\ncline{->}{1,2}{1,3}\only<4->{\taput{$x[n]$}}
\ncline{->}{1,3}{1,4}\only<5->{\taput{$y[n]$}}
\ncline{->}{1,4}{1,5}
\only<2->{
\psset{unit=1em}%\psgrid(40,20)
\psframe[linecolor=darkred,framearc=.3,linestyle=dashed](4,0.5)(27,8)
\dspText(27.5,0.5){\color{darkred}~$H_c(j\Omega)$}}
\end{dspBlocks}
\end{figure}
\vspace{2em}
\uncover<3->{
assume $x_c(t)$ is $\Omega_N$-bandlimited:
\begin{itemize}
\item<4-> $X(e^{j\omega}) = \frac{1}{T_s}X_c\left(j\frac{\omega}{T_s}\right)$
\item<5-> $Y(e^{j\omega}) = X(e^{j\omega})\,H(e^{j\omega})$
\item<6-> $Y_c(j\Omega) = T_s\,Y(e^{j\Omega T_s})$
\end{itemize}}
\end{frame}
\end{document}
\end{comment}
\begin{frame} \frametitle{Oversampling}
\begin{itemize}[<+->]
\item oversampled A/D
\begin{itemize}[<+->]
\item reduce quantization error
\end{itemize}
\vspace{2em}
\item oversampled D/A
\begin{itemize}[<+->]
\item use cheaper hardware for interpolation
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}
\begin{figure}
\begin{dspBlocks}{0.7}{0.2}
$x(t)$~ & \BDsampler & \BDfilter{$\mathcal{Q}\{\cdot\}$} & ~$\hat{x}[n]$ \\
& $T_s = 1/F_s$
\psset{linewidth=1.5pt}
\ncline{-}{1,1}{1,2} \ncline{1,2}{1,3}
\ncline{->}{1,3}{1,4}
\end{dspBlocks}
\end{figure}
\vspace{2em}
\[
\hat{x}[n] = x[n] + e[n]
\]
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}
Key assumptions:
\[
e[n] \mbox{~i.i.d. process, {\color{darkred} independent of $x[n]$}}
\]
\pause
\[
P_e(e^{j\omega}) = \frac{\Delta^2}{12} \qquad \mbox{over $[-\pi,\pi]$ (no aliasing)}
\]
\vspace{1em}
\pause
Key observation:
\[
X(e^{j\omega}) = F_s\,X\left(\frac{\omega}{2\pi}F_s \right)
\]
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}
\begin{figure}
\begin{dspPlot}[xtype=freq,xticks=4]{-1,1}{0,4.1}
\moocStyle \psset{linecolor=blue!80}
\psline[linewidth=2pt,linecolor=gray](-1,0.4)(1,0.4)
\psframe[linewidth=0pt,fillstyle=vlines,hatchcolor=gray](-1,0.4)(1,0)
\only<1>{\dspFunc{x \dspPorkpie{0}{1} 1.5 mul } \dspText(0.5,3){$F_s=2f_{\max}$}}
\only<2>{\dspFunc{x \dspPorkpie{0}{.5} 2 mul} \dspText(0.5,3){$F_s=4f_{\max}$}}
\only<3>{\dspFunc{x \dspPorkpie{0}{.333333} 3 mul} \dspText(0.5,3){$F_s=6f_{\max}$}}
\only<4->{\dspFunc{x \dspPorkpie{0}{.25} 4 mul} \dspText(0.5,3){$F_s=8f_{\max}$}}
\only<5->{\dspFunc[linecolor=green,linestyle=dashed]{x \dspRect{0}{0.5} } }
\end{dspPlot}
\end{figure}
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}
\begin{figure}
\begin{dspPlot}[xtype=freq,xticks=4]{-1,1}{0,4.1}
\moocStyle \psset{linecolor=blue!80}
\psline[linewidth=2pt,linecolor=gray](-1,0.1)(1,0.1)
\psframe[linewidth=0pt,fillstyle=vlines,hatchcolor=gray](-1,0.1)(1,0)
\dspFunc{x \dspPorkpie{0}{1} 1.5 mul }
\dspText(-.5,3){after downsampling by 4:}
\end{dspPlot}
\end{figure}
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}
\begin{figure}
\begin{dspBlocks}{0.7}{0.2}
$x(t)$~ & \BDsampler & \BDfilter{$\mathcal{Q}\{\cdot\}$} & \BDfilter{LP$\{\pi/N\}$} & \BDdwsmp{$N$} & $x[n]$ \\
& $T_s = 1/(2Nf_{\max})$
\psset{linewidth=1.5pt}
\ncline{-}{1,1}{1,2} \ncline{1,2}{1,3}
\ncline{1,3}{1,4}\ncline{1,4}{1,5}
\ncline{->}{1,5}{1,6}
\end{dspBlocks}
\end{figure}
\vspace{1em}
\begin{itemize}
\item $\mbox{SNR}_{O} \approx N\,\mbox{SNR}$
\item 3dB per octave (doubling of $F_s$)
\item but key assumption (independence) breaks down fast...
\end{itemize}
\end{frame}
\intertitle{Oversampled D/A}
\begin{frame} \frametitle{Oversampled D/A}
Sinc interpolation:
\[
X_c(f) = \frac{1}{F_s}\,X(e^{j2\pi f/F_s}) \rect\left(\frac{f}{F_s}\right)
\]
\end{frame}
\begin{frame} \frametitle{Sinc interpolation}
\begin{center}
\begin{figure}
\only<1->{
\begin{dspPlot}[height=2.1cm,xtype=freq,yticks=1,ylabel={$X(e^{j\omega})$}]{-1,1}{0,1.2}
\moocStyle \psset{linecolor=blue!80}
\dspFunc{x \dspPorkpie{0}{0.95}}
\end{dspPlot}}
\only<2->{
\begin{dspPlot}[height=2.1cm,xtype=freq,xticks=custom,yticks=1,]{-6,6}{0,1.2}
\moocStyle
\dspCustomTicks[axis=x]{0 0 1 $F_s/2$ 2 $F_s$ 4 $2F_s$ 6 $3F_s$}
\only<2-3>{\dspFunc{x \dspPeriodize \dspPorkpie{0}{0.95}} \dspText(0,-.6){$X(e^{j2\pi f / F_s})$} }
\only<3>{\dspFunc[linecolor=green,linestyle=dashed]{x \dspRect{0}{2}} }
\only<4->{\dspFunc{x \dspPorkpie{0}{0.95}} \dspText(0,-.6){$X_c(f)$} }
\end{dspPlot}}
\end{figure}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Oversampled D/A}
In general:
\[
X_c(f) = \frac{1}{F_s}\,X(e^{j2\pi f/F_s})\, I\left(\frac{f}{F_s}\right)
\]
\pause
The cheapest (hence most common) interpolator is the zero-order hold:
\[
i_0(t) = \rect(t)
\]
\[
I_0(f) = \sinc(f)
\]
\end{frame}
\begin{frame} \frametitle{ZOH interpolation}
\begin{center}
\begin{figure}
\only<1->{
\begin{dspPlot}[height=2.1cm,xtype=freq,yticks=1,ylabel={$X(e^{j\omega})$}]{-1,1}{0,1.2}
\moocStyle \psset{linecolor=blue!80}
\dspFunc{x \dspPorkpie{0}{0.95}}
\end{dspPlot}}
\only<2->{
\begin{dspPlot}[height=2.1cm,xtype=freq,xticks=custom,yticks=1,]{-6,6}{0,1.2}
\moocStyle
\dspCustomTicks[axis=x]{0 0 1 $F_s/2$ 2 $F_s$ 4 $2F_s$ 6 $3F_s$}
\only<2-3>{\dspFunc{x \dspPeriodize \dspPorkpie{0}{0.95}} \dspText(0,-.6){$X(e^{j2\pi f/F_s})$} }
\only<3>{\dspFunc[linecolor=green!80,linestyle=dashed]{x \dspSinc{0}{2} abs } }
\only<4->{\dspFunc{x \dspPeriodize \dspPorkpie{0}{0.95} x \dspSinc{0}{2} abs mul} \dspText(0,-.6){$X_c(f)$} }
\only<5->{\dspFunc[linecolor=orange!80,linestyle=dashed]{x abs 1 ge {0} {1 x \dspSinc{0}{2} abs div 0.7 mul} ifelse} }
\end{dspPlot}}
\end{figure}
\end{center}
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}\
key problems:
\begin{itemize}
\item we need to undo the in-band distortion in the analog domain
\item we have a significant out-of-band distortion
\item only advantage: minimal D/A rate
\end{itemize}
\end{frame}
\begin{frame} \frametitle{Oversampled D/A}
\center
\begin{dspBlocks}{1.2}{0.3}
$x[n]$~ & \BDupsmp{$N$} & \BDfilter{$F(e^{j\omega})$} & \BDfilter{$I_0(f)$} & $x(t)$ \\
& & & $F_o = NF_s$
\end{dspBlocks}
\psset{linewidth=1pt}
\ncline{-}{1,1}{1,2} \ncline{->}{1,2}{1,3}
\ncline{->}{1,3}{1,4}\ncline{->}{1,4}{1,5}
\ncline{->}{1,5}{1,6}
\end{frame}
\begin{frame} \frametitle{Oversampled D/A}
\center
consider a $N$-upsampled and interpolated version of $x[n]$:
\[
X_o(e^{j\omega}) = X_{N\uparrow}(e^{j\omega})\,F(e^{j\omega}) = X(e^{j\omega N})\,F(e^{j\omega})
\]
\vspace{2em}
\begin{itemize}
\item $F(e^{j\omega}) = N\,\rect(\omega N/(2\pi))\,C(e^{j\omega})$
\item rect matches the upsampler
\item $C(e^{j\omega})$ compensates for zoh in-band distortion
\end{itemize}
\end{frame}
\begin{frame} \frametitle{Oversampled D/A ($N=2$)}
\begin{center}
\begin{figure}
\only<1->{
\begin{dspPlot}[height=2.1cm,xtype=freq,yticks=1,ylabel=%
\only<1>{{$X(e^{j\omega})$}}%
\only<2-3>{{$X_{2\uparrow}(e^{j\omega})$}}%
\only<4>{{$X_o(e^{j\omega})$}}%
]{-1,1}{0,1.2}
\moocStyle \psset{linecolor=blue!80}
\only<1>{\dspFunc{x \dspPorkpie{0}{0.95}}}
\only<2-3>{
\dspFunc[linecolor=lightgray]{x 2 mul \dspPeriodize \dspPorkpie{0}{0.95}}
\dspFunc{x 2 mul \dspPorkpie{0}{0.95}}}
\only<3>{\dspFunc[linecolor=green!80,linestyle=dashed]{x abs 0.5 ge {0} {1 x \dspSinc{0}{1} abs div 0.7 mul} ifelse} }
\only<4->{\dspFunc{x abs 0.5 ge {0} {x 2 mul \dspPorkpie{0}{0.95} x \dspSinc{0}{1} abs div } ifelse} }
\end{dspPlot}}
\end{figure}
\end{center}
\end{frame}
\begin{frame} \frametitle{Oversampled D/A}
interpolate $x_o[n]$ with $F_o = NF_s$:
\begin{align*}
X_o(f) &= \frac{1}{F_o}\,X_o(e^{j2\pi f / F_o})\, I_0\left(\frac{f}{F_o}\right) \\ \pause
&= \frac{1}{F_o}\, \left[ X(e^{j\omega N})\, F(e^{j\omega}) \right]_{\omega = 2\pi f/F_o}\, I_0\left(\frac{f}{F_o}\right) \\ \pause
&= \frac{N}{F_o}\, \left[ X(e^{j\omega N})\, \rect\left(\frac{\omega N}{2\pi}\right)\, C(e^{j\omega}) \right]_{\omega = 2\pi f/F_o}\, I_0\left(\frac{f}{F_o}\right) \\ \pause
&= \frac{1}{F_s}\, X(e^{j2\pi f/F_s})\, \rect\left(\frac{f}{F_s}\right)\, C(e^{j2\pi f/F_o})\, I_0\left(\frac{f}{F_o}\right) \\ \pause
&= X(f) \quad \mbox{for $|f| < F_s/2$}
\end{align*}
\end{frame}
\begin{frame} \frametitle{Oversampled D/A, using a ZOH ($N=2$)}
\begin{center}
\begin{figure}
\only<1->{
\begin{dspPlot}[height=2.1cm,xtype=freq,yticks=1,ylabel=%
\only<1-2>{{$X_{2\uparrow}(e^{j\omega})$}}%
\only<3->{{$X_{o}(e^{j\omega})$}}%
]{-1,1}{0,1.2}
\smallStems \psset{linecolor=blue}
\only<1-2>{\dspFunc[linecolor=lightgray]{x 2 mul \dspPeriodize \dspPorkpie{0}{0.95}} \dspFunc{x 2 mul \dspPorkpie{0}{0.95}}}
\only<2>{\dspFunc[linecolor=darkgreen!60,linestyle=dashed]{x abs 0.5 ge {0} {1 x \dspSinc{0}{1} abs div 0.7 mul} ifelse} }
\only<3->{\dspFunc{x abs 0.5 ge {0} {x 2 mul \dspPorkpie{0}{0.95} x \dspSinc{0}{1} abs div } ifelse} }
\end{dspPlot}}
\only<4->{
\begin{dspPlot}[height=2.1cm,xtype=freq,xticks=custom,yticks=1,ylabel={$X_o(f)$}]{-6,6}{0,1.2}
\smallStems \moocStyle
\dspCustomTicks[axis=x]{0 0 1 $F_s/2$ 2 $F_o/2$ 4 $F_o$}
\only<4>{
\dspFunc{x \dspPeriod{2} \dspPorkpie{0}{0.95}}
\dspFunc[linecolor=green,linestyle=dashed]{x \dspSinc{0}{4} abs } }
\only<5->{\dspFunc{x \dspPeriod{2} \dspPorkpie{0}{0.95} x \dspSinc{0}{4} abs mul} }
\only<6->{\dspFunc[linecolor=orange,linestyle=dashed]{x 0.8 mul 4 exp 1 add 1 exch div}}
\end{dspPlot}}
\end{figure}
\end{center}
\end{frame}
\begin{frame} \frametitle{Oversampled A/D}\
key points:
\begin{itemize}
\item we can pre-compensate the in-band distortion in the digital domain
\item we can interpolate with a cheap ZOH
\item the higher the upsampling, the cheaper the analog lowpass needed to eliminate out-of-band distortion
\item only price: higher D/A rate
\end{itemize}
\end{frame}
\end{document}

Event Timeline