(7 intermediate revisions by 2 users not shown)
Line 14: Line 14:
 
'''Solution'''
 
'''Solution'''
  
Sampling the signal produces copies of the spectrum. The spectrum of y[n] can be express in cycles/sec as:
+
To begin, we can write express the ideally sampled signal, x_s(t), as
  
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
Y(f) = \frac{1}{T} \sum_{k=-\infty}^{\infty}X(f-k\frac{1}{T})
+
x_s(t)&=\text{comb}_T \left \{ x(t) \right \}\\
 +
&= x(t)\sum_{n=-\infty}^{\infty} \delta(t-kT)
 
\end{align}
 
\end{align}
</math>
+
</math>  
 +
 
 +
We can then get the spectrum as
 +
 
 +
<math> \begin{align}
 +
X_s(f) &= \text{CTFT} \left \{ \text{comb}_T \left \{ x(t) \right \} \right \} \\
 +
&= \frac{1}{T} \text{rep}_{\frac{1}{T}} \left \{ X(f) \right \}\\
 +
&=\frac{1}{T} \sum_{k=-\infty}^{\infty}X(f-k\frac{1}{T})
 +
\end{align}</math>
 +
 
  
To filter out the copies, and just preserve the one at baseband, we can use the filter
+
The interpolation filter should filter out the copies of the original spectrum while preserving the one at baseband. Conceptually, the simplest filter is
  
 
<math>
 
<math>
Line 29: Line 39:
  
 
<math>
 
<math>
h_r(t) = sinc\left ( \frac{t}{T} \right )
+
h_r(t) = \text{sinc}\left ( \frac{t}{T} \right )
 
</math>
 
</math>
  
Line 36: Line 46:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
z(t) &= comb_{T_s} \{ x(t) \} \ast sinc \left ( \frac{t}{T} \right ) \\
+
z(t) &= \text{comb}_{T_s} \{ x(t) \} \ast \text{sinc} \left ( \frac{t}{T} \right ) \\
&=\left ( \sum_{n=-\infty}^{\infty} x(nT) \delta (t-nT) \right )\ast sinc \left ( \frac{t}{T} \right ) \\
+
&=\left ( \sum_{n=-\infty}^{\infty} x(nT) \delta (t-nT) \right )\ast \text{sinc} \left ( \frac{t}{T} \right ) \\
&=\sum_{n=-\infty}^{\infty} x(nT) sinc \left (\frac{t-nT }{T}\right)  \\
+
&=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (\frac{t-nT }{T}\right)  \\
 
\end{align}
 
\end{align}
 
</math>
 
</math>
Line 50: Line 60:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
z(mT) &=\sum_{n=-\infty}^{\infty} x(nT) sinc \left (\frac{mT-nT }{T}\right)  \\
+
z(mT) &=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (\frac{mT-nT }{T}\right)  \\
  &=\sum_{n=-\infty}^{\infty} x(nT) sinc \left (m-n \right)  \mbox{, where } sinc(m-n) = \begin{cases} 1 \mbox{, where } m=n \\ 0 \mbox{, else}\end{cases} \\
+
  &=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (m-n \right)  \mbox{, where } \text{sinc}(m-n) = \begin{cases} 1 \mbox{, where } m=n \\ 0 \mbox{, else}\end{cases} \\
 
&= x(mT)
 
&= x(mT)
 
\end{align}
 
\end{align}
Line 60: Line 70:
 
'''Solution'''
 
'''Solution'''
  
The original signal, x(t), must be bandlimited, so that X(f) = 0 for all f>1/2T. Otherwise, there will be aliasing.
+
The original signal, x(t), must be bandlimited, so that X(f) = 0 for all f>1/2T. Otherwise, there might be aliasing.
  
 
----
 
----
Line 67: Line 77:
  
 
a) Write a formula for a piece-wise constant interpolation of the samples.
 
a) Write a formula for a piece-wise constant interpolation of the samples.
 +
 +
'''Solution'''
 +
 +
The basic reconstruction segment we will use for the piece-wise constant interpolation is
 +
 +
<math>s_R(t) = \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right )</math>
 +
 +
This segment will be weighted and shifted for each sample point. For example, the nth sample point would produce
 +
 +
<math>\begin{align}
 +
s_{R,n} (t) &= x(nT) \text{rect}\left( \frac{t-\frac{T}{2} - nT}{T} \right)\\
 +
&= x(nT) \left (  \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \delta(t-nT) \right ) \\
 +
&= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \left (x(nT) \delta(t-nT)\right)
 +
\end{align}</math>
 +
 +
Extending this for all n, we get
 +
 +
<math>\begin{align}
 +
x_R(t) &= \sum_{n=-\infty}^{\infty} \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \left (x(nT) \delta(t-nT)\right) \\
 +
&= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \sum_{n=-\infty}^{\infty}  \left (x(nT) \delta(t-nT)\right) \\
 +
&= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \text{comb}_T \left \{ x(t) \right \}
 +
\end{align}</math>
 +
 +
The last line helps with part b.
  
 
b) Derive the relationship between the Fourier transform of the interpolation you wrote in 2a) and the Fourier transform of x(t). (Do not simply write down the formula; show how to derive it.)  
 
b) Derive the relationship between the Fourier transform of the interpolation you wrote in 2a) and the Fourier transform of x(t). (Do not simply write down the formula; show how to derive it.)  
 +
 +
'''Solution'''
 +
 +
<math>\begin{align}
 +
X_R(f) &= \text{CTFT} \left \{ \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \right \} CTFT \left \{ \text{comb}_T \left \{ x(t) \right \} \right \} \\
 +
&= e^{-j2\pi f \frac{T}{2}} T \text{sinc}(Tf) \frac{1}{T} rep_{\frac{1}{t}}\left \{ X(f) \right \} \\
 +
& = e^{-j \pi f T} \text{sinc}(Tf) rep_{\frac{1}{t}}\left \{ X(f) \right \}
 +
\end{align}</math>
  
 
c) Is the interpolation you wrote in 2a) band-limited? Explain.  
 
c) Is the interpolation you wrote in 2a) band-limited? Explain.  
 +
 +
'''Solution'''
 +
 +
No, it is not band-limited. For one, the rep function replicates the spectrum every 1/T, and the sinc is not bandlimited.
  
 
----
 
----
Line 79: Line 125:
  
 
a) Obtain the Fourier transform X(f) of the signal  and sketch the graph of |X(f)|.  
 
a) Obtain the Fourier transform X(f) of the signal  and sketch the graph of |X(f)|.  
 +
 +
'''Solution'''
 +
 +
To solve this, we will use the transform of a sinc, as well as the scaling and shifting properties:
 +
 +
<math>\begin{align}
 +
\text{sinc}(t) &\leftrightarrow \text{rect}(f) \\
 +
x(at) &\leftrightarrow \frac{1}{|a|} X(af) \\
 +
x(t-t_0) &\leftrightarrow e^{-j2\pi f t_0}X(f)
 +
\end{align}</math>
 +
 +
In our case, t_0=5 and a=2, so
 +
 +
<math>\begin{align}
 +
X(f) &= CTFT \left \{7 \text{sinc}\left ( \frac{x-5}{2} \right ) \right \} \\
 +
&= 7\cdot 2 e^{-j2\pi f 5} \text{rect}(2f) \\
 +
&= 14 e^{-j10\pi f} \text{rect}(2f) \\
 +
\end{align}</math>
  
 
b) What is the Nyquist rate <math>f_0</math> for this signal?
 
b) What is the Nyquist rate <math>f_0</math> for this signal?
 +
 +
'''Solution'''
 +
 +
The Nyquist rate is 1/2 Hz (twice the maximum non-zero frequency).
  
 
c) Let  
 
c) Let  
Line 91: Line 159:
  
 
Sketch the graph of <math>|X_s(f)| </math>.
 
Sketch the graph of <math>|X_s(f)| </math>.
 +
 +
 +
'''Solution'''
 +
 +
<math>\begin{align}
 +
X_s(f) &= \text{CTFT} \left \{ \text{comb}_T \left \{ x(t) \right \} \right \}  \\
 +
&= \frac{1}{T} \text{rep}_{\frac{1}{T}} \left \{ X(f) \right \} \\
 +
&= 3f_0 \text{rep}_{3f_0} \left \{ X(f) \right \} \\
 +
&= \frac{3}{2} \text{rep}_{\frac{3}{2}} \left \{ 14 \text{rect}( 2f )\right \} \\
 +
&= 21\sum_{k=-\infty}^{\infty} \text{rect}\left ( 2f - \frac{3}{2}k\right )
 +
\end{align}</math>
  
 
d) Let  
 
d) Let  
Line 98: Line 177:
 
Write a mathematical expression for the Fourier transform <math>{\mathcal X}_d(\omega) </math> of  <math>x_d[n]= x(nT)</math> and sketch the graph of <math>|{\mathcal X}_d(\omega)| </math>.
 
Write a mathematical expression for the Fourier transform <math>{\mathcal X}_d(\omega) </math> of  <math>x_d[n]= x(nT)</math> and sketch the graph of <math>|{\mathcal X}_d(\omega)| </math>.
  
 +
'''Solution'''
 +
 +
The relationship between the DTFT of <math>x_d[n] </math> and the CTFT of <math>x_s(t)</math> is
 +
 +
