4.4 HW3 addition, March. 3,2010

  4.4.1 small note on one of the problems
  4.4.2 older version, had long solution, did not submit
  4.4.3 Problem 1 (problem 1.20 in text)
  4.4.4 Problem 2
  4.4.5 Problem 3 (1.28 in text)
  4.4.6 Problem 4
  4.4.7 Problem 5:

4.4.1 small note on one of the problems

This is a small note to show that the solution I obtained for the sampling problem matches the solution provided in the key solution. I found the following solution\[ h_{1}\left ( t\right ) =\operatorname{sinc}\left ( 2000\pi \ t\right ) \cos \left ( 10000\pi \ t\right ) \] Key solution is\[ h_{2}\left ( t\right ) =3\operatorname{sinc}\left ( 12000\pi \ t\right ) -2\operatorname{sinc}\left ( 8000\pi \ t\right ) \] The solutions are the same. This can be seen by simple trigonometric transformation as follows: First, I will remove the \(1,000\) factor from all values for simplicity, it makes no difference), I will now convert \(h_{2}\left ( t\right ) \) to \(h_{1}\left ( t\right ) \)\begin{align*} h_{2}\left ( t\right ) & =3\frac{\sin \left ( 12\pi \ t\right ) }{12\pi \ t}-2\frac{\sin \left ( 8\pi \ t\right ) }{8\pi \ t}\\ & =\frac{\sin \left ( 12\pi \ t\right ) }{4\pi \ t}-\frac{\sin \left ( 8\pi \ t\right ) }{4\pi \ t}\\ & =\frac{1}{4\pi \ t}\left ( \sin \left ( 12\pi \ t\right ) -\sin \left ( 8\pi \ t\right ) \right ) \end{align*}

Now use \[ \sin A-\sin B=2\sin \frac{A-B}{2}\cos \frac{A+B}{2}\] on the above, we obtain\begin{align*} h_{2}\left ( t\right ) & =\frac{1}{4\pi \ t}\left ( 2\sin \frac{4\pi t}{2}\cos \frac{20\pi t}{2}\right ) \\ & =\frac{1}{2\pi \ t}\left ( \sin 2\pi t\cos 10\pi t\right ) \\ & =\frac{\sin 2\pi t}{2\pi \ t}\cos 10\pi t\\ & =\operatorname{sinc}\left ( 2\pi \ t\right ) \cos \left ( 10\pi \ t\right ) \end{align*}

which is \(h_{1}\left ( t\right )\)

4.4.2 older version, had long solution, did not submit

This below is an older version, had long solution to some of the problems, was not submitted. I kept it in case I need it.

PDF (letter size)
PDF (legal size)

4.4.3 Problem 1 (problem 1.20 in text)

A causal linear shift invariant system is described by the difference equation\[ y\left ( n\right ) -ay\left ( n-1\right ) =x\left ( n\right ) -bx\left ( n-1\right ) \] Determine the value of \(b\left ( b\neq a\right ) \) such that this system is an allpass system. i.e. the magnitude of its frequency response is constant independent of the frequency.

Answer:

We can either let \(x\left ( n\right ) =e^{j\omega n}\), and since it is a shift invariant linear system, then the output is \(y\left ( n\right ) =H\left ( \omega \right ) e^{j\omega n}\), and plug in these in the difference equation to solve for \(H\left ( \omega \right ) \), or we can use the \(Z\) transform approach. Using the Z transform approach:

We find \(H\left ( z\right ) \), the frequency response. Assuming zero initial conditions, and taking the \(Z\) transform of the above, we obtain\begin{align*} Y\left ( z\right ) -az^{-1}Y\left ( z\right ) & =X\left ( z\right ) -bz^{-1}X\left ( z\right ) \\ Y\left ( z\right ) \left ( 1-az^{-1}\right ) & =X\left ( z\right ) \left ( 1-bz^{-1}\right ) \\ H\left ( z\right ) & =\frac{Y\left ( z\right ) }{X\left ( z\right ) }=\frac{\left ( 1-bz^{-1}\right ) }{\left ( 1-az^{-1}\right ) } \end{align*}

