Tik-61.146 Digital Signal Processing and Filtering (DISKO)
Answers to Exercise 3. Mon, 2.10.2000: 17-20
Zero-pole diagram. Transfer function. Inverse $ z$-transform. Stability considerations. Minimum and maximum-phase transfer functions.

1.
Sketch the magnitude (amplitude) response for each filter.

Start from the point (1,0), that is, $ \omega=0 \Rightarrow e^{j0}$. Let $ \omega $ grow from 0 to $ \pi$ on the unit circle $ e^{j\omega}$. $ \vert H(e^{j\omega})\vert$ is an even function (you can test symmetry when $ \omega $ goes from 0 to $ -\pi$). The magnitude response can be calculated or estimated roughly from

$\displaystyle \vert H(e^{j\omega})\vert = \frac{p_0 \prod_{k=1}^{M} B_k}{d_0 \prod_{k=1}^{N} A_k} $

where $ B_k$ are lengths of ``zero vectors'' and $ A_k$ lengths of ``pole vectors''. From the equation it is seen that zeros near (or on) the circle decrease the magnitude, poles (inside the unit circle) increase it. All poles inside the unit circle means that filter is causal and stable.

Figure 1: Zero vectors $ B_k$ and pole vectors $ A_k$. $ \omega $ runs $ 0..\pi $
\begin{figure}\begin{center}
\epsfig{width=0.25\textwidth, file=vahvistus.eps} \end{center}\end{figure}

The magnitude is often expressed in desibels (dB). Matlab uses in its plots desibels of $ \vert H(e^{j\omega})\vert^2$:

$\displaystyle 10 log_{10}(\vert H(e^{j\omega})\vert^2) = 20 log_{10}(\vert H(e^{j\omega})\vert)$

Three filters:

Figure 2: Pole-zero-diagram and frequency response for Problem 1a.
\begin{figure}\begin{center}
\epsfig{width=0.32\textwidth, file=fig2a_zp.eps} \epsfig{width=0.32\textwidth, file=fig2a_fr.eps} \end{center}\end{figure}

Figure 3: Pole-zero-diagram and frequency response for Problem 1b.
\begin{figure}\begin{center}
\epsfig{width=0.32\textwidth, file=fig2b_zp.eps} \epsfig{width=0.32\textwidth, file=fig2b_fr.eps} \end{center}\end{figure}

Figure 4: Pole-zero-diagram and frequency response for Problem 1c.
\begin{figure}\begin{center}
\epsfig{width=0.32\textwidth, file=fig2c_zp.eps} \epsfig{width=0.32\textwidth, file=fig2c_fr.eps} \end{center}\end{figure}

2.
Consider the transfer function

$\displaystyle H(z) = \frac{1 - 1.6z^{-1} + z^{-2}}{1 - 1.2z^{-1} + 0.52z^{-2}} $

Let us use Matlab to aid in solving this exercise. Compare these with the problem 8 in exercise round 2.

a)
Draw the block diagram.

\begin{figure}\begin{center}
\epsfig{width=0.5\textwidth, file=bonus2_a.eps} \end{center}\end{figure}

b)
Calculate zeros and poles of $ H(z)$. Sketch the pole-zero-diagram. Is the system stable and/or causal?

Using Matlab:
num = [1 -1.6 1]; den = [1 -1.2 0.52];
[z,p,k] = tf2zp(num,den);
Zeros are at $ 0.8 \pm 0.6j$ and poles at $ 0.6 \pm 0.4j$.
zplane(num,den) plots pole-zero-diagram, see the figure 5.

c)
Calculate frequency response $ H(e^{j\omega})$.

$\displaystyle \vert H(e^{j\omega})\vert^2 = H(e^{j\omega}) H(e^{-j\omega}) $

Calculating magnitude reponse using Matlab
conv([1 -1.6 1],[1 -1.6 1]) for numerator and
conv([1 -1.2 0.52],[0.52 -1.2 1]) for denumerator

$\displaystyle = \frac{e^{2j\omega} -3.2 e^{j\omega} +4.56 -3.2 e^{-j\omega} + e...
...2j\omega} -1.824 e^{j\omega} +2.7104 -1.824 e^{-j\omega} + 0.52 e^{-2j\omega}} $

$\displaystyle \Rightarrow \vert H(e^{j\omega})\vert = \sqrt{\frac{2cos(2\omega) - 6.4cos(\omega) + 4.56}{1.04cos(2\omega) -3.648 cos(\omega) + 2.7104}} $

