<<

Digital Processing Module 3 Z-Transforms

Objective:

1. To have a review of z-transforms. 2. Solving LCCDE using Z-transforms.

Introduction:

The z-transform is a useful tool in the analysis of discrete-time and systems and is the discrete-time counterpart of the for continuous-time signals and systems. The z-transform may be used to solve constant coefficient difference equations, evaluate the response of a linear time-invariant system to a given input, and design linear filters. Description: Review of z-Transforms Bilateral z-Transform Consider applying a complex exponential input x(n)=zn to an LTI system with h(n). The system output is given by

∞ ∞ 푦 푛 = ℎ 푛 ∗ 푥 푛 = ℎ 푘 푥 푛 − 푘 = ℎ 푘 푧 푛−푘 푘=−∞ 푘=−∞ ∞ = 푧푛 ℎ 푘 푧−푘 = 푧푛 퐻(푧) 푘=−∞ ∞ −푘 ∞ −푛 Where 퐻 푧 = 푘=−∞ ℎ 푘 푧 or equivalently 퐻 푧 = 푛=−∞ ℎ 푛 푧 H(z) is known as the of the LTI system. We know that a signal for which the system output is a constant times, the input is referred to as an eigen function of the system and the amplitude factor is referred to as the system’s eigen value. Hence, we identify zn as an eigen function of the LTI system and H(z) is referred to as the Bilateral z-transform or simply z-transform of the impulse response h(n).

푍 The transform relationship between x(n) and X(z) is in general indicated as 푥 푛 푋(푧)

Existence of z Transform In general, ∞ 푋 푧 = 푥 푛 푧−푛 푛=−∞ The ROC consists of those values of ‘z’ (i.e., those points in the z-plane) for which X(z) converges i.e., value of z for which

∞ 푥 푛 푧−푛 < ∞ 푛=−∞ Since 푧 = 푟푒푗휔 the condition for existence is ∞ 푥 푛 푟−푛 푒−푗휔푛 < ∞ 푛=−∞

Since 푒−푗휔푛 = 1

∞ −푛 Therefore, the condition for which z-transform exists and converges is 푛=−∞ 푥 푛 푟 < ∞ Thus, ROC of the z transform of an x(n) consists of all values of z for which 푥 푛 푟−푛 is absolutely summable.

Relation between Z and Discrete Time 푗휔 푗휔 ∞ −푗휔푛 When 푧 = 푒 , 푋 푒 = 푛=−∞ 푥 푛 푒 corresponds to the Discrete Time Fourier transform (DTFT) of x(n), i.e.,푋 푧 푧 = 푒푗휔 = ℱ{푥 푛 }. Thez transform also bears a straight forward relationship to the DTFT when the complex variable 푧 = 푟푒푗휔 . To see this relationship, consider X(z) with 푧 = 푟푒푗휔 . ∞ 푋 푧 = 푟푒푗휔 = 푥 푛 푟−푛 푒−푗휔푛 푛=−∞ or

∞ 푋 푧 = 푟푒푗휔 = [푥 푛 푟−푛 ]푒−푗휔푛 = ℱ{푥 푛 푟−푛 } 푛=−∞ Unilateral z-Transform have considerable value in analyzing causal systems and particularly, systems specified by linear constant coefficient difference equations with non- zero initial conditions( i.e., systems that are not initially at rest). The Unilateral z- transform of a discrete time signal x(n) is defined as

∞ 푋 푧 = 푥 푛 푧−푛 푛=0

Properties of ROC:

The Z-transform has two parts which are, the expression and Region of Convergence respectively. Whether the Z-transform X(z) of a signal x(n) exists or not depends on the complex variable ‘z’ as well as the signal itself. All complex values of ‘z=rejω’ for which the summation in the definition converges form a region of convergence (ROC) in the z-plane. A circle with r=1 is called unit circle and the complex variable in z-plane is represented as shown in the Figure 3.1.

Figure 3.1 Unit circle in z-plane

Property 1:The ROC of X(z) consists of a ring in the z-plane centered about the origin.

Property 2:If the z-transform X(z) of x(n) is rational, then the ROC does not contain any poles but is bounded by poles or extend to infinity.