Let \(z=re^{j\omega }\) and evaluate at the unit circle (\(r=1\)), we obtain the DTFT of \(h\left ( n\right ) \) which is\[ H\left ( e^{j\omega }\right ) =\frac{\left ( 1-be^{-j\omega }\right ) }{\left ( 1-ae^{-j\omega }\right ) }=\frac{1-b\left ( \cos \omega -j\sin \omega \right ) }{1-a\left ( \cos \omega -j\sin \omega \right ) }=\frac{\left ( 1-b\cos \omega \right ) +j\left ( b\sin \omega \right ) }{\left ( 1-a\cos \omega \right ) +j\left ( a\sin \omega \right ) }\] Hence\[ \left \vert H\left ( e^{j\omega }\right ) \right \vert ^{2}=\frac{1-2b\cos \omega +b^{2}}{1-2a\cos \omega +a^{2}}\] We want this to be constant, i.e. does not depend on \(\omega \). If we let \(b=\frac{1}{a}\), we obtain\[ \left \vert H\left ( e^{j\omega }\right ) \right \vert ^{2}=\frac{1-\frac{2}{a}\cos \omega +\frac{1}{a^{2}}}{1-2a\cos \omega +a^{2}}=\frac{a^{2}-2a\cos \omega +1}{\left ( 1-2a\cos \omega +a^{2}\right ) a^{2}}=\frac{1}{a^{2}}\] Hence \(b=\frac{1}{a}\) will make the magnitude spectrum independent of \(\omega \) which is what we want for an allpass filter.

4.4.4 Problem 2

Let \(h\left ( n\right ) \) be the impulse response function of the above system (problem 1 above).  determine

\(h\left ( n\right ) \circledast \tilde{h}\left ( n\right ) \) where \(\tilde{h}\left ( n\right ) =h\left ( -n\right ) \)

Answer:

To find \(h\left ( n\right ) \) we need to determine the \(Z\) inverse transform of \(\frac{\left ( 1-bz^{-1}\right ) }{\left ( 1-az^{-1}\right ) }\) when \(b=\frac{1}{a}\), i.e. \(H\left ( z\right ) =\frac{\left ( 1-a^{-1}z^{-1}\right ) }{\left ( 1-az^{-1}\right ) }\)

We can solve this in the discrete time domain or in the Z domain.

Solution in the Z domain is easier: Since convolution in time domain becomes multiplication in the Z domain, we write

\[ h\left ( n\right ) \circledast h\left ( -n\right ) \overset{Z}{\rightarrow }Z\left ( h\left ( n\right ) \right ) Z\left ( h\left ( -n\right ) \right ) \] But \(Z\left ( h\left ( -n\right ) \right ) =H\left ( \frac{1}{z}\right ) \) where \(H\left ( z\right ) \) is the Z transform of \(h\left ( n\right ) \), hence the above becomes\[ h\left ( n\right ) \circledast h\left ( -n\right ) \overset{Z}{\rightarrow }\frac{\left ( 1-a^{-1}z^{-1}\right ) }{\left ( 1-az^{-1}\right ) }\frac{\left ( 1-a^{-1}z\right ) }{\left ( 1-az\right ) }\] Therefore\begin{align*} h\left ( n\right ) \circledast h\left ( -n\right ) & =Z^{-1}\left [ \frac{\left ( 1-a^{-1}z^{-1}\right ) }{\left ( 1-az^{-1}\right ) }\frac{\left ( 1-a^{-1}z\right ) }{\left ( 1-az\right ) }\right ] =Z^{-1}\left [ \frac{1+a^{-2}-a^{-1}z-a^{-1}z^{-1}}{1+a^{2}-az-az^{-1}}\right ] \\ & =Z^{-1}\left [ \frac{1+\frac{1}{a^{2}}-\frac{z}{a}-\frac{1}{az}}{1+a^{2}-az-\frac{a}{z}}\right ] =Z^{-1}\left [ \frac{\frac{a^{2}z}{a^{2}z}+\frac{z}{a^{2}z}-\frac{az^{2}}{a^{2}z}-\frac{a}{a^{2}z}}{\frac{z+za^{2}-az^{2}-a}{z}}\right ] =Z^{-1}\left [ \frac{za^{2}+z-az^{2}-a}{a^{2}\left ( za^{2}+z-az^{2}-a\right ) }\right ] \\ & =Z^{-1}\left [ \frac{1}{a^{2}}\right ] =\frac{1}{a^{2}}Z^{-1}\left [ 1\right ] =\frac{1}{a^{2}}\delta \left ( n\right ) \end{align*}

