Constrained MRAC Overview

This page provides an essential summary of the robust MRAC (model reference adaptive control) techniques coded in the simulator https://github.com/andrealaffly/UAV_Sim_PyChrono/wiki to enforce user-defined constraints on the trajectory tracking error.

It is worthwhile noting that the continuous convex projection operator allows imposing explicit constraints on the adaptive gains. For details, see the notes on classical and robust MRAC.

1. Time-Invariant Constraints

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

A goal of constrained 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

Another goal of constrained MRAC systems is to guarantee that

\[ e(t) \in \overline{\mathcal{E}} \triangleq \left\{ e \in \mathbb{R}^n : e_{\max} - e^{\rm T} M e \geq 0 \right\}, \quad t \geq t_0, \]

where

\[ A_{\rm ref}^{\rm T} M + M A_{\rm ref} \prec - Q_M \]

\[ \begin{aligned} \mathring{\mathcal{E}} &\triangleq \left \{ e \in \mathbb{R}^n : h(e^{\rm T} M e) > 0\right\} \\ \overline{\mathcal{B}}_{\overline{\epsilon}_0}(0_n) &\triangleq \Bigg\{ e \in \mathbb{R}^n : \Vert e \Vert \leq \overline{\epsilon} \triangleq 2 \frac{ \left( \lambda_{\max}(P) + \lambda_{\max}(M) \right)}{\lambda_{\min}(Q)} \overline{\xi} \Bigg \}. \end{aligned} \]

To meet these goals, constrained 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)}, \]

\[ \begin{aligned} \dot{\hat{K}}(t) &= {\rm Proj}\left(\hat{K}(t), - \mu_{\rm ramp}(e(t_0),\overline{\epsilon}_0) \Gamma \pi(t) e^{\rm T}(t) \tilde{P}(e(t)) B \right), \\ &\quad \hat{K}(t_0) = \hat{K}_0, \quad t \geq t_0, \end{aligned} \]

\[ \begin{aligned} \pi(t) &\triangleq \begin{bmatrix} x(t) \\ r(t) \\ - \Phi(t,x(t)) \end{bmatrix}, \end{aligned} \]

\[ \tilde{P}(e) \triangleq h^{-1}(e^{\rm T} M e) \left[ P - V_e(e) \left. \frac{\partial h(\alpha)}{\partial \alpha} \right \vert_{\alpha = e^{\rm T} M e} M \right], \quad e \in \mathring{\mathcal{E}}, \]

\[ A_{\rm ref}^{\rm T} P + P A_{\rm ref} = - Q \]

\[ V_e(e) \triangleq \frac{e^{\rm T} P e}{h(e^{\rm T} M e)}, \quad{} e \in \mathring{\mathcal{E}} \]

\[ \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 \]

Key results

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 and \(e(t_0) \in \mathring{\mathcal{E}}\)

Constrained MRAC guarantees

⚠️ Disclaimer

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.


2. Time-Varying Constraints

MRAC systems can enforce time-varying constraints captured by

\[ \overline{\mathcal{E}}_t \triangleq \left \{e \in \mathbb{R}^n : H(t,e) \geq 0\right\}, \quad{} t \geq t_0, \]

where

\[ H(t,e) \triangleq \eta_{\max} - \eta^2(t) - e^{\rm T} M e, \quad{} (t,e) \in [t_0,\infty) \times \mathbb{R}^n. \]

This constraint set is called funnel since, ideally, it would reduce its diameter \(\eta_{\max} - \eta^2(t)\) over \([t_0,\infty)\).

⚠️ Warning

The diameter of the constraint set can not be reduced arbitrarily fast.

For this reason, the diameter of funnel must be regulated to reflect the closed-loop system's capabilities.

To ensure compatibility of constraints with the closed-loop plant dynamics, the funnel diameter can be regulated by

\[ \begin{align} \dot{\eta}(t) &= \min\left\{ 0,- \varepsilon^{\rm T}(t) M \dot{\varepsilon}(t) / \eta(t) \right\}, \nonumber \\ &\quad \text{if } \|\varepsilon(t)\| > e_{\rm min} \text{ and } H(t,\varepsilon(t)) = \delta_2 \text{ and } \nonumber \\ &\quad \eta(t) \in \left( \sqrt{\delta_1}, \sqrt{\eta_{\rm max} - \delta_3} \right), \\ \dot{\eta}(t) &= \sigma_{\rm nom}(t), \quad \text{if } \|\varepsilon(t)\| > e_{\rm min} \text{ and } H(t,\varepsilon(t)) > \delta_2 \text{ and } \nonumber \\ &\quad \eta(t) \in \left(\sqrt{\delta_1}, \sqrt{\eta_{\rm max} - \delta_3} \right), \\ \dot{\eta}(t) &= \max\left\{ 0, \sigma_{\rm nom}(t) \right\}, \quad \text{if } \|\varepsilon(t)\| > e_{\rm min} \text{ and } \nonumber \\ &\quad \eta(t) = \sqrt{\delta_1}, \\ \dot{\eta}(t) &= \min\left\{ 0, \sigma_{\rm nom}(t) \right\}, \quad \text{if } \|\varepsilon(t)\| > e_{\rm min} \text{ and } \nonumber \\ &\quad \eta(t) = \sqrt{\eta_{\rm max} - \delta_3}, \\ \dot{\eta}(t) &= 0, \quad \text{if } \|\varepsilon(t)\| \leq e_{\rm min}, \end{align} \]

where

\[ q \triangleq \frac{2\overline{\xi} \lambda_{\max}(M)(\lambda_{\min}(Q) - \nu)H_{\max}}{3 \lambda_{\min}(P)\lambda_{\min}^2(Q_M)} - \frac{2H_{\max}\overline{\xi} \lambda_{\max}(P)}{\lambda_{\min}(P)\lambda_{\min}(Q_M)} - \frac{16 \overline{\xi} ^3 \lambda_{\max}^3(M)}{27\lambda_{\min}^3(Q_M)} \]

To enforce these time-varying constraints, set \[ u(t) = \phi(\hat{K}(t),\pi(t)), \quad t \geq t_0, \]

where

\[ \begin{aligned} \dot{\hat{K}}(t) &= {\rm Proj}\left(\hat{K}(t), - \mu_{\rm ramp}(e(t_0),\overline{\epsilon}_0) \Gamma \pi(t) e^{\rm T}(t) \tilde{P}(t,e(t)) B \right), \nonumber \\ &\quad \hat{K}(t_0) = \hat{K}_0, \quad t \geq t_0, \\ \tilde{P}(t,e) &\triangleq H^{-1}(t,e^{\rm T} M e) \left[ P + V_e(t,e) M \right], \quad e \in \mathring{\mathcal{E}}_t, \\ V_e(t,e) &\triangleq \frac{e^{\rm T} P e}{H(t,e^{\rm T} M e)}, \quad{} e \in \mathring{\mathcal{E}}_t. \end{aligned} \]

Key results

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 and \(e(t_0) \in \mathring{\mathcal{E}}_{t_0}\)

Constrained MRAC guarantees

3. Additional Reading Material

For additional information, see

4. Implementation