Presentation is loading. Please wait.

Presentation is loading. Please wait.

MM3FC Mathematical Modeling 3 LECTURE 7 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,

Similar presentations


Presentation on theme: "MM3FC Mathematical Modeling 3 LECTURE 7 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,"— Presentation transcript:

1 MM3FC Mathematical Modeling 3 LECTURE 7 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri, 8am, Rm.4.503 Dr. Charles Unsworth, Department of Engineering Science, Rm. 4.611 Tel : 373-7599 ext. 82461 Email : c.unsworth@auckland.ac.nz

2 This Lecture What are we going to cover & Why ? Connect the z and w-Domains together. ( Allows us to design filters with useful characteristics) Zeros and poles of H(z) of a filter. Nulling filters. (We can use zeros to null out desired frequencies) Bandpass filter. (Allows us to pass desired regions of frequency)

3 The z-Domain & the w-Domain The system function H(z) has the same form as the frequency response of the system H(  ). z-Domain   -Domain Using the substitution (z = e -j  ), there is a clear correspondence between the the z- and the  -domains. (Note : in the text the  ’s should really have ‘ ^ ’ s on.) More importantly, H(e -j  ) = H(  ) … (7.1) … (7.2) System function frequency response

4 If the input to an FIR filter is x[n] = z n, the output will be y[n] = H(z)z n. If z = e -j , then y[n] = H(e -j  ). e -j  Where H(e -j  ) is obviously the same as what we have called the ‘frequency response’ which was previously denoted H(  ). From now on, I shall use H(e -j  ) in place of H(  ) to emphasise the connection between the  -domian and the z-domain. … (7.3)

5 The z-Plane & the Unit Circle The frequency response is periodic with period 2 . Thus, we only need evaluate it over (-  <  <  ). Thus, the values of z = e -j  lie on a circle of radius = 1. As we can see the relationship between the z-domain and the  -domian. z is represented by a point on the circumference of the circle.  is the angle swept out by the radius. 1 * z = e -j   Unit Circle

6 Zeros & Poles of H(z) The system function H(z) of any digital filter can be specified by its poles and zeros. The poles are where H(z) becomes infinite. at z = 0. The zeros are simply the roots of H(z). Poles and zeros give useful insights into a filter's response, and can be used as the basis for digital filter design. Example 1 : Determine the zeros and poles of H(z) = 1 – 2z -1 + 2z -2 – z -3 H(z) is an n th order polynomial. The best way to tackle this is to first mutiply H(z) by z 3 /z 3, obtaining. In this form, we can immediately see the denominator locates the poles of H(z). Namely, H(z) is infinite at z = 0. We say that the term (z 3 ) represents 3 poles at z=0. In this form, we have also put H(z) into +ve powers of z. Num Den

7 Next, we find the zeros (or roots) of the numerator of H(z). By inspection, one of the roots (z 1 ) occurs at z = 1. Thus, (z-1) is a factor. Use long algebraic divison to determine the other. z 2 - z + 1 (z-1) | z 3 – 2z 2 + 2z - 1 -[ z 3 – z 2 ] - z 2 + 2z -[- z 2 + z] z – 1 -[z – 1] 0  H(z) = (z-1)(z 2 – z + 1) Next, use quadratic formula to determine roots of (z 2 – z + 1). A = 1, B = -1, C = 1

8 Next, put the roots into exponent form. Thus, the zeros and poles are : So what does all this mean …… ? |z 2 | =  (1/2) 2 + (  3/2) 2 = 1 arg(z 2 ) = tan -1 ((  3/2)/ (1/2)) =  3 = 60 0 =  /3 z 2 = 1.e i  /3 = e i  /3 z 3 = z 2 * = e -i  /3  3/2 -  3/2 1/2 |z 2 | arg(z 2 ) z2z2 z 3 = z 2 *

9 We display all of this on a ‘Pole-Zero Plot’. (This is just an Argand diagram with a unit circle on and the poles and zeros displayed in the following way). Imag Real X 3 O O O pole zero A pole is denoted by ‘X’. The number of poles in the same location is denoted by ‘3’. (This is called a 3 rd order pole.) When the poles lie in/on the unit circle the filter is ‘stable’. A zero is denoted by ‘O’. What is the significance of this ? The zero’s actually tell us which frequencies the filter ‘blocks’ or ‘nulls’ or ‘cancels’ out. ( i.e where, y[n] = 0 ). Unit Circle z 2 = e +i  /3 z 3 = e -i  /3 = z 2 * z 1 = 1