This below is my attempt at solving this problem in the discrete time domain. It is much harder to do than in the Z domain. \[ \frac{\left ( 1-bz^{-1}\right ) }{\left ( 1-az^{-1}\right ) }=\frac{1}{\left ( 1-az^{-1}\right ) }-\frac{bz^{-1}}{1-az^{-1}}\] For \(\frac{1}{\left ( 1-az^{-1}\right ) }\) we obtain \(h_{1}\left ( n\right ) =au\left ( n\right ) \) for causal system. And for \(\frac{bz^{-1}}{1-az^{-1}}\), we can do long division, which gives \[ \frac{bz^{-1}}{1-az^{-1}}=bz^{-1}-abz^{-2}-a^{2}bz^{=2}+\cdots \] Hence\[ h_{2}\left ( n\right ) =\left \{ \begin{array} [c]{cccccc}0 & b & -ab & -a^{2}b & -a^{3}b & \cdots \\ n=0 & n=1 & n=2 & n=3 & n=4 & \cdots \end{array} \right \} \] or \[ h_{2}\left ( n\right ) =-a^{n-1}bu\left ( n-1\right ) \] Therefore\[ h\left ( n\right ) =h_{1}\left ( n\right ) +h_{2}\left ( n\right ) \] Hence\[ h\left ( n\right ) =au\left ( n\right ) -a^{n-1}\ bu\left ( n-1\right ) \] For example, \(h\left ( n\right ) =\left \{ \underset{n=0}{a},a+b,a-ab,a-a^{2}b,a-a^{3}b,\cdots \right \} \)then

\(\tilde{h}\left ( n\right ) =h\left ( -n\right ) =\left \{ \cdots ,a-a^{3}b,a-a^{2}b,a-ab,a+b,\underset{n=0}{a}\right \} \).

Now we find \(h\left ( n\right ) \circledast \tilde{h}\left ( n\right ) \,,\) but \(\tilde{h}\left ( n\right ) \) is a flipped over \(h\left ( n\right ) \,\ \)so when we convolve, we will flip it again, and end up with \(h\left ( n\right ) \) again, hence this is a auto correlation? i.e.\[ h\left ( n\right ) \circledast \tilde{h}\left ( n\right ) ={\displaystyle \sum \limits _{k=-\infty }^{\infty }} h\left ( k\right ) \tilde{h}\left ( n-k\right ) ={\displaystyle \sum \limits _{k=-\infty }^{\infty }} h\left ( k\right ) h\left ( n-\left ( -k\right ) )\right ) ={\displaystyle \sum \limits _{k=-\infty }^{\infty }} h\left ( k\right ) h\left ( k+n\right ) =h\left ( n\right ) \bigstar h\left ( n\right ) \] In auto-correlation, the same sequence is shifted to the right and right against a copy of itself. So we need now to find\[ \rho \left ( n\right ) ={\displaystyle \sum \limits _{k=-\infty }^{\infty }} h\left ( k\right ) h\left ( k+n\right ) \] We need to consider \(n=0\), \(n>0\) (shift to the left), and \(n<0\) (shift to the right)

pict

Lets do the case for \(n=0\),

