Presentation is loading. Please wait.

Presentation is loading. Please wait.

Z Transforms Dr. Veton Kepuska.

Similar presentations


Presentation on theme: "Z Transforms Dr. Veton Kepuska."— Presentation transcript:

1 Z Transforms Dr. Veton Kepuska

2 z-Transform In mathematics and signal processing, the Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex frequency domain representation. It can be considered as a discrete-time equivalent of the Laplace transform. This similarity is explored in the theory of time scale calculus. The z-transform is useful for the manipulation of discrete data sequences and has acquired a new significance in the formulation and analysis of discrete-time systems.  It is used extensively today in the areas of applied mathematics, digital signal processing, control theory, population science, economics.  These discrete models are solved with difference equations in a manner that is analogous to solving continuous models with differential equations.  The role played by the z-transform in the solution of difference equations corresponds to that played by the Laplace transforms in the solution of differential equations. 4/27/2019

3 z-Transform Definition: Consider a function x(t) defined for t≥0. As we should know we could sample this continuous function at times t = T, 2T, 3T, … where T is the sampling period (or sampling rate). We can write the sample as a sequence using the notation 𝑥 𝑛 =𝑥 𝑛𝑇 𝑁=0 ∞ Given a finite length sequence x[n], defended in the interval [0,N] and z-any complex number, the z-transform is defined as: 𝑋 𝑧 = 𝑘=0 𝑁 𝑥 𝑘 𝑧 −𝑘 = 𝑘=0 𝑁 𝑥 𝑘 𝑧 −1 𝑘 4/27/2019

4 z-Transform This transformation produces a new representation of x[n] denoted by X(z). Returning to the original sequence (via inverse z-transform) x[n] requires finding the coefficients associated with nth power of z-1. 4/27/2019

5 z-Transform Formally transforming from the time/sequence/n-domain to z domain is represented as: 𝑛−𝐷𝑜𝑚𝑎𝑖𝑛 𝑧 𝑧−𝐷𝑜𝑚𝑎𝑖𝑛 𝑥 𝑛 = 𝑘=0 𝑁 𝑥 𝑘 𝛿 𝑛−𝑘 𝑧 𝑋 𝑧 = 𝑘=0 𝑁 𝑥 𝑘 𝑧 −𝑘 4/27/2019

6 z-Transform A sequence and its z-transform are said to form a z-transform pair: 𝑥[𝑛] 𝑧 𝑋(𝑧) n is operator in the domain of sequence indicating the sample is is considered an independent variable. In the z domain the independent variable is z. 4/27/2019

7 Example 1 𝑥 𝑛 = 𝛿 𝑛− 𝑛 0 Appling the definition of the z transform:
𝑋 𝑧 = 𝑘=0 𝑁 𝑥 𝑘 𝑧 −𝑘 = 𝑘=0 𝑁 𝛿[𝑘− 𝑛 0 ] 𝑧 −𝑘 = 𝑧 − 𝑛 0 𝛿 𝑛− 𝑛 0 𝑧 𝑧 − 𝑛 0 4/27/2019

8 Example 2 𝑥 𝑛 =2𝛿 𝑛 +3𝛿 𝑛−1 +5𝛿 𝑛−2 +2𝛿[𝑛−3]
Appling the definition of the z transform: 𝑋 𝑧 =2+3 𝑧 −1 +5 𝑧 −2 +2 𝑧 −3 4/27/2019

9 Example 3 𝑋 𝑧 =4−5 𝑧 −2 + 𝑧 −3 −2 𝑧 −4 Appling the definition of the z transform: 𝑥 𝑛 =4𝛿 𝑛 −5𝛿 𝑛−2 +𝛿 𝑛−3 −2𝛿[𝑛−4] 4/27/2019

10 The Z transform and Linear Systems

11 The Z transform and Linear Systems
The z-transform is specifically useful in the analysis and design of LTI systems 4/27/2019

12 Digital Systems: Hardware Organization and Design
4/27/2019 FIR Filter A system that has only 𝛽 𝑘 for k=1,…,N is said to be a Finite Impulse Response (FIR) filter. The name reflects the fact that FIR filters have finite impulse (e.g., unit sample) response. FIR filters are also called moving average (MA) filters considering the fact their output is simply a weighted average of the input values. ℎ 𝑛 = 𝑘=0 𝑀 𝛽 𝑘 𝛿[𝑛−𝑘] 4/27/2019 Architecture of a Respresentative 32 Bit Processor

13 The z-Transform of an FIR Filter
We should recall that for any LTI system with input x[n] and impulse response h[n], the output y[n] is: 𝑦 𝑛 =𝑥 𝑛 ∗ℎ[𝑛] We are interested in the z-transform of h[n], where h[n] is an FIR filter ℎ 𝑛 = 𝑘=0 𝑀 𝛽 𝑘 𝛿[𝑛−𝑘] 4/27/2019

14 𝑦 𝑛 = 𝑘=0 𝑀 𝛽 𝑘 𝑥 𝑛−𝑘 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 𝑛−𝑘 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 𝑛 𝑧 −𝑘 =
Consider the input: 𝑥 𝑛 = 𝑧 𝑛 , −∞<𝑛<+∞ The output y[n] is: 𝑦 𝑛 = 𝑘=0 𝑀 𝛽 𝑘 𝑥 𝑛−𝑘 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 𝑛−𝑘 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 𝑛 𝑧 −𝑘 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 −𝑘 𝑧 𝑛 4/27/2019

15 The term under the parenthesis is the z-transform of h[n]
This is also termed the system function This function is defined as: 𝐻 𝑧 = 𝑘=0 𝑀 𝛽 𝑘 𝑧 −𝑘 = 𝑘=0 𝑀 ℎ[𝑘] 𝑧 −𝑘 4/27/2019

16 The z-transform pair that was just established is ℎ 𝑛 𝑍 H z
𝑘=0 𝑀 𝛽 𝑘 𝛿[𝑛−𝑘] 𝑧 𝑘=0 𝑀 𝛽 𝑘 𝑧 −𝑘 4/27/2019

17 System Function is an Mth degree polynomial in complex variable z.
As with any polynomial, it will have M roots or zeros, that is there are M values, z0, such that H(z0) = 0; These M zeros completely define the polynomial, that is: 𝐻 𝑧 = 𝛽 0 + 𝛽 1 𝑧 −1 +…+ 𝛽 𝑀 𝑧 −𝑀 = 1− 𝑧 1 𝑧 −1 1− 𝑧 2 𝑧 −1 ⋯ 1− 𝑧 𝑀 𝑧 −1 = 𝑧 −𝑀 𝑧− 𝑧 1 𝑧− 𝑧 2 ⋯ 𝑧− 𝑧 𝑀 Where zk, k=1,…,M denote zeros of polynomial. 4/27/2019

