Sampling - HW7: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
=== Homework #7 - Sampling ===
=== Homework #7 - Sampling ===


<br><b>Problem Statement</b><br>
Figure out what happens if your sampled signal, <math> x(t)\!</math>, has frequency components only for <math> \frac{f_s}{2}<f<f_s\!</math>. Can you recover the original signal from it? If so, find the expression for <math> x(t)\!</math> in terms of <math> x(nT)\!</math>.<br>
Figure out what happens if your sampled signal, <math> x(t)\!</math>, has frequency components only for <math> \frac{f_s}{2}<f<f_s\!</math>. Can you recover the original signal from it? If so, find the expression for <math> x(t)\!</math> in terms of <math> x(nT)\!</math>.<br>

<b>Solution</b><br>
For frequency components <math> \frac{f_s}{2}<f<f_s\!</math>, our sampled signal <math> x(t)\!</math> in the frequency domain, or <math> X(f)\!</math>, is going to look like this.<br>
[[Image:Sampling1a.jpg]]<br><br>
After sampling with frequency <math> f_s\!</math>, the signal is going to be shifted over by <math> \frac{1}{T}\!</math>, since <math> f_s = \frac{1}{T}\!</math>. It will look like this.<br>
[[Image:Sampling2.jpg]]<br><br>
To recover the original signal <math> x(t)\!</math>, we need to a use bandpass filter to filter out the parts we don't want, as indicated by the red line in the figure below. <i>(Note: not to scale.)</i><br>
[[Image:Sampling3.jpg]]<br><br>
This leaves us with the original signal, as shown below.<br>
[[Image:Sampling1a.jpg]]<br><br>
The transfer function of the bandpass filter that will accomplish this for us is <math>H(f)=\begin{cases} T, & \mbox{ }- \frac{1}{2T}<|f|< \frac{1}{T} \\ 0, & \mbox{ else } \end{cases}\!</math><br><br>
To find the expression for <math> h(t)\!</math>, or the expression for the bandpass filter in the time domain, we can take the inverse Fourier transform of <math>H(f)\!</math>.<br><br>
<math> h(t) = \mathcal{F}^{-1}[H(f)] = \int_{-\frac{1}{T}}^{-\frac{1}{2T}}Te^{j2 \pi ft}df\ + \int_{\frac{1}{2T}}^{\frac{1}{T}}Te^{j2 \pi ft}df = \frac{Te^{j2 \pi ft}}{j2 \pi t} \Bigg|_{f=-\frac{1}{T}}^{-\frac{1}{2T}} + \ \frac{Te^{j2 \pi ft}}{j2 \pi t} \Bigg|_{f=\frac{1}{2T}}^{\frac{1}{T}}\!</math><br><br>
<math> h(t) = T \frac{e^{-j \pi t/T} - e^{-j2 \pi t/T}}{j2( \pi t)} \ + \ T \frac{e^{j2 \pi t/T} - e^{j \pi t/T}}{j2( \pi t)} = \frac{T}{j2}\Bigg[\frac{e^{-j \pi t/T} - e^{-j2 \pi t/T}+e^{j2 \pi t/T} - e^{j \pi t/T}}{ \pi t}\Bigg]\!</math><br><br>
<math> h(t) = \frac{T}{j2}\Bigg[\frac{- e^{j \pi t/T} + e^{-j \pi t/T} + e^{j2 \pi t/T} - e^{-j2 \pi t/T}}{ \pi t}\Bigg] = \frac{T}{j2}\Bigg[\frac{e^{j2 \pi t/T} - e^{-j2 \pi t/T}}{ \pi t}\Bigg] - \ \frac{T}{j2}\Bigg[\frac{e^{j \pi t/T} - e^{-j \pi t/T}}{ \pi t}\Bigg] \!</math><br><br>
Recall <math> sin(\theta) = \frac{1}{j2}(e^{j\theta} - e^{-j\theta})\!</math>, so <br><br>
<math> h(t) = \frac{T}{j2}\Bigg[\frac{e^{j2 \pi t/T} - e^{-j2 \pi t/T}}{ \pi t}\Bigg] - \ \frac{T}{j2}\Bigg[\frac{e^{j \pi t/T} - e^{-j \pi t/T}}{ \pi t}\Bigg] =\frac{T}{ \pi t}sin \Bigg(\frac{2 \pi t}{T} \Bigg) \ - \ \frac{T}{ \pi t}sin \Bigg(\frac{ \pi t}{T} \Bigg) = \frac{2sin \Big(\frac{2 \pi t}{T} \Big)}{\frac{2 \pi t}{T}} \ - \ \frac{sin \Big(\frac{ \pi t}{T} \Big)}{\frac{ \pi t}{T}} \!</math><br><br>
Also recall <math> sinc(\theta) = \frac{sin(\pi \theta)}{\pi \theta}\!</math>, so <br><br>
<math> h(t) = \frac{2sin \Big(\frac{2 \pi t}{T} \Big)}{\frac{2 \pi t}{T}} \ - \ \frac{sin \Big(\frac{ \pi t}{T} \Big)}{\frac{ \pi t}{T}} = 2sinc \Bigg(\frac{2t}{T} \Bigg) - sinc \Bigg(\frac{t}{T} \Bigg)\!</math><br><br>
Now that we know <math> h(t) \!</math>, we can find <math> x(t) \!</math> by convolving the function for <math> x(t) \!</math> after sampling with <math> h(t) \!</math>.<br><br>
<math> x(t) = \sum_{n=-\infty}^\infty x(nT)\delta(t-nT) * \Bigg[2sinc \Bigg(\frac{2t}{T} \Bigg) - sinc \Bigg(\frac{t}{T} \Bigg)\Bigg] = \sum_{n=-\infty}^\infty x(nT)\Bigg[2sinc \Bigg(\frac{2(t-nT)}{T} \Bigg) \ - \ sinc \Bigg(\frac{t-nT}{T} \Bigg)\Bigg]\!</math><br><br>
Or, if you prefer, <math> x(t) = \sum_{n=-\infty}^\infty x(nT)\Bigg[\frac{2sin\Big(\frac{2\pi (t-nT)}{T}\Big)}{\frac{2\pi (t-nT)}{T}} \ - \ \frac{sin\Big(\frac{\pi (t-nT)}{T}\Big)}{\frac{\pi (t-nT)}{T}}\Bigg]

