Wednesday, July 17, 2019

implication of sampling and reconstruction theorem


i am asking this question sorta as a surrogate for a friend at comp.dsp who posted a similar one.


even though i did it for a quarter century, laying out math (using "ASCII-math") is crappy, which is why i think the traffic at comp.dsp is in decline (and being displaced by traffic here).


so here's the question, but i am gonna frame it differently than Bob Adams did, making it more about the sampling and reconstruction theorem.


suppose we have an analog signal that is a collection of simple sinusoids:



$$ x(t) = \sum\limits_{m=1}^{M} A_m \cos(2 \pi f_m t + \phi_m) $$


without loss of generality, we can order the terms w.r.t. frequency, $0 < f_m < f_{m+1}$, so that $$f_M = \max\{ f_m \} \ .$$


we can uniformly sample $x(t)$ if the sample rate, $f_\text{s} \triangleq \tfrac{1}{T} > 2 \, f_M$, is sufficiently high


$$\begin{align} x_\text{s}(t) &= x(t) \cdot T \, \mathbf{III}_T(t) \\ &= x(t) \cdot T \sum\limits_{n=-\infty}^{\infty} \delta(t - nT) \\ &= T \sum\limits_{n=-\infty}^{\infty} x(t) \, \delta(t - nT) \\ &= T \sum\limits_{n=-\infty}^{\infty} x(nT) \, \delta(t - nT) \\ &= T \sum\limits_{n=-\infty}^{\infty} x[n] \, \delta(t - nT) \\ \end{align}$$


it is also true that the sampling function is periodic and has a Fourier series.


$$\begin{align} T \, \mathbf{III}_T(t) &\triangleq T \sum\limits_{n=-\infty}^{\infty} \delta(t - nT) \\ &= \sum\limits_{k=-\infty}^{\infty} e^{j 2 \pi k f_\text{s} t} \\ \end{align}$$


turns out that all of the Fourier series coefficients are 1. this means that the uniform sampled function is


$$\begin{align} x_\text{s}(t) &= x(t) \cdot T \, \mathbf{III}_T(t) \\ &= x(t) \cdot T \sum\limits_{n=-\infty}^{\infty} \delta(t - nT) \\ &= x(t) \sum\limits_{k=-\infty}^{\infty} e^{j 2 \pi k f_\text{s} t} \\ &= \sum\limits_{k=-\infty}^{\infty} x(t) \, e^{j 2 \pi k f_\text{s} t} \\ \end{align}$$


accordingly, taking the continuous Fourier Transform, the spectrum of the sampled signal is


$$\begin{align} X_\text{s}(f) & \triangleq \mathscr{F} \Big\{ x_\text{s}(t) \Big\} \\ &= \mathscr{F} \left\{ \sum\limits_{k=-\infty}^{\infty} x(t) \, e^{j 2 \pi k f_\text{s} t} \right\} \\ &= \sum\limits_{k=-\infty}^{\infty} \mathscr{F} \Big\{ x(t) \, e^{j 2 \pi k f_\text{s} t} \Big\} \\ &= \sum\limits_{k=-\infty}^{\infty} X(f - k f_\text{s}) \\ \end{align}$$



and we know, as long as $f_M < \tfrac12 f_\text{s}$, that there is no overlap in the adjacent shifted spectra of $X(f)$ and the original $X(f)$ can be recovered from the $k=0$ term of the summation.


$$\begin{align} X(f) &= \Pi\left( \tfrac{f}{f_\text{s}} \right) \, \sum\limits_{k=-\infty}^{\infty} X(f - k f_\text{s}) \\ &= \Pi\left( \tfrac{f}{f_\text{s}} \right) \, X_\text{s}(f) \\ \end{align}$$


where $\Pi(u)$ (sometimes "$\operatorname{rect}(u)$") is the rectangular function


$$\Pi(u) \triangleq \begin{cases} 1 \qquad & \text{ if } |u| < \tfrac12 \\ \tfrac12 \qquad & \text{ if } |u| = \tfrac12 \\ 0 \qquad & \text{ if } |u| > \tfrac12 \\ \end{cases}$$


and we know that the inverse Fourier transform is


$$ \mathscr{F}^{-1} \left\{ \Pi\left( \tfrac{f}{f_\text{s}} \right) \right\} = f_\text{s} \, \operatorname{sinc}(f_\text{s} t) $$


where the sinc function is


