This example shows how to use PID Tuner to fit a linear model to SISO response data.
If you have System Identification Toolbox™ software, you can use the PID Tuner to estimate the parameters of a linear plant model based on time-domain response data. PID Tuner then tunes a PID controller for the resulting estimated model. The response data can be either measured from your real-world system, or obtained by simulating your Simulink® model. Plant estimation is especially useful when your Simulink model cannot be linearized.
PID Tuner gives you several techniques to graphically, manually, or automatically adjust the estimated model to match your response data. This topic illustrates some of those techniques.
Obtain Response Data for Identification
In the PID Tuner, in the PID Tuner tab, in the Plant menu, select
In the Plant Identification tab, click Get I/O data. This menu allows you to obtain system response data in one of two ways:
Once you have imported or simulated data, the Plant Identification tab displays the response data and the response of an initial estimated plant. You can now select the plant structure and adjust the estimated plant parameters until the response of the estimated plant is a good fit to the response data.
Adjust Plant Structure and Parameters
PID Tuner allows you to specify a plant structure, such as One Pole, Two Real Poles, or State-Space Model. In the Structure menu, choose the plant structure that best matches your response. You can also add a transfer delay, a zero, or an integrator to your plant.
In the following sample plot, the one-pole structure gives the qualitatively correct response. You can make further adjustments to the plant structure and parameter values to make the estimated system's response a better match to the measured response data.
PID Tuner gives you several ways to adjust the plant parameters:
You can continue to iterate using any of these methods to adjust plant structure and parameter values until the estimated system's response adequately matches the measured response.
Save Plant and Tune PID Controller
When you are satisfied with the fit, click Save Plant. Doing so saves the estimated plant,
You can now use the PID Tuner tools to refine the controller design for the estimated plant and examine tuned system responses.
You can also export the identified plant from the PID Tuner workspace to the MATLAB® workspace for further analysis. In the PID Tuner tab, click Export. Check the plant model you want to export to the MATLAB workspace. For this example, export