18 Example 4 Find the zeros of: ℎ 𝑛 = 𝛿 𝑛 + 1 6 𝛿 𝑛−1 − 1 6 𝛿 𝑛−2
The z-transform is 𝐻 𝑧 = 𝑧 −1 − 1 6 𝑧 −2 =( 𝑧 −1 )(1− 1 3 𝑧 −1 ) 4/27/2019

19 The zeros of H(z) are -1/2 and +1/3 The difference equation
𝑦 𝑛 =6𝑧 𝑛 +𝑥 𝑛−1 −𝑥[𝑛−2] has the same zeros, but a different scale factor; 4/27/2019

20 Properties of the z-Transform

21 Properties of the z-Transform
The z-Transform has a few very useful properties, and is defintio extends to infinite signals/impulse responses (IIR). 4/27/2019

22 The Superposition (Linearity) Property
4/27/2019

23 Proof: 𝑋 𝑧 = 𝑛=0 𝑎 𝑥 1 𝑛 +𝑏 𝑥 2 𝑛 𝑧 −1 = 𝑛=0 𝑎 𝑥 1 𝑛 𝑧 −1 + 𝑛=0 𝑏 𝑥 2 𝑛 𝑧 −1 =𝑎 𝑛=0 𝑥 1 𝑛 𝑧 −1 +𝑏 𝑛=0 𝑥 2 𝑛 𝑧 −1 =𝑎 𝑋 1 𝑧 +𝑏 𝑋 2 (𝑧) 4/27/2019

24 The Time-Delay Property
𝑥 𝑛−1 𝑍 𝑧 −1 𝑋 𝑧 𝑥 𝑛− 𝑛 0 𝑍 𝑧 − 𝑛 0 𝑋 𝑧 Proof: 𝑋 𝑧 = 𝛼 0 + 𝛼 1 𝑧 −1 +⋯+ 𝛼 𝑁 𝑧 −𝑁 𝑥 𝑛 = 𝑘=0 𝑁 𝛼 𝑘 𝛿[𝑛−𝑘] = 𝛼 0 𝛿 𝑛 + 𝛼 1 𝛿 𝑛−1 +⋯+ 𝛼 𝑁 𝛿[𝑛−𝑁] 4/27/2019

25 The Time-Delay Property
Let 𝑌 𝑧 = 𝑧 −1 𝑋 𝑧 = 𝛼 0 𝑧 −1 + 𝛼 1 𝑧 −2 +⋯+ 𝛼 𝑁 𝑧 −𝑁−1 Hence 𝑦 𝑛 = 𝛼 0 𝛿 𝑛−1 + 𝛼 1 𝛿 𝑛−2 +⋯+ 𝛼 𝑁 𝛿 𝑛−𝑁−1 =𝑥[𝑛−1] 4/27/2019

26 Similarly 𝑌 𝑧 = 𝑧 − 𝑛 0 𝑋 𝑧 →𝑦 𝑛 =𝑥[𝑛− 𝑛 0 ] 4/27/2019

27 A General z-Transform Formula
We have seen that for a sequence x[n] defined over the interval 0 ≤ n ≤ N the z- transform is 𝑋 𝑧 = 𝑛=0 𝑁 𝑥[𝑛] 𝑧 −𝑛 This definition extends for sequences having interval from -∞ ≤ n ≤ ∞ 𝑋 𝑧 = 𝑛=−∞ +∞ 𝑥[𝑛] 𝑧 −𝑛 4/27/2019

28 Properties of z-TranSform
z-Transform Convolution Theorem: 𝑦 𝑛 =ℎ 𝑛 ∗𝑥 𝑛 𝑧 𝐻 𝑧 𝑋 𝑧 =𝑌(𝑧) Cascading Systems 𝑊 𝑧 = 𝐻 1 𝑧 𝑋 𝑧 𝑌 𝑧 = 𝐻 2 𝑧 𝑊 𝑧 𝑌 𝑧 = 𝐻 1 𝑧 𝐻 2 𝑧 𝑋(𝑧) LT 1 H1(z), h1[n] LT 2 H2(z), h2[n] x[n] X(z) w[n] W(z) y[n] Y(z) 4/27/2019

29 The Z-Transform as an Operator

30 The Z-Transform as an Operator
The z-transform can be considered as an operator. Unit-Delay Operator Unit Delay x[n] y[n]= x[n-1] z-1 x[n] y[n]= x[n-1] 4/27/2019

31 Unit DelAy Operator In the case of the unit delay, we observe that:
𝑦 𝑛 = 𝑧 −1 𝑥[𝑛] =𝑥 𝑛−1 Which is derived from the fact that Y(z) = z-1X(z) 4/27/2019

32 The Z-Transform as an Operator
The filter described with the following equation: 𝑦 𝑛 =𝑥 𝑛 − 𝑛−1 This expression can be viewed as the operator: 𝑦 𝑛 = 1− 𝑧 −1 𝑥 𝑛 =𝑥 𝑛 − 𝑛−1 This is so because: 𝑌 𝑧 =𝑋 𝑧 − 𝑧 −1 𝑋 𝑧 = 1− 𝑧 −1 𝑋(𝑧) 4/27/2019

33 Example: Two-Tap FIR Filter
x[n] X(z) z-1 b0 z-1X(z) b1 x[n-1] y[n] 4/27/2019

34 Example: Two-Tap FIR Filter
Using the operator convention, we can write by inspection: 𝑌 𝑧 = 𝑏 0 𝑋 𝑧 + 𝑏 1 𝑧 −1 𝑋 𝑧 𝑦 𝑛 = 𝑏 0 𝑥 𝑛 + 𝑏 1 𝑥 n−1 4/27/2019

35 Digital Systems: Hardware Organization and Design
4/27/2019 FIR Filters Architecture of a Respresentative 32 Bit Processor

36 Digital Systems: Hardware Organization and Design
4/27/2019 FIR Filters General constant-coefficients equation: Impulse (unit sample) response, h[n], of the filter is obtained when x[n]=δ[n]. 4/27/2019 Architecture of a Respresentative 32 Bit Processor

37 Linear Phase of FIR Filters
Digital Systems: Hardware Organization and Design 4/27/2019 Linear Phase of FIR Filters If FIR filter has coefficients that are symmetric, as depicted in the following relationship: Then, it can be shown that the resulting filter has linear phase ⇒ constant delay for all frequency components of the input signal. This property is very important in many communications data streams (speech, data, …) and image processing applications. 4/27/2019 Architecture of a Respresentative 32 Bit Processor

38 Digital Systems: Hardware Organization and Design
4/27/2019 FIR Filter Structures For a given difference equation there are different ways to implement a digital filter. Selection of a particular filter structure to be implemented is dependent on many factors: Programming considerations Hardware Sensitivity of Quantizing Coefficients Quantization noise of the input signal. 4/27/2019 Architecture of a Respresentative 32 Bit Processor

