LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Kalman filter example "CDEx Kalman Filter" - how to make position as an input?

Hello,

I would like to implement a Kalman filter for a simple mechanical system to estimate the velocity given a measurement input of position (which will eventually be achieved with measurement hardware). The scenario is that I would like to use an ultrasonic sensor, which measures position, along with a Kalman filter to estimate the velocity of a toy car in motion. To begin, I have started with one of the built-in examples in LabVIEW: "CDEx Kalman Filter". So far, I believe I have entered the appropriate matrices for A, B, C, and G, given the following state space:

state_space.png

My question is: what are the input(s) to the system in this VI? The way that I have it set up right now looks like the input (the "inputs" terminal to the "CD Linear Simulation" block) is acceleration, not position (which I made constant). Is this correct? How can I make position as an input? How would I change the state space accordingly? Thank you.

0 Kudos
Message 1 of 2
(2,709 Views)

Hi dphull1,

 

As far as I understand you should be able to enter position as your stimulus input as long as your state space model is input in a way where position is the stimulus. As far as how you would need to change the state space model if this is not the case, I am not sure.

 

What is the behavior you are seeing that leads you to believe you are seeing acceleration as the input? 

 

Regards,

 

Conrad S.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 2
(2,650 Views)