Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

EENG 4308 Matlab 1 Name objectives, using Matlab to generate partial fractions e

ID: 2079137 • Letter: E

Question

EENG 4308 Matlab 1 Name objectives, using Matlab to generate partial fractions expansion, put ratio of polyn omials in form suitable for partial fraction expansion, and use Matlab to generate pole zero diagrams. s +3 imple roots (real) Y(s) use residue operation in matlab s-2 Case 2 repeated roots (real Y(s) poly and then residue matlab operations Case 3 degree of numerator not less than degree of denominator (real roots) Y(e) use residue operation Case 4 complex use residue operation -& 20 Directions for presentation of information from Matlab All four cases wi require use of "residue" matlab operation nformation directly provided from Matlab on command line wi need to be reported. For each case use following format paying attention to specific notation ndicated here. [R1, P1, K1] residue (B, A) to be applied to each case any variable Note defined in a matlab program can be echoed to command window when desired All four cases will require a quantitative partial fractions interpretation in standard analytic form. definitely not Matlab format consistent either simple or repeated with that used to cases of roots latter appropriate for case 2) residue in All arrays regardless of it appearing numerator etc column or row format. on screen command window) Can reported in row format This is only to save space in this Case 2 will require use of poly command. report from matlab format poly (C) which will you Can use turn out to be consistent with subsequent use of residue command notation Final explicit instructions allow for generation of Pole zero plots with matlab generated output used in lieu of fill in by hand is FYI omputer not going to be acceptable When imply dash to fill in for omputer outputs inputs required in this report long string of zeros after decimal you can When computer outputs and should drop the zeros to save space e.g. computer out tputs 2.0000 place with 2

Explanation / Answer

%%%%% PART A %%%%%%%%
clc % clear command prompt.
close all % close previous program.
%%%%%%%%%%%%% case 1: simple roots%%%%%%%%%%%%%%
B=[1 3]% numerator of transfer function
A=[1 3 2]% denominator of the transfer function
[R,P,K]=residue(B,A)% to find residues of the transfer function.

%%%%%%%%%%%%%% case 2 %%%%%%%%%%%%%%%%%%
B1=[1 -2]% numerator of transfer function
A1=conv([1 0],[conv([1 1],[conv([1 1],[1 1])])]);
% denominator of the transfer function
C=poly(A1)% To find polynomials of denominator
[R1,P1,K1]=residue(B1,A1)% to find residues of the transfer function.

%%%%%%%%%%%%%% case 3%%%%%%%%%%%%%%%%%
B2=[2 9 11 2]% numerator of transfer function
A2=[1 4 3]% denominator of the transfer function
[R2,P2,K2]=residue(B2,A2)% to find residues of the transfer function.

%%%%%%%%%%%%%%%% case 4%%%%%%%%%%%%%%%%
B3=[1 0]% numerator of transfer function
A3=[1 -8 20]% denominator of the transfer function
[R3,P3,K3]=residue(B3,A3)% to find residues of the transfer function

%%%%%% PART B %%%%%%%

%%%%%%% generate pole zero diagram%%%%%%%%%
num=B;% numerator of transfer function
den=A;% denominator of the transfer function
sys=tf(num,den)% represent system transfer function.
figure(1)
hold on
pzmap(sys)% pole zero representation.
title 'case 1 simple roots'
hold off
%%%%COMMENTS:
% 1. roots are simples lies on left half S-plane
% 2. system is stable.

%%%%%% generate pole zero diagram%%%%%%%
num1=B1;% numerator of transfer function
den1=A1;% denominator of the transfer function
sys=tf(num1,den1)% represent system transfer function.
figure(2)
hold on
pzmap(sys)% pole zero representation.
axis([-2 +1 -2 +2])% x,y _ axis defining
title 'case 2 repeated roots'
hold off
%%%%COMMENTS:
% 1. roots are repeated at origion of a S-plane
% 2. system is unstable.

%%%%%%%%% generate pole zero diagram%%%%%%%%%%%%%%%
num2=B2;% numerator of transfer function
den2=A2;% denominator of the transfer function
sys=tf(num2,den2)% represent system transfer function.
figure(3)
hold on
pzmap(sys)% pole zero representation.
title 'case 3 improper transfer function for partial fraction expansion'
hold off
%%%%COMMENTS:
% 1. order of the numerator greater than the denominator improper trans
% function.
% 2. system is stable.

%%%%%% generate pole zero diagram%%%%%%%%%%%%%%
num3=B3;%numerator of transfer function
den3=A3;% denominator of the transfer function
sys=tf(num3,den3)% represent system transfer function.
figure(4)
hold on
pzmap(sys)% pole zero representation.
title 'case 4 complex roots'
hold off
%%%%COMMENTS:
% 1. the roots are lies on right half of the S-plane system is unstable.
% 2. system is unstable.