39 Direct Structure of an FIR filter
Digital Systems: Hardware Organization and Design 4/27/2019 Direct Structure of an FIR filter x[n-1] x[n-2] x[n-M] x[n] D D D βM β0 β1 β2 y[n] 4/27/2019 Architecture of a Respresentative 32 Bit Processor

40 Symmetric – Linear Phase FIR filter
Digital Systems: Hardware Organization and Design 4/27/2019 Symmetric – Linear Phase FIR filter Better Implementation: β0 y[n] x[n] D D β1 x[n-1] D D βL/2 x[n-2] D x[n-M/2+1] x[n-M/2] 4/27/2019 Architecture of a Respresentative 32 Bit Processor

41 MATLAB >> filterDesigner 4/27/2019

42 Filter Designer Equiripple Least-Squares Window
Constrained Least-Squares Complex Equiripple Maximally Flat Least P’th Norm Constrained Equiripple Generalized Equiripple Const. Band Equiripple Interpolated FIR 4/27/2019

43 Windowing Method Choose Chebyshev Filter 4/27/2019

44 Chebyshev Window Method
4/27/2019

45 Convolution and the z-Transform

46 Convolution and the z-Transform
The impulse response of the unity delay system is: ℎ 𝑛 =𝛿 𝑛−1 The system output written in terms of a convolution is: 𝑦 𝑛 =𝑥 𝑛 ∗𝛿 𝑛−1 =𝑥 𝑛−1 The system function (z-transform of h[n]) is: 𝐻 𝑧 = 𝑧 −1 4/27/2019

47 Convolution and the z-Transform
𝑌 𝑧 = 𝑧 −1 𝑋 𝑧 Hence in general, when the system is described by H(z) we can optain the output Y(z) knowing what the input is X(z) 𝑌 𝑧 =𝐻 𝑧 𝑋(𝑧) To show this we start with: 𝑦 𝑛 =𝑥 𝑛 ∗ℎ 𝑛 = 𝑘=0 𝑀 ℎ 𝑘 𝑥[𝑛−𝑘] 4/27/2019

48 Convolution and the z-Transform
𝑌 𝑧 = 𝑘=0 𝑀 ℎ 𝑘 𝑧 −𝑘 𝑋 𝑧 = 𝑘=0 𝑀 ℎ 𝑘 𝑧 −𝑘 𝑋 𝑧 =𝐻 𝑧 𝑋(𝑧) 4/27/2019

49 Example: Convolving a Finite Duration Sequences
Suppose that: 𝑥 𝑛 =2𝛿 𝑛 −3𝛿 𝑛−2 +4𝛿 𝑛−3 ℎ 𝑛 = 𝛿 𝑛 +2𝛿 𝑛−1 +𝛿 𝑛−2 Find first Y(z) by applying z transform to both x[n] and h[n] 𝑋 𝑧 =2−3 𝑧 −1 +4 𝑧 −3 𝐻 𝑧 =1+2 𝑧 −1 + 𝑧 −2 Then we find the Y(z) by applying the multiplication of z transform rule: 4/27/2019

50 Example: Convolving a Finite Duration Sequences
𝑌 𝑧 = 2−3 𝑧 −2 +4 𝑧 −3 1+2 𝑧 −1 + 𝑧 −2 =2+4 𝑧 −1 −2 𝑧 −2 −2 𝑧 −3 +5 𝑧 −4 +4 𝑧 −5 Then we find y[n] by inverse z transformation: 𝑦 𝑛 =2𝛿 𝑛 +4𝛿 𝑛−1 −𝛿 𝑛−2 −2𝛿 𝑛−3 +5𝛿 𝑛−4 +4𝛿[𝑛−5] 4/27/2019

51 Factorization Using MATLAB
𝐻 𝑧 =1+3 𝑧 −1 −2 𝑧 −2 + 𝑧 −3 H(z) is a 3rd degree polynomial. We can use the MALTAB function roots() to obtain the roots. >> p = [ ]; >> r = roots(p) r = i i i 4/27/2019

52 >> conv([1 -r(2)], [1 -r(3)]) ans = 1.0000 -0.6274 0.2757
4/27/2019

53 Factoring 𝐻 1 𝑧 =1−r 1 𝑧 −1 =1+3.6274 𝑧 −1
𝐻 2 𝑧 = 1−r 2 𝑧 −1 1−r 3 𝑧 −1 = =(1−( j0.4211) 𝑧 −1 ) 1− −j0.4211) 𝑧 −1 = =1− 𝑧 − 𝑧 −2 Cascade of the system is thus: z-1 1− 𝑧 − 𝑧 −2 x[n] X(z) w[n] W(z) y[n] Y(z) H1(z) H2(z) 4/27/2019

54 >> conv([1 -r(1)],conv([1 -r(2)],[1 -r(3)])) ans =
The difference equations for each subsystem are: 𝑤 𝑛 =𝑥 𝑛 𝑥 𝑛−1 𝑦 𝑛 =𝑤 𝑛 −0.6274𝑤 𝑛− 𝑤[𝑛−2] 4/27/2019

55 Deconvolution/Inverse Filtering
In a two subsystems cascade can the second system undo the action of the first subsystem? For the output to equal the input we need H(z) = 1 We thus desire 𝐻 1 𝑧 𝐻 2 𝑧 =1 𝐻 2 𝑧 = 1 𝐻 1 𝑧 4/27/2019

56 Example: 𝐻 1 𝑧 =1−𝑎 𝑧 −1 , 𝑎 <1 The inverse filter is:
𝐻 1 𝑧 =1−𝑎 𝑧 −1 , 𝑎 <1 The inverse filter is: 𝐻 2 𝑧 = 1 𝐻 1 𝑧 = 1 1− 𝑎 −1 This expression is no longer an FIR filter, it is an infinite impulse response (IIR) filter. We can approximate 𝐻 2 𝑧 as n FIR filter via long devision: 4/27/2019

57 1+𝑎 𝑧 −1 + 𝑎 2 𝑧 −2 +⋯ 1−𝑎 𝑧 −1 | 1 1−𝑎 𝑧 −1 𝑎 𝑧 −1 𝑎 𝑧 −1 − 𝑎 2 𝑧 −2 𝑎 2 𝑧 −2 𝑎 2 𝑧 −2 − 𝑎 3 𝑧 −3 𝑎 3 𝑧 −3 4/27/2019

58 An M+1 term approximation is: 𝐻 2 𝑧 = 𝑘=0 𝑀 𝑎 𝑘 𝑧 −𝑘
𝐻 2 𝑧 = 𝑘=0 𝑀 𝑎 𝑘 𝑧 −𝑘 4/27/2019