Using Matlab
cos1omega = cos([0:pi/256:pi]);
cos2omega = cos(2*[0:pi/256:pi]);
numvalues = sqrt(2*cos2omega - 6.4*cos1omega +4.56);
denvalues = sqrt(1.04*cos2omega - 3.648*cos1omega +2.7104);
values = numvalues./denvalues;
figure, subplot(211), plot([0:pi/256:pi], values); grid;
subplot(212), plot([0:pi/256:pi], 20*log10(values)); grid; ylabel('dB');

d)

Magnitude $ \vert H(e^{j\omega})\vert$ and phase reponse $ \theta(\omega) = arg\{H(e^{j\omega})\}$ directly using Signal Processing Toolbox of Matlab freqz(num,den).
See the Figure 5.


Figure 5: Pole-zero diagram and frequency response.
\begin{figure}\begin{center}
\epsfig{width=0.4\textwidth, file=bonus2_b.eps} \epsfig{width=0.4\textwidth, file=bonus2_c.eps} \end{center} \end{figure}

e)
Derive impulse response $ h[n]$

Using Matlab: [h,t]=impz(num,den);
stem(t,h);
See the Figure 6.

Figure 6: Impulse response $ h[n]$.
\begin{figure}\begin{center}
\epsfig{width=0.5\textwidth, file=bonus2_e.eps} \end{center} \end{figure}

3.

Let us begin by reviewing some properties we need in this exercise:

-
The filter is causal $ \Leftrightarrow$ $ \infty$ belongs to the region of convergence.
-
The filter is stable $ \Leftrightarrow$ $ H(z)$ converges on the unit circle1.
-
The region of convergence on $ z$-plane must not contain any poles; it may be a ring between two poles, the disc limited by the closest pole to origin or the plane outside the most distant pole from origin.
-
It is easiest to do the the inverse $ z$-transform (here) by calculating first the fractional expansion of the $ H(z)$ and then inverting each part of it individually using the sum of a geometric series.
-
The sum of a geometric series is

$\displaystyle \sum_{k=0}^{\infty}q^k=\frac{1}{1-q}$    , |q|<1 (1)

-
The $ z$-transform is

$\displaystyle \sum_{k=-\infty}^{\infty}h(k)z^{-k}$ (2)

First we have to solve the poles and zeros:

$\displaystyle H(z)=\frac{1-z^{-1}}{1-2z^{-1}+0.75z^{-2}}=\frac{z(z-1)}{z^2-2z+0.75}$   $\displaystyle \mbox{\hspace{2mm},\hspace{2mm}\vert$\cdot z^2$}$$\displaystyle $

Poles:

$\displaystyle z^2-2z+0.75=0 \Leftrightarrow z=\frac{2\pm\sqrt{4-4\cdot0.75}}{2}\Leftrightarrow z_1=0.5, z_2=1.5$

Zeros:

$\displaystyle z(z-1)=0 \Leftrightarrow z_1=0, z_2=1$

Now we may answer to the questions about stability and causality:

a)
If we require causality, the region of convergence has to include $ z=\infty$ Thus, the region of convergence has to be ''outside'' the pole $ z=1.5$, that is $ \vert z\vert>1.5$.
b)
If we require stability, the unit circle has to be on the region of convergence. Thus the region is a ring between the poles: $ 0.5<\vert z\vert<1.5$

Note, that in this case we can't have a filter that is both causal and stable.

Figure 7: Left subfigure: causal filter, right subfigure: stable filter. The region of convergence is gray.
\begin{figure}\begin{center}
\epsfig{file=harj3_2.eps, width=.8\textwidth}\end{center}\end{figure}

When we calculate the impulse response $ h[n]$ we have to do an inverse $ z$-transformation for the transfer function $ H(z)$. To do this we express the $ H(z)$ as a partial fraction expansion as then we may apply the formula of the sum of a geometric series (1).

Using the poles and zeros we may write the transfer function as follows:

$\displaystyle H(z)=\frac{z(z-1)}{(z-0.5)(z-1.5)}
$

In a partial fraction expansion the degree of the nominator polynomial has to be smaller than the degree of the denominator polynomial. To achieve this, we by divide both by $ z^2$ and do the expansion in reference to $ z^{-1}$ ( $ =\frac{1}{z}$):

