This page provides an essential summary of the classical and robust MRAC (model reference adaptive control) techniques coded in the simulator https://github.com/andrealaffly/UAV_Sim_PyChrono/wiki.
Assume that the plant model (i.e., the system to be controlled) is in the form
\[ \dot{x}(t) = A x(t) + B \Lambda [u(t) + \Theta^{\rm T} \Phi(t,x(t))], \quad x(t_0) = x_0, \quad t \geq t_0, \]
where
The primary goal of MRAC systems is to steer the plant state toward the trajectory of the refence model
\[ \dot{x}_{\rm ref}(t) = A_{\rm ref}x_{\rm ref}(t) + B_{\rm ref}r_{\rm cmd}(t),\quad x_{\rm ref}(t_0) = x_{\rm ref,0}, \quad{} t \geq t_0, \]
where
To apply an MRAC system, the plant model must not be integrated. It suffices to assume that \(x(t)\) is known for all \(t \geq t_0\).
To this goal, classical MRAC systems set \[ u(t) = \phi(\hat{K}(t),\pi(t)), \quad t \geq t_0, \]
where
\[ \phi(\hat{K},\pi) \triangleq \hat{K}^{\rm T} \pi, \quad (\hat{K},\pi) \in \mathbb{R}^{(n+m+N) \times m} \times \mathbb{R}^{(n+m+N)}, \]
\[ \dot{\hat{K}}(t) = - \Gamma \pi(t) e^{\rm T}(t) P B, \quad \hat{K}(t_0) = \hat{K}_0, \quad t \geq t_0, \]
\(\Gamma \succ 0_{(n+m+N) \times (n+m+N)}\) denotes the adaptive rate matrix, which is user-defined
the augmented regressor vector is defined as
\[ \begin{aligned} \pi(t) &= \begin{bmatrix} x(t) \\ r(t) \\ - \Phi(t,x(t)) \end{bmatrix}, \end{aligned} \]
\[ A_{\rm ref}^{\rm T} P + P A_{\rm ref} = - Q \]
Assume that there exist \(K_x \in \mathbb{R}^{n \times m}\) and \(K_r \in \mathbb{R}^{m \times m}\) such that the matching conditions
\[ \begin{aligned} A_{\rm ref} &= A + B \Lambda K_x^{\rm T}, \\ B_{\rm ref} &= B \Lambda K_r^{\rm T} \end{aligned} \]
are verified.
Classical MRAC guarantees
It is impossible to solve the matching conditions since \(A\) and \(\Lambda\) are unknown. However, the structure of \(A\) (i.e., the location of its zeros) is usually known and we know that \(\Lambda\) is diagonal and positive-definite. Thus, the existence of solutions to the matching conditions can usually be safely assumed.
The matching conditions are needed to verify compatibility between the plant model and the reference model. Here is a simple exmple, if the plant model captures the dynamics of a car and the reference model captures the dynamics of an airplane, the matching conditions can not be verified because a car is unable to take off.
It is unlikely that all nonlinear uncertainties and external disturbaces are captured by the term \(\Theta^{\rm T} \Phi(t,x)\) for all \((t,x) \in [t_0,\infty) \times \mathbb{R}^n\).
In practice, plant models are more realistically captured by
\[ \dot{x}(t) = A x(t) + B \Lambda [u(t) + \Theta^{\rm T} \Phi(t,x(t))] + \xi(t), \quad x(t_0) = x_0, \quad t \geq t_0, \]
where
Applying classical MRAC in the presence of an unmatched uncertainty may be catastrophic: the adaptive gains may diverge. For this reason, multiple robustifications of MRAC have been developed.
In this simulator, we employ a combination of the dead-zone modification of MRAC and continuous convex projection operator. In particular, we consider the control law
\[ \phi(\hat{K},\pi) \triangleq \hat{K}^{\rm T} \pi, \quad (\hat{K},\pi) \in \mathbb{R}^{(n+m+N) \times m} \times \mathbb{R}^{(n+m+N)}, \]
which is the same as for classical MRAC, and the adaptive law
\[ \dot{\hat{K}}(t) = {\rm Proj}\left(\hat{K}(t), - \mu_{\rm ramp}(e(t),\epsilon_0) \Gamma \pi(t) e^{\rm T}(t) P B \right), \quad \hat{K}(t_0) = \hat{K}_0, \quad t \geq t_0, \]
where
\[ \mu_{\rm ramp}(e,\epsilon_0) \triangleq \begin{cases} 1, & \text{if } \lVert e \rVert \geq \epsilon_0, \\[6pt] \dfrac{\lVert e \rVert - \delta \epsilon_0}{(1 - \delta)\epsilon_0}, & \text{if } \lVert e \rVert \in [\delta \epsilon_0, \epsilon_0], \\[6pt] 0, & \text{if } \lVert e \rVert \leq \delta \epsilon_0, \end{cases} \quad e \in \mathbb{R}^n \]
The matrix continuous convex projection operator is defined as
\[ \begin{aligned} {\rm Proj}(K,K_{\rm d}) &\triangleq \left[{\rm proj}(k_1,k_{\rm d,1}), \ldots, {\rm proj}(k_m,k_{{\rm d},m}) \right], \\ &\quad \quad (K,K_{\rm d}) \in \mathbb{R}^{(n+m+N) \times m} \times \mathbb{R}^{(n+m+N) \times m} \end{aligned} \]
where
\[ \begin{aligned} \mathrm{proj}(k,k_{\mathrm d}) &\triangleq \begin{cases} k_{\mathrm d} - h(k)\, \dfrac{ \left( \dfrac{\partial h(k)}{\partial k} \right)^{\mathrm T} \dfrac{\partial h(k)}{\partial k} }{ \dfrac{\partial h(k)}{\partial k} \left( \dfrac{\partial h(k)}{\partial k} \right)^{\mathrm T} } \, k_{\mathrm d}, & (k,k_{\mathrm d}) \in \mathcal{S}, \\ k_{\mathrm d}, & \text{otherwise}, \end{cases} \\[1ex] h(k) &\triangleq \frac{ (1+\varepsilon)(k-k_{\mathrm e})^{\mathrm T} \mathrm{diag}^{-1}(s s^{\mathrm T}) (k-k_{\mathrm e}) - 1 }{ \varepsilon } \end{aligned} \]
The function \(h(\cdot)\) defines the ellpsoid
\[ \overline{\Omega}_1 \triangleq \left\{k \in \mathbb{R}^{n+m+N} : h(k) \leq 1 \right\} \]
centered in \(k_{\rm e}\) and whose semi-major axes are given by the components of \(s\). This ellipsoid is a constraint set of each column of \(\hat{K}(\cdot)\).
Assume that there exist \(K_x \in \mathbb{R}^{n \times m}\) and \(K_r \in \mathbb{R}^{m \times m}\) such that the matching conditions are verified.
Assume that \(K \triangleq \left[K_x^{\rm T}, K_r^{\rm T}, \Theta^{\rm T} \right]^{\rm T}\), and assume that \(k_i \in \overline{\Omega}_1\) for all \(i \in \{1, \ldots, m \}\).
This robust adaptive MRAC system guarantees
For additional information, see
m_mrac.pyprojection_operator.py