LabVIEW Control Design and Simulation Module

Continuous Extended Kalman Filter Function

  • Updated2023-03-14
  • 5 minute(s) read

Owning Palette: Estimation Functions

Requires: Control Design and Simulation Module

Calculates the estimated states and estimated outputs of a continuous nonlinear stochastic state-space system. This function also calculates the Kalman gain and associated estimation error covariance matrix for the model.

Refer to the LabVIEW Control Design User Manual for more information about using extended Kalman filters.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies whether this function uses an External Jacobian matrix or an Internal Jacobian matrix. The default value is External Jacobian.
ParametersLists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box.
PreviewDisplays a graphical preview, if available, of the function output or configuration.
Parameter InformationContains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box.
Parameter sourceSpecifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the simulation diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the simulation diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the simulation diagram. You then must set the value for this parameter inside the configuration dialog box.
dataSpecifies a reference to any external data that the plant model requires. This parameter is a variant. Use the To Variant function to convert LabVIEW data to variant data.
Initial Estimation Error Covariance P(0)Specifies the initial covariance matrix of the estimation error. The default value of the Initial Estimation Error Covariance P(0) is 1.
Noise ModelSpecifies a mathematical representation of the noise model of a stochastic state-space model. You can create a noise model using the CD Construct Noise Model VI.
  • E{w}—Specifies the expected value or mean of the process noise vector. The default is 0.
  • Q—Specifies the covariance matrix of the process noise vector. The default is 0.01.
  • E{v}—Specifies the expected value or mean of the measurement noise vector. The default is 0.
  • R—Specifies the covariance matrix of the measurement noise vector. The default is 0.1.
  • N—Specifies the cross-covariance matrix between the process noise vector and the measurement noise vector. If the noise vectors w and v are uncorrelated, N is a matrix of zeros. The default is 0.
Initial State Estimate xhat(0)Specifies the initial states from which this function begins estimating the model states. The default value of the Initial State Estimate xhat(0) is 1.
Initialize?Specifies whether to restart the calculation from any initial values you provide. The default is FALSE.
JacobiansSpecifies a reference to the Jacobian matrix that the extended Kalman filter uses to estimate the states of the model. This parameter is available only if you select External Jacobian from the Polymorphic instance pull-down menu.

Wire a reference to a VI representing the Jacobian matrix to this input. Use the SIM Continuous Jacobians template VI or the SIM Discrete Jacobians template VI, located in the labview\templates\Control and Simulation directory, to create the Jacobian matrix.

Jacobian OrderSpecifies the order of the Jacobian matrix. This parameter is available only if you select Internal Jacobian from the Polymorphic instance pull-down menu.

Block Diagram Inputs

ParameterDescription
dataSpecifies a reference to any external data that the plant model requires. This parameter is a variant. Use the To Variant function to convert LabVIEW data to variant data.
Initial Estimation Error Covariance P(0)Specifies the initial covariance matrix of the estimation error. The default value of the Initial Estimation Error Covariance P(0) is 1.
Noise ModelSpecifies a mathematical representation of the noise model of a stochastic state-space model. You can create a noise model using the CD Construct Noise Model VI.
  • E{w}—Specifies the expected value or mean of the process noise vector. The default is 0.
  • Q—Specifies the covariance matrix of the process noise vector. The default is 0.01.
  • E{v}—Specifies the expected value or mean of the measurement noise vector. The default is 0.
  • R—Specifies the covariance matrix of the measurement noise vector. The default is 0.1.
  • N—Specifies the cross-covariance matrix between the process noise vector and the measurement noise vector. If the noise vectors w and v are uncorrelated, N is a matrix of zeros. The default is 0.
Initial State Estimate xhat(0)Specifies the initial states from which this function begins estimating the model states. The default value of the Initial State Estimate xhat(0) is 1.
Initialize?Specifies whether to restart the calculation from any initial values you provide. The default is FALSE.
JacobiansSpecifies a reference to the Jacobian matrix that the extended Kalman filter uses to estimate the states of the model. This parameter is available only if you select External Jacobian from the Polymorphic instance pull-down menu.

Wire a reference to a VI representing the Jacobian matrix to this input. Use the SIM Continuous Jacobians template VI or the SIM Discrete Jacobians template VI, located in the labview\templates\Control and Simulation directory, to create the Jacobian matrix.

Jacobian OrderSpecifies the order of the Jacobian matrix. This parameter is available only if you select Internal Jacobian from the Polymorphic instance pull-down menu.
Output y(t)Specifies the measurement made on the stochastic state-space model.
Input u(t)Specifies the control action this function applies to the model. If you specify a vector of zeros for Input u(t), this function does not apply any control action.
Plant ModelSpecifies the plant model whose states you want to estimate.

Wire a reference to a VI representing the plant model to this input. Use the SIM Continuous Nonlinear Plant Model template VI or the SIM Discrete Nonlinear Plant Model template VI, located in the labview\templates\Control and Simulation directory, to create a plant model.

Block Diagram Outputs

ParameterDescription
Estimated Output yhat(t)Returns the estimated values of the model outputs at time t.
Estimated State xhat(t)Returns the estimated model states 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).

Continuous Extended Kalman Filter Details

Refer to the LabVIEW Control Design User Manual for more information about the calculations this function performs.

Log in to get a better experience