\begin{align*} \rho \left ( 0\right ) & ={\sum \limits _{k=-\infty }^{\infty }}h\left ( k\right ) h\left ( k\right ) ={\sum \limits _{k=-\infty }^{\infty }}\left ( au\left ( k\right ) -a^{k-1}\ bu\left ( k-1\right ) \right ) \left ( au\left ( k\right ) -a^{k-1}\ bu\left ( k-1\right ) \right ) \\ & ={\sum \limits _{k=-\infty }^{\infty }}a^{2}u\left ( k\right ) -2au\left ( k\right ) a^{k-1}\ bu\left ( k-1\right ) +\left ( a^{k-1}\ bu\left ( k-1\right ) \right ) ^{2}\\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-{\sum \limits _{k=1}^{\infty }}2aa^{k-1}\ b+{\sum \limits _{k=1}^{\infty }}\left ( a^{k-1}\ b\right ) ^{2}\\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-2{\sum \limits _{k=1}^{\infty }}a^{k}\ b+{\sum \limits _{k=1}^{\infty }}a^{2k-2}\ b^{2}\\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-2b{\sum \limits _{k=1}^{\infty }}a^{k}\ +\frac{b^{2}}{a^{2}}{\sum \limits _{k=1}^{\infty }}a^{2k}\\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-2b\left ({\sum \limits _{k=0}^{\infty }}a^{k}-1\right ) \ +\frac{b^{2}}{a^{2}}\left ({\sum \limits _{k=0}^{\infty }}a^{2k}-1\right ) \\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-2b\left ( \frac{1}{1-a}-1\right ) \ +\frac{b^{2}}{a^{2}}\left ( \frac{1}{1-a^{2}}-1\right ) \\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-2b\left ( \frac{1-\left ( 1-a\right ) }{1-a}\right ) \ +\frac{b^{2}}{a^{2}}\left ( \frac{1-\left ( 1-a^{2}\right ) }{1-a^{2}}\right ) \\ & ={\sum \limits _{k=0}^{\infty }}a^{2}-\frac{2ba}{1-a}\ +\frac{b^{2}}{1-a^{2}} \end{align*}

For \(n<0\) we shift one copy of \(h\) to the right relative the fixed version of \(h\), hence\begin{align*}{\sum \limits _{k=-\infty }^{\infty }}h\left ( k\right ) h\left ( k+n\right ) & ={\sum \limits _{k=0}^{\infty }}\left ( au\left ( k\right ) -a^{k-1}\ bu\left ( k-1\right ) \right ) \ \left ( au\left ( k+n\right ) -a^{\left ( k+n\right ) -1}\ bu\left ( \left ( k+n\right ) -1\right ) \right ) \\ & ={\displaystyle \sum \limits _{k=0}^{\infty }} au\left ( k\right ) au\left ( k+n\right ) \\ & -au\left ( k\right ) a^{\left ( k+n\right ) -1}\ bu\left ( \left ( k+n\right ) -1\right ) \\ & -a^{k-1}\ bu\left ( k-1\right ) au\left ( k+n\right ) \\ & +a^{k-1}\ bu\left ( k-1\right ) a^{\left ( k+n\right ) -1}\ bu\left ( \left ( k+n\right ) -1\right ) \\ & \\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-{\displaystyle \sum \limits _{k=n+1}^{\infty }} aa^{\left ( k+n\right ) -1}\ b-{\displaystyle \sum \limits _{k=n}^{\infty }} a^{k-1}\ ba+{\displaystyle \sum \limits _{k=n+1}^{\infty }} a^{k-1}\ ba^{\left ( k+n\right ) -1}\ b\\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-b{\displaystyle \sum \limits _{k=n+1}^{\infty }} a^{\left ( k+n\right ) }-b{\displaystyle \sum \limits _{k=n}^{\infty }} a^{k}+a^{n}b^{2}{\displaystyle \sum \limits _{k=n+1}^{\infty }} a^{2k-2}\\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-a^{n}b{\displaystyle \sum \limits _{k=n+1}^{\infty }} a^{k}-b{\displaystyle \sum \limits _{k=n}^{\infty }} a^{k}+a^{n}\frac{b^{2}}{a^{2}}{\displaystyle \sum \limits _{k=n+1}^{\infty }} a^{2k}\\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-a^{n}b\left ({\displaystyle \sum \limits _{k=0}^{\infty }} a^{k}-{\displaystyle \sum \limits _{k=0}^{n}} a^{k}\right ) -b\left ({\displaystyle \sum \limits _{k=0}^{\infty }} a^{k}-{\displaystyle \sum \limits _{k=0}^{n-1}} a^{k}\right ) +a^{n}\frac{b^{2}}{a^{2}}\left ({\displaystyle \sum \limits _{k=0}^{\infty }} a^{2k}-{\displaystyle \sum \limits _{k=0}^{n}} a^{2k}\right ) \\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-a^{n}b\left ( \frac{1}{1-a}-\frac{1-a^{n+1}}{1-a}\right ) -b\left ( \frac{1}{1-a}-\frac{1-a^{n}}{1-a}\right ) +a^{n}\frac{b^{2}}{a^{2}}\left ( \frac{1}{1-a^{2}}-\frac{1-a^{2n+2}}{1-a^{2}}\right ) \end{align*}

