Sensitivity requirement for control system tuning
Use the TuningGoal.Sensitivity object to limit the sensitivity of a feedback loop to disturbances. Constrain the sensitivity to be smaller than one at frequencies where you need good disturbance rejection. Use this requirement for control system tuning with tuning commands such as systune or looptune.
Req = TuningGoal.Sensitivity(location,maxsens) creates a tuning requirement for limiting the sensitivity to disturbances entering a feedback loop at the specified location. maxsens specifies the maximum sensitivity as a function of frequency. You can specify the maximum sensitivity profile as a smooth transfer function or sketch a piecewise error profile using an frd model.
Location at which the sensitivity to disturbances is constrained, specified as a string or cell array of strings that identify one or more loop-opening locations in the control system to tune. What loop-opening locations are available depends on what kind of system you are tuning:
If location is a cell array of loop-opening locations, then the sensitivity requirement applies to the MIMO loop.
Maximum sensitivity to disturbances as a function of frequency.
You can specify maxsens as a smooth SISO transfer function (tf, zpk, or ss model). Alternatively, you can sketch a piecewise gain profile using a frd model. For example, the following frd model specifies a maximum sensitivity of 0.01 (–40 dB) at 1 rad/s, increasing to 1 (0 dB) past 50 rad/s.
maxsens = frd([0.01 1 1],[1 50 100]); bodemag(maxsens) ylim([-45,5])
When you use an frd model to specify maxsens, the software automatically maps your specified gain profile to a zpk model whose magnitude approximates the desired gain profile. Use viewSpec(Req) to plot the magnitude of that zpk model.
Location at which the sensitivity to disturbances is constrained, specified as a string or cell array of strings that identify one or more loop-opening locations in the control system to tune.
The value of the Location property is set by the location input argument when you create the TuningGoal.Sensitivity requirement.
Maximum sensitivity as a function of frequency, specified as a SISO zpk model.
The software automatically maps the input argument maxsens onto a zpk model. The magnitude of this zpk model approximates the desired gain profile. Use viewSpec(Req) to plot the magnitude of the zpk model MaxSensitivity.
Toggle for automatically scaling loop signals, specified as 'on' or 'off'.
In multi-loop or MIMO control systems, the feedback channels are automatically rescaled to equalize the off-diagonal terms in the open-loop transfer function (loop interaction terms). Set LoopScaling to 'off' to disable such scaling and shape the unscaled sensitivity function.
Frequency band in which tuning requirement is enforced, specified as a row vector of the form [min,max].
Set the Focus property to limit enforcement of the requirement to a particular frequency band. Express this value in the frequency units of the control system model you are tuning (rad/TimeUnit). For example, suppose Req is a requirement that you want to apply only between 1 and 100 rad/s. To restrict the requirement to this band, use the following command:
Req.Focus = [1,100];
Default: [0,Inf] for continuous time; [0,pi/Ts] for discrete time, where Ts is the model sampling time.
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.
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:
All feedback loops are closed by default.
Name of the requirement object, specified as a string.
For example, if Req is a requirement:
Req.Name = 'LoopReq';
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), where 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.Sensitivity requirement, f(x) is given by:
S(s,x) is the sensitivity function of the control system at location.
Create a requirement that limits the sensitivity to disturbance at the plant input of the following control system. The control system contains a loopswitch block at the plant input, having a switch location identified by 'X'.
Specify a maximum sensitivity of 0.01 (–40 dB) at 1 rad/s, increasing to 1 (0 dB) past 10 rad/s. Use an frd model to sketch this target sensitivity.
maxsens = frd([0.01 1 1],[1 10 100]); Req = TuningGoal.Sensitivity('X',maxsens);
The software converts maxsens into a smooth function of frequency that approximates the piecewise-specified requirement. Display the requirement using viewSpec.
The yellow region indicates where the requirement is violated.
You can use Req as an input to looptune or systune when tuning the control system.
Create a requirement that specifies a maximum sensitivity of 0.1 (10%) at frequencies below 5 rad/s. Configure the requirement to apply only to the second and third plant models.
Req = TuningGoal.Sensitivity('u',0.1); Req.Focus = [0 5]; Req.Models = [2 3];
You can use Req as an input to looptune or systune when tuning a control system that has a loop-opening location called 'u'. Setting the Focus property limits the application of the requirement to frequencies between 0 and 5 rad/s. Setting the Models property restricts application of the requirement to the second and third models in an array, when you use the requirement to tune an array of control system models.
evalSpec | looptune | slTunable | slTunable.looptune | slTunable.systune | systune | TuningGoal.Gain | TuningGoal.LoopShape | TuningGoal.MaxLoopGain | TuningGoal.MinLoopGain | TuningGoal.Rejection | viewSpec