Thanks to the previous property, we can express Equation 2.7 in the z-domain as a simple multiplication:
Y(z)=H(z)ãX(z) (2.10)
where H(z), known as transfer function of the filter, is the z-transform of the impulse response. H(z) plays a relevant role in the analysis and design of digital filters. The response to input sinusoids can be
1 0.8 0.6 0.4 0.2
00 p
(a)
Amplitude
p
0
–p
0 p
(b)
Phase
FIGURE 2.6 Modulus (a) and phase (b) diagrams of the frequency response of a moving average filter of order 5.
Note that the frequency plots are depicted up toπ. In fact, taking into account that we are dealing with a sampled signal whose frequency information is up to fs/2, we haveωmax =2πfs/2=πfsorωmax =πif normalized with respect to the sampling rate.
evaluated as follows: assume a complex sinusoid x(n)=ejωnTSas input, the correspondent filter output will be
y(n)=
k=0,∞
h(k)ejωT2(n−k)=e−jωnTs
k=0,∞
h(k)e−jωkTs=x(n)ãH(z)|z=ejωTs (2.11)
Then a sinusoid in input is still the same sinusoid at the output, but multiplied by a complex quantity H(ω). Such complex function defines the response of the filter for each sinusoid ofωpulse in input, and it is known as the frequency response of the filter. It is evaluated in the complex z plane by computing H(z) for z=ejωnTS, namely, on the point locus that describes the unitary circle on the z plane(|ejωnTS| =1).
As a complex function, H(ω)will be defined by its module|H(ω)|and by its phase∠H(ω)functions, as shown in Figure 2.6 for a moving average filter of order 5. The figure indicates that the lower-frequency components will come through the filter almost unaffected, while the higher-frequency components will be drastically reduced. It is usual to express the horizontal axis of frequency response from 0 toπ. This is obtained because only pulse frequencies up toωs/2 are reconstructable (due to the Shannon theorem), and therefore, in the horizontal axis, the value ofωTsis reported which goes from 0 toπ. Furthermore, Figure 2.6b demonstrates that the phase is piecewise linear, and in correspondence with the zeros of
|H(ω)|, there is a change in phase ofπvalue. According to their frequency response, the filters are usually classified as (1) low-pass, (2) high-pass, (3) bandpass, or (4) bandstop filters. Figure 2.7 shows the ideal frequency response for such filters with the proper low- and high-frequency cutoffs.
For a large class of linear, time-invariant systems, H(z)can be expressed in the following general form:
H(z)=
m=0,Mbmz−m 1+
k=1,Nakz−k (2.12)
which describes in the z domain the following difference equation in this discrete time domain:
y(n)= −
k=1,N
aky(n−k)+
m=0,M
bmx(n−m) (2.13)
When at least one of the akcoefficients is different from zero, some output values contribute to the current output. The filter contains some feedback, and it is said to be implemented in a recursive form. On the other hand, when the akvalues are all zero, the filter output is obtained only from the current or previous inputs, and the filter is said to be implemented in a nonrecursive form.
(a) (b)
(d) (c)
1
0
1
vs v 0 vs
vs vS v vs vS v
v
1
0
1
0 H(v)
H(v) H(v)
H(v)
FIGURE 2.7 Ideal frequency-response moduli for low-pass (a), high-pass (b), bandpass (c), and bandstop filters (d).
The transfer function can be expressed in a more useful form by finding the roots of both numerator and denominator:
H(z)= b0zN−M
m=1,M(z−zm)
k=1,N(z−Pk) (2.14)
where zm are the zeroes and pk are the poles. It is worth noting that H(z) presents N −M zeros in correspondence with the origin of the z plane and M zeroes elsewhere (N zeroes totally) and N poles. The pole-zero form of H(z)is of great interest because several properties of the filter are immediately available from the geometry of poles and zeroes in the complex z plane. In fact, it is possible to easily assess stability and by visual inspection to roughly estimate the frequency response without making any calculations.
Stability is verified when all poles lie inside the unitary circle, as can be proved by considering the relationships between the z-transform and the Laplace s-transform and by observing that the left side of the s plane is mapped inside the unitary circle [Jackson, 1986; Oppenheim and Schafer, 1975].
The frequency response can be estimated by noting that(z−zm)|z=ejωnTs is a vector joining the mth zero with the point on the unitary circle identified by the angleωTs. Defining
Bm=(z−zm)|z=ejωTs
Ak=(z−pk)|z=ejωTs
(2.15)
we obtain
|H(ω)| = b0m=1,M|Bm| k=1,N|Ak|
∠H(ω)=
m=1,M
∠Bm−
k=1,N
∠Ak+(N−M)ωTs
(2.16)
Thus the modulus of H(ω)can be evaluated at any frequencyω◦by computing the distances between poles and zeroes and the point on the unitary circle corresponding toω=ω◦, as evidenced in Figure 2.8, where a filter with two pairs of complex poles and three zeroes is considered.
(b) (c)
× ×
× × vTs (a)
Amplitude dB Phase
101
100
10–1
10–2
0 0
0
p p
p
–p
FIGURE 2.8 Poles and zeroes geometry (a) and relative frequency response modulus (b) and phase (c) characteristics.
Moving around the unitary circle a rough estimation of|H(ω)|and∠H(ω)can be obtained. Note the zeroes’ effects atπandπ/2 and modulus rising in proximity of the poles. Phase shifts are clearly evident in part c closer to zeroes and poles.
To obtain the estimate of H(ω), we move around the unitary circle and roughly evaluate the effect of poles and zeroes by keeping in mind a few rules [Challis and Kitney, 1982] (1) when we are close to a zero,
|H(ω)|will approach zero, and a positive phase shift will appear in∠H(ω)as the vector from the zero reverses its angle; (2) when we are close to a pole,|H(ω)|will tend to peak, and a negative phase change is found in∠H(ω)(the closer the pole to unitary circle, the sharper is the peak until it reaches infinite and the filter becomes unstable); and (3) near a closer pole-zero pair, the response modulus will tend to zero or infinity if the zero or the pole is closer, while far from this pair, the modulus can be considered unitary.
As an example, it is possible to compare the modulus and phase diagram of Figure 2.8b,c with the relative geometry of the poles and zeroes of Figure 2.8a.