Hence\begin{align*}{\displaystyle \sum \limits _{k=-\infty }^{\infty }} h\left ( k\right ) h\left ( k+n\right ) & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-\frac{a^{n}b}{1-a}+\frac{a^{n}b-ba^{2n+1}}{1-a}-\frac{b}{1-a}+\frac{b-ba^{n}}{1-a}+\frac{a^{n-2}b^{2}}{1-a^{2}}-\frac{a^{n-2}b^{2}-a^{3n-2}b^{2}}{1-a^{2}}\\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}+\frac{-a^{n}b+a^{n}b-ba^{2n+1}-b+b-ba^{n}}{1-a}+\frac{a^{n-2}b^{2}-a^{n-2}b^{2}+a^{3n-2}b^{2}}{1-a^{2}}\\ & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-b\frac{a^{2n+1}+a^{n}}{1-a}+b^{2}\frac{a^{3n-2}}{1-a^{2}} \end{align*}

Similarly we can do for \(n>0\).

Summary:\begin{align*} h\left ( n\right ) \circledast \tilde{h}\left ( n\right ) & ={\displaystyle \sum \limits _{k=0}^{\infty }} a^{2}-\frac{2ba}{1-a}\ +\frac{b^{2}}{1-a^{2}}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ n=0\\ h\left ( n\right ) \circledast \tilde{h}\left ( n\right ) & ={\displaystyle \sum \limits _{k=n}^{\infty }} a^{2}-b\frac{a^{2n+1}+a^{n}}{1-a}+b^{2}\frac{a^{3n-2}}{1-a^{2}}\ \ \ \ \ \ n<0 \end{align*}

4.4.5 Problem 3  (1.28 in text)

pict

solution\begin{align} h\left ( n\right ) & =h_{r}\left ( n\right ) +jh_{i}\left ( n\right ) \tag{1}\\ H\left ( \omega \right ) & =H_{R}\left ( \omega \right ) +jH_{I}\left ( \omega \right ) \tag{2} \end{align}

Take the DTFT of \(h\left ( n\right ) \), we obtain (I write \(F_{s}\) to mean DTFT)\begin{align} F_{s}\left \{ h\left ( n\right ) \right \} & =F_{s}\left \{ h_{r}\left ( n\right ) +jh_{i}\left ( n\right ) \right \} \nonumber \\ & =F_{s}\left \{ h_{r}\left ( n\right ) \right \} +F_{s}\left \{ jh_{i}\left ( n\right ) \right \} \nonumber \\ & =F_{s}\left \{ h_{r}\left ( n\right ) \right \} +jF_{s}\left \{ h_{i}\left ( n\right ) \right \} \nonumber \\ & =\left [ H_{A}\left ( \omega \right ) +jH_{B}\left ( \omega \right ) \right ] +j\left [ H_{c}\left ( \omega \right ) +jH_{D}\left ( \omega \right ) \right ] \nonumber \\ & =H_{A}\left ( \omega \right ) +jH_{B}\left ( \omega \right ) +jH_{c}\left ( \omega \right ) +j^{2}H_{D}\left ( \omega \right ) \nonumber \\ & =\left [ H_{A}\left ( \omega \right ) -H_{D}\left ( \omega \right ) \right ] +j\left [ H_{B}\left ( \omega \right ) +H_{c}\left ( \omega \right ) \right ] \tag{3} \end{align}