59 Relationship between the z-domain and the frequency domain
𝐻 𝑒 𝑗𝜔 = 𝑘=0 𝑀 𝑏 𝑘 𝑒 −𝑗𝜔𝑘 𝐻 𝑧 = 𝑘=0 𝑀 𝑏 𝑘 𝑧 −𝑘 𝐻 𝑒 𝑗𝜔 = 𝐻 𝑧 𝑧= 𝑒 𝑗𝜔 4/27/2019

60 The Z-Plane and the Unit Circle
Considering z-plane by evaluating H(z) which becomes H( 𝑒 𝑗𝜔 ). 4/27/2019

61 From this interpretation we also can see why H( 𝑒 𝑗𝜔 ) is periodic with period 2𝜋: As 𝜔 increases it continues to sweep around the unit circle over and over again 4/27/2019

62 The Zeros and Poles of H(z)
Conisder: 𝐻 𝑧 =1+ 𝑏 1 𝑧 −1 + 𝑏 2 𝑧 −3 + 𝑏 3 𝑧 −3 Factoring H(z) results in 𝐻 𝑧 = 1− 𝑧 1 𝑧 −1 1− 𝑧 2 𝑧 −1 1− 𝑧 3 𝑧 −1 𝐻 𝑧 = 𝑧 3 + 𝑏 1 𝑧 2 + 𝑏 2 𝑧 1 + 𝑏 0 𝑧 0 𝑧 3 = (𝑧− 𝑧 1 )(𝑧− 𝑧 2 )(𝑧− 𝑧 3 ) 𝑧 3 The zeros are the locations where H(z) = 0; i.e., 𝑧 1 , 𝑧 2 , 𝑧 3 4/27/2019

63 Pole-zero plot The poles are where H(z) → ∞;𝑖.𝑒., 𝑧→0 Im Z-Plane z2
Triple Pole z1 3 Re z3 4/27/2019

64 Example 𝐻 𝑧 =1+2 𝑧 1 +2 𝑧 2 + 𝑧 −3 . MATLAB has a function that supports the creation of a pole-zero plot given the system function coefficients >> zplane([ ], 1) 4/27/2019

65 4/27/2019

66 The Significance of the Zeros of H(z)
The difference equation specifies the actual time domain of the filter. It can be used for calculating the filter output for a given filter input The difference equation coefficients are the polynomial coefficients in H(z) For 𝑥 𝑛 = 𝑧 0 𝑛 . We know that 𝑦 𝑛 =𝐻 𝑧 0 𝑧 0 𝑛 so in particular if is one of the zeros of 𝐻 𝑧 , 𝐻 𝑧 0 =0 and the output y n =0 If a zero lies on the unit circle then the output will be zero for a sinusoidal input of the form 𝑥 𝑛 = 𝑧 0 𝑛 = 𝑒 𝑗 𝜔 0 𝑛 = 𝑒 𝑗 𝜔 0 𝑛 where 𝜔 0 is the angle of the zero relative to the real axis, which is also the frequency of the corresponding complex sinusoid; why? 𝑦 𝑛 = 𝐻 𝑧 𝑧= 𝑒 𝑗 𝜔 𝑒 𝑗 𝜔 0 𝑛 =0 4/27/2019

67 Example: 𝐻 𝑧 =1−2𝑐𝑜𝑠 𝜔 0 𝑧 −1 + 𝑧 −2 , 𝑥 𝑛 =𝑐𝑜𝑠 𝜔 0 𝑛
𝐻 𝑧 =1−2𝑐𝑜𝑠 𝜔 0 𝑧 −1 + 𝑧 −2 , 𝑥 𝑛 =𝑐𝑜𝑠 𝜔 0 𝑛 Solution: Factoring H(z): 𝐻 𝑧 = 1− 𝑒 𝑗 𝜔 𝑧 1 𝑧 −1 1− 𝑒 −𝑗 𝜔 𝑧 2 𝑧 −1 Expanding x[n] we see that: 𝑥 𝑛 = 1 2 𝑒 −𝑗 𝜔 0 𝑛 𝑒 𝑗 𝜔 0 𝑛 4/27/2019

68 Setting up a simple MATLAB script will validate this:
The action of H(z) at ∓ 𝜔 0 will remove the signal from the filter output. Setting up a simple MATLAB script will validate this: >> n = 0:100; >> w0 = pi/4; >> x = cos(w0*n); >> y = filter([1 -2*cos(w0) 1],1,x); >> stem(n,x,'filled') >> hold Current plot held >> stem(n,y,'filled','r') >> axis([ ]); grid 4/27/2019

69 Input (blue) 𝜔 0 = 𝜋 4 Output (red) 4/27/2019

70 >> zplane([1 -2*cos(w0) 1],1)% check the pole-zero plot
Since the input is applied at n=0, we see a small transient while the filter settles to the final output, which in this case is zero. >> zplane([1 -2*cos(w0) 1],1)% check the pole-zero plot 4/27/2019

71 𝜔 0 = 𝜋 4 4/27/2019

72 Graphical Relation Between z and 𝜔
When we make the substitution z=ej𝜔 in H(z) we know that we are evaluating the z-transform on the unit circle and thus obtain the frequency response If we plot say |H(z)| over the entire z-pane we could visualize how we could get the frequency response magnitude based on evaluation of H(z) on unit circle. 4/27/2019

73 Example L=9, Moving Average Filter (9 taps/8th-order)
𝐻 𝑧 = 𝑘=0 9−1 𝑧 −1 = 𝑘=0 8 1− 𝑒 −𝑗2𝜋𝑘/9 𝑧 −1 4/27/2019

74 >> zplane([ones(1,9)]/9,1)
4/27/2019

75 >> w = -pi:(pi/500):pi; >> H = freqz([ones(1,9)/9],1,w);
4/27/2019

76 Faze Response 4/27/2019

77 Useful FilterS

78 The L-Point Moving Average Filter
The L-point moving average (running sum) filter has the following definition: 𝑦 𝑛 = 1 𝐿 𝑘=0 𝐿−1 𝑥[𝑛−𝑘] and system function (z-transform of the impulse response): 𝐻 𝑧 = 1 𝐿 𝑘=0 𝐿−1 𝑧 −𝑘 4/27/2019

79 The L-Point Moving Average Filter
The sum can be simplified using the geometric series† sum formula: 𝐻 𝑧 = 1 𝐿 𝑘=0 𝐿−1 𝑧 −1 = 1 𝐿 1− 𝑧 −𝐿 1− 𝑧 −1 = 1 𝐿 𝑧 𝐿 −1 𝑧 𝐿−1 (𝑧−1) Note that zeros of H(z) are determined by the roots of the equation: 𝑧 𝐿 −1=0 → 𝑧 𝐿 =1 †A geometric series 𝑘 𝑎 𝑘 is a series for which the ratio of each two consecutive terms 𝑎 𝑘+1 / 𝑎 𝑘 is a constant function of the summation index k. Veton Kepuska 4/27/2019

