This repository contains the development of an aeropendulum and the performance of various controllers to achieve angular positions between
Where
To simplify the inertia, we define the term
Where
And the motor+nuts inertia (
To represent the state-space model of the system, we define the next state equations:
Therefore:
To design linear controllers, we need to linearize the system around the an equilibrium point.
For
To
Finally:
If you want
To find the
-
Damping coefficient (
$B$ )
This parameter was found using the simple pendulum model. First, we remove the counterweight from the system and drop the bar with the motor from$0\degree$ to$30\degree$ and take the curve of angle in the time. Then, we compute the damping coefficient$B$ with the envelope of this signal.$$ \text{env}(t) = ae^{-bt} $$
$$ B=2I_0b $$
-
Thrust force (
$F_h$ )
The objective of this identification is to find the thrust force$F_h$ that depends of voltage. Therefore, we take measurements of the voltage locating the system in an angle$0$ with different counterweights. With this, we can calculate the thrust force$F_h$ that corresponds to the voltage$V$ in the system making a torque summation.If we have:
$$ \begin{gather*} B= \begin{bmatrix} 0\ K_f\frac{l_m}{I} \end{bmatrix} \end{gather*} $$
Define the next states:
Can be written as:
$h(x) = \frac{1}{I}(W\cos{x_1}-\beta x_2+b_fl_m)$ $f(x) = \frac{1}{I}(K_fl_m)$
Now, we define an error:
and the next sliding manifold:
where its derivative is:
and the signal control law is:
To the system stability, we need to define the following:
Taken as limits
Considering the LTI system
where:
-
$x\in \mathbb{R}^n$ : state vector -
$u\in \mathbb{R}^m$ : control input vector -
$y\in \mathbb{R}^p$ : output vector -
$A\in\mathbb{R}^{n\times n}$ : state matrix (Unkonwn) -
$B\in\mathbb{R}^{n\times m}$ : input matrix (Partially known) -
$C\in\mathbb{R}^{p\times n}$ : output matrix (Known)
Now, we define a reference model such that in open loop the interesting signal follows the reference:
-
$r\in\mathbb{R}^p$ : reference vector
This model complies that:
$A_m=A+BK_x^\ast$ $B_m=BK_r^\ast$
Since not all states are accessible, a Luenberger observer is created as:
$BK_y^\ast=-L$
Observer error:
Using the next control law:
The state estimate is:
Defining the error as:
Defining:
$\tilde{K}_x = K_x-K_x^\ast$ $\tilde{K}_r = K_r-K_r^\ast$ $\tilde{K}_y = K_y-K_y^\ast$
To find the
$e^TPB\tilde{K}_rr = \text{trace}(\tilde{K}_rre^TPB)$ $e^TPB\tilde{K}_x\hat{x} = \text{trace}(\tilde{K}_x\hat{x}e^TPB)$ $e^TPB\tilde{K}_yCe_l = \text{trace}(\tilde{K}_yCe_le^TPB)$
$\dot{K}^T_x = \Gamma_x\hat{x}e^TPB$ $\dot{K}^T_r = \Gamma_rre^TPB$ $\dot{K}^T_y = \Gamma_yCe_le^TPB$