{"id":101,"date":"2017-11-20T12:22:15","date_gmt":"2017-11-20T11:22:15","guid":{"rendered":"http:\/\/em-company.fr\/blog\/?p=101"},"modified":"2017-11-29T17:10:04","modified_gmt":"2017-11-29T16:10:04","slug":"sensor-fusion-controller-fuzzy-logic","status":"publish","type":"post","link":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/","title":{"rendered":"Sensor Fusion controller using a Fuzzy Logic approach (intro)"},"content":{"rendered":"<p>The recent rise of MEMS and Microsensors have posed a new and interesting problem to designers. Before MEMS, you barely had one temperature sensor, maybe one pressure sensor in your system. Then you would put some code around &#8230; Et Voila ! your device was capable of measuring Temperature and Pressure.<!--more--><\/p>\n<p>Now with the advent of MEMS, nothing prevents you to have a lot of sensors, of different types, at different positions in your system. The issue has become &#8220;How do I combine all these together to produce something useful&#8221; ?\u00a0 This what Sensor Fusion is about.<\/p>\n<figure id=\"attachment_269\" aria-describedby=\"caption-attachment-269\" style=\"width: 300px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-269 size-medium\" src=\"http:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg\" alt=\"sensor fusion \" width=\"300\" height=\"139\" srcset=\"https:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg 300w, https:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion.jpg 537w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><figcaption id=\"caption-attachment-269\" class=\"wp-caption-text\">(Courtesy of STMicroelectronics.)<\/figcaption><\/figure>\n<p>Your smartphone has typically\u00a0 several temperatures sensors, several light sensors, several accelerometers. Modern accelerometers often implement smart functions like &#8220;Significant Motion detection&#8221;, &#8220;No Motion detection&#8221;, etc .. . This is even an OS requirement (see <a href=\"https:\/\/developer.android.com\/guide\/topics\/sensors\/sensors_motion.html\">here<\/a>, for Android).<\/p>\n<blockquote><p><strong>My own definition:<\/strong> A Sensor Fusion Controller is a piece of Software and\/or Hardware that implements some smart algorithms out of a variety of inputs (the sensors), essentially to derive a richer information than the sum of all the inputs.<\/p><\/blockquote>\n<p>The following describes an implementation of an off-arm detection based on sensor fusion. The Wearable Device I was working on was an arm-worn type of device. Is it very important to understand, in those kind of devices, whether it is actually worn by the User, or simply left aside on a table or within a bag. All kind of Power Saving scenarios can then be implemented.<\/p>\n<p>So in this specific case, it looked simple ! Put a Proximity Sensor and you got it. Those components are available, one example <a href=\"https:\/\/www.broadcom.com\/products\/optical-sensors\/proximity-sensors\/apds-9700\">here<\/a>.\u00a0 But he problem was that, the manufacturer wanted to shave off the 1 dollar of component &#8230;.\u00a0 so Software had to find a solution. Easy \ud83d\ude41<\/p>\n<h5>Problem description<\/h5>\n<p>The basic question was:<\/p>\n<blockquote><p>&#8220;Are we able to infer that the device is worn or not, based on all those sensors ?&#8221;.<\/p><\/blockquote>\n<p>And of course, the corollary design constraint:<\/p>\n<blockquote><p>&#8220;We shall NOT infer it is worn when it is not &#8230;&#8221;.<\/p><\/blockquote>\n<p>We very rapidly agreed that, we&#8217;d better concentrate on a few &#8220;solid&#8221; cases, like: <strong><em>the device is laying on a table, facing up, since more that 5 minutes<\/em><\/strong>. For all the difficult cases (for example, <em><strong>Worn but not moving ),\u00a0<\/strong><\/em>we can just not do anything.<\/p>\n<p>In the <a href=\"http:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/29\/sensor-fusion-controller-using-fuzzy-logic-approach-design-choices\/\">next<\/a> articles, I will detail the rationale in using a Fuzzy Logic approach for solving this problem,\u00a0 the implementation of the whole thing &#8230; and some results \/ possible improvements.<\/p>\n<p><span style=\"text-decoration: underline;\">References<\/span><\/p>\n<ol>\n<li><a href=\"https:\/\/people.eecs.berkeley.edu\/~zadeh\/papers\/Fuzzy%20Sets-Information%20and%20Control-1965.pdf\">Original paper<\/a> from Pr. Lofti Zadeh, 1965<\/li>\n<li>Introduction to Fuzzy Logic\u00a0, by\u00a0Franck Dernoncourt (MIT)<\/li>\n<\/ol>\n<div style=\"background: #edebd7; color: brown; font-size: small; width: 100%; padding: 1em 1em 1em 1em; border: 1px solid; border-radius: 5px; box-shadow: 4px 4px 4px gray;\"><em>This article is a very modest tribute to the work of Pr. Zadeh who passed away last month. R.I.P.<\/em><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The recent rise of MEMS and Microsensors have posed a new and interesting problem to designers. Before MEMS, you barely had one temperature sensor, maybe one pressure sensor in your system. Then you would put some code around &#8230; Et Voila ! your device was capable of measuring Temperature and Pressure.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,20],"tags":[42,41],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-architecture","category-embedded","tag-fuzzy-logic","tag-sensor-fusion"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded<\/title>\n<meta name=\"description\" content=\"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded\" \/>\n<meta property=\"og:description\" content=\"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/\" \/>\n<meta property=\"og:site_name\" content=\"Embedded\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-20T11:22:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-29T16:10:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"537\" \/>\n\t<meta property=\"og:image:height\" content=\"248\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kriko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kriko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/\"},\"author\":{\"name\":\"kriko\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/#\\\/schema\\\/person\\\/fcb297f759038f0e8cb969c4c29742df\"},\"headline\":\"Sensor Fusion controller using a Fuzzy Logic approach (intro)\",\"datePublished\":\"2017-11-20T11:22:15+00:00\",\"dateModified\":\"2017-11-29T16:10:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/\"},\"wordCount\":454,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.em-company.fr\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/sensor-fusion-300x139.jpg\",\"keywords\":[\"fuzzy logic\",\"sensor fusion\"],\"articleSection\":[\"architecture\",\"embedded\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/\",\"url\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/\",\"name\":\"Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.em-company.fr\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/sensor-fusion-300x139.jpg\",\"datePublished\":\"2017-11-20T11:22:15+00:00\",\"dateModified\":\"2017-11-29T16:10:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/#\\\/schema\\\/person\\\/fcb297f759038f0e8cb969c4c29742df\"},\"description\":\"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#primaryimage\",\"url\":\"http:\\\/\\\/www.em-company.fr\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/sensor-fusion-300x139.jpg\",\"contentUrl\":\"http:\\\/\\\/www.em-company.fr\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/sensor-fusion-300x139.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/index.php\\\/2017\\\/11\\\/20\\\/sensor-fusion-controller-fuzzy-logic\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sensor Fusion controller using a Fuzzy Logic approach (intro)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/\",\"name\":\"Embedded\",\"description\":\"(...but not only)\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.em-company.fr\\\/blog\\\/#\\\/schema\\\/person\\\/fcb297f759038f0e8cb969c4c29742df\",\"name\":\"kriko\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded","description":"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/","og_locale":"en_US","og_type":"article","og_title":"Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded","og_description":"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained","og_url":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/","og_site_name":"Embedded","article_published_time":"2017-11-20T11:22:15+00:00","article_modified_time":"2017-11-29T16:10:04+00:00","og_image":[{"width":537,"height":248,"url":"https:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion.jpg","type":"image\/jpeg"}],"author":"kriko","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kriko","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#article","isPartOf":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/"},"author":{"name":"kriko","@id":"https:\/\/www.em-company.fr\/blog\/#\/schema\/person\/fcb297f759038f0e8cb969c4c29742df"},"headline":"Sensor Fusion controller using a Fuzzy Logic approach (intro)","datePublished":"2017-11-20T11:22:15+00:00","dateModified":"2017-11-29T16:10:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/"},"wordCount":454,"commentCount":0,"image":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#primaryimage"},"thumbnailUrl":"http:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg","keywords":["fuzzy logic","sensor fusion"],"articleSection":["architecture","embedded"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/","url":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/","name":"Sensor Fusion controller using a Fuzzy Logic approach (intro) - Embedded","isPartOf":{"@id":"https:\/\/www.em-company.fr\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#primaryimage"},"image":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#primaryimage"},"thumbnailUrl":"http:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg","datePublished":"2017-11-20T11:22:15+00:00","dateModified":"2017-11-29T16:10:04+00:00","author":{"@id":"https:\/\/www.em-company.fr\/blog\/#\/schema\/person\/fcb297f759038f0e8cb969c4c29742df"},"description":"Description of a fuzzy logic approach for implementing a sensor fusion controller. Based on a real case and with the design assumptions explained","breadcrumb":{"@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#primaryimage","url":"http:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg","contentUrl":"http:\/\/www.em-company.fr\/blog\/wp-content\/uploads\/2017\/11\/sensor-fusion-300x139.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.em-company.fr\/blog\/index.php\/2017\/11\/20\/sensor-fusion-controller-fuzzy-logic\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.em-company.fr\/blog\/"},{"@type":"ListItem","position":2,"name":"Sensor Fusion controller using a Fuzzy Logic approach (intro)"}]},{"@type":"WebSite","@id":"https:\/\/www.em-company.fr\/blog\/#website","url":"https:\/\/www.em-company.fr\/blog\/","name":"Embedded","description":"(...but not only)","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.em-company.fr\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.em-company.fr\/blog\/#\/schema\/person\/fcb297f759038f0e8cb969c4c29742df","name":"kriko"}]}},"_links":{"self":[{"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":11,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.em-company.fr\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}