Lab 9: Studying State Space - Transfer Functions and Response Plots, Exercises of Control Systems

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

2011/2012

Uploaded on 07/30/2012

badsha
badsha 🇮🇳

4.3

(28)

213 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
P a g e | 1
Lab 9: Studying State Space FA06_BET_012
Lab Task 1
Find transfer function and plot their response:
1. A = B = C = D =
2. A = B = C = D =
3. X = X + r
y = X
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((s*I1)-A1)))*B1 + D1
[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];
Matlab Code:
docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Lab 9: Studying State Space - Transfer Functions and Response Plots and more Exercises Control Systems in PDF only on Docsity!

Lab 9: Studying State Space FA06_BET_

Lab Task 1

Find transfer function and plot their response:

1. A = B = C = D =

2. A = B = C = D =

3. X = X + r

y = X

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];

Matlab Code:

Lab 9: Studying State Space FA06_BET_

B2 = [0; 0; 0; 2];

C2 = [1 0 0 0];

D2 = 0;

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)

T1 =

[ 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 =

Results:

Lab 9: Studying State Space FA06_BET_

Simulink Block Diagram and Results:

Lab 9: Studying State Space FA06_BET_

y =

For Second part:

y =

syms s

% T = (C((sI-A)^-1))*B + D

% first:

A1 = [0 1 0 0 0 0; 0 -3 1 1 0 1; 0 0 0 1 0 0; 1 1 -1 -2 0 1;0 0 0 0 0 1;0 1 0 1 0 -3 ];

B1 = [0; 0; 0; 1; 0; 0];

C1 = [0 0 0 0 1 0];

D1 = 0

I1 = eye(6);

T1 = (C1(inv((sI1)-A1)))*B1 + D

[num1 den1] = ss2tf(A1,B1,C1,D1,1)

figure, step(num1, den1)

Matlab Codes:

Lab 9: Studying State Space FA06_BET_

figure, pzmap(num1, den1)

% second:

A2 = [0 1 0 0 0 0;-1 -2 0 1 1 1;0 0 0 1 0 0; 0 1 -1 -2 1 1; 0 0 0 0 0 1;1/3 1/3 1/3 1/3 -2/3 -2/3];

B2 = [0; 0; 0; 0; 0; 1/3];

C2 = [0 0 0 0 1 0];

D2 = 0;

I2 = eye(6);

T2 = (C2(inv((sI2)-A2)))*B2 + D

[num2 den2] = ss2tf(A2,B2,C2,D2,1)

figure, step(num2, den2)

figure, pzmap(num2, den2)

Results: