Open unstableplant_demo.m in the Editor
Run in the Command Window

Simultaneous Stabilization Using Robust Control

In this demo we use Robust Control Toolbox™ commands ltiarray2uss and dksyn to design high performance controller for a family of unstable plants. It can serve as a template and jumping off point for other and more complex design situations.

Contents

Introduction

The nominal plant model consists of a first-order unstable system.

Pnom = tf(2,[1 -2]);

The family of perturbed plants are variations of Pnom. All plants have the same number (1, in the case) of right-half plane poles, though the pole location is not fixed across the family.

p1 = Pnom*tf(1,[.07 1]);              % extra lag
p2 = Pnom*tf([-.02 1],[.02 1]);       % time delay
p3 = Pnom*tf(50^2,[1 2*.1*50 50^2]);  % high frequency resonance
p4 = Pnom*tf(70^2,[1 2*.1*70 70^2]);  % high frequency resonance
p5 = tf(2.4,[1 -2.2]);                % pole/gain migration
p6 = tf(1.6,[1 -1.8]);                % pole/gain migration

Covering the Uncertain Model

For feedback design purposes, it is often desirable to simplify the uncertainty model, while approximately retaining the overall variability. This is one use of the command ltiarray2uss. This command takes a nominal model, along with an array of models, and derives an uncertain system. The uncertain system employs simple multiplicative, unmodeled dynamics to cover the behavior exhibited in the array of systems.

In order to use ltiarray2uss, we first need an array of models, whereas currently we have many separate models. Create an array of the perturbed plants.

Parray(1,1,1) = p1;
Parray(1,1,2) = p2;
Parray(1,1,3) = p3;
Parray(1,1,4) = p4;
Parray(1,1,5) = p5;
Parray(1,1,6) = p6;

The next task is to "cover" the behavior in this array using a simple, multiplicative, unmodeled dynamics description. This is done with ltiarray2uss. We choose as the center of the cover the nominal value of P. The dynamic order of the weighting function used in the unmodeled dynamics modeling is specified by the user. Here we use a 2nd order weight. Note that the nominal value of P is indeed Pnom. A Bode magnitude plot illustrates that the magnitude of the weighting function "covers" the relative variability in the plant model behavior.

orderWt = 2;
[P,Wmult] = ltiarray2uss(Pnom,Parray,orderWt);
tf(minreal(P.NominalValue))
bodemag(Wmult,(Pnom-Parray)/Pnom,'r--');grid
2 states removed.
 
Transfer function:
  2
-----
s - 2
 

P is a 1-input, 1-output system with a simple uncertainty description. It is centered at Pnom, and its variability approximately covers the variability in Parray.

Creating the Open-loop Design Model

How can we pose a "traditional" design for this uncertain plant? Suppose we choose a desired closed-loop bandwidth, and perform a robust sensitivity-minimization design, using the bandwidth to parametrize the performance weighting function on the closed-loop sensitivity function. The performance weighting function is chosen 1st order, with DC gain of 100, high frequency gain of 0.5, and a magnitude of 1 at the desired closed-loop bandwidth. This type of transfer function is easily constructed with makeweight. We also add a sensor noise model, to complement this objective, and limit controller bandwidth. This noise weight is also 1st order, with DC gain of 0.005, high frequency gain of 300, and a magnitude of 1 at 10, which is 25*(desired closed-loop bandwidth).

desBW = 0.4;
Wperf = makeweight(100,desBW,0.5);
Wnoise = makeweight(0.5/100,10,300);

With the weighting functions, we next build the open-loop interconnection. It is a system with two types of inputs: exogenous disturbances, and controls; and two types of outputs: errors and measurements. The disturbances and errors are chosen so that the transfer function from disturbance-to-error is what is "to be kept small" through feedback. In our case, this consists a Performance-weighted Sensitivity Function and a Noise-weighted Complementary Sensitivity Function

Here we use the iconnect objects. Alternatively, the sysic command, as well as simple model construction (series, etc.,) can be used.

[ny,nu] = size(P);
M = iconnect;
d = icsignal(ny);
n = icsignal(ny);
u = icsignal(nu);
e = icsignal(ny);
M.Input = [d;n;u];
M.Output = [e;-(e+Wnoise*n)];
M.Equation{1} = equate(e,P*u+Wperf*d);

Robust Design

M.System is the 3-input, 2-output uncertain system, suitable for robust design. The design is carried out with the automated robust design command dksyn.

[K,ClosedLoop,muBound] = dksyn(M.System,ny,nu);
muBound
muBound =

    1.1120

The muBound is a positive scalar. If it near 1, then the robust design was successful, and the desired closed-loop bandwidth fairly consistent with what can be achieved. As a rules of thumb, if muBound is less than 0.85, then the achievable performance can be improved upon; if muBound is greater than 1.2, then the desired closed-loop bandwidth is not achievable, in light of the plant uncertainty.

So, here, with muBound approximately 1.1, the objectives nearly are met. Reduce the controller state dimension to 3, using the command reduce. Then create open-loop Bode plots, noting the typical crossover frequency, and phase margin.

Kr = reduce(K,3);
h = bodeplot(Parray*Kr);
p = getoptions(h);
p.Grid = 'on';
p.MagUnits = 'abs';
p.MagScale = 'log';
p.YLim = {[1e-3 1e3];[-367.2 367.2]};
p.XLim = {[1e-3 1e3]};
p.XLimMode = {'manual'};
p.YLimMode = {'manual';'auto'};
p.PhaseMatching = 'on';
p.TickLabel.FontSize = 8;
setoptions(h,p);

Finally, compute and plot output-disturbance step responses of the closed-loop system. These are consistent with the desired closed-loop bandwidth of 0.4, with settling times approximately 7 seconds.

step(feedback(1,Parray*Kr),8);