\begin{displaymath}
\begin{array}{ll}
\Leftrightarrow & \displaystyle H(z)=\frac...
...ystyle 1-z^{-1}\equiv A(1-1.5z^{-1})+B(1-0.5z^{-1})
\end{array}\end{displaymath}

We solve $ A$ and $ B$ by letting $ z\rightarrow0.5$ and $ z\rightarrow1.5$

\begin{displaymath}
\begin{array}{ll}
z\rightarrow0.5: & 1-0.5^{-1} = A(1-1.5\cd...
...ot1.5^{-1}) \\  [8mm]
\Rightarrow & B=0.5 \\  [8mm]
\end{array}\end{displaymath}

Now we may write the expansion

$\displaystyle H(z)=\frac{0.5}{1-0.5z^{-1}}+\frac{0.5}{1-1.5z^{-1}}
$

a)
Causal filter $ \Rightarrow$ we know that $ \vert z\vert>1.5$. We notice that both fractions in

$\displaystyle H(z)=\frac{0.5}{1-0.5z^{-1}}+\frac{0.5}{1-1.5z^{-1}}
$

represent a sum of a geometric series, as $ \vert.5z^{-1}\vert<1$ and $ \vert 1.5z^{-1}\vert<1$ as required We conclude:

$\displaystyle h[n]=Z^{-1}\{H(z)\}=0.5\cdot0.5^n\mu[n]+0.5\cdot1.5^n\mu[n]$

b)
Stable filter $ \Rightarrow$ we know that $ 0.5<\vert z\vert<1.5$. We note that $ \sum_{n=0}^{\infty}1.5^nz^{-n}$ does not converge as $ \vert\frac{1.5}{z}\vert\geq1$. We have to convert the expression to higher terms in order to get the denominator to suitable form:

\begin{displaymath}
\begin{array}{ll}
& \displaystyle 0.5\cdot\frac{1}{1-1.5z^{...
...nfty}\left(\frac{2}{3}\right)^{-m-1}\mu[-m-1]z^{-m}
\end{array}\end{displaymath}

Thus, the inverse transform is

$\displaystyle -\frac{1}{3}\left(\frac{2}{3}\right)^{-n-1}\mu[-n-1]
$

and finally

$\displaystyle h[n]=0.5\cdot0.5^n\mu[n]-\frac{1}{3}\left(\frac{2}{3}\right)^{-n-1}\mu[-n-1]
$

4.
Consider the filter whose pole-zero-diagram is shown in figure 8.

Figure 8: Right-most filter of the problem 1.
\begin{figure}\begin{center}
\epsfig{width=0.5\textwidth, file=fig2c_zp.eps} \end{center} \end{figure}

a)
Derive the transfer function

$\displaystyle H(z) = \frac{\prod_{k=1}^{M} (z-\xi_k)}{\prod_{k=1}^{N} (z-\lambda_k)} $

where zeros $ \xi_k = \pm e^{\pm j\pi/4}$ and poles $ \lambda_k = \pm \sqrt[4]{0.5}$ and $ \pm \sqrt[4]{0.5}j$.

$\displaystyle = \frac{\left((z-e^{j\pi/4})(z+e^{j\pi/4})\right)\left((z+e^{-j\p...
....5})(z+\sqrt[4]{0.5})\right)\left((z-\sqrt[4]{0.5}j)(z+\sqrt[4]{0.5}j)\right)} $

$\displaystyle = \frac{z^4 + 1}{z^4 - 0.5} = \frac{1+z^{-4}}{1-0.5z^{-4}} $

b)
See more about comb filters in Mitra's book 3.4.6.

c)
Define a constant K

We want that the maximum magnitude is 1. From the magnitude response (figure 4) we see that $ \vert H(e^{j\omega})\vert$ is in its maximum, when $ \omega = k \frac{\pi}2$, for example $ \omega = 0$.

$\displaystyle \vert H_2(e^{j\omega})\vert = K \vert H(e^{j\omega})\vert = 1 $

$\displaystyle \vert H_2(e^{j\omega})\vert = K \frac{\vert 1+e^{-4j\omega}\vert}{\vert 1-0.5e^{-4j\omega}\vert}, \omega = 0 $

$\displaystyle = K \frac{1+1}{1-0.5} = 1 $

$\displaystyle \Rightarrow K = \frac14. $

Filters are often normalized to unity for seeing better their properties instead of maximum magnitude.

d)
Design such a filter structure that no additional multiplier is needed for the constant K.

