Presentation is loading. Please wait.

Presentation is loading. Please wait.

MM3FC Mathematical Modeling 3 LECTURE 6 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 6 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 6 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 ? The Z-Transform. (Makes convolution easy) Cascading systems with the z-transform. (simplifies the whole process)

3 The Z-Transform We will now introduce the z-transform for FIR filters and finite length sequences in general. We will use the FIR case to introduce the important concept of ‘domains of representation’. We will learn that the z-transform brings polynomials and rational functions into the analysis of discrete time systems. We will show that convolution is equivalent to polynomial multiplication and that common algebraic operations, such as multiplying, dividing and factoring polynomials can be interpreted as combining or decomposing LTI systems.

4 Definition of the Z-Transform A finite length signal x[n] can be represented as : And the conventional z-transform of such a signal is given by : Where, z represents any complex number. All we are doing is ‘transforming’ the data x[n] into another representation X[z] to make the system easier to solve. We say we are performing the ‘z-transform of x[n]’. … (5.1)

5 It is instructive to note, though, that X[z] can be re-written as : This emphasizes that the variable (z -1 ) is a polynomial of degree k=N. There is nothing complicated about performing a transform. All we do to obtain X(z) is to construct a polynomial whose coefficients are the values of the sequence x[n] Example 1 : Let’s determine the z-transform of our finite-sequence. nn 5 x[n]002464200 The z-transform is : X (z) = 2 + 4z -1 + 6z -2 + 4z -3 + 2z -4 … (5.2)

6 Example 2 : Determine the sequence x[n] from the z-transform X(z). X(z) = 1 –2z -1 + 3z -3 – z -5 nn 5 x[n] You have just performed what is known as the ‘Inverse z-transform’. Similarly, we can recover x[n] from X(z) by extracting the co-efficient values of X(z) and placing them in their corresponding k th position in the sequence x[n].

7 Domains In general, a ‘z-transform pair’ is a sequence and it’s corresponding z- transform. n – Domain (or Time-Domain)  z – Domain Notice how (n) is the independent variable of the sequence x[n]. Here, we say the signal exists in the ‘n-Domain’. Since, (n) is often an index that counts time, we also say this is the ‘time-Domain’ of the signal. Similarly, (z) is the independent variable of the z-transform X(z). Thus, we the signal exists in the ‘z-Domain’. During a ‘z-transform’ we move from the ‘time-Domain’  ‘z-Domain’. In an ‘Inverse transform’ we move from the ‘z-Domain’  ‘time-Domain’. … (5.3)

8 Z-Transform of an Impulse A simple but very important example is the z-transform pair of an impulse of a sequence x[n]. As we know this can be defined as : x[n] =  [n- n 0 ] The co-efficient of the polynomial z -1 = magnitude of the impulse = 1. The k th power of the polynomial z -1 = the offset of the impulse = n 0. n – Domain  z – Domain Now we’ve learned how to transform a signal from the n-Domain to the z-Domain …… but why ? …… Next, we are going to answer this very question …… … (5.4)

9 The z-transform & Linear Systems The z-transform is indispensable in the design of LTI systems. The reason is the way an LTI system responds to a particular input signal x[n] = z n for -   n  . Recall, the general difference equation of an FIR filter : ( ) The ‘system function’ of the FIR … (5.5)

10 We can see that the ‘system function’ of the FIR is a polynomial whose form depends on the coefficients of the FIR. Thus, we define the ‘system function’ of an FIR filter to be : The ‘system function’ is also the z-transform of the ‘impulse response’. Thus, FIR filters with an input x[n] = z n for -   n   give an output y[n]. y[n] = h[n] * z n = H(z)z n … (5.6) … (5.7) … (5.8)

11 Example 3 : Find the system function H(z) of the FIR filter with impulse response. h[n] =  [n-1] – 7  [n-2] – 3  [n-3] Simply, replace the  (n-k)’s with the corresponding z -k. Gives :H(z) = z -1 –7z -2 –3z -3 Example 4 : Find the impulse response h[n] of the FIR filter whose system response is. H(z) = 4(1 – z -1 )(1 + z -1 )(1 + 8z -1 ).

12 Properties of the z-transform LINEARITY : The z-transform obeys the ‘principle of superposition’ or ‘linearity’ ax 1 [n] + bx 2 [n]  aX 1 (z) + bX 2 (z) Example 5 : Calculate the linear superposition of the z-transforms of the two signals below. For a=1, b=1 x 1 [n] =  [n] +  [n-1] + 2  [n-2] + 3  [n-5] n-2 -1012345 x 2 -2 3-42100-2 … (6.9)

13 Time Delay Property : The z-transform of a signal x[n] delayed by (n 0 ) samples is equivalent to z-transform X(z) of x[n] mutiplied by z -n. A delay of 1 sample multiplies the z-transform by z -1 x[n-1]  z -1 X(z) A delay of n 0 samples multiplies the z-transform by z -n0 x[n – n 0 ]  z -n0 X(z) Example 6 : The signal x 1 [n] =  [n] +  [n-1] + 2  [n-2] + 3  [n-5] is delayed by 6 time samples. Calculate its z-transform … (6.10)

14 So far we have defined the z-transform H(z) only for finite input sequences x[n]. The z-transform extends for infinite-length signals too. The General z-Transform Formula … (6.11)

15 The z-Transform in Block Diagrams As we have seen a ‘unit delay’ becomes a z -1 operator in the z-Domain. Similarly in a block diagram, all delays can be replaced by a z -n0 operator. x[n]x[n-1] Unit delay x[n] x[n]H(z) = x[n-1] z -1 = Equivalent Systems Example 7 : Draw a block diagram for the system: y[n] = (1 – z -1 )x[n]

