Observer and state-space model
Problemè 1
Consider the following state-space model:
x˙y=00−510−6010x+001u=[100]x
Design an observer to place the observer poles at -10, -10, -15
Solution
The characteristic equation of the observer is given by:
det(sI−(A−LC))=(s+10)(s+10)(s+15)=s3+35s2+350s+1500
From the coefficients of the characteristic equation we get
det(sI−(A−LC))=s3+(l1−6)s2+(l2−5−6l1)s+(l3−5l2)
Solving for the coefficients we get the observer gain matrix:
L=450560141
Thus the observer dynamics are given by:
x^˙=00−510−6010x^+001u+450560141(y−y^)
Problemè 2
Given the plant
x˙y=[−1012]x+[01]u=[11]x
Design an integral controller to yield a 10% overshoot, 0.5 second settling time and zero steady-state error for a step input.
Solution
The code for the integral controller is given by p2.py.
Add an integrator to the plant to ensure zero steady-state error for a step input.
The augmented state-space model becomes:
x˙a=−10−112−1000xa+010u
y=[110]xa
where
x_a = \begin{bmatrix}
x \\
\int e \, dt \\
\end{bmatrix}
$$ and $e = r - y$ is the tracking error.
Then, design the state feedback gains
K = \begin{bmatrix}
k_1 & k_2 & k_i \
\end{bmatrix}
suchthattheclosed−loopsystemmeetsthetransientresponsespecifications.Thecharacteristicequationoftheclosed−loopsystemis:
\left| sI - (A_a - B_aK) \right| = 0
Expandingthisyields:
(s + k_1)(s^2 + (1 - k_2)s + k_i) = 0
Thecontrollawthengivenby:
u = -Kx_a = -k_1x_1 - k_2x_2 - k_i\int{e , dt}
Thecodeyields:‘‘‘prologzeta:0.5911550337988974omegan:13.53282902556064Desiredpoles:[−8.+10.91501083j−8.−10.91501083j−135.32829026+0.j]Plantmodel:<LinearIOSystem>:sys[2]Inputs(1):[′u[0]′]Outputs(1):[′y[0]′]States(2):[′x[0]′,′x[1]′]A=[[−1.1.][0.2.]]B=[[0.][1.]]C=[[1.1.]]D=[[0.]]Augmentedplantmodel:<LinearIOSystem>:sys[3]Inputs(1):[′u[0]′]Outputs(1):[′y[0]′]States(3):[′x[0]′,′x[1]′,′x[2]′]A=[[−1.1.0.][0.2.0.][−1.−1.0.]]B=[[0.][1.][0.]]C=[[1.1.0.]]D=[[0.]]Statefeedbackgains:K=[[−10193.77795361152.32829026−12391.83976888]]Integralcontrollertransferfunction:−1.239e+04−−−−−−−−−−sOpen−looptransferfunction:<LinearICSystem>:sys[6]Inputs(1):[′u[0]′]Outputs(1):[′y[0]′]States(3):[′sys[4]x[0]′,′sys[2]x[0]′,′sys[2]x[1]′]A=[[−0.00000000e+000.00000000e+000.00000000e+00][0.00000000e+00−1.00000000e+001.00000000e+00][−1.23918398e+040.00000000e+002.00000000e+00]]B=[[1.][0.][0.]]C=[[0.1.1.]]D=[[0.]]Closed−looptransferfunction:<LinearICSystem>:sys[9]Inputs(1):[′u[0]′]Outputs(1):[′y[0]′]States(3):[′sys[6]sys[4]x[0]′,′sys[6]sys[2]x[0]′,′sys[6]sys[2]x[1]′]A=[[0.00000000e+00−1.00000000e+00−1.00000000e+00][0.00000000e+00−1.00000000e+001.00000000e+00][−1.23918398e+040.00000000e+002.00000000e+00]]B=[[1.][0.][0.]]C=[[0.1.1.]]D=[[0.]]‘‘‘