Compare (2) and (3), we see that \[ H_{A}\left ( \omega \right ) -H_{D}\left ( \omega \right ) =H_{R}\left ( \omega \right ) \] And\[ H_{B}\left ( \omega \right ) +H_{c}\left ( \omega \right ) =H_{I}\left ( \omega \right ) \]

4.4.6 Problem 4

   4.4.6.1 part (a)
   4.4.6.2 Part (b)

(a) Analog signals \(\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) t\) and \(\cos \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) t\) are sampled at a sampling rate \(\omega _{s}\), show that they give identical sampled data.

(b) Does the same hold true for  \(\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) t\) and \(\sin \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) t\) \(,\) if not, what similarity does exist between them?

solution:

4.4.6.1 part (a)

Let \(x_{1}\left ( t\right ) =\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) \) and let \(x_{2}\left ( t\right ) =\cos \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) t\), hence when they are sampled at \(\omega _{s}\). this means \(\omega _{s}=\frac{2\pi }{T}\) or \(T=\frac{2\pi }{\omega _{s}}\) where \(T\) is the sampling period. Therefore\[ x_{1}\left ( n\right ) =\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) nT=\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) n\frac{2\pi }{\omega _{s}}=\cos \left ( n\pi -n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] But \(\cos \left ( A-B\right ) =\cos A\cos B+\sin A\sin B\), hence the above becomes\[ x_{1}\left ( n\right ) =\cos \left ( n\pi \right ) \cos \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) +\sin n\pi \sin \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] But \(n\) is integer, hence \(\sin n\pi \sin \left ( n2\pi \frac{\omega }{\omega _{s}}\right ) =0\) and \(\cos \left ( n\pi \right ) =\left ( -1\right ) ^{n}\), so\[ \fbox{$x_1\left ( n\right ) =\left ( -1\right ) ^n\cos \left ( n2\pi \frac{\omega _0}{\omega _s}\right ) $}\] And similarly\[ x_{2}\left ( n\right ) =\cos \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) nT=\cos \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) n\frac{2\pi }{\omega _{s}}=\cos \left ( n\pi +n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] But \(\cos \left ( A+B\right ) =\cos A\cos B-\sin A\sin B\), hence the above becomes\[ x_{2}\left ( n\right ) =\cos \left ( n\pi \right ) \cos \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) -\sin n\pi \sin \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] Hence\[ x_{2}\left ( n\right ) =\left ( -1\right ) ^{n}\cos \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] Therefore, sampled versions of the signals is the same.

4.4.6.2 Part (b)

Let \(x_{1}\left ( t\right ) =\cos \left ( \frac{\omega _{s}}{2}-\omega _{0}\right ) t\) and let \(x_{2}\left ( t\right ) =\) \(\sin \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) t\), hence as was shown above\[ x_{1}\left ( n\right ) =\left ( -1\right ) ^{n}\cos \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] And\[ x_{2}\left ( n\right ) =\sin \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) nT=\sin \left ( \frac{\omega _{s}}{2}+\omega _{0}\right ) n\frac{2\pi }{\omega _{s}}=\sin \left ( n\pi +n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \] But \(\sin \left ( A+B\right ) =\sin A\cos B+\cos A\sin B\), hence the above becomes\begin{align*} x_{2}\left ( n\right ) & =\sin n\pi \cos \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) +\cos n\pi \sin \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \\ & =\cos n\pi \sin \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \\ & =\left ( -1\right ) ^{n}\sin \left ( n2\pi \frac{\omega _{0}}{\omega _{s}}\right ) \end{align*}

