polyest
Estimate polynomial model using time or frequencydomain data
Syntax
sys = polyest(tt,[na nb nc nd nf nk])
sys = polyest(u,y,[na nb nc nd nf nk])
sys = polyest(data,[na nb nc nd nf nk])
sys = polyest(___,Name,Value)
sys = polyest(tt,init_sys)
sys = polyest(u,y,init_sys)
sys = polyest(tt,init_sys)
sys = polyest(___, opt)
[sys,ic] = polyest(___)
Description
estimates a polynomial model sys
= polyest(tt
,[na
nb
nc
nd
nf
nk
])sys
using the data contained in the
variables of timetable tt
. The software uses the first
Nu variables as inputs and the next Ny
variables as outputs, where Nu and Ny are
determined from the dimensions of the specified polynomial orders.
sys
is of the form
$$A(q)y(t)=\frac{B(q)}{F(q)}u(tnk)+\frac{C(q)}{D(q)}e(t)$$
A(q), B(q), F(q), C(q)
and D(q) are polynomial matrices. u(t)
is the input, and nk
is the input delay. y(t)
is the output and e(t) is the
disturbance signal. na
,nb
, nc
, nd
and nf
are
the orders of the A(q), B(q), C(q), D(q)
and F(q) polynomials, respectively.
To select specific input and output channels from tt
, use
namevalue syntax to set 'InputName'
and
'OutputName'
to the corresponding timetable variable
names.
uses the timedomain input and output signals in the commaseparated matrices
sys
= polyest(u
,y
,[na
nb
nc
nd
nf
nk
])u
,y
. The software assumes that the data
sample time is 1 second. To change the sample time, set Ts
using
namevalue syntax.
uses the timedomain or frequencydomain data in the data object
sys
= polyest(data
,[na
nb
nc
nd
nf
nk
])data
.
estimates a polynomial model with additional attributes of the estimated model structure
specified by one or more sys
= polyest(___,Name,Value
)Name,Value
arguments. You can use this
syntax with any of the previous inputargument combinations.
estimates a polynomial model using the linear system sys
= polyest(tt
,init_sys
)init_sys
to
configure the initial parameterization for estimation using the timetable
tt
.
uses the matrix data sys
= polyest(u
,y
,init_sys
)u
,y
for
estimation..
uses the data object sys
= polyest(tt
,init_sys
)data
, for estimation.
estimates
a polynomial model using the option set, sys
= polyest(___, opt
)opt
,
to specify estimation behavior.
[
returns the estimated initial conditions as an sys
,ic
] = polyest(___)initialCondition
object. Use this syntax if you plan to simulate or
predict the model response using the same estimation input data and then compare the
response with the same estimation output data. Incorporating the initial conditions
yields a better match during the first part of the simulation.
Input Arguments

Estimation data, specified as a The software determines the number of input and output channels to use for
estimation from the dimensions of the specified polynomial orders. The
input/output channel selection depends on whether the
For more information about working with estimation data types, see Data Domains and Data Types in System Identification Toolbox. 

Estimation data, specified for SISO systems as a commaseparated pair of N_{s}by1 realvalued matrices that contain uniformly sampled input and output timedomain signal values. Here, N_{s} is the number of samples. For MIMO systems, specify
For multiexperiment data, specify
For time series data, which contains only outputs and no inputs, specify
For more information about working with estimation data types, see Data Domains and Data Types in System Identification Toolbox. 

Estimation data. For timedomain estimation, You can estimate only discretetime models using timedomain
data. For estimating continuoustime models using timedomain data,
see For frequencydomain estimation,


Order of the polynomial A(q).


Order of the polynomial B(q) + 1.


Order of the polynomial C(q).


Order of the polynomial D(q).


Order of the polynomial F(q).


Input delay in number of samples, expressed as fixed leading zeros of the B polynomial.


Estimation options.


Linear system that configures the initial parameterization of You obtain If Use the
If If 
NameValue Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Namevalue 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.

Input channel names for timetable data, specified as a string, a
character vector, or an array or cell array of strings or character
vectors. By default, the software interprets all but the last variable
in 

Output channel names for timetable data, specified as a string, a
character vector, or an array or cell array of strings or character
vectors. By default, the software interprets the last variable in


Sample time, specified as the commaseparated pair consisting of
To obtain the data sample time for a timetable Example: 

Transport delays. For continuoustime systems, specify transport delays in the
time unit stored in the For a MIMO system with Default: 

Input delay for each input channel, specified as a scalar value
or numeric vector. For continuoustime systems, specify input delays
in the time unit stored in the For a system with You can also set Default: 0 

Logical vector specifying integrators in the noise channel.
Setting $$A(q)y(t)=\frac{B(q)}{F(q)}u(tnk)+\frac{C(q)}{D(q)}\frac{e(t)}{1{q}^{1}}$$ Where, $$\frac{1}{1{q}^{1}}$$ is the integrator in the noise channel, e(t). Use For example, load iddata1 z1; z1 = iddata(cumsum(z1.y),cumsum(z1.u),z1.Ts,'InterSample','foh'); sys = polyest(z1, [2 2 2 0 0 1],'IntegrateNoise',true); 
Output Arguments

Polynomial model, returned as an If $$Y(s)=\frac{B(s)}{F(s)}U(s)+E(s)$$ Y(s), U(s) and E(s) are the Laplace transforms of the timedomain signals y(t), u(t) and e(t), respectively. Information about the estimation results and options used is
stored in the
For more information on using  

Estimated initial conditions, returned as an
If opt = polyestOptions('InitialCondition','estimate') [sys,ic] = polyest(data,[nb nc nd nf nk],opt) 'auto' setting of
'InitialCondition' uses the 'zero'
method when the initial conditions have a negligible effect on the overall
estimationerror minimization process. Specifying
'estimate' ensures that the software estimates values
for ic .
For more information, see 
Examples
Tips
In most situations, all the polynomials of an identified polynomial model are not simultaneously active. Set one or more of the orders
na
,nc
,nd
andnf
to zero to simplify the model structure.For example, you can estimate an OutputError (OE) model by specifying
na
,nc
andnd
as zero.Alternatively, you can use a dedicated estimating function for the simplified model structure. Linear polynomial estimation functions include
oe
,bj
,arx
andarmax
.
Alternatives
To estimate a polynomial model using timeseries data, use
ar
.Use
polyest
to estimate a polynomial of arbitrary structure. If the structure of the estimated polynomial model is known, that is, you know which polynomials will be active, then use the appropriate dedicated estimating function. For examples, for an ARX model, usearx
. Other polynomial model estimating functions include,oe
,armax
, andbj
.To estimate a continuoustime transfer function, use
tfest
. You can also useoe
, but only with continuoustime frequencydomain data.