Customize Response Plots Using the Response Plots Property Editor

Opening the Property Editor

After you create a response plot, there are two ways to open the Property Editor:

  • Double-click in the plot region.

  • Right-click the plot, and select Properties from the context menu.

Before looking at the Property Editor, open a step response plot using these commands.

sys_dc = idtf([1 4],[1 20 5]);
step(sys_dc)

This creates a step plot. Right-click the plot, and select Properties from the context menu. When you open the Property Editor, squares appear around the step response plot.

Overview of Response Plots Property Editor

The appearance of the Property Editor dialog box depends on the type of response plot. This figure shows the Property Editor dialog box for a step response.

The Property Editor for Step Response

In general, you can change the following properties of response plots. Only the Labels and Limits panes are available when using the Property Editor with Simulink® Design Optimization™ software.

  • Titles and X- and Y-labels in the Labels pane.

  • Numerical ranges of the X and Y axes in the Limits pane.

  • Units where applicable (e.g., rad/s to Hertz) in the Units pane.

    If you cannot customize units, the Property Editor displays that no units are available for the selected plot.

  • Styles in the Styles pane.

    You can show a grid, adjust font properties, such as font size, bold, and italics, and change the axes foreground color

  • Change options where applicable in the Options pane.

    These include peak response, settling time, phase and gain margins, etc. Plot options change with each plot response type. The Property Editor displays only the options that make sense for the selected response plot. For example, phase and gain margins are not available for step responses.

As you make changes in the Property Editor, they display immediately in the response plot. Conversely, if you make changes in a plot using right-click menus, the Property Editor for that plot automatically updates. The Property Editor and its associated plot are dynamically linked.

Labels Pane

To specify new text for plot titles and axis labels, type the new names in the field next to the label you want to change. The label changes immediately as you type, so you can see how the new text looks as you are typing.

Limits Pane

Default values for the axes limits make sure that the maximum and minimum x and y values are displayed. If you want to override the default settings, change the values in the Limits fields. The Auto-Scale box automatically clears if you click a different field. The new limits appear immediately in the response plot.

To re-establish the default values, select the Auto-Scale box again.

Units Pane

You can use the Units pane to change units in your response plot. The contents of this pane depend on the response plot associated with the editor. Use the menus to toggle between units.

Optional Unit Conversions for Response Plots

Response Plot

Unit Conversions

Bode and
Bode Magnitude

  • Frequency

    By default, shows rad/TimeUnit where TimeUnit is the system time units specified in the TimeUnit property of the input system.

     Frequency Units Options

  • Frequency scale is logarithmic or linear.

  • Magnitude in decibels (dB) or the absolute value

  • Phase in degrees or radians

Impulse

  • Time

    By default, shows the system time units specified in the TimeUnit property of the input system.

     Time Units Options

Nichols Chart

  • Frequency

    By default, shows rad/TimeUnit where TimeUnit is the system time units specified in the TimeUnit property of the input system.

     Frequency Units Options

  • Phase in degrees or radians

Nyquist Diagram

  • Frequency

    By default, shows rad/TimeUnit where TimeUnit is the system time units specified in the TimeUnit property of the input system.

     Frequency Units Options

Pole/Zero Map

  • Time

    By default, shows the system time units specified in the TimeUnit property of the input system.

     Time Units Options

  • Frequency

    By default, shows rad/TimeUnit where TimeUnit is the system time units specified in the TimeUnit property of the input system.

     Frequency Units Options

Singular Values

  • Frequency

    By default, shows rad/TimeUnit where TimeUnit is the system time units specified in the TimeUnit property of the input system.

     Frequency Units Options

  • Frequency scale is logarithmic or linear.

  • Magnitude in decibels or the absolute value using logarithmic or linear scale

Step

  • Time

    By default, shows the system time units specified in the TimeUnit property of the input system.

     Time Units Options

Style Pane

Use the Style pane to toggle grid visibility and set font preferences and axes foreground colors for response plots.