Property 3: If x(n) is of finite duration, then the ROC is the entire z-plane, except possibly z=0 and / or z=∞

Property 4: If x(nt) is a right sided sequence, and if the circle |z|=ro is in the ROC, then all finite values of z for which |z|>ro will also be in the ROC.

Property 5: If x(n) is a left sided sequence, and if the circle|z|=ro is in the ROC, then all values of z for which 0<|z|

Property 6: If x(n) is two sided, and if the circle |z|=ro is in the ROC, then the ROC will consist of a ring in the z-plane that includes the circle |z|=ro.

Property 7: Ifthe z-transform X(z) of x(n) is rational, and if x(n) is right sided, then the ROC is the region in the z-plane outside the outermost pole i.e., outside the circle of radius equal to the largest magnitude of the poles of X(z).

Property 8:If the z-transform X(z) of x(n) is rational, and if x(n) is left sided, then the ROC is the region in the z-plane inside the innermost pole i.e., inside the circle of radius equal to the smallest magnitude of the poles of X(z) other than any at z=0 and extending inward to and possibly including z=0.

Properties of Z-Transform The Properties of z-transform simplifies the work of finding the z-domain equivalent of a time domain function when different operations are performed on discrete signal like time shifting, time scaling, time reversal etc. These properties also signify the change in ROC because of these operations. These properties are also used in applying z- transform to the analysis and characterization of Discrete Time LTI systems. 1. Linearity 푍 If 푥1(푛) 푋1(푧) with ROC = R1 푍 and푥2(푛) 푋2(푧) with ROC = R2 푍 then 푎푥1 푛 + 푏푥2 푛 푎푋1 푧 + 푏푋2(푧), with ROC containing 푅1 ∩ 푅2 2. Time Shifting 푍 If 푥(푛) 푋(푧)with ROC= R ℒ then 푥 푛 − 푚 푧−푚 푋 푧 with ROC= R, except for the possible addition or deletion of the origin or infinity 3. Scaling in the z-Domain 푍 If 푥(푛) 푋(푧) with ROC= R 푍 푛 푧 then 푧표 푥 푛 푋 with ROC= |zo|R where, |zo|R is the scaled version of R. 푧표 4. Time Reversal 푍 If 푥(푛) 푋(푧) with ROC= R 푍 1 1 then 푥 −푛 푋 with ROC= 푧 푅 5. Conjugation 푍 If 푥(푛) 푋(푧) with ROC= R ℒ then 푥∗ 푛 푋∗ 푧∗ with ROC= R 6. The Convolution Property 푍 If 푥1(푛) 푋1(푧) with ROC = R1 푍 and푥2(푛) 푋2(푧) with ROC = R2 ℒ then 푥1 푛 ∗ 푥2 푛 푋1 푧 . 푋2(푧), with ROC containing 푅1 ∩ 푅2 7. Accumulation 푍 If 푥(푛) 푋(푧) with ROC = R then ℒ 1 푛 푥(푘) 푋 푧 . , with ROC containing 푅 ∩ { 푧 > 1} 푘=−∞ 1−푧 −1 8. Differentiation in the z-Domain 푍 If 푥(푛) 푋(푧) with ROC= R 푍 푑푋(푧) then 푛푥(푛) − 푧 with ROC = R 푑푧 9. The Initial Value Theorems If x(n)=0, for n < 0 then initial value of x(n) i.e., 푥 0 = lim푧→∞ 푋(푧) 10. The Final Value Theorem If x(n) is causal and X(z) is the z-transform of x(n) and if all the poles of X(z) lie strictly inside the unit circle except possibly for a first order pole at z=1 then lim 푥 푛 = lim(1 − 푧−1)푋(푧) 푁→∞ 푧→1 Inverse z-transform Inverse z-transform maps a function in z-domain back to the time domain. Since discrete system analysis is usually easier in z-domain, the process is to convert the discrete system time domain representation to z-domain (both system and inputs),perform system analysis in z-domain and then convert back to the time domain representation for the response. The reason to do this process in this convoluted way is that due to its properties, the z-transform converts the Linear Constant Coefficient Difference Equations (LCCDE) that describe system behaviour to a polynomial. Also the convolution operation which describes the system action on the input signals is converted to a multiplication operation. These two properties make it much easier to do systems analysis in the z-domain. Inverse z-transform is performed using Long Division Method (Power Series Expansion method), Partial Fraction Expansion and Residue method (Contour Integral Method). Partial Fraction Expansion Method As we know that the rational form of X(z) can be expanded into partial fractions, Inverse z-transform can be taken according to location of poles and ROC of X(z). Following steps are to be performed for partial fraction expansions: Step 1: Arrange the given X(z) as, 푋(푧) 푛푢푚푒푟푎푡표푟 푝표푙푦푛표푚푖푎푙 = 푧 푧 − 푝1 푧 − 푝2 … (푧 − 푝푁) Step 2: 푋(푧) 퐴 퐴 퐴 퐴 = 1 + 2 + 3 + ⋯ + 푁 푧 푧 − 푝1 푧 − 푝2 푧 − 푝3 푧 − 푝푁

