Documentation Center 
Package: TuningGoal
Noise amplification constraint for control system tuning
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 unitvariance whitenoise input
The rootmeansquare of the output, for a unitvariance whitenoise input
The H_{2} 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 whitenoise 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.
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 continuoustime and discretetime tuning give consistent results, maxamp is interpreted as a constraint on the continuoustime H_{2} norm. If the plant and noise processes are truly discrete and you want to constrain the discretetime H_{2} norm instead, multiply maxamp by . T_{s} is the sampling time of the model you are tuning.
inputname 
Input signal for requirement, specified as a string or a cell array of strings for vectorvalued signals. The signals available to designate as input signals for the tuning requirement are as follows.
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 vectorvalued signals. The signals available to designate as output signals for the tuning requirement are as follows.
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 unitvariance white noise signal at inputname. This value corresponds to the maximum H_{2} 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 continuoustime H_{2} norm. This ensures that continuoustime and discretetime tuning give consistent results. If the plant and noise processes are truly discrete, and you want to bound the discretetime H_{2} norm instead, specify the value maxamp/ . T_{s} is the sampling time of the model you are tuning. 
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 vectorvalued input signals when the choice of units results in a mix of small and large signals. This information is used to scale the closedloop transfer function from Input to Output when the tuning requirement is evaluated. Suppose T(s) is the closedloop transfer function from Input to Output. The requirement is evaluated for the scaled transfer function D_{o}^{–1}T(s)D_{i}. D_{o} and D_{i} 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 vectorvalued output signals when the choice of units results in a mix of small and large signals. This information is used to scale the closedloop transfer function from Input to Output when the tuning requirement is evaluated. Suppose T(s) is the closedloop transfer function from Input to Output. The requirement is evaluated for the scaled transfer function D_{o}^{–1}T(s)D_{i}. D_{o} and D_{i} 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 unitvariance white noise signal at Input. This value corresponds to the maximum H_{2} 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 loopopening locations. The available loopopening locations depend on what kind of system you are tuning:
All feedback loops are closed by default, except where there is a permanent loopopening 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: [] 
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 closedloop transfer function from Input to Output. denotes the H_{2} norm (see norm).
For tuning discretetime control systems, f(x) is given by:
T_{s} is the sampling time of the discretetime transfer function T(z,x).
evalSpec  looptune  looptune (for slTuner)  norm  slTuner  systune  systune (for slTuner)  TuningGoal.WeightedVariance  viewSpec