{"id":8213,"date":"2022-07-26T14:51:07","date_gmt":"2022-07-26T18:51:07","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=8213"},"modified":"2022-07-26T16:28:45","modified_gmt":"2022-07-26T20:28:45","slug":"sae-autodrive-ii-y1-mathworks-simulation-challenge-winners","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2022\/07\/26\/sae-autodrive-ii-y1-mathworks-simulation-challenge-winners\/","title":{"rendered":"SAE AutoDrive II \u2013 Y1 MathWorks Simulation Challenge Winners"},"content":{"rendered":"<div class=\"rtcContent\">\n<p><em><span class=\"TextRun SCXW147064252 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW147064252 BCX8\" data-ccp-parastyle=\"paragraph\">In this blog, <a href=\"https:\/\/www.linkedin.com\/in\/akshra-narasimhan-ramakrishnan-7b6845136\">Akshra<\/a> will showcase the 1<\/span><\/span><span class=\"TextRun SCXW147064252 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun Superscript SCXW147064252 BCX8\" data-fontsize=\"11\" data-ccp-parastyle=\"paragraph\">st<\/span><\/span><span class=\"TextRun SCXW147064252 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW147064252 BCX8\" data-ccp-parastyle=\"paragraph\"> and 3<\/span><\/span><span class=\"TextRun SCXW147064252 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun Superscript SCXW147064252 BCX8\" data-fontsize=\"11\" data-ccp-parastyle=\"paragraph\">rd<\/span><\/span><span class=\"TextRun SCXW147064252 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW147064252 BCX8\" data-ccp-parastyle=\"paragraph\"> place winners of the MathWorks Simulation Challenge award for the SAE AutoDrive II Year 1 competition, and how they used MATLAB and Simulink to <\/span><span class=\"NormalTextRun SCXW147064252 BCX8\" data-ccp-parastyle=\"paragraph\">model their systems.<\/span><\/span><span class=\"EOP SCXW147064252 BCX8\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/em><\/p>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Introduction<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><a href=\"https:\/\/www.sae.org\/attend\/student-events\/autodrive-challenge-series2\/\"><span style=\"text-decoration: underline;\">SAE AutoDrive II <\/span><\/a>is a 4-year collegiate design competition, with 10 teams from U.S and Canada participating. The high-level technical goal for the end of this competition is to navigate an urban driving course in an automated driving mode as described by SAE Level 4. Each year MathWorks challenges teams to use Simulation via a MathWorks Simulation Challenge year-end presentation.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Simulation in an important tool to have in your system development toolkit. For automated driving systems, testing fusion, planning, and controls algorithms require the use of a multitude of test scenarios. These test scenarios can range from a straight road test to an edge case test for an Automatic Emergency Braking algorithm. Simulation provides a safe and robust environment to design, test, and validate your systems.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This blog will briefly cover the 1st and 3rd place winners of the 2022 Challenge (University of Toronto and The Ohio State University), their system design, and how they used MathWorks tools to help achieve overall competition objectives. The teams were judged based on how they used the tools to perform the following tasks in simulation:<\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: 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;\">Simulate waypoint following<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Simulate traffic signals and signs interactions<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Simulate collision avoidance<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Test generated code with simulation<\/li>\n<\/ul>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">University of Toronto (aUTornoto)<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The <a href=\"https:\/\/www.autodrive.utoronto.ca\/\"><span style=\"text-decoration: underline;\">aUToronto<\/span><\/a> won 1st place in the AutoDrive II Y1 MathWorks Simulation Challenge.<\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">System Requirements and Metrics<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team began with defining their high-level functional system requirements and baseline scenarios to test them.<\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: 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;\">System shall generate and follow waypoints that lead to a given goal position<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">System shall obey traffic sign and light rules<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">System shall avoid obstacles on the road<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">These requirements were then broken into planning and controls requirements. Some of them include:<\/div>\n<ul style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: 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;\">Planner shall mark as occupied all cells containing obstacles and avoid them<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Planner shall assign zero speed at any stop sign and stop light<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Controller shall generate a speed profile and command vehicle torque to achieve it<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Once the system requirements and tests were written, the team had to define metrics that would evaluate performance across scenarios. Some of these metrics are summarized in Table 1. These metrics were mapped to the three tasks of waypoint following, lights and signs interactions, and obstacle avoidance. Acceleration and jerk metrics were also considered in order to quantify passenger comfort performance.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 285px; height: 248px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_1.png\" alt=\"Tabble1.PNG\" width=\"285\" height=\"248\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Table 1<\/span><span style=\"font-style: italic;\">: System Metrics (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">aUToronto)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Software Architecture<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team\u2019s software architecture had two key features:<\/div>\n<ol style=\"margin: 10px 0px 20px; padding-left: 0px; font-family: 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;\">Modularity \u2013 Models and functions were developed separately and connected using Simulink linked subsystems\/reference subsystems. When you add a masked library block or a Subsystem block from a library to a Simulink model, a referenced instance of the library block is created. Such referenced instance of a library block contains link or path to the parent library block. The link or path allows the linked block to update when the library block is updated.<\/li>\n<li style=\"margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;\">Model-Based Design Workflow \u2013 This workflow begins with a V diagram (Figure 1) containing requirements, design, implementation, then integration and testing. System-level and subsystem-level design, implementation, and unit tests make a successful implementation of the <a href=\"https:\/\/www.mathworks.com\/help\/simulink\/gs\/model-based-design.html\"><span style=\"text-decoration: underline;\">model-based design workflow<\/span><\/a>.<\/li>\n<\/ol>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 632px; height: 392px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_2.png\" alt=\"fig1.png\" width=\"632\" height=\"392\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 1<\/span><span style=\"font-style: italic;\">: V Diagram for Model-Based Design Workflow<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team\u2019s system was split into simulator, planning, and controls modules. Figure 2 shows the connected Simulink blocks for the three modules.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 683px; height: 186px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_3.png\" alt=\"fig2.PNG\" width=\"683\" height=\"186\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 2<\/span><span style=\"font-style: italic;\">: High-Level Code Architecture in Simulink (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">aUToronto)<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The simulator module models vehicle dynamics and scenario generation, and outputs vehicle states and road actors. The planning module computes optimal global route and local waypoints, and outputs reference waypoints. The Controls module preprocesses these waypoints and performs feedback control, and outputs actuator commands<\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Planning Module<\/h4>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team evaluated 5 different planning algorithms across weighted criteria of solution optimality, dynamic feasibility, processing time, and collision avoidance. A Pugh matrix was constructed (figure 3) in order to select a global route planner and a local waypoint planner. The A* algorithm scored the highest for path optimality, hence was chosen as the global planner. The Hybrid A* algorithm scored top points for path smoothness, hence was chosen as the local planner.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 438px; height: 376px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_4.png\" alt=\"fig3.PNG\" width=\"438\" height=\"376\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 3<\/span><span style=\"font-style: italic;\">: Pugh Matrix for Planner (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">aUToronto)<\/span><\/div>\n<h4 style=\"margin: 10px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;\">Controls Module<\/h4>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team evaluated 6 algorithms across weighted criteria of disturbance rejection, tracking error, constraint enforcement, and computation time. 2 Pugh matrices were created in order to select lateral and longitudinal controllers. The Model Predictive Controller was chosen for both. First, frame transforms to local inertial and vehicle body fixed frames were performed, then waypoint resampling was done to interpolate the planning path. Velocity scheduling was done to create a smooth velocity profile for the planned path. The MPC\u2019s output is fed through a PI controller to reject model mismatch errors. Finally feedforward actuator mapping is performed. These processes are shown in Figure 4.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 642px; height: 292px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_5.png\" alt=\"fig4.PNG\" width=\"642\" height=\"292\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 4<\/span><span style=\"font-style: italic;\">: Control Design (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">aUToronto)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Simulation Results<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team tested their system in 3 scenarios \u2013 waypoint following, obstacle avoidance, and signals and signs interactions. All simulation results were obtained in Simulink with the help of ROS2 bridges. Performance plots were generated for all (Figure 5) and simulation insights were obtained.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Waypoint following \u2013 Speed and lateral position errors met the requirement. However, state error performance had to be traded off in order to meet team drive quality metrics.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Obstacle avoidance \u2013 The minimum distance to obstacle exceeded requirements. However, horizon length had to be traded off in order to reduce computation cost.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Signals and signs \u2013 The vehicle was able to exceed the maximum stopping distance requirement. However, planning and control horizon had to be increased to meet braking distance requirements.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 665px; height: 196px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_6.png\" alt=\"fig5.PNG\" width=\"665\" height=\"196\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 5<\/span><span style=\"font-style: italic;\">: Simulation Performance Plots (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">aUToronto)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Challenges and Solutions<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team faced a few challenges along the way. One of these challenges was planner-control synchronization issues. The main causes for this were ROS2 asynchronous communication issues, algorithm latency, and distance between waypoints. The team solved this by building a waypoint resampler that could interpolate\/extend paths as needed and guarantee control feasibility. Another challenge was the planner\u2019s path feasibility while reducing computation speed for scenarios involving corners. The team expanded their error handling and time-out functionalities to handle this issue.<\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">The Ohio State University (Buckeye AutoDrive)<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The <a href=\"https:\/\/car.osu.edu\/buckeye-autodrive\"><span style=\"text-decoration: underline;\">Buckeye AutoDrive<\/span><\/a> team won 3rd place in the AutoDrive II Y1 Simulation Challenge.<\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">System Architecture<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team developed Simulink models that performed controls, path planning, perception and decision-making tasks. The path planner took velocity feedback as input from the controllers and output path information. The controllers took information from the decision-making logic and perception blocks, and output torque, brake, and steering commands to the vehicle dynamics block, which then sent ego vehicle information to the scenario ground truth block.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" width=\"842\" height=\"411\" class=\"aligncenter size-full wp-image-8396\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/fig6-new.png\" alt=\"\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 6<\/span><span style=\"font-style: italic;\">: Overall System (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">Buckeye AutoDrive)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Waypoint Following Using Controllers<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team performed the task of waypoint following by using the <a href=\"https:\/\/www.mathworks.com\/videos\/vehicle-path-tracking-using-stanley-controller-1628159837296.html\"><span style=\"text-decoration: underline;\">Stanley<\/span><\/a> and ACC controllers for longitudinal, and Stanley and Pure pursuit for lateral control (figure 7).<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 720px; height: 421px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_8.png\" alt=\"fig7.png\" width=\"720\" height=\"421\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 7<\/span><span style=\"font-style: italic;\">: Controllers for Waypoint Following (<\/span><span style=\"font-style: italic;\">\u00a9<\/span><span style=\"font-style: italic;\">Buckeye AutoDrive)<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The longitudinal Stanley controller takes in reference velocity and current ego vehicle velocity, and outputs longitudinal acceleration and deceleration commands. These outputs are then converted to torque and brake commands to be sent to the Vehicle Dynamics block.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The lateral Stanley and Pure pursuit controllers output steering commands which are fed to the Vehicle Dynamics block as steering wheel angle. Parameters such as yaw rate feedback gain, steering angle feedback gain, position gain, lookahead distance, and vehicle set speed were tuned and set by the team. Figure 8 compares lateral heading angle plots for the chosen controllers.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 408px; height: 360px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_9.png\" alt=\"fig8.PNG\" width=\"408\" height=\"360\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 8<\/span><span style=\"font-style: italic;\">: Heading Angle Plots Comparisons (\u00a9Buckeye AutoDrive)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Signals and Signs Interactions<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team fused radar and camera sensor data using the <a href=\"https:\/\/www.mathworks.com\/help\/driving\/ref\/multiobjecttracker.html\"><span style=\"text-decoration: underline;\">Multi Object Tracker block<\/span><\/a>. The decision-making Simulink model contains Stateflow logic that makes decisions for collision avoidance and emergency states to intervene when necessary. The collision avoidance logic is as follows: if an object was detected with X m, the model switches to ACC. If a technical failure was detected, the vehicle went o the Emergency state, where if an object was detected within x m, brake is directly accessed. Figure 9 shows the navigation logic for multiple scenes. The state is chosen based on Scene IDs.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 780px; height: 439px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_10.png\" alt=\"fig 9.png\" width=\"780\" height=\"439\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 9<\/span><span style=\"font-style: italic;\">: Navigation Logic (\u00a9Buckeye AutoDrive)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Collision Avoidance<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Adaptive Cruise Control (ACC) was switched on when objects were detected within 25m of the ego vehicle. ACC parameters such as default spacing, prediction horizon, acceleration range, sample time, and maximum velocity were set. Time gap was modified based on the detected scene. Figure 10 shows the ACC system.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 646px; height: 237px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_11.png\" alt=\"fig10.PNG\" width=\"646\" height=\"237\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 10<\/span><span style=\"font-style: italic;\">: ACC System (\u00a9Buckeye AutoDrive)<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Figure 11 shows lead and ego vehicle velocities, and relative and safe distance results when time gap was set to 1. The ego vehicle never exceeded set velocity.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 605px; height: 531px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_12.png\" alt=\"fig11.PNG\" width=\"605\" height=\"531\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 11<\/span><span style=\"font-style: italic;\">: Collision Avoidance Results (\u00a9Buckeye AutoDrive)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Automatic Code Generation and SIL Testing<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team generated code using Embedded Coder. More information about Embedded Coder can be found <a href=\"https:\/\/www.mathworks.com\/products\/embedded-coder.html\"><span style=\"text-decoration: underline;\">here<\/span><\/a>. The <a href=\"https:\/\/www.mathworks.com\/products\/simulink-coverage.html\"><span style=\"text-decoration: underline;\">Simulink Coverage<\/span><\/a> App was used to visualize model coverage status, link requirements, and create test cases. This <a href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2022\/07\/12\/requirements-verification-and-validation-for-an-autonomous-driving-scenario\/\"><span style=\"text-decoration: underline;\">Student Lounge blog<\/span><\/a> shows how to write and link requirements to blocks, and verify and validate these requirements using test cases. Metrics such as overall average and maximum CPU utilization, and average and maximum execution times were evaluated. The system passed all the team set execution time and code coverage metrics.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team also performed Model-in-the-loop (MIL) and Software-in-the-loop (SIL) for their system. MIL and SIL results were compared using the SIL\/PIL Manager App. The <a href=\"https:\/\/www.mathworks.com\/help\/ecoder\/ug\/verification-workflow-with-silpil-manager.html\"><span style=\"text-decoration: underline;\">SIL\/PIL Manager<\/span><\/a> is an app that provides a simplified workflow for verifying generated code. The model was first simulated in normal mode, then in SIL mode. The results from the two were compared. They were nearly identical. Figure 12 shows these results in Simulink Data Inspector.<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: middle; width: 644px; height: 420px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_13.png\" alt=\"fig12.PNG\" width=\"644\" height=\"420\" \/><\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 12<\/span><span style=\"font-style: italic;\">: MIL and SIL Comparison Results (\u00a9Buckeye AutoDrive)<\/span><\/div>\n<h3 style=\"margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Challenges and Solutions<\/h3>\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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The team faced a few challenges along the way, mainly in code generation. They noticed a sampling time mismatch between different subsystems, Usage of transition blocks in order to get a uniformed sample rate fixed this problem. The team also replaced their switch block with a saturation block to solve mismatch of velocity and direction inputs to their controller block. Lower velocity values were causing the simulations to slow down. The team put a lower velocity limit of 0.001m\/s to solve this problem.<\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Conclusion<\/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; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">In summary, the winning teams of the AutoDrive II Y1 MathWorks Simulation Challenge used MATLAB and Simulink to design, test, and validate their planning and controls systems. University of Toronto\u2019s team performed automated testing of their system-level requirements, and used Pugh matrices to evaluate multiple planners and controllers. The Ohio State University\u2019s team switched between operation modes for navigation using Stateflow, and compared system performance in SIL and MIL.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2022\/07\/July-26_5.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>\nIn this blog, Akshra will showcase the 1st and 3rd place winners of the MathWorks Simulation Challenge award for the SAE AutoDrive II Year 1 competition, and how they used MATLAB and Simulink to&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2022\/07\/26\/sae-autodrive-ii-y1-mathworks-simulation-challenge-winners\/\">read more >><\/a><\/p>\n","protected":false},"author":183,"featured_media":8372,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6,8,13],"tags":[291,70,385],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/8213"}],"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=8213"}],"version-history":[{"count":22,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/8213\/revisions"}],"predecessor-version":[{"id":8576,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/8213\/revisions\/8576"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/8372"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=8213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=8213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=8213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}