A vehicle model was developed for the simulation of vehicle driving. The equations of motion were set up based on the D'Alembert's principle. The control outputs are the steering vehicle angle, the throttle opening and the brake position. Embankment rollover and drive over a ramp were simulated. The controller uses the longitudinal and lateral acceleration and angular velocity data. An other control loop compensates crosswind, which occurs typically on highways. The controller measures the lateral acceleration and the yaw-rate of the vehicle. The dynamic headlamp leveling system guarantees a good sight in darkness. The controller uses the dynamic pitch angle of the vehicle. For the semi-autonomous driving a trajectory planning based on the Bezier-splines was performed. The real-time simulation was performed hardware-in-the-loop using the simulation environment FASIM_C++.