Documentation

SISO Design Tool

Tune Compensator Parameters Using the SISO Design Tool

In this example, you get an overview of the steps for tuning compensator parameters using Control System Designer (the SISO Design GUI). Before you begin, you need:

  • A model in the MATLAB workspace representing your plant

  • Design requirements for your system

To tune parameters:

  1. Open the control design GUIs by typing the following in the MATLAB Command Window:

    controlSystemDesigner
    This command opens the Control and Estimation Tools Manager and the SISO Design Tool, as shown in the following figure.

      Note:   You can also open the SISO Design tools from the MATLAB® desktop. To do so, in the Apps tab, click Control System Designer. Then, in the Control and Estimation Tools Manager, click System Data to specify your plant model.

  2. Define the control architecture for your system.

    1. In the Architecture tab of the Control and Estimation Tools Manager, click Control Architecture.

    2. In the Control Architecture dialog box, select the control architecture.

    3. Specify the sign of summing junctions as + or -.

  3. Specify the plant model and initial guesses for the compensator elements in the control architecture.

    1. In the Architecture tab of the Control and Estimation Tools Manager, click System Data.

    2. In the System Data dialog box, browse for a model in the MATLAB workspace.

  4. Design a compensator using automated tuning, for example PID Tuning.

    1. In the Automated Tuning tab of the Control and Estimation Tools Manager, select an automated tuning method.

    2. Specify tuning options.

    3. Click Update Compensator to tune parameters.

  5. Evaluate the system's closed-loop performance.

    1. Plot the system response.

      1. In the Analysis Plots tab, select a plot type.

      2. Select the type of response for each plot.

    2. Display specific performance characteristic for your system. Compare values to design requirements.

      1. Right-click to select performance characteristics.

      2. Click on the dot that appears to view the characteristic value.

  6. Refine compensator design using graphical tuning.

    1. Create plots for graphical tuning.

      1. In the Graphical Tuning tab, select the loop to tune in each plot.

      2. Select plot types.

    2. In a design plot, modify the compensator by adding poles, zeros, lead, and lag, for example. To do this, right-click to add dynamic elements in the controller structure.

    3. Add a new pole, for example, by clicking the pole location on the plot.

    4. Modify the compensator structure by moving the poles, zeros, and other dynamic elements directly on the plot.

  7. Export the compensator to the MATLAB workspace for further analysis.

    1. In the Control and Estimation Tools Manager, select File > Export.

    2. In the SISO Tool Export dialog box, select the compensator.

    3. Click Export to Workspace.

Components of the SISO Tool

The SISO Design Tool has the following components:

  • SISO Design Task node in the Control and Estimation Tools Manager is a user interface (UI) that facilitates the design of compensators for single-input, single-output feedback loops through a series of interactive tabs.

  • The Graphical Tuning window is a graphical user interface (GUI) for displaying and manipulating the Bode, root locus, and Nichols plots for the controller currently being designed. This window is titled SISO Design for Design Name.

  • The Linear System Analyzer associated with the SISO Design Task. For instructions on how to operate the Linear System Analyzer, see Linear System Analyzer for SISO Design Task Design Requirements.

Opening the SISO Design Tool

You can open the SISO Design Tool using an LTI model or an array of LTI models. This topic shows how to open the SISO Design Tool with the DC motor example.

If you have not built the DC motor model, type

load ltiexamples

at the MATLAB prompt. This loads a collection of linear models, including the DC motor. To open the SISO Design Tool and import the DC motor, type

controlSystemDesigner(sys_dc)

This command opens:

  • The SISO Design Task node in the Control and Estimation Tools Manager

  • The Graphical Tuning window with the root locus and open-loop Bode diagrams for the DC motor plotted by default

SISO Design Task Node (Architecture Tab)

Graphical Tuning Window with the DC Motor Example

Using the SISO Design Task Node in the Control and Estimation Tools Manager

The SISO Design Task node in the Control and Estimation Tools Manager contains the following tabs for specifying controller design and behavior:

  • Architecture:

    • Change the feedback structure and label signals and blocks.

    • Configure loops for multi-loop design by opening signals to remove the effects of other feedback loops.

    • Import LTI models or row or column arrays of LTI models into your system.

    • Convert sample time of the system or switch between different sample times to design different compensators.

    • Specify nominal model and frequency grid for multimodel computations.

  • Compensator Editor:

    • Directly edit compensator poles, zeros, and gains.

    • Add or remove compensator poles and zeros.

  • Graphical Tuning:

    • Configure design plots in the Graphical Tuning window.

    • Use design plots to graphically manipulate system response.

  • Analysis Plots:

    • Configure analysis plots in the Linear System Analyzer.

    • Use analysis plots to view the response of open- or closed-loop systems.

  • Automated Tuning:

    • Automatically generate compensators using optimization-based, PID, internal model control (IMC), linear-quadratic-Gaussian (LQG), or loop shaping methods.

    • Use optimization-based methods that automatically tune the system to satisfy design requirements (available when you have the Simulink® Design Optimization™ product).

