Hardware-in-the-loop (HIL) simulation in the development and test process of vehicle dynamics controllers requires a real-time tractor-trailer simulation model. The hitch coupling must be numerically stable to ensure real-time simulation for various driving maneuvers, particularly at the vehicle's handling limits. This paper presents a robust implementation of tractor-trailer coupling. The equation of motion is formed using a novel formulation which is a combination of Jourdain's Principle and the Articulated Body Algorithm. The paper shows that a robust model for a real-time tractor-trailer simulation can be achieved with the proposed method. Moreover, the approach presented is suitable for modular modeling, is successfully implemented and can also be used as a basis for flexible system definition with an adjustable number of trailer axles.