# Is the book wrong? — How to sketch frequency response obtained from H(z)?

This question is directly related to digital signal processing, so I am asking here.

How to sketch frequency response obtained from $$H(z)$$?

I'm adding an example and its solution below. I did not understand some of the things for question 7.4, part D.

Any help is appreciated!

1. There are three points in graph. How and why the second from left is placed there? What's its purpose?
2. I have no idea how phase graph is created. What is the relation between x and y axis? What do they actually represent?
3. Why the book says "give me function of frequency" but the solution has $$\omega/2\pi$$ in x-axis?

Question 7.4:

An LTI system is described by the difference equation

$$y[n] = \frac{1}{3}(x[n]+x[n-1]+x[n-2])$$

a. Determine the system function $$H(z)$$ for this system.

b. Plot the poles and zeros of $$H(z)$$ in the z-plane.

c. From $$H(z)$$ obtain an expression for $$H(e^{j\hat{\omega}})$$, the frequency response of this system

d. Sketch the frequency response (magnitude and phase) as function of frequency for $$-\pi \le \hat{\omega} \le\pi$$.

e. What is the output if the input is $$x[n]=4+\cos[0.25\pi(n-1)]-3\cos[(2\pi/3)n]$$

Solution: Your 2nd question: The Phase curve is generated by evaluating the angle of the $e^{-j\hat{\omega}}$ phase term, in the last line of the $H(\hat{\omega})$ expression in Part (c) of the Solution, as $\hat{\omega}$ goes from $-\pi$ to +$\pi$. As $\hat{\omega}$ goes from $-\pi$ to +$\pi$, the Solution's $\hat{\omega}/2\pi$ Phase curve freq axis label goes from -0.5 to +0.5.
(Note: as you study the Solution know that the $H(z)$ in Part (c) is not the $H(z)$ in Part (b). The $H(z)$ in Part (c) is the $H(z)$ from the Solution's Part (a).)