Simulink Control Design™ - MathWorks

(Tuis.) #1
Name: C2
Continuous-time PI controller in parallel form.

Next use "LoopShape" requirements to specify the desired bandwidths for the inner and
outer loops. Use as the target loop shape for the outer loop to enforce integral
action with a gain crossover frequency at 0.2 rad/s:

% Outer loop bandwidth = 0.2
s = tf('s');
Req1 = TuningGoal.LoopShape('y1',0.2/s); % loop transfer measured at y1
Req1.Name = 'Outer Loop';

Use for the inner loop to make it ten times faster (higher bandwidth) than the outer
loop. To constrain the inner loop transfer, make sure to open the outer loop by specifying
y1 as a loop opening:

% Inner loop bandwidth = 2
Req2 = TuningGoal.LoopShape('y2',2/s); % loop transfer measured at y2
Req2.Openings = 'y1'; % with outer loop opened at y1
Req2.Name = 'Inner Loop';

You can now tune the PID gains in C1 and C2 with systune:

ST = systune(ST0,[Req1,Req2]);

Final: Soft = 0.859, Hard = -Inf, Iterations = 70

Use showTunable to see the tuned PID gains.

showTunable(ST)

Block 1: rct_cascade/C1 =

1 s
Kp + Ki * --- + Kd * --------
s Tf*s+1

with Kp = 0.0501, Ki = 0.0186, Kd = 0.0432, Tf = 0.00323

Name: C1
Continuous-time PIDF controller in parallel form.

13 Control System Tuning Examples

Free download pdf