10 Zero’s in the z-plane can only null out signals of the form x[n] = z 0 n, where the subscript represents that z 0 is a particular complex number. x 1 [n] = (z 1 ) n = 1 x 2 [n] = (z 2 ) n = e i  n/3 x 3 [n] = (z 3 ) n = e -i  n/3 Check this ! Now, the system equation H(z) = 1 – 2z -1 + 2z -2 – z -3 holds the co- efficients of its difference equation. y[n] = x[n] – 2x[n-1] + 2x[n-2] – x[n-3] For x 1, y[n] = 1 – 2 + 2 – 1 = 0. (Thus, no output for y[n] produced) For x 2, y[n] = e i  n/3 – 2e i  (n-1)/3 + 2e i  (n-2)/3 - e i  (n-3)/3 = e i  n/3 ( 1 - 2e -i  /3 + 2e -2i  /3 - e -i  ) = e i  n/3 ( 1 – (1 - i  3) + (-1 - i  3) + 1) = 0 x 3 is the complex conjugate of x 2 and y[n] = 0.

11 Nulling Filters It is possible to design an FIR Filter that will ‘null’ out a particular sinusoidal input. Such capability is often needed to eliminate jamming signals in a radar or communication system. Similarly, a 60Hz nulling filter could be used to eliminate mains interference. Zero’s in the z-plane can only null out signals of the form x[n] = z 0 n. If we want to eliminate a sinusoidal signal we have to remove both the +ve and –ve rotating components of the frequency. x[n] = cos(  n) = ½ exp(i  n) + ½ exp(-i  n) Each complex rotating component can be removed by a 1 st order FIR. And then the filters could be cascaded to form a 2 nd order FIR to remove the sinusoid. … (7.4)

12 Example 2 : Let’s create two 1 st order filters to remove each of the rotating frequencies and then cascade them together to remove the sinusoid. cos(  n) = ½ exp(i  n) + ½ exp(-i  n) Let the 1 st FIR remove : z 1 = exp(i  n) component This signal (z 1 n ) will be nulled with the system function H 1 (z) = 1 – z 1 z -1 This is simply because : H 1 (z 1 ) = 1 – z 1 (z 1 ) -1 = 1 – 1 = 0 Let the 2 nd FIR remove : z 2 = exp(-i  n) component This signal (z 2 n ) will be nulled with the system function H 1 (z) = 1 – z 2 z -1

13 We know the cascade is H(z) = H 1 (z)H 2 (z) H(z) = (1 – z 1 z -1 )(1 – z 2 z -1 ) = 1 – z 2 z -1 – z 1 z -1 + z 1 z 2 z -2 = 1 – (z 1 + z 2 )z -1 + (z 1 z 2 )z -2 = 1 – (exp(i  n) + exp(-i  n))z -1 + (exp(i  n).exp(-i  n))z -2 = 1 – 2cos(  n)z -1 + exp(0).z -2 = 1 – 2cos(  n)z -1 + z -2 Thus, the nulling filter required to remove a sinusoid of cos(  n) is : y[n] = x[n] – 2cos(  n)x[n-1] + x[n-2] Example 3 : Draw the pole-zero plot of the above nulling filter. How many poles exist ? And how does this relate to the order of the filter ? … (7.5)

14 Useful Filters Now we understand the link between the z- and  - domains we can design filters with useful characteristics. We will now look at a useful class of ‘Bandpass filters’ (BPF) which are a close relative of the running-sum filter. The L-Point Running Sum Filter Will use the example of a 11-point running sum to illustrate. The difference equation for an L-point running sum filter is : Its system function is :

15 Now the sum of the first (L) terms of a geometric series can be wriiten as : Thus, the system function for the 11-point running sum becomes : First mutiply by z L /z L The numerator gives the roots of the of the filter. Thus, we have roots at z 11 – 1 = 0  z 11 = 1 We have to use ‘nth Roots of Unity’ to solve this.

