How Squadra Corse PoliTO Developed Its Formula Student Driverless Vehicle
Today, we’re featuring Squadra Corse PoliTO as they share how they developed and tested their driverless stack, from perception to actuation, using MATLAB and Simulink. Over to you…
1. Who are we?
Squadra Corse PoliTO is a Formula Student team founded in 2004 to train the next generation of engineers through hands-on motorsport experience. Each year, students from Politecnico di Torino design, develop, and manufacture a new prototype race car. They then test it against university teams from around the world in international Formula Student competitions. Fig. 1 shows the race car on track.

Fig. 1 Squadra Corse PoliTO race car on track.
Building a competitive race car requires much more than designing individual components. Every subsystem must work reliably as part of a complex, integrated vehicle, and every design decision can have a direct impact on performance. To make informed decisions, Squadra Corse PoliTO relies on mathematical models and simulations to predict system behavior, evaluate different design solutions, and validate its choices before implementing them on the real car. This combination of theoretical analysis, practical engineering, and continuous testing is fundamental to improving vehicle performance and maximizing our score at competitions.
At the beginning of the 2025–2026 season, we identified a major opportunity to improve our competitiveness: expanding the car’s capabilities beyond conventional manual driving by developing a fully driverless system. This introduced a new set of challenges, requiring us to develop an autonomous driving stack capable of transforming sensor data into accurate vehicle control, from perceiving the environment to actuating the steering and braking systems. Reliability was essential: the car needed to complete every driverless event it entered.
By the end of the season, our car had successfully completed every driverless event it entered, meeting our objective. Modeling, simulation, and validation in MATLAB and Simulink supported the engineering decisions behind this result. These activities helped us reduce uncertainty before testing on the real vehicle.
In this blog post, we will explore how Squadra Corse PoliTO developed its driverless stack, from perception to actuation. We will discuss how we defined our objectives, developed and tested our models, and used the results to compare different approaches and select the most suitable solutions. Along the way, we will examine the main challenges we encountered, how we addressed them, and how our validation process helped us build a reliable autonomous system. Finally, we will look at the improvements we plan to pursue in future iterations of our driverless stack.
2. Why Autonomous?
Developing a driverless race car is a complex task that requires significant investments in time, resources, and budget. For Squadra Corse PoliTO, the decision to undertake this challenge did not come from technology alone, but from a broader analysis of how to improve the team’s competitiveness.
At the beginning of the 2025–2026 season, we used lap-time simulations, risk analysis, and feasibility assessments to compare development opportunities. We weighed potential competition gains against engineering effort, risks, and available resources, identifying a driverless system as one of the most promising ways to increase our scoring potential. Fig. 2 compares the performance potential of these development options.

