# Vehicle Lateral Control Based on Augmented Lagrangian DDPG Algorithm
## 5 Simulation Studies  
### Simulation Platform and Model Verification  
The vehicle trajectory tracking control algorithm is validated using a co-simulation platform, which consists of three main components: CarSim 2020 (Mechanical Simulation Corporation, Ann Arbor, MI, USA), Simulink R2021b (The MathWorks, Inc., Natick, MA, USA), and Python 3.7. The system architecture incorporates CarSim as a high-fidelity vehicle dynamics solver, embedded into the Simulink environment through S-Function interface, providing multi-degree-of-freedom vehicle models and real-time state feedback, the simulation process in the CarSim software is shown in the Figure 3(a). Notably, a dedicated 6-DOF vehicle dynamics model is implemented in Simulink, serving as the primary plant model during deep reinforcement learning training phases. This parallel modeling approach enables comparative validation between the Simulink-based dynamics model and CarSim's S-Function module, which share similar functional capabilities in providing real-time vehicle state feedback while differing in model fidelity and computational efficiency. The Simulink platform serves as the control framework, implementing signal routing, data preprocessing, and actuator command conversion. The co-simulation strategy employs the Simulink-built 6-DOF model for algorithm training iterations due to its computational efficiency, while reserving the higher-fidelity CarSim S-Function module for final validation stages. Figure 3(b) illustrates integrated simulation framework combining Python-based intelligent decision-making with MATLAB/Simulink-CarSim vehicle dynamics modeling. The Python agent, implemented through PyTorch's deep reinforcement learning toolkit, interfaces with MATLAB via the MatlabEngine package to exchange control actions (wheel_angle) and synchronization signals (pause_flag, pause_time) at 100 Hz frequency. The Simulink environment processes these inputs through a CarSim vehicle model, return  
Figure 4: Vehicle system simulation frameworks and processes. ing observation states, reward signals, constraint costs, and episode termination flags via shared memory buffers. Tight temporal synchronization (10 ms timestep) is maintained through event-driven pausing mechanisms, enabling deterministic co-simulation while preserving the fidelity of both control computations and vehicle dynamics simulations. This hierarchical modeling architecture ensures both training efficiency through Simulink's real-time simulation capabilities and validation credibility via CarSim's professional vehicle dynamics solver. The Simulink simulation diagram is given as shown in Figure 4c, which includes five main parts. Act module is the strategy actions obtained through reinforcement learning algorithm training; Carsim Model is a high-fidelity simulation software joint simulation module; Dynamics Model is a vehicle dynamics simulation module built in Simulink; Reward module calculates the reward, cost, done, obs and other values of the current environment according to the state obtained in Carsim Model or Dynamics Model; Assertion module is used to control the state communication between Python and Simulink during reinforcement learning training. Our experimental framework establishes the following environmental assumptions: The simulation assumes dry asphalt road conditions with friction coefficient \(\mu=0.85\), excluding terrain irregularities and elevation changes. Vehicle localization integrates LiDAR, vision sensors, and odometry measurements rather than GPS positioning, reflecting modern autonomous system architectures. Environmental disturbances including wind effects and electromagnetic interference are excluded from consideration. The control system implements 10 ms actuation latency while maintaining 1 ms time resolution in the Simulink-CarSim co-simulation environment to ensure dynamic fidelity.