Você está na página 1de 4

DHOLE PATIL COLLEGE OF ENGG.

WAGHOLI , PUNE SUBJECT: DIGITAL SIGNAL PROCESSING Experiment No: Date of Performance: Grade: Title: Total response using Z-transform Class: T.E (I sem) Signature:

AIM: To solve the difference equation and find the system response using Z transform. THEORY: 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. The function notation for sequences is used in the study and application of ztransforms. Consider times a function , where defined for that is sampled at

is the sampling period (or rate). We can write the . Without loss of generality we will . The definition of the z. z-transform is defined as follows

sample as a sequence using the notation set and consider real sequences such as,

transform involves an infinite series of the reciprocals Given the sequence the

which is a series involving powers of

ALGORITHM: 1. Start. 2. Store the coefficients of y(n) in a matrix a 3. Store the coefficients of x(n) in a matrix b. 4. Store initial conditions of y and x given in a matrix Y and X resp. 5. Find the constants using an inbuilt command filtic() and store it in xic. 6. Now, store the coefficients of the numerator and the denominator of X(Z) in matrices b x and ax respectively. 7. Obtain coefficients of numerator of Y(Z) by adding the convolved output of (b,bx) and (xic,ax) and store it in a variable by. 8. Obtain coefficients of denominator of Y(Z) by adding the convolved output of and store it in a variable ay. 9. Use the inbuilt function residuez() to obtain the residues and hence y(n). 10. Stop PROCEDURE: Open MATLAB Open new M-file Type the program Save in current directory Compile and Run the program For the output see command window\ Figure window

MATLAB CODE % Program to calculate the total response by z-transform %Let the differnce equation %y(n)=1/3[x(n)+x(n-1)+x(n-2)}+0.95y(n-1)+.9025y(n-2) %where x(n)=cos(n*pi/3) %y(-1)=-2 %y(-2)=-3

%x(-1)=1 %x(-2)=1 clc; clear all; %Coefficients of y(z) a=[1 -.95 .9025]; %Coefficients of x(z) b=[1/3 1/3 1/3]; %Intial conditions of y Y=[-2 -3]; %Intial conditions of x X=[1 1]; %To find the constant by using filtic command Xic = filtic (b,a,Y,X); %Coefficients of numerator of x bx=[1 -.5]; %coefficients of denominator of x ax=[1 -1 1]; %coefficients of numerator of y by=conv(b,bx) + conv(Xic,ax); %coefficients of denominator of y ay=conv(a,ax); %To obtain y(n) by residuez method [r p c]=residuez(by,ay)

COMMAND WINDOW r= 0.0584 - 3.9468i 0.0584 + 3.9468i 0.8453 + 2.0311i 0.8453 - 2.0311i p= 0.5000 + 0.8660i 0.5000 - 0.8660i 0.4750 + 0.8227i 0.4750 - 0.8227i

c= [] CONCLUSION: Hence, we have successfully calculated the total response of the given difference equation by Z-transform method and have verified it practically.

Você também pode gostar