You are on page 1of 4

Take home exam 3 -S&CT – Beatriz Pérez

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.

Explain the result.


-Concentration not completely steady state, the system must be asymptotically stable?Definition of
stable system, does the asympotycally one keeps oscillating as time goes to infinity? The system?
Or just the concentration? It will be confirmed when linearising the system and obtained the matrix
A-
-The reaction rate (x2) interpreted for example as hydrolised cellulose per hour, grows until
achieving a constant value, x2=0.5583.
-It is a stable system because it does not explode and go to infinite.

b.Obtenemos lo mismo con ode45 que con lsim?


No! tengo que revisar matrices . .> When it comes to represent non linear and linear : tutorial 1
Simulate the linearised prey/predator model, using the Matlab function lsim, under steady states
conditions with x1ss=2.5, x2ss=1.5, Δ𝑥𝑥(0)=􁉂00􁉃 and Δ𝑢𝑢=􁉂00􁉃. ¡¡ we didn't perturbe the initial
conditions!!!
.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: THE1
Present the simulation results of a step response (that is e.g. from u(t) = u to

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)

It gives two solutions:


If x2=0.4317 then x1=0.3475
if x2=-0.2317 then x1=-0.6475

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.

The linearised system has the tipical LTI matrices associated:

[ ]
𝐴 = − 𝑥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 ]

From the control law the second input is derived:

𝑢(𝑡) = [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 ;

So the closed-loop system is defined by:

Dotx=Afb*xB,C,D

U= [0.01*ones( … 0.01) 0.01*ones]

lsim

You might also like