Main Content

Model Reference Adaptive Control of Satellite Spin

This example shows how to control satellite spin using model reference adaptive control (MRAC) to make the unknown controlled system match an ideal reference model. The satellite system is modeled in Simulink® and the MRAC controller is implemented using the Model Reference Adaptive Control block provided by Simulink Control Design™ software.

Satellite-Spin Control System

In the model for this example, the cylindrical body of the satellite spins around its axis of symmetry (z axis) with constant angular rate Ω. [1] The goal is to independently control the angular rates ωx and ωy around the x and y axes using torques ux and uy. The equations of motion produce a second-order model with two inputs and two outputs.

[ω˙xωy˙]=[0a-a0.5a][ωxωy]+[uxuy]

In this system, the controller does not observe the plant states directly. Instead, it views the states indirectly through following measurement model.

[ν1ν2]=[1a-a1][ωxωy]

For this example, assume that the actual plant model is unknown and that the MRAC controller uses the following nominal model of the plant dynamics.

[ω˙xωy˙]=[00.5a-0.5a0][ωxωy]+[uxuy]

Given this uncertain nonlinear system, your goal is to design a controller that enables the system to track the following decoupled reference model.

[xm1˙xm2˙]=[-500-5][xm1xm2]+[r1r2]

Here:

  • xm is the reference model state vector.

  • r(t) contains the angular rate reference signals.

Define Nominal and Reference Models

Define the dynamic model for the satellite system. For this system, A represents the true state matrix.

a = 10;                % System Constant
A = [0 a;-a -a/2];     % True model parameters
B = eye(2);
C = [1 a;-a 1];
D = zeros(2,2);

Specify a plant mismatch matrix. This matrix is subtracted from the true A matrix to define the nominal plant used by the controller. The goal of the controller is to model this plant uncertainty.

deltaA = [0 0.5*a; -0.5*a 0];   % Plant mismatch

The reference system is the following stable second order system.

Am = [-5 0; 0 -5];    % Second-order decoupled integrator model
Bm = diag([5 5]);     % Nominal control effective matrix

Define the initial conditions for the satellite spin rates and reference model states.

x1_0 = 0.5;     % Initial x-axis angular rate (rad/s)
x2_0 = 0.5;     % Initial y-axis angular rate (rad/s)
xm_0 = [0;0];   % Initial conditions of the reference plant model  

Model Reference Adaptive Control Structure

The goal of the MRAC controller is to achieve asymptotic convergence of the tracking error e(t)=x(t)-xm(t).

limt(x(t)-xm(t))0

The MRAC controller has the following structure.

u(t)=-kxx(t)+krr(t)-uad

Here:

  • kx contains feedback control gains.

  • kr contains feedforward control gains.

  • uad is an adaptive control term that cancels the model uncertainty.

The Model Reference Adaptive Control block adjusts the adaptive control term to achieve the desired reference model tracking. Optionally, you can also adapt the feedback and feedforward control gains.

For this example, the controller adapts the feedback gains and keeps the feedforward gains static.

The initial feedback gain and the static feedforward gain are computed to satisfy the following model matching condition

Am=A-BkxBm=Bkr

Specify the computed controller gains and the feedback gain learning rate.

Kx = -place(A,B,eig(Am));  % State feedback gain for pole placement
gain_kx = 1;              % Feedback gain learning rate
Kr = Bm;                  % Feedforward gain for ref model matching

Configure Uncertainty Estimation Parameters

The MRAC controller estimates the model uncertainty online and generates an adaptive control action uad that cancels the uncertainty to recover the nominal system for the baseline controller. The adaptive control term models the system uncertainty using the following model.

uad=wTϕ(x)

Here:

  • w contains the network weights that are adjusted by the controller.

  • ϕ(x) is the uncertainty model feature vector.

Using the Model Reference Adaptive Control block, you can select one of the following feature vector definitions.

  • System states, where ϕ(x)=x(t) — This approach is the simplest option, which can be a good starting point if you do not know the complexity of the system uncertainty. If you find that using the states as features does not adequately represent the nonlinear uncertainty, select one of the other approaches.

  • Radial basis functions with Gaussian kernels, where ϕ(x)=[exp(-(x-ci)2σi)]i=1N . You can configure the kernels by defining the feature centers ci and bandwidth σi.

  • Custom features provided by an optional input port.

For this example, the controller is configured to use the system states as the disturbance model features.

Define the model estimation learning rate gamma_w and tracking error weight Q.

gamma_w = 100;  % Learning rate
Q = 10;         % Tracking error weight

Simulate Controller

Open the Simulink model of the satellite-spin control system.

mdl = "satellitespin";
open_system(mdl)

Simulate the model.

Tf = 35;        % duration (s)  
sim(mdl);

View the controller performance by comparing the spin response (top plot) and spin-rate response (bottom plot) to their respective reference signals.

The MRAC controller tracks the reference signals well.

View the uncertainty estimated by the controller and compare it to the true uncertainty.

The controller estimates an accurate y-axis uncertainty model. The uncertainty model for the x-axis has the correct sign, though the magnitude is lower than that of the true uncertainty. Both uncertainty models show significant transients in the uncertainty estimate, especially during the first step change in the reference signals.

To reduce the transients in the estimated uncertainty responses, you can reduce the value of the tracking error rate Q. For example, reduce the value of Q to 1 and simulate the model.

Q = 1;
sim(mdl);

There are fewer transients in the model estimate responses. The trade off is that the spin and spin-rate responses have longer settling times.

Reference

[1] Zhou, K., J.C.Doyle, and K. Glover. Robust and Optimal Control, Englewood Cliffs, NJ: Prentice-Hall, 1996, Section 9.6.

See Also

Blocks

Related Topics