Documentation Center

  • Trial Software
  • Product Updates

TuningGoal.Variance class

Package: TuningGoal

Noise amplification constraint for control system tuning

Description

Use the TuningGoal.Variance object to specify a tuning requirement that limits the noise amplification from specified inputs to outputs. The noise amplification is defined as either:

  • The square root of the output variance, for a unit-variance white-noise input

  • The root-mean-square of the output, for a unit-variance white-noise input

  • The H2 norm of the transfer function from the specified inputs to outputs, which equals the total energy of the impulse response

These definitions are different interpretations of the same quantity. TuningGoal.Variance imposes the same limit on these quantities.

You can use the TuningGoal.Variance requirement for control system tuning with tuning commands, such as systune or looptune. Specifying this requirement allows you to tune the system response to white-noise inputs. For stochastic inputs with a nonuniform spectrum (colored noise), use TuningGoal.WeightedVariance instead.

After you create a requirement object, you can further configure the tuning requirement by setting Properties of the object.

Construction

Req = TuningGoal.Variance(inputname,outputname,maxamp) creates a tuning requirement. This tuning requirement limits the noise amplification of the transfer function from inputname to outputname to the scalar value maxamp.

When you tune a control system in discrete time, this requirement assumes that the physical plant and noise process are continuous. To ensure that continuous-time and discrete-time tuning give consistent results, maxamp is interpreted as a constraint on the continuous-time H2 norm. If the plant and noise processes are truly discrete and you want to constrain the discrete-time H2 norm instead, multiply maxamp by . Ts is the sampling time of the model you are tuning.

Input Arguments

inputname

Input signal for requirement, specified as a string or a cell array of strings for vector-valued signals. The signals available to designate as input signals for the tuning requirement are as follows.

  • If you are using the requirement to tune a Simulink® model of a control system, then inputname can include:

    • Any model input.

    • Any linearization input point in the model.

    • Any signal identified as an analysis point or a loop-opening location in an slTuner interface associated with the Simulink model. Use addPoint and addOpening to add analysis points and loop openings to the slTuner interface.

  • If you are using the requirement to tune a generalized state-space model (genss) of a control system using systune, then inputname can include:

    • Any input of the control system model

    • Any loopswitch channel in the control system model

    For example, if you are tuning a control system model, T, then inputname can be a string contained in T.InputName. Also, if T contains a loopswitch block with a switch channel X, then inputname can include X.

  • If you are using the requirement to tune a controller model, C0 for a plant G0, using looptune, then inputname can include:

    • Any input of C0 or G0

    • Any loopswitch channel in C0 or G0

If inputname is a loopswitch channel of a generalized model, the input signal for the requirement is the implied input associated with the switch:

outputname

Output signal for requirement, specified as a string or a cell array of strings for vector-valued signals. The signals available to designate as output signals for the tuning requirement are as follows.

  • If you are using the requirement to tune a Simulink model of a control system, then outputname can include:

    • Any model output

    • Any linearization output point in the model

    • Any signal identified as an analysis point or a loop-opening location in an slTuner interface associated with the Simulink model. Use addPoint and addOpening to add analysis points and loop openings to the slTuner interface.

  • If you are using the requirement to tune a generalized state-space model (genss) of a control system using systune, then outputname can include:

    • Any output of the control system model

    • Any loopswitch channel in the control system model

    For example, if you are tuning a control system model,T, then outputname can be a string contained in T.OutputName. Also, if T contains a loopswitch block with a switch channel X, then outputname can include X.

  • If you are using the requirement to tune a controller model, C0, for a plant, G0, using looptune, then outputname can include:

    • Any output of C0 or G0

    • Any loopswitch channel in C0 or G0

If outputname is a loopswitch channel of a generalized model, the output signal for the requirement is the implied output associated with the switch:

maxamp

Maximum noise amplification from inputname to outputname, specified as a positive scalar value. This value specifies the maximum value of the output variance at the signals specified in outputname, for unit-variance white noise signal at inputname. This value corresponds to the maximum H2 norm from inputname to outputname.

When you tune a control system in discrete time, this requirement assumes that the physical plant and noise process are continuous, and interprets maxamp as a bound on the continuous-time H2 norm. This ensures that continuous-time and discrete-time tuning give consistent results. If the plant and noise processes are truly discrete, and you want to bound the discrete-time H2 norm instead, specify the value maxamp/ . Ts is the sampling time of the model you are tuning.

Properties

Input

Input signal names, specified as a cell array of strings. These strings specify the names of the inputs of the transfer function that the tuning requirement constrains. The initial value of the Input property is set by the inputname input argument when you construct the requirement object.

InputScaling

Input signal scaling, specified as a vector of positive real values.

Use this property to specify the relative amplitude of each entry in vector-valued input signals when the choice of units results in a mix of small and large signals. This information is used to scale the closed-loop transfer function from Input to Output when the tuning requirement is evaluated.

