How to smooth out a very inconsistent reading

It isn't clear how you calculated alpha and beta also I don't agree with your checks.
The code is lifted basically 1-to-1 from the C sample code on the wikipedia page (https://en.wikipedia.org/wiki/Alpha_beta_filter).
The checks are also lifted directly from that page.

I will take a look into making an alpha-beta-gamma filter based on your notes and the mathcad sample. it will take some effort on my part since it has been a long time since I dabbled with matrix equations.
 
Excellent.

The code is lifted basically 1-to-1 from the C sample code on the wikipedia page (https://en.wikipedia.org/wiki/Alpha_beta_filter).
The checks are also lifted directly from that page.
It isn't the code that I have a problem with. It how the gains get initialized that are the problem. First, it looks like that were picked by trial and error and that alpha and beta are totally independent when they shouldn't be.

I will take a look into making an alpha-beta-gamma filter based on your notes and the mathcad sample. it will take some effort on my part since it has been a long time since I dabbled with matrix equations.
Very good.
I have this example too. It is written using wxMaxima.
https://deltamotion.com/peter/wxMaxima/ABG.html
Notice that below
(%o6)
I have a few different variations on how to calculate the K gains or alpha, beta and gamma. They are based on where the poles should be for the filter. There are different method if calculating where the poles should be.
The 3 real pole gains are safe and the Butterworth ones should be too. I tried them all. It didn't make much difference because the poles are in pretty good spots using tried and proven methods.

There should be only one parameter the user needs to changed and that is omega or the bandwidth. I usually place the bandwidth at the sqrt(sample_frequency*system_frequency) for starters. This frequency is low enough to filter out the sampling and quantizing noise but high enough not to affect the response too much. In my ABz.pdf I set the frequency to about 70.0 radians per second which is a little over 10 Hz. In the example the system frequency ( sine wave ) is 1 Hz and the sample frequency is 100 HZ so the sqrt( 1*100) = 10 Hz.
 
Last edited:
Some papers I found seemed to discuss kalman filter and alpha-beta-gamma filter in the same context as if they were the same thing.


That is because the alpha-beta-gamma filter, or something very similar to it, is part of the Kalman filter. The difference is that the Kalman filter adjusts the filter gains by adding the Kalman Gain, Covariance Update, and Covariance Extrapolation equations.


See here: https://www.kalmanfilter.net/default.aspx
 
drbitboy is right. The A or F matrix that predicts or estimates the next state based on the current state are the same for alpha-beta-gamma, Luenberg observers and Kalman filters.
An alpha-beta-gamma will get you 98% of the benefit with only 5% of the hassle.

Full Kalman filters with update the Kalman gains every iteration. This requires a lot of processing power. It also requires knowing the measurement and system covariance which is something most people don't know so the fudge it. Static Kalman filter calculate the Kalman gains once but still use the covariance of the system and measurement. Alpha-beta-gamma filters make no pretense of being optimal but with care choices of the values for the K gains, one can get very good results with little effort. In any case, calculating the gains for the A or F matrix that estimate the next state is most important because then there is little to correct.
 

Similar Topics

i try to make a car that move smoothly in HMI, i use propertie Vertical Position of car ( CarVp): CarVp=CarVp + 1 ( or + other number 2,3,... )...
Replies
6
Views
1,993
hy sirs, i need to smooth the speed setpoint on a simodrive (6SN1118–0NH00–0AA2). which parameter i should change? (preferably if there is one at...
Replies
0
Views
2,563
I found this link on another site http://www.holoborodko.com/pavel/?page_id=245 In the past I have posted examples of how to use the...
Replies
0
Views
2,643
At first, my projects run on Simotion C (C230) with SimoDrive 611U and there was no problem all motions was dynamic. But i had to switch Simotion...
Replies
0
Views
2,446
I'm interested in opinions on which type of motor and drive would perform the best if your requirements are extremely smooth rotation at low rpm...
Replies
21
Views
6,602
Back
Top Bottom