Fig. 2 Performance comparison of the baseline, car developments, and autonomous development.
However, the benefits extended beyond competition results. Developing an autonomous vehicle offered our members the opportunity to work across a broader range of engineering disciplines, including perception, trajectory planning, vehicle control, and system integration.
The transition from manual to driverless operation introduced a fundamental engineering challenge. In manual driving, a human driver interprets the environment, anticipates the vehicle’s behavior, and continuously adjusts the controls. In driverless operation, these tasks must be performed by a software stack that processes sensor measurements, reconstructs the track, determines a suitable trajectory, and translates it into steering and pedal commands. Each subsystem must perform reliably on its own, but, more importantly, all of them must work together under real-world conditions.
This becomes particularly challenging when the vehicle operates near its performance limits. Errors or delays in perception can affect trajectory planning, while limitations in control or actuation can prevent the vehicle from following the planned path. Consequently, achieving competitive performance requires more than developing individual algorithms: it requires understanding the limitations of the complete system, identifying potential failure modes, and validating its behavior across a range of operating conditions.
Objectives
With these challenges in mind, we established several objectives to guide the development of our first driverless system:
- Achieve competitive performance from the first season. With limited development time and resources, we needed to deliver a system capable of completing driverless events reliably while making the most of the performance available from the vehicle.
- Prioritize reliability and predictable behavior. We needed to identify potential failure modes early, understand the operating limits of each subsystem, and ensure that the complete stack behaved consistently under competition conditions.
- Build a modular and scalable architecture. Rather than developing a solution tailored exclusively to the first competition, we wanted to create a solid foundation that could be extended and improved in subsequent seasons. Clear interfaces between subsystems would allow individual components to evolve without requiring the entire system to be redesigned.
- Make the system understandable and measurable. When an autonomous vehicle fails to follow its intended behavior, identifying the underlying cause can be difficult. We therefore aimed to develop interfaces, diagnostic tools, and logging mechanisms that would help us understand what the system was doing, identify its limitations, and trace errors back to their sources.
- Develop a repeatable validation process. Simulation and testing needed to become an integral part of the development cycle, allowing us to evaluate design choices before implementing them on the real vehicle, reproduce failures, and progressively increase confidence in the complete system.
These objectives guided our development process. We set out to build an autonomous driving system that was competitive, reliable, and well understood, allowing us to continuously improve its performance.
3. From Requirements to the Real Car: Our Model-Based Engineering Methodology
Once we had defined our objectives, the next challenge was turning them into a driverless system that could be developed, tested, and deployed within a single season. We adopted a requirements-driven approach, working backward from the desired vehicle-level performance to identify what each subsystem needed to achieve and which hardware was required to support it.
This process involved both software and hardware requirements. On the software side, we needed a pipeline capable of transforming sensor data into control commands. On the hardware side, every algorithm had to run on suitable computing platforms, communicate with the other subsystems, and operate within the available computational and timing constraints. Actuation required particular attention: generating a steering command in software is not enough if the physical actuator cannot turn the wheels accurately and quickly enough to follow the planned trajectory.
To manage these dependencies, we followed a Model-Based Design workflow. On the development side, we translated our high-level objectives into system requirements, subsystem architectures, mathematical models, and implementable algorithms. On the verification and validation side, we progressively tested whether each component and the integrated system met those requirements. This created a direct connection between every engineering decision and the evidence used to evaluate it.
Modeling Before Deployment
MATLAB and Simulink provided the common environment in which we developed our models, evaluated alternative solutions, and prepared the software for deployment. We tailored the modeling approach to the needs of each subsystem rather than relying on a single simulation model for the entire vehicle. Perception required a realistic representation of the environment and sensor fields of view; state estimation required models of the vehicle’s dynamics; and trajectory generation benefited from reduced-order models that allowed us to evaluate vehicle behavior efficiently.
To investigate the interaction between these components, we connected Simulink to an Unreal Engine virtual environment containing a digital representation of our car and its sensors. By reproducing the vehicle geometry and sensor mounting positions, we could investigate how the virtual sensors perceived the track and how the resulting information affected planning and control. This allowed us to analyze situations that would have been difficult, expensive, or potentially unsafe to reproduce repeatedly with the physical car. Fig. 3 shows the connected simulation workflow.

Fig. 3 Closed-loop simulation linking virtual sensors, perception, planning, control, and the vehicle model.
From Simulation to Hardware
We used four validation stages to bridge simulation and real-vehicle behavior, checking actuator dynamics, software behavior, timing, latency, and integration on the car (Fig. 4).

Fig. 4 Four-stage validation workflow, from steering-actuator prototyping to physical track testing.
Leveraging Agentic AI with MATLAB and Simulink
MATLAB Agentic Toolkit and Simulink Agentic Toolkit supported our pre-implementation checks of model configurations and target-hardware compatibility. These checks helped identify interface discrepancies and architectural issues before code generation. They supported, rather than replaced, engineering review, testing, and validation.
“For instance, while preparing the tracking controller blocks, the toolkit flagged an unsupported dynamic array allocation and an implicit single-to-double precision cast. These constructs ran cleanly in Simulink desktop simulation but conflicted with the target ECU’s static memory allocation and deterministic execution constraints. The findings identified compatibility issues to resolve before code generation; they did not establish that the complete implementation met every target requirement.”
Each stage thus built directly on the evidence collected at the previous one, resolving critical incompatibilities early and minimizing expensive on-vehicle debugging.
This methodology gave us a structured way to manage the complexity of a completely new autonomous system within the constraints of a single season. More importantly, it established a repeatable process for future development: every new algorithm or design improvement could be modeled, tested, and validated before being integrated into the complete driverless stack.
With this methodology in place, we can now examine the system itself, starting with how the car perceives its environment and turns sensor measurements into actuation.
4. Perception: Understanding the Track
The first step toward autonomous driving is enabling the vehicle to understand its surroundings. In our case, the circuit is defined by colored cones, which the car must detect and use to reconstruct the track. This requires a perception system that can extract useful information from onboard sensors while operating within the computational constraints of the vehicle.
We developed and trained our camera-based cone detector using Deep Learning Toolbox, with training images from the FSOCO dataset. Parallel Computing Toolbox supported the computational optimization. The YOLO-based neural network identified cones and their positions in the images. To reduce computational overhead, we concatenated the left and right camera images into one composite input. This let the network process both views in a single inference pass rather than run two independent detections. Figs. 6 and 7 show the simulation interfaces and interconnected model subsystems used to support this pipeline.

