You are on page 1of 4

Digital

Control Systems Homework #1


Student: Eronides F. da Silva Neto Professor: Frank Ferrese
This Matlab code computes the State Transition Matrix ( !" ) and the response
due to a step unit and impulse forced system. Also, after each execution we can
plot these results.
The inputs of this functions are: matrix A,B and zero. Where zero is initial
conditions. The outputs are the station transition matrix, the step unit response
and the unit response (both responses with initial conditions).
You can call in the matlab:
>> [T,f1,f2]=stmatrix(A,B,zero);

Example 01: (book example 7.7 Page 242-243)
Consider that the state space equations :

0
1
0
1
0
1
0
1
2 + 0
2 = 0
0
10
11
3
10
3
With initial conditions 0 = [0 0 0.01]!
T = (State Transition Matrix)
[ 1, exp(-10*t)/90 - (10*exp(-t))/9 + 11/10, exp(-10*t)/90 - exp(-t)/9 + 1/10]
[ 0, (10*exp(-t))/9 - exp(-10*t)/9, exp(-t)/9 - exp(-10*t)/9]
[ 0, (10*exp(-10*t))/9 - (10*exp(-t))/9, (10*exp(-10*t))/9 - exp(-t)/9]

Note that the State Transition Matrix is equal to the the inverse La Place
transform of (sI A)!!

f1 = (Response to step unit with initial conditions)


t + (111*exp(-t))/100 - (11*exp(-10*t))/1000 - 1099/1000
(11*exp(-10*t))/100 - (111*exp(-t))/100 + 1
(111*exp(-t))/100 - (11*exp(-10*t))/10

Figure 1 x1 Response due to a unit step input with initial conditions


Figure 2 x2 response due to a unit step input with initial conditions


Figure 3 x3 response due to a step unit input with initial condition


And then, the impulse response is:
f2 =

(1001*exp(-10*t))/9000 - (1001*exp(-t))/900 + 1001/1000
(1001*exp(-t))/900 - (1001*exp(-10*t))/900
(1001*exp(-10*t))/90 - (1001*exp(-t))/900








.M file

I have already submitted on blackboard the .m file for this homework.

You might also like