Package: TuningGoal
Minimum loop gain constraint for control system tuning
Use the TuningGoal.MinLoopGain
object to enforce
a minimum loop gain in a particular frequency band. Use this requirement
with control system tuning commands such as systune
or looptune
.
This requirement imposes a minimum gain on the openloop frequency response (L) at a specified location in your control system. You specify the minimum openloop gain as a function of frequency (a minimum gain profile). For MIMO feedback loops, the specified gain profile is interpreted as a lower bound on the smallest singular value of L.
When you tune a control system, the minimum gain profile is converted to a minimum gain constraint on the inverse of the sensitivity function, inv(S) = (I + L).
The following figure shows a typical specified minimum gain profile (dashed line) and a resulting tuned loop gain, L (blue line). The green region represents gain profile values that are forbidden by this requirement. The figure shows that when L is much larger than 1, imposing a minimum gain on inv(S) is a good proxy for a minimum openloop gain.
TuningGoal.MinLoopGain
and TuningGoal.MaxLoopGain
specify
only lowgain or highgain constraints in certain frequency bands.
When you use these requirements, systune
and looptune
determine
the best loop shape near crossover. When the loop shape near crossover
is simple or well understood (such as integral action), you can use TuningGoal.LoopShape
to
specify that target loop shape.
creates
a tuning requirement for boosting the gain of a SISO or MIMO feedback
loop. The requirement specifies that the openloop frequency response
(L) measured at the specified locations exceeds
the minimum gain profile specified by Req
= TuningGoal.MinLoopGain(location
,loopgain
)loopgain
.
You can specify the minimum gain profile as a smooth transfer
function or sketch a piecewise error profile using an frd
model
or the makeweight
command.
Only gain values greater than 1 are enforced.
For MIMO feedback loops, the specified gain profile is interpreted as a lower bound on the smallest singular value of L.
specifies
a minimum gain profile of the form Req
= TuningGoal.MinLoopGain(location
,fmin
,gmin
)loopgain = K/s
(integral
action). The software chooses K
such that the gain
value is gmin
at the specified frequency, fmin
.

Location at which the minimum openloop gain is constrained, specified as a string or cell array of strings. These strings identify one or more loopopening locations in the control system to tune. What loopopening locations are available depends on what kind of system you are tuning:
If 

Minimum openloop gain as a function of frequency. You can specify loopgain = frd([100 100 10],[0 1e1 1]); When you use an Only gain values larger than 1 are enforced. For multiinput,
multioutput (MIMO) feedback loops, the gain profile is interpreted
as a lower bound on the smallest singular value of 

Frequency of minimum gain Use this argument to specify a minimum gain profile of the form 

Value of minimum gain occurring at Use this argument to specify a minimum gain profile of the form 

Minimum openloop gain as a function of frequency, specified
as a SISO The software automatically maps the input argument Use 

Frequency band in which tuning requirement is enforced, specified
as a row vector of the form Set the Req.Focus = [1,100]; Default: 

