This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Tune PID Controller Within Model Reference

This example shows how to tune a PID controller block contained in a referenced model.

When you open 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 (Simulink) in the Simulink® documentation.

  1. Open the model.


    The block Inner Loop is a referenced model that contains the PID Controller block to tune.

  2. Double-click Inner Loop to open the referenced model.

    The referenced model innerloop contains a PID controller block, PID.

  3. Double-click the PID controller block PID to open the block dialog box.

  4. 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. PID Tuner does not detect models that contain the model reference but are not open.

    Selecting innerloop causes PID Tuner to disregard model_ref_pid. Instead, PID Tuner tunes the PID Controller block for the plant G_Inner alone, as if there were no outer loop.

    Alternatively, you can select model_ref_pid as the top-level model. When you do so, 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 (1+G_Outer*Gain)*G_Inner.

  5. Select the desired top-level model, and click OK.

    PID Tuner linearizes the selected model and launches. Proceed with analyzing and adjusting the tuned response as described in Analyze Design in PID Tuner.

Related Topics

Was this topic helpful?