You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linear Matrix Inequality (LMI) solver for Arduino. Allows the resolution of a set of simple standard LMI problems such as robust pole placement, robust stabilisation, gain-scheduled control.
Requires ArduinoEigen, so it will work only on architectures supporting c++ standard libraries (MBED_GIGA and SAMD). It might work on other architectures if you manage to install such libraries somehow, with a bit more effort.
Usage
The library provides an embedded implementation of controller synthesis problems requiring the solution of a Linear Matrix Inequality (LMI) feasibility problem. In general this can be made on a laptop computer, and the resulting gain can be just copied on the embedded controller; this library is aimed at applications where the controller needs to be recomputed on board, such as adaptive control, autonomous systems, etc. Please take into account that the solver will take a significant time to deliver a solution; I have tested it on an MKR1010 and on a GIGA R1; for the first one expect a few seconds or few tens of seconds for systems up to order four, whereas for the GIGA R1 it runs a lot faster.
Do not use this code for high-order systems.
The functions return $0$ matrices if the problem is unfeasible. There are no checks on the input matrices size, make sure the $A$ matrices are square, and that the $B$ matrices have as many rows as the $A$ matrices.
Please see the example.ino for an example of application code.
User functions
Nominal decay rate stabilisation
Eigen::MatrixXf DecayRate(Eigen::MatrixXf& A, Eigen::MatrixXf& B, float amin)
Returns a MatriXf object containing a matrix $K$ of gains, such that the matrix
$A+BK$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraint:
$\Re(\lambda) \leqslant -\texttt{amin}$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$.
Returns a MatriXf object containing a matrix $K$ of gains, such that the matrix
$A+BK$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraints:
$-\texttt{amax} \leqslant \Re(\lambda) \leqslant -\texttt{amin}$,
$|\Im(\lambda)|\leqslant \texttt{beta} |\Re(\lambda)|$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$, a maximum decay rate $\texttt{amax}$, and a minimum damping rate.
Returns a MatriXf object containing a matrix $K$ of gains, such that the matrix
$A_0+p_1 A_1+ BK$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraint:
$\Re(\lambda) \leqslant -\texttt{amin}$,
for all values of the parameter $p_1$ in the interval $[\texttt{p1max}, \texttt{p1min}]$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$. This property is kept for any arbitrarily fast change of the value of the parameter (within the interval).
Returns a MatriXf object containing a matrix $K$ of gains, such that the matrix
$A_0+p_1 A_1+ BK$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraints:
$-\texttt{amax} \leqslant \Re(\lambda) \leqslant -\texttt{amin}$,
$|\Im(\lambda)|\leqslant \texttt{beta} |\Re(\lambda)|$,
for all values of the parameter $p_1$ in the interval $[\texttt{p1max}, \texttt{p1min}]$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$, a maximum decay rate $\texttt{amax}$, and a minimum damping rate. These properties are kept for any arbitrarily fast change of the value of the parameter (within the interval).
Robust decay rate stabilisation under norm-constrained bound
Returns a MatriXf object containing a matrix $K$ of gains, such that the matrix
$A_0+E \Delta F+ BK$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraint:
$\Re(\lambda) \leqslant -\texttt{amin}$,
for all values of the $d \times d$ matrix parameter $\Delta$ with maximum singular value smaller or equal to 1.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$. This property is kept for any arbitrarily fast change of the value of the parameter (within the norm constraint). Notice that $E \in \mathbb{R}^{n \times d}$ and $F \in \mathbb{R}^{d \times n}$ (with $A \in \mathbb{R}^{n \times n}$); make sure that these parameters are entered correctly because there is no internal check on their dimensions or consistency.
Returns a pointer to a two-dimensional array of MatriXf pointers object containing a matrix $K$ of gains, such that the matrix
$A_0+p_1 A_1+ B(\texttt{*K[0]}+p_1\texttt{*K[1]})$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraint:
$\Re(\lambda) \leqslant -\texttt{amin}$,
for all values of the parameter $p_1$ in the interval $[\texttt{p1max}, \texttt{p1min}]$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$. This property is kept for any arbitrarily fast change of the value of the parameter (within the interval). Remember to delete $\texttt{Kp[0]}$
and $\texttt{Kp[1]}$ to free the memory before launching this function for a second time.
Gain-scheduled regional pole placement (with 1 parameter)
Returns a pointer to a two-dimensional array of MatriXf pointers object containing a matrix $K$ of gains, such that the matrix
$A_0+p_1 A_1+ B(\texttt{*K[0]}+p_1\texttt{*K[1]})$
is Hurwitz and has all the eigenvalues $\lambda$ fulfilling the following constraints:
$-\texttt{amax} \leqslant \Re(\lambda) \leqslant -\texttt{amin}$,
$|\Im(\lambda)|\leqslant \texttt{beta} |\Re(\lambda)|$,
for all values of the parameter $p_1$ in the interval $[\texttt{p1max}, \texttt{p1min}]$.
This is equivalent to imposing a minimum (positive) decay rate $\texttt{amin}$, a maximum decay rate $\texttt{amax}$, and a minimum damping rate. These properties are kept for any arbitrarily fast change of the value of the parameter (within the interval). Remember to delete $\texttt{Kp[0]}$
and $\texttt{Kp[1]}$ to free the memory before launching this function for a second time.
Linear Matrix Inequality (LMI) solver for Arduino. Allows the resolution of a set of simple standard LMI problems such as robust pole placement, robust stabilisation, gain-scheduled control.