{"id":13112,"date":"2025-10-06T14:09:06","date_gmt":"2025-10-06T18:09:06","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=13112"},"modified":"2025-10-06T14:09:06","modified_gmt":"2025-10-06T18:09:06","slug":"autoronto-simulation-suite-v2x-messaging-and-emergency-vehicle-yielding","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2025\/10\/06\/autoronto-simulation-suite-v2x-messaging-and-emergency-vehicle-yielding\/","title":{"rendered":"aUToronto Simulation Suite: V2X Messaging and Emergency Vehicle Yielding"},"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: left;\"><\/div>\n<h2 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;\">Today we are joined by guest bloggers Yijie Wang and Sarah Xu from the University of Toronto\u2019s SAE AutoDrive team.<\/span><\/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;\"><\/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;\"><a href=\"https:\/\/www.autodrive.utoronto.ca\/\"><span style=\"text-decoration: underline;\">aUToronto<\/span><\/a> is the University of Toronto&#8217;s self-driving car team, bringing home multiple awards in the <a href=\"https:\/\/www.sae.org\/attend\/student-events\/autodrive-challenge-series2\"><span style=\"text-decoration: underline;\">AutoDrive Challenge II<\/span><\/a>, including first place in the Year 4 Competition&#8217;s MathWorks Simulation Challenge. This blog post aims to showcase how aUToronto&#8217;s Simulation team creatively applies MathWorks tools to simulate V2X messaging and uses the modeled message to test behavior when yielding to an emergency vehicle. Integral to the team&#8217;s success is the versatility of MathWorks tools, connecting message emulation to vehicle dynamics simulations. We\u2019ll describe the motivation behind the team&#8217;s work, our methodology, and results. Happy reading!<\/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;\">Motivation<\/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;\">Simulation is crucial to development because it provides a safe, cost-effective, and scalable way to test complex traffic scenarios that may be challenging to replicate in the real world. The Simulation team at aUToronto builds a comprehensive set of tools to support developers in rapidly prototyping and validating algorithms, prioritizing safety as we strive towards a real-world Level 4 autonomous vehicle.<\/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 work on V2X messaging and emergency vehicle yielding was undertaken as part of the MathWorks Simulation Challenge. While the challenge provided the initial framework, our goal extended beyond simply completing it. We aimed to develop solutions with relevance to real-world autonomous driving and Level 4 autonomy, where safely detecting and yielding to emergency vehicles is critical. A modern solution is to rely on V2X (Vehicle-to-Everything) communication, which allows vehicles to exchange information wirelessly with other vehicles and infrastructure. We saw it as an opportunity to enhance our simulation toolbox and support emergency vehicle behaviour testing in a virtual environment.<\/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;\">To achieve this, we not only focused on emulating V2X messages to test our planning algorithm, but also challenged ourselves to follow a model-based design approach, aligning with MathWorks&#8217; emphasis on industry best practices. With MathWorks simulation toolboxes, we can model network communications, prototype V2X algorithms, and evaluate planning performance across different scenarios.<\/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;\">Methodology<\/h2>\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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Simulation Pipeline<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Following a model-based design approach allowed us to structure the system, simulate behaviour, and validate planning output responses in a systematic and repeatable way. The emergency vehicle testing framework is structured around modular components that represent the key elements of in-vehicle communication. An overview of the system is shown in *Figure 1* below:<\/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: 991px; height: 351px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_1.png\" alt=\"\" width=\"991\" height=\"351\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 1. Overall system architecture<\/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;\">We started by designing RoadRunner scenarios that simulated an ego vehicle and an emergency vehicle. Using scenario construction and modification tools, the team modified parameters and simulated various scenarios to ensure comprehensive testing. Examples of scenarios are included in *Figure 2*.<\/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: 571px; height: 321px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_2.gif\" alt=\"\" width=\"571\" height=\"321\" \/><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 569px; height: 320px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_3.gif\" alt=\"\" width=\"569\" height=\"320\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 2. Scenarios modelled, including speed and scenario variations<\/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;\">Then, we modelled a V2X message emulator in Simulink, as shown in *Figure 3*. As per the SAE J2735 standard, vehicle position and velocity information were used to populate an Emergency Vehicle Alert (EVA) message. We ensured our simulation ran production-level software by packaging the messages as Ethernet frames and injecting them into our system. By using the Simulink Real-Time \/ IP toolbox, we were able to send data at different layers of the network protocol, such as raw Ethernet and User Datagram Protocol (UDP).<\/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: 1048px; height: 425px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_4.png\" alt=\"\" width=\"1048\" height=\"425\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 3. EVA message simulation<\/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;\">Through the use of a Terminal Access Point (TAP) interface, we mimicked the behaviour of an on-board unit (OBU) in the vehicle. The next step of the pipeline was to communicate with dynamic components of our team&#8217;s software stack, which includes the UDP monitor node, V2X decoder, and the planner. These components are tested within our simulation system to ensure fidelity before they are implemented on our actual vehicle, the GM Chevrolet Bolt EUV.<\/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;\">To close the simulation loop, we connected the V2X pipeline with aUToBridge, our customized vehicle dynamics model that includes a framework inspired by the <a href=\"https:\/\/www.mathworks.com\/help\/driving\/ug\/trajectory-follower-with-roadrunner-scenario.html#:~:text=The%20trajectory%20follower%20gets%20the,to%20support%20relative%20target%20speed\">MathWorks Trajectory Follower<\/a> example. aUToBridge facilitates communication between the team&#8217;s planning\/control algorithms and RoadRunner, updating various vehicle parameters such as position and velocity in simulation.<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Fault Injection and Failure Modeling<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">To further bridge the gap with real-world behaviour, we modelled V2X communication failures. Specifically, we emulated packet loss and out-of-order packets, which was done easily thanks to Simulink&#8217;s SimEvents toolbox. The various tools provided allowed us to visualize messages, events, and entities, giving us finer control over fault injection. From *Figure 4*, we were able to plot the number of lost packets during the simulation; the periods of plateau indicate no packet losses occurring. From *Figure 5*, we can visualize the order of packets sent, thus confirming that out-of-order packets were simulated correctly. The packets were transmitted through a first-in-first-out (FIFO) queue in Simulink. In the Sequence Viewer, we can observe that packet number 3 was briefly delayed before passing through the FIFO queue, as highlighted by the yellow arrows. Meanwhile, the subsequent packets were published normally, simulating the out-of-order packet delivery.<\/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: 881px; height: 346px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_5.png\" alt=\"\" width=\"881\" height=\"346\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 4. Packet loss modeling and visualization<\/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: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 790px; height: 299px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_6.png\" alt=\"\" width=\"790\" height=\"299\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 5. Out-of-order packet modeling and Sequence Viewer visualization<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Sim-to-Real Evaluation<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our team was also interested in evaluating the sim-to-real gap to understand the reliability of our simulation-based assessments. To achieve this, we collected real-world data from our vehicle as it drove along the same route modeled in simulation (*Figure 6*). This data was then used to represent the emergency vehicle information, which was injected back into the simulation in place of a simulated emergency vehicle, to observe the planner&#8217;s behavior and assess the sim-to-real gap. Comparison results are shown below in the results and validation section.<\/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: 637px; height: 312px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_7.png\" alt=\"\" width=\"637\" height=\"312\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 6. The same route was used in simulation and real life<\/span><\/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;\">Validation and Results<\/h2>\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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Planner Improvements<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Owing to our simulation system, we were able to improve the planner through multiple iterations. Our updated planner demonstrated noticeable improvements in yielding to emergency vehicles, leading to a smoother and safer maneuver (*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, 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: 698px; height: 392px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_8.gif\" alt=\"\" width=\"698\" 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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 7. Four iterations of planner improvements<\/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;\">Simulation plays a crucial role in validation of systems through its repeatability and its ability to cover wide breadth of scenarios. We used this to our advantage to validate the performance of our planner by evaluating against a set of predefined metrics in our designed scenarios (*Figure 8*). These metrics included the minimum distance maintained between the emergency vehicle (EV) and the ego vehicle during yielding, the overall time required to complete the maneuver, and the duration of idle time introduced. Together, these measures allowed us to quantify both the safety and efficiency of the planner&#8217;s behavior. The following results present the measurements from the final version of the planner. Out of 20 trials, only one failed the maneuver, corresponding to a 95% success rate. The relative distance to the emergency vehicle was safe at 28 m, the stopping time was about 40s, and the idle time was about 15s. Our simulation pipeline provided insights into the reliability of our 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, 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: 634px; height: 168px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_9.png\" alt=\"\" width=\"634\" height=\"168\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 8: Collected measurements of the planner<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Fault Injection 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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We also stress-tested the planner under V2X communication failure scenarios and visualized the resulting behavior, as shown in *Figure 9* below.<\/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: 648px; height: 365px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_10.gif\" alt=\"\" width=\"648\" height=\"365\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 9. Visualization of behaviour under communication failures<\/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;\">By applying the same planner metrics, we were able to quantify its performance under challenging conditions, as seen in *Figure 10*. The numbers were averaged across multiple trials. The results showed that communication disruptions such as packet loss and out-of-order packets had only a marginal effect on our system&#8217;s overall performance. The yielding distance to the emergency vehicle remained consistent across all cases, varying by less than 2m. Maneuver times were also stable with only minor fluctuations, and idle time stayed close to 10s in all scenarios. This suggested that our dynamic components and current strategies to handle failure situations were sufficiently robust to tolerate minor communication failures without compromising to safety or efficiency.<\/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: 684px; height: 193px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_11.png\" alt=\"\" width=\"684\" height=\"193\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 10. Comparison of planner metrics under normal conditions and communication failure scenarios<\/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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;\">Sim-to-Real 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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Finally, to complete our discussion on simulation results, we also visualized our vehicle&#8217;s behaviour in simulation and real life. Through *Figure 11*, it is clearly observed that the emergency vehicle motion was more uneven and jerky using real-world data as compared to simulated data.<\/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: 572px; height: 321px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_12.gif\" alt=\"\" width=\"572\" height=\"321\" \/><\/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;\"><span style=\"font-style: italic;\">Figure 11. Vehicle behaviour with real-world versus simulated data<\/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;\">Using the metrics, we can see that the distance to EV and idle time of the ego vehicle were about the same using simulated data and real-world data playback (*Figure 12*). The main discrepancy was maneuver time, with execution against real-world data playback being slower. This highlights areas where the simulation might have simplified the vehicle dynamics of the EV and suggests areas of further improvement.<\/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: 669px; height: 196px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_13.png\" alt=\"\" width=\"669\" 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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><span style=\"font-style: italic;\">Figure 12. Comparison of planner metrics with real-world and simulated data<\/span><\/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;\">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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We hope that you, as the reader, learned as much as we did about MathWorks tools, V2X messaging and failures, and simulation integration. Through this challenge, we developed skills in designing meaningful scenarios, emphasizing breadth and variety to stress test our 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, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our team spent countless hours researching and understanding the SAE standards, the workings of Ethernet protocols, and the TAP interface, to ensure simulated behaviour was realistic and generated value and understanding. Putting our creativity to the test, we considered potential failures in a V2X communication network that could compromise the safety of all road users. We then assessed the viability of our algorithms in such situations. In tandem, we applied engineering design principles to define metrics for results validation. It was also crucial for our team to learn how to bridge the gaps between different systems, from the Roadrunner interface to our planning and controls algorithm, and to our vehicle simulator in Simulink. On the same note, we really enjoyed learning about Simulink&#8217;s Ethernet blocks and exploring their capabilities. In fact, as we wrapped up our work on this challenge, we realized how valuable extended support for Ethernet protocols in Simulink would be. We&#8217;d love to see more examples of 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;\">We are eager to incorporate our work into the Year 5 challenge, not only our Ethernet simulations, but also the knowledge gained about the engineering design process, failure modalities, and scenario design. Finally, the entire Simulation team would like to thank our fantastic MathWorks mentors, Seo-Wook and Akshra, whose invaluable guidance and insights were crucial to our success.<\/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","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2025\/10\/25Oct6_1.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>Today we are joined by guest bloggers Yijie Wang and Sarah Xu from the University of Toronto\u2019s SAE AutoDrive team.<\/p>\n<p>aUToronto is the University of Toronto&#8217;s self-driving car team, bringing&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2025\/10\/06\/autoronto-simulation-suite-v2x-messaging-and-emergency-vehicle-yielding\/\">read more >><\/a><\/p>\n","protected":false},"author":183,"featured_media":13070,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,8],"tags":[289,782,779],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13112"}],"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=13112"}],"version-history":[{"count":6,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13112\/revisions"}],"predecessor-version":[{"id":13130,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/13112\/revisions\/13130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/13070"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=13112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=13112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=13112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}