EV Powertrain Cascaded Control
Two nested control loops for an electric powertrain, with a regenerative braking supervisor that sits inside the power path rather than on a dashboard.
- Type
- Control systems
- Stack
- MATLAB, scripted model
- Outer loop
- Speed PID · 0.5 rad/s · 78.7°
- Inner loop
- Torque PI · ~100 Hz · 60°
Why I built it
Regenerative braking is easy to show as a number on a screen and hard to actually put in the loop. I wanted a model where the supervisor’s decision changes the torque before the battery ever sees it, and then to push the whole thing until it degraded, so the controller came with an operating envelope instead of a single good-looking run.
How it works
An outer speed PID (P=702.0, I=156.9) feeds an inner torque PI with anti-windup (P=4.94, I=2518.1). The regen supervisor reads state-of-charge and speed, and its decision multiplies directly into the braking-torque path ahead of the battery. The whole model is built from a script rather than assembled by hand in the GUI, so any result can be reproduced from source.
- 4.03 kmDistance, 180 s cycle
- 114 km/hPeak speed
- 4.433kWh consumed
- 109.97kWh / 100 km
- 25.33%State of charge used
The operating envelope
Doubling the disturbance is a hard test, and the cascade held it. Efficiency moved from 109.97 to 140.29 kWh/100km and range from 4.03 to 3.54 km: roughly a twelve percent loss against a hundred percent overload, with both loops stable throughout and margins intact, 78.7° of phase outside and 60° inside. The controller therefore comes with a stated operating envelope instead of one clean result on one clean cycle, which is the version an engineer can actually plan around.
Tools
- MATLAB
- Simulink
- PID / PI tuning
- Anti-windup
Methods
- Cascaded control design
- Frequency-domain margins
- Drive-cycle simulation
- Disturbance sweep