Fig. 5 Camera and LiDAR perception pipeline for cone position and color detection.

Fig. 6 Simulation interface with vehicle-pose inputs and camera and point-cloud outputs.

Fig. 7 Perception processing, sensor fusion, and cone separation in the simulation model.
LiDAR provided complementary information for sensor fusion to determine the positions of the cones once their colors had been detected. Fig. 5 illustrates how the camera and LiDAR processing paths are combined.
However, detecting cones accurately is only part of the problem. The perception system must also provide enough information for the car to plan a path under demanding driving conditions.
When the car can no longer see the track
One of our most important findings came when we began testing the system near the vehicle’s handling limits.
During cornering, the direction in which the car points is not necessarily the direction in which it travels. This difference is described by the sideslip angle (β). Fig. 8 illustrates this angle and its relationship to the camera field of view.

Fig. 8 Vehicle sideslip angle and camera field of view relative to the cone-marked track.
As the sideslip angle increases, the vehicle’s body-fixed cameras rotate away from its direction of travel. Consequently, the inner track boundary can move outside the cameras’ field of view, even though the car is still approaching the corner.
Our original planning approach relied on detecting cones on both sides of the vehicle to reconstruct the track centerline. When one boundary became invisible, the available information could suddenly become insufficient to initialize a valid path. This revealed an important limitation: a trajectory that is feasible from a vehicle-dynamics perspective is not useful if the perception system cannot provide the information required to follow it.
Reconstructing the Missing Track Boundary
Rather than adding more sensors, we investigated whether we could reconstruct the missing boundary using the information already available.
We developed a geometric reconstruction algorithm in MATLAB. First, detected cones are paired using a bidirectional nearest-neighbor search. The midpoints between paired cones are then ordered according to a kinematic cost function that favors heading continuity, before being smoothed using a Catmull-Rom spline.
When a detected cone has no corresponding partner on the opposite boundary, the algorithm estimates the position of a virtual cone. This is achieved by projecting the visible cone across the estimated track width, following the local normal to the boundary. In this way, the planner can reconstruct the missing side of the circuit using only the remaining visible observations.
This approach allowed the planning system to continue building a usable track representation even when part of the circuit was no longer visible to the cameras. Fig. 9 compares planner output with and without virtual-cone mirroring.

Fig. 9 Planner output under nominal sideslip and high sideslip, with and without virtual-cone mirroring.
Maintaining a usable track representation when camera observations were incomplete also supported path planning. Fig. 10 shows the flow from cone positions and colors through Delaunay triangulation and path optimization to a local trajectory. Fig. 11 shows the triangulation and midpoint-filtering implementations.

Fig. 10 Path-planning flow from cone observations through Delaunay triangulation and path optimization to a local trajectory.

