Options for the gram
command
returns
an option set with the default options for opt
= gramOptionsgram
.
returns an options set with the options specified by one or more opt
= gramOptions(Name,Value
)Name,Value
pair
arguments.
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
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
'FreqIntervals',[0.8 1.2]
'FreqIntervals'
— Frequency intervals for computing Gramians[]
(default) | two-column matrixFrequency 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.
'TimeIntervals'
— Time intervals for computing Gramians[]
(default) | two-column matrixTime 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.
opt
— Options for gram
gramOptions
options setOptions for gram
, returned as a gramOptions
options
set. Use opt
as the last argument to gram
to
compute time-limited or frequency-limited Gramians.
You have a modified version of this example. Do you want to open this example with your edits?