16 ‘nth roots of unity’ recap. How many roots has z 11 = 1 ? It has 11 roots. These 11 solutions are called the ’11 roots of unity’ (i.e. of one) Some of these roots will be complex. To solve we consider : Thus, 1 = e 0i or e 2  i or e 4  i or … x1x1 Image Real 1 has modulus of 1 and argument of 0 or argument of 2  or argument of 4  or argument of 6  or ect..

17 If z 11 = 1 Then, z 11 = e 0i, e 2  i, e 4  i, e 6  i, e 8  i, e 10  i, e 12  i, e 14  i, e 16  i, e 18  i, e 20  i, e 22  i, e 24  i … Thus, z = e 0i/11, e 2  i/11, e 4  i/11, e 6  i/11, e 8  i/11, e 10  i/11, e 12  i/11, e 14  i/11, e 16  i/11, e 18  i/11, e 20  i/11, e 22  i/11, e 24  i/11 … Therefore, roots(zeros) exist at : z= e 0i/11, e 2  i/11, e 4  i/11, e 6  i/11, e 8  i/11, e 10  i/11, e 12  i/11, e 14  i/11, e 16  i/11, e 18  i/11, e 20  i/11 System repeats itself Imag Real O O O O O O O O O O O Thus, we have 11 zeros around the unit circle.

18 We have 10 poles at z = 0. (i.e. a 10 th order pole at z=0) And 1 pole at z = 1 that coincides with a zero. When a pole and zero coincides, you don’t get ‘  ’ or ‘0’ but a finite value. Imag Real X 10 O O O O O O O O O O O X The denominator locates the poles of the filter. Imag Real X 10 O O O O O O O O O O = … (7.6)

19 What does this relate to the  -domain ? First we must note that ½ the roots are complex conjugates of each other. z= e 0i/11, e 2  i/11, e 4  i/11, e 6  i/11, e 8  i/11, e 10  i/11, e 12  i/11, e 14  i/11, e 16  i/11, e 18  i/11, e 20  i/11 z= e 0i/11, e 2  i/11, e 4  i/11, e 6  i/11, e 8  i/11, e 10  i/11, e -2  i/11, e -4  i/11, e -6  i/11, e -8  i/11, e -10  i/11 e -6  i/11 Imag Real X 10 O O O O O O O O O O O X e 0i/11 e 2  i/11 e -2  i/11 e 4  i/11 e -4  i/11 e 6  i/11 e 8  i/11 e -8  i/11 e 10  i/11 e -10  i/11 ++ -- Magnitude e 0i/11 e 2  i/11 e -2  i/11 e 4  i/11 e -4  i/11 e 6  i/11 e -6  i/11 e 8  i/11 e -8  i/11 e 10  i/11 e -10  i/11

20 ++ -- Magnitude e 0i/11 e 2  i/11 e -2  i/11 e 4  i/11 e -4  i/11 e 6  i/11 e -6  i/11 e 8  i/11 e -8  i/11 e 10  i/11 e -10  i/11 e -2  i/11 + e -2  i/11 = 2cos(2  /11) Rejected Rejected sinusoids ++ -- Magnitude e 0i/11 e 2  i/11 e -2  i/11 e 4  i/11 e -4  i/11 e 6  i/11 e -6  i/11 e 8  i/11 e -8  i/11 e 10  i/11 e -10  i/11 Pass band Frequencies preserved Side-lobes

21 In general, the ‘system function’ of an L-point running sum filter is a product of its roots : Thus, we can control the ‘frequency’ response of an FIR filter by placing zeros on the unit circle. Also it is easy to create FIR filters and control the location of their passband. The obvious way to move the passband is to use all but one of the roots of unity. (i.e. the zero we want to preserve). Where, the index k 0 denotes the omitted root at z = exp(i2  k 0 /L). The Complex Bandpass Filter … (7.7) … (7.8)

22 Example 4 : Consider the filter k 0 = 2, L = 10 The system function becomes : ++ -- Magnitude e 0i/10 e 2  i/10 e -2  i/10 e 4  i/10 e -4  i/10 e 6  i/10 e -6  i/10 e 8  i/10 e -8  i/10 e 10  i/10 Pass band Frequencies preserved e -6  i/10 Imag Real X 9 O O O O O O O O e 0i/10 e 2  i/10 e -2  i/10 e 6  i/10 e 8  i/10 e -8  i/10 e 10  i/10 O e -4  i/10 e -10  i/10

