LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my Kalman filter estimate NaN ?


Hi,
I am estimating the levels in a 4-tank process,
and have implemented my Kalman in a formula node.
2 of the estimators are working very well while the other 2
are giving NaN as their output estimate. Please what could be
the reason for this....please its urgent!!!! 
0 Kudos
Message 1 of 4
(4,276 Views)
Please attach your vi or a screen shot.
0 Kudos
Message 2 of 4
(4,251 Views)

Hi,

Thanks for your concern,

the main VI is called Main and others are the dependencies.

I needed to control the level in the lower two tanks as seen

on the main VI. And also to estimate the levels of the four tanks,

but the upper levels are not responding. It was indicating NaN earlier,

after some troubleshooting, it didnt even show up anything on indicator.

    The VI looks quite messy, I was running the Simulator and Real process

in parallel and comparing the results.

     Please I need urgent help on this program...help help help!!!! 

0 Kudos
Message 3 of 4
(4,232 Views)

Hello Vicky Vicky,

I am sorry that you have not yet received an answer to your question.  The zip file that you attached does not contain all the necessary files needed to run the code, so I cannot verify the behavior that you are seeing.  The missing SubVIs are Kalman Filter Estimator for tank 1.vi 2, Kalman Filter Estimator for tank 2.vi 2, Kalman Filter Estimator for tank 3.vi and PID Settings1.vi.

 

To aid in your troubleshooting, I would encourage you to not use local variables, but instead use wires to get the data from the terminal to the subVI, it will avoid making data copies, and make it easier to see where data values are coming from and going to.  I suggest you use some probes/indicators to see why values might be going invalid, perhaps you are passing a 0 to a division you don't expect.

 

For all subVIs (not simulation functions) you are calling, make sure that you right-click on the subVI and setup the appropriate calling convention (Discrete, Continuous, Initialization only or Final step only) to make sure that the simulation loop is handling execution of these VIs as you expect (at the appropriate times).

 

I hope this helps you to find the source of the problem.  Perhaps it could also be helpful to try a test with just 1 tank to estimate and make sure that part is working before adding the others, if possible this might make troubleshooting simpler.

 

Regards,

Angela M

Staff Product Support Engineer

0 Kudos
Message 4 of 4
(4,119 Views)