Simulink Control Design™ - MathWorks

(Tuis.) #1
values ensure that the inner loop controller has a faster response than the outer loop
controller.

The Closed-Loop PID Autotuner block performs a closed-loop experiment to obtain the
plant frequency response. You specify parameters for this experiment in the "Experiment"
tab of the block parameters. Here, Plant Sign is Positive, as a positive change in the
plant input at the nominal operating point results in a positive change in the plant output,
when the plant reaches a new steady state. When the plant is stable as in this example,
the plant sign is equivalent to the sign of its DC gain.

For the amplitude of the sine waves injected during the autotuning process, use 1 to
ensure that the plant is suitably excited while remaining within the plant saturation limit.
If the amplitude is chosen too small, the autotuner block would have difficulty to
distinguish the response signals from ripple in power electronics circuits.

Tuning Inner Loop PI Controller

For tuning cascade controllers, set up the model for tuning the inner voltage loop first,
followed by the outer speed loop.

To enable the tuning process for the inner loop controller, in the Autotuning Voltage
subsystem, set the constant block Tune Inner Voltage Loop to 1, which basically breaks
the outer loop and use a nominal (constant) voltage reference of 12.5 instead.

set_param([mdl '/Control/Tune Inner Voltage Loop'],'Value','1');

Also set the constant block Tune Outer Speed Loop to 0 to disable outer loop tuning.

set_param([mdl '/Control/Tune Outer Speed Loop'],'Value','0');

This setting enables the Closed-Loop PID Autotuner block which is configured to run a
closed loop tuning experiment from 1 to 1.5 seconds of simulation time. Plant uses the
first second to reach a steady-state operating condition. A good estimate for a closed-loop
experiment duration is 200/target bandwidth. You can also use the % conv output of
the Closed Loop PID Autotuner block to monitor the progress of the experiment and stop
it when the % conv signal stabilizes near 100%.

Run the simulation. When the experiment concludes, the Closed-Loop PID Autotuner
block returns the tuned PID controller gains for the inner voltage loop. The model sends
them to the MATLAB workspace as the array VoltageLoopGains.

8 PID Autotuning

Free download pdf