TR25's Active Aerodynamics in Action (First Test)
TR25's Active Aerodynamics in Action (First Test)
TR25 Active Aero Controlled by Driver Input
In the world of FSAE, aerodynamics are an interesting gauge of a team's level of advancement. Not all cars have aerodynamics packages, and many cars perform well without them, but you can tell a lot about a team by looking at their wings if they have them. Although aerodynamics packages are somewhat common among FSAE teams, active aero is a much rarer sight. This refers to when the car's wings are able to change their angle of attack while the car is driving. I can only recall two teams at 2024 competition with active wings, and one of those teams basically had their rear wing explode during their autocross run. Needless to say, these systems are very complicated to set up, with a combination of clever mechanical, aerodynamic, and controls design.
For a good number of years, our team at Terps Racing has sought after an active aero system for our car, but we have had little to no promising developments until the 2024-25 season. For this season, our aero team did a fantastic job designing mechanical linkages and simulating the benefits of the system (which we estimate to be 5% fuel savings across an endurance run). When the time came to consider the control method for the system, I volunteered to employ what I have learned as a computer engineer to help develop the software controller for the system. Most of our team is made up of aerospace and mechanical engineers, so I was uniquely qualified to work on the design
Our ambition for the system was to create a fully autonomous active aero system which would be able to adjust the wing angles automatically without the driver thinking about it. The few teams who have active aerodynamics often just use a simple DRS (drag reduction system) button that the driver has to activate, but in our analysis we found that the decrease in the driver's focus resulting from needing to hold down the button offset any lap time benefit that the system would deliver.
We wanted to use a machine learning model to determine what the wings should do, as the front and rear wings can adjust their angles independently so the car's balance can be adjusted by different combinations of front and rear angles, but in the short term we settled for an automatic advanced DRS system. For this system, I chose to design a finite state machine (FSM) to determine what the wings should be doing at any given time, as the machine could be designed to be simple with easily adjustable state transitions. It also meant that the servos controlling the wings only needed to be addressed whenever the state changed, which is preferable as the servos are quite noisy and draw a decent bit of power whenever their position is updated.
I started by defining three states: High Downforce, Low Drag, and Medium Downforce, and their corresponding state transitions. I made the decisions for the state transitions through discussions with our aerodynamics team, and selected the sensor values that the machine would depend on based on the need for graceful degradation (i.e. if a sensor fails, will the machine still behave safely). After defining the state transitions, we coded the machine in Arduino C (as the RP2040 which controls the servos is able to be easily programmed using the Arduino IDE). The code itself consisted of reading CAN values from our data unit's CAN bus, a next state function to calculate what the machine should do, and then an update state function to update the state and move the servos correspondingly.
After writing the shell of the next state function, I copied its structure into MATLAB in order to simulate what the machine would do using real car data. By doing this I was able to debug any mistakes in the state transition logic, and manually fine tune the transition parameters until they behaved exactly as we wanted them.
With a base set of parameters determined, I set up the data unit's CAN bus to send the necessary sensor values to the controller, and made sure that the RP2040 was receiving them correctly. Then it was time to test the system on the real car and do some further fine tuning of the parameters based on data and driver feedback.
MATLAB Plot of Speed (MPH) vs Time (Samples at 50Hz), Demonstrating FSM Behavior Over an Autocross Run.
Light Blue = High Downforce (cornering/braking)
Blue = Medium Downforce (trail braking/coasting)
Pink= Low Drag (straight line acceleration)
Highlighted MATLAB Plot Showing the System's Responsiveness. It Reacts and Corrects for a 200ms Snap of Power Oversteer.
MATLAB Plot of Longitudinal Acceleration vs Speed, Showing the System's Behavior Under Braking (Positive X) and Acceleration (Negative X)
When testing the software implementation on the hardware, we noticed a few small quirks relating to our choice of servos. The system is controlled by 3 digital servos which are PWM controlled, meaning that they make a decent bit of noise and draw a decent bit of power (approx. 1A at 8.4V) at idle due to constant self-centering. Any misalignment in the mechanical setup would amplify this issue as the servos would see increased physical resistance while trying to self center.
To correct for this, we implemented a measure in the software that would detach the servos if they weren't addressed for a certain duration of time (i.e. no state transitions occur). Detaching the servos stops the PWM signal they receive, causing them to remain at their last position. This has an immediate and noticeable impact on the amount of noise that the system produces, and it reduces the idle power consumption and heat generation of the servos as well. The delay before detaching the servos ensures that they are not detached too early, and it also allows the servos to remain attached for a short duration in case they need to make multiple position changes quickly.
In our testing, detaching the servos had minimal impact in terms of system responsiveness.
Active Aero System Late Night Onboard Testing Footage
Post-Season Testing Offboard
The first goal with testing the system was to verify that it behaved the same in reality as it did in the MATLAB simulation. To do this, we set up cameras watching the car's wings, and drove a test course to observe and record the behavior of the system. We could then visually verify that the system worked the way we wanted, and we could also cross-reference the footage with the data put through the MATLAB simulation to confirm its accuracy.
The first test went well from a behavior perspective, as the system seemed to do exactly what the simulation predicted it to do. This was a big day for the team as it was crazy to see such a cool and advanced system working on the car for real (again, our team had been dreaming of an active aero system for quite a while). The only big issue from our first test was the system power consumption, as we were attempting to run it off of our DAQ's sensor power supply. The active system worked fine, but with the sacrifice of making our data unit (and consequently the car's dashboard) quite unhappy. After seeing this, we decided to give the board it's own power supply cabling directly from the battery via a cig-lighter port, as we already had a 2 port one in the car powering the dashboard (1 open port available to use). We also set up a software power saving measure by detaching the servos after a short duration when they were not being told to move, which eliminated the power draw from their self-centering.
As testing continued, we eventually decided that we wanted to simplify the finite state machine to only 2 states: high downforce and low drag. The third "medium" state was originally included to provide room for the implementation of balance shifting, but due to time constraints we were unable to verify a setup for this that would actually benefit the car's performance. This also tied in with the implementation of the aero sensitivity knob, which biased the system to select the low downforce state more or less often.
With some more testing and refinements of the system, we were ready to bring it to competition to show it off to other teams and the judges.
During competition, the system was the envy of many of the other teams and garnered some serious attention from event sponsors as well. it also won some serious acclaim from the design judges, who commented that our car had the outright best aerodynamics package at the competition. We even won second place for the Cummins Innovation award for the system, as we explained how it helped us reduce drag and save fuel.
The system also proved reasonably reliable during competition as well, as it functioned correctly throughout the course of the entire endurance event.
For TR26, the main refinements we wanted to make to the system had to do with the CAN bus integration and data. Our goals were to re-write the CAN protocol to work in harmony with the new dashboard system which shares several of the same CAN values, and to make better use of new sensors that we had access to (in particular a much better steering angle sensor). We also wanted to add support for adjustable aero balance, where the driver could set a desired aero bias using a knob on the dashboard. This knob would replace the aero sensitivity knob as that served its purpose during testing. The aero bias would be achieved by adjusting the min/max angles that the system would move to based on the knob position, which would remove some downforce on that axle and shift the balance. For many competition scenarios, you would simply want the maximum or minimum wing angles at any given time, but this adjustment adds flexibility for different track configurations (we take the car to more events than just the main FSAE event, and some have much more open track designs where sacrificing some total downforce for the sake of balance would make more sense).
From Terps Racing's Instagram Submission for the Cummins Innovation Award. The post gained over 8k likes and 50k+ views within a week.
Active aero dynamically changing wing angles during the endurance event.
My teammate and I receiving the 2nd place trophy for the Cummins Innovation Award on stage during the awards ceremony.