Simulink Control Design™ - MathWorks

(Tuis.) #1
Set the "Minimum" value of the tunable parameters Kp and Kd to 0.

C.Kp.Minimum = 0;
C.Kd.Minimum = 0;

Finally, associate the modified parameterization with the tuned block.

setBlockParam(ST0,'PID Controller',C)

Retune the PID gains and verify that the proportional and derivative gains are indeed
nonnegative.

ST1 = looptune(ST0,Control,Measurement,wc);

showTunable(ST1)

Final: Peak gain = 0.863, Iterations = 5
Achieved target gain value TargetGain=1.

Block 1: rct_engine_speed/PID Controller =

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

with Kp = 0.00125, Ki = 0.00304, Kd = 0.000172, Tf = 0.01

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

Comparison of PI and PID Controllers

Closer inspection of the tuned PID gains suggests that the contribution of the derivative
term is minor. This suggests using a simpler PI controller instead. To do this, override the
default parameterization for the "PID Controller" block:

setBlockParam(ST0,'PID Controller',tunablePID('C','pi'))

This specifies that the "PID Controller" block should now be parameterized as a mere PI
controller. Next re-tune the control system for this simpler controller:

ST2 = looptune(ST0,Control,Measurement,wc);

Final: Peak gain = 0.945, Iterations = 6
Achieved target gain value TargetGain=1.

13 Control System Tuning Examples

Free download pdf