16 Convolution & the z-Transform Convolution in the ‘n-domain’ is multiplication in the ‘z-Domain’. () = system function = H(z)

17 Convolution in the ‘n-Domain is multiplication in the z-Domain. y[n] = h[n] * x[n]  y(z) = H(z)X(z) Example 8 : The signal x[n] =  [n-1] –  [n-2] +  [n-3] –  [n-4] is passed through the filter y[n] = x[n] – x[n-1]. Determine the output from the filter using convolution time-domain and the z-domain. In the Time-Domain nn 4 x[n]01-11-100 h[n]1 -1 h[0]01-11-100 h[1]0-11-110 y[n]01-22-210  y[n] =  [n-1] –2  [n-2] + 2  [n-3] – 2  [n-4] + 5  [n-5] … (4.12)

18 For the z-Domain, express the signal & filter in terms of z’s and multiply. Then inverse transform to get the signal. (Just replace the z’s with  ’s). Y[N] = X[N]*H[N] = (z -1 – z -2 + z -3 – z -4 )(1 – z -1 ) = z -1 – 2z -2 + 2z -3 – 2z -4 + z -5  y[n] =  [n-1] –2  [n-2] + 2  [n-3] – 2  [n-4] + 5  [n-5] 1.Transforming to the z-Domain is a simpler way to solve the system. 2.Convolution in the z-Domain is just algebraic multiplication.

19 Cascading Systems with the z-Transform One of the main applications of the z-transform is in system design. Remember, the impulse response of a 2 cascaded LTI systems. We can now use the z-transform to determine the same thing. The system function for a cascade of 2 LTI systems is the product of the individual system functions. h[n] = h 1 [n] * h 2 [n]  H(z) = H 1 (z)H 2 (z) The z-transform, like convolution, is commutative so the LTI systems could be cascaded in either order. As we can see, the formula would extend for (N) cascaded LTI systems.  [n] h 1 [n] LTI 1 h 1 [n] LTI 2 h 2 [n] h[n] = h 1 [n] * h 2 [n] H 1 (z) H 2 (z)H(z) = H 1 (z) H 2 (z) … (4.13)

20 Example 9 : Use the z-transform to cascade the two systems below and determine their combined difference equation. Draw the block diagram of the 2 cascaded system and its equivalent system. Which is the faster system ? w[n] = 3x[n] - x[n-1] ; y[n] = 2w[n] – w[n-1] Block diagram (here we see x[n] is the input to w[n] which inputs to y[n].) 3 x[n]x[n-1] z -1 y[n] w[n-1] z -1 2 w[n] 2 cascaded 1 st order systems. Order = power of highest z.

21 Just change to z’s and multiply out. The system functions are : W(z) = 3 - z -1 and Y(z) = 2 –z -1 Combined system function A(z) = W(z)Y(z) A(z) = (3 - z -1 )(2 –z -1 ) = 6 – 3z -1 – 2z -1 + z -2 = 6 – 5z -1 + z -2 Thus, a[n] = 6x[n] – 5x[n-1] + x[n-2] Equivalent circuit. The equivalent circuit is faster. 3 multipliers & 2 adders compared to the cascaded systems 4 multipliers and 2 adders. 6 a[n] x[n]x[n-1] z -1 x[n-2] z -1 -51 A 2 nd order system

22 Example 10 : Use z-transform to combine the following cascaded systems. Again draw the block diagram of the 2 cascaded system and its equivalent system. What are the orders of the systems ? Which is the faster system ? w[n] = x[n] + x[n-1]and y[n] = w[n] – w[n-1] + w[n-2]

23 Factoring z-Polynomials If we can multiply z-transforms to get higher-order systems we can also factorise z-polynomials to break down a large system into smaller modules. Example : Consider H(z) = 1 –2z -1 + 2z -2 – z -3 First we visually inspect for roots that may exist. We can see one root at z = 1. Therefore, (z -1 – 1) is a factor. Now, H(z) = H 1 (z)H 2 (z) Therefore, H 2 (z) = H(z)/H 1 (z) = (1 –2z -1 + 2z -2 – z -3 )/ (z -1 – 1) = 1 - z -1 + z -2 x[n] w[n] LTI 1LTI 2 y[n] H 1 (z) = z -1 – 1 H 2 (z) = 1 - z -1 + z -2 Thus, the 3 rd order LTI can be factorised into a cascaded 1 st & 2 nd order system.

24 Deconvolution (Inverse filtering) The cascading property leads to the question …… “ Can we use the 2 nd filter in cascade to undo the effect of the 1 st filter” ? If H 1 (z) is known then we can construct a filter H 2 (z) to undo the effect of the first by setting H(z) = 1. H(z) = H 1 (z)H 2 (z) = 1 Thus, H 2 (z) = 1/H 1 (z) The 2 nd filter tries to ‘undo the convolution’ that exists, so the process is referred to as ‘deconvolution’. The process is also called ‘Inverse Filtering’. Example : Determine the inverse filter for H 1 (z) = 1 – z -1 + ½z -2. Now, H 1 (z)H 2 (z) = 1

25 Thus, H 2 (z) = 1/ 1 – z -1 + ½z -2 What are we to make of this example ? It seems that the inverse filter for an FIR filter must have a system function that is not a polynomial. Instead, the inverse filter is a rational function (ratio of 2 polynomials). Thus, the inverse filter cannot be an FIR filter. And Deconvolution is not as simple as it appeared ! Later, we will learn about other LTI systems that do have rational system functions and will return to the problem of deconvolution.


Download ppt "MM3FC Mathematical Modeling 3 LECTURE 6 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