Let's say I am given a difference equation describing an LTI system:

$$y[n] = F(y[n-k],x[n]),$$

where $$x[n] = 2\cos\left(\frac{n\pi}2 + \frac\pi3\right). $$

I know how to find its frequency response and magnitude response. However, I cannot find in my textbook how to find its response to an input x[n] = f(n)... I mean, sure, I can start plugging in numbers and hope for pattern, but I feel like there must be a more clever method. Is there?

  • $\begingroup$ What are the input and $F$ explicitly? $\endgroup$ – msm Oct 9 '16 at 13:15
  • $\begingroup$ F = b*x[n] - 0.81*y[n-2] and x (n) = 2*cos (0.5×pi×n + pi/3) .... $\endgroup$ – Avatrin Oct 9 '16 at 13:38
  • $\begingroup$ I added the definition of $x[n]$ to the question, but it still isn't clear exactly what $F$ is. $\endgroup$ – Math1000 Oct 9 '16 at 14:33
  • $\begingroup$ Have you learned Z-transforms already? $\endgroup$ – Rodrigo de Azevedo Oct 9 '16 at 14:39
  • $\begingroup$ Yes, I have learned z-transforms... The reason I did not specify x and F was because I wanted a more general answer. However, $y[n] = bx[n] - 0.81y[n-2]$ where b is any real number. $\endgroup$ – Avatrin Oct 9 '16 at 15:02

With an input $x[n]=z^n$, the output of a system described by ordinary linear difference equations (such as the one you provided) is a scaled version of the input, where the scaling is $H(z)$, in which $H(z)$ is the transfer function. In other words:

$$\bbox[0.5em,#efe,border:0.1em groove navy]{\ x[n]=z^n \Rightarrow y[n]=H(z) z^n\ }\tag{1}$$

In your question the input is $2\cos\left(\frac{n\pi}2 + \frac\pi3\right)$. We need to first convert it to the form $z^n$: $$\begin{align} x[n]&=2\frac{e^{j(\frac{n\pi}2 + \frac\pi3)}+e^{-j(\frac{n\pi}2 + \frac\pi3)}}{2}\\ &=e^{ j\frac\pi3}\left(e^{ j\frac\pi2}\right)^n+e^{ -j\frac\pi3}\left(e^{- j\frac\pi2}\right)^n\\ &=a_1z_1^{n}+a_2z_2^n \end{align}$$ where $z_1=e^{j\frac\pi2}$, $z_2=e^{-j\frac\pi2}$, $a_1=e^{ j\frac\pi3}$ and $a_2=e^{- j\frac\pi3}$.

Using $(1)$, and since the system is linear, the output is: $$\begin{align} y[n]&=a_1H(z_1)z_1^n+a_2H(z_2)z_2^n\\ &=e^{ j\frac\pi3}H(e^{j\frac\pi2})(e^{j\frac\pi2n})+e^{-j\frac\pi3}H(e^{-j\frac\pi2})(e^{-j\frac\pi2n})\tag{2} \end{align}$$

Now calculate $H(z)$ from the difference equation: $$Y(z)=bX(z)-0.81z^{-2}Y(z)\Rightarrow Y(z)(1+0.81z^{-2})=bX(z)$$ $$H(z)=\frac{Y(z)}{X(z)}=\frac{b}{1+0.81z^{-2}}$$ then insert separately $z=z_1=e^{j\frac\pi2}$, and $z=z_2=e^{-j\frac\pi2}$ to find $y[n]$ as in $(2)$


It's important to know that $x[n]=e^{jn\omega_0}$ is an eigenfunction of a discrete-time LTI system:


It's straightforward to derive from $(1)$ the response to an input signal $x[n]=\cos(n\omega_0+\phi)$:


So you only need to compute the expression for the frequency response $H(e^{j\omega})$, and you can use $(2)$ to compute the output corresponding to a sinusoidal input signal.


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.