sys = ssregest(___,opt) specifies
estimation options that configure the estimation objective, ARX orders
and order reduction options. This syntax can include any of the input
argument combinations in the previous syntaxes.

[sys,x0] = ssregest(___) returns
the value of initial states computed during estimation. This syntax
can include any of the input argument combinations in the previous
syntaxes.

Order of the estimated model, specified as a positive scalar
or vector.

If nx is a vector, then ssregest creates
a plot which you can use to choose a suitable model order. The plot
shows the Hankel singular values for models of chosen values in the
vector. States with relatively small Hankel singular values can be
safely discarded. A default choice is suggested in the plot.

You can also specify nx = 'best', as in ssregest(data,'best'),
in which case the optimal order is chosen automatically in the 1:10
range.

Estimation options for ssregest, specified
as an options set you create using ssregestOptions.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument
name and Value is the corresponding
value. Name must appear
inside single quotes (' ').
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: sys = ssregest(z2,3,'InputDelay',2)
specifies a delay of 2 sampling periods.

'Ts' — Sample time sample time of data (data.Ts) (default) | positive scalar | 0

Sample time of the model, specified as 0 or equal to the sample
time of data.

For continuous-time models, use Ts = 0. For
discrete-time models, specify Ts as a positive
scalar whose value is equal to the data sampling time.

Input delay for each input channel, specified as a numeric vector.
For continuous-time systems, specify input delays in the time unit
stored in the TimeUnit property. For discrete-time
systems, specify input delays in integer multiples of the sampling
period Ts. For example, InputDelay = 3 means
a delay of three sampling periods.

For a system with Nu inputs, set InputDelay to
an Nu-by-1 vector. Each entry of this vector is
a numerical value that represents the input delay for the corresponding
input channel.

You can also set InputDelay to a scalar value
to apply the same delay to all channels.

Direct feedthrough from input to output, specified as a logical
vector of length Nu, where Nu is
the number of inputs. If Feedthrough is specified
as a logical scalar, it is applied to all the inputs.

Use the Form, Feedthrough and DisturbanceModel name-value
pair arguments to modify the default behavior of the A, B, C, D,
and K matrices.

A, B, C, D,
and K are state-space matrices. u(t)
is the input, y(t) is the output, e(t)
is the disturbance and x(t)
is the vector of nx states.

All the entries of A, B, C,
and K are free estimable parameters by default. D is
fixed to zero by default, meaning that there is no feedthrough, except
for static systems (nx=0).

Initial states computed during estimation, returned as a scalar.
If data contains multiple experiments, then x0 is a matrix with each column corresponding
to an experiment.

This value is also stored in the Parameters field
of the model's Report property.

In modal form, A is a block-diagonal matrix.
The block size is typically 1-by-1 for real eigenvalues and 2-by-2
for complex eigenvalues. However, if there are repeated eigenvalues
or clusters of nearby eigenvalues, the block size can be larger.

For example, for a system with eigenvalues $$({\lambda}_{1},\sigma \pm j\omega ,{\lambda}_{2})$$,
the modal A matrix is of the form

In the companion realization, the characteristic polynomial
of the system appears explicitly in the right-most column of the A matrix.
For a system with characteristic polynomial

The companion transformation requires that the system be controllable
from the first input. The companion form is poorly conditioned for
most state-space computations; avoid using it when possible.

ssregest function provides improved
accuracy than n4sid for short,
noisy data sets.

For some problems, the quality of fit using n4sid is
sensitive to options, such as N4Horizon, whose
values can be difficult to determine. In comparison, the quality of
fit with ssregest is less sensitive to its options,
which makes ssregest simpler to use.

ssregest estimates a regularized ARX model
and converts the ARX model to a state-space model. The software then
uses balanced model reduction techniques to reduce the state-space
model to the specified order.