Suppose T(s) is the closed-loop transfer function from Input to Output. The requirement is evaluated for the scaled transfer function Do–1T(s)Di. Do and Di are diagonal matrices with the OutputScaling and InputScaling values on the diagonal, respectively.

The default value, [] , means no scaling.

Default: []

Output

Output signal names, specified as a cell array of strings. These strings specify the names of the outputs of the transfer function that the tuning requirement constrains. The initial value of the Output property is set by the outputname input argument when you construct the requirement object.

OutputScaling

Output signal scaling, specified as a vector of positive real values.

Use this property to specify the relative amplitude of each entry in vector-valued output signals when the choice of units results in a mix of small and large signals. This information is used to scale the closed-loop transfer function from Input to Output when the tuning requirement is evaluated.

Suppose T(s) is the closed-loop transfer function from Input to Output. The requirement is evaluated for the scaled transfer function Do–1T(s)Di. Do and Di are diagonal matrices with the OutputScaling and InputScaling values on the diagonal, respectively.

The default value, [] , means no scaling.

Default: []

MaxAmplification

Maximum noise amplification, specified as a positive scalar value. This property specifies the maximum value of the output variance at the signals specified in Output, for unit-variance white noise signal at Input. This value corresponds to the maximum H2 norm from Input to Output. The initial value of MaxAmplification is set by the maxamp input argument when you construct the requirement.

Models

Models to which the tuning requirement applies, specified as a vector of indices.

Use the Models property when tuning an array of control system models with systune, to enforce a tuning requirement for a subset of models in the array. For example, suppose you want to apply the tuning requirement, Req, to the second, third, and fourth models in a model array passed to systune. To restrict enforcement of the requirement, use the following command:

Req.Models = 2:4;

When Models = NaN, the tuning requirement applies to all models.

Default: NaN

Openings

Feedback loops to open when evaluating the requirement, specified as a cell array of strings that identify loop-opening locations. The available loop-opening locations depend on what kind of system you are tuning:

  • If you are tuning a control system specified as a genss model in MATLAB®, a loop-opening location can be any feedback channel in a loopswitch block in the model. In this case, set Openings to a cell array containing the names of one or more loop-opening locations listed in the Location property of a loopswitch block in the control system model.

  • If you are using looptune to tune a system that includes a plant model and controller model, a loop-opening location can be any control or measurement signal. In this case, set Openings to a cell array containing the names of one or more measurement or control signals.

    • A control signal is a signal that is an output of the controller model and an input of the plant model.

    • A measurement signal is a signal that is an output of the plant model and an input of the controller model.

  • If you are tuning a Simulink model of a control system using an slTuner interface, a loop-opening location can be any analysis point added to the interface using addPoint. In this case, set Openings to a cell array containing the names of one or more of these analysis points.

All feedback loops are closed by default, except where there is a permanent loop-opening defined in an slTuner interface.

Default: {}

Name

Name of the requirement object, specified as a string.

For example, if Req is a requirement:

Req.Name = 'LoopReq';

Default: []

Algorithms

When you tune a control system using a TuningGoal object to specify a tuning requirement, the software converts the requirement into a normalized scalar value f(x). The vector x is the vector of free (tunable) parameters in the control system. The software then adjusts the parameter values to minimize f(x) or to drive f(x) below 1 if the tuning requirement is a hard constraint.

For the TuningGoal.Variance requirement, f(x) is given by:

T(s,x) is the closed-loop transfer function from Input to Output. denotes the H2 norm (see norm).

For tuning discrete-time control systems, f(x) is given by:

Ts is the sampling time of the discrete-time transfer function T(z,x).

Examples

expand all

Constrain Noise Amplification Evaluated with a Loop Opening

Create a requirement that constrains the amplification of the variance from the switch X2 to the output y of the following control system, measured with the outer loop open.

Create a model of the system. To do so, specify and connect the numeric plant models G1 and G2, and the tunable controllers C1 and C2. Also specify and connect the loopswitch blocks X1 and X2 that mark potential loop-opening sites.

G1 = tf(10,[1 10]);
G2 = tf([1 2],[1 0.2 10]);
C1 = ltiblock.pid('C','pi');
C2 = ltiblock.gain('G',1);
X1 = loopswitch('X1');
X2 = loopswitch('X2');
T = feedback(G1*feedback(G2*C2,X2)*C1,X1);

Create a tuning requirement that constrains the noise amplification from the implicit input associated with the switch, X2, to the output y.

Req = TuningGoal.Variance('X2','y',0.1);

This constraint limits the amplification to a factor of 0.1.

Specify that the transfer function from X2 to y is evaluated with the outer loop open when tuning to this constraint.

Req.Openings = {'X1'};

Use systune to tune the free parameters of T to meet the tuning requirement specified by Req. You can then validate the tuned control system against the requirement using viewSpec(Req,T,Info).

See Also

| | | | | | | |

How To

Was this topic helpful?