Line 8: | Line 8: | ||
</center> | </center> | ||
---- | ---- | ||
− | |||
− | |||
<font size="3"></font> | <font size="3"></font> | ||
Line 80: | Line 78: | ||
== Outline == | == Outline == | ||
− | #Introduction | + | #Introduction |
− | #Definition <br> | + | #Definition of Downsampling<br> |
− | #Derivation<br> | + | #Derivation of DTFT of downsampled signal<br> |
#Example | #Example | ||
#Conclusion | #Conclusion | ||
Line 91: | Line 89: | ||
== Introduction == | == Introduction == | ||
+ | This slecture provides definition of downsampling, derives DTFT downsampled signal and demonstrates it in a frequency domain. Also, it explains process of decimation and why it needs a low-pass filter. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | == Definition of Downsampling<br> == | ||
+ | |||
+ | Downsampling is an operation which involves throwing away samples from discrete-time signal. Let ''x[n]'' be a digital-time signal shown below: <br> | ||
+ | |||
+ | GRAPH<br> | ||
+ | |||
+ | then y[n] will be produced by downsampling ''x [n]'' by factor ''D'' = 3. So, ''y [n] = x[Dn]''. | ||
+ | |||
+ | GRAPH<br> | ||
+ | |||
+ | As seen in above graph, ''y [n]'' is obtained by throwing away some samples from x [n]. So, ''y [n]'' is a downsampled signal from | ||
+ | |||
+ | ''x [n]''.<br> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | == Derivation of DTFT of downsampled signal == | ||
+ | |||
+ | Let ''x (t) ''be a continuous tim''e ''signal. Then ''x<sub>1</sub> [n] = x (T<sub>1</sub>n) ''and'' x<sub>2</sub> [n] = x (T<sub>2</sub>n)''. And ratio of sampling periods would be | ||
+ | |||
+ | D = T<sub>2</sub>/T<sub>1</sub>, which is an integer greater than 1. From these equations we obtain realtionship between ''x<sub>1</sub> [n]'' and ''x<sub>2</sub> [n]''. <br> | ||
+ | |||
+ | <math>\begin{align} | ||
+ | x_2 [n] = x(T_2 n) = x(DT_1 n) = x_1 [nD] | ||
+ | \end{align}</math> | ||
+ | |||
+ | Below we derive Discrete-Time Fourier Transform of ''x<sub>2</sub> [n]'' in terms of DTFT of ''x<sub>1</sub> [n]''. | ||
+ | |||
+ | <br> | ||
+ | |||
+ | <math>\begin{align} | ||
+ | &\mathcal{X}_2(\omega)= \mathcal{F}(x_2 [n]) = \mathcal{F}(x_1 [Dn])\\ | ||
+ | &= \sum_{n = -\infty}^\infty x_1[Dn] e^{-j \omega n} = \sum_{m = -\infty}^\infty x_1[m] e^{-j \omega {\frac{m}{D}}}\\ | ||
+ | &= \sum_{n = -\infty}^\infty s_D[m]* x_1 [m] e^{-j \omega {\frac{m}{D}}}\\ | ||
+ | \end{align}</math> | ||
+ | |||
+ | <br> | ||
where <br> | where <br> | ||
Line 99: | Line 138: | ||
\end{array}\right. = {\frac{1}{D}} \sum_{k = -\infty}^{D-1} e^{jk {\frac{2 \pi}{D} m}}</math> | \end{array}\right. = {\frac{1}{D}} \sum_{k = -\infty}^{D-1} e^{jk {\frac{2 \pi}{D} m}}</math> | ||
− | == | + | <br> |
+ | |||
+ | <math>\begin{align} | ||
+ | &\mathcal{X}_2(\omega)= \sum_{m = -\infty}^\infty {\frac{1}{D}} \sum_{k = -\infty}^{D-1} e^{jk {\frac{2 \pi}{D} m}} x_1[m] e^{-j \omega {\frac{m}{D}}}\\ | ||
+ | &= {\frac{1}{D}} \sum_{k = -\infty}^{D-1} \sum_{m = -\infty}^\infty x_1[m] e^{-jm ({\frac{\omega - 2 \pi k}{D}})} = \\ | ||
+ | &= {\frac{1}{D}} \sum_{k = -\infty}^{D-1} \mathcal{X}_1 ({\frac{\omega - 2 \pi k}{D}}) \\ | ||
+ | \end{align}</math> | ||
+ | |||
+ | ---- | ||
== Example<br> == | == Example<br> == | ||
<br> | <br> | ||
+ | |||
+ | Let's take a look at an original signal ''X<sub>1</sub> (w)'' and ''X<sub>2</sub> (w)'' which is obtained after downsampling X<sub>1</sub>(w) by factor D = 2 in a frequency domain. | ||
+ | |||
+ | [[Image:Downsamplegraph.jpg]]<br> | ||
<br> | <br> | ||
+ | |||
+ | <br> | ||
+ | |||
+ | <br> | ||
+ | |||
+ | We would like to determine what <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> looks like in order to find a way to reconstruct <span class="texhtml">''x''(''t'')</span>. | ||
+ | |||
+ | Since we have sampled at a rate <span class="texhtml">''f''<sub>''s''</sub> > 2''f''<sub>''M''</sub></span>, the following inequalities hold: | ||
+ | |||
+ | <math> f_s > 2f_M \iff f_s - f_M > f_M \iff -f_s + f_M < f_M </math>. | ||
+ | |||
+ | Together, these inequalities, the graph of <span class="texhtml">''X''(''f'')</span>, and the expression for <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> in terms of <span class="texhtml">''X''(''f'')</span> imply that <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> will have the spectrum shown in the figure below. | ||
+ | |||
+ | [[Image:Xs1.png]] | ||
+ | |||
+ | Notice that the spectrum of the ideal sampling of a signal is an amplitude scaled periodic repetition of the original spectrum. Since <span class="texhtml">''x''(''t'')</span> is bandlimited and we have sampled at a rate <span class="texhtml">''f''<sub>''s''</sub> > 2''f''<sub>''M''</sub></span>, the periodic repetitions of <span class="texhtml">''X''(''f'')</span> do not overlap. | ||
+ | |||
+ | All the information needed to reconstruct <span class="texhtml">''X''(''f'')</span> can be found in the portion of <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> that corresponds to <span class="texhtml">''X''(''f'')</span> (shown in red). Therefore we can use a simple lowpass filter with gain <math> \tfrac{1}{f_s} </math> and cutoff frequency <math> \tfrac{f_s}{2} </math> to recover <span class="texhtml">''X''(''f'')</span> from <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span>. | ||
+ | |||
+ | <br> <math> | ||
+ | X(f) = X_s(f)\left\{ | ||
+ | \begin{array}{ll} | ||
+ | \frac{1}{f_s}, & |f| \le \frac{f_s}{2}\\ | ||
+ | 0, & \text{else} | ||
+ | \end{array} | ||
+ | \right. </math> | ||
+ | |||
+ | <math> \iff x(t) = x_s(t)*\text{sinc}(f_st) </math> | ||
+ | |||
+ | <math> \therefore </math> We can perfectly reconstruct <span class="texhtml">''x''(''t'')</span> from <span class="texhtml">''x''<sub>''s''</sub>(''t'')</span>. | ||
---- | ---- | ||
== Example == | == Example == | ||
+ | |||
+ | Though the Nyquist theorem states that perfect reconstruction is possible if we satisfy the Nyquist condition <span class="texhtml">(''f''<sub>''s''</sub> > 2''f''<sub>''M''</sub>)</span>, it is important to note that this condition is not necessary. The following example demonstrates how perfect reconstruction is sometimes possible even when undersampling. | ||
+ | |||
+ | Let the signal <span class="texhtml">''x''(''t'')</span> have a spectrum <span class="texhtml">''X''(''f'')</span> as seen in the figure below. | ||
+ | |||
+ | [[Image:X2.png]] | ||
+ | |||
+ | The Nyquist condition states that we should sample at a rate <span class="texhtml">''f''<sub>''s''</sub> > 2(2''a'') = 4''a''</span>. Instead, let us sample at <span class="texhtml">''f''<sub>''s''</sub> = 2''a''</span>. | ||
+ | |||
+ | As before, we have <math> x_s(t) = x(t)p_{\frac{1}{f_s}}(t) </math> and <math> X_s(f) = f_s\sum_{k = -\infty}^\infty X(f-kf_s) </math> | ||
+ | |||
+ | <math> \implies X_s(f) = 2a\sum_{k = -\infty}^\infty X(f-2ka) </math>. | ||
+ | |||
+ | Therefore, <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> will have the spectrum shown in the figure below. | ||
+ | |||
+ | [[Image:Xs2.png]] | ||
+ | |||
+ | Notice that there is no aliasing in <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> even though <span class="texhtml">''f''<sub>''s''</sub> < 4''a''</span>. In addition, the portion of <span class="texhtml">''X''<sub>''s''</sub>(''f'')</span> that corresponds to <span class="texhtml">''X''(''f'')</span> (shown in red) can be recovered using a bandpass filter with gain <math> \tfrac{1}{2a} </math> and cutoff frequencies <span class="texhtml">''a'' and 2''a''</span>. | ||
---- | ---- | ||
Line 182: | Line 281: | ||
<font size="3"></font> | <font size="3"></font> | ||
− | + | ---- | |
+ | |||
+ | == References == | ||
+ | |||
+ | [1] John G. Proakis, Dimitris G. Manolakis, "Digital Signal Processing with Principles, Algorithms, and Applications" 4th Edition,2006 | ||
---- | ---- | ||
− | == | + | ---- |
+ | |||
+ | ---- | ||
+ | |||
+ | == [[Nyquist Miguel Castellanos ECE438 slecture review|Questions and comments]] == | ||
+ | |||
+ | If you have any questions, comments, etc. please post them on [[Nyquist Miguel Castellanos ECE438 slecture review|this page]]. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[2014 Fall ECE 438 Boutin|Back to ECE438, Fall 2014]] | ||
+ | |||
+ | [[Category:Slecture]] [[Category:ECE438Fall2014Boutin]] [[Category:ECE]] [[Category:ECE438]] [[Category:Signal_processing]] |
Revision as of 19:50, 9 October 2014
Downsampling
A slecture by ECE student Yerkebulan Yeshmukhanbetov
Partly based on the ECE438 Fall 2014 lecture material of Prof. Mireille Boutin.
Contents
Outline
- Introduction
- Definition of Downsampling
- Derivation of DTFT of downsampled signal
- Example
- Conclusion
- References
Introduction
This slecture provides definition of downsampling, derives DTFT downsampled signal and demonstrates it in a frequency domain. Also, it explains process of decimation and why it needs a low-pass filter.
Definition of Downsampling
Downsampling is an operation which involves throwing away samples from discrete-time signal. Let x[n] be a digital-time signal shown below:
GRAPH
then y[n] will be produced by downsampling x [n] by factor D = 3. So, y [n] = x[Dn].
GRAPH
As seen in above graph, y [n] is obtained by throwing away some samples from x [n]. So, y [n] is a downsampled signal from
x [n].
Derivation of DTFT of downsampled signal
Let x (t) be a continuous time signal. Then x1 [n] = x (T1n) and x2 [n] = x (T2n). And ratio of sampling periods would be
D = T2/T1, which is an integer greater than 1. From these equations we obtain realtionship between x1 [n] and x2 [n].
$ \begin{align} x_2 [n] = x(T_2 n) = x(DT_1 n) = x_1 [nD] \end{align} $
Below we derive Discrete-Time Fourier Transform of x2 [n] in terms of DTFT of x1 [n].
$ \begin{align} &\mathcal{X}_2(\omega)= \mathcal{F}(x_2 [n]) = \mathcal{F}(x_1 [Dn])\\ &= \sum_{n = -\infty}^\infty x_1[Dn] e^{-j \omega n} = \sum_{m = -\infty}^\infty x_1[m] e^{-j \omega {\frac{m}{D}}}\\ &= \sum_{n = -\infty}^\infty s_D[m]* x_1 [m] e^{-j \omega {\frac{m}{D}}}\\ \end{align} $
where
$ s_D [m]=\left\{ \begin{array}{ll} 1,& \text{ if } n \text{ is a multiple of } 4,\\ 0, & \text{ else}. \end{array}\right. = {\frac{1}{D}} \sum_{k = -\infty}^{D-1} e^{jk {\frac{2 \pi}{D} m}} $
$ \begin{align} &\mathcal{X}_2(\omega)= \sum_{m = -\infty}^\infty {\frac{1}{D}} \sum_{k = -\infty}^{D-1} e^{jk {\frac{2 \pi}{D} m}} x_1[m] e^{-j \omega {\frac{m}{D}}}\\ &= {\frac{1}{D}} \sum_{k = -\infty}^{D-1} \sum_{m = -\infty}^\infty x_1[m] e^{-jm ({\frac{\omega - 2 \pi k}{D}})} = \\ &= {\frac{1}{D}} \sum_{k = -\infty}^{D-1} \mathcal{X}_1 ({\frac{\omega - 2 \pi k}{D}}) \\ \end{align} $
Example
Let's take a look at an original signal X1 (w) and X2 (w) which is obtained after downsampling X1(w) by factor D = 2 in a frequency domain.
We would like to determine what Xs(f) looks like in order to find a way to reconstruct x(t).
Since we have sampled at a rate fs > 2fM, the following inequalities hold:
$ f_s > 2f_M \iff f_s - f_M > f_M \iff -f_s + f_M < f_M $.
Together, these inequalities, the graph of X(f), and the expression for Xs(f) in terms of X(f) imply that Xs(f) will have the spectrum shown in the figure below.
Notice that the spectrum of the ideal sampling of a signal is an amplitude scaled periodic repetition of the original spectrum. Since x(t) is bandlimited and we have sampled at a rate fs > 2fM, the periodic repetitions of X(f) do not overlap.
All the information needed to reconstruct X(f) can be found in the portion of Xs(f) that corresponds to X(f) (shown in red). Therefore we can use a simple lowpass filter with gain $ \tfrac{1}{f_s} $ and cutoff frequency $ \tfrac{f_s}{2} $ to recover X(f) from Xs(f).
$ X(f) = X_s(f)\left\{ \begin{array}{ll} \frac{1}{f_s}, & |f| \le \frac{f_s}{2}\\ 0, & \text{else} \end{array} \right. $
$ \iff x(t) = x_s(t)*\text{sinc}(f_st) $
$ \therefore $ We can perfectly reconstruct x(t) from xs(t).
Example
Though the Nyquist theorem states that perfect reconstruction is possible if we satisfy the Nyquist condition (fs > 2fM), it is important to note that this condition is not necessary. The following example demonstrates how perfect reconstruction is sometimes possible even when undersampling.
Let the signal x(t) have a spectrum X(f) as seen in the figure below.
The Nyquist condition states that we should sample at a rate fs > 2(2a) = 4a. Instead, let us sample at fs = 2a.
As before, we have $ x_s(t) = x(t)p_{\frac{1}{f_s}}(t) $ and $ X_s(f) = f_s\sum_{k = -\infty}^\infty X(f-kf_s) $
$ \implies X_s(f) = 2a\sum_{k = -\infty}^\infty X(f-2ka) $.
Therefore, Xs(f) will have the spectrum shown in the figure below.
Notice that there is no aliasing in Xs(f) even though fs < 4a. In addition, the portion of Xs(f) that corresponds to X(f) (shown in red) can be recovered using a bandpass filter with gain $ \tfrac{1}{2a} $ and cutoff frequencies a and 2a.
Conclusion
To summarize, the Nyquist theorem states that any bandlimited signal can be perfectly reconstructed from its sampling if sampled at a rate greater than twice its bandwidth (fs > 2fM). However, the Nyquist condition is not necessary for perfect reconstruction as shown in the example above.
References
[1] John G. Proakis, Dimitris G. Manolakis, "Digital Signal Processing with Principles, Algorithms, and Applications" 4th Edition,2006
Questions and comments
If you have any questions, comments, etc. please post them on this page.