Simulink Control Design™ - MathWorks

(Tuis.) #1

Programmatic Use
Block Parameter: AmpSine
Type: scalar, vector of length 5
Default: 1


Block Tab


Reduce memory and avoid task overrun (external mode only) — Deploy
tuning algorithm only
off (default) | on


The block contains two modules, one that performs the real-time frequency-response
estimation, and one that uses the resulting estimated response to tune the PID gains.
When you run a Simulink model containing the block in the external simulation mode, by
default both modules are deployed. You can save memory on the target hardware by
deploying the estimation module only (see “Control Real-Time PID Autotuning in
Simulink” on page 8-27). In this case, the tuning algorithm runs on the Simulink host
computer instead of the target hardware. When this option is selected, the deployed
algorithm uses about a third as much memory as when the option is cleared.


Additionally, the PID gain calculation demands more computational load than the
frequency-response estimation. For fast controller sample times, some hardware might
not finish the gain calculation within one execution cycle. Therefore, when using
hardware with limited computing power, selecting this option lets you tune a PID
controller with a fast sample time.


If you intend to deploy the block and perform PID tuning without using external
simulation mode, do not select this option.


Programmatic Use
Block Parameter: DeployTuningModule
Type: character vector
Values: 'off' | 'on'
Default: 'off'


Configure block for PLC Coder — Configure block for code generation with
Simulink PLC Coder
off (default) | on


Select this parameter if you are using Simulink PLC Coder to generate code for the
autotuner block. Clear the parameter for code generation with any other MathWorks
code-generation product.


Closed-Loop PID Autotuner
Free download pdf