Importing Models into the SISO Design Tool

If you type controlSystemDesigner at the MATLAB prompt, the Control and Estimation Tools Manager opens with the SISO Design Task node and an empty Graphical Tuning window.

You can import an LTI model or a row or column array of LTI models by clicking System Data in the Architecture page, as shown in the following figure.

The System Data dialog box opens, as shown in the following figure.

  • G is a plant modeled as an LTI model or multiple plants modeled as a row or column array of LTI models. If H is also an array, their sizes must match.

  • H is the sensor modeled as an LTI model or multiple sensors modeled as a row or column array of LTI models. If G is also an array, their sizes must match.

  • C is a controller and is an LTI model.

  • F is a prefilter and is an LTI model.

The default values of G, H, C, and F are 1. See Feedback Structure for more information.

    Note:   If you import an array of LTI models for either G or H or both for control design, you can use the default multimodel options or configure the options by clicking Multimodel Configuration in the Architecture tab. For more information, see Control Design Analysis of Multiple Models.

To import the DC motor model:

  1. Select G and click Browse. The Model Import dialog box opens, as shown in the following figure.

  2. Select sys_dc from the Available Models list. Click Import, and then click Close.

    You can now see sys_dc in the System Data dialog box.

  3. Click OK.

    The Graphical Tuning window updates with the DC motor model, as shown in the following figure.

Feedback Structure

The SISO Design Tool, by default, assumes that the compensator is in the forward path, i.e., that the feedback structure looks like this figure.

Default Feedback Structure — Compensator in the Forward Path

In this figure:

  • G represents the plant

  • H represents the sensor dynamics

  • F represents the prefilter

  • C represents the compensator

The default values for F, H, and C are all 1. You can see the default values in the System Data dialog box. This means that, by default, the compensator has unity gain.

For the DC motor, G contains the DC motor model, sys_dc.

Alternative Feedback Structures

In the Architecture page, click Control Architecture to open the Control Architecture dialog box.

You can use the Signs and Blocks and Signals panes to change the sign of the feedback signal into a summing junction and rename blocks and signals in the diagram respectively. See Block Diagram Structure Modifications for more details.

On any tab in the SISO Design Task node, click Show Architecture to see the current architecture and a list of the identifiers and names associated with the components.

Analysis Plots for Loop Responses

As you design different controllers, you examine the various loop responses for a particular design. For example, to view the closed-loop step response, click the Analysis Plots tab. This tab lists the available responses, as shown in the following figure.

Select the plot types for each plot in the Analysis Plots area. Then select the plots to appear in the Plots list in the Contents of Plots table, as shown in the following figure.

Analysis Plots Loop Response Selection

After you select a plot, the Linear System Analyzer opens and displays the appropriate response(s) opens. You can also click Show Analysis Plot to open the Linear System Analyzer.

The following figure shows the resulting plot for the closed-loop step response of the DC motor.

Linear System Analyzer Showing the Step Response for the DC Motor

The settling time of the DC motor is about 1.5 seconds, which is too slow for many applications. Also, the plot shows a large steady-state error. You can use Bode diagram techniques to improve the response time and steady-state error of the DC motor step response, as described in Bode Diagram Design.

For a row or column array of LTI models, the analysis plots show the response of the nominal model only. To view the responses of the remaining models in the array, right-click the plot, and select one of the following options:

  • Multimodel Display > Bounds — Displays an envelope encompassing all model responses.

  • Multimodel Display > Individual Responses — Displays individual model responses.

The plot line in darker shade of blue is the response of the nominal model. When you design a controller for the nominal plant, you can simultaneously analyze the controller's effect on the remaining model responses in the array. For more information on analyzing control design for multiple models, see Control Design Analysis of Multiple Models.

As you select different compensator designs, the software computes the responses and updates the response plots in real-time in the Linear System Analyzer associated with your SISO Design Task. For an array, this computation is expensive. Therefore, real-time updates may cause delay in refreshing the plots for:

  • A large number of responses

  • Responses of a large number of models

To deactivate real-time updates, unselect the Real-Time Update option.

Using the Graphical Tuning Window

The SISO Design for SISO Design Task graphical tuning window is a graphical user interface (GUI) that you use to display and manipulate the Bode, root locus, and Nichols plots for the controller currently being designed. You can accomplish most control design tasks using the tabs in the SISO Design Task node in the Control and Estimation Tools Manager.

The graphical tuning window shows the plots configured in the Graphical Tuning tab.

