Online estimation algorithms estimate the parameters of a model when new data is available during the operation of the model. In contrast, if you first collect all the input/output data and then estimate the model parameters, you perform offline estimation. Parameter values estimated using online estimation can vary with time, but parameters estimated using offline estimation do not.
Use the Recursive Least Squares Estimator and Recursive Polynomial Model Estimator blocks to perform online estimation. Use tools such as arx, pem, ssest, tfest, nlarx, and the System Identification app to perform offline estimation.
Online estimation differs from offline estimation in the following ways:
Model delays — You can estimate model delays in offline estimation using tools such as delayest (see Determining Model Order and Delay). Online estimation, however, provides limited ability to handle delays. For polynomial model estimation using the Recursive Polynomial Model Estimation block, you can specify as known value of the input delay (nk) in the block dialog. If nk is unknown, choose a sufficiently large value for the number of coefficients of B (nb). The input delay is indicated by the number of leading coefficients of the B polynomial that are close to zero.
Data preprocessing — For offline estimation data preprocessing, you can use functions such as detrend, retrend, idfilt, and the System Identification app. For online estimation, however, you must use the tools available in the Simulink® environment. (See Preprocess Online Estimation Data.)
Reset estimation — Online estimation allows you to reset the estimation at a specific time step during estimation. For example, reset the estimation when the system changes modes. In contrast, you cannot reset an offline estimation.
To reset estimation, in the online estimation block's dialog, select the Algorithm and Block Options tab. Select the appropriate External reset option.
Enable/disable estimation — Online estimation allows you to enable/disable estimation for chosen time spans. For example, suppose the measured data is especially noisy or faulty (contains many outliers) for a specific time interval. Disable online estimation for this interval. You cannot selectively enable/disable offline estimation.
To enable/disable estimation, in the online estimation block's dialog, select the Algorithm and Block Options tab. Select the Add enable port check box.