spectrumestOptions
Description
Use a spectrumestOptions
object to specify options for estimating
spectral transfer function models using the spectrumest
function. You can specify options such as the numerical search method to be used in estimation
and whether to display estimation progress.
Creation
Description
creates the default
option set for opt
= spectrumestOptionsspectrumest
.
To modify the properties of this option set for your specific application, use dot
notation.
creates an option set with the properties specified using one or more namevalue
arguments.opt
= spectrumestOptions(Name=Value
)
Properties
Display
— Option to display estimation progress
'off'
(default)  'on'
Option to display the estimation progress, specified as one of the following values:
'on'
— Information on model structure and estimation results are displayed in a progressviewer window.'off'
— No progress or results information is displayed.
InputInterSample
— Inputchannel intersample behavior
'auto'
 'zoh'
 'foh'
 'bl'
Inputchannel intersample behavior for transformations between discrete time and continuous time, specified as 'auto'
, 'zoh'
,'foh'
, or 'bl'
.
The definitions of the three behavior values are as follows:
'zoh'
— Zeroorder hold maintains a piecewiseconstant input signal between samples.'foh'
— Firstorder hold maintains a piecewiselinear input signal between samples.'bl'
— Bandlimited behavior specifies that the continuoustime input signal has zero power above the Nyquist frequency.
iddata
objects have a similar property,
data.InterSample
, that contains the same behavior value options.
When the InputInterSample
value is 'auto'
and
the estimation data is in an iddata
object data
, the
software uses the data.InterSample
value. When the estimation data
is instead contained in a timetable or a matrix pair, with the 'auto'
option, the software uses 'zoh'
.
The software applies the same option value to all channels and all experiments.
EstimateCovariance
— Option to generate parameter covariance data
true
(default)  false
Option to generate parameter covariance data, specified as true
or
false
.
If EstimateCovariance
is true
, then use
getcov
to fetch the covariance matrix
from the estimated model.
WeightingFilter
— Weighting prefilter
[]
(default)  vector  matrix  'inv'
 'invsqrt'
Weighting prefilter applied to the loss function to be minimized during estimation,
specified as one of the values in the following table. To understand the effect of
WeightingFilter
on the loss function, see Loss Function and Model Quality Metrics.
Value  Description 

[]  No weighting prefilter is used. 
Passbands  Specify a row vector or matrix containing frequency values that
define desired passbands. You select a frequency band where the fit between
estimated model and estimation data is optimized. For example, specify
Passbands are expressed in
rad/ 
Weighting vector  Specify a column vector of weights. This vector must have the same length as the power spectrum data set. Each input and output response in the data is multiplied by the corresponding weight at that frequency. 
'inv'  Use 
'invsqrt'  Use 
SearchMethod
— Numerical search method used for iterative parameter estimation
'auto'
(default)  'gn'
 'gna'
 'lm'
 'grad'
 'lsqnonlin'
 'fmincon'
Numerical search method used for iterative parameter estimation, specified as the one of the values in the following table.
SearchMethod  Description 

'auto'  Automatic method selection A combination of the
line search algorithms, 
'gn'  Subspace GaussNewton leastsquares search Singular
values of the Jacobian matrix less than

'gna'  Adaptive subspace GaussNewton search Eigenvalues
less than 
'lm'  LevenbergMarquardt least squares search Each
parameter value is 
'grad'  Steepest descent leastsquares search 
'lsqnonlin'  Trustregionreflective algorithm of This algorithm requires Optimization Toolbox™ software. 
'fmincon'  Constrained nonlinear solvers You can use the
sequential quadratic programming (SQP) and trustregionreflective
algorithms of the

SearchOptions
— Option set for search algorithm
search option set
Option set for the search algorithm, specified as a search option set with fields that
depend on the value of SearchMethod
.
SearchOptions
Structure When SearchMethod
is Specified
as 'gn'
, 'gna'
, 'lm'
,
'grad'
, or 'auto'
Field Name  Description  Default  

Tolerance  Minimum percentage difference between the current value
of the loss function and its expected improvement after the next iteration,
specified as a positive scalar. When the percentage of expected improvement
is less than  0.01  
MaxIterations  Maximum number of iterations during lossfunction minimization, specified as a positive
integer. The iterations stop when Setting
Use
 20  
Advanced  Advanced search settings, specified as a structure with the following fields.

SearchOptions
Structure When SearchMethod
is Specified
as 'lsqnonlin'
Field Name  Description  Default 

FunctionTolerance  Termination tolerance on the loss function that the software minimizes to determine the estimated parameter values, specified as a positive scalar. The
value of  1e5 
StepTolerance  Termination tolerance on the estimated parameter values, specified as a positive scalar. The value of  1e6 
MaxIterations  Maximum number of iterations during lossfunction minimization, specified as a positive
integer. The iterations stop when The value of
 20 
SearchOptions
Structure When SearchMethod
is Specified
as 'fmincon'
Field Name  Description  Default 

Algorithm 
For more information about the algorithms, see Constrained Nonlinear Optimization Algorithms (Optimization Toolbox) and Choosing the Algorithm (Optimization Toolbox).  'sqp' 
FunctionTolerance  Termination tolerance on the loss function that the software minimizes to determine the estimated parameter values, specified as a positive scalar.  1e6 
StepTolerance  Termination tolerance on the estimated parameter values, specified as a positive scalar.  1e6 
MaxIterations  Maximum number of iterations during loss function minimization, specified as a positive
integer. The iterations stop when  100 
Advanced
— Additional advanced options
structure
Additional advanced options, specified as a structure with the fields in the following table.
Field Name  Description  Default 

MaxSize  Maximum number of elements in a segment when inputoutput data is split into segments.
 250000 
Examples
Create Default Option Set for Spectrum Estimation
opt = spectrumestOptions
Option set for the spectrumest command: Display: 'off' InputInterSample: 'auto' EstimateCovariance: 1 WeightingFilter: [] SearchMethod: 'auto' SearchOptions: '<Optimization options set>' Advanced: [1x1 struct]
Specify Options for Spectrum Estimation
Create an options set for spectrumest
using the 'gn'
search method, and set the Display
to 'on'
.
opt = spectrumestOptions(SearchMethod='gn',Display='on');
Alternatively, use dot notation to set the values of opt
.
opt = spectrumestOptions; opt.SearchMethod = 'gn'; opt.Display = 'on';
Version History
Introduced in R2022b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)