Fig. 11 Triangulation and midpoint-filtering implementations in the planning model.
What Simulation Revealed
To evaluate the effectiveness of this solution, we used our Software-in-the-Loop environment to progressively increase the vehicle’s sideslip angle and observe how the complete perception and planning pipeline responded.
The results highlighted a particularly important aspect of the original implementation: the perception blackout did not cause a gradual degradation of the planning performance, but rather a sudden failure. By sweeping the sideslip angle, we identified a critical threshold of approximately 11.5°. Beyond this value, the baseline planner could no longer initialize a valid ordered sequence of track midpoints from the vehicle’s position. Consequently, its planning horizon dropped from approximately 20 m to zero, resulting in trajectory divergence.
The introduction of virtual-cone reconstruction significantly changed this behavior. At a sideslip angle of 15°, where the original planner failed completely, the modified algorithm maintained a planning horizon of 19 m. The usable sideslip envelope was consequently extended from approximately 11.5° to more than 24°, without requiring any additional perception hardware.
These results demonstrated that improving the robustness of the autonomous system did not necessarily require better sensors or more computationally demanding detection algorithms. By exploiting the geometry of the circuit and making better use of the available observations, we were able to overcome a significant limitation of the original pipeline.
The impact of this improvement was also visible at vehicle level. When evaluated using our simulated Trackdrive scenario, the reconstructed track boundary resulted in a 3.5-second reduction in lap time compared with the pre-mirroring baseline. This highlighted how solving what initially appeared to be a perception problem could translate into a measurable improvement in overall vehicle performance.
More importantly, this development demonstrated the value of looking at perception and planning as interconnected systems. The objective was not simply to detect as many cones as possible, but to ensure that the autonomous vehicle could maintain a meaningful representation of the track and generate a usable trajectory, even when the available information was incomplete.
5. Planning and State Estimation: From Observations to Decisions
Once the environment has been perceived, the system must determine where the vehicle should drive and understand how the vehicle is actually moving. These tasks are closely connected: planning requires a usable representation of the track, while control depends on knowing the vehicle’s current motion and the forces it can generate.
Reconstructing a path through the circuit
The planning pipeline uses the available cone observations to build a representation of the track and derive its centerline. When both boundaries are visible, the midpoint between corresponding cones provides a natural basis for constructing the path. The reconstruction method described above allows the planner to retain a usable representation when observations become incomplete.
The controller needs a continuous, smooth trajectory, not a collection of disconnected cone detections. We therefore order the midpoints using a kinematic cost function proportional to the distance and angular difference between them. This ordering prevents sudden trajectory jumps and maintains heading continuity. Figs. 12 and 13 show simulated driving views with overlaid trajectory and cone-matching plots.

Fig. 12 Cone-track driving simulation with an overlaid vehicle-trajectory and track-path plot.

Fig. 13 Cone-track driving simulation with an overlaid Delaunay matching plot.
A further simulation view with a triangulation and track-path plot is shown in Fig. 14.

Fig. 14 Simulated vehicle on a cone-marked track with an overlaid Delaunay triangulation and track-path plot.
Testing beyond nominal conditions helped us expose algorithm limitations and guide improvements.
Estimating what the sensors cannot measure directly
A reliable trajectory is only one part of the problem. The vehicle must also understand its own dynamic state.
Some variables that are particularly important for controlling a race car cannot be measured directly with sufficient information from a single onboard sensor. Two examples are the sideslip angle and the available tire-road friction coefficient. Without reliable estimates, the controller may operate using assumptions that no longer describe the vehicle’s actual behavior.
To address this, we developed two extended Kalman filters (EKFs) in Simulink.
The first estimates the vehicle’s sideslip angle (β). It combines information from a kinematic model with a dynamic vehicle model. The kinematic estimate responds quickly to changes but can accumulate integration drift, whereas the dynamic estimator uses a dual-track vehicle model to account for the vehicle’s behavior more explicitly. We combined the two approaches using complementary filtering, balancing transient responsiveness against consistent estimation.
The second EKF estimates the available tire-road friction coefficient (μ) for each wheel. Based on a three-degree-of-freedom vehicle model, it compares predicted tire forces with measured vehicle accelerations and yaw rate. The estimator uses information from the inertial measurement unit, wheel-speed sensors, and steering measurements to infer the grip available at the tires.
These estimates are important because the vehicle’s behavior depends not only on the trajectory it is asked to follow, but also on the conditions under which it must follow it. A controller designed around an assumed constant friction coefficient may demand more lateral tire force than the available grip permits when grip decreases.
We investigated this behavior in simulation by introducing a step change in the friction coefficient from 1.0 to 0.6. The baseline controller, which relied on an incorrect assumption about the available grip, produced excessive steering commands and divergent yaw-rate oscillations. This helped us identify the underlying issue: the controller needed a better understanding of the vehicle’s actual state, rather than simply more aggressive tracking behavior.
By feeding the estimated sideslip and friction information into the control pipeline, we could account for changing vehicle dynamics more effectively.
The state-estimation models were subsequently evaluated during physical track testing by comparing their outputs with independent measurements. This allowed us to assess whether the models developed and tested in simulation remained representative of the real vehicle. Fig. 15 shows onboard track-test footage alongside telemetry and trajectory analysis.

