Filter Kalman

More
23 Mar 2021 14:03 - 23 Mar 2021 14:03 #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)
Attachments:
Last edit: 23 Mar 2021 14:03 by TheRoslyak.

Please Log in or Create an account to join the conversation.

More
23 Mar 2021 15:45 #203405 by Aciera
Replied by Aciera on topic Filter Kalman
Where do you get a kalman filter from in LCNC?

Please Log in or Create an account to join the conversation.

More
23 Mar 2021 16:22 #203407 by PCW
Replied by PCW on topic Filter Kalman
Its a standard LinuxCNC component: filter_kalman

Please Log in or Create an account to join the conversation.

More
23 Mar 2021 16:31 #203408 by Aciera
Replied by Aciera on topic Filter Kalman
Interesting, never noticed that before. Thanks.

Please Log in or Create an account to join the conversation.

More
23 Mar 2021 22:37 #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 or Create an account to join the conversation.

More
24 Mar 2021 07:43 #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 or Create an account to join the conversation.

More
24 Jul 2021 17:14 #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 .

The following user(s) said Thank You: tommylight, spumco

Please Log in or Create an account to join the conversation.

More
05 Oct 2024 04:38 #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.
The following user(s) said Thank You: tommylight, Aciera

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum