





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The matlab code and results for lab 9 of a control systems engineering course, focusing on finding transfer functions and plotting their step responses for three different systems.
Typology: Exercises
1 / 9
This page cannot be seen from the preview
Don't miss anything!






syms s _% T = (C((sI-A)^-1))B + D_*
% first: A1 = [-1 1;65 0];
B1 = [1 1 ;1 0];
C1 = [1 0;0 1]; D1 = [0 0;0 0];
I1 = eye(2);
T1 = (C1(inv((sI1)-A1)))*B1 + D [num1 den1] = ss2tf(A1,B1,C1,D1,1)
step(A1,B1,C1,D1)
% second:
A2 = [0 1 0 0;0 0 1 0; 0 0 0 1;-3 -3 -3 -2];
I2 = eye(4);
T2 = (C2(inv((sI2)-A2)))*B2 + D
[num2 den2] = ss2tf(A2,B2,C2,D2,1)
figure, step(num2, den2) figure, pzmap(num2, den2)
%third: A3 = [-3 1 0 4 2;-3 5 -5 2 -1;0 1 -1 2 8;-7 6 -3 -4 0;-6 0 4 -3 1];
B3 = [2; 7; 6; 5; 4];
C3 = [1 -2 -9 7 6]; D3 = 0;
I3 = eye(5);
T3 = (C3(inv((sI3)-A3)))*B3 + D
[num3 den3] = ss2tf(A3,B3,C3,D3,1)
figure, step(num3, den3)
figure, pzmap(num3, den3)
[ s/(s^2+s-65)+1/(s^2+s-65), s/(s^2+s-65)]
[ 65/(s^2+s-65)+(s+1)/(s^2+s-65), 65/(s^2+s-65)]
num1 =
den1 =