Fig. 15 Onboard track-test footage alongside telemetry and trajectory analysis.
6. Control and Actuation: Turning the Trajectory into Motion
Once the track has been reconstructed and the vehicle state estimated, the final step is to translate the planned trajectory into commands that the physical car can execute.
Our path-tracking controller must minimize the deviation between the actual vehicle trajectory and the planned path while producing actuation commands that remain stable in the presence of imperfect perception and changing vehicle dynamics. Selecting the appropriate control strategy was therefore another decision we approached through modeling and simulation.
Choosing the right path-tracking controller
Initially, we considered the Stanley controller to be the most promising option. By accounting for the vehicle’s heading and lateral deviation from the reference path, it can provide fast convergence under favorable conditions.
However, evaluating a controller only with an ideal trajectory can be misleading. On the real vehicle, the planned path is derived from sensor measurements, and those measurements are affected by detection uncertainty and noise. As a result, the trajectory supplied to the controller can contain small, rapid variations that are not present in an ideal reference.
We therefore compared Stanley and Pure Pursuit in simulation while injecting synthetic variance into the perception pipeline.
Under ideal, noise-free conditions, Stanley showed faster cross-track error convergence. However, its sensitivity to changes in heading and lateral error made it susceptible to high-frequency perception noise. This noise propagated through the control loop, producing aggressive and oscillatory steering commands that could destabilize the vehicle near its handling limits.
Pure Pursuit calculates its steering command from a target point ahead along the planned trajectory. Unlike Stanley, it does not react directly to instantaneous heading and lateral errors in the same way. In our simulations, this look-ahead formulation reduced sensitivity to the small, rapid variations in the perceived path.
The simulation results showed that Pure Pursuit produced smoother steering responses in the presence of perception noise, helping to prevent unstable yaw dynamics. Although Stanley initially appeared more promising, the results under more realistic sensing conditions demonstrated that its nominal tracking advantage did not necessarily translate into better overall behavior.
We therefore selected Pure Pursuit for its greater robustness under the conditions most relevant to our autonomous system.
Making the physical steering system follow the commands
Even the most suitable control algorithm cannot deliver the desired vehicle behavior if the steering actuator cannot reproduce its commands accurately and quickly enough. We therefore treated the actuator as an integral part of the control system rather than as a component that could be assumed to work correctly once connected.
Fig. 16 shows the cockpit view during physical track testing.
Fig. 16 Cockpit view of the vehicle.
Before full-vehicle integration, we used Rapid Control Prototyping to develop and tune a PID steering controller in Simulink. The controller was deployed to the Speedgoat vehicle control unit and interfaced with the actuator over a 1 Mbps CAN bus.
These tests helped us establish that the steering system could respond to the commands generated by the autonomous controller with the required speed and predictability.
Deploying the software on the vehicle
Once the individual algorithms and hardware interfaces had been validated, we transferred the software to the vehicle’s target computing platforms.
The NVIDIA Jetson handled the computationally intensive perception tasks and the cone-reconstruction logic, while the Speedgoat vehicle control unit executed state estimation and control.
“MATLAB and Simulink code generation tools allowed us to deploy the developed algorithms to these platforms without manually rewriting the entire implementation.”
This continuity reduced the gap between the models used during development and the code executed on the vehicle. It also helped us manage computational constraints and integration between subsystems while maintaining a common development workflow.
Ultimately, perception, planning, state estimation, control, and actuation could not be treated as independent engineering problems. A limitation in one subsystem could propagate through the rest of the pipeline, affecting the vehicle’s ability to follow the planned path. By testing these interactions in simulation, validating the steering hardware separately, and progressively integrating the software on the target platforms, we established a more reliable path from individual models to the complete autonomous vehicle.
The result was a development process in which each major design decision was supported by analysis and testing, helping us build a driverless system that was not only functional, but also sufficiently robust to operate in competition.
7. What we learned and what comes next
The clearest lesson from this project was to develop the driverless system as an integrated whole. The subsystems are tightly connected:
- A perception limitation can become a planning failure.
- A planning failure can become a control problem.
- Assumptions about tire grip can affect whether the car follows its intended path.
Closed-loop simulation helped us understand these interactions before they appeared on the real track.
What worked for us
- Virtual-cone reconstruction maintained a usable planned path in challenging simulated corners.
- State estimation helped us account for changing vehicle behavior.
- Comparing Stanley and Pure Pursuit led us to select Pure Pursuit for its robustness under perception noise.
Together, these improvements supported more robust operation and better simulated track performance.
What comes next
We will continue refining perception, mapping, and control while expanding the situations we test before deployment.
For Formula Student teams starting an autonomous project, our advice is simple: build a useful closed-loop simulation early, keep development connected to deployment, and understand how the subsystems influence one another.
See you on the track.


评论
要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。