Implements a Kalman filter for a continuous linear time-invariant (LTI) or linear time-variant (LTV) stochastic state-space model. This function calculates the Kalman filtered state estimates and outputs at time t.
![]() | Note To use this function, you must install the LabVIEW Control Design Toolkit and the LabVIEW Simulation Module and place this function inside a Simulation Loop. |
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
| Parameter | Description |
|---|---|
| Output y(t) | Specifies the measurement made on the stochastic state-space model. |
| Second-Order Statistics Noise Model | Specifies a mathematical representation of the noise model of a stochastic state-space model. |
| Stochastic State-Space Model | Specifies a mathematical representation of a stochastic system. |
| Input u(t) | Specifies the control action this function applies to the model. If you specify a matrix of zeros for Input u(t) or do not wire a value to this parameter, this function does not apply any control action. |
| Initial State Estimate x(t0) | Specifies the initial states from which this function begins estimating the model states. If you do not specify a value for this parameter, Initial State Estimate x(t0) is a vector of zeros. |
| Initial Estimation Error Covariance P(t0) | Specifies the initial covariance matrix of the estimation error. If you do not specify a value for this parameter, Initial Estimation Error Covariance P(t0) is a matrix of zeros. |
| Parameter | Description |
|---|---|
| Output y(t) | Specifies the measurement made on the stochastic state-space model. |
| Second-Order Statistics Noise Model | Specifies a mathematical representation of the noise model of a stochastic state-space model. |
| Stochastic State-Space Model | Specifies a mathematical representation of a stochastic system. |
| Input u(t) | Specifies the control action this function applies to the model. If you specify a matrix of zeros for Input u(t) or do not wire a value to this parameter, this function does not apply any control action. |
| Initial State Estimate x(t0) | Specifies the initial states from which this function begins estimating the model states. If you do not specify a value for this parameter, Initial State Estimate x(t0) is a vector of zeros. |
| Initial Estimation Error Covariance P(t0) | Specifies the initial covariance matrix of the estimation error. If you do not specify a value for this parameter, Initial Estimation Error Covariance P(t0) is a matrix of zeros. |
| Parameter | Description |
|---|---|
| Estimated Output yhat(t) | Returns the estimated values of the model outputs at time t. |
| Kalman Filter Gain L(t) | Returns the estimator gain matrix this function uses to estimate the model states xhat(t) at time t. |
| Estimation Error Covariance P(t) | Returns the covariance matrix of the estimation error associated with the estimated model states xhat(t). |
| Estimated State xhat(t) | Returns the estimated model states at time t. |
The following equations define the outputs this function calculates:
Estimated Output yhat(t) = C(t)xhat(t) + D(t)u(t)
Kalman Filter Gain L(t) = [P(t)CT(t) + G(t)Q(t)HT(t) + G(t)N(t)] . [H(t)Q(t)HT(t) + H(t)N(t) + NT(t)H(t)T+R(t)]–1
Estimation Error Covariance P(t) = A(t)P(t) + P(t)AT(t) + G(t)Q(t)GT(t) – P(t)C(t)T[H(t)Q(t)H(t)T + H(t)N(t) + NT(t)HT(t) + R]–1C(t)P(t) – [G(t)Q(t)HT(t) + G(t)N(t)][H(t)Q(t)HT(t) + H(t)N(t) + NT(t)HT(t) + R]–1 . [G(t)Q(t)HT(t) + G(t)N(t)]T
Estimated State xhat(t) = A(t)xhat(t) + B(t)u(t) + L(t)[y(t) – yhat(t)]