Main Content

Model Reference Adaptive Control

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.

MRAC controller that finds the error between the reference model and plant states and computes control actions using learnable gains and disturbance model.

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.

  1. Compute the error e between the states of the controlled system and the states of the reference model.

  2. Compute the features ϕ(x) for the internal model of the system disturbances and uncertainty.

  3. Update the weight parameters of the disturbance model based on the error e.

  4. 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.

  5. Apply the updated gains and parameters to the reference signal, plant states, and disturbance model features.

  6. Compute the control action u. For more information, see Control Structure.

Nominal and Reference Models

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)=Ax(t)+B(u(t)+f(x))

Here:

  • 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.

x˙m(t)=Amxm(t)+Bmr(t)

Here:

  • 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.

Control Structure

MRAC computes the control input u(t) using the following control structure.

u(t)=kxx(t)+krr(t)uaduad=wTϕ(x)

Here:

  • 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.

x˙(t)=(A+Bkx)x(t)+Bkrr(t)+B(f(x)wTϕ(x))

Uncertainty and Error Dynamics

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.

f(x)=w*Tϕ(x)+ε

Here, w* contains the unknown ideal weights and ε is the approximation error.

Further, if you define the weight vector error as w˜=w*w and substitute it into the control structure, you get the following state equation.

x˙(t)=(A+Bkx)x(t)+Bkrr(t)+B(w˜Tϕ(x)+ε)

The goal of the MRAC controller is the asymptotic convergence of the state tracking error e(t) to zero.

e(t)=x(t)xm(t)e˙(t)=x˙(t)x˙m(t)

Substitute the control structure and reference model equations to obtain the following equation for the error dynamics.

e˙(t)=(A+Bkx)x(t)+Bkrr(t)+B(w˜Tϕ(x)+ε)Amxm(t)Bmr(t)

You can rewrite this equation as follows.

e˙(t)=Ame(t)+Bk˜xx(t)+Bk˜rr(t)+B(w˜Tϕ(x)+ε)k˜x=kx*kxk˜r=kr*kr

Here, k˜x and k˜r are feedback and feedforward gain errors, respectively. kx* and kr* are unknown ideal feedback and feedforward gains.

Parameter Updates

To derive the MRAC parameter update equations, first define the following Lyapunov function based on the error dynamics.

V(e,k˜x,k˜r,w˜)=eTQe+Γxk˜x22+Γrk˜r22+w˜TΓww˜2

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.

k˙x=Γxx(t)eT(t)PBk˙r=Γrx(t)eT(t)PBw˙x=Γwϕ(t)eT(t)PB

Here, P is the solution to the following Lyapunov function based on the reference model state matrix.

AmTP+PAm+Q=0

Learning Modification

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.

k˙x=Γxx(t)eT(t)PB+σkxk˙r=Γrx(t)eT(t)PB+σkxw˙x=Γwϕ(t)eT(t)PB+σw

For e-modification, the controller scales the sigma-modification momentum term by the norm of the error vector.

k˙x=Γxx(t)eT(t)PB+σ|e(t)|kxk˙r=Γrx(t)eT(t)PB+σ|e(t)|kxw˙x=Γwϕ(t)eT(t)PB+σ|e(t)|w

To adjust the amount of the learning modification for either method, change the value of the momentum weight parameter σ.

Disturbance and Uncertainty Model Features

The Model Reference Adaptive Control block maintains an internal model uad of the disturbance and model uncertainty in the controlled system.

uad=wTϕ(x)

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.

See Also

Blocks

Related Topics