Therefore the sampled signals are not the same in general. However, \(\sin \left ( a\right ) =\cos \left ( a\right ) \) when \(a=\frac{\pi }{4}\) and \(a=-\frac{3\pi }{4}\), then they are the same.

Therefore, we conclude that \(x_{1}\left ( n\right ) =x_{2}\left ( n\right ) \) when when \(n2\pi \frac{\omega _{0}}{\omega _{s}}=\frac{\pi }{4}\) or \(n=\frac{1}{8}\frac{\omega _{s}}{\omega _{0}}\)or when \(n2\pi \frac{\omega _{0}}{\omega _{s}}=\frac{-3\pi }{4}\), hence \(n=\frac{-3}{8}\frac{\omega _{s}}{\omega _{0}}\), so taking the only the positive \(n\) value, we say that\[ x_{1}\left ( n\right ) =x_{2}\left ( n\right ) \ \ \ when\ \ \ \ n=\frac{1}{8}\frac{\omega _{s}}{\omega _{0}}\]

4.4.7 Problem 5:

pict

Solution:

Part (a)

Let \(f_{1}=4Khz\) and let \(f_{2}=6Khz\)

Let \(G\left ( \Omega \right ) \) be the CTFT of \(g\left ( t\right ) \), hence its spectrum will look like (assuming \(g\left ( t\right ) \) is real and even), where \(\Omega _{1}=2\pi f_{1}\) and \(\Omega _{h}=2\pi f_{2}\) and let \(W=\left \vert \Omega _{h}-\Omega _{1}\right \vert \)

pict

Hence, by shifting the right part of the spectrum, call it \(G_{R}\) to the left by \[ f_{shift}=4kHz \] Hence \(\Omega _{shift}=2\pi f_{shift}\) and also by shifting the left part of the spectrum, call it \(G_{L}\) to the right by \(\Omega _{shift},\) we obtain

pict

Therefore the highest frequency now becomes \(2\) kHz or in circular frequency it becomes\begin{align*} \Omega _{h} & =2\pi \left ( 2000\right ) \\ & =4000\pi \end{align*}

So, now we can use \(\Omega _{s}=2\Omega _{h}\), hence \(\Omega _{s}=2\pi \left ( 4000\right ) =8000\pi \ \)hence \[ f_{s}=4\ kHz \] Hence sampling period is\[ T=\frac{1}{4000}\sec \] This is the lowest sampling frequency. (I used Hz, but samples per second also can be used as units)

Part (b)

Let \(H_{R}\) be the bandpass filter over \(G_{R}\left ( \Omega \right ) \) before it was shifted and let \(H_{L}\) be the bandpass filter over \(G_{L}\left ( \Omega \right ) \) before it was shifted, and let \(H_{R}^{\prime }\) be the low pass filter over \(G_{R}\left ( \Omega \right ) \) after it was shifted and let \(H_{L}^{\prime }\) be the low pass filter over \(G_{L}\left ( \Omega \right ) \) after it was shifted

pict