23 Now if we multiple out the product of the system function. The resulting filter co-efficients will turn out to be complex valued. This is because the coefficients cannot all be grouped as complex- conjugate pairs. We need another strategy to get the filter co-efficients. A Bandpass Filter with Real Filter Co-efficients The stategy can be modified to get real co-efficents by just taking the real part of the of the complex BPF co-efficients. Thus, the k th filter co-efficient is : b k = cos(2  k 0 k/L) for, k=0,1,2,…,(L- 1) Now expanding using Eulers Inverse Formulae. … (7.10)

24 Where, H 1 (z) is a complex bandpass filter centered on  = 2  k 0 /L and H 2 (z) is a complex bandpass filter centered on  = -2  k 0 /L. Thus, for k 0 = 2 and L = 10. ++ -- Magnitude e 0i/10 e 2  i/10 e -2  i/10 e 4  i/10 e -4  i/10 e 6  i/10 e -6  i/10 e 8  i/10 e -8  i/10 e 10  i/11 Pass band Frequencies preserved e -10  i/10 Pass band … (7.10)

25 How is this so ? Multiplying the (z -k ) ‘s in the z-plane by the factors (e ik  ) & (e -ik  ) will result in a rotation of the pole-zero plot by an angle (  ). e -6  i/10 Imag Real X 9 O O O O O O O e 2  i/10 e -2  i/10 e 6  i/10 e 8  i/10 e -8  i/10 e 10  i/10 O e -4  i/10 e -6  i/10 Imag Real X 9 O O O O O O O O e 0i/10 e 2  i/10 e -2  i/10 e 6  i/10 e 8  i/10 e -8  i/10 e 10  i/10 O e -4  i/10 O e 4  i/10 z -k x by e +ik   ++ -- Magnitude e 0i/10 Pass band z -k x by e +ik   ++ -- Magnitude Pass band e 4  i/10 OX OX

26 e 10  i/10 e -6  i/10 Imag Real X 9 O O O O O O O O e 0i/10 e 2  i/10 e -2  i/10 e 6  i/10 e 8  i/10 e -8  i/10 O e 4  i/10 e -6  i/10 Imag Real X 9 O O O O O O O e 2  i/10 e -2  i/10 e 6  i/10 e 8  i/10 e -8  i/10 e 10  i/10 O e -4  i/10 O e 4  i/10 z -k x by e -ik   ++ -- Magnitude e 0i/10 Pass band z -k x by e -ik   -- ++ Magnitude Pass band e -4  i/10 Similarly, OX OX

27 Adding both of these together we get the plot we showed earlier :. However, the pole-zero plot is different from what we expect. We have introduced 2 poles to cancel out the roots at z = e -4  i/10 & e 4  i/10. These have been replaced by a single real zero at z = cos(2  k 0 /L) = 0.309 which is the real part of the missing zeros. How do we gets this additional zero occurring ? ++ -- Magnitude e 4  i/10 e -4  i/10 Pass band e -6  i/11 Imag Real X 9 O O O O O O O O e 0i/10 e 2  i/10 e -2  i/11 e 6  i/10 e 8  i/10 e -8  i/11 e 10  i/10 O OX OX

28 Go back to the equation for L = 10, k 0 = 2. Expand using the geometric series formula for poles and roots : Note**: We have added two poles at (z - e -4  i/10 ) & (z - e 4  i/10 ) so introduce these into the denominator. And expand : Created a new real root = cos(4  /10) = 0.309

29 Now the 10 roots of unity for z 10 = 1 can be placed in the expression. Finally, Phew …… !!! e -6  i/11 Imag Real X 9 O O O O O O O O e 0i/10 e 2  i/10 e -2  i/11 e 6  i/10 e 8  i/10 e -8  i/11 e 10  i/10 O OX OX z = cos(4  /10) = 0.309


Download ppt "MM3FC Mathematical Modeling 3 LECTURE 7 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,"

Similar presentations


Ads by Google