You have the following choices:

  • Grid — Activate grids by default in new plots.

  • Fonts — Set the font size, weight (bold), and angle (italic) for fonts used in response plot titles, X/Y-labels, tick labels, and I/O names. Select font sizes from the menus or type any font-size values in the fields.

  • Colors — Specify the color vector to use for the axes foreground, which includes the X-Y axes, grid lines, and tick labels. Use a three-element vector to represent red, green, and blue (RGB) values. Vector element values can range from 0 to 1.

    If you do not want to specify RGB values numerically, click the Select button to open the Select Color dialog box.

Options Pane

The Options pane enables you to customize response characteristics for plots. Each response plot has its own set of characteristics and optional settings. When you change the value in a field, press Enter on your keyboard to update the response plot.

Response Characteristic Options for Response Plots

Plot

Customizable Feature

Bode Diagram and Bode Magnitude

  • Magnitude Response

    Select lower magnitude limit.

  • Phase Response

    By default, plots display exact phase. Check Wrap phase to wrap the phase into the interval [–180º,180º). To wrap accumulated phase at a different value, enter the value in the Branch field. For example, entering 0 causes the plot to wrap the phase into the interval [0º,360º).

    Check Adjust phase offsets to keep phase close to a particular value, within a range of 0º–360º, at a given frequency.

  • Confidence Region for Identified Models

    This option is available with System Identification Toolbox™.

    Specify number of standard deviations for plotting the response confidence region.

    To see the confidence region, right-click the plot, and select Characteristics > Confidence Region.

Impulse

  • Response Characteristics

    Show settling time within xx% (specify the percentage).

  • Confidence Region for Identified Models

    These options are available with System Identification Toolbox.

    Display using zero mean interval: For an identified model with impulse response y and standard deviation Δy, plot the uncertainty ±Δy as a function of time (default). If cleared, y±Δy as a function of time is plotted.

    Number of standard deviations for display: Specify number of standard deviations for plotting the uncertainty.

    To see the confidence interval, right-click the plot, and select Characteristics > Confidence Region.

Nichols Chart

  • Magnitude Response

    Select lower magnitude limit.

  • Phase Response

    By default, plots display exact phase. Check Wrap phase to wrap the phase into the interval [–180º,180º). To wrap accumulated phase at a different value, enter the value in the Branch field. For example, entering 0 causes the plot to wrap the phase into the interval [0º,360º).

    Check Adjust phase offsets to keep phase close to a particular value, within a range of 0º–360º, at a given frequency.

Nyquist Diagram

  • Confidence Region for Identified Models

    These options are available with System Identification Toolbox.

    Number of standard deviations for display: Specify number of standard deviations for plotting the confidence ellipses.

    Display spacing: Specify the frequency spacing of confidence ellipses. The default is 5, which means that the confidence ellipses are shown at every fifth frequency sample.

    To see the confidence ellipses, right-click the plot, and select Characteristics > Confidence Region.

Pole/Zero Map

  • Confidence Region for Identified Models

    This option is available with System Identification Toolbox.

    Specify number of standard deviations for displaying the confidence region characteristic.

    To see the confidence region, right-click the plot, and select Characteristics > Confidence Region.

Singular Values

None

Step

  • Response Characteristics

    Show settling time within xx% (specify the percentage).

    Show rise time from xx to yy% (specify the percentages)

  • Confidence Region for Identified Models

    This option is available with System Identification Toolbox.

    Specify number of standard deviations for plotting the response confidence region.

    To see the confidence region, right-click the plot, and select Characteristics > Confidence Region.

Editing Subplots Using the Property Editor

If you create more than one plot in a single figure window, you can edit each plot individually. For example, the following code creates a figure with two plots, a step and an impulse response with two randomly selected systems:

subplot(2,1,1)
step(rss(2,1))
subplot(2,1,2)
impulse(rss(1,1))

After the figure window appears, double-click in the upper (step response) plot to activate the Property Editor. A set of small squares appear around the step response, indicating that it is the active plot for the editor. To switch to the lower (impulse response) plot, click once in the impulse response plot region. The set of squares switches to the impulse response, and the Property Editor updates as well.

Related Topics