{"id":31,"date":"2008-09-30T23:00:29","date_gmt":"2008-10-01T04:00:29","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/2008\/09\/30\/challenge-metronome-synchronization\/"},"modified":"2019-08-15T08:56:18","modified_gmt":"2019-08-15T13:56:18","slug":"challenge-metronome-synchronization","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2008\/09\/30\/challenge-metronome-synchronization\/","title":{"rendered":"Challenge: Metronome Synchronization"},"content":{"rendered":"<p>My good friend <a href=\"https:\/\/blogs.mathworks.com\/videos\/\">Doug<\/a>, formerly of <a\r\nhref=\"https:\/\/blogs.mathworks.com\/pick\/\">Pick of the Week<\/a> fame, sent me an\r\ne-mail last week with the subject \u201cModel this.\u201d\u00a0 The message contained nothing\r\nmore than a link to a\r\nvideo.\u00a0 Doug started a new <a href=\"https:\/\/blogs.mathworks.com\/videos\/\">video\r\nblog<\/a>, and for this reason, I have decided to incorporate some video into\r\nthis post.<\/p>\r\n\r\n<p>\r\n<iframe loading=\"lazy\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/W1TMZASCR-I?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\r\n<p>\r\n\r\n<p><strong>What is happening?<\/strong><\/p>\r\n\r\n<p>The video shows five metronomes sitting on a board, and when\r\nthey start, the timing is initially out of phase.\u00a0 The board is placed on top\r\nof empty soda cans on their side, allowing the board to slide back and forth\r\nwith very little friction.\u00a0 The board couples the dynamics of the metronomes\r\nand, in time, their phases synchronize.\u00a0 The synchronization of periodic\r\nsystems is a fascinating concept, and fun to watch.\u00a0 This effect was first\r\nobserved by <a href=\"http:\/\/en.wikipedia.org\/wiki\/Christiaan_Huygens\">Huygens<\/a>\r\nin the 17th century. You can find many related videos on YouTube, like this <a\r\nhref=\"http:\/\/www.youtube.com\/watch?v=yysnkY4WHyM\">presentation of metronomes\r\nwith different frequencies<\/a> and this <a\r\nhref=\"http:\/\/www.youtube.com\/watch?v=RMVxVbCIPjg\">experiment with five\r\nmetronomes<\/a>.<\/p>\r\n\r\n<p><strong>The Challenge<\/strong><\/p>\r\n\r\n<p>In honor of <a href=\"https:\/\/blogs.mathworks.com\/videos\/\">Doug\u2019s latest venture<\/a>, here is a challenge:<br>\r\n    <em>Can you model this in Simulink?<\/em><br>\r\n        You can take many different approaches in modeling\r\nthis system.\u00a0 I hope to see implementations using base blocks as well as\r\nSimMechanics.<\/p>\r\n\r\n<p><strong>Hints<\/strong><\/p>\r\n\r\n<p>To get you started, I have built a simple pendulum and cart model.\u00a0\r\nDownload:<\/p>\r\n\r\n<p><a\r\nhref=\"https:\/\/blogs.mathworks.com\/images\/seth\/2008Q4\/metronome.mdl\">metronome.mdl<\/a><br>\r\n<a href=\"https:\/\/blogs.mathworks.com\/images\/seth\/2008Q4\/metronomeAnimation.m\">metronomeAnimation.m<\/a><\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2008Q4\/metronome_model.png\" alt=\"Simulink model of a metronome\"><\/p>\r\n\r\n<p>The solution I have explored only shows synchronization when\r\nthe pendulum angle of deflection is small.\u00a0 I recommend initial deflections of\r\naround pi\/8 or smaller for the angle of the pendulum.<\/p>\r\n\r\n<p>I have even built a \u201cmetronome scope\u201d which will display a\r\ncrude pendulum given the angle of deflection in radians.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2008Q4\/metronomeAnimation.gif\" alt=\"Animation of an inverted pendulum S-function\"><\/p>\r\n\r\n<p><strong>How to submit a solution<\/strong><\/p>\r\n\r\n<p><a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do (link no longer works)\">Post your solution<\/a> by October 15<sup>th<\/sup> to the <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do (link no longer works)\">File\r\n    Exchange<\/a> with the keyword <em>metronome<\/em>.\u00a0 I will give out some prizes like\r\nT-shirts and other stuff I find in the MATLAB Central prize closet.\u00a0 Please\r\npost a comment if you have submitted a model to the file exchange, or if you\r\nhave questions about the challenge.\u00a0 Good luck!<\/p>","protected":false},"excerpt":{"rendered":"<p>My good friend Doug, formerly of Pick of the Week fame, sent me an\r\ne-mail last week with the subject \u201cModel this.\u201d\u00a0 The message contained nothing\r\nmore than a link to a\r\nvideo.\u00a0 Doug started a new... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2008\/09\/30\/challenge-metronome-synchronization\/\">read more >><\/a><\/p>","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[50,30,10],"tags":[52,51,441],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/31"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":9124,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/31\/revisions\/9124"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}