80 The L-Point Moving Average Filter
The roots of this equation can be found by noting that ej2𝜋𝑘/𝐿 = 1 for any integer k. 𝑧 𝑘 = 𝑒 −𝑗2𝜋𝑘/𝐿 , 𝑘=0, 1, 2, …, 𝐿−1 Those roots are referred to as the L roots of unity. 4/27/2019

81 The L-Point Moving Average Filter
One of the zeros sits at z=1, but there is also a pole at z=1, so there is a pole-zero cancellation, meaning that the pole-zero plot of H(z) corresponds to the L-roots of unity, less the root at z = 0; 4/27/2019

82 Z-Plane 2𝜋 𝐿 L=8 4/27/2019

83 2𝜋 𝐿 4𝜋 𝐿 𝜋 4/27/2019

84 Practical Filter Design USING MATLAB
>> fdatool, that will be replaced in future release with >> filterDesigner Requires signal processing toolbox Will be using it to design FIT filters 4/27/2019

85 Properties of Linear-Phase Filters
FIR filter can be designed to have a linear-phase It requires that the FIR filters to have symmetrical coefficients: 𝑏 𝑘 = 𝑏 𝑀−𝑘 , 𝑓𝑜𝑟 𝑘=0,1,…,𝑀 4/27/2019

86 Example 𝐻 𝑧 = 𝑏 0 + 𝑏 1 𝑧 −1 + 𝑏 2 𝑧 −2 + 𝑏 3 𝑧 −3 + 𝑏 4 𝑧 −4 𝐻(𝑧)= 𝑏 0 + 𝑏 1 𝑧 −1 + 𝑏 2 𝑧 −2 + 𝑏 1 𝑧 −3 + 𝑏 0 𝑧 −4 Symmetrical FIR filter 𝐻 𝑧 = 𝑏 0 𝑧 2 + 𝑧 −2 + 𝑏 1 𝑧 1 + 𝑧 −1 + 𝑏 2 𝑧 −2 Moving to frequency by 𝑧→ 𝑒 𝑗𝜔 𝐻 𝑒 𝑗𝜔 = 2 𝑏 0 cos 2𝜔 +2 𝑏 1 cos 𝜔 + 𝑏 2 𝑒 −𝑗 4 2 𝜔 4/27/2019

87 Example Since we have M = 4 the linear phase term is 𝑒 −𝑗 𝑀 2 𝜔 = 𝑒 −𝑗 4 2 𝜔 Real function R( 𝑒 𝑗𝜔 ) is of the form: 𝑅 𝑒 𝑗𝜔 = 𝑏 𝑏 0 cos 2𝜔 + 𝑏 1 cos 𝜔 4/27/2019

88 Locations of the Zeros of FIR Linear-Phase Systems
Further investigation of 𝐻 𝑧 for the case of symmetric coefficients reveals that: 𝐻 1 𝑧 = 𝑧 𝑀 𝐻(𝑧) Consequently, for 𝐻 𝑧 having a zero at 𝑧 0 it will also have a zero at 1 𝑧 0 4/27/2019

89 Locations of the Zeros of FIR Linear-Phase Systems
Assuming the filter has real coefficients, complex zeros occur in conjugate pairs, so the even symmetry condition further implies that the zeros occur as quadruplets: 𝑧 0 , 𝑧 0 ∗ , 1 𝑧 0 , 1 𝑧 0 ∗ 4/27/2019

90 Quadruplet Zeros for Linear Phase Filters
z-Plane 1 𝑧 0 𝑧 0 𝑧 0 ∗ 1 𝑧 0 ∗ 4/27/2019 Quadruplet Zeros for Linear Phase Filters

91 𝐻 𝑧 =1−2 𝑧 −1 +4 𝑧 −2 −2 𝑧 −3 + 𝑧 −4 >> zplane([1 -2 4 -2 1],1)
4/27/2019

92 IIR Filters

93 The General IIR Difference Equation
𝑙=0 𝑁 𝛼 𝑙 𝑦 𝑛−𝑙 = 𝑘=0 𝑀 𝛽 𝑘 𝑥[𝑛−𝑘] After rearranging this expression: 𝑦 𝑛 = 𝑙=1 𝑁 𝑎 𝑙 𝑦 𝑛−𝑙 + 𝑘=0 𝑀 𝑏 𝑘 𝑥[𝑛−𝑘] This expression has N+M+1 coefficients, and that is number of multiplies and adds operation are required to produce each output. 4/27/2019

94 Direct-Form I of IIR Filter
β0x[n] y[n] x[n] β0 D D α1y[n-1] β1x[n-1] β1 α1 D D α2y[n-2] β2x[n-2] β2 α2 D D αNy[n-N] βMx[n-M] βM αN 4/27/2019

95 Time-Domain Response Consider a first-order filter (N=1) with M=0.
𝑦 𝑛 = 𝛼 1 𝑦 𝑛−1 + 𝛽 0 𝑥[𝑛] 4/27/2019

96 Impulse Response of a First-Order IIR System
The impulse response is obtained by setting x[n]=d[n]. Initial Rest Conditions of IIR Filter: The input is zero prior to the start time n0, that is x[n] = 0; for n < n0 The output is zero prior to the start time, that is y[n] = 0 for n < n0 Find the impulse response via direct recursion from the difference equation 𝑦 𝑛 = 𝛼 1 𝑦 𝑛−1 + 𝛽 0 𝑥 𝑛 4/27/2019

97 𝑦 0 = 𝛼 1 𝑦 −1 + 𝛽 0 𝛿 0 = 𝛽 0 . 𝑦 1 = 𝛼 1 𝑦 0 + 𝛽 0 𝛿 1 = 𝛼 1 𝛽 0
𝑦 0 = 𝛼 1 𝑦 −1 + 𝛽 0 𝛿 0 = 𝛽 𝑦 1 = 𝛼 1 𝑦 0 + 𝛽 0 𝛿 1 = 𝛼 1 𝛽 0 𝑦 1 = 𝛼 1 𝑦 1 + 𝛽 0 𝛿 2 = 𝛼 1 2 𝛽 0 𝑦 𝑛 = 𝛼 1 𝑛 𝛽 0 , n ≥0 1-st order FIR filter response to the impulse is: ℎ 𝑛 = 𝛽 0 𝛼 1 𝑛 u[n] 4/27/2019

98 Example: First-Order IIR with 𝛽 0 =1, 𝛼 1 =0.8
The impulse response of: 𝑦 𝑛 = 𝛼 1 𝑦 𝑛−1 + 𝛽 0 𝑥 𝑛 is ℎ 𝑛 = 𝛽 0 𝛼 1 𝑛 𝑢[𝑛] Or ℎ 𝑛 = 𝑛 𝑢[𝑛] 4/27/2019

