Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing measured position AND speed in a Kalman? 1

Status
Not open for further replies.

walker1

Industrial
Dec 27, 2001
117
We need to slave our turntable to an external radar. We will also have to predict a little time forward in order to compensate for various delays. A Kalman-like approach seems a good solution.

The radar delivers various data, including X, Y and Z position on the target, so standard Kalman can be used.
However, some speed parameters of the target are also available!

How do one send those into a filter? All I have seen so far in books and on the web deals with position only.
A weighted combined value based on 1 derivative of position and the measured speed seems likely.

Something like: vn,n = vn,n-1 + h*[(1-w)*Δp/T + w*vn]
vn : observed speed to feed into the filter​
vn,n-1 : last filtered speed​
vn,n : updated filtered speed​
h : filter gain for speed​
Δp : difference in position since last​
T : sample time​
w : weight value 0<w<1​

But is it that 'simple'?

Anybody, who got a good link to an article about this?

 
Replies continue below

Recommended for you

There is much more to Kalman filters than that.
Kalman filters optimize the Kalman or correction gains using the measurement and plant noise covariance. If you don't know these values, and most don't, you should stick to alpha-beta-gamma filters what provide 95% of the benefit with 5% of the effort. I have yet to see a post on an engineering forum where the engineer knows the noise parameters so they just fudge them until they get the desired result so why not admit you don't know them and use a simpler method?



Peter Nachtwey
Delta Computer Systems
 
Try this shorter link for the YouTube video
The previous link worked for me but it may be only because I was using the video manager.
I wish the video manager provided the share links instead of the long links. Actually I think it does when the video is first uploaded but I can't get to it later.
I don't like viewing the videos my self to get the share links because it increases the counts and messes with the analytics.


Peter Nachtwey
Delta Computer Systems
 
-->> PNachtwey
To be honest, I am going for the steady state approach (alpha-beta-gamma), maybe switching between a small number of them, but in the scientific world Kalman is the buzzword [peace].
The way I wrote that speed update statement (matrix-unlike, I hope [blush]) was intended on hinting that.

Also standard Kalman knows nothing about the actual data, when it comes to the gain matrix! That is all about those initial estimates on noise and dynamics. Over time the gain matrix will end up in some steady state, and no incoming data will change that. And even when steady state has been reached, the algorithm keeps on using resources trying to get to the next level, which, of course, will never happen.
If those noise and dynamics parameters are designed to follow a turtle, the filter will loose a fighter jet quite snappy! And not know why!

Changing the design parameters mid-flight will, however, let the filter start all over finding a new steady state gain matrix. And there are various add-ons that do analyze the incoming data and update those parameters as you go. Some of those papers are, however, more for Nobel prize winners that us mere mortals.[ponder]

Anyway, my initial question about getting measured speed data into my filter is still unanswered.
 
Changing the design parameters mid-flight will, however, let the filter start all over finding a new steady state gain matrix. And there are various add-ons that do analyze the incoming data and update those parameters as you go. Some of those papers are, however, more for Nobel prize winners that us mere mortals.ponder
That is why there are extended Kalman filters. I would just use differential equations instead of a transition matrix if plant parameters are changing all the time.

Measurement noise doesn't usually change. Process noise may.
For measurement noise I usually make an estimate like I did in the video or just record some quiescent data when the plant is not operating or when the axis is stopped and do the math.
Estimating the process noise is not that hard. When I do a system identification the optimizer returns a norm that can be used to compute a covariance. Over 25 years ago I wrote a process control system that did running standard deviations and averages for detecting defects. The presses would warm up as they were run so forces would increase.
Bearing wear would cause the standard deviations to increase. The customer could tell when his bearings were about to go bad and finally started to replace bearing before the bearings failed because the larger variances tended to obscure the ability to detect defects. The point is that it is just math and the desire to grind out a solution that works.

Anyway, my initial question about getting measured speed data into my filter is still unanswered.
This question puzzles me because it seems obvious. If you feed your initial filter with changes in position divided by time as you show then the velocities will update. In my examples I am only using position data to estimate velocities and accelerations. I don't input velocities. They are generated by the position inputs and the model.





Peter Nachtwey
Delta Computer Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor