z Transform When the transform is identical to DFT (11)
z Transform (12) The sequence x(n) is non-zero within [0,N-1], hence The transform is identical to DFT
Some basic properties of z Transform 1. Basic definition 2. Linearity 3. Delay 4. Convolution
Essential properties of z Transform 5. Multiplication by ‘z -1 ’ 6. Relation between X(z) and X(-z) 7. Relation between X(z) and X(z -1 )
Why z Transform? 1. z transform can be used to calculate DFT. 2. Filter architecture can be deduced directly from the transfer function in the z domain. Specify filter characteristics (LP, HP, BP...) Determine transfer function H(z) Determine filter sturcture Filter structure can be inferred from H(z) Figure 21
y (n) = a k y(n-k) + k=1 M b k x(n-k) k= -N F NFNF (13) Generalised finite order LTI system Making use of the delay property, equation (4) can be rewritten as y (n) = a k z -k y(n) + k=1 M b k z -k x(n) k= -N F NFNF (14)
y (n) = a k z -k y(n) + k=1 M b k z -k x(n) k= -N F NFNF (14) z b -NF z -1 b NF b0b0 ++ z -1 a1a1 aMaM x(n)x(n)y(n)y(n) Figure 22
y (n) = a k z -k y(n) + k=1 M b k z -k x(n) k= -N F NFNF (14) z transform Y (z) = a k z -k Y(z) + k=1 M b k z -k X(z) k= -N F NFNF (15) Note the similarity between the time and z domain
Digital Filter Design Specify filter characteristics (LP, HP, BP...) Determine transfer function H(z) Construct filter sturcture Y (z) = a k z -k Y(z) + k=1 M b k z -k X(z) k= -N F NFNF Rarrange H(z) to the form Figure 21
Example z -1 b1b1 b0b0 + + a1a1 a2a2 x(n)x(n)y(n)y(n) Figure 23
Poles and Zeros of Transfer Function = (16) Poles and zeros are values of ‘z’ which results in H(z) = infinity and zero, respectively H(z) can be divided into 3 groups for N F > 0 :
Poles and Zeros of Transfer Function Gourp 1 N F poles at z =and N F zeros at z = 0 Gourp 2 a zero at z = c k and a pole at z = 0 for each term from k=1 to N P +N F Gourp 3 a zero at z = 0 and a pole at z = d k for each term from k=1 to M
Example The transfer function can be expressed as TermGroupPole Zero z c c 2
Is a filter useful? A filter transfer function H(z) is only useful if : 1. It is stable 2. It is finite
Stability of Transfer Function Given a system with unit-sample response h(n) = [h(0), h(1),....., h(N-1)] with z transform given by H(z). The system is stable if Finite sequence is generally stable as the absolute sum of finite sample values is always finite (17)
Example The system is unstable
Stability of Transfer Function Generalized LTI transfer function The numerator is <for finite N P and N F The denominator can lead to unstability
Stability of Transfer Function Stability of a digital system depends on the pole locations that are contained in after partial fraction decomposition It can be easily shown that
Stability of Transfer Function For a stable system, For finite summation result, |d k | < 1.
Stability of Transfer Function For a stable system, For finite summation result, |d k | < 1. d k are the poles of H’(z)
Stability of Transfer Function For a stable system, For finite summation result, |d k | < 1. d k are the poles of H’(z) |d k | < 1 means that the poles of a stable system must lies within the unit circle in the z plane.
Region of Convergence (ROC) of Transfer Function A transfer function H(z) is only useful if it is finite, i.e.,
Two classes of digital filters y (n) = a k y(n-k) + k=1 M b k x(n-k) k= -N F NFNF (13) The generalised finite order LTI system 1. Finite Impulse Response (FIR) Filter 2. Infinite Impulse Response (IIR) Filter formulates an IIR filter
Two classes of digital filters y (n) = b k x(n-k) k= 0 N-1 (18) When a k = 0 for all values of k, formulates an FIR filter h(n) = [h(0), h(1),....., h(N-1)] = [b 0, b 1, b N-1 ] As N is finite, according to eqn. (17), FIR filter is inherently stable
FIR filters z -1 h(N-1) x(n)x(n) y(n)y(n) Figure 24 h(2)h(2)h(1)h(1)h(0)h(0) (19)
FIR filters Finite Impulse Response (FIR) Filter can guarantee linear phase With linear phase, all input sinsuoidal components are delayed by the same amount. Consider In the frequency domain, Phase delay for frequency = k
Phase Distortion - example Given: According to previous analysis, and (a linear phase X-function) (Same signal as before, only delay added to each sample)
Phase Distortion - example Given:and y(n) is not the same as x 1 (n) (a non-linear phase X-function)
Analogue Transfer Function H(s) Inverse Fourier Transform h(t) Sample Impulse Response h[n] Corresponding Transfer Function H(z) H(z) = H(s)?
h(t)h(t) t Analogue filter: y(t) = x(t) * h(t) Y(s) = X(s)H(s)
Analogue filter: y(t) = x(t) * h(t) Y(s) = X(s)H(s) Given Applying inverse Laplace Transform h(t)h(t) t 1 unit
Digital filter: Sampled and Digitized x(t) and h(t) x(t) -> x(n), h(t) -> h(n) y(n) = x(n) * h(n) Y(z) = X(z)H(z) h(t)h(t) t 1 unit
If h(t) is sampled at unit interval, we have h(t)h(t) t 1 unit h(t) = e -an for t > 0
However, h(t) is sampled at interval of T S instead of the following, h(t)h(t) t 1 unit Does sampling rate affects the above transfer function?
If h(t) is sampled at interval of T S, h(t)h(t) t T S unit 1. h(n) will be replace with h(nT S ) 2. Frequency will be scaled by 1/T S Answer this question by computing the transfer function again based on the new sampling rate
If h(t) is sampled at interval of T S, h(t)h(t) t T S unit 1. h(n) will be replace with h(nT S ) 2. Frequency will be scaled by 1/T S
If h(t) is sampled at interval of T S, h(t)h(t) t T S unit 1. h(n) will be replace with h(nT S ) 2. Frequency will be scaled by 1/T S
If h(t) is sampled at interval of T S, h(t)h(t) t T S unit 1. h(n) will be replace with h(nT S ) 2. Frequency will be scaled by 1/T S The transfer function has similar form as before, may not need to re-compute the transfer function again.
Given (sampling period of 1 unit) If sampling period changes to T S, then
Suppose If the analogue unit response is sampled by a period T S, Represents the analogue transfer function. Is the digital response similar to the analogue response?
Suppose If the analogue unit response is sampled by a period T S, Represents the analogue transfer function. Digital and Analogue responses are equal if the maximum frequency of the signal is restricted to (otherwise the images start to overlap each other) (a single spectrum becomes an infinite string of replicas)
Given
Given a desire response H D ( ), find h D (n) Applying inverse Fourier Transform, we have, (20) Noted that: n is extended to These kind of filter is not available in practice
with n being infinite and assuming Impulse Invariant, the digital transfer function will be identical to the Analogue ones. In practice, the FIR structure in figure 24 cannot be infinite, hence n is restricted by a window function w R (n) (21) (22) circular convolution
Rectangular Window Hanning Window Hamming Window Blackman Window
Analogue Transfer Function H(s) Inverse Fourier Transform h(t) Sample Impulse Response h[n] Apply window function w[n]h[n] Modified Transfer Function H’(z) Assume Impulse Invariant
Consider a low pass responseH(s) |H ( )| cc -c-c 0 -- Without window cc -c-c 0 -- |H ( )| With window Side lobes
1. Side lobes decreases stop band attenuation A cc -c-c 0 -- |H ( )| A WindowA (dB) Rectangular21 Hanning44 Hamming55 Blackman75 2. Window determines the length of the FIR filter
Consider a Low Pass Frequency Response PP 0 |H ( )| SS Desired Pass Band Edge Frequency Stop Band Edge Frequency Transition Width (TW) Actual Pass Band Edge Frequency
Relations between the Window, Filter length and A z -1 h(N-1) x(n)x(n) y(n)y(n) h(2)h(2)h(1)h(1)h(0)h(0) N 75Blackman 55Hamming 44Hanning 21Rectangular A (dB)Window f s is the sampling frequency
|H D ( )| 1 cc -c-c 0 -- Figure 25 An ideal LPF
n-n Figure 26
Due to windowing, the pass band edge frequency will be shifted to higher frequency end. Usually the revised pass band edge is taken to be the middle point of the Transition Region, i.e. h D (n) will be revised as Next select the window that complies with the stop band attenuation A. Determine the length of the filter N from f S and TW
The Prolate Spheroidal Wave Sequence (Slepian 1978) The Prolate sequence is a real sequence of lengh N+1 and unit energy. Aims at mininizing ripple energy 0 Optimal energy concentration at low frequency
Assuming the sequence is casual and of length N+1, i.e., Since the sequence is unit energy, we have Compute the energy contained in the sequence
Define an objective function to denote the pass band energy as Maximizing is equivalent to minimizing the stop band energy i.e., Optimal energy concentration at low frequency
Let is a (N+1)x(N+1) matrix with the (m,n) element equals to
Splitting R( ) into real and imaginary parts as Each entry in We have is real, hence and
Maximization based on Rayleigh’s principle The objective function is maximized if v is the eigenvector corresponding to the maximum eigenvalue of P. This can be found by the “power method” which is an ilterative process starting with an arbitrary value for v 0. Search for v in a vast space!
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Method does not guarantee the best (optimal) solution and depends on the initial choice of v k
Better optimization methods: Simulated Annealing. Binary Genetic Algorithm. Real Coded Genetic Algorithm. Particle Swarm Optimization. Stuck in comfort zone! Drive to higher value, but not the other way round Best position, needs to leave the comfort zone first x
Optimal window does not imply optimal filter. A LPF is optimized if the passband and stopband error are minimum. Consider a linear phase FIR filter. N is even and h(n)=h(N-n) The amplitude response is: and
The stopband energy is The m,n entry of P is E S should be zero, otherwise it will become the “stopband error”.
The stopband error is The error energy at passband = The pass band should be flat from DC onwards as
Which can be rewritten as Where An objective function can now be defined as The minimum value corresponding to the eigenvector of R with the minimum eigenvalue.
However the transfer functions of FIR filters are restricted in certain form (as shown below). IIR filters are more flexible and have a counterpart in analog filters. FIR filters are to design, optimize, and implement. It is also possible to select different window functions to adjust the stop band attenuation.
Eqn. (19) shows that the transfer function of FIR filters are restricted in certain form. IIR filters are more flexible and have a counterpart in analog filters. Time signalFilter Output Analog Transfer Function Digital Transfer Function DigitalFilter Output Figure 27
Stability of filters Assigning poles at s=-a to H(s) and s=a to H(-s) results in a stable system, i.e., General form of Transfer Function (25)
Stability of filters Assigning poles at s=-a to H(s) and s=a to H(-s) results in a stable system, i.e., A pole at s = -p j results in a -20db per decade drop at f = p i A zero at s = -z i results in a +20db per decade rise at f = z j General form of Transfer Function (25)
f db p1p1 z1z1 z2z2 p2p2 Figure 28
Img Re z plane jj s plane z=1 z=-1 TSTS TSTS s=0 The problem is obvious: define on the unit circle is limited, extends to infinity!
fsfs 2 0 fsfs 16 2f s 16 4f s 16 3f s 16 5f s 16 6f s 16 7f s 16 fsfs 0 2f s 16 3f s 16 7f s 16 6f s 16 5f s 16 4f s 16 - Digital Frequency - Analogue Frequency For a digital N point sampling lattice, the maximum frequency it can represent is f s /2 (i.e. 1/2T S or rads/s) The frequency resolution is 2 /N N=16 extends to infinity!
fsfs 2 0 fsfs 16 2f s 16 4f s 16 3f s 16 5f s 16 6f s 16 7f s 16 fsfs 0 2f s 16 3f s 16 7f s 16 6f s 16 5f s 16 4f s 16 - Digital Frequency - Analogue Frequency For a digital N point sampling lattice, the maximum frequency it can represent is f s /2 (i.e. 1/2T S or rads/s) The frequency resolution is 2 /N N=16 fsfs 16 2f s 16 3f s 16 4f s 16 fsfs 2 = /T S extends to infinity!
fsfs 2 0 fsfs 16 2f s 16 4f s 16 3f s 16 5f s 16 6f s 16 7f s 16 fsfs 0 2f s 16 3f s 16 7f s 16 6f s 16 5f s 16 4f s 16 - Digital Frequency - Analogue Frequency For a digital N point sampling lattice, the maximum frequency it can represent is f s /2 (i.e. 1/2T S or rads/s) The frequency resolution is 2 /N N=16 fsfs 16 2f s 16 3f s 16 4f s 16 fsfs 2 9f s 16 10f s 16 ? extends to infinity!