Documentation

linearSystemAnalyzer

Linear System Analyzer for LTI system response analysis

Syntax

linearSystemAnalyzer
linearSystemAnalyzer(sys1,sys2,...,sysn)
linearSystemAnalyzer(plottype,sys1,sys2,...,sysn)
linearSystemAnalyzer(plottype,sys1,sys2,...,sysn,extras)
H = linearSystemAnalyzer(___)
linearSystemAnalyzer('clear',viewer)
linearSystemAnalyzer('current',sys1,sys2,...,sysn,viewers)

Description

linearSystemAnalyzer opens the Linear System Analyzer app. Linear System Analyzer is an interactive user interface for analyzing the time and frequency responses of linear systems and comparing such systems.

linearSystemAnalyzer(sys1,sys2,...,sysn) opens Linear System Analyzer and displays the step response of the LTI models sys1,sys2,...,sysn. You can specify a distinctive color, line style, and marker for each system, as in

sys1 = rss(3,2,2);
sys2 = rss(4,2,2);
linearSystemAnalyzer(sys1,'r-*',sys2,'m--');

linearSystemAnalyzer(plottype,sys1,sys2,...,sysn) further specifies which responses to display in Linear System Analyzer containing the LTI response type indicated by plottype for the LTI model sys. The string plottype can be any one of the following:

  • 'step' — Step response.

  • 'impulse' — Impulse response.

  • 'lsim' — Linear simulation plot. When you use this plot type, the Linear Simulation Tool dialog opens and prompts you to specify an input signal for the simulation.

  • 'initial' — Initial condition plot. This plot type is available for state-space models only. When you use this plot type without the extras argument, the Linear Simulation Tool dialog opens and prompts you to specify an initial state for the simulation.

  • 'bode' — Bode diagram.

  • 'bodemag' — Bode magnitude diagram.

  • 'nyquist' — Nyquist plot.

  • 'nichols' — Nichols plot.

  • 'sigma' — Singular value plot.

  • 'pzmap' — Pole/zero map.

  • 'iopzmap' — I/O pole/zero map.

Alternatively, plottype can be a cell vector containing up to six of these plot types. For example, the following command displays a step response plot and a Nyquist plot for a given system sys.

linearSystemAnalyzer({'step';'nyquist'},sys)

linearSystemAnalyzer(plottype,sys1,sys2,...,sysn,extras) allows the additional input arguments supported by the various LTI model response functions to be passed to the linearSystemAnalyzer command.

extras is one or more input arguments as specified by the function named in plottype. These arguments may be required or optional, depending on the type of LTI response. For example, if plottype is 'step', then extras may be the desired final time, Tfinal, as follows:

linearSystemAnalyzer('step',sys,Tfinal)

However, if plottype is 'initial', then extras must contain the initial conditions x0, and may contain other arguments, such as Tfinal.

linearSystemAnalyzer('initial',sys,x0,Tfinal)

See the individual references pages of each possible plottype for a list of appropriate arguments for extras. For example, for possible extras values for the bode plot type, see the bode reference page.

H = linearSystemAnalyzer(___) returns the handle to the Linear System Analyzer figure. You can use this syntax with any of the previous combinations of input arguments. Use the handle to modify previously opened Linear System Analyzer figures as described in the next two syntaxes.

linearSystemAnalyzer('clear',viewer) clears the plots and data from the Linear System Analyzer corresponding to handle viewer. To clear multiple Linear System Analyzers at once, set viewer to a vector of handles.

linearSystemAnalyzer('current',sys1,sys2,...,sysn,viewers) adds the responses of the systems sys1,sys2,...,sysn to the Linear System Analyzer corresponding to handle viewer. To update multiple Linear System Analyzers at once, set viewer to a vector of handles. If the new systems do not have the same I/O dimensions as those currently in a specified Linear System Analyzer, the Linear System Analyzer is first cleared and only the new responses are shown.

Alternatives

You can open Linear Analysis Tool from the MATLAB® desktop. In the Apps tab, in the Control System Design and Analysis section of the Apps gallery, click Linear System Analyzer.

Introduced in R2015a

Was this topic helpful?