Calmin' Filters
The real trouble with this world of ours is not that it is an unreasonable world, nor even that it is a reasonable one.?The commonest kind of trouble is that it is nearly reasonable, but not quite.?Life is not an illogicality; yet it is a trap for logicians.?It looks just a little more mathematical and regular than it is; its exactitude is obvious, but its inexactitude is hidden; its wildness lies in wait.?-?G. K. Chesterton
Intro:?I think the quote is a good introduction.?At one point, scientists believed in a predictable, mechanistic universe.?If you could just know all the starting states and processes, then you could predict everything about the universe.?This was an idealized goal, as ordinary people know this can’t be done, and as we learned more, scientists found barriers to what could be measured and real limits to what could be predicted (quantum, chaos theory, irreducible complexity, etc.).?People have been coping with, and working at reducing, uncertainty since before civilization existed, and we still work at it today.
Wisdom & Madness of Crowds:?The 2004 book, the Wisdom of Crowds noted that an unbiased motivated crowd of non-experts could often outperform experts at some tasks, as the independent misestimating and biases tended to cancel out, while the experts were left with theirs.?Simple averaging of unchanging measures can be effective.?We already knew this could work as “Two heads are better than one”, and mental diversity is often useful in solving problems.?On the other hand, “Extraordinary Popular Delusions & the Madness of Crowds” shows the counterpoint, where crowds can be influenced.?Voting markets aren’t appropriate for some things, and unpredictable moving targets is one of them.?The person or mechanism in the loop has considerable influence on the results.
Prediction:?Much of life is about trying to make good decisions despite limited and sometimes bad information.?Imagine you are in charge of a project, but unable to direct all the details yourself (normal life).?You have three foreman that you provide goals and resources too and they provide you with feedback on the project’s progress.?Their requests and project progress reports don’t agree.?Alfred is a real go-getter and a bit of an optimist, so he sometimes outperforms and sometime has a surprise set back.?Bob is very detailed oriented and tends to look at the obstacles and underestimate progress.?Charles is more experienced, so his estimates are good, but his home life is a mess, so his progress and viewpoint are variable.?Knowing the tendencies of each foreman helps in making estimates to combine the feedback of each foreman and understand the real state of the project.?Alfred is variable and optimistic, Bob is pessimistic but reliable, and Charles is usually somewhere in between.?This is fine for a human that understands people and the work, but the work and its challenges vary daily, and to get a better grip on progress, accuracy or quality control people are used to verify the work done.?They have their own inaccuracy and biases.?Foremen tend to overestimate work done and quality control tend to underestimate it.?An experienced person can intuitively understand this and use his validated understanding of the work to control resources in small scale work, but as complexity increases this becomes more difficult and the process needs to be formalized.
Formalization:?There is a mathematical theory that covers this called Bayes’ Theorem.?It helps with making decisions in an uncertain world.?I’m not going to get into the formal detail, because it is something that you use all the time to make decisions and even move.?A hunter taking a shot at a rabbit is measuring and predicting the rabbit’s movement, measuring and predicting the wind, accounting for obstacles and gravity, predicting and compensating for his own capacity, predicting and compensating for errors in all the previous, and then taking the shot.?If he misses, he takes the new information and corrects his second shot.?There is a lot of complicated math in this, but the unconscious intuitive supercomputers in our head can learn to do it automatically.?Actual computers are less capable and have to use a dumbed down version of Bayes’ Theory that they can run as just numbers.?Translating Bayes’ Theorem to something a computer could usefully calculate took the Kalman Filter.
领英推荐
Kalman Filter:?Machines can be programmed to look at all the previous inaccuracies as noise and trends.?Like a person, the Kalman filter allows the machine to adjust for its control and feedback being noisy by adjusting its estimate of reality and thus model of the process.?If the control is good and the feedback is bad, then the control model is preferred and weighted more heavily than the feedback, because trusting control works.?If the control is poor or the load chaotic, then the feedback tends to be more accurate and is preferred, because it gives better results.?How does the system know which one is better??Both the control (model) and the feedback can be used to make predictions and the one that is more consistently accurate becomes more heavily weighted in the solution.?The standard deviation of the feedback (error window) and the errors between the predictions and the measurement are used to repeatedly adjust the weighting.?You’ve seen DP systems automatically weight position reference sensors based on health signals like standard deviation, so you’ve seen something similar.?The difference is that the weighting is between the current control model weighting and the feedback, and the future weighting adjusted based on the result.??
Extended:?Looking at our three foremen, Bob is more consistent and would be more heavily weighted by a Kalman Filter than the feedback from the more variable Alfred.?This reveals a problem with the basic Kalman filter.?We know that Bob and Alfred both have biases but the Kalman Filter uses standard deviation and assumes a standard bell curve distribution.?Those biases mean that assumption is no longer true.?It also assumes linearity, which is untrue of power law processes.?The Extended Kalman Filter iteratively adjusts to resolve these issues.?This is less useful for Charles who can be very reliable, but can suddenly change and throw off a predictable system until his input is reduced, but is very useful for continuous systems.?The DP control systems use Extended Kalman Filters.
Discontinuity:?Charles is when the bow gets hit by a big wave, or the current suddenly swings.?It’s why we have wind feed forward.?The Extended Kalman Filter is excellent at modelling gradually changing systems, but has problems handling discontinuous systems.?In the same way, the DP model, which has be trained by this filtered data, can handle sudden but well-modelled changes to that system.?For example, the lost but known thrust from a suddenly failed thruster can be quickly compensated for, but a large unknown thrust due to inaccurate thruster feedback will be built into the model, will create a wrong solution on loss of the thruster, and this uncompensated force will move the vessel until the model eventually compensates.?A large enough hidden error will cause loss of position when it suddenly no longer applies.?This isn’t a drive off.?It’s a control deviation until the system eventually compensates.?This is why it is important to maintain thruster calibration and disable thrusters that aren’t producing the thrust that the DP system would expect.?Consistent false information distorts the model and endangers control.?You will note that this very paragraph is a partial discontinuity in subject matter.
Conclusion:?This has been a very high level introduction to the Kalman Filter.?The advantages should be obvious, but the limitations are also real and need to be taken seriously.??An overview without graphs or math has limitations, and the more detail-oriented and curious might be interested in the following links:
Student
1 年This is a bit unclear to me, what is the difference between Kalman filter and Markov chain and linear extrapolation?!
Manager Specialist - Dynamic Positioning System - IMCA Accredited Company DP Authority at Sapura Energy Berhad.
1 年“Calmant” filter?! ??
Master Mariner - DP Instructor @ Tsakos Shipping and Trading | Dynamic Positioning
1 年Very helpful article Paul Kerr!! Thank you for your contribution and sharing your expertise!!
Maritime Consultant | Dynamic Positioning | Project Management | Business Analytics | Scrum
1 年I like your explanation, Paul. Much better than "It's stuhtisticks."
Marine Consultant (Capt.) Farraige-QHSE
1 年An enjoyable read, the unknown knowns and the known knowns, the ‘magic’ of DP explained by someone who understands the processes intrinsically.