{"id":5700,"date":"2021-05-19T21:56:53","date_gmt":"2021-05-19T19:56:53","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=5700"},"modified":"2021-05-19T21:58:28","modified_gmt":"2021-05-19T19:58:28","slug":"roll-center-calculator-app-with-matlab-app-designer","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2021\/05\/19\/roll-center-calculator-app-with-matlab-app-designer\/","title":{"rendered":"Roll Center Calculator App with MATLAB App Designer"},"content":{"rendered":"<p>Nice to meet you, I am Nobu the technical lead for \u00a0Formula SAE Japan.<\/p>\n<p>The other day, I created an app for Formula Student teams that automatically calculates the position of the roll center using MATLAB&#8217;s App Designer. This app enables teams to modify the code and change the algorithm.<\/p>\n<p>Below I explain the details and would like to hear your feedback on this app and how you might use it.<\/p>\n<h2><strong>What is the Roll Center<\/strong><\/h2>\n<p>The roll center is the point of the center (virtual moment) when the object rotates. So why is the roll center so important? For example, a car has a center of gravity. However, the farther the center of gravity and the height of the roll center are, the easier it is for the car to lose balance. Therefore, the car body may turn over when trying to turn a curve. Therefore, it is important to know the exact position of the roll center and adjust the position of the roll center so that the car does not lose its balance.<\/p>\n<h2><strong>How is the roll center determined?<\/strong><\/h2>\n<p>There is a mechanism called a suspension that connects the car body and wheels, and the position of the roll center is determined by how the suspension is attached.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1920\" height=\"1080\" class=\"aligncenter size-full wp-image-5702\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/1.gif\" alt=\"\" \/><\/p>\n<h2><strong>What you can do with the MATLAB Roll Center App<\/strong><\/h2>\n<p>If you enter the necessary information in this roll center app, the position of the roll center will be calculated automatically and displayed in 3D.<\/p>\n<h2><strong>How to download the roll center app<\/strong><\/h2>\n<ol>\n<li>Click the link shown below<\/li>\n<li>Click the download button in the upper right corner<\/li>\n<li>Unzip the Zip file and open the rollCenterCalculator file in the folder<\/li>\n<\/ol>\n<p>Link: <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/85999-roll-center-calculator?s_tid=srchtitle&amp;fbclid=IwAR1hgPffSShjoBom-D_h4zFvTl6q8JzQFMbryNEZX5CdVY8ISK8lpcydo7Y\">Roll Center App<\/a><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1920\" height=\"1080\" class=\"aligncenter size-full wp-image-5706\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/3.gif\" alt=\"\" \/><\/p>\n<h2><strong>Inputs<\/strong><\/h2>\n<p>There are two main types of information that you need to enter in the app.<\/p>\n<ul>\n<li>First, information about a vehicle body<\/li>\n<li>Second, information about the mounting position of the suspension<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"567\" height=\"306\" class=\"aligncenter size-full wp-image-5708\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/4.png\" alt=\"\" \/><\/p>\n<h2><strong>Information about the vehicle body<\/strong><\/h2>\n<p>Each parameter is shown in the picture below.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1355\" height=\"950\" class=\"aligncenter size-full wp-image-5710\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/5.png\" alt=\"\" \/><\/p>\n<h2><strong>Suspension mounting position<\/strong><\/h2>\n<p>Since the double wishbone suspension is used this time, the mounting points are divided into upper and lower parts, with 2 points on the vehicle body side and 1 point on the wheel side.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1801\" height=\"1003\" class=\"aligncenter size-full wp-image-5712\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/6.png\" alt=\"\" \/><\/p>\n<h2><strong>Outputs<\/strong><\/h2>\n<ul>\n<li>Instantaneous Center (IC): Parameters required in the process of calculating the roll center (instant center)<\/li>\n<li>Roll Center (RC): Roll Center<\/li>\n<li>Distance between RC and CG: Difference between the roll center and the height of the center of gravity<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1171\" height=\"933\" class=\"aligncenter size-full wp-image-5714\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/7.png\" alt=\"\" \/><\/p>\n<h2><strong>How to Customize App<\/strong><\/h2>\n<ol>\n<li>Click rollCenterCalculator.mlapp in MATLAB<\/li>\n<li>Click CodeView<\/li>\n<li>Code to customize<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1280\" height=\"720\" class=\"aligncenter size-full wp-image-5716\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/05\/8.gif\" alt=\"\" \/><\/p>\n<h2><strong>Afterword<\/strong><\/h2>\n<p>The above is a brief overview of the app and how to use it, but this app is static so that even beginners can easily understand it. There are many things you can add or customize the app with <a href=\"https:\/\/www.mathworks.com\/products\/matlab\/app-designer.html\">MATLAB App Designer<\/a>, such as increasing the parameters to make it more dynamic by changing the calculation algorithm inside or changing the display format to make it easier for others to see. Thank you.<\/p>\n<p>There are useful resources for automotive competition.\u00a0Please check the link below<\/p>\n<ul>\n<li><a href=\"https:\/\/www.youtube.com\/playlist?list=PLn8PRpmsu08oBSjfGe8WIMN-2_rwWFSgr\">How-to videos<\/a> (5 minutes short video)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2021\/05\/2.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>Nice to meet you, I am Nobu the technical lead for \u00a0Formula SAE Japan.<br \/>\nThe other day, I created an app for Formula Student teams that automatically calculates the position of the roll center using&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2021\/05\/19\/roll-center-calculator-app-with-matlab-app-designer\/\">read more >><\/a><\/p>\n","protected":false},"author":174,"featured_media":5704,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[502,504,88,506,500,56],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5700"}],"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\/174"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=5700"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5700\/revisions"}],"predecessor-version":[{"id":5720,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5700\/revisions\/5720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/5704"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=5700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=5700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=5700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}