Transfer functions, poles and zeros.
-
Upload
arif-hussain -
Category
Engineering
-
view
77 -
download
8
Transcript of Transfer functions, poles and zeros.
Discrete Time Signal Processing Lab
1
Q1. Find the transfer function? Plot poles, zeros on z-plane?
MATLAB code
clc clear all close all %Q1 P1=[1/3; 2; 3]; %poles Z1=[-1]; %zeros figure(1); zplane(Z1, P1) %pole-zero plot command [num1, den1]=zp2tf(Z1, P1, 1); % get num denum of transfer function TF1=filt(num1,den1) % gives the transfer function,
Output
Q2. Poles and zeros are given, poles are complex. Plot poles, zeros on zplane. Find Transfer function?
MATLAB code
P2=[0.5j; -0.5j] ; %poles Z2=[1/4]; figure(2) zplane(Z2, P2) [num2, den2]=zp2tf(Z2, P2, 1); TF2=filt(num2,den2)
Discrete Time Signal Processing Lab
2
Output
The output pole zero plot is shown in figure2 above. And we got Transfer function at command window,
it was..
Q3. Poles and Zeros are given. Zeros are complex values. Plot poles, zeros on z-plane. Find
transfer function?
MATLAB code
P3=[0.65]; Z3=[0.65 + 0.65j; 0.65-0.65j]; figure(3) zplane(Z3, P3); [num3, den3]=zp2tf(Z3, P3, 1); TF3=filt(num3,den3)
Output
Discrete Time Signal Processing Lab
3
MATLAB code syms a x n n=(0:120) a1=0.6; x1=a1.^n; stem(n,x1) a2=-3; x2=a2.^n; stem(n,x2) a3=0.5*exp((pi/4)*j); x3=a3.^n; stem(n,x3)
%b part num4b=[0 1] denum4b=[1 -0.7] freqz(num4b,denum4b) denum4b2=[1 3] freqz(num4b,denum4b2)
The respective output plots are shown below, mentioned with detailed title.
Discrete Time Signal Processing Lab
4
Discrete Time Signal Processing Lab
5
Part c of this question was much similar to the part b of Q5 while solving, so it is solved once for part b os Q5. i.e same MATLAB commands are to be implemented.
MATLAB code
%a part P5=[-1/4; 1/3]; Z5=[-1/3]; figure(5) zplane(Z5, P5)
Discrete Time Signal Processing Lab
6
Code for part b of Q5 is written below, its output is mentioned with label in
above figures.
%b part [num5, den5]=zp2tf(Z5, P5, 1) TF5=filt(num5,den5) [Z5b,P5b,K] = tf2zp(num5,den5) roots([ 1.0000; -0.0833; -0.0833])
MATLAB code
b. finding poles and zeros using roots command
code
zeros=roots([2; 2; 2]) poles=roots([2; -3; 1])
output
finding poles and zeros using tf2zp command, output at command window shown
below.
Discrete Time Signal Processing Lab
7
a. Poles zeros plot using zplane command. MATLAB code
P6=([1.00; 0.500])
Z6=([-0.5000 + 0.8660i; -0.5000 - 0.8660i])
Zplane(Z,P)
Engr. Arif Hussain
COMSATS Abbottabad,
Pakistan.