# How to get the phase response of an arbitrary LTI system?

If I have a frequency response (of a discrete-time system) composed of several complex exponentials such as $$H(e^{j\omega}) = A_0 + A_1 e^{-j\omega } + A_2 e^{-j\omega t 2} + A_3 e^{-j\omega 3} + ...$$ How can I determine its phase response? I can't add them up as phasors because they're different frequencies. Here is an example in my textbook: $$H(e^{j\omega}) = 1 + 2e^{-j\omega} + e^{-j \omega 2} = (2 + 2\cos{\omega})e^{-j\omega} \implies \angle H(e^{j\omega}) = -\omega$$ Here, they manipulate the response to make the phase response look obvious but I would like to know if there is a more algorithmic way to get the phase response by looking at the superposition of the exponentials or something like that? I don't find the "tricks" they use to be very intuitive in getting the phase response.

I'm assuming you are trying to get a bode plot which shows the magnitude and phase response you would get if you were to test the the system by slowly sweeping the frequency a constant amplitude sine wave input and measuring the output amplitude and phase at various points.

If this is the case then there is only one frequency $\omega$. Now we know that $e^{j \theta} = \cos(\theta) + i \cdot sin(\theta)$.

You can therefore treat each exponential term as a vector with amplitude and phase and add them as vectors.

Note however, that if you compare the results with a real digital filter you will not get exactly the same result because the digital filter is only taking measurements at certain instants in time (the sampling frequency) and the data is quantised. However providing the sampling frequency is much larger than the frequency of interest it is a reasonable approximation.

For fixed frequency $\omega$, the frequency response $H(e^{j\omega})$ is simply a complex number. So you compute the phase $\phi(\omega)$ just as the argument of this complex number:

$$\phi(\omega)=\arctan\left(\frac{\Im(H(e^{j\omega}))}{\Re(H(e^{j\omega}))} \right)\tag{1}$$

This formula just gives you the idea, you should not implement it like that, because depending on the signs of the real and imaginary parts of $H(e^{j\omega})$ you may need to add or subtract $\pi$ to get the correct result. In many programming languages all these different cases are properly dealt with by the function $\tt{atan2()}$. Have a look at this.

• Yes thanks. For some reason I thought they were different frequencies, but they're the same so they can be summed up vectorially. Mar 7, 2014 at 13:31