# Calculating the system output using frequency response

Given an input signal $$x(n)=\cos(6\pi n +\frac{\pi}{6})$$ and system $$y(n)=0.5x(n)-0.1x(n-1)$$. In this case, the coefficients of the difference equation are $a_0=1$, $b_0=0.5$, and $b_1=$. The frequency response to this system is $$H(\omega)= b_0 + b_1e^{-j\omega}= 0.5 - 0.1 \cos(\omega)+0.1 j \sin(\omega)$$

Since the input $x(n)$ is a sinusoid of the form $$x(n)=A \cos(\omega n +\theta_0)$$, we can express the system's output as

$$y(n)=A|H(\omega_0)|\cos\left(\omega_0 n+\theta_0+angle(H(\omega_0))\right)$$

I can see that $A=1$, $\omega_0=6\pi$, and $\theta_0=\frac{\pi}{6}$ in this formula. Hence, I have deduced that

$$|H(\omega_0)|= |0.5 - 0.1 \cos(6\pi)+0.1j \sin(6\pi)| = 0.4$$

Furthermore, since $H(\omega_0) = 0.4$ (a positive real number), I conjecture that $$angle(H(\omega_0))=0$$

Have I made the correct assumptions/conclusions?

• Are you sure that $H(\omega)$ is correct? You should derive it again correctly, try to use $Y(\omega) / X(\omega)$. Oct 8 '12 at 15:21
• @DenizAkyildiz: The frequency response of a difference equation is $\frac{\sum_{m=0}^M b_me^{-j\omega m}}{1 + \sum_{l=0}^N a_le^{-j\omega l}}$? Am I mistaken?
– Paul
Oct 8 '12 at 15:30
• Try to put in this way, $$Y(\omega) = 0.5 X(\omega) - 0.1 e^{- j \omega} X(\omega)$$ Then, $$H(\omega) = \frac{Y(\omega)}{X(\omega)} = 0.5 - 0.1 e^{- j \omega}$$ I don't use such formulas. If I remember correctly, the subscript of sum in the denominator should be like this: $\sum_{n=1}^N a_n \ldots$. Then, you should divide to 1. Oct 8 '12 at 15:33
• Oh... you're absolutely right! My mistake. I'll edit the question to reflect this.
– Paul
Oct 8 '12 at 15:38

Yes, you are correct. The system input is rather strange, though, since $cos(6\pi n + \frac{\pi}{6})$ is equal to $cos(\frac{\pi}{6})$.
• Are you sure, because that makes no sense. First, $n$ is almost always, by convention, used to denote integers. Second, the system response ($y(n) = 0.5x(n)−0.1x(n−1)$) is clearly using $n$ as a vector of time integers. If it really goes from $0$ to $2\pi$ then that makes no sense. Oct 14 '12 at 21:50