99 4/27/2019

100 Linearity and Time Invariance of IIR Filters
Linearity of FIR filters and the conditions under which it is exhibited was covered in our previous discussions. Using linearity and time invariance we can find the output of the first-order system to a linear combination of time shifter impulses 𝑥 𝑛 = 𝑘= 𝑁 1 𝑁 2 𝑥[𝑘]𝛿 𝑛−𝑘 4/27/2019

101 𝑦 𝑛 = 𝑘= 𝑁 1 𝑁 2 𝑥 𝑘 ℎ 𝑛−𝑘 = 𝑘= 𝑁 1 𝑁 2 𝑥 𝑘 𝛽 0 𝛼 1 𝑛−𝑘 𝑢[𝑛−𝑘]
𝑦 𝑛 = 𝑘= 𝑁 1 𝑁 2 𝑥 𝑘 ℎ 𝑛−𝑘 = 𝑘= 𝑁 1 𝑁 2 𝑥 𝑘 𝛽 0 𝛼 1 𝑛−𝑘 𝑢[𝑛−𝑘] 4/27/2019

102 Example 𝑥 𝑛 =2𝛿 𝑛−2 −𝛿 𝑛−4 , 𝛼 1 =0.5 𝑎𝑛𝑑 𝛽 0 =1
𝑥 𝑛 =2𝛿 𝑛−2 −𝛿 𝑛−4 , 𝛼 1 =0.5 𝑎𝑛𝑑 𝛽 0 =1 Using result presented in previous slides, it follows that: 𝑦 𝑛 = 𝑛−2 𝑢 𝑛−2 − 𝑛−4 𝑢 𝑛−4 Plotting the y[n] results in the following graph: 4/27/2019

103 4/27/2019

104 Linearity & Time-Invariance
Linearity and Time-Invariance are used to find the impulse response of this IIR filter: 𝑦 𝑛 = 𝑎 1 𝑦 𝑛−1 + 𝑏 0 𝑥 𝑛 + 𝑏 1 𝑥 𝑛−1 Superposition of un-delayed and delayed input: 𝑦 𝑛 = 𝑎 1 𝑦 𝑛−1 +𝑥 𝑛 4/27/2019

105 Based on this observation, the impulse response is:
ℎ 𝑛 = 𝑏 0 𝑎 1 𝑛 𝑢 𝑛 + 𝑏 1 𝑎 1 𝑛−1 𝑢 𝑛−1 = 𝑏 0 𝛿 𝑛 + 𝑏 0 + 𝑏 1 𝑎 1 −1 𝑏 0 𝑎 1 𝑛 𝑢 𝑛−1 4/27/2019

106 Step Response of a Frist-Order Recursive System
The step response allows us to see how a filter (system) responds to an infinitely long input Considering the step response of the system: 𝑦 0 = 𝑎 1 𝑦 −1 + 𝑏 0 𝑢 0 = 𝑏 0 𝑦 1 = 𝑎 1 𝑦 0 + 𝑏 0 𝑢 1 = 𝑎 1 𝑏 0 + 𝑏 0 𝑦 2 = 𝑎 1 𝑦 1 + 𝑏 0 𝑢 2 = 𝑎 1 𝑎 1 𝑏 0 + 𝑏 0 + 𝑏 0 … 𝑦 𝑛 = 𝑏 𝑎 1 +…+ 𝑎 1 𝑛 = 𝑏 0 𝑘=0 𝑛 𝑎 1 𝑘 4/27/2019

107 The for in the previous slide is a geometric series, which has a solution:
𝑘=0 𝐿 𝑟 𝑘 = 1− 𝑟 𝐿+1 1−𝑟 , 𝑟≠1 𝐿+1, 𝑟=1 Using this result and assuming that 𝑎 1 ≠1, the step response of the fist-order filter is: 𝑦 𝑛 = 𝑏 0 1− 𝑎 1 𝑛+1 1− 𝑎 1 𝑢[𝑛] 4/27/2019

108 Three conditions for 𝑎 1 exist:
When 𝑎 1 >1 the term 𝑎 1 𝑛+1 grows without bounds as n becomes large, resulting in an unstable condition. When 𝑎 1 <1 the term 𝑎 1 𝑛+1 decays to zero as n becomes large, 𝑛→∞ resulting in an stable condition. When 𝑎 1 =1, we have the special case output where it is of the form 𝑏 0 𝑛+1 , which also grows without bound; with 𝑎 1 =−1, the output alienates in sign, hence this case defines so called a marginally stable condition 4/27/2019

109 Example: The step response of the this filter:
𝑦 𝑛 = 𝑏 0 1− 𝑎 1 𝑛+1 1− 𝑎 1 𝑥[𝑛] The parameters of the filter are: 𝑎 1 =0.6, 𝑏 0 =1, 𝑎𝑛𝑑 𝑥 𝑛 =𝑢 𝑛 . Hence: 𝑦 𝑛 = 1− 0.6 𝑛+1 1−0.6 𝑢[𝑛] 4/27/2019

110 4/27/2019

111 Direct Evaluation The step response can also be obtained by direct evaluationof the convolution sum: 𝑦 𝑛 =𝑥 𝑛 ∗ℎ 𝑛 =𝑢 𝑛 ∗ℎ 𝑛 For the problem at hand: 𝑦 𝑛 = 𝑘=−∞ ∞ 𝑢[𝑘] 𝑏 0 𝑎 1 𝑛−𝑘 𝑢[𝑛−𝑘] 4/27/2019

112 To evaluate this requires careful attention to details
• The product 𝑢 𝑘 𝑢 𝑛−𝑘 tells us how to set the sum limits u[n-k] n<0 n>0 k u[k] k 4/27/2019

113 The result is: 𝑦 𝑛 = 𝑘=0 𝑛 𝑏 0 𝑎 1 𝑛−𝑘 𝑢 𝑛 = 𝑏 0 𝑎 1 𝑛 𝑘=0 𝑛 𝑎 1 −𝑘 = 𝑏 0 𝑎 1 𝑛 1− 𝑎 1 𝑛=1 1− 1 𝑎 = 𝑏 0 1− 𝑎 1 𝑛+1 1− 𝑎 1 4/27/2019

114 System Function of an IIR Filter

115 IIR Filter System Function
From our study of the z-transform we know that convolution in the time (sequence)-domain corresponds to multiplication in the z-domain 𝑦 𝑛 =𝑥 𝑛 ∗ℎ 𝑛 𝑧 𝑋 𝑧 𝐻 𝑧 =𝑌(𝑧) For the case of IIR filters H(z) will be a fully rational function, meaning in general both poles and zeros (more than at z=0) Applying z-transform on both sides of the general IIR difference equation: 4/27/2019