Where Ak for k=1, 2,…N are the constants to be found in partial fractions. Poles may be of multiple order. The coefficients will be calculated accordingly. Step 3: Above equation can be written as 퐴 푧 퐴 푧 퐴 푧 퐴 푧 푋 푧 = 1 + 2 + 3 + ⋯ + 푁 푧 − 푝1 푧 − 푝2 푧 − 푝3 푧 − 푝푁

퐴1 퐴2 퐴3 퐴푁 = −1 + −1 + −1 + ⋯ + −1 1 − 푝1푧 1 − 푝2푧 1 − 푝3푧 1 − 푝푁푧

퐴푘 Step 4:All the terms in above step are of the form −1. Depending upon ROC, following 1−푝푘 푧 standard pairs must be used.

푍 푛 1 푝푘 푢(푛) −1 with ROC: |z| >|푝푘 |,i.e., causal response 1−푝푘 푧 푍 푛 1 −푝푘 푢(−푛 − 1) −1 with ROC: |z| <|푝푘 |,i.e., non-causal response 1−푝푘 푧

Solving LCCDE using z-transforms The One-Sided Z-Transform The one-sided, or unilateral, z-transform is defined by ∞ 푋 푧 = 푥 푛 푧−푛 푛=0 The primary use of the one-sided z-transform is to solve linear constant coefficient difference equations that have initial conditions. Most of the properties of the one-sided z-transform are the same as those for the two-sided z-transform. One that is different, however, is the shift property. Specifically, if x(n) has a one-sided z-transform X1(z),the one-sided z-transform of x(n - 1) is

It is this property that makes the one-sided z-transform useful for solving difference equations with initial conditions.

To solve a linear constant coefficient difference equation, three steps are involved: 1. Replace each term in the difference equation by its z-transform and insert the initial condition(s). 2. Solve the resulting algebraic equation. (Thus gives the z-transform Y (z) of the solution sequence.) 3. Find the inverse z-transform of Y (z). Characterization of LSI systems using z-transforms and ROC

Many properties of discrete-time LTI systems can be closely associated with the characteristics of H(z) in the z-plane and in particular with the pole locations and the ROC.

1.Causality: For a causal discrete-time LTI system, we have

since h[n] is a right-sided signal, the corresponding requirement on H(z) is that the ROC of H(z) must be of the form

That is, the ROC is the exterior of a circle containing all of the poles of H(z) in the z-plane. Similarly, if the system is anti-causal, that is,

then h[n] is left-sided and the ROC of H(z) must be of the form

That is, the ROC is the interior of a circle containing no poles of H(z) in the z-plane.

2. Stability: A discrete-time LTI system is BIB0 stable if and only if

The corresponding requirement on H(z) is that the ROC of H(z) contains the unit circle (that is, |z| = 1).

3. Causal and Stable Systems:

If the system is both causal and stable, then all of the poles of H(z) must lie inside the unit circle of the z-plane because the ROC is of the form lzl> r, and since the unit circle is included in the ROC, we must have r < 1.

Illustrative Examples:

Problem 1: Consider the linear constant coefficient difference equation