Stability requirement on closedloop dynamics, specified as
1 ( When Default: 1 ( 

Toggle for automatically scaling loop signals, specified as In multiloop or MIMO control systems, the feedback channels
are automatically rescaled to equalize the offdiagonal terms in the
openloop transfer function (loop interaction terms). Set Default: 

Location at which minimum loop gain is constrained, specified as a string or cell array of strings. These strings identify one or more loopopening locations in the control system to tune. The value of the 

Models to which the tuning requirement applies, specified as a vector of indices. Use the Req.Models = 2:4; When Default: 

Feedback loops to open when evaluating the requirement, specified as a cell array of strings that identify loopopening locations. The tuning requirement is evaluated against the openloop configuration created by opening feedback loops at the locations you identify. If you are using the requirement to tune a Simulink model
of a control system, then If you are using the requirement to tune a generalized statespace
( Default: 

Name of the requirement object, specified as a string. For example, if 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).
Here, 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.MinLoopGain
requirement, f(x)
is given by:
$$f\left(x\right)={\Vert {W}_{S}\left({D}^{1}SD\right)\Vert}_{\infty}.$$
W_{S} is the minimum
loop gain profile, MaxGain
. D is
a diagonal scaling (for MIMO loops). S is the sensitivity
function at Location
.
Although S is a closedloop transfer function, driving f(x) < 1 is equivalent to enforcing a lower bound on the openloop transfer function, L, in a frequency band where the gain of L is greater than 1. To see why, note that S = 1/(1 + L). For SISO loops, when L >> 1, S  ≈ 1/L. Therefore, enforcing the openloop minimum gain requirement, L > W_{S}, is roughly equivalent to enforcing W_{s}S < 1. For MIMO loops, similar reasoning applies, with S ≈ 1/σ_{min}(L), where σ_{min} is the smallest singular value.
For an example illustrating the constraint on S, see Minimum Loop Gain as Constraint on Sensitivity Function.
Create a requirement that boosts the openloop gain of a feedback loop to greater than a specified profile.
Suppose that you are tuning a control system that has a loopopening location identified by PILoop
. Specify that the openloop gain measured at that location exceed a minimum gain of 10 (20 dB) below 0.1 rad/s, rolling off at a rate of 20 dB/dec at higher frequencies. Use an frd
model to sketch this gain profile.
loopgain = frd([10 10 0.1],[0 1e1 10]);
Req = TuningGoal.MinLoopGain('PILoop',loopgain);
The software converts loopgain
into a smooth function of frequency that approximates the piecewisespecified requirement. Display the requirement using viewSpec
.
viewSpec(Req)
The green region indicates where the requirement is violated, except that gain values less than 1 are not enforced. Therefore, this requirement only specifies a minimum gain at frequencies below 1 rad/s.
You can use Req
as an input to looptune
or systune
when tuning the control system.
Create a requirement that specifies a minimum loop gain profile of the form L = K / s. The gain profile attains the value of 20 dB (0.01) at 100 rad/s.
Req = TuningGoal.MinLoopGain('X',100,0.01);
viewSpec(Req)
viewSpec
confirms that the requirement is correctly specified. You can use this requirement to tune a control system that has a loopopening location identified as 'X'
. Since loop gain values less than 1 are ignored, this requirement specifies minimum gain only below 1 rad/s, with no restriction on loop gain at higher frequency.
Examine a minimum loop gain requirement against the tuned loop gain. A minimum loop gain requirement is converted to a constraint on the gain of the sensitivity function at the requirement location.
To see this relationship between the requirement and the sensitivity function, tune the following closedloop system with analysis points at X1
and X2
. The control system has tunable PID controllers C1
and C2
.
Create a model of the control system.
G2 = zpk([],2,3); G1 = zpk([],[1 1 1],10); C20 = ltiblock.pid('C2','pi'); C10 = ltiblock.pid('C1','pid'); X1 = AnalysisPoint('X1'); X2 = AnalysisPoint('X2'); InnerLoop = feedback(X2*G2*C20,1); CL0 = feedback(G1*InnerLoop*C10,X1); CL0.InputName = 'r'; CL0.OutputName = 'y';
Specify some tuning requirements, including a minimum loop gain requirement. Tune the control system to these requirements.
Rtrack = TuningGoal.Tracking('r','y',10,0.01); Rreject = TuningGoal.Gain('X2','y',0.1); Rgain = TuningGoal.MinLoopGain('X2',100,10000); Rgain.Openings = 'X1'; [CL,fSoft] = systune(CL0,[Rtrack,Rreject,Rgain]);
Final: Soft = 1.07, Hard = Inf, Iterations = 82
Examine the TuningGoal.MinLoopGain
requirement against the corresponding tuned response.
viewSpec(Rgain,CL)
The plot shows the achieved loop gain for the loop at X2
(blue line). The plot also shows the inverse of the achieved sensitivity function, S
, at the location X2
(green line). The inverse sensitivity function at this location is given by inv(S) = I+L
. Here, L
is the openloop pointtopoint loop transfer measured at X2
.
The minimum loop gain requirement Rgain
is constraint on inv(S)
, represented in the plot by the green shaded region. The constraint on inv(S)
can be thought of as a minimum gain constraint on L
that applies where the gain of L
(or the smallest singular value of L
, for MIMO loops) is greater than 1.
Create a requirement that specifies a minimum loop gain of 20 dB (100) at 50 rad/s on the inner loop of the following control system.
Req = TuningGoal.MinLoopGain('X2',50,100);
Configure the requirement to apply to the loop gain of the inner loop measured with the outer loop open.
Req.Openings = 'X2';
Setting Req.Openings
tells the tuning algorithm
to enforce this requirement with loops open at the specified location.
By default, tuning using TuningGoal.MinLoopGain
imposes
a stability requirement as well as the minimum loop gain requirement.
Practically, in some control systems it is not possible to achieve
a stable inner loop. When this occurs, remove the stability requirement
for the inner loop by setting the Stabilize
property
to false
.
Req.Stabilize = false;
The tuning algorithm still imposes a stability requirement on the overall tuned control system, but not on the inner loop alone.
evalSpec
 looptune
 looptune (for slTuner)
 sigma
 slTuner
 systune
 systune
(for slTuner)
 TuningGoal.Gain
 TuningGoal.LoopShape
 TuningGoal.Margins
 TuningGoal.MaxLoopGain
 viewSpec