Kamil Dybeł
gr. 29
Teoria Sterowania
Sprawozdanie nr 2
Schemat układu:
Cd = C1 = C2 = C3
$q_{1} = \ C_{d}\sqrt{\frac{2}{\rho}}*A_{d}*\sqrt{p_{1} - p_{2}}$ ; p2 = pa = 0 ; p1 = ρgh1
$q_{n} = \ C_{d}\sqrt{\frac{2}{\rho}}*A_{d}*\sqrt{\text{\ ρg}h_{n}}$ ;
$\text{\ \ \ \ \ \ A}_{d}\ = \ tg\frac{\alpha}{2}*y_{z}^{2}$, gdzie
Cd – współczynnik oporu szczeliny
Ad− pole przekroju szczeliny
p1 – ciśnienie przed zaworem
p2 – ciśnienie za zaworem
Modelowanie układu w przestrzeni stanów:
Dobór zmiennych stanu, określenie sterowania oraz wyjść:
x1 = h1 u1 = q y1 = h1 = x1
x2 = h2 u2 = yZ1 y2 = h2 = x2
x3 = h3 u3 = yZ2 y3 = h3 = x3
u4 = yZ3
Matematyczny model układu:
$$\dot{h_{1}} = \ \frac{1}{A_{1}\rho}(q - q_{1})$$
$$\dot{h_{2}} = \ \frac{1}{A_{2}\rho}\left( q_{1} - q_{2} \right)$$
$$\dot{h_{3}} = \ \frac{1}{A_{3}\rho}(q_{2} - q_{3})$$
Zapis w formie równań stanu z uwzględnieniem założeń:
Równania wejść:
$$\dot{x_{1}} = \ \frac{1}{A_{1}\rho}(u_{1} - C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{2}^{2}*\sqrt{\text{\ ρg}x_{1}})$$
$$\dot{x_{2}} = \ \frac{1}{A_{2}\rho}(C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{2}^{2}*\sqrt{\text{\ ρg}x_{1}} - C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{3}^{2}*\sqrt{\text{\ ρg}x_{2}})$$
$$\dot{x_{3}} = \ \frac{1}{A_{3}\rho}(C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{3}^{2}*\sqrt{\text{\ ρg}x_{2}} - C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{4}^{2}*\sqrt{\text{\ ρg}x_{3}})$$
Linearyzacja równań wejścia:
Macierz A (macierz stanu o wymiarach n x n):
A = $\begin{bmatrix} \frac{\delta f_{1}}{\delta x_{1}} & \frac{\delta f_{1}}{\delta x_{2}} & \frac{\delta f_{1}}{\delta x_{3}} \\ \frac{\delta f_{2}}{\delta x_{1}} & \frac{\delta f_{2}}{\delta x_{2}} & \frac{\delta f_{2}}{\delta x_{3}} \\ \frac{\delta f_{3}}{\delta x_{1}} & \frac{\delta f_{3}}{\delta x_{2}} & \frac{\delta f_{3}}{\delta x_{3}} \\ \end{bmatrix}$
$$A_{11} = \frac{\delta f_{1}}{\delta x_{1}} = - \frac{1}{A_{1}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{20}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{10}}}$$
$$A_{12} = \frac{\delta f_{1}}{\delta x_{2}} = 0$$
$$A_{13} = \frac{\delta f_{1}}{\delta x_{3}} = 0$$
$$A_{21} = \frac{\delta f_{2}}{\delta x_{1}} = \frac{1}{A_{1}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{20}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{10}}}$$
$$A_{22} = \frac{\delta f_{2}}{\delta x_{2}} = - \frac{1}{A_{2}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{30}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{20}}}$$
$$A_{23} = \frac{\delta f_{2}}{\delta x_{3}} = 0$$
$$A_{31} = \frac{\delta f_{3}}{\delta x_{1}} = 0$$
$$A_{32} = \frac{\delta f_{3}}{\delta x_{2}} = \frac{1}{A_{2}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{30}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{20}}}$$
$$A_{33} = \frac{\delta f_{3}}{\delta x_{3}} = - \frac{1}{A_{3}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{40}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{30}}}$$
$$A\ = \ \begin{bmatrix}
A_{11} & 0 & 0 \\
A_{21} & A_{22} & 0 \\
0 & A_{32} & A_{33} \\
\end{bmatrix} = = \begin{bmatrix}
- \frac{1}{A_{1}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{20}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{10}}} & 0 & 0 \\
\frac{1}{A_{1}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{20}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{10}}} & - \frac{1}{A_{2}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{30}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{20}}} & 0 \\
0 & \frac{1}{A_{2}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{30}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{20}}} & - \frac{1}{A_{3}\rho}C_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*u_{40}^{2}*\sqrt{\text{\ ρg}}*\frac{1}{2\sqrt{x_{30}}} \\
\end{bmatrix}$$
Macierz B (macierz wejść o wymiarach n x r):
B = $\begin{bmatrix} \frac{\delta f_{1}}{\delta u_{1}} & \frac{\delta f_{1}}{\delta u_{2}} & \frac{\delta f_{1}}{\delta u_{3}} & \frac{\delta f_{1}}{\delta u_{4}} \\ \frac{\delta f_{2}}{\delta u_{1}} & \frac{\delta f_{2}}{\delta u_{2}} & \frac{\delta f_{2}}{\delta u_{3}} & \frac{\delta f_{2}}{\delta u_{4}} \\ \frac{\delta f_{3}}{\delta u_{1}} & \frac{\delta f_{3}}{\delta u_{2}} & \frac{\delta f_{3}}{\delta u_{3}} & \frac{\delta f_{3}}{\delta u_{4}} \\ \end{bmatrix}$
$$B_{11} = \frac{\delta f_{1}}{\delta u_{1}} = \frac{1}{A_{1}\rho}$$
$$B_{12} = \frac{\delta f_{1}}{\delta u_{2}} = {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{10}}*u_{20}$$
$$B_{13} = \frac{\delta f_{1}}{\delta u_{3}} = 0$$
$$B_{14} = \frac{\delta f_{1}}{\delta u_{4}} = 0$$
$$B_{21} = \frac{\delta f_{2}}{\delta u_{1}} = 0$$
$$B_{22} = \frac{\delta f_{2}}{\delta u_{2}} = {2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{10}}*u_{20}$$
$$B_{23} = \frac{\delta f_{2}}{\delta u_{3}} = {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{20}}*u_{30}$$
$$B_{24} = \frac{\delta f_{2}}{\delta u_{4}} = 0$$
$$B_{31} = \frac{\delta f_{3}}{\delta u_{1}} = 0$$
$$B_{32} = \frac{\delta f_{3}}{\delta u_{2}} = 0$$
$$B_{33} = \frac{\delta f_{3}}{\delta u_{3}}{= 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{20}}*u_{30}$$
$$B_{24} = \frac{\delta f_{3}}{\delta u_{4}} = {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{30}}*u_{40}$$
$B\ = \begin{bmatrix} B_{11} & B_{12} & 0 & 0 \\ 0 & B_{22} & B_{23} & 0 \\ 0 & 0 & B_{33} & B_{34} \\ \end{bmatrix}$=
$$= \begin{bmatrix}
\frac{1}{A_{1}\rho} & {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{10}}*u_{20} & 0 & 0 \\
0 & {2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{10}}*u_{20} & {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{20}}*u_{30} & 0 \\
0 & 0 & {2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{20}}*u_{30} & {- 2C}_{d}\sqrt{\frac{2}{\rho}}*tg\frac{\alpha}{2}*\sqrt{\text{\ ρg}x_{30}}*u_{40} \\
\end{bmatrix}$$
Równania wyjść- macierz C (macierz wyjść o wymiarach m x n):
y1 = x1
y2 = x2 C =$\ \begin{bmatrix} \frac{\partial g_{1}}{\partial x_{1}} & \frac{\partial g_{1}}{\partial x_{2}} & \frac{\partial g_{1}}{\partial x_{3}} \\ \frac{\partial g_{2}}{\partial x_{1}} & \frac{\partial g_{2}}{\partial x_{2}} & \frac{\partial g_{2}}{\partial x_{3}} \\ \frac{\partial g_{3}}{\partial x_{1}} & \frac{\partial g_{3}}{\partial x_{2}} & \frac{\partial g_{3}}{\partial x_{3}} \\ \end{bmatrix} =$ $\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}$
y3 = x
Macierz D jest macierzą zerową
Sprawdzenie stabilności układu
Dobór punktu pracy:
x10 = h1 = 1 m
x20 = h2 = 2 m
x30 = h3 = 3 m
$$u_{10} = q = 1\frac{m^{3}}{s}$$
u20 = u30 = u40 = 5 m
W celu sprawdzenia stabilności układu przyjmujemy następujące dane:
C1 = C2 = C3 = 0,6
A1 = 1 m2
A2 = 2 m2
A3 = 3 m2 ;
ρ = 1000
A = $\begin{bmatrix} - 0,033 & 0 & 0 \\ 0,033 & - 0,012 & 0 \\ 0 & 0,01 & - 0,007 \\ \end{bmatrix}$
B = $\begin{bmatrix} 0,001 & - 26,58 & 0 & 0 \\ 0 & 26,58 & - 37,59 & 0 \\ 0 & 0 & 37,59 & - 46,04 \\ \end{bmatrix}$
C =$\ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}$
Symulacja układu w pakiecie Simulink:
Wykresy:
Sprawdzenie stabilności metodą pośrednią Lapunowa:
>> A=[-0.033,0,0;0.033,-0.012,0;0,0.01,-0.007]
A =
-0.0330 0 0
0.0330 -0.0120 0
0 0.0100 -0.0070
>> eig(A)
ans =
-0.0070
-0.0120
-0.0330
>>
Wszystkie wartości własne macierzy są ujemne – układ jest stabilny.
6. Wnioski:
Linearyzacja, czyli tworzenie modelu liniowego który aproksymuje model nieliniowy, jest jednym ze sposobów radzenia sobie z układami nieliniowymi, czyli np. z wypływem ze zbiornika . Do tego zabiegu matematycznego niezbędny jest wybór punktu pracy, względem którego dokonujemy tej operacji. Wybór ten nie może być przypadkowy. Punkt pracy powinien być tak dobrany by styczna do niego na jak najdłuższym odcinku była maksymalnie blisko wykresu. Przy linearyzacji należy pamiętać, że jest to metoda przybliżona i ma sens tylko wówczas gdy sygnały występujące w obiekcie są funkcjami ciągłymi oraz zmiany sygnału są małe.
Dobór punktu pracy w oczywisty sposób wpływa również na wartości macierzy stanu, gdyż wybór innego punktu pracy tak naprawdę zmienia nam funkcję którą zastępujemy model nieliniowy. Podczas zajęć źle dobrałem punkt pracy, co można zauważyć po tym, że wykresy pokazują wartości ujemne.