Main Content

gramOptions

Options for the gram command

Description

opt = gramOptions returns an option set with the default options for gram.

opt = gramOptions(Name,Value) returns an options set with the options specified by one or more Name,Value pair arguments.

example

Examples

collapse all

Compute the controllability Gramian of the following state-space model. Focus the computation on the frequency interval with the most energy.

sys = ss([-.1 -1;1 0],[1;0],[0 1],0);

The model contains a peak at 1 rad/s. Use gramOptions to specify an interval around that frequency.

opt = gramOptions('FreqIntervals',[0.8 1.2]);
gc = gram(sys,'c',opt)
gc = 2×2

    4.2132   -0.0000
   -0.0000    4.2433

Input Arguments

collapse all

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'FreqIntervals',[0.8 1.2]

Frequency intervals for computing frequency-limited controllability and observability Gramians, specified as a matrix with two columns. Each row specifies a frequency interval [fmin fmax], where fmin and fmax are nonnegative frequencies, expressed in the frequency unit of the model. For example:

  • To restrict the computation to the range between 3 rad/s and 15 rad/s, assuming the frequency unit of the model is rad/s, set FreqIntervals to [3 15].

  • To restrict the computation to two frequency intervals, 3-15 rad/s and 40-60 rad/s, use [3 15; 40 60].

  • To specify all frequencies below a cutoff frequency fcut, use [0 fcut].

  • To specify all frequencies above the cutoff, use [fcut Inf] in continuous time, or [fcut pi/Ts] in discrete time, where Ts is the sample time of the model.

The default value, [], imposes no frequency limitation and is equivalent to [0 Inf] in continuous time or [0 pi/Ts] in discrete time. However, if you specify a TimeIntervals value other than [], then this limit overrides FreqIntervals = []. If you specify both a TimeIntervals value and a FreqIntervals value, then the computation uses the union of these intervals.

Time intervals for computing time-limited controllability and observability Gramians, specified as a matrix with two columns. Each row specifies a time interval [tmin tmax], where tmin and tmax are nonnegative times, expressed in the time unit of the model. For example:

  • To restrict the computation to the range between 3 s and 15 s, assuming the time unit of the model is seconds, set TimeIntervals to [3 15].

  • To restrict the computation to two time intervals, 3-15 s and 40-60 s, use [3 15; 40 60].

  • To specify all times from zero up to a cutoff time tcut, use [0 tcut]. To specify all times after the cutoff, use [tcut Inf].

The default value, [], imposes no time limitation and is equivalent to [0 Inf]. However, if you specify a FreqIntervals value other than [], then this limit overrides Timeintervals = []. If you specify both a TimeIntervals value and a FreqIntervals value, then the computation uses the union of these intervals.

Output Arguments

collapse all

Options for gram, returned as a gramOptions options set. Use opt as the last argument to gram to compute time-limited or frequency-limited Gramians.

Version History

Introduced in R2016a

See Also

|