periodicRegressor
Description
Periodic regressors are sine and cosine functions of delayed input and output
variables. For example, sin(y(t–1)) and
cos(y(t–1)) are both periodic regressors with delays
of one sample. A periodicRegressor
object encapsulates a set of periodic
regressors. Use periodicRegressor
objects when you create nonlinear ARX
models using idnlarx
or nlarx
. You can specify periodicRegressor
objects along with
linearRegressor
,
polynomialRegressor
,
and customRegressor
objects and combine them into a single combined regressor set.
Creation
Syntax
Description
creates a scReg
= periodicRegressor(Variables,Lags)periodicRegressor
object that contains sine and cosine
functions for each output and input variable in Variables
and the corresponding lags in Lags
. For example, if Variables
contains
{'y','u'}
and Lags
contains the corresponding
lag vector {1,2}
, then the function creates the regressors
sin(y(t-1)),
cos(y(t-1)),
sin(u(t-2)), and
cos(u(t-2)).
applies the frequency multiplier scReg
= periodicRegressor(Variables,Lags,W)W
to each formula. For example, if Variables
contains
{'y','u'}
, Lags
contains
{1,2}
, and W
is equal to 1.5
,
then the function creates the regressors
sin(1.5y(t-1)),
cos(1.5y(t-1)),
sin(1.5u(t-2)), and
cos(1.5u(t-2)).
approximates each regressor signal as a Fourier series that contains scReg
= periodicRegressor(Variables,Lags,W,NumTerms)NumTerms
coefficients by creating NumTerms
periodic
regressors for each lagged variable, as shown in the sequence sin(x),
sin(2x), …, sin(Mx),
cos(x), cos(2x), …,
cos(Mx).
In this sequence, x represents a lagged variable, such as
y(t-1), and M is equal to
NumTerms
.
specifies whether to apply absolute value operations that create regressors such as
|sin(y(t-k))| or
|cos(u(t))|.scReg
= periodicRegressor(Variables,Lags,W,NumTerms,UseAbsolute
)
Input Arguments
Properties
Examples
Version History
Introduced in R2022a
See Also
idnlarx
| nlarx
| getreg
| linearRegressor
| polynomialRegressor
| customRegressor