This topic describes some of the methods you can use to navigate in the Graphical Tuning window and manipulate the window's appearance.

Graphical Tuning Window Display

The Graphical Tuning window shows:

  • Poles as x's

  • Zeros as o's

  • Gain and phase margins (by default) in the lower-left corners of the Bode magnitude and phase plots

For the DC motor, the graphical tuning window resembles the following figure.

For a row or column arrays of LTI models, the plots show the individual responses and poles and zeros of all models in the array, as shown in the following figure.

The plot line in darker shade of blue represents the response of the nominal model. This plot also displays the response characteristics of the nominal model.

You can change the display to view an envelope that encompasses all individual model responses. To do so, right-click the plot, and select Multimodel Display > Bounds. The bounds resemble the following figure.

As you are designing a controller for the nominal plant, you can simultaneously analyze the controller's effect on the remaining models in the array. The software computes the response for each model and plots them. This computation is expensive and results in a slower refresh of the plots for:

  • Large number of responses

  • Responses for a large number of models

  • Dense frequency grid

To speed up the plot updates, change the display to plot the envelope instead of individual responses. For more information, see Control Design Analysis of Multiple Models.

Changing Units on a Plot

The SISO Design Tool provides editors for setting plot options in the Graphical Tuning window. For example, if you want to change the frequency units on all the Bode plots created in the SISO Design Tool from rad/s to Hertz, select SISO Tool Preferences from the Edit menu in the SISO Design Task node on the Control and Estimation Tools Manager, as shown in the next figure.

This opens the SISO Tool Preferences dialog box.

Use the options on the Units page to make the change. This unit change persists for the entire session.

Right-Click Menus

The SISO Design Tool has right-click menus available in any of the plot regions. Open the Bode magnitude menu by right-clicking in the Bode magnitude plot. The following menu appears.

Right-Click Menu for the Bode Magnitude Plot

Although the menus for each plot generally contain the same options, there are some options specific to each plot type:

  • The Open-Loop Bode Editor has a Gain Target option, the Closed-Loop Bode Editor has a Select Compensator option instead.

  • For arrays of LTI models, the Multimodel Display option for the Root Locus Editor has an option to show the poles and zeros of the nominal or all models, instead of Bounds and Individual Responses options.

The right-click menus contain numerous features. The DC motor example uses many of the available features; for a complete discussion of the right-click menus, see the help for the SISO Design Tool."

Exporting the Compensator and Models

After you design the controller, you may want to save your design parameters for future implementation. You can do this by selecting:

  • File > Export in the Control and Estimation Tools Manager

  • File > Export in the Graphical Tuning window.

The SISO Tool Export dialog box opens:

  • Select models to export area shows a list of models for the components of your designs. For a plant or sensor modeled as row or column array of LTI models, the components are also arrays of LTI models.

  • Export As column displays variables with default names or previously named in the System Data dialog box.

  • Select design drop-down list lets you view the components of other designs.

To export your controller to the workspace:

  1. Select Compensator C in the Component column. If you want to change the name, double-click in the cell for Compensator C.

    To select multiple components, use the Shift key if they are all adjacent and the Ctrl key if they are not.

  2. Click Export to Workspace to export the compensator to the MATLAB workspace.

  3. At the MATLAB prompt, type

    who
    
    to view the compensator variable C.

  4. To see the format in which this variable is stored, type

    C
    

Clicking Export to Disk opens the Export to Disk dialog box.

You can save your models as MAT-files in any folder. The default name for the MAT-file is the name of your original model. You can also specify a name for the MAT-file. If you save multiple components, they are stored in a single MAT-file.

Storing and Retrieving Intermediate Designs

You can store and retrieve intermediate compensators while you iterate on your compensator design. To store intermediate designs, click the Design History node or Store Design, both located on the SISO Design Task node in the Control and Estimation Tools Manager.

Alternatively, you can select Store/Retrieve from the Designs menu in the Graphical Tuning window. Using either method, the following Design History page opens.

If you have any intermediate designs already stored, they will appear on the Design History page.

Click Store Design to save the current design with the default name Design; the suffix increments when you store additional compensators without renaming them. You can rename the design by right-clicking the name under the node and selecting Rename.

To retrieve intermediate designs, again click the Design History node or select Store/Retrieve from the Designs menu. From the Design History page, select the design to retrieve, and then click Retrieve Design, as shown next.

Design History Page Listing Current Designs

The Graphical Tuning window automatically reverts to the selected compensator design.

Click any design name in the Design History to view a snapshot summary of the design, as shown in the following figure.

Design Snapshot Summary

Return to the compensator list by clicking the Design History node.

You can delete an intermediate design by selecting it from the Design History page and clicking Delete.

Was this topic helpful?