Estimate state-space model from impulse response data using Eigensystem Realization Algorithm (ERA)
era uses the
Realization Algorithm  to estimate a state-space
model using impulse response data rather than input/output data.
especially useful for identifying dynamic systems for applications such as modal analysis or
structural health modeling.You can also use
era for modeling time-series
data for applications such as prediction. For more information about the algorithm, see .
a state-space model using the time-domain impulse response data in
sys = era(
data, which can be either a timetable or matrix that contains only
output data. The software determines the order of the model
sys is a model of the following form:
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
All 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).
The software sets the sample time of
sys to the sample time of
data is a timetable, or to -1 if
data is a matrix.
Estimate State-Space Model from Impulse Response
Load and plot the data
Htt, which is a
timetable that contains impulse response data in the variable
load impulseresponse.mat Htt plot(Htt.Time,Htt.H) title('Impulse Response')
era to estimate a state-space model.
sys = era(Htt); sysorder = order(sys)
sysorder = 2
sys is an
idss model of order 2.
Specify Model Order
Load and plot the data
H, which is a numeric matrix.
Ts is the sample time for the data in
load impulseresponse.mat H Ts L = size(H,1); t = (1:L)'*Ts; plot(t,H) title('Impulse Response')
era to estimate a state-space model of order 3.
sys = era(H,3); sysorder = order(sys)
sysorder = 3
sys is an
idss model of order 3.
Specify Feedthrough for Model
Load the impulse response data, which is in the form of a timetable.
load impulseresponse.mat Htt
era to specify a state-space model that includes feedthrough.
sys = era(Htt,'best',Feedthrough=1);
data — Impulse response data
timetable | numeric matrix
Impulse response data, specified as either a
timetable with Ns rows and Ny
variables or an Ns-by-Ny-by-Nu
numeric matrix, where Ns is the number of samples,
Ny is the number of outputs, and Nu is the
number of inputs.
data must be uniformly sampled.
For SISO and SIMO systems, each column i of the timetable or matrix in
datarepresents the impulse response from the single input to the ith output.
For MIMO systems,
datamust be a 3-D matrix. Each Ns-length vector (i,j) of
datarepresents the impulse response between output i and input j,
data must be obtained from a system with zero initial
nx — Order of estimated model
1:10 (default) | positive integer scalar | positive integer vector |
Order of the estimated model, specified as a nonnegative integer, a vector
containing a range of positive integers, or
If you already know what order you want your estimated model to have, specify
nxas a scalar.
If you want to compare a range of potential orders to choose the most effective order for your estimated model, specify the range in
eracreates a Hankel singular-value plot that shows the relative energy contributions of each state in the system. States with relatively small Hankel singular values contribute little to the accuracy of the model and can be discarded with little impact. The index of the highest state you retain is the model order. The plot window includes a suggestion for the order to use. You can accept this suggestion or enter a different order. For an example of using Hankel plots, see
If you do not specify
nxor if you specify
"best", the software automatically chooses
nxfrom the range
If you are identifying a static system, set
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
sys = era(data,2,InputDelay=1)
InputDelay — Input delays
(default) | scalar | vector
Input delay for each input channel, specified as a numeric vector of length equal
to the number of inputs in
sys. To apply the same delay to all
InputDelay as a numeric scalar.
Feedthrough — Option to include direct feedthrough from input to output
1 | logical vector
Option to include direct feedthrough from input to output, specified as a logical
vector of length Nu, where Nu is the number of
inputs. If you specify
Feedthrough as a logical scalar, that value
is applied to all the inputs. The default is
0, except for static
systems, where the software always assumes
sys — Identified state-space model
idss model |
idss model array
Identified state-space model, returned as an
idss array for SISO systems or, for systems with more than one input or
output, an array of
idss models. Each model represents the
response of one input to one output. This model is created using the specified model
order and delays.
Information about the estimation results and options used is stored in the
Report property of the model.
Report has the
same fields as an
idss model that was generated using estimation
commands such as
ssest. However, models generated with
era do not use all these fields.
|Quantitative assessment of the estimation, returned as a structure|
Estimated values of model parameters.
|Attributes of the data used for estimation|
For more information on using
Report, see Estimation Report.
 Juang, Jer-Nan, and Richard S. Pappa. “An Eigensystem Realization Algorithm for Modal Parameter Identification and Model Reduction.” Journal of Guidance, Control, and Dynamics 8, no. 5 (September 1985): 620–27. https://doi.org/10.2514/3.20031.
Introduced in R2022b