Main Content

Plant Models for Gain-Scheduled Controller Tuning

增益调度控制方法controlling a nonlinear plant. To tune a gain-scheduled control system, you need a collection of linear models that approximate the nonlinear dynamics near selected design points. Generally, the dynamics of the plant are described by nonlinear differential equations of the form:

x ˙ = f ( x , u , σ ) y = g ( x , u , σ ) .

Here,xis the state vector,uis the plant input, andyis the plant output. These nonlinear differential equations can be known explicitly for a particular system. More commonly, they are specified implicitly, such as by a Simulink®model.

You can convert these nonlinear dynamics into a family of linear models that describe the local behavior of the plant around a family of operating points(x(σ),u(σ)), parameterized by the scheduling variables,σ. Deviations from the nominal operating condition are defined as:

δ x = x x ( σ ) , δ u = u u ( σ ) .

这些偏差控制、一阶linear parameter-varyingdynamics:

δ ˙ x = A ( σ ) δ x + B ( σ ) δ u , δ y = C ( σ ) δ x + D ( σ ) δ u , A ( σ ) = f x ( x ( σ ) , u ( σ ) ) B ( σ ) = f u ( x ( σ ) , u ( σ ) ) C ( σ ) = g x ( x ( σ ) , u ( σ ) ) D ( σ ) = g u ( x ( σ ) , u ( σ ) ) .

This continuum of linear approximations to the nonlinear dynamics is called a linear parameter-varying (LPV) model:

d x d t = A ( σ ) x + B ( σ ) u y = C ( σ ) x + D ( σ ) u .

The LPV model describes how the linearized plant dynamics vary with time, operating condition, or any other scheduling variable. For example, the pitch axis dynamics of an aircraft can be approximated by an LPV model that depends on incidence angle,α, air speed,V, and altitude,h.

In practice, you replace this continuum of plant models by a finite set of linear models obtained for a suitable grid ofσvalues This replacement amounts to sampling the LPV dynamics over the operating range and selecting a representative set ofσvalues, yourdesign points.

Gain-scheduled controllers yield best results when the plant dynamics vary smoothly between design points.

Obtaining the Family of Linear Models

If you do not have this family of linear models, there are several approaches to obtaining it, including:

For tuning gain schedules, after you obtain the family of linear models, you must associate it with anslTuner接口来构建一个可调闭环的家庭models. To do so, use block substitution, as described inMultiple Design Points in slTuner Interface.

Set Up for Gain Scheduling by Linearizing at Design Points

This example shows how to linearize a plant model at a set of design points for tuning of a gain-scheduled controller. The example then uses the resulting linearized models to configure anslTunerinterface for tuning the gain schedule.

Open therct_CSTRmodel.

mdl ='rct_CSTR'; open_system(mdl)

In this model, theConcentration controllerandTemperature controllerboth depend on the output concentrationCr. To set up this gain-scheduled system for tuning, you linearize the plant at a set of steady-state operating points that correspond to different values of the scheduling parameterCr. Sometimes, it is convenient to use a separate model of the plant for trimming and linearization under various operating conditions. For example, in this case, the most straightforward way to obtain these linearizations is to use a separate open-loop model of the plant,rct_CSTR_OL.

mdl_OL ='rct_CSTR_OL'; open_system(mdl_OL)

Trim Plant at Design Points

Suppose that you want to control this plant at a range ofCrvalues from4to8. Trim the model to find steady-state operating points for a set of values in this range. These values are the design points for tuning.

Cr = (4:8)';% concentrationsfork=1:length(Cr) opspec = operspec(mdl_OL);% Set desired residual concentrationopspec.Outputs(1).y = Cr(k); opspec.Outputs(1).Known = true;% Compute equilibrium condition[op(k),report(k)] = findop(mdl_OL,opspec,findopOptions('DisplayReport','off'));end

opis an array of steady-state operating points. For more information about steady-state operating points, seeAbout Operating Points.

Linearize at Design Points

Linearizing the plant model usingopreturns an array of LTI models, each linearized at the corresponding design point.

