This example shows how to tune a PID controller block contained in a referenced model.
When you launch the PID Tuner from a PID controller block in a model that is referenced in one or more open models, the software prompts you to specify which open model is the top-level model for linearization and tuning. The referenced model must be in normal mode.
For more information about model referencing, see Overview of Model Referencing in the Simulink® documentation.
Open the model.
Inner Loop is a referenced model
that contains the PID Controller block to tune.
Inner Loop to open
the referenced model.
The referenced model
innerloop contains a PID
Double-click the PID controller block
open the block dialog box.
Click Tune in the block dialog box.
The software prompts you to select which open model is the top-level model for linearization and tuning.
Note: The software only identifies open models containing the model reference. The PID Tuner does not detect models that contain the model reference but are not open.
innerloop causes the PID Tuner
model_ref_pid. Instead, the PID Tuner
PID Controller block for the plant
as if there were no outer loop.
Alternatively, you can select
the top-level model. When you do so, the PID Tuner considers the dynamics
of both the inner and outer loops, and tunes with both loops closed.
In this case, PID controller sees the effective plant
Select the desired top-level model, and click OK.
The PID Tuner linearizes the selected model and launches. Proceed with analyzing and adjusting the tuned response as described in Analyze Design in PID Tuner.