{"id":13441,"date":"2026-05-18T08:30:46","date_gmt":"2026-05-18T12:30:46","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=13441"},"modified":"2026-05-18T08:32:15","modified_gmt":"2026-05-18T12:32:15","slug":"bringing-db-15-to-life-with-model-based-design","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2026\/05\/18\/bringing-db-15-to-life-with-model-based-design\/","title":{"rendered":"Bringing DB-15 to Life with Model-Based Design"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\">For this week\u2019s blog post, we invited the DuBois Area Robotics team to share their journey and how they used MATLAB and Simulink for the 2025 <\/span><a href=\"https:\/\/bestrobotics.org\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-style: italic;\">BEST Robotics<\/span><\/a><span style=\"font-style: italic;\"> Championship. MathWorks is immensely proud of their achievements, and we hope you also find their insights useful! With that, I\u2019ll hand it over to them.<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 25px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Who We Are: DuBois Area Robotics<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We are DuBois Area Robotics, a public high school robotics club based in western-central Pennsylvania. We have been competing in BEST Robotics since 2011 and VEX Robotics since 2019.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">For BEST Robotics, we often include a few students from neighboring districts. One of the aspects of BEST that keeps us returning is its company-style structure, which requires us to integrate marketing, engineering, and design into a unified team effort. We also enjoy the challenge of building a competitive robot using only common materials that can be found in a typical hardware store.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 487px; height: 383px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_1.png\" alt=\"\" width=\"487\" height=\"383\" \/><\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\"><span style=\"font-weight: bold;\">Kneeling (L to R)<\/span>: Aubree Evans (CEO, Lead Driver), Aiden Via (Marketing Head)<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\"><span style=\"font-weight: bold;\">Standing (L to R, both rows)<\/span>: Ken Evans (coach), Marissa Gilga (Lead Exhibit), Mason Keller, Nic Evans, Derrick Weber (Lead Builder), Bela Keller (Lead Programmer), Peyton Walker (Lead Notebook), Paul McCloskey, Jen Keith (coach), Jack Stringer<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\"><span style=\"font-weight: bold;\">Not Pictured<\/span>: Molly Sensor, Nolen Murray<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 823px; height: 290px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_2.png\" alt=\"\" width=\"823\" height=\"290\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2><\/h2>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 25px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Our Robot: [DB-15]<\/h2>\n<p>&nbsp;<\/p>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 654px; height: 201px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_3.png\" alt=\"\" width=\"654\" height=\"201\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This year\u2019s game,<a href=\"https:\/\/www.youtube.com\/watch?v=Fe7yaAlJ6aQ\" target=\"_blank\" rel=\"noopener\"> <span style=\"text-decoration: underline;\">Factoids<\/span><\/a>, was built around the concept of training an AI system. The major tasks were to connect a neural network and then train it with valid information, \u201ctrue factoids\u201d. Towards this end, we designed DB-15 to quickly connect the network and passively collect a large amount of factoids, autonomously sorting the true and false factoids.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">DB-15 measures 23\u201d \u00d7 23.5\u201d \u00d7 23.75\u201d and weighs 24.00 lbs, and is built around five main subsystems that operate under both autonomous and driver control. Its wide wheelbase and large wheels were chosen to improve stability when climbing the ramp and navigating the field.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-weight: bold;\">Factoid Collection &amp; Transport<\/span><\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The robot collects factoids through an intake on the back.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Simply driving over factoids funnels them into the intake and then to the Archimedes screw in the center of the robot.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The Archimedes screw transports both true and false factoids up into the sorting mechanism.<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-weight: bold;\">Sorting Mechanism<\/span><\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">An infrared sensor and a limit switch are used to differentiate between the factoids.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The IR sensor first detects if there is a factoid in the sorting system.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The limit switch acts as a pressure plate (the true factoids are heavier and will trigger the switch).<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">True factoids are stored in a magazine until the driver is ready to score.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">False factoids are dropped into a storage box (\u201cfake news\u201d box) to prevent recollecting factoids that have already been sorted.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">At the end of the match, the arm can open the fake news box.<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-weight: bold;\">Arm &amp; Scoring System<\/span><\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The arm was geared for torque to control a heavy tray that can carry all five neural network tiles at once.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The tray is hinged in the middle so it can fold to remain size compliant.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The tray is connected to the arm using 3D-printed team custom parts that serve as a latch, end effector, and release trigger for an arm extension.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Two neodymium magnets on the underside of the arm allow passive collection of true \u201cWall Street\u201d factoids while actively retrieving a \u201cLibrary of Content\u201d factoid.<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 745px; height: 766px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_4.png\" alt=\"\" width=\"745\" height=\"766\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 745px; height: 519px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_5.png\" alt=\"\" width=\"745\" height=\"519\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 747px; height: 675px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_6.png\" alt=\"\" width=\"747\" height=\"675\" \/><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 25px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Our Design Process<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We began by breaking down the game rules and fully understanding the scoring system. From there, we evaluated the difficulty of each task to develop a realistic strategy, focusing on areas where technical and programming solutions could provide an advantage. Once our strategy was defined, we created a list of core robot systems and their required functions and attributes.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Normally, we divide systems among small groups for parallel brainstorming, but due to our smaller team size, the entire design team worked through each system sequentially. Individual members then took ownership of specific ideas. Competing designs were evaluated collaboratively and integrated into the final robot design. Throughout the process, we consistently looked for opportunities where software could improve or simplify mechanical solutions.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We chose to use Simulink for several reasons:<\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px;\">\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Simulation was valuable given our 8-week build season, where most of our time is spent constructing the robot and there is limited time for on-robot testing.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">It allowed us to develop and test control logic before hardware assembly, reducing the need for extensive debugging later.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">We could simulate controller inputs and observe system behavior, giving us feedback on signal flow and control response.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">The block-based environment made it more intuitive for modeling control systems and state logic than traditional text-based programming.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Many of the systems on our robot are natural matches for Stateflow charts, and when they are not, we still have the option of using custom functions for text coding or manipulating them with other Simulink blocks.<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our team has been using Simulink since 2016 and prioritizes training at least one new member each year to support knowledge transfer. However, each season remains a learning experience, as most new members have limited prior exposure. While online courses and webinars are available, one of our coaches is pretty good with Simulink, and if we forget something, he can help with the basics or suggest an alternative approach.We also do a lot of online searches and look over Simulink videos from other years to learn about other approaches.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Last year, we were fortunate to have a former lead programmer mentor the team. Our current lead programmer is a junior with one year remaining, and we are actively training a younger member to take over in the future. He began in 6th grade, and Simulink\u2019s visual programming environment made it significantly easier for him to learn core concepts early on.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 25px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Our Code Implementation<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This year, we faced an additional challenge as BEST transitioned from the VEX Cortex to the VEX V5 control system. It was a late change, and we had to transition from the existing<a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47666-simulink-coder-support-package-for-arm-cortex-based-vex-microcontroller\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\"> Simulink VEX Cortex <\/span><\/a>support to the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/68649-simulink-coder-support-package-for-vex-edr-v5-robot-brain\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">VEX V5 support package in Simulink<\/span><\/a>, which required some adaptation. The main issue was the new motor controller (MC55) and missing input ports on the controller block (for simulation). As recommended, we used the <a href=\"https:\/\/www.mathworks.com\/help\/rtw\/vexv5\/ref\/smartmotorwrite.html\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">V5 Smart Motor Write block<\/span><\/a> to control the MC55, and after some testing, we were able to achieve consistent and expected motor behavior.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The V5 remote control blocks also did not initially support simulation inputs in our workflow. To enable full system simulation, we temporarily integrated Cortex-based blocks during early testing. While this added an extra step, it pushed us to explore Simulink\u2019s signal routing tools more deeply. We discovered the <a href=\"https:\/\/www.mathworks.com\/help\/simulink\/slref\/variantsource.html\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">variant source block<\/span><\/a>, which was exactly what we needed. We had already been using signal buses to route some control signals, but the variant source block would solve our problem if we put all control signals into the same bus. From there, we addressed all signal routing and also used a bus for output signals. This made our code more manageable and even made adding new systems easier.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our drivetrain has become standardized for our team. We typically use a tank-drive configuration with a speed cut controlled by a button latch. We also implement deadbands and a custom MATLAB function to improve low-speed precision by mapping joystick inputs to motor outputs using a non-linear function. This also compensates for signal loss introduced by the deadband block while preserving full output when needed.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Every other system on our robot is controlled using <a href=\"https:\/\/www.mathworks.com\/products\/stateflow.html\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">Stateflow<\/span><\/a> charts. We define operating modes that the motors and servos need (such as on, off, forward, reverse), then create states and transitions accordingly. Visually seeing each state activate (or not) during simulation is a great troubleshooting tool. We try to locate tunable parameters outside of Stateflow charts as inputs to make them easier to understand and adjust. Our outputs are usually just control signals. If there are other values that need to be passed to other parts of the code, we tend to write them to memory.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">There were a few design issues this year that were either solved or improved through our code. While we developed a low-tech factoid sorter, we found more consistent results with our sensor-based system. Instead of using physical limit switches on the arm, we added a potentiometer and used it to both limit motion and move to predetermined locations. We had also considered using it for PID control, but the arm performed well without it.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">One problem inherent to our intake and Archimedes\u2019 screw system was occasional jamming. While we addressed this mechanically, it wasn\u2019t enough. Drivers could reverse the intake manually, but this took focus away from other tasks and reduced the advantage of passive collection. In previous years, addressing this in code would have been difficult, as the older control system provided no motor feedback, and the MC55 motor controllers do not either. Fortunately, we found and used advanced smart motor read\/write blocks in Simulink and added them to our V5 library. They allowed us to monitor current drawn from the V5 brain by the MC55s. Using Simulink\u2019s <a href=\"https:\/\/www.mathworks.com\/help\/simulink\/supportpkg\/arduino_ug\/remotely-monitoring-and-controlling-an-application-on-hardware.html\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">monitor and tune<\/span><\/a>, we found the threshold that was crossed whenever the motor stalled. With this, the robot could detect jams in real time and automatically clear them without driver input.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 587px; height: 295px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_7.png\" alt=\"\" width=\"587\" height=\"295\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\">Code structure overview<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We included a controller map and port diagram for reference. We also experimented with <a href=\"https:\/\/www.mathworks.com\/help\/simulink\/dashboard.html\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">dashboard displays<\/span><\/a> once we found the solution to them not working with larger Windows displays.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 305px; height: 369px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_8.png\" alt=\"\" width=\"305\" height=\"369\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Variant source and subsystem architecture showing our control and sensor inputs, enabling seamless simulation and hardware deployment.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 677px; height: 473px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_9.png\" alt=\"\" width=\"677\" height=\"473\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This subsystem combines the outputs from the gamepad simulator and our simulated sensor values (linked to the dashboard controls) into a single bus. We descriptively named each channel to make using the bus more intuitive. To avoid errors, we used the same signal names as our V5 control signal bus.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 588px; height: 287px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_10.png\" alt=\"\" width=\"588\" height=\"287\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Here you can see the advanced smart motor read block. Only the first 2 values are actually output when using the MC55. Our signals are pulled from the control bus. This really cleaned up our code and process.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 564px; height: 436px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_11.png\" alt=\"\" width=\"564\" height=\"436\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This is the Stateflow for the intake and Archimedes\u2019 screw. To constantly monitor the system for jamming, we used a parallel Stateflow structure. (Parallel structure essentially allows multitasking.)<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 588px; height: 336px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_12.png\" alt=\"\" width=\"588\" height=\"336\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The arm performed numerous tasks, both autonomously and with driver input. Thus, it required quite a few inputs and parameters. The custom function only sends a true value after a very specific combination of joystick movements is held for a predetermined time.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 588px; height: 387px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_13.png\" alt=\"\" width=\"588\" height=\"387\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This section controls the position of our factoid dispenser ramp. Adjustable values are clearly noted outside of the Stateflow where they can be adjusted. The Stateflow chart automatically moves the ramp from the starting position to the lower scoring position as soon as the intake is started. This prevents driver error as the two positions are hard to discern from across the field<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><strong>Here is our submission to the Simulink Design Award:<\/strong><\/div>\n<div style=\"text-align: center;\"><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/YOFcFvZv4GA?si=i5bJ3JMpJjNbl8Wk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><br \/>\n<\/iframe><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 25px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Highlights from the Denver BEST Regional Championship<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">DuBois Area High School competes at the local Grove City Competition each year. This event qualifies teams for the Regional Championship. We did quite well this year, winning a number of awards and securing our place at regionals.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our regional competition is the Denver BEST Regional, which was held in Wichita, Kansas, this year. There, we faced the top teams from seven other regionals. Our team\u2019s work was recognized with several awards, including 2nd place in the Overall BEST award and winning the Simulink Design Award. We are especially proud of these achievements, as we are one of the few public high schools competing at both our local and regional events. Additionally, our 2025 team was our smallest ever, and each member worked hard to help overcome that challenge.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 838px; height: 295px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/26may18_14.png\" alt=\"\" width=\"838\" height=\"295\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<\/div>\n<p><script type=\"text\/javascript\">var css = ''; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2026\/05\/upload.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>For this week\u2019s blog post, we invited the DuBois Area Robotics team to share their journey and how they used MATLAB and Simulink for the 2025 BEST Robotics Championship. MathWorks is immensely&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2026\/05\/18\/bringing-db-15-to-life-with-model-based-design\/\">read more >><\/a><\/p>\n","protected":false},"author":183,"featured_media":13448,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,8,13],"tags":[94],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13441"}],"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\/183"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=13441"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13441\/revisions"}],"predecessor-version":[{"id":13450,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13441\/revisions\/13450"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/13448"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=13441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=13441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=13441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}