Vehicle Modeling in Simulink
Published:
Overview
As part of the Driver Assistance Systems course at HTWG Konstanz, I implemented a vehicle model in MATLAB/Simulink based on a Mercedes A180.
The goal was to simulate vehicle dynamics under realistic conditions by modeling physical resistances, drivetrain, and driver behavior.
ā Download MATLAB Script (.m)
ā Download Simulink Model (.slx)
The .m
file provides the initialization parameters for the vehicle model and is executed before running the Simulink simulation.
The model was developed step-by-step in five modules:
- Vehicle parameters (mass, aerodynamics, rolling resistance, gear ratios, etc.)
- Driving resistances (air, rolling, gradient resistance)
- Dynamic equations for velocity and distance
- Powertrain model including engine torque maps and gear losses
- Driver model with PID control and automatic gear shifting via Stateflow
Tools & Environment
- Software: MATLAB R2024b, Simulink
- Toolboxes: Simulink, Stateflow, Control System
- Modeling techniques: block-based modeling, interpolation, subsystem abstraction
- Vehicle reference: Mercedes A180