find the solution to this equation assuming that x(n) = δ(n - 1 ) with y(-1) = y(-2) = 1 . Solution:

We begin by noting that if the one-sided z-transform of y(n) is Y1( z ) ,the one-sided z- transform of y(n - 2) is

Therefore, taking the z-transform of both sides of the difference equation, we have

-1 where X1(z) = z . Substituting for y ( - 1) and y(-2), and solving for Yl(z ), we have

To find y(n), note that Yl(z) may be expanded as follow:

Therefore

Problem 2: Use the z-transform to perform the convolution of the following two sequences:

Solution: The convolution theorem for z-transforms states that if y(n) = h(n) * x(n), the z-transform of y(n) is Y(z) = H(z)X (z). With

it follows that

Multiplying these two polynomials, we have

By inspection, we then have for the sequence y(n),

Problem 3: Determine H(z) and its poles and zeros for the system described by difference equation

Solution: Taking z-transform

Hence solving numerator and denominator polynomials The zero locations are z=0 and z= -1 The pole locations are z= - ½ and z= -1/4 Summary: Bi-lateral z-transforms are used to comment on the nature of LSI systems and unilateral z- transforms are used for solving the LCCDE with and without initial conditions.

Assignment:

Problem 1: Consider the LCCDE

Find a set of initial conditions on y(n) for n < 0 so that y(n) = 0 for n ≤ 0.

Problem 2: Consider a system described by the difference equation

Find the response of this system to the input with initial conditions y(- 1) = 0.75 and y(-2) = 0.25

Problem 3: Use the z-transform to perform the convolution of the following two sequences:

Problem 4: Consider an LTI system, initially at rest, described by the difference equation

a) Determine the impulse response of the system b) What is the response of the system to the input signal

Problem 5: Determine the impulse response of the causal system given below by finding the homogeneous and particular solutions and discuss on stability

Simulation: To Calculate Unit Impulse Response (Unit Sample), Unit Step Response of the given LTI system

Input: type the numerator vector [1,1/4] type the denominator vector [1,-3/8,-2/3] Program: %To calculate Unit Impulse response clc; clear all; close all; % Given system %y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1) num = input ('type the numerator vector '); den = input ('type the denominator vector '); N = input ('type the desired length of the output sequence N '); n = 0 : N-1; h=impz(num,den); disp('The impulse response of LTI system is'); disp(h(1:N)); stem(n,h(1:N)) xlabel ('time index n'); ylabel ('Amplitude '); title ('Impulse Response of LTI system');

% To calculate Unit Step response % Given system %y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1) num = input ('type the numerator vector '); den = input ('type the denominator vector '); N = input ('type the desired length of the output sequence N '); n = 0 : 1 : N-1; s=stepz(num,den); disp('The step response of LTI system is'); disp(s(1:N)); stem(n,s(1:N)) xlabel ('time index n'); ylabel ('s(n)'); title ('Step Response of LTI system');

% Pole – Zero Map in Z- Domain clc; clear all; close all; %z-domain LTI system %y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1) a= input('Enter the Numerator coefficients'); b = input('Enter the Denominator coefficients'); [z1,p1,k]=tf2zp(a,b); disp('pole locations are');p1 disp('zero locations are');z1 figure, zplane(a,b)

OUTPUT: pole locations are p1 = 1.0252 -0.6502 zero locations are z1 = -0.2500

References:

1. Digital , Principles, Algorithms and Applications – John G Proakis, Dimitris G Manolakis, Pearson Education / PHI, 2007 2. Discrete Time Signal Processing – A V Oppenheim and R W Schaffer, PHI, 2009 3. Digital Signal Processing – Monson H.Hayes – Schaum’s Outlines, McGraw-Hill,1999 4. Fundamentals of Digital Signal Processing using Matlab – Robert J Schilling, Sandra L Harris, Thomson 2007. 5. Digital Signal processing – A Practical Approach, Emmanuel C Ifeachor and Barrie W Jervis, 2nd Edition, PE 2009 6. Digital Signal Processing – A Computer Based Approach, Sanjit K.Mitra, McGraw Hill,2nd Edition, 2001