What Is Online Estimation?
Online estimationalgorithms estimate the parameters and states of a model when new data is available during the operation of the physical system. The System Identification Toolbox™ software uses linear, extended, and unscented Kalman filter, or particle filter algorithms for online state estimation. The toolbox uses recursive prediction error minimization algorithms for online parameter estimation.
Consider a heating and cooling system that does not have prior information about the environment in which it operates. Suppose that this system must heat or cool a room to achieve a certain temperature in a given amount of time. To fulfill its objective, the system must obtain knowledge of the temperature and insulation characteristics of the room. You can estimate the insulation characteristics of the room while the system isonline(操作)。对于这个估计,使用这个系统effort as the input and the room temperature as the output. You can use the estimated model to improve system behavior. Online estimation is ideal for estimating small deviations in the parameter values of a system at a known operating point.
Common applications of online estimation include:
Adaptive control — Estimate a plant model to modify the controller based on changes in the plant model.
Fault detection — Compare the online plant model with the idealized or reference plant model to detect a fault (anomaly) in the plant.
Soft sensing — Generate a “measurement” based on the estimated plant model, and use this measurement for feedback control or fault detection.
Verification of the experiment-data quality before starting offline estimation — Before using the measured data for offline estimation, perform online estimation for a few iterations. The online estimation provides a quick check of whether the experiment used excitation signals that captured the relevant system dynamics.
Online Parameter Estimation
Online parameter estimation is typically performed using a recursive algorithm. To estimate the parameter values at a time step, recursive algorithms use the current measurements and previous parameter estimates. Therefore, recursive algorithms are efficient in terms of memory usage. Also, recursive algorithms have smaller computational demands. This efficiency makes them suited to online and embedded applications. For more information about the algorithms, seeRecursive Algorithms for Online Parameter Estimation.
In System Identification Toolbox you can perform online parameter estimation in Simulink®or at the command line:
In Simulink, use theRecursive Least Squares EstimatorandRecursive Polynomial Model Estimatorblocks to perform online parameter estimation. You can also estimate a state-space model online from these models by using theRecursive Polynomial Model EstimatorandModel Type Converterblocks together. You can generate C/C++ code and Structured Text for these blocks usingSimulink Coder™andSimulink PLC Coder™software.
At the command line, use
recursiveAR
,recursiveARMA
,recursiveARX
,recursiveARMAX
,recursiveOE
,recursiveBJ
, andrecursiveLS
commands to estimate model parameters for your model structure. Unlike estimation in Simulink, you can change the properties of the recursive estimation algorithm during online estimation. You can generate code and standalone applications usingMATLAB®CoderandMATLAB Compiler™software.
When you perform online parameter estimation in Simulink or at the command line, the following requirements apply:
Model must be discrete-time linear or nearly linear with parameters that vary slowly with time.
Structure of the estimated model must be fixed during estimation.
iddata
object is not supported during online parameter estimation. Specify estimation output data as a real scalar and input data as a real scalar or vector.
Online State Estimation
You can perform online state estimation of systems at the command line and in Simulink:
In Simulink, use the卡尔曼滤波器,Extended Kalman Filter,Unscented Kalman FilterorParticle Filterblocks to perform online state estimation of discrete-time linear and nonlinear systems. You can generate C/C++ code for these blocks usingSimulink Codersoftware. For the卡尔曼滤波器block, you can also generate Structured Text usingSimulink PLC Codersoftware.
At the command line, use
extendedKalmanFilter
,unscentedKalmanFilter
andparticleFilter
commands to estimate states of discrete-time nonlinear systems. These commands implement discrete-time extended Kalman filter (EKF), unscented Kalman filter (UKF) and particle filter algorithms. For more information about the algorithms, seeExtended and Unscented Kalman Filter Algorithms for Online State Estimation. You can generate code and standalone applications usingMATLAB CoderandMATLAB Compilersoftware.
When you perform online state estimation in Simulink or at the command line, the following requirements apply:
System must be discrete-time. If you are using the卡尔曼滤波器block, the system can also be continuous-time.
iddata
object is not supported during online state estimation. Specify estimation input-output data as real scalars or vectors.
References
[1] Ljung, L.System Identification: Theory for the User. Upper Saddle River, NJ: Prentice-Hall PTR, 1999, pp. 428–440.
[2] Simon, D.Optimal State Estimation: Kalman, H Infinity, and Nonlinear Approaches. John Wiley and Sons Inc., 2006.
See Also
Functions
recursiveAR
|recursiveARMA
|recursiveARX
|recursiveARMAX
|recursiveOE
|recursiveBJ
|recursiveLS
|extendedKalmanFilter
|unscentedKalmanFilter
|particleFilter
Blocks
- Recursive Least Squares Estimator|Recursive Polynomial Model Estimator|卡尔曼滤波器|Extended Kalman Filter|Unscented Kalman Filter|Particle Filter