{"id":2983,"date":"2019-06-05T09:36:36","date_gmt":"2019-06-05T07:36:36","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=2983"},"modified":"2025-11-10T18:33:24","modified_gmt":"2025-11-10T23:33:24","slug":"fitness-trackers-stem-challenge","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2019\/06\/05\/fitness-trackers-stem-challenge\/","title":{"rendered":"High School Students Create Fitness Trackers for MATLAB STEM Challenge"},"content":{"rendered":"<p>This week our guest blogger <a href=\"https:\/\/www.linkedin.com\/in\/josenicolasavendano\/\">Jose Avendano<\/a> is back to talk to us about the <a href=\"https:\/\/i2learning.org\/stem-week\/matlab\">MATLAB STEM Challenge<\/a> which concluded recently. In this challenge students from Franklin and Needham high schools created fitness trackers using MATLAB.<\/p>\n<h1>MATLAB STEM Challenge<\/h1>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-13239 size-full\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/Picture1.png\" alt=\"\" width=\"405\" height=\"240\" \/><\/p>\n<p>As part of the student competitions team at MathWorks, we are involved with many different programming challenges. The <a href=\"https:\/\/i2learning.org\/stem-week\/matlab\">MATLAB STEM Challenge<\/a> is particularly special because of the final problem presented to high school students. This competition was held in partnership with <a href=\"https:\/\/i2learning.org\/\">I2 Learning<\/a> as part of the <a href=\"https:\/\/www.massstemweek.org\/\">MASS STEM Week<\/a> program. Contestants of the challenge were tasked to use <a href=\"https:\/\/www.mathworks.com\/products\/matlab-online.html\">MATLAB Online<\/a> and <a href=\"https:\/\/www.mathworks.com\/products\/matlab-mobile.html\">MATLAB Mobile<\/a> to create a fitness tracker algorithm and implement it on data acquired by themselves. The algorithm was meant to process raw activity data coming from motion sensors and give the user useful information such as that presented in commercial devices like steps taken, distance traveled, calories burnt, etc.<\/p>\n<p>To get started with the MATLAB language, they completed the first stage of the competition by finishing our <a href=\"https:\/\/learntocode.mathworks.com\/\">Learn to Code<\/a> series of online tutorials. This interactive online tutorial got the participants familiar with MATLAB syntax, which equipped them to process motion data from different sensors to extract meaningful health metrics. On the second stage of the challenge the students\u2019 creativity became crucial. Given a set of motion readings, which health metrics were important? Which sensors should be used? Are there any readily available algorithms that can be explored? The basic architecture would look something like the image below.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-13241 size-full\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/Picture2.png\" alt=\"\" width=\"437\" height=\"307\" \/><\/p>\n<p>Given minimal guidance we left all the important decisions to the students. This way participants could be as creative as possible developing their algorithms. All that remained for the students to start coding their fitness tracking models was easily acquiring the movement data from a person.<\/p>\n<h1>How to Record Movement Data?<\/h1>\n<p>This question is important since the participants of this challenge may not have access to data collection hardware. There was however an experimental platform we could count on that most participants could have access to. Without realizing it, most people already carry a complete suite of motion sensors like GPS, accelerometers and gyroscopes in their pockets; their phones! <a href=\"https:\/\/www.mathworks.com\/products\/matlab-mobile.html\">MATLAB Mobile<\/a> supports logging the sensors from both Android and Apple devices.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"682\" height=\"510\" class=\"aligncenter size-full wp-image-13242\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/picture-3.png\" alt=\"\" \/><\/p>\n<p>With some simple instructions the participants could access data from accelerometers, gyroscopes, GPS, and some other sensors that were already present in their phones using the <a href=\"https:\/\/www.mathworks.com\/products\/matlab-mobile.html\">MATLAB Mobile App<\/a>. Most importantly all this information could be logged at various sampling rates and directly imported into MATLAB.<\/p>\n<h1>The Winners \u2013 Franklin High School &#8220;Team 1&#8221;<\/h1>\n<p>The participants had several months research and implement algorithms to calculate a variety of health metrics. The winner of the challenge was a team from <a href=\"https:\/\/www.franklinps.net\/fhs\">Franklin High School<\/a> in Massachusetts. They implemented the full suite of sensor readings available to calculate steps, distance traveled, calories burned, and flights of stairs climbed. These metrics are on par with commercial fitness trackers! We were absolutely impressed. In the image below, you can see the layout of their implementation which explains how the information from the user and sensors is merged to come up with the actionable and personalized health statistics.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-13245 size-full\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/Picture4.png\" alt=\"\" width=\"624\" height=\"283\" \/><\/p>\n<p>The students then worked their way through coding the different components of their complete project. The team experimented with several filtering algorithms to smooth their data before processing and had to program different techniques like correlating walking speed to energy to derive useful insights like the calories burned and distance traveled. As you can see below, they documented all this procedure and analyzed the data using several MATLAB plots for things like filtered acceleration and their walking speed vs metabolic equivalent regression. These plots helped them differentiate the approaches that\u00a0worked well from those that did not.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"624\" height=\"217\" class=\"aligncenter size-full wp-image-13243\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/Picture5.png\" alt=\"\" \/><\/p>\n<p>This team also went above and beyond by comparing the amount of calories burned to the caloric equivalent of common types of food. This meant you could immediately know whether or not your exercise session was enough to account for your last meal. Whether it was according to the winners \u201cone apricot\u201d, \u201ca Burger King Tripple Whopper\u201d, or \u201c more than a giant bowl of pasta!\u201d<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-13244 size-full\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/06\/Picture6.png\" alt=\"\" width=\"326\" height=\"166\" \/><\/p>\n<p>The finalists for the MATLAB STEM Challenge were invited to visit the MathWorks headquarters in Natick Massachusetts. The teams spent the day presenting their projects, receiving awards, learning about careers in technology and interacting with MathWorks engineers. If you are interested in developing similar applications, make sure to check out our support for <a href=\"https:\/\/www.mathworks.com\/help\/matlabmobile\/index.html\">IOS<\/a> and <a href=\"https:\/\/www.mathworks.com\/help\/matlabmobile_android\/index.html\">Android<\/a> devices. We are looking forward to seeing what you can develop using these tools!<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/05\/Fitness_Model-e1559161099271.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>This week our guest blogger Jose Avendano is back to talk to us about the MATLAB STEM Challenge which concluded recently. In this challenge students from Franklin and Needham high schools created&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2019\/06\/05\/fitness-trackers-stem-challenge\/\">read more >><\/a><\/p>\n","protected":false},"author":151,"featured_media":2987,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[52,6,10,13],"tags":[84,281,88,279],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2983"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/users\/151"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=2983"}],"version-history":[{"count":9,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2983\/revisions"}],"predecessor-version":[{"id":13246,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2983\/revisions\/13246"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/2987"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=2983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=2983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=2983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}