{"id":2455,"date":"2009-08-14T10:52:54","date_gmt":"2009-08-14T10:52:54","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/14\/self-balancing-wheeled-robot\/"},"modified":"2018-01-11T14:32:09","modified_gmt":"2018-01-11T19:32:09","slug":"self-balancing-wheeled-robot","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/14\/self-balancing-wheeled-robot\/","title":{"rendered":"Self-Balancing Wheeled Robot"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\">Jiro<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/19-delta-sigma-toolbox\"><tt>Self-Balancing Robot<\/tt><\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/30652\">Yorihisa Yamamoto<\/a>.\r\n   <\/p>\r\n   <p>This one comes from Tokyo, Japan. I am currently here for a few weeks working with the Application Engineers at the <a href=\"https:\/\/www.mathworks.com\/\">MathWorks Japan<\/a> office which just opened this July. These engineers have dealt with MathWorks products for many years as our local distributor,\r\n      and they're all very sharp people. Yorihisa is one of the Application Engineers here in Japan, and he focuses on Simulink\r\n      and controls applications.\r\n   <\/p>\r\n   <p>Being a MATLAB person, I was blown away when Yorihisa showed me this self-balancing lego robot where the control algorithm\r\n      was developed in the Simulink environment. My eyes were glued to this wheeled robot swaying back and forth to keep its balance.\r\n      See it in action here:\r\n   <\/p>\r\n\r\n\r\n   <p>\r\n<iframe loading=\"lazy\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/EHPlGTLQHRc?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe>\r\n  <\/p>\r\n\r\n\r\n   <p>\r\n<iframe loading=\"lazy\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/4ulBRQKCwd4?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe>\r\n  <\/p>\r\n\r\n   <p>I'm curious to hear about other hardware interface demos\/projects people have done using MATLAB and Simulink. Please tell\r\n      us about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2455#respond\">here<\/a>. If you have corresponding File Exchange entries, even better!\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_5b009de00ab545488631192e82a4f962() {\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='5b009de00ab545488631192e82a4f962 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 5b009de00ab545488631192e82a4f962';\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 = 'Jiro Doke';\r\n        copyright = 'Copyright 2009 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_5b009de00ab545488631192e82a4f962()\"><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.8<br><\/p>\r\n<\/div>\r\n<!--\r\n5b009de00ab545488631192e82a4f962 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\r\n% Jiro>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/19-delta-sigma-toolbox\r\n% |Self-Balancing Robot|> by \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/30652\r\n% Yorihisa Yamamoto>.\r\n%\r\n% This one comes from Tokyo, Japan. I am currently here for a few weeks\r\n% working with the Application Engineers at the\r\n% <https:\/\/www.mathworks.com\/ MathWorks Japan> office which just opened\r\n% this July. These engineers have dealt with MathWorks products for many\r\n% years as our local distributor, and they're all very sharp people.\r\n% Yorihisa is one of the Application Engineers here in Japan, and he\r\n% focuses on Simulink and controls applications.\r\n%\r\n% Being a MATLAB person, I was blown away when Yorihisa showed me this\r\n% self-balancing lego robot where the control algorithm was developed in\r\n% the Simulink environment. My eyes were glued to this wheeled robot\r\n% swaying back and forth to keep its balance. See it in action here:\r\n%\r\n%\r\n% I'm curious to hear about other hardware interface demos\/projects people\r\n% have done using MATLAB and Simulink. Please tell us about it\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2455#respond here>. If you have\r\n% corresponding File Exchange entries, even better!\r\n##### SOURCE END ##### 5b009de00ab545488631192e82a4f962\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Jiro's pick this week is Self-Balancing Robot by Yorihisa Yamamoto.\r\n   \r\n   This one comes from Tokyo, Japan. I am currently here for a few weeks working with the Application Engineers at the... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/14\/self-balancing-wheeled-robot\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2455"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2455"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2455\/revisions"}],"predecessor-version":[{"id":9340,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2455\/revisions\/9340"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}