Indirect Model Reference Adaptive Control of First-Order System
This example shows how to design an indirect model reference adaptive control (MRAC) system for reference tracking. The plant is an unknown first-order system. The indirect MRAC controller estimates the plant parameters and implements an inversion-based controller to track a reference model.
First-Order Unknown Plant Model
The controlled plant is the following first-order dynamic system.
Here:
is the system state.
and are the unknown system parameters.
Given this unknown nonlinear system, the goal is to design a controller that enables the tracking of the following reference model.
Here:
is the reference model state.
is the reference signal provided by the user.
and are the reference model parameters.
Reference-Tracking Controller
The indirect MRAC controller uses an estimator model to compute and , which are estimates of the unknown system parameters and , respectively.
To compute the control action , the controller uses the feedforward gain and feedback gain .
The controller gains are derived from the reference model parameters ( and ) and estimated observer parameters ( and ).
Configure Controller
For this example, the true reference model is as follows.
Specify the reference model parameters, assuming that the model output corresponds to state .
a = 1; b = 3; c = 1; d = 0;
This true model is unknown to the indirect MRAC controller. Instead, the controller uses an estimator model to estimate the unknown plant dynamics. During operation, the controller can adapt the parameters of this model to improve its estimate of the unknown system parameters.
Specify the initial estimator parameters.
ahat = 0; bhat = 1;
The goal of the controller is to track the performance of the reference model. Specify the parameters of the reference model.
am = -4; bm = 4;
Specify the initial condition of the plant.
x_0 = 0;
Specify the learning rates for updating the estimator model parameters.
gamma_a = 2; % ahat learning rate gamma_b = 2; % bhat learning rate
Simulate Controller
Open the Simulink model.
mdl = 'mracFirstOrder';
open_system(mdl)
In this model
The Actual Plant Model block implements the nominal model of the first-order unknown system.
The Reference Command block generates a reference signal.
The Model Reference Adaptive Control block outputs the control action u, which it derives from the using the estimator model.
While an MRAC controller can also estimate unknown disturbances in the controlled system, for this example there are no such disturbances. Instead, the goal of the controller is simply to estimate the parameters of the unknown plant model. For an example that estimates unknown disturbances using a direct MRAC controller, see Model Reference Adaptive Control of Aircraft Undergoing Wing Rock.
Simulate the model.
sim(mdl);
View the actual plant output and the reference signal. The controller is able to make the actual plant state track the reference signal closely.
open_system(mdl+"/state")
The Model reference Adaptive Controller block is configured to output the parameters and of the estimator model using the Ahat
and Bhat
output ports, respectively.
open_system(mdl+"/params")
Over time the controller adapts the values of the estimator parameters. With sufficient persistency of excitation in the reference signal, and converge to their true values of 1 and 3, respectively.