1
$\begingroup$

Hi there I am studying a course in signal processing and systems. I was given an excecise which I am having a great deal of trouble solving. I am allowed to solved using matlab, but for top marks I must also be able to give an account of a analytical solution.

The task:

Given the in signal $x(n)=(0,4)^nu(n)$

And the impulse response $h(n)=(0,8)^ncos(\dfrac{\pi n}{3})$

compare the plots blow and select the correct alternative: enter image description here

Since i needed to give an account of a analytical solution for top marks i decided to try and use z-transformations to solve this. My thinking was to use the fact that the out signal $Y(z)=X(z)H(z)$, and thus transform the insignal and the impulse response do the multiplication and then transform the results back.

$X(z)=\dfrac{1}{1-0,4z^{-1}}$

and

$H(z)=\dfrac{1-0,8cos(\pi/3)z^{-1}}{1-2z^{-1}0,8cos(\pi/3)+(0,8)^2z^{-2}}=\dfrac{1-0,4z^{-1}}{1-0,8z^{-1}(0.8)^2z^{-2}}$

Which gives $Y(z)=\dfrac{1}{1-0,8z^{-1}(0.8)^2z^{-2}}$

This I have no clue how to transform back, so i decided to let Matlab do the heavy lifting

f=cos(pi*n/3)*(0.8)^n
a=ztrans(f)
F=(0.4)^n
b=ztrans(F)
c=a*b
g=iztrans(c)

Which gave me the output:

a =(5z((5z)/4 - 1/2))/(4((25z^2)/16 - (5z)/4 + 1))

b =z/(z - 2/5)

c =(5z^2((5z)/4 - 1/2))/(4(z - 2/5)((25z^2)/16 - (5*z)/4 + 1))

g =((-1)^n3^(1/2)25^(1 - n)(- 10 - 3^(1/2)10i)^(n - 1)4i)/15 - ((-1)^n3^(1/2)25^(1 - n)(- 10 + 3^(1/2)10i)^(n - 1)4i)/15 + (2(-1)^n16^ncos((2pi*n)/3))/20^n

I have worked on this problem for about a week and can't figure it out. If i am supposed to be able to compare a function with th graph and select the correct one the function have to be fairly simple. The answer sheet sasy the correct grach is A. Feels like I overcomplicate this somewhere. Help me, please and thank you.

$\endgroup$
0
$\begingroup$

I'd recommend to work in the time domain. The output $y[n]$ is given by the convolution of $x[n]$ and $h[n]$:

$$\begin{align}y[n]&=\sum_{k=-\infty}^{\infty}x[n-k]h[k]\\&=u[n]\sum_{k=0}^n(0.4)^{n-k}(0.8)^k\cos\left(\frac{k\pi}{3}\right)\\&=u[n](0.4)^n\sum_{k=0}^n2^k\cos\left(\frac{k\pi}{3}\right)\tag{1}\end{align}$$

It's clear that the first sample of the output signal is just the multiplication of $x[0]$ and $h[0]$, i.e., $y[0]=x[0]h[0]=1\cdot 1=1$. These leaves us with options $A$ and $C$. Looking at the second output sample

$$y[1]=x[0]h[1]+x[1]h[0]=h[1]+x[1]=0.8\cos\left(\frac{\pi}{3}\right)+0.4=0.8\tag{2}$$

reveals that it must be option $A$.

A closed-form expression for $y[n]$ can be derived from $(1)$ by splitting the cosine into two complex exponentials, and using the formula for the geometric series.

$\endgroup$
1
  • $\begingroup$ Thanks a bunch! I tried to use convolution but used h(n-k) and got stuck again. You really cleared this up for me, thanks again! $\endgroup$ – Aedrha Jun 15 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.