Filter Kalman

More
5 years 7 months ago #203392 by TheRoslyak
Filter Kalman was created by TheRoslyak
Can you explane:How to configure Filter Kalman?
Now I have input and output is same. (With default parametres)

Please Log in to join the conversation.

More
5 years 7 months ago #203405 by Aciera
Replied by Aciera on topic Filter Kalman
Where do you get a kalman filter from in LCNC?

Please Log in to join the conversation.

More
5 years 7 months ago #203407 by PCW
Replied by PCW on topic Filter Kalman
Its a standard LinuxCNC component: filter_kalman

Please Log in to join the conversation.

More
5 years 7 months ago #203408 by Aciera
Replied by Aciera on topic Filter Kalman
Interesting, never noticed that before. Thanks.

Please Log in to join the conversation.

More
5 years 7 months ago #203453 by andypugh
Replied by andypugh on topic Filter Kalman
Here is the code, if it helps:
github.com/LinuxCNC/linuxcnc/blob/master...s/filter_kalman.comp

What you describe is the behaviour with passthrough = true, but it should default to false.

Please Log in to join the conversation.

More
5 years 7 months ago #203491 by TheRoslyak
Replied by TheRoslyak on topic Filter Kalman
It's clear.
I meant how to correctly configure "filter-kalman.N.Rk" and "filter-kalman.N.Qk"

Please Log in to join the conversation.

More
5 years 3 months ago #215794 by Aciera
Replied by Aciera on topic Filter Kalman
Just in case somebody comes across this.
The kalman filter component is based on this code:
github.com/LinuxCNC/linuxcnc/blob/master...s/filter_kalman.comp

Regarding the estimation of Qk and Rk you are pointed to this:
en.wikipedia.org/wiki/Kalman_filter#Esti...ovariances_Qk_and_Rk

One practical approach to do this is the autocovariance least-squares (ALS) technique that uses the time-lagged autocovariances of routine operating data to estimate the covariances. The GNU Octave and Matlab code used to calculate the noise covariance matrices using the ALS technique is available online under the GNU General Public License .

Please Log in to join the conversation.

More
2 years 3 weeks ago #311318 by spumco
Replied by spumco on topic Filter Kalman
As a practical application, I tried using this to filter noisy analog inputs for my overrides (JRO/FRO/SRO).

Using a Mesa 7i73 and 0-20k pots, I was getting enough input voltage flicker that it was affecting the commanded speed by +/- 0.2 ipm during what was intended as a continuous jog.

Experimentally, the following settings stabilized the output to halui.jog-speed enough so there is zero 'flicker' anywhere in the pot's range:

kalman-filter.N.Rk = 0.000001 (1e-6)
kalman-filter.N.Qk = 0.000001 (1e-6)

I'm sure someone who understand any of the filter math would be able to set this more appropriately, but the above values might be a useful starting point for anyone trying to tame fluttering inputs.

Please Log in to join the conversation.

Time to create page: 8.203 seconds
Powered by Kunena Forum