Example Code

Discrete Kalman Filter Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This VI implements a Kalman filter that estimates the states of a stochastic system (Set up for order 2 but should work for any order)

 

Description

Kalman filtering, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by using Bayesian inference and estimating a joint probability distribution over the variables for each time frame. The Kalman filter has numerous applications in technology. A common application is for guidance, navigation, and control of vehicles, particularly aircraft and spacecraft. Furthermore, the Kalman filter is a widely applied concept in time series analysis used in fields such as processing and econometric . In this example, we implement a Kalman filter that estimates the states of a stochastic system. It is implemented as a single Input/output systems only at present, meaning it sets up for SISO systems only at present.

 

Requirements

LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code

 

  1. Provide the coefficients, Noise Variance and Po
  2. Manually input A,B,C,D
  3. Run the VI

 

Additional Information or References

VI Block Diagram

Discrete Kalman Filter BD.jpg

 

**This document has been updated to meet the current required format for the NI Code Exchange. **

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.