G = linearize(mdl_OL,'rct_CSTR_OL/CSTR',op);

CreateslTunerInterface with Block Substitution

To tune the control systemrct_CSTR, create anslTunerinterface that linearizes the system at those design points. Use block substitution to replace the plant inrct_CSTRwith the linearized plant-model arrayG.

blocksub.Name ='rct_CSTR/CSTR'; blocksub.Value = G; tunedblocks = {'Kp','Ki'}; ST0 = slTuner(mdl,tunedblocks,blocksub);

For this example, only the PI coefficients in theConcentration controllerare designated as tuned blocks. In general, however,tunedblockslists all the blocks to tune.

For more information about using block substitution to configure anslTunerinterface for gain-scheduled controller tuning, seeMultiple Design Points in slTuner Interface.

For another example that illustrates using trimming and linearization to generate a family of linear models for gain-scheduled controller tuning, seeTrimming and Linearization of the HL-20 Airframe.

Sample System at Simulation Snapshots

If you are controlling the system around a reference trajectory (x(σ),u(σ)), use snapshot linearization to sample the system at various points along theσtrajectory. Use this approach for time-varying systems where the scheduling variable is time.

To linearize a system at a set of simulation snapshots, use a vector of positive scalars as theopinput argument oflinearize,slLinearizer, orslTuner. These scalars are the simulation times at which to linearize the model. Use the same set of time values as the design points in tunable surfaces for the system.

Sample System at Varying Parameter Values

If the scheduling variable is a parameter in the Simulink model, you can use parameter variation to sample the control system over a parameter grid. For example, suppose that you want to tune a model namedsuspension_gsthat contains two parameters,KsandBs. These parameters each can vary over some known range, and a controller gain in the model varies as a function of both parameters.

To set up such a model for tuning, create a grid of parameter values. For this example, letKsvary from 1 – 5, and letBsvary from 0.6 – 0.9.

Ks = 1:5; Bs = [0.6:0.1:0.9]; [Ksgrid,Bsgrid] = ndgrid(Ks,Bs);

These values are the design points at which to sample and tune the system. For example, create anslTunerinterface to the model, assuming one tunable block, aLookup Tableblock namedKthat models the parameter-dependent gain.

params(1) = struct('Name','Ks','Value',Ksgrid); params(2) = struct('Name','Bs','Value',Bsgrid); STO = slTuner('suspension_gs','K',params);

slTunersamples the model at all(Ksgrid,Bsgrid)values specified inparams.

Next, use the same design points to create a tunable gain surface for parameterizingK.

design = struct('Ks',Ksgrid,'Bs',Bsgrid); shapefcn = @(Ks,Bs)[Ks,Bs,Ks*Bs]; K = tunableSurface('K',1,design,shapefcn); setBlockParam(ST0,'K',K);

After you parameterize all the scheduled gains, you can create your tuning goals and tune the system withsystune.

Eliminate Samples at Unneeded Design Points

Sometimes, your sampling grid includes points that represent irrelevant or unphysical design points. You can eliminate such design points from the model grid entirely, so that they do not contribute to any stage of tuning or analysis. To do so, usevoidModel, which replaces specified models in a model array withNaN.voidModelreplaces specified models in a model array withNaN. UsingvoidModellets your design over a grid of design points that is almost regular.

There are other tools for controlling which models contribute to design and analysis. For instance, you might want to:

  • Keep a model in the grid for analysis, but exclude it from tuning.

  • Keep a model in the grid for tuning, but exclude it from a particular design goal.

For more information, seeChange Requirements with Operating Condition.

LPV Plants inMATLAB

In MATLAB®, you can use an array of LTI plant models to represent an LPV system sampled at varying values ofσ. To associate each linear model in the set with the underlying design points, use theSamplingGridproperty of the LTI model arrayσ. One way to obtain such an array is to create a parametric generalized state-space (genss) model of the system and sample the model with parameter variation to generate the array. For an example, seeStudy Parameter Variation by Sampling Tunable Model.

See Also

||

Related Topics