116 𝑌 𝑧 = 𝑙=1 𝑁 𝑎 𝑙 𝑧 −𝑙 𝑌(𝑧) ℤ 𝑦[𝑛−𝑙] + 𝑘=0 𝑁𝑀 𝑏 𝑘 𝑧 −𝑘 𝑋(𝑧) ℤ 𝑥[𝑛−𝑘]
𝑌 𝑧 = 𝑙=1 𝑁 𝑎 𝑙 𝑧 −𝑙 𝑌(𝑧) ℤ 𝑦[𝑛−𝑙] + 𝑘=0 𝑁𝑀 𝑏 𝑘 𝑧 −𝑘 𝑋(𝑧) ℤ 𝑥[𝑛−𝑘] Forming the ration Y(z)/X(z) gives us transfer function H(z) 𝐻 𝑧 = 𝑘=0 𝑀 𝑏 𝑘 𝑧 −𝑘 1− 𝑙=1 𝑁 𝑎 𝑘 𝑧 −𝑙 = 𝑏 0 + 𝑏 1 𝑧 −1 +…+ 𝑏 𝑀 𝑧 −𝑀 1− 𝑎 1 𝑧 −1 +…+ 𝑎 𝑁 𝑧 −𝑁 The coefficients of the numerator polynomial, denoted B(z), correspond to the feed-forward terms of the difference equation The coefficients of the denominator polynomial, denoted A(z), for z-l, l>0 correspond to the feedback terms of the difference equation 4/27/2019

117 MATLAB We have used various MATLAB functions that take as input b and a coefficient vectors, e.g., filter(b,a,...), freqz(b,a,...), and zplane(b,a) In terms of the general IIR system we now identify those vectors as: 𝒃= 𝒃 𝟎 , 𝒃 𝟏 ,…, 𝒃 𝑴 𝒂=[𝟏,− 𝒂 𝟏 ,− 𝒂 𝟐 ,…, −𝒂 𝑵 ] 4/27/2019

118 The General First-Order Case
As a special case consider N=M=1: 𝐻 𝑧 = 𝑏 0 + 𝑏 1 𝑧 −1 1− 𝑎 1 𝑧 −1 For a1=0.5, b0=-3, and b1=2: 4/27/2019

119 >> x = [1 zeros(1,20)]; % impulse sequence input
>> y = filter([-3,2],[1 -0.5],x); >> stem(n,y,'filled') >> axis([ ]) >> grid >> ylabel('Impulse Response h[n]') >> xlabel('Time Index (n)') 4/27/2019

120 Impulse Response 4/27/2019

121 Example: y = filter([1 1],[1 -0.8],x) Find the By inspection:
System function, Impulse response, Difference equation That corresponds to the given filter() expression. By inspection: 4/27/2019

122 The impulse response using is obtained by applying inverse z-transform
By inspection: 𝐻 𝑧 = 1+ 𝑧 −1 1−0.8 𝑧 −1 The impulse response using is obtained by applying inverse z-transform ℎ 𝑛 =𝛿 𝑛 − 𝑛 𝑢 𝑛−1 The difference equation is: 𝑦[𝑛]=0.8𝑦 𝑛−1 +𝑥 𝑛 +𝑥[𝑛−1] 4/27/2019

123 System Functions and Block-Diagram Structures

124 The Direct-Form I D D D D D D β0x[n] x[n] y[n] β0 α1y[n-1] β1x[n-1] β1
β2 α2 D D αNy[n-N] βMx[n-M] 4/27/2019 βM αN

125 Direct-Form II D D D D w[n] x[n] y[n] β0 α1d[n-1] β1d[n-1] α2d[n-2]
αMd[n-M] βMd[n-M] D 4/27/2019 αNd[n-N]

126 The Transposed Structures
A property of filter block diagrams: When all the arrows are reversed All branch points become summing nodes All summing nodes become branch points The input and output are interchanged. The system function is unchanged: 4/27/2019

127 Transposed Direct-Form II
x[n] y[n] z-1 b0 z-1 b1 a1 z-1 b2 a2 bm-1 z-1 an-1 4/27/2019 bm an

128 Relation to the Impulse Response
Consider the input-output relationship: 𝑦 𝑛 =𝑎𝑦 𝑛−1 +𝑥 𝑛 Impulse response of which is: ℎ 𝑛 = 𝑎 𝑛 𝑢 𝑛 Z transform of h[n] is: 𝐻 𝑧 = 𝑛=0 ∞ 𝑎 𝑛 𝑧 −𝑛 = 𝑛=0 ∞ (𝑎 𝑧 −1 ) 𝑛 4/27/2019

129 The previous expression summation defines a geometric series:
𝑆= 𝑛=0 ∞ 𝑟 𝑛 = 1 1−𝑟 , 𝑟 <1 Applying the sum formula to the previously obtained result with give us: 𝐻 𝑧 = 𝑛=0 ∞ (𝑎 𝑧 −1 ) 𝑛 = 1 1−𝑎 𝑧 −1 , 𝑧 > 𝑎 The condition, 𝑧 > 𝑎 specifies the range of values for which this transformation exists. The z-pane region for which transformation exits specifies the region of convergence. 4/27/2019

130 Z-Domain Time-Domain Relationship
𝑎 𝑛 𝑢[𝑛] 𝑧 1 1−𝑎 𝑧 −1 Utilizing this result we can find the z-transform of: ℎ 𝑛 = 𝑏 0 𝑎 1 𝑛 + 𝑏 1 𝑎 1 𝑛−1 𝑢 𝑛−1 Using linearity and delay property of z transform we get: 4/27/2019

131 z-Transform 𝑏 − 𝑎 1 𝑧 −1 + 𝑏 1 𝑧 −1 1 1− 𝑎 1 𝑧 −1 = 𝑏 0 + 𝑏 1 𝑧 −1 1− 𝑎 1 𝑧 −1 4/27/2019

132 Poles and Zeros 𝐻 𝑧 = 𝑏 0 + 𝑏 1 𝑧 −1 1− 𝑎 1 𝑧 −1 𝑧 𝑧 = 𝑏 0 𝑧+ 𝑏 1 𝑧− 𝑎 1 = 𝑏 0 𝑧+ 𝑏 1 𝑏 0 𝑧− 𝑎 1 This transfer function has: The single pole 𝑧= 𝑎 1 , and Singe zero 𝑧=− 𝑏 1 𝑏 0 4/27/2019

133 Pole-Zero Plot 4/27/2019

134 Poles or Zeros at the Origin or Infinity
For the general IIR filter/system the number of poles always equals the number of zeros For FIR systems we saw that all of the poles were at z=0. It is also possible to have poles or zeros at z=∞. 4/27/2019

