8  Fourier analysis of LTI systems

8.1 Exercise 1

A digital filter has the following properties:

  • it is a high-pass filter of order 1
  • the pole is situated at a distance 0.9 from the origin
  • constant signals are completely blocked by the filter

Requirements:

    1. Draw the pole-zero diagram and find the system function \(H(z)\)
    1. Compute the amplitude response and the phase response of the filter
    1. Normalize the filter such that \(| H(\pi) | = 1\)
    1. Find the output signal \(y[n]\) if the input signal is \(x[n] = 4 + 2 \cos(\frac{\pi}{6}n + \frac{\pi}{4}), n \in \mathbb{Z}\)

Solution

a). Pole-zero diagram and system function

Because the filter is high-pass and must block constants (DC), it must have a zero at \(z=1\) (e.g. at \(\omega=0\), in point \(e^{j\omega} = 1\)): \[H(\omega=0)=0 \Rightarrow z_0=1.\]

Order 1 means one pole and one zero. The pole has distance \(0.9\) from origin, so we choose a real pole close to high frequencies, at: \[p=-0.9.\]

Therefore: \[ H(z) = K \frac{z-1}{z+0.9} = K \frac{1-z^{-1}}{1+0.9z^{-1}}. \]

Pole-zero diagram:

  • zero: \(z=1\) (on unit circle, DC rejection)
  • pole: \(z=-0.9\) (inside unit circle, stable)
Code
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(4.2, 4.2))
t = np.linspace(0, 2*np.pi, 500)
ax.plot(np.cos(t), np.sin(t), 'k--', lw=1, label='unit circle')
ax.axhline(0, color='0.75', lw=0.8)
ax.axvline(0, color='0.75', lw=0.8)
ax.plot(1, 0, 'ob', ms=8, mfc='none', mew=2, label='zero z=1')
ax.plot(-0.9, 0, 'xr', ms=9, mew=2, label='pole p=-0.9')
ax.set_aspect('equal', adjustable='box')
ax.set_xlim(-1.25, 1.25)
ax.set_ylim(-1.25, 1.25)
ax.set_xlabel(r'$\Re\{z\}$')
ax.set_ylabel(r'$\Im\{z\}$')
ax.set_title('Pole-zero diagram')
ax.legend(loc='upper left', fontsize=8)
plt.tight_layout()

b). Amplitude and phase response

Evaluate on the unit circle: \[ H(\omega)=H(e^{j\omega})=K\frac{1-e^{-j\omega}}{1+0.9e^{-j\omega}}. \]

Amplitude: \[ |H(\omega)|=|K|\frac{|1-e^{-j\omega}|}{|1+0.9e^{-j\omega}|} =|K|\frac{\sqrt{(1-\cos\omega)^2+\sin^2\omega}}{\sqrt{(1+0.9\cos\omega)^2+(0.9\sin\omega)^2}} \]

Phase, assuming \(K>0\) so that the phase of \(K\) is zero: \[\begin{aligned} \angle H(\omega)&=\angle(1-e^{-j\omega})-\angle(1+0.9e^{-j\omega}) \\ &= \arctan\frac{\sin(\omega)}{1-\cos(\omega)} - \arctan\frac{-0.9\sin(\omega)}{1+0.9(\cos\omega)}. \end{aligned}\]

c). Normalization with \(|H(\pi)|=1\)

“Normalization” means, in this context, finding the value of \(K\).

At \(\omega=\pi\) we have: \[ |H(\pi)|=|K|\frac{|1-(-1)|}{|1+0.9(-1)|} =|K|\frac{2}{0.1}=1 \] so: \[ K=\frac{1}{20}=0.05 \] (assuming \(K\) is positive).

Therefore, the system function of the filter is: \[ H(z)=0.05\frac{1-z^{-1}}{1+0.9z^{-1}}. \]

d). Output for \(x[n]=4 + 2\cos(\frac{\pi}{6}n+\frac{\pi}{4}), n \in \mathbb{Z}\)

This is the permanent regime relation, as shown by the part \(n \in \mathbb{Z}\) (which means the signal started a long time ago, the transient regime has vanished, so we can apply the permanent regime rules).

Note

For an LTI system in permanent regime, any cosine input at \(\omega_0\) remains a cosine at the same frequency, just multiplied with \(|H(\omega_0)|\) and with the additional phase \(\angle H(\omega_0)\).

Similarly, any DC component, if it exists, gets multiplied with \(|H(0)|\).

