Simulink Control Design™ - MathWorks

(Tuis.) #1

Tune PID Controller Within Model Reference


In Simulink, you can include one model inside another using model referencing (see
“Model Reference Basics” (Simulink)). When using PID Tuner or Frequency Response
Based PID Tuner to tune a PID controller block in a referenced model, there are some
constraints to be aware of.

In general, you can tune a PID controller block in a referenced model using either PID
Tuner or Frequency Response Based PID Tuner. When you open either tuner, the
software prompts you to specify which model to use as the top-level model for
linearization and tuning (PID Tuner) or estimation and tuning (Frequency Response
Based PID Tuner). For example, consider the model model_ref_pid.

open('model_ref_pid');

The block Inner Loop is a referenced model that contains the controller block to tune.
Open the referenced model.

Inner Loop contains a PID controller block, PID. Open that block. In the Select Tuning
Method drop-down list, select Transfer Function Based (PID Tuner App), and
click Tune to open PID Tuner. The software prompts you to select which open model is
the top-level model for linearization and tuning. (Selecting Frequency Response
Based to open Frequency Response Based PID Tuner results in a similar prompt.)

Tune PID Controller Within Model Reference
Free download pdf