Preventing Saturations
So far we have only specified a desired response time for the outer (speed) loop. This
leaves systune free to allocate the control effort between the inner and outer loops.
Saturations in the inner loop suggest that the proportional gain is too high and that some
rebalancing is needed. One possible remedy is to explicitly limit the gain from the speed
command to the outputs of the P and PI controllers. For a speed reference of 2000 rpm
and saturation limits of plus/minus 5, the average gain should not exceed 5/2000 =
0.0025. To be conservative, we can try to keep the gain from speed reference to controller
outputs below 0.001. To do this, add two gain requirements and retune the controller
gains with all three requirements in place.
% Mark the control signals as points of interest so that they can be
% referenced in the gain requirements
addPoint(ST0,{'Current PID','Speed PID'})
% Limit gain from speed demand to control signals to avoid saturation
MG1 = TuningGoal.Gain('Speed Demand (rpm)','Speed PID',0.001);
MG2 = TuningGoal.Gain('Speed Demand (rpm)','Current PID',0.001);
% Retune with these additional requirements
ST2 = systune(ST0,[TR,MG1,MG2]);
Final: Soft = 1.39, Hard = -Inf, Iterations = 42
The final gain 1.39 indicates that the requirements are nearly but not exactly met (all
requirements are met when the final gain is less than 1). Use viewGoal to inspect how
the tuned controllers fare against each requirement.
figure('Position',[100,100,560,550])
viewGoal([TR,MG1,MG2],ST2)
13 Control System Tuning Examples