Model reference adaptive control (MRAC) is a model-based, real-time adaptive control algorithm that computes control actions to make an uncertain controlled system track the behavior of a given reference plant model. Using Simulink® Control Design™ software, you can implement MRAC using the Model Reference Adaptive Control block.
The following figure shows the structure of an MRAC controller.
The goal of the controller is to make the states (x) of the controlled system track the states (xm) of the reference model for a given reference signal (r). For more information on the controlled system and reference models, see Nominal and Reference Models. The MRAC controller uses the following process to generate a control signal.
Compute the error e between the states of the controlled system and the states of the reference model.
Compute the features ϕ(x) for the internal model of the system disturbances and uncertainty.
Update the weight parameters of the disturbance model based on the error e.
Update the values of the feedback and feedforward gains based on error e. You can choose to have the controller adapt the feedforward gains, the feedback gains, or both.
Apply the updated gains and parameters to the reference signal, plant states, and disturbance model features.
Compute the control action u. For more information, see Control Structure.
The controlled system, which typically exhibits modeling uncertainty and external disturbances, has the following nominal state equation. This model represents the nominal behavior that you expect from the plant.
x(t) is the state of the system you want to control.
u(t) is the control input.
A is a constant state-transition matrix.
B is a constant control effective matrix.
f(x) is the matched uncertainty in the system.
The reference plant model is the ideal system that characterizes the desired behavior that you want to achieve in practice.
r(t) is the external reference signal
xm(t) is the state of the reference plant model. Since r(t) is known, you can simulate the reference model to get xm(t).
Am is a constant state matrix. For a stable reference model, Am must be a Hurwitz matrix for which every eigenvalue must have a strictly negative real part.
Bm is a control effective matrix.
MRAC computes the control input u(t) using the following control structure.
kx is the feedback gain matrix.
kr is the feedforward gain matrix.
uad is the adaptive control component derived from the disturbance model.
ϕ(x) contains the disturbance and uncertainty model features. For more information on the model features, see Disturbance and Uncertainty Model Features.
w is an adaptive control weight vector.
An MRAC controller can learn the values of kx, kr, and w in real time.
When you substitute the control structure into the nominal model and simplify the result, you get the following state equation.
Using the universal approximation property of neural networks, you can assume that an ideal neural network with unknown ideal weights can parameterize the true uncertainty.
Here, w* contains the unknown ideal weights and ε is the approximation error.
Further, if you define the weight vector error as and substitute it into the control structure, you get the following state equation.
The goal of the MRAC controller is the asymptotic convergence of the state tracking error e(t) to zero.
Substitute the control structure and reference model equations to obtain the following equation for the error dynamics.
You can rewrite this equation as follows.
Here, and are feedback and feedforward gain errors, respectively. and are unknown ideal feedback and feedforward gains.
To derive the MRAC parameter update equations, first define the following Lyapunov function based on the error dynamics.
Here, Γx, Γr, and Γw are learning rates for the parameter updates. Q is a weighting matrix for state tracking errors.
To obtain the following parameter update equations, take the Lie derivative of the preceding Lyapunov function along the error dynamics and equate it to zero.
Here, P is the solution to the following Lyapunov function based on the reference model state matrix.
To add robustness at higher learning rates, you can modify the parameter updates to include an optional momentum term. You can choose one of two possible learning modification methods: sigma modification and e-modification.
For sigma modification, the momentum term for each parameter update is the product of the momentum weight parameter σ and the current parameter value.
For e-modification, the controller scales the sigma-modification momentum term by the norm of the error vector.
To adjust the amount of the learning modification for either method, change the value of the momentum weight parameter σ.
The Model Reference Adaptive Control block maintains an internal model uad of the disturbance and model uncertainty in the controlled system.
Here, ϕ(x) is a vector of model features. w is an adaptive control weight vector that the controller updates in real time.
To define ϕ(x), you can use one of the following feature definitions.
State vector of the controlled plant — This approach can under-represent the uncertainty and perform poorly. Use this option when the disturbance and model uncertainty are linear. Using the state vector can also be a useful starting point when you do not know the complexity of the disturbance and model uncertainty.
Gaussian radial basis functions — Use this option when the disturbance and model uncertainty are nonlinear and structure of the disturbance model is unknown.
External source provided to the controller block — Use this option to define your own custom feature vector. You can use this option when you know the structure of the disturbance and uncertainty model. For example, you can use a custom feature vector to identify specific unknown plant parameters.