In a common case scaling factor is $ K = \frac{1-a}2$, now $ a = 0.5$. Comb filter realization without the scaling factor K is shown in figure [*].

\begin{figure}\begin{center}
\epsfig{width=0.5\textwidth, file=kampa1.eps} \end{center}\end{figure}

The part $ (1-a)$ of the coefficient can be implemented as follows:

\begin{figure}\begin{center}
\epsfig{width=0.3\textwidth, file=kampa2.eps} \end{center}\end{figure}

Division by two can be done using a bit shift. Shift operation (one bit to the right) is denoted here by symbol:

\begin{figure}\begin{center}
\epsfig{width=0.3\textwidth, file=kampa3.eps} \end{center}\end{figure}

When we add the coefficient $ K = \frac{1-a}2$ to the realization, we can combine the multiplications by $ a$ into one:

\begin{figure}\begin{center}
\epsfig{width=0.8\textwidth, file=kampa4.eps} \end{center}\end{figure}

5.
a)
A discrete-time system is bounded-input,bounded-output (BIBO) stable if and only if, for every bounded input , the output is also bounded. This implies that, if the response to $ x[n]$ is the sequence $ y[n]$ and if

$\displaystyle \vert x[n]\vert<B_x,\ \forall n,$

then

$\displaystyle \vert y[n]\vert<B_y,\ \forall n,$

where $ B_x$ and $ B_y$ are finite constants.

b)
An LTI system is BIBO stable if and only if its impulse response sequence is absolutely summable, i.e.,

$\displaystyle \mathcal{S}=\sum^\infty_{n=-\infty}\vert h[n]\vert<\infty.$

c)
A causal LTI system is stable if all its poles are inside the unit circle.

d)
A FIR filter is always BIBO stable, but the stability of an IIR filter must be analyzed, either by the location of its poles, using the stability triangle or for example using the procedure described in Mitra's book in chapter 4.8.2

e)
Let the denominator $ D(z)$ of the second order transfer function

$\displaystyle H(z)=\frac{N(z)}{D(z)}$

be

$\displaystyle D(z)=1+d_1z^{-1}+d_2z^{-2}.$

In terms of of its poles, $ D(z)$ can be expressed as

$\displaystyle D(z)=(1-\lambda_1z^{-1})(1-\lambda_2z^{-1})=1-(\lambda_1+\lambda_2)z^{-1}+\lambda_1\lambda_2z^{-2}$

From these we obtain

$\displaystyle d_1=-(\lambda_1+\lambda_2),\ d_2=\lambda_1\lambda_2.$

1)
The condition for the $ d_2$. For the stability of the transfer function, its poles must be inside the unit circle, i.e.,

$\displaystyle \vert\lambda_1\vert<1,\ \vert\lambda_2\vert<1.$

Since the coefficient $ d_2$ is given by the product of the poles, we must have

$\displaystyle \vert d_2\vert<1,$

which is the condition for the second coefficient and holds for both complex and real poles.

2)
The condition for the $ d_1$. The roots of the polynomial $ D(z)$ are

$\displaystyle \lambda_1,\lambda_2=-\frac{d_1\pm\sqrt{d_1^2-4d_2}}{2}.$

Now the poles can be either complex or real.

i)
Complex poles, that is $ d_1^2<4d_2$, which gives the condition for both $ d_1$ and $ d_2$.

Then we check the condition for the second coefficient $ \vert d_2\vert<1$. Now

$\displaystyle \lambda_{1,2}=-\frac{d_1}{2}\pm \frac{j}{2}\sqrt{4d_2-d_1^2}$

and because the poles are complex, $ \lambda_1=\lambda_2^*.$ We obtain

$\displaystyle \vert d_2\vert=\vert\lambda_1\lambda_2\vert=\vert\lambda_1\lambda_1^*\vert=\vert\lambda_1\vert^2=$

$\displaystyle =\frac{1}{4}(d_1^2+4d_2-d_1^2)=d_2<1.$

Consequently, if $ d_1^2-4d_2<0$ (complexity) and $ d_2<1$, then the poles are inside the unit circle.

ii)
Real poles. In this case we get $ -1<\lambda_i<1, \ i=1,2.$ Since $ \vert\lambda_i\vert<1$, it follows then

$\displaystyle \vert d_1\vert=\vert\lambda_1+\lambda_2\vert\leq\vert\lambda_1\vert+\vert\lambda_2\vert<2.$

Now , $ -1<\frac{-d_1\pm\sqrt{d_1^2-4d_2}}{2}<1.$ We analyze the above inequality piecewise, first the left hand side:

