Documentation Center |
On this page… |
---|
Types of Recursive Estimation Algorithms |
You can choose from the following four recursive estimation algorithms:
You specify the type of recursive estimation algorithms as arguments in the recursive estimation commands.
For detailed information about these algorithms, see the corresponding chapter in System Identification: Theory for the User by Lennart Ljung (Prentice Hall PTR, Upper Saddle River, NJ, 1999).
The general recursive identification algorithm is given by the following equation:
is the parameter estimate at time t. y(t) is the observed output at time t and is the prediction of y(t) based on observations up to time t-1. The gain, K(t), determines how much the current prediction error affects the update of the parameter estimate. The estimation algorithms minimize the prediction-error term .
The gain has the following general form:
The recursive algorithms supported by the System Identification Toolbox™ product differ based on different approaches for choosing the form of Q(t) and computing , where represents the gradient of the predicted model output with respect to the parameters .
The simplest way to visualize the role of the gradient of the parameters, is to consider models with a linear-regression form:
In this equation, is the regression vector that is computed based on previous values of measured inputs and outputs. represents the true parameters. e(t) is the noise source (innovations), which is assumed to be white noise. The specific form of depends on the structure of the polynomial model.
For linear regression equations, the predicted output is given by the following equation:
For models that do not have the linear regression form, it is not possible to compute exactly the predicted output and the gradient for the current parameter estimate . To learn how you can compute approximation for and for general model structures, see the section on recursive prediction-error methods in System Identification: Theory for the User by Lennart Ljung (Prentice Hall PTR, Upper Saddle River, NJ, 1999).
The following set of equations summarizes the Kalman filter adaptation algorithm:
This formulation assumes the linear-regression form of the model:
The Kalman filter is used to obtain Q(t).
This formulation also assumes that the true parameters are described by a random walk:
w(t) is Gaussian white noise with the following covariance matrix, or drift matrix R_{1}:
R_{2} is the variance of the innovations e(t) in the following equation:
The Kalman filter algorithm is entirely specified by the sequence of data y(t), the gradient , R_{1}, R_{2}, and the initial conditions (initial guess of the parameters) and (covariance matrix that indicates parameters errors).
Note: To simplify the inputs, you can scale R_{1}, R_{2}, and of the original problem by the same value such that R_{2} is equal to 1. This scaling does not affect the parameters estimates. |
The general syntax for the command described in Algorithms for Recursive Estimation is the following:
[params,y_hat]=command(data,nn,adm,adg)
To specify the Kalman filter algorithm, set adm to 'kf' and adg to the value of the drift matrix R_{1} (described in Mathematics of the Kalman Filter Algorithm).
The following set of equations summarizes the forgetting factor adaptation algorithm:
To obtain Q(t), the following function is minimized at time t:
This approach discounts old measurements exponentially such that an observation that is samples old carries a weight that is equal to times the weight of the most recent observation. represents the memory horizon of this algorithm. Measurements older than typically carry a weight that is less than about 0.3.
is called the forgetting factor and typically has a positive value between 0.97 and 0.995.
Note: In the linear regression case, the forgetting factor algorithm is known as the recursive least-squares (RLS) algorithm. The forgetting factor algorithm for = 1 is equivalent to the Kalman filter algorithm with R_{1}=0 and R_{2}=1. For more information about the Kalman filter algorithm, see Kalman Filter Algorithm. |
The general syntax for the command described in Algorithms for Recursive Estimation is the following:
[params,y_hat]=command(data,nn,adm,adg)
To specify the forgetting factor algorithm, set adm to 'ff' and adg to the value of the forgetting factor (described in Mathematics of the Forgetting Factor Algorithm).
In the linear regression case, the gradient methods are also known as the least mean squares (LMS) methods.
The following set of equations summarizes the unnormalized gradient and normalized gradient adaptation algorithm:
In the unnormalized gradient approach, Q(t) is the product of the gain and the identity matrix:
In the normalized gradient approach, Q(t) is the product of the gain , and the identity matrix is normalized by the magnitude of the gradient :
These choices of Q(t) update the parameters in the negative gradient direction, where the gradient is computed with respect to the parameters.
The general syntax for the command described in Algorithms for Recursive Estimation is the following:
[params,y_hat]=command(data,nn,adm,adg)
To specify the unnormalized gain algorithm, set adm to 'ug' and adg to the value of the gain (described in Mathematics of the Unnormalized and Normalized Gradient Algorithm).
To specify the normalized gain algorithm, set adm to 'ng' and adg to the value of the gain .