Professional Documents
Culture Documents
Take Home Exam 3
Take Home Exam 3
Pon subíndices!
Volver a hacer los commandos (repasar cifra exacta)
a. I used the function ode45 to simulate the nonlinear system. I suppose a constant u2, u2=0.02
In the plot, I go for a final time tf=140 since the asymptote x2=0.5583 is achieved around time
t=130. The second state keeps oscillating between 0.24 and 0.27. Simulating at later time instant
does not show anything else.
u(t) = u − 0.1 at an appropriate time instant) using the original non-linear system and
the linearised system in one figure
STEADY STATE AND CONTROLLABILITY/OBSERVABILITY
The steady state is obtained via MATLAB executing the commands:
u=[0.15 0.01];
a=0.1;b=0.2;
S=solve('-x1*x2+u(1)=0','a*x2*(b-x2)+u(2)=0','x1','x2')
S.x1
S.x2
eval(S.x1)
eval(S.x2)
I disregard the negative couple, since such numbers do not make sense for the reaction case. Then
the steady states:
x1ss=0.3475 and x2ss=0.4317
Simulation with ode45 introducing the given values also returns these values.
[ ]
𝐴 = − 𝑥2𝑠𝑠 − 𝑥1𝑠𝑠 0 𝑎𝑏 − 2𝑎𝑥2𝑠𝑠 ; 𝐵 = [1 0 0 1 ]; 𝐶 = [0 0]; 𝐷 = [0 0 ]
In order to find out the controllability and observability of the system again I used MATLAB.
Co=ctrb(A,B)
𝐶𝑜 = [1. 0000 0 − 0. 4317 − 0. 3475 0 1. 0000 0 − 0. 0663 ]
k=rank(Co) =2 controllable
W=obsv(A,C)
𝑊 = [1 0 − 0. 4317 − 0. 3475 ]
k1=rank(W)=2 observable
c. As long as the system is controllable the controller is realisable and is possible to apply “place” in
order to design the controller with the specified poles.
A=[-0.4317,-0.3475;0,-0.0663]
B=[1 0;0 1];
P=[-0.1,-0.5]';
K=place(A,B,P)
F=-K
𝐹 = [0. 3317 0. 3475 0 − 0. 4337 ]
𝑢2 =− 0. 4337𝑥2
d. I confirm that the desired poles can be found in the closed-loop system.
𝐴 + 𝐵𝐹 = 𝐴𝑏𝑓 = [− 0. 1 0 0 − 0. 5 ]
2
( ( ))
det 𝑑𝑒𝑡 λ𝐼 − 𝐴𝑏𝑓 = λ + 0. 6λ + 0. 05 = 0 ;
Dotx=Afb*xB,C,D
lsim