Let \(\Omega _{shift}\equiv \bar{\Omega }\), and \(W\) is the width of the rect function, which is \(2khz\) but in circular frequency, \(4000\pi \) hence we write\[ h\left ( t\right ) =h_{R}\left ( t\right ) +h_{L}\left ( t\right ) \] Where\[ h_{R}\left ( t\right ) =F^{-1}\left ( H_{R}\left ( \Omega \right ) \right ) =F^{-1}\left ( H_{R}^{\prime }\left ( \Omega -\bar{\Omega }\right ) \right ) =e^{+j\bar{\Omega }t}F^{-1}\left ( H_{R}^{\prime }\left ( \Omega \right ) \right ) \] But \begin{align*} F^{-1}\left ( H_{R}^{\prime }\left ( \Omega \right ) \right ) & =F^{-1}\left ( T\ \text{Rect}\left ( \frac{\Omega -\frac{W}{2}}{W}\right ) \right ) \\ & =e^{+j\frac{W}{2}t}F^{-1}\left ( T\ \text{Rect}\left ( \frac{\Omega }{W}\right ) \right ) \\ & =e^{+j\frac{W}{2}t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \end{align*}

Hence\[ h_{R}\left ( t\right ) =e^{+j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \] Similarly,\[ h_{L}\left ( t\right ) =F^{-1}\left ( H_{L}\left ( \Omega \right ) \right ) =F^{-1}\left ( H_{L}^{\prime }\left ( \Omega +\bar{\Omega }\right ) \right ) =e^{-j\bar{\Omega }t}F^{-1}\left ( H_{L}^{\prime }\left ( \Omega \right ) \right ) \] But \begin{align*} F^{-1}\left ( H_{L}^{\prime }\left ( \Omega \right ) \right ) & =F^{-1}\left ( T\ \text{Rect}\left ( \frac{\Omega +\frac{W}{2}}{W}\right ) \right ) \\ & =e^{-j\frac{W}{2}t}F^{-1}\left ( T\ \text{Rect}\left ( \frac{\Omega }{W}\right ) \right ) \\ & =e^{-j\frac{W}{2}t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \end{align*}

Hence\[ h_{L}\left ( t\right ) =e^{-j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \] Therefore, the interpolation filter is\begin{align*} h\left ( t\right ) & =h_{R}\left ( t\right ) +h_{L}\left ( t\right ) \\ & =e^{+j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) +e^{-j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \\ & =\frac{WT}{2\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \left ( e^{+j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}+e^{-j\left ( \bar{\Omega }+\frac{W}{2}\right ) t}\right ) \end{align*}

Therefore\[ \fbox{$h\left ( t\right ) =\frac{WT}{\pi }\operatorname{sinc}\left ( \frac{W}{2}t\right ) \cos \left ( \left ( \bar{\Omega }+\frac{W}{2}\right ) t\right ) $}\] Hence, to reconstruct the original signal, we write\begin{align*} g\left ( t\right ) & ={\displaystyle \sum \limits _{n}} g\left ( nT\right ) h\left ( t-nT\right ) \\ & ={\displaystyle \sum \limits _{n}} g\left ( nT\right ) \frac{WT}{\pi }\operatorname{sinc}\left ( \frac{W}{2}\left ( t-nT\right ) \right ) \cos \left ( \left ( \bar{\Omega }+\frac{W}{2}\right ) \left ( t-nT\right ) \right ) \end{align*}

Putting numerical values, \(W=2\pi \left ( 2000\right ) =4000\pi ,\bar{\Omega }=2\pi \left ( 4000\right ) =8000\pi \), \(\ \) and \(T=\frac{1}{4000}\), hence the above becomes\begin{align*} g\left ( t\right ) & ={\displaystyle \sum \limits _{n}} g\left ( nT\right ) \frac{4000\pi \frac{1}{4000}}{\pi }\operatorname{sinc}\left ( \frac{4000\pi }{2}\left ( t-n\frac{1}{4000}\right ) \right ) \cos \left ( \left ( 8000\pi +\frac{4000\pi }{2}\right ) \left ( t-n\frac{1}{4000}\right ) \right ) \\ & ={\displaystyle \sum \limits _{n}} g\left ( nT\right ) \operatorname{sinc}\left ( 2000\pi \left ( t-n\frac{1}{4000}\right ) \right ) \cos \left ( 10000\pi \left ( t-n\frac{1}{4000}\right ) \right ) \end{align*}

To verify this solution, I tested it with a signal which contains 2 harmonics one at \(4\)kHz and the second at \(6khz\), then applied the above interpolation to the samples obtained from the signal using sampling rate of \(t=\frac{1}{4000}\), and I do obtain the original signal back. Here is the code:

pict