0% found this document useful (0 votes)
130 views8 pages

MATLAB Time Response Solution

This document is a student report summarizing the use of MATLAB to solve a state space control problem and analyze the transient time response. It contains the MATLAB code used to derive the time response equation from the state space model and compares the analytical solution to the numerical solution obtained in MATLAB. The report was submitted by a student named Abdelrhman Hussien Nassif for a systems dynamics and control course at Cairo University's aerospace engineering department.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views8 pages

MATLAB Time Response Solution

This document is a student report summarizing the use of MATLAB to solve a state space control problem and analyze the transient time response. It contains the MATLAB code used to derive the time response equation from the state space model and compares the analytical solution to the numerical solution obtained in MATLAB. The report was submitted by a student named Abdelrhman Hussien Nassif for a systems dynamics and control course at Cairo University's aerospace engineering department.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Cairo University

Aerospace Department
Spring 2013

Course: System Dynamics and


Control

Faculty Of Engineering
Third Year

State Space Approach


Problem Sheet #

Report Title
Solution of Time Response Problem Using MATLAB

Student
Name :

Abdelrhman Hussien Nassif

Grade:

B.N:

46

Date: 20/3/2013

Table of Contents
Introduction ........................................................................................................1
MATLAB Code..................................................................................................2
Transient Response .............................................................................................3
Conclusion .........................................................................................................4
References ..........................................................................................................5

List of Figures
Figure 1 Time response derived from equation (1)................................................3
Figure 2 Time Response using Step Syntax in MATLAB .....................................3

Introduction
Well solve this state space problem:
A= [

] , B= [

, C=[

To get the time response using Laplace transform solution of the state equation
with the aid of MATLAB symbolic toolbox well be able to solve the inverse
Laplace and get the response in the time domain.

MATLAB Code
A=[-0.5,-1.9,3.8;-1.9444,-2.0556,-3.8889;-0.9722,0.1722,-4.3444];
B=[1;-0.2;0];
C=[1,0,-.5];
X0=[0;0;0];
% Assumption
syms s;
U=1/s;
%Step input
SA=(s*eye(3))-A;
X= inv(SA)*(X0+(B*U));
Y=C*X;
Y=vpa(Y,3);
Yt=ilaplace(Y);
Yt=vpa(Yt,3);
pretty(Yt);
ezplot(Yt,[0,10]);
hold on ;
sys= ss(A,B,C,0);
step(sys);

The output of this code is as follows:


( )

(1)

Transient Response

Figure 1 Time response derived from equation (1)

Figure 2 Time Response using Step Syntax in MATLAB

Conclusion
Now weve concluded and verified that derived equation (1) could get the time
response for any state space model with any input.

References
MATLAB Symbolic Toolbox

You might also like