Therefore, in our case, if the input is:

\[ x[n]=4 + 2\cos(\frac{\pi}{6}n+\frac{\pi}{4}) \]

then the output is:

\[ y[n]=4 \cdot |H(0)| + 2 \cdot |H(\frac{\pi}{6})| \cdot \cos(\frac{\pi}{6}n+\frac{\pi}{4} + \angle H(\frac{\pi}{6})) \]

Using the normalized filter: \[ H(0)=0.05\frac{1-1}{1+0.9}=0 \quad\Rightarrow\quad 4\cdot|H(0)|=0, \] and \[ H\!\left(\frac{\pi}{6}\right)\approx 0.00020 + j\,0.01410, \] so: \[ \left|H\!\left(\frac{\pi}{6}\right)\right|\approx 0.01410,\quad \angle H\!\left(\frac{\pi}{6}\right)\approx 1.55669\;\text{rad}. \]

Hence (the DC component is completely removed by the high-pass filter): \[ y[n]\approx 0 + 0.02820\cos\!\left(\frac{\pi}{6}n+2.34209\right) = 0.02820\cos\!\left(\frac{\pi}{6}n+2.34209\right). \]

8.2 Exercise 2

Which of the following filters has a linear-phase? Justify the answer.

    1. \(H(z) = 7 + 3 z^{-1} + z^{-2} + 7z^{-3} + 3 z^{-4} + z^{-5}\)
    1. \(H(z) = \frac{1 + 2 z^{-1} + z^{-2}}{1 - 2 z^{-1} + z^{-2}}\)
    1. \(H(z) = 1 + 2z^{-1} + z^{-2}\)
    1. \(H(z) = 1 - 2z^{-1} + z^{-2}\)
    1. \(H(z) = 1 - 2z^{-1} - 2z^{-2} + z^{-3}\)
    1. \(H(z) = 1 + 2z^{-1} + 7z^{-2}- 2z^{-2} - z^{-3}\)
    1. \(H(z) = 1 - z^{-1}\)
    1. \(H(z) = 1 - z^{-2}\)

Solution

Note

For a system to be linear-phase, it must be a FIR system, and the filter coefficients must have one of the two types of symmetry:

  • symmetry:

    \[h[n] = h[N-n]\]

    (first = last, second = second to last, etc.)

  • or antisymmetry:

    \[h[n] = - h[N-n]\] (first = - last, second = - second to last, etc)

a). \(H(z)=7 + 3 z^{-1} + z^{-2} + 7z^{-3} + 3 z^{-4} + z^{-5}\)

  • FIR, coefficients: \([7,3,1,7,3,1]\)
  • not symmetric, not antisymmetric \(\Rightarrow\) not linear phase

b). \(H(z)=\frac{1 + 2 z^{-1} + z^{-2}}{1 - 2 z^{-1} + z^{-2}}\)

  • IIR (non-trivial denominator) \(\Rightarrow\) not linear phase

c). \(H(z)=1 + 2z^{-1} + z^{-2}\)

  • FIR, coefficients \([1,2,1]\), symmetric \(\Rightarrow\) linear phase

d). \(H(z)=1 - 2z^{-1} + z^{-2}\)

  • FIR, coefficients \([1,-2,1]\), symmetric \(\Rightarrow\) linear phase

e). \(H(z)=1 - 2z^{-1} - 2z^{-2} + z^{-3}\)

  • FIR, coefficients \([1,-2,-2,1]\), symmetric \(\Rightarrow\) linear phase

f). \(H(z)=1 + 2z^{-1} + 7z^{-2}- 2z^{-5} - z^{-6}\)

  • FIR, coefficients \([1,2,7,0,0,-2,-1]\)
  • neither symmetric nor antisymmetric \(\Rightarrow\) not linear phase

g). \(H(z)=1-z^{-1}\)

  • FIR, coefficients \([1,-1]\), antisymmetric \(\Rightarrow\) linear phase

h). \(H(z)=1-z^{-2}\)

  • FIR, coefficients \([1,0,-1]\), antisymmetric \(\Rightarrow\) linear phase

8.3 Exercise 3

Draw the implementation structure of one of the following filter in Direct-Form I / Direct-Form II / Direct-Form I Transposed / Direct-Form II Transposed

\[H(z) = \frac{7 - 3 z^{-1} + z^{-2} }{1 + 0.5 z^{-1} - 0.75 z^{-2} + 0.4 z^{-3} }\]

Solution

TODO