Simulink Control Design™ - MathWorks

(Tuis.) #1

Tune Control Systems in Simulink


This example shows how to use systune or looptune to automatically tune control
systems modeled in Simulink.

Engine Speed Control

For this example we use the following model of an engine speed control system:

open_system('rct_engine_speed')

The control system consists of a single PID loop and the PID controller gains must be
tuned to adequately respond to step changes in the desired speed. Specifically, we want
the response to settle in less than 5 seconds with little or no overshoot. While pidtune is
a faster alternative for tuning a single PID controller, this simple example is well suited
for an introduction to the systune and looptune workflows in Simulink.

Controller Tuning with SYSTUNE

The slTuner interface provides a convenient gateway to systune for control systems
modeled in Simulink. This interface lets you specify which blocks in the Simulink model
are tunable and what signals are of interest for open- or closed-loop validation. Create an
slTuner instance for the rct_engine_speed model and list the "PID Controller" block
(highlighted in orange) as tunable. Note that all Linear Analysis points in the model
(signals "Ref" and "Speed" here) are automatically available as points of interest for
tuning.

ST0 = slTuner('rct_engine_speed','PID Controller');

Tune Control Systems in Simulink
Free download pdf