<math>\mathcal{X}_d(\omega) = X_s\left (\frac{\omega F_s}{2\pi} \right )</math>
 +
 +
Therefore
 +
 +
<math>\begin{align}
 +
\mathcal{X}_d(\omega) &= 35\sum_{k=-\infty}^{\infty} \text{rect}\left ( \frac{5\omega}{2\pi} - \frac{5}{2}k\right )  \\
 +
&= 35 \sum_{k=-\infty}^{\infty} \text{rect}\left ( \frac{5}{2} \frac{1}{2\pi} \left ( 2\omega- 2 \pi k \right )\right )  \\
 +
&= 35 \text{rep}_{2\pi} \left \{ \text{rect} \left (\frac{5}{2\pi} \omega  \right ) \right \}
 +
\end{align}</math>
 
----
 
----
 
== Discussion ==
 
== Discussion ==
 
You may discuss the homework below.
 
You may discuss the homework below.
 
*write comment/question here
 
*write comment/question here
 +
 +
- I believe there is an error in solution three with the restated time scaling property
 
----
 
----
 
[[2014_Fall_ECE_438_Boutin|Back to ECE438, Fall 2014, Prof. Boutin]]
 
[[2014_Fall_ECE_438_Boutin|Back to ECE438, Fall 2014, Prof. Boutin]]

Latest revision as of 20:16, 18 December 2014


Homework 3 Solution, ECE438, Fall 2014

Question 1

Let x(t) be a continuous-time signal and let y[n]=x(nT) be a sampling of that signal with period T>0. We would like to interpolate the samples (i.e., "connect the dots") in order to try to recover x(t).

a) Derive a formula for a band-limited interpolation of the samples (i.e., an expression for a continuous signal z(t) in terms of the samples y[n]). (Do not simply write down the formula; show how to derive it.)

Solution

To begin, we can write express the ideally sampled signal, x_s(t), as

$ \begin{align} x_s(t)&=\text{comb}_T \left \{ x(t) \right \}\\ &= x(t)\sum_{n=-\infty}^{\infty} \delta(t-kT) \end{align} $

We can then get the spectrum as

$ \begin{align} X_s(f) &= \text{CTFT} \left \{ \text{comb}_T \left \{ x(t) \right \} \right \} \\ &= \frac{1}{T} \text{rep}_{\frac{1}{T}} \left \{ X(f) \right \}\\ &=\frac{1}{T} \sum_{k=-\infty}^{\infty}X(f-k\frac{1}{T}) \end{align} $


The interpolation filter should filter out the copies of the original spectrum while preserving the one at baseband. Conceptually, the simplest filter is

$ H_r(f)=\begin{cases} T \mbox{, where } |f| \leq \frac{1}{2T} \\ 0 \mbox{, else}\end{cases} $

$ h_r(t) = \text{sinc}\left ( \frac{t}{T} \right ) $

Performing the convolution in the time domain

$ \begin{align} z(t) &= \text{comb}_{T_s} \{ x(t) \} \ast \text{sinc} \left ( \frac{t}{T} \right ) \\ &=\left ( \sum_{n=-\infty}^{\infty} x(nT) \delta (t-nT) \right )\ast \text{sinc} \left ( \frac{t}{T} \right ) \\ &=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (\frac{t-nT }{T}\right) \\ \end{align} $

b) Show that your interpolation is equal to the original signal at all sample points.

Solution

Looking at the mth sample point

$ \begin{align} z(mT) &=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (\frac{mT-nT }{T}\right) \\ &=\sum_{n=-\infty}^{\infty} x(nT) \text{sinc} \left (m-n \right) \mbox{, where } \text{sinc}(m-n) = \begin{cases} 1 \mbox{, where } m=n \\ 0 \mbox{, else}\end{cases} \\ &= x(mT) \end{align} $

c) Under what circumstances is your interpolation equal to the original signal x(t)? Explain.

Solution

The original signal, x(t), must be bandlimited, so that X(f) = 0 for all f>1/2T. Otherwise, there might be aliasing.


Question 2

Again, we consider a continuous-time signal x(t) and a sampling y[n]=x(nT) of that signal.

a) Write a formula for a piece-wise constant interpolation of the samples.

Solution

The basic reconstruction segment we will use for the piece-wise constant interpolation is

$ s_R(t) = \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) $

This segment will be weighted and shifted for each sample point. For example, the nth sample point would produce

$ \begin{align} s_{R,n} (t) &= x(nT) \text{rect}\left( \frac{t-\frac{T}{2} - nT}{T} \right)\\ &= x(nT) \left ( \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \delta(t-nT) \right ) \\ &= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \left (x(nT) \delta(t-nT)\right) \end{align} $

Extending this for all n, we get