$\displaystyle -2+d_1<\pm\sqrt{d_1^2-4d_2}$

.
The inequality on left hand side is always satisfied with the plus sign, because $ \vert d_1\vert<2$. With the minus sign in front of the square root

$\displaystyle d_1-2<-\sqrt{d_1^2-4d_2}.$

The both sides of the above inequality are negative, hence it can be multiplied by $ -1$ and squared after that, which gives

$\displaystyle d_1^2-4d_1+4>d_1^2-4d_2 \Leftrightarrow$

$\displaystyle d_1<1+d_2.$

Then the right hand side:

$\displaystyle \pm\sqrt{d_1^2-4d_2}<2+d_1$

.
The inequality on the right hand side is always satisfied with the minus sign, because $ \vert d_1\vert<2.$ With the plus sign in front of the square root

$\displaystyle \sqrt{d_1^2-4d_2}<2+d_1 \Leftrightarrow$

$\displaystyle d_1^2-4d_2<4+4d_1+d_1^2 \Leftrightarrow$

$\displaystyle -d_1<1+d_2.$

Combining conditions for $ d_1$ above, we get

$\displaystyle \vert d_1\vert<1+d_2.$

Note that the conditions in the complex case are stronger than the conditions in the real case and are therefore included in the conditions of the real case, see figure 9.

Stability triangle is the triangle the derived conditions form in the $ (d_1,d_2)$-plane. In the figure 9 is a visualization of the stability triangle.

Figure 9: The stable area is inside the triangle, in the area above the parabel are complex poles and in the area below it are real poles.
\begin{figure}\centerline{
\epsfig{file=kolmio.eps, width=7cm}}\end{figure}

f)
Now $ d_1=2.1843$ and $ d_2=0.81.$ Now $ d_2=0.81<1$, but $ \vert d_1\vert=2.1843>1+d_2=1.81$, the transfer function is not stable.


6.
Different kinds of transfer functions
a)
Transfer functions can be classified according to
i)
the finiteness of their impulse response: FIR has a finite impulse response and IIR has infinite impulse response
ii)
the form of magnitude response: highpass, lowpass, allpass, comb, multipass, bandstop, bandpass etc.
iii)
the form of their phase response: zero-phase, linear-phase, non-linear-phase, minimum-phase, maximum-phase etc.

b)
A transfer function is minimum-phase if its all zeros are inside the unit circle and its stable if all its poles are inside unit cirle. We use the stability triangle for both checks, that is for both the numerator and the denominator. Note that they has to be expressed in the form $ D(z)=1+d_1z^{-1}+d_2z^{-2}$.
i)
Minimum-phase. Now the numerator is $ D(z)=1-z^{-1}-6z^{-2}$, from which we obtain

$\displaystyle \vert d_2\vert=6>1$

and conclude that the transfer function is not minimum-phase.
ii)
Stability. The denominator is now $ D(z)=1+0.25z^{-1}-0.125z^{-2}$ from which we obtain $ \vert d_2\vert=0.25\vert<1 \land \vert d_1\vert=0.125<1+d_2=1.25,$ and conclude that the transfer function is stable.

c)
It is always possible to design a linear-phase FIR. In a FIR filter there is are never poles and if it has a linear phase response, its impulse response has to be symmetric in one of the following ways:
  • symmetric, odd length (Type I)
  • symmetric, even length (Type II)
  • antisymmetric, odd length (Type III)
  • antisymmetric, even length (Type IV)

This results that the zeros must have the following symmetry:

$\displaystyle z=re^{\pm j\omega},\ z=\frac{1}{r}e^{\pm j\omega}$

and also Type II has to have a zero at $ z=-1$, Type III has to have zeros at $ z=\pm1$ and Type IV has to have a zero at $ z=1.$
The answers:
i)
-
ii)
linear-phase
iii)
-
iv)
maximum-phase

d)
In the real coefficient allpass transfer function zeros and poles exhibit mirror-image symmetry, that is if $ z=re^{j\omega}$ is a pole,then there exists zero $ z=\frac{1}{r}e^{-j\omega}$. An example of a possible allpass filter is shown in the figure 10.

Figure 10: A mirror-image symmetry of the poles and the zeros in a allpass filter.
\begin{figure}\centerline{
\epsfig{file=nollakuva2.eps, width=14cm}}\end{figure}



diskodsp@cis.hut.fi