135 Example: Zero at z=∞ Consider: 𝐻 𝑧 = 2 𝑧 −1 1−0.8 𝑧 −1 = 2 𝑧−0.8 This system has a pole at z = 0.8 and a zero at z = ∞. 4/27/2019

136 Example: Zero at z=∞ Consider: 𝐻 𝑧 = 1+0.5 𝑧 −1 𝑧 −1 =𝑧+0.5
𝐻 𝑧 = 𝑧 −1 𝑧 −1 =𝑧+0.5 This system has a pole at z = ∞, and a zero at z = -0.5. 4/27/2019

137 Pole Locations and Stability
We know that these expressions give a time – z transform pair. ℎ 𝑛 = 𝑎 𝑛 𝑢 𝑛 ⟷ 1 1−𝑎 𝑧 −1 =𝐻 𝑧 Note that the system has a pole at z = a and a zero at z = 0; The impulse response decays to zero so long as |a|<1,which is equivalent to requiring that the pole lies inside the unit circle. System Stability: Causal LTI IIR systems, initially at rest, are stable if all of the poles of the system function lie inside the unit circle 4/27/2019

138 Example 𝐻 𝑧 = (1−5 𝑧 −1 ) 𝑧−0.995 Converting to positive powers of z: 𝐻 𝑧 = 𝑧−5 𝑧−0.995 yields 𝑃𝑜𝑙𝑒 𝑎𝑡 𝑧=0.995 4/27/2019

139 Example: second-Order H(z)
Suppose that H(z) is 𝐻 𝑧 = 𝑧 −1 1−1.4 𝑧 − 𝑧 −2 = 𝑧 𝑧 𝑧 2 −1.4𝑧+0.81 = 𝑧 𝑧 𝑧− 0.7+𝑗 𝑧− 0.7−𝑗0.4 2 4/27/2019

140 In polar form the poles are 𝑝 1,2 =0. 9 𝑒 ±𝑗0
In polar form the poles are 𝑝 1,2 =0.9 𝑒 ±𝑗0.680 , hence the poles are inside the unit circle and th system is stable. Stability can be checked using MATLAB tool zplane() to plo tht epolse and zeros: >> zplane([1 0.2],[ ]) 4/27/2019

141 Frequency Response of an IIR Filter
The frequency response is found by letting 𝑧→ 𝑒 −𝑗𝜔 in the system function (provided the system is stable) 𝐻 𝑒 −𝑗𝜔 = 𝐻(𝑧) 𝑧= 𝑒 −𝐽𝜔 4/27/2019

142 Example 𝐻 𝑧 = 𝑧 −1 1−1.4 𝑧 − 𝑧 −2 Making the substitution 𝑧= 𝑒 𝑗𝜔 we get: 𝐻 𝑒 𝑗𝜔 = 𝑒 −𝑗𝜔 1−1.4 𝑒 −𝑗𝜔 𝑒 −𝑗2𝜔 Use MATLAB freqz() to plot the magnitude and phase 4/27/2019

143 4/27/2019

144 This particular filter is a bandpass filter because it has a relative large magnitude response over a narrow band of frequencies and small response otherwise From the earlier pole-zero analysis, the peak gain is near the angle the poles make to the real axis, 𝜔 0 =±0.680 4/27/2019

145 Example 𝐻 𝑧 = 1 1−0.8 𝑧 −1 The frequency response is obtained by first substituting 𝑧= 𝑒 𝑗𝜔 𝐻 𝑒 𝑗𝜔 = 1 1−0.8 𝑒 −𝑗𝜔 Plotting using MATLAB freqz() function we get: 4/27/2019

146 >> w = -pi:(pi/500):pi; >> H = freqz(1,[1 -0.8],w);
4/27/2019

147 Example 𝐻 𝑧 = 𝑧 −1 As we did in previous example we substitute 𝑧= 𝑒 𝑗𝜔 𝐻 𝑒 𝑗𝜔 = 𝑒 −𝑗𝜔 Plotting using MATLAB freqz() function we get: 4/27/2019

148 >> w = -pi:(pi/500):pi; >> H = freqz(1,[1 0.8],w);
4/27/2019

149 The Inverse z-Transform and Applications
4/27/2019

150 The Inverse z-Transform and Applications
Finding the impulse response of a first-order IIR system was not too difficult using difference equation recursion, but for N>1 system order, this process becomes too difficult We need an inverse z-transform approach that will allow us to work from any rational system function, H(z), backwards to h[n] Useful z-transform properties and pairs available to help this cause are listed below 4/27/2019

151 z-Transform Relations
x[n] 𝒛 X(z) 1. 𝑎 𝑥 1 𝑛 +𝑏 𝑥 2 𝑛 𝑎 𝑋 1 (𝑧)+𝑏 𝑋 2 (𝑧) 2. 𝑥[𝑛− 𝑛 0 ] 𝑧 − 𝑛 0 𝑋(𝑧) 3. 𝑦 𝑛 =𝑥 𝑛 ∗ℎ[𝑛] 𝑌 𝑧 =𝑋 𝑧 𝐻(𝑧) 4. 𝛿[𝑛] 1 5. 𝛿[𝑛− 𝑛 0 ] 𝑧 − 𝑛 0 6. 𝑎 𝑛 𝑢[𝑛] 1 1−𝑎 𝑧 −1 4/27/2019

152 A General Procedure for Inverse z-Transformation
The technique we develop here uses an algebraic decomposition known as partial fraction expansion The function we wish to inverse transform, H(z), is assumed for now to be proper rational, meaning that M<N 4/27/2019

153 Step 1: Factor the denominator polynomial into pole factors of the form: 1− 𝑝 𝑘 𝑧 −1 , 𝑘=1,2,…,𝑁 Step 2: Create partial fraction expansion of the H(z): 𝐻 𝑧 = 𝑘=1 𝑁 𝐴 𝑘 1− 𝑝 𝑘 𝑧 −1 Where 𝐴 𝑘 =𝐻 𝑧 1− 𝑝 𝑘 𝑧 −1 𝑧= 𝑝 𝑘 Step 3: The inverse z transform is: ℎ[𝑛]= 𝑘=1 𝑁 𝐴 𝑘 𝑝 𝑘 𝑛 𝑢[𝑛] 4/27/2019

154 The limitation of this approach is that the are distinct
In general there may be repeated poles, in which case the partial fraction expansion takes a slightly different form from step 2 Hence, at present we will only consider non-repeated poles 4/27/2019

155 Example M=1, N=2 𝐻 𝑧 = 1+2 𝑧 −1 1− 3 4 𝑧 −1 + 1 8 𝑧 −2
𝐻 𝑧 = 1+2 𝑧 −1 1− 3 4 𝑧 − 𝑧 −2 Finding the roots of the H(z): 𝑝 1,2 4/27/2019


Download ppt "Z Transforms Dr. Veton Kepuska."

Similar presentations


Ads by Google