multimodel control design
typically, the dynamics of a system are not known exactly and may vary. for example, system dynamics can vary because of:
parameter value variations caused by manufacturing tolerances — for example, the resistance value of a resistor is typically within a range about the nominal value, 5 ω /– 5%.
operating conditions — for example, aircraft dynamics change based on altitude and speed.
any controller you design for such a system must satisfy the design requirements for all potential system dynamics.
control design overview
to design a controller for a system with varying dynamics:
sample the variations.
create an lti model for each sample.
create an array of sampled lti models.
design a controller for a nominal representative model from the array.
analyze the controller design for all models in the array.
if the controller design does not satisfy the requirements for all the models, specify a different nominal model and redesign the controller.
model arrays
in control system designer, you can specify multiple models for any plant or sensor in the current control architecture using an array of lti models (see ). if you specify model arrays for more than one plant or sensor, the lengths of the arrays must match.
create model arrays
to create arrays for multimodel control design, you can:
create multiple lti models using the , , , or commands.
% specify model parameters. m = 3; b = 0.5; k = 8:1:10; t = 0.1:.05:.2; % create an array of lti models. for ct = 1:length(k); g(:,:,ct) = tf(1,[m,b,k(ct)]); end
create an array of lti models using the command.
% create individual lti models. g1 = tf(1, [1 1 8]); g2 = tf(1, [1 1 9]); g3 = tf(1, [1 1 10]); % combine models in an array. g = stack(1,g1,g2,g3);
perform batch linearizations at multiple operating points. then export the computed lti models to create an array of lti models. see the example (simulink control design).
sample an uncertain state-space (
uss
) model using (robust control toolbox).compute a
uss
model from a simulink® model. then use (robust control toolbox) or (robust control toolbox) to create an array of lti models. see (robust control toolbox).specify a core simulink block to linearize to a (robust control toolbox) or (robust control toolbox) model. see (robust control toolbox).
import model arrays to control system designer
to import models as arrays, you can pass them as input arguments when opening control system designer from the matlab® command line. for more information, see .
you can also import model arrays into control system designer when configuring the control architecture. in the edit architecture dialog box:
in the value text box, specify the name of an lti model from the matlab workspace.
to import block data from the matlab workspace or from a mat-file in your current working directory, click .
nominal model
what is a nominal model?
the nominal model is a representative model in the array of lti models that you use to design the controller in control system designer. use the editor and analysis plots to visualize and analyze the effect of the controller on the remaining plants in the array.
you can select any model in the array as your nominal model. for example, you can choose a model that:
represents the expected nominal operating point of your system.
is an average of the models in the array.
represents a worst-case plant.
lies closest to the stability point.
tip
you can plot and analyze the open-loop dynamics of the system on a bode plot to determine which model to choose as nominal.
specify nominal model
to select a nominal model from the array of lti models, in control system
designer, click multimodel configuration. then,
in the multimodel configuration dialog box, select a nominal model
index. the default index is 1
.
for each plant or sensor that is defined as a model array, the app selects the model at the specified index as the nominal model. otherwise, the app uses scalar expansion to apply the single lti model for all model indices.
for example, for the following control architecture:
if g and h are both three-element arrays
and the nominal model index is 2
, the software uses the
second element in both the arrays to compute the nominal model:
the nominal response from r to y is:
the app also computes and plots the responses showing the effect of c on the remaining pairs of plant and sensor models — g1h1 and g3h3.
if only g is an array of lti models, and the specified nominal model is 2, then the control architecture for nominal response is:
in this case, the nominal response from r to y is:
the app also computes and plots the responses showing the effect of c on the remaining pairs of plant and sensor model — g1h and g3h.
frequency grid
the frequency response of a system is computed at a series of frequency values, called a frequency grid. by default, control system designer computes a logarithmically equally spaced grid based on the dynamic range of each model in the array.
specify a custom frequency grid when:
the automatic grid has more points than you require. to improve computational efficiency, specify a less dense grid spacing.
the automatic grid is not sufficiently dense within a particular frequency range. for example, if the response does not capture the resonant peak dynamics of an underdamped system, specify a more dense grid around the corner frequency.
you are only interested in the response within specific frequency ranges. to improve computational efficiency, specify a grid that covers only the frequency ranges of interest.
for more information on specifying logarithmically spaced vectors, see .
note
modifying the frequency grid does not affect the frequency response computation for the nominal model. the app always uses the auto select option to compute the nominal model frequency response.
design controller for multiple plant models
this example shows how to design a compensator for a set of plant models using control system designer.
create array of plant models
create an array of lti plant models using the command.
% create an array of lti models to model plant (g) variations. g1 = tf(1,[1 1 8]); g2 = tf(1,[1 1 9]); g3 = tf(1,[1 1 10]); g = stack(1,g1,g2,g3);
create array of sensor models
similarly, create an array of sensor models.
h1 = tf(1,[1/0.1,1]); h2 = tf(1,[1/0.15,1]); h3 = tf(1,[1/0.2,1]); h = stack(1,h1,h2,h3);
open control system designer
open control system designer, and import the plant and sensor model arrays.
controlsystemdesigner(g,1,h)
the app opens and imports the plant and sensor model arrays.
configure analysis plot
to view the closed-loop step response in a larger plot, in control system designer, click on the small dropdown arrow on the iotransfer_r2y: step plot and then select
maximize
.by default the step response shows only the nominal response. to display the individual responses for the other model indices, right-click the plot area, and select multimodel display > individual responses.
note
to view an envelope of all model responses, right-click the plot area, and select multimodel display > bounds
the plot updates to display the responses for the other models.
select nominal model
on the control system tab, click multimodel configuration.
in the multimodel configuration dialog box, specify a nominal model index of
2
.click apply, then close.
the selected nominal model corresponds to the average system response.
design compensator
to design a compensator using the nominal model, you can use any of the supported .
for this example, use the compensator editor to manually specify the compensator dynamics. add an integrator to the compensator and set the compensator gain to
0.4
. for more information, see .analyze results
the tuned controller produces a step response with minimal overshoot for the nominal models and a worst-case overshoot less than 10%.