0% found this document useful (0 votes)
15 views

Lab Report#4 - CS

This lab report describes tasks completed for a control systems lab involving state space representation and pole-zero mapping. Task 1 generates the state space representation from a 6th order system using MATLAB. Task 2 converts the state space model to a transfer function. Task 3 obtains the symbolic transfer function using two different methods and confirms they match.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Lab Report#4 - CS

This lab report describes tasks completed for a control systems lab involving state space representation and pole-zero mapping. Task 1 generates the state space representation from a 6th order system using MATLAB. Task 2 converts the state space model to a transfer function. Task 3 obtains the symbolic transfer function using two different methods and confirms they match.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab Report# IV

Course: Control Systems


Instructor: Sir. Hussain Asif
Submitted by: Muhammad Fahad Siddiq
ID:150271
Dated:22nd October.2020

Department of Electrical Engineering


Faculty of Engineering
Air University, Islamabad

16 | P a g e
Lab#04
State Space Representation & Pole Zero Mapping

Lab Tasks
Task#1: Use MATLAB to generate the LTI state-space representation
derived in Prelab 1.
Hand Calculations:
𝑥 ′′ −1 −1 1 0 0 0 ⎡𝑥 ′ ⎤ 𝑥
⎡ ⎤ ⎡𝑥 ′⎤
⎡1 0 0 0⎤ ⎢ 𝑥 ⎥
⎢𝑥 ′⎥ 0 0 ⎢𝑥 ⎥
⎢𝑥 ′′⎥ ⎢⎢ 1 0 −1

1 0 1⎥ ⎢𝑥 ′⎥ + [1
⎢𝑥 ′⎥ = ⎢ 0 0 0 0 0 0 0] , 𝑦 = 𝑥 = [0 0 0 0 0 1] ⎢𝑥 ′⎥
0 1 0 0 0 ⎥⎢𝑥 ⎥ ⎢ ⎥
⎢ ⎥ ⎢0
⎢𝑥 ′′⎥ ⎣ 0 01 −1 −1 ⎥ ⎢𝑥 ′⎥ ⎢𝑥 ⎥
⎣𝑥 ′⎦ 0 0 0 0 1 0 ⎦⎣𝑥 ⎦ ⎣𝑥 ′⎦

The Matrix A(6x6),B,C(1x6) and D will be as below:


−1 −1 1 0 0 0
⎡1 0 0 0 0 0⎤
⎢ ⎥
A=⎢ 1 0 −1 1 0 1⎥, B=[10
0 0 0 0 0] , C=[0 0 0 0 0 1], D=[ ]
⎢ 0 0 10 0 0 ⎥
⎢ 0 0 0 1 −1 −1 ⎥
⎣ 0 0 00 1 0 ⎦

Code Output
%Task 1
clear all
close all
clc
A=[-1 -1 1 0 0 0;1 0 0 0 0
0;1 0 -1 1 0 1;0 0 1 0 0 0;
0 0 0 1 -1 -1;0 0 0 0 1 0];
B=[10;0;0;0;0;0];
C=[0 0 0 0 0 1];
D=[];
statespace=ss(A,B,C,D)

17 | P a g e
Task#2: Use MATLAB to generate the LTI state-space representation
derived in Prelab 1.

Code Output
%Task 1
clear all
close all
clc
A=[-1 -1 1 0 0 0;1 0 0 0 0
0;1 0 -1 1 0 1;0 0 1 0 0 0;
0 0 0 1 -1 -1;0 0 0 0 1 0];
B=[10;0;0;0;0;0];
C=[0 0 0 0 0 1];
D=[];
statespace=ss(A,B,C,D)
x=tf(statespace)

Task#3: Run the programs composed in Prelab 3 and Prelab 4 and obtain the
symbolic transfer functions by the two methods.

Code Output
%Task 3
clear all
close all
clc
syms s
A=[-1 -1 1 0 0 0;1 0 0 0 0
0;1 0 -1 1 0 1;0 0 1 0 0
0;0 0 0 1 -1 -1;0 0 0 0 1
0];
B=[10;0;0;0;0;0];
C=[0 0 0 0 0 1];
D=[];
statespace=ss(A,B,C,D);
x=tf(statespace);
I=eye(6)
a=s*I-A
b=inv(a);
T=C*b*B;
pretty(T)

________________________

18 | P a g e

You might also like