Sampling - HW7: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:


<b>Solution</b><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>
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><br>
[[Image:Sampling1a.jpg]]<br><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>
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><br>
[[Image:Sampling2.jpg]]<br><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>
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><br>
[[Image:Sampling3.jpg]]<br><br>
[[Image:Sampling3.jpg]]<br><br>
This leaves us with the original signal, as shown below.<br>
This leaves us with the original signal, as shown below.<br><br>
[[Image:Sampling1a.jpg]]<br><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>
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>
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) = \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>
Line 25: Line 25:
Also recall <math> sinc(\theta) = \frac{sin(\pi \theta)}{\pi \theta}\!</math>, so <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>
<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>
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, or <math> \sum_{n=-\infty}^\infty x(nT)\delta(t-nT) \!</math>, 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>
<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]
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]\!</math><br><br>
 
Alternatively, a different bandpass filter can be used that will simplify the math we have to do, such as the one indicated by the red line in the figure below. <i>(Note: not to scale.)</i><br><br>
[[Image:Sampling4.jpg]]<br><br>
Leaving us with the signal shown below.<br><br>
[[Image:Sampling5.jpg]]<br><br>
The transfer function of this bandpass filter is <math>H(f)=\begin{cases} T,  & \mbox{ } |f|< \frac{1}{2T} \\ 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}{2T}}^{\frac{1}{2T}}Te^{j2 \pi ft}df\ = \frac{Te^{j2 \pi ft}}{j2 \pi t} \Bigg|_{f=-\frac{1}{2T}}^{\frac{1}{2T}} = \frac{T}{j2}\Bigg[\frac{e^{j \pi t/T} - e^{-j \pi t/T}}{ \pi t}\Bigg]\!</math><br><br>
Recall again that <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^{j \pi t/T} - e^{-j \pi t/T}}{ \pi t}\Bigg] = \frac{T}{ \pi t}sin \Bigg(\frac{ \pi t}{T} \Bigg) \ = \frac{sin \Big(\frac{ \pi t}{T} \Big)}{\frac{ \pi t}{T}} \!</math><br><br>
Also recall again that <math> sinc(\theta) = \frac{sin(\pi \theta)}{\pi \theta}\!</math>, so <br><br>
<math> h(t) = \frac{sin \Big(\frac{ \pi t}{T} \bigg)}{\frac{ \pi t}{T}} = 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, or <math> \sum_{n=-\infty}^\infty x(nT)\delta(t-nT) \!</math>, with <math> h(t) \!</math>.<br><br>
 
<math> x(t) = \sum_{n=-\infty}^\infty x(nT)\delta(t-nT) * \Bigg[sinc \bigg(\frac{t}{T} \bigg)\Bigg] = \sum_{n=-\infty}^\infty x(nT)(sinc \Bigg(\frac{t-nT}{T} \Bigg)\!</math><br><br>
Or, if you prefer, <math> x(t) = \sum_{n=-\infty}^\infty x(nT)\Bigg[\frac{sin\Big(\frac{\pi (t-nT)}{T}\Big)}{\frac{\pi (t-nT)}{T}}\Bigg]\!</math><br><br>

Latest revision as of 21:42, 1 December 2009

Max Woesner

Back to my Home Page

Homework #7 - Sampling


Problem Statement
Figure out what happens if your sampled signal, x(t), has frequency components only for fs2<f<fs. Can you recover the original signal from it? If so, find the expression for x(t) in terms of x(nT).

Solution
For frequency components fs2<f<fs, our sampled signal x(t) in the frequency domain, or X(f), is going to look like this.



After sampling with frequency fs, the signal is going to be shifted over by 1T, since fs=1T. It will look like this.



To recover the original signal x(t), 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.)



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



The transfer function of the bandpass filter that will accomplish this for us is H(f)={T, 12T<|f|<1T0, else 

To find the expression for h(t), or the expression for the bandpass filter in the time domain, we can take the inverse Fourier transform of H(f).

h(t)=1[H(f)]=1T12TTej2πftdf+12T1TTej2πftdf=Tej2πftj2πt|f=1T12T+Tej2πftj2πt|f=12T1T

h(t)=Tejπt/Tej2πt/Tj2(πt)+Tej2πt/Tejπt/Tj2(πt)=Tj2[ejπt/Tej2πt/T+ej2πt/Tejπt/Tπt]

h(t)=Tj2[ejπt/T+ejπt/T+ej2πt/Tej2πt/Tπt]=Tj2[ej2πt/Tej2πt/Tπt]Tj2[ejπt/Tejπt/Tπt]

Recall sin(θ)=1j2(ejθejθ), so

h(t)=Tj2[ej2πt/Tej2πt/Tπt]Tj2[ejπt/Tejπt/Tπt]=Tπtsin(2πtT)Tπtsin(πtT)=2sin(2πtT)2πtTsin(πtT)πtT

Also recall sinc(θ)=sin(πθ)πθ, so

h(t)=2sin(2πtT)2πtTsin(πtT)πtT=2sinc(2tT)sinc(tT)

Now that we know h(t), we can find x(t) by convolving the function for x(t) after sampling, or n=x(nT)δ(tnT), with h(t).

x(t)=n=x(nT)δ(tnT)*[2sinc(2tT)sinc(tT)]=n=x(nT)[2sinc(2(tnT)T)sinc(tnTT)]

Or, if you prefer, x(t)=n=x(nT)[2sin(2π(tnT)T)2π(tnT)Tsin(π(tnT)T)π(tnT)T]

Alternatively, a different bandpass filter can be used that will simplify the math we have to do, such as the one indicated by the red line in the figure below. (Note: not to scale.)



Leaving us with the signal shown below.



The transfer function of this bandpass filter is H(f)={T, |f|<12T0, else 

To find the expression for h(t), or the expression for the bandpass filter in the time domain, we can take the inverse Fourier transform of H(f).

h(t)=1[H(f)]=12T12TTej2πftdf=Tej2πftj2πt|f=12T12T=Tj2[ejπt/Tejπt/Tπt]

Recall again that sin(θ)=1j2(ejθejθ), so

h(t)=Tj2[ejπt/Tejπt/Tπt]=Tπtsin(πtT)=sin(πtT)πtT

Also recall again that sinc(θ)=sin(πθ)πθ, so

h(t)=sin(πtT)πtT=sinc(tT)

Now that we know h(t), we can find x(t) by convolving the function for x(t) after sampling, or n=x(nT)δ(tnT), with h(t).

x(t)=n=x(nT)δ(tnT)*[sinc(tT)]=n=x(nT)(sinc(tnTT)

Or, if you prefer, x(t)=n=x(nT)[sin(π(tnT)T)π(tnT)T]