Creating TuningGoals for delay margin and multivariable margin.

7 views (last 30 days)
I want to use systune to tune gains for my Simulink model, using the slTuner interface. I am trying to set up a non-smooth, multi-objective optimization problem that can be solved by systune. However, I am having a difficult time figuring out how to set up two of the hard constraints.
The optimization problem is stated as follows:
minimize
subject to <
<
>
> 0.3
I think I have the soft constraints and first two hard constraints correctly implemented now, using TuningGoal.Variance. However, I have no idea how to properly set up the last two hard constraints. These are the dynamic margin (generalized delay margin) at δ and the multivarible module margin of δ. Where is the complementary sensitivity function and is the sensitivity function.
mdl = "TestVehicleModel";
open_system(mdl);
st0 = slTuner(mdl,"TuneGain");
Softreq1 = TuningGoal.Variance("u1","y1",1);
Softreq2 = TuningGoal.Variance("u2","y1",1);
Softreq3 = TuningGoal.Variance("u1","y2",1);
Softreq4 = TuningGoal.Variance("u2","y2",1);
Hardreq1 = TuningGoal.Variance("u1","y3",0.5);
Hardreq2 = TuningGoal.Variance("u2","y3",0.5);
[st, fSoft, gHard] = systune(st0,[Softreq1,Softreq2,Softreq3,Softreq4],[Hardreq1,Hardreq2]);
Can anyone help me with this? I know that it should be possible, as some researches have done it before in previous versions of MATLAB, probably 2018a.

Answers (1)

Ronit
Ronit on 24 Sep 2024
Hello @Stijn,
To handle the last two hard constraints related to the dynamic margin and multivariable module margin, you can use TuningGoal.Margins and TuningGoal.Loopshape.
  1. Dynamic Margin Constraint: TuningGoal.Margins can be used to impose constraints on the gain and phase margins. However, since you are interested in the generalized delay margin, you might need to use TuningGoal.Loopshape to indirectly enforce this by shaping the loop gain.
  2. Multivariable Module Margin Constraint: TuningGoal.Loopshape can be used to enforce a minimum loop gain, which can help ensure robustness.
mdl = "TestVehicleModel";
open_system(mdl);
st0 = slTuner(mdl, "TuneGain");
Softreq1 = TuningGoal.Variance("u1", "y1", 1);
Softreq2 = TuningGoal.Variance("u2", "y1", 1);
Softreq3 = TuningGoal.Variance("u1", "y2", 1);
Softreq4 = TuningGoal.Variance("u2", "y2", 1);
Hardreq1 = TuningGoal.Variance("u1", "y3", 0.5);
Hardreq2 = TuningGoal.Variance("u2", "y3", 0.5);
% Dynamic margin constraint: Adjust the frequency range and gain as needed.
tau_min = ...; % Define your tau_min value
DynamicMargin = TuningGoal.LoopShape("delta", 1/tau_min, 1);
% Multivariable module margin constraint
MultivarModuleMargin = TuningGoal.LoopShape("delta", 0.3, 1);
[st, fSoft, gHard] = systune(st0,[Softreq1,Softreq2,Softreq3,Softreq4],[Hardreq1,Hardreq2,DynamicMargin,MultivarModuleMargin]);
Ensure you adjust the parameters and frequency ranges according to your specific system requirements.
Please refer to the following MATLAB documentations for more information:
  1. TuningGoal.Margins: https://www.mathworks.com/help/control/ref/tuninggoal.margins.html
  2. TuningGoal.Loopshape: https://www.mathworks.com/help/control/ref/tuninggoal.loopshape.html
I hope it helps with your query!
  2 Comments
Stijn
Stijn on 24 Sep 2024
Thank you for the nudge in the right direction. I am still wondering however, how does the TuningGoal.LoopShape differentiate between using a sensitivity function or a complementary sensitivity function. Does the method shown below work?
Where u = δ, u_s is where you can take the sensitivity function and u_c is where you can take the complementary sensitivity function.
Furthermore, I read that TuningGoal.Loopshape interprets values above 1 as a minimum, which is good for the 3rd hard contraint. However, for the 4th hard constraint, a value of 0.3 is a minimum as well. Is this function able to deal with this as well?
I hope you can also help me with these last questions. I would love to hear from you!
Ronit
Ronit on 26 Sep 2024
TuningGoal.Loopshape function in MATLAB can handle both types of constraints, minimum performance requirements and minimum roll-off requirements. Values less than "1" are interpreted as minimum roll-off requirements. They set an upper bound on the largest singular value of "L". This ensures that the system has sufficient roll-off and doesn't amplify noise excessively at high frequencies.
For the fourth hard constraint, where the minimum value is 0.3, you can still use TuningGoal.Loopshape. You need to specify a loop gain profile that reflects this requirement.
% Example gain profile
loopgain = makeweight(0.3, 1, 10);
MultivarModuleMargin = TuningGoal.LoopShape("delta", loopgain);
makeweight is a convenient way to specify target gain profiles. Please find the documentation link below:

Sign in to comment.

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!