An identified linear model is used to simulate and predict system outputs for given input and noise signals. The input signals are measured while the noise signals are only known via their statistical mean and variance. The general form of the state-space model, often associated with Kalman filtering, is an example of such a model, and is defined as:
where, at time t:
x(t) is the vector of model states.
u(t) is the measured input data.
y(t) is the measured output data.
w(t) is the process noise.
v(t) is the measurement noise.
The noise disturbances are independent random variables with zero mean and covariances:
The vector θ parameterizes the model, including the coefficients of the system matrices and the noise covariances. However, all elements of the model are not necessarily free. If you have physical insight into the states of the system and sources of noise, the model can have a specific structure with few parameters in the vector θ.
For a given value of θ, you want to predict the best estimates of x(t) and y(t) in the presence of any disturbances. The required predictor model equations are derived from the Kalman filtering technique:
where is the predicted value of the state vector x(t) at time instant t, and is the predicted value of output y(t). The variables u(t) and y(t) in the above equation represent the measured input and output values at time t. The Kalman Gain matrix, K(θ), is derived from the system matrices and noise covariances as follows:
where is the covariance of the state estimate error:
Denoting the output prediction error as , you can write the general state-space model in a simpler form:
This simpler representation is the innovations form of the state-space model, and has only one unique disturbance source, e(t). This form corresponds to choosing R2=I, R12=K, and R1=KKT for the general model structure. System Identification Toolbox™ software uses the innovations form as its primary representation of state-space models.
Both the general and innovations form of the model lead to the same predictor model as
shown in Equation 2. Use the
predict command to compute the predicted model response and to generate this
The identification task is to use input and output measurement data to determine the parameterization vector, θ. The approach to take depends on the amount of prior information available regarding the system and the noise disturbances.
When only input-output data measurements are available, and you have no knowledge of the noise structure, you can only estimate the model in the innovations form. To do so, we use the one-step ahead prediction error minimization approach (PEM) to compute the best output predictor. For this approach, the matrix K is parameterized independently of the other system matrices, and no prior information about the system states or output covariances is considered for estimation. The estimated model can be cast back into the general model structure in many nonunique ways, one of which is to assume R2=I, R12=K, and R1=KKT. The innovations form is a system representation of the predictor in which e(t) does not necessarily represent the actual measurement noise.
Estimate state-space models in the innovations form using the
ssregest commands. The system matrices A,
B, C, D, and
K are parameterized independently and the identification minimizes
the weighted norm of the prediction error, e(t). For
more information, see Estimating State-Space Models Using ssest, ssregest and n4sid and the
estimation examples in
In this case, the estimation algorithm chooses the model states arbitrarily. As a result, it is difficult to imagine physically meaningful descriptions of the states and the sources for the disturbances affecting them.
In some situations, in addition to the input-output data, you know something about the state and measurement disturbances. To make the notion of state disturbances meaningful, it is necessary that the states be well-defined, such as the positions and velocities in a mechanical lumped-mass system. Well-defined states and known noise sources result in a structured state-space model, which you can then parameterize using the general model structure of Equation 1.
To identify such models, use a grey-box modeling approach, which lets you use any prior knowledge regarding the system parameters and noise covariances. For example, you may know that only the first element of R1 is nonzero, or that all the off-diagonal terms of R2 are zero. When using grey-box modeling, provide initial guess values for the parameterization vector, θ. If the model states are physically meaningful, it should be possible to determine initial estimates for the parameters in θ.
To estimate a grey-box model with parameterized disturbances:
Create a MATLAB® function, called the ODE file, that:
Computes the parameterized state-space matrices, A, B, C, and D, using the parameter vector θ, which is supplied as an input argument.
Computes the noise covariance matrices R1, R2, and R12. Each of these matrices can be completely or partially unknown. Any unknown matrix elements are defined in terms of parameters in θ.
Uses the system matrices A and C, and
the noise covariances with the
kalman (Control System Toolbox) command to find the Kalman
gain matrix, K.
[~,K] = kalman(ss(A,eye(nx),C,zeros(ny,nx),Ts),R1,R2,R12);
nx is the number of model states,
ny is the number of model outputs, and
is the sample time. The
kalman command requires Control System Toolbox™ software.
Returns A, B, C, D, and K as output arguments.
idgrey model that uses the ODE function
and an initial guess value for the parameter vector, θ.
Configure any estimation options using the
Estimate θ using
For an example of using parameterized disturbances with grey-box modeling, see Estimate Discrete-Time Grey-Box Model with Parameterized Disturbance.
Use the innovations form if all you have is measured input-output data. It is worthwhile to use the general form only if you can define a system parameterization with meaningful states, and you have nontrivial knowledge about the noise covariances. In this case, use grey-box estimation to identify the state-space model.
Both the general form and the innovations form lead to the same predictor. So, if your end goal is to deploy the model for predicting future outputs or to perform simulations, it is more convenient to use the innovations form of the model.
 Ljung, L. “State-Space Models.” Section 4.3 in System Identification: Theory for the User. 2nd ed. Upper Saddle River, NJ: Prentice Hall, 1999, pp. 93–102.