Revision as of 22:05, 28 October 2009

Max Woesner

Back to my Home Page

Homework #7 - Sampling


Problem Statement
Figure out what happens if your sampled signal, , has frequency components only for . Can you recover the original signal from it? If so, find the expression for in terms of .

Solution
For frequency components , our sampled signal in the frequency domain, or , is going to look like this.
Sampling1a.jpg

After sampling with frequency , the signal is going to be shifted over by , since . It will look like this.
Sampling2.jpg

To recover the original signal , we need to a use bandpass filter to filter out the parts we don't want, as indicated by the red line in the figure below. (Note: not to scale.)
Sampling3.jpg

This leaves us with the original signal, as shown below.
Sampling1a.jpg

The transfer function of the bandpass filter that will accomplish this for us is

To find the expression for , or the expression for the bandpass filter in the time domain, we can take the inverse Fourier transform of .







Recall , so



Also recall , so



Now that we know , we can find by convolving the function for after sampling with .



Or, if you prefer, <math> x(t) = \sum_{n=-\infty}^\infty x(nT)\Bigg[\frac{2sin\Big(\frac{2\pi (t-nT)}{T}\Big)}{\frac{2\pi (t-nT)}{T}} \ - \ \frac{sin\Big(\frac{\pi (t-nT)}{T}\Big)}{\frac{\pi (t-nT)}{T}}\Bigg]