A 10-speed transmission controller in Simulink and Stateflow
PCM's entry challenge was to write the controller for a 10-speed automatic transmission. We were given the plant, a longitudinal vehicle model with an engine, torque converter and gearbox, plus a system specification. Our controller reads the gear lever, throttle, brake, vehicle speed and engine RPM, then decides the gear, the parking brake and the final throttle.
We wrote the requirements first, built the gear-selector logic as a Stateflow state machine, and verified it with automated tests linked to each requirement. We presented it to the PCM leads at the McMaster Automotive Resource Centre (MARC), and it earned me my spot on the team.
| Park allowed | |v| < 0.1 m/s |
|---|---|
| Parking actuator lock / release | ≤ 100 ms |
| Drive allowed | v > −0.5 m/s |
| Reverse allowed | v < 0.5 m/s |
| Neutral allowed | Any speed |
| Engine speed window | 800 – 7250 RPM |
| 0–60 mph target | < 12 s |
| Throttle override per shift | ≤ 1 s |
| Automated test cases | 15 |
Engine stalled in Reverse
Engaging a gear at idle loads the engine through the torque converter, and RPM fell from 700 to about 250. We added idle throttle control at low RPM and tuned its threshold from 700 up to 1000 RPM.
Feedback wired to the wrong inputs
Speed, RPM and power were feeding the wrong controller ports. Our controller-only tests skipped the top-level wiring, so they never caught it. Lesson: test the whole system, not just the unit.
Tests that couldn't fail
Some test assessments had their timing backwards or no tolerance. I corrected them, added a 10–20 ms timing buffer, and cleaned up the requirement IDs and wording.
My part: reviewed the model integration and found the swapped feedback wiring, fixed the test assessments and requirement wording, and prepared our presentation.