$$\operatorname{sinc}(u) \triangleq \begin{cases} \frac{\sin(\pi u)}{\pi u} \qquad & \text{ if } |u| \ne 0 \\ 1 \qquad & \text{ if } |u| = 0 \\ \end{cases}$$


then, remembering that $f_\text{s}=\tfrac1T $, we know that the output of the brickwall reconstruction filter is


$$\begin{align} X(f) &= \Pi\left( \tfrac{f}{f_\text{s}} \right) \, X_\text{s}(f) \\ & \iff \\ x(t) &= f_\text{s} \, \operatorname{sinc}(f_\text{s} t) \ \circledast \ x_\text{s}(t) \\ &= f_\text{s} \, \operatorname{sinc}(f_\text{s} t) \ \circledast \ T \sum\limits_{n=-\infty}^{\infty} x(nT) \, \delta(t - nT) \\ &= f_\text{s} \, T \sum\limits_{n=-\infty}^{\infty} x(nT) \, \big( \operatorname{sinc}(f_\text{s} t) \ \circledast \ \delta(t - nT) \big) \\ &= \sum\limits_{n=-\infty}^{\infty} x(nT) \, \operatorname{sinc}\big( f_\text{s} (t - nT) \big) \\ &= \sum\limits_{n=-\infty}^{\infty} x(nT) \, \operatorname{sinc}\big( f_\text{s} t - n \big) \\ \end{align}$$



that's how we reconstruct out original $x(t)$ out of the samples $x(nT)$. so much for the sampling and reconstruction theorem. remember, that so the spectra of adjacent shifted copies of $X(f)$, which are $X(f-k f_\text{s})$, do not overlap, it is necessary that $f_M < \tfrac12 f_\text{s}$.


what if $x(t)$ is oversampled?? even grossly oversampled? that is


$$ f_M \ll \tfrac12 f_\text{s} $$


while it continues to be true that


$$ X(f) = \Pi\left( \tfrac{f}{f_\text{s}} \right) \, X_\text{s}(f) $$


it is also true that


$$ X(f) = \Pi\left( \tfrac{f}{2 f_M + \Delta f} \right) \, X_\text{s}(f) $$


where $\Delta f$ is any tiny frequency guard bandwidth greater than zero


$$ 0 < \Delta f $$


This means that



$$ x(t) = \sum\limits_{n=-\infty}^{\infty} x(nT) \, \tfrac{2 f_M + \Delta f}{f_\text{s}}\operatorname{sinc}\big( (2 f_M + \Delta f) (t - nT) \big) $$


in fact it means moreover


$$ x(t) = \sum\limits_{n=-\infty}^{\infty} x(nT) \, \tfrac{f_W}{f_\text{s}} \operatorname{sinc}\big( f_\text{W} (t - nT) \big) $$


for any brickwall rect width $f_\text{W}$ such that


$$ 2 f_M < f_\text{W} < 2 f_\text{s} - 2 f_M $$




so, quoting and paraphrasing Bob (because i swapped frequency and time domain)



... so obviously the [Fourier Transform] result will be identical [because of the multiplication with the rectangular function $$ \Pi\left( \tfrac{f}{f_\text{W}} \right) \, X_\text{s}(f) \ = \ \Pi\left( \tfrac{f}{f_\text{s}} \right) \, X_\text{s}(f)$$ ], but if you force yourself to use the time-domain convolution method, the width of the sinc signal will vary continually as you change the [rectangular function] width, and yet somehow you must get an identical convolution result for that entire range of sinc widths [, $ f_\text{W} $,] (since the [frequency-]domain signal doesn't change). Can anyone explain this without resorting to the [frequency] domain ?




i mean, this is an ugly way to put it, but if


$$ f_M \ll \tfrac12 f_\text{s} $$


then


$$ \sum\limits_{m=1}^{M} A_m \cos(2 \pi f_m t + \phi_m) = \sum\limits_{n=-\infty}^{\infty} \sum\limits_{m=1}^{M} A_m \cos\big(2 \pi f_m nT + \phi_m \big) \, \tfrac{f_W}{f_\text{s}} \operatorname{sinc}\big( f_\text{W} (t - nT) \big) $$


for any $A_m, \phi_m, f_m \le f_M$ and and


$$ 2 f_M < f_\text{W} < 2 f_\text{s} - 2 f_M $$


doesn't matter what $f_\text{W}$ is, if it's constrained to that range of values.




No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...