{"id":2576,"date":"2010-07-09T02:55:39","date_gmt":"2010-07-09T02:55:39","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2010\/07\/09\/learning-the-extended-non-linear-kalman-filter\/"},"modified":"2010-07-09T02:55:39","modified_gmt":"2010-07-09T02:55:39","slug":"learning-the-extended-non-linear-kalman-filter","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2010\/07\/09\/learning-the-extended-non-linear-kalman-filter\/","title":{"rendered":"Learning the Extended (Non-Linear) Kalman Filter"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction><\/introduction>\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a>'s Pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/181-keep-learning-the-extended-kalman-filter\">\"Learning the Extended Kalman Filter\"<\/a>, by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/22524\">Yi Cao<\/a>.\r\n   <\/p>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/07\/02\/learning-the-linear-kalman-filter\/\">Last week<\/a> I wrote about <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/7965\">Michael Kleder's<\/a> <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift-learning-the-kalman-filter\">\"Learning the Kalman Filter\"<\/a> submission. Kalman filtering of linear systems is fairly easy; Michael's tutorial gave us great insight in that regard. The\r\n      application of Kalman filters to nonlinear systems isn't quite as straighforward, and Yi's submission provides a welcome introduction.\r\n   <\/p>\r\n   <p>In his in-file example, Yi (who is currently, by the way, the second most-downloaded author on the File Exchange--our kind\r\n      of people!) defines state equations for a tri-state nonlinear dynamic system, and then, from a noisy initial state, he simulates\r\n      measurements of the system at 20 timesteps. His EKF function then calculates and returns, based on initial system covariance\r\n      estimates\/measurements, the estimated system states:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/kalman2.png\"> <\/p>\r\n   <p>This is a nice follow-up to Michael's tutorial on the use of Kalman filtering in linear systems. Yi has <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?term=cao+kalman\">a lot more to say<\/a> about this and similar subjects. He has posted both MATLAB and Simulink tutorials on Kalman filtering, and has written (and\r\n      submitted) on extended Kalman filters, unscented Kalman filters, Kalman-Bucy filtering, unconstrained optimization with Kalman\r\n      filters, and neural networks using Kalman filters.\r\n   <\/p>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2576#respond\"> Comments?<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_ca34fe74961747e2bdf7d872f7a203c1() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='ca34fe74961747e2bdf7d872f7a203c1 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' ca34fe74961747e2bdf7d872f7a203c1';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Brett Shoelson';\r\n        copyright = 'Copyright 2010 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_ca34fe74961747e2bdf7d872f7a203c1()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.11<br><\/p>\r\n<\/div>\r\n<!--\r\nca34fe74961747e2bdf7d872f7a203c1 ##### SOURCE BEGIN #####\r\n%% Learning the Extended (Non-Linear) Kalman Filter\r\n%% \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett>'s Pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/181-keep-learning-the-extended-kalman-filter \"Learning the Extended Kalman Filter\">, by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/22524 Yi Cao>.\r\n\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/2010\/07\/02\/learning-the-linear-kalman-filter\/ Last week> I wrote about\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/7965 Michael Kleder's>\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/53-shift-learning-the-kalman-filter \"Learning the Kalman Filter\"> submission. \r\n% Kalman filtering of linear systems is fairly easy; Michael's tutorial gave us great insight in that regard.\r\n% The application of Kalman filters to nonlinear systems isn't quite as straighforward, and\r\n% Yi's submission provides a welcome introduction. \r\n\r\n%%\r\n% In his in-file example, Yi (who is currently, by the way, the second most-downloaded author on the File ExchangeREPLACE_WITH_DASH_DASHour kind of people!)\r\n% defines state equations for a tri-state nonlinear dynamic system, and then, from a noisy initial state, he simulates measurements of the system at\r\n% 20 timesteps. His EKF function then calculates and returns, based on initial system covariance estimates\/measurements, the estimated system states: \r\n\r\n%%\r\n% \r\n% <<https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/kalman2.png>>\r\n% \r\n%%\r\n% This is a nice follow-up to Michael's tutorial on the use of Kalman\r\n% filtering in linear systems. Yi has <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?term=cao+kalman a lot more to say> about this and\r\n% similar subjects. He has posted both MATLAB and Simulink tutorials on\r\n% Kalman filtering, and has written (and submitted) on extended Kalman filters, unscented Kalman filters,\r\n% Kalman-Bucy filtering, unconstrained optimization with Kalman filters,\r\n% and neural networks using Kalman filters.\r\n\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2576#respond  Comments?>.\r\n\r\n##### SOURCE END ##### ca34fe74961747e2bdf7d872f7a203c1\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n   Brett's Pick this week is \"Learning the Extended Kalman Filter\", by Yi Cao.\r\n   \r\n   Last week I wrote about Michael Kleder's \"Learning the Kalman Filter\" submission. Kalman filtering of... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/07\/09\/learning-the-extended-non-linear-kalman-filter\/\">read more >><\/a><\/p>","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2576"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2576"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2576\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}