$ \begin{align} x_R(t) &= \sum_{n=-\infty}^{\infty} \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \left (x(nT) \delta(t-nT)\right) \\ &= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \sum_{n=-\infty}^{\infty} \left (x(nT) \delta(t-nT)\right) \\ &= \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \ast \text{comb}_T \left \{ x(t) \right \} \end{align} $

The last line helps with part b.

b) Derive the relationship between the Fourier transform of the interpolation you wrote in 2a) and the Fourier transform of x(t). (Do not simply write down the formula; show how to derive it.)

Solution

$ \begin{align} X_R(f) &= \text{CTFT} \left \{ \text{rect} \left ( \frac{t-\frac{T}{2}}{T} \right ) \right \} CTFT \left \{ \text{comb}_T \left \{ x(t) \right \} \right \} \\ &= e^{-j2\pi f \frac{T}{2}} T \text{sinc}(Tf) \frac{1}{T} rep_{\frac{1}{t}}\left \{ X(f) \right \} \\ & = e^{-j \pi f T} \text{sinc}(Tf) rep_{\frac{1}{t}}\left \{ X(f) \right \} \end{align} $

c) Is the interpolation you wrote in 2a) band-limited? Explain.

Solution

No, it is not band-limited. For one, the rep function replicates the spectrum every 1/T, and the sinc is not bandlimited.


Question 3

Let

$ x(t)=7 \text{sinc } ( \frac{t-5}{2} ). $

a) Obtain the Fourier transform X(f) of the signal and sketch the graph of |X(f)|.

Solution

To solve this, we will use the transform of a sinc, as well as the scaling and shifting properties:

$ \begin{align} \text{sinc}(t) &\leftrightarrow \text{rect}(f) \\ x(at) &\leftrightarrow \frac{1}{|a|} X(af) \\ x(t-t_0) &\leftrightarrow e^{-j2\pi f t_0}X(f) \end{align} $

In our case, t_0=5 and a=2, so

$ \begin{align} X(f) &= CTFT \left \{7 \text{sinc}\left ( \frac{x-5}{2} \right ) \right \} \\ &= 7\cdot 2 e^{-j2\pi f 5} \text{rect}(2f) \\ &= 14 e^{-j10\pi f} \text{rect}(2f) \\ \end{align} $

b) What is the Nyquist rate $ f_0 $ for this signal?

Solution

The Nyquist rate is 1/2 Hz (twice the maximum non-zero frequency).

c) Let

$ T = \frac{1}{3 f_0}. $

Write a mathematical expression for the Fourier transform $ X_s(f) $ of

$ x_s(t)= \text{ comb}_T \left( x(t) \right). $

Sketch the graph of $ |X_s(f)| $.


Solution

$ \begin{align} X_s(f) &= \text{CTFT} \left \{ \text{comb}_T \left \{ x(t) \right \} \right \} \\ &= \frac{1}{T} \text{rep}_{\frac{1}{T}} \left \{ X(f) \right \} \\ &= 3f_0 \text{rep}_{3f_0} \left \{ X(f) \right \} \\ &= \frac{3}{2} \text{rep}_{\frac{3}{2}} \left \{ 14 \text{rect}( 2f )\right \} \\ &= 21\sum_{k=-\infty}^{\infty} \text{rect}\left ( 2f - \frac{3}{2}k\right ) \end{align} $

d) Let

$ T = \frac{1}{5 f_0}. $

Write a mathematical expression for the Fourier transform $ {\mathcal X}_d(\omega) $ of $ x_d[n]= x(nT) $ and sketch the graph of $ |{\mathcal X}_d(\omega)| $.

Solution

The relationship between the DTFT of $ x_d[n] $ and the CTFT of $ x_s(t) $ is

$ \mathcal{X}_d(\omega) = X_s\left (\frac{\omega F_s}{2\pi} \right ) $

Therefore

$ \begin{align} \mathcal{X}_d(\omega) &= 35\sum_{k=-\infty}^{\infty} \text{rect}\left ( \frac{5\omega}{2\pi} - \frac{5}{2}k\right ) \\ &= 35 \sum_{k=-\infty}^{\infty} \text{rect}\left ( \frac{5}{2} \frac{1}{2\pi} \left ( 2\omega- 2 \pi k \right )\right ) \\ &= 35 \text{rep}_{2\pi} \left \{ \text{rect} \left (\frac{5}{2\pi} \omega \right ) \right \} \end{align} $


Discussion

You may discuss the homework below.

  • write comment/question here

- I believe there is an error in solution three with the restated time scaling property


Back to ECE438, Fall 2014, Prof. Boutin

Alumni Liaison

To all math majors: "Mathematics is a wonderfully rich subject."

Dr. Paul Garrett