Simulink Control Design™ - MathWorks

(Tuis.) #1
In the Initialize Model dialog box, select MATLAB Workspace, and click OK. The
software exports the operating point to the MATLAB workspace and initializes the model
with the inputs and states in the operating point.

Specify Controller Structure


Before tuning a PID controller block using PID Tuner, you must specify your controller
structure. To do so, double-click the controller block. Then, specify the following
controller parameters:


  • Controller

  • Form

  • Time domain

  • Discrete-time settings

  • Other settings such as the controller initial conditions, output saturation levels, and
    anti-windup configuration.


For this example, use the current controller configuration; that is, a discrete-time parallel-
form PID controller without anti-windup.

Using PID Tuner, you can tune the parameters of the following controller blocks:


  • PID Controller

  • PID Controller (2DOF)

  • Discrete PID Controller

  • Discrete PID Controller (2DOF)


If your model uses the Simscape Electrical Discrete PI Controller block or Discrete PI
Controller with Integral Anti-Windup block, you must replace this block with a Discrete
PID Controller block before tuning.

Identify Plant Model


To open the PID Tuner, click Tune. When PID Tuner first opens, it attempts to linearize
the model. Due to the PWM components, the model analytically linearizes to zero.

To obtain a linear plant model, on the PID Tuner tab, click Plant, and then under Create
a New Plant, click Identify New Plant.

7 PID Controller Tuning

Free download pdf