Vehicle-in-the-loop simulation method and system for automatic driving of commercial vehicle

By deploying differential GNSS/IMU acquisition units on commercial vehicles to obtain pose data and joint angles, and combining them with simulation engines and middleware gateways for processing, the problems of motion reproduction and safety assessment in on-loop testing of commercial articulated vehicles are solved, and a high-confidence testing environment is achieved.

CN121959901APending Publication Date: 2026-05-01ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
Filing Date
2025-12-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing vehicle-in-the-loop testing methods are insufficient to accurately reconstruct the relative motion of commercial articulated vehicles, assess their dynamics and safety, and lack reproducibility and reliability.

Method used

By deploying differential GNSS/IMU acquisition units on the tractor and trailer respectively, the tractor and trailer pose data are acquired, and the joint angles and angular velocities are obtained as the sole pose reference in the simulation world. The relative motion relationship is calculated in combination with the simulation engine, and the timing shaping and protocol mapping are performed through the middleware gateway. The data is then injected into the vehicle controller for safety risk assessment and hierarchical interlocking control.

Benefits of technology

It enables accurate reproduction of the motion of commercial articulated vehicles, improves the safety and reproducibility of the test scenario, ensures the stability of the signal and the reliability of the controller input, and enhances the confidence and safety of the test system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121959901A_ABST
    Figure CN121959901A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-in-the-loop simulation method and system for automatic driving of a commercial vehicle, relates to the technical field of intelligent networked vehicle testing and verification, and can solve the problem that a commercial articulated vehicle is difficult to accurately and reliably evaluate dynamics and safety of the commercial vehicle. Comprising the following steps: acquiring tractor head pose data, trailer pose data, a joint angle and an angular rate, marking timestamps SIMTIME and serial numbers seq for all the data in a unified clock domain, and then outputting the data; then, writing the data into a simulation engine as a unique pose reference of a vehicle in a simulation world, calculating a relative motion relationship between the trailer and a virtual obstacle according to a use case, outputting an object-level target feature or a sensor-level simulation data stream carrying SIMTIME and seq, and performing time sequence shaping and protocol mapping on the object-level target feature or the sensor-level simulation data stream through a transmission link of digital information to obtain a simulation result; after packaging, injecting the data to a vehicle controller through a physical link; and based on this, safety risk joint judgment is performed, and hierarchical interlocking control is driven. The method is used for vehicle-in-the-loop simulation of commercial vehicle automatic driving.
Need to check novelty before this filing date? Find Prior Art

Description

A vehicle-in-the-loop simulation method and system for autonomous driving of commercial vehicles Technical Field

[0001] This invention relates to the field of intelligent connected vehicle testing and verification technology, specifically to a vehicle-in-the-loop simulation method and system for autonomous driving of commercial vehicles. Background Technology

[0002] In the field of autonomous driving, vehicles undergo extensive testing from R&D to final mass production to prove the safety and reliability of the system. Traditional simulation testing (such as MIL, SIL, and HIL) suffers from low test confidence due to short test links and limitations in dynamics and sensor modeling. While open-road real-vehicle testing provides realistic results, it is inefficient, lacks sufficient safety in hazardous scenarios, and is difficult to reproduce. To address these issues, the industry has introduced vehicle-in-the-loop systems, which combine real vehicles with virtual simulation environments to balance test realism with scenario safety and reproducibility.

[0003] Existing vehicle-in-the-loop (VIL) testing typically assumes a single rigid body for passenger vehicles, using a single differential GNSS / IMU to drive the vehicle's attitude and execute test cases in a coupled simulation environment within a closed environment. The transmission of test information and the input of digital information are usually based on object-level / fusion-level / sensor-level data, sent to the controller via physical links such as bus or Ethernet. However, for commercial articulated vehicles, due to their unique articulated structure and dynamic characteristics, existing methods struggle to accurately reconstruct the relative motion between the tractor and trailer, assess unique risks, and ensure test reproducibility and comparability. Summary of the Invention

[0004] To address the problem in existing technologies where VIL (Vehicle-in-the-Loop) testing of commercial articulated vehicles makes it difficult to accurately and reliably assess the dynamics and safety of commercial vehicles, this invention provides a vehicle-in-the-loop simulation method and system for autonomous driving of commercial vehicles. The technical solution is as follows:

[0005] According to a first aspect of the present invention, a vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles is provided, the method comprising the following steps:

[0006] By deploying differential GNSS / IMU acquisition units on the tractor and trailer respectively, the tractor pose data and trailer pose data are acquired, and the joint angle and angular rate between the tractor and the trailer are acquired. The tractor pose data, trailer pose data, joint angle and angular rate are marked with timestamp SIMTIME and sequence number seq in a unified clock domain and then output.

[0007] The tractor head pose data, trailer pose data, joint angle and angular rate are used as the unique pose reference of the vehicle in the simulation world and written into the simulation engine.

[0008] Driven by the unique pose reference, the simulation engine calculates the relative motion relationship between the trailer and the virtual obstacle according to the use case, and outputs object-level target features or sensor-level simulation data streams carrying SIMTIME and seq.

[0009] The middleware gateway performs timing shaping and protocol mapping on the target features or simulation data stream from the simulation engine, shaping them into an isochronous and auditable input stream, and then encapsulates it according to the controller protocol before injecting it into the vehicle controller through the physical link.

[0010] Based on the tractor head pose data, trailer pose data, joint angles and angular velocities, target object information in the simulation environment, and real-time estimated trailer tail sweep envelope information, a joint safety risk assessment is performed, and a hierarchical interlocking control including normal operation, degraded operation, semi-disconnection, and hard disconnection / emergency stop states is driven accordingly; wherein, the trailer tail sweep envelope information is estimated based on the unique pose reference and the geometric models of the tractor and the trailer.

[0011] The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles provided by this invention first acquires the pose data of the tractor and trailer by deploying differential GNSS / IMU acquisition units on the tractor and trailer respectively, and obtains the joint angles and angular velocities between the tractor and trailer. The tractor pose data, trailer pose data, joint angles, and angular velocities are then marked with a timestamp SIMTIME and a sequence number seq in a unified clock domain and output. Next, the tractor pose data, trailer pose data, joint angles, and angular velocities are used as the unique pose reference of the vehicle in the simulation world and written into the simulation engine. Driven by the unique pose reference, the simulation engine calculates the relative motion relationship between the trailer and virtual obstacles according to the use case, and outputs data carrying SIMTIME and seq. The method involves collecting object-level target features or sensor-level simulation data streams from the simulation engine via a middleware gateway. This data streams are then time-series shaped and protocol-mapped into an isochronous, auditable input stream, encapsulated according to the controller protocol, and injected into the vehicle controller via a physical link. Finally, based on the tractor head pose data, trailer pose data, joint angles and angular rates, target information in the simulation environment, and real-time estimated trailer tail sweep envelope information, a joint safety risk assessment is performed. This assessment drives a tiered interlocking control system encompassing normal operation, degraded operation, partial disconnection, and hard disconnection / emergency stop states. The trailer tail sweep envelope information is estimated based on a unique pose reference and the geometric models of the tractor and trailer. This invention solves the problem of accurately reproducing trailer motion using traditional single-anchor-point schemes by synchronously collecting pose data and joint angles of the tractor and trailer to form a unified pose reference for simulation. Time-series shaped signals ensure stability, and the combination of tail sweep estimation and tiered interlocking improves the testing safety and scenario reproduction reliability for commercial vehicle-specific safety risks.

[0012] As a further aspect of the present invention: the method of obtaining the joint angle and angular rate between the tractor and the trailer includes any one or a combination of two of the following:

[0013] Measured by a joint angle sensor; or

[0014] Based on the tractor head pose data and the trailer pose data, an inverse solution calculation is performed in conjunction with the geometric connection relationship between the tractor and the trailer, and the consistency of the results from the two methods is verified.

[0015] This invention provides two methods for acquiring joint angles: direct measurement and geometric inverse kinematics, which can be cross-verified. This approach increases the redundancy of state information acquisition and improves the system's fault tolerance and data reliability when some sensors malfunction.

[0016] As a further aspect of the present invention: the timing shaping of the target feature or simulation data stream from the simulation engine includes at least one of the following operations:

[0017] Buffer shaping: Set a time buffer in the middleware gateway, using SIMTIME of the unified clock domain as a reference, sort and align the data within a preset safe time window, and send it out according to the output beat.

[0018] Adaptive timing: Based on the monitoring results of data processing latency, frame drop rate or downstream feedback status, the output frequency is dynamically adjusted. When instability is detected, the output frequency is reduced, and when stability is detected, it is gradually restored to the target timing.

[0019] Pruning process: When communication bandwidth or controller processing capacity is limited, the target set is prioritized based on the relative relationship between the target and the vehicle or the risk assessment results, and the top N targets with the highest priority are sent first.

[0020] Priority reordering: Adjusting the output order of data or targets based on security relevance;

[0021] Out-of-order suppression / deduplication: Based on the SIMTIME and seq carried by the data, the data is rearranged or deduplicated within the set out-of-order window.

[0022] The method of this invention processes simulation output data through specific operations such as buffer shaping, clock adaptation, and target pruning. This helps to transform nondeterministic data streams into stable, isochronous controller inputs, thereby improving the timing determinism of the entire test system and the repeatability of test results.

[0023] As a further aspect of the present invention: the estimation process of the trailer tail scan envelope information includes:

[0024] In the trailer's own coordinate system, a set of key points representing the outer contour of the rear are defined;

[0025] Using the trailer pose data, the key points are transformed to the world coordinate system to obtain the set of points P(t) on the outer tail at the current moment.

[0026] Set a future time window [t, t+ΔT], and sample multiple future moments t_i within the window at a fixed step size; based on the current vehicle speed, heading and angular rate trends, calculate the trailer prediction pose corresponding to each future moment t_i through a motion prediction model; use each prediction pose to calculate the corresponding future moment tail outer point set P(t_i).

[0027] The outer envelope formed by the union of all future time point sets P(t_i) is determined as the trailer tail sweep envelope;

[0028] Calculate the minimum distance between the trailer tail sweep envelope and the geometric representation of obstacles in the simulation environment.

[0029] This invention estimates the tail sweep envelope by defining key points at the rear of the trailer and combining them with short-term trajectory prediction based on the trailer's motion state. This method can perform forward-looking calculations of the area that the trailer's rear may cover during movement, providing earlier risk assessment for safety interlocking.

[0030] As a further aspect of the present invention: the triggering condition for the hierarchical interlocking control is:

[0031] The conditions for triggering the degraded operation state are: the minimum tail angle-obstacle distance is lower than the first safety threshold and continues for a preset number of frames, or the rate of change of the angular rate exceeds a preset threshold;

[0032] The condition for triggering the semi-disconnected state is: the minimum tail angle-obstacle distance is lower than the second safety threshold;

[0033] The conditions for triggering the hard disconnect / emergency stop state are: the minimum tail angle-obstacle distance is lower than the third safety threshold or a collision is predicted to occur.

[0034] Among them, the first security threshold > the second security threshold > the third security threshold.

[0035] The method of this invention sets graded quantitative trigger thresholds for different interlocking states. This enables the system to take a progressive response, from degrading to emergency stop, based on the level of risk, which helps to maintain the continuity of testing as much as possible while ensuring safety.

[0036] As a further aspect of the present invention: after acquiring the tractor pose data and trailer pose data by differential GNSS / IMU acquisition units respectively deployed on the tractor and trailer, the method further includes:

[0037] Under a unified clock domain, the tractor head pose data and trailer pose data are time-aligned and their numerical consistency is checked, and abnormal states are marked.

[0038] After acquiring the dual-anchor point pose, the method of this invention performs time alignment and numerical consistency checks. This step ensures the synchronization and logical consistency between the tractor and trailer data, improving the overall quality of the pose data used as a simulation benchmark.

[0039] As a further aspect of the present invention, the method further includes:

[0040] Throughout the simulation testing process, all configuration information, status events, and performance metrics are collected and solidified to form a structured chain of evidence and a standardized report containing a preset minimum set of fields, which is used for comparison and auditing of cross-vehicle, cross-trailer, or cross-version tests.

[0041] The method of this invention requires the generation of a structured chain of evidence and a report containing a minimum set of fields throughout the testing process. This enables standardized recording and traceability of the testing process, facilitating comparative testing and result auditing across different vehicles, trailers, or software versions.

[0042] As a further aspect of the present invention: the controller protocol is one of CAN, CAN-FD, Ethernet SOME-IP, UDP, video injection or point cloud injection protocol; the physical link is a communication link consistent with or equivalent to the mass production state of the vehicle.

[0043] The method of this invention specifies the use of communication protocols and physical links consistent with or equivalent to those used in mass production for signal injection. This helps reduce algorithm behavior deviations caused by differences in test interfaces and improves environmental consistency from the test environment to the real vehicle.

[0044] According to a second aspect of the present invention, a vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles is provided, comprising:

[0045] The attitude acquisition unit is deployed on the tractor and trailer respectively. It is used to acquire the attitude data of the tractor and trailer, and obtain the joint angle and angular rate between the tractor and the trailer. The data is marked with a timestamp SIMTIME and a sequence number seq in a unified clock domain and then output.

[0046] A dual-attitude reference write-back unit is communicatively connected to the attitude acquisition unit and is used to write the tractor head posture data, trailer posture data, joint angle and angular rate as a unique posture reference into the simulation engine.

[0047] The simulation engine, which is communicatively connected to the dual-attitude reference write-back unit, is used to calculate the relative motion relationship between the trailer and the virtual obstacle according to the use case under the drive of the unique pose reference, and output the object-level target features or sensor-level simulation data stream carrying SIMTIME and seq.

[0048] The middleware gateway, which is connected to the simulation engine, is used to perform timing shaping and protocol mapping on the target features or simulation data stream, shaping it into an isochronous and auditable input stream, and then encapsulating it according to the controller protocol before outputting it through the physical link.

[0049] The vehicle controller, connected to the middleware gateway via the physical link, is used to receive the encapsulated input stream and execute the autonomous driving algorithm;

[0050] The safety and interlocking manager is communicatively connected to the attitude acquisition unit, the simulation engine, the middleware gateway, and the vehicle controller. It is used to jointly determine safety risks based on the pose data, joint angles, angular rates, simulated target information, and real-time estimated trailer tail sweep envelope information, and drive hierarchical interlocking control including normal operation, degraded operation, partial disconnection, hard disconnection / emergency stop states.

[0051] The present invention provides a vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles, comprising: an attitude acquisition unit, a dual attitude reference write-back unit, a simulation engine, a middleware gateway, a vehicle controller, and a safety and interlock manager; the attitude acquisition unit, deployed on the tractor and trailer respectively, is used to acquire the tractor's pose data and the trailer's pose data, and to obtain the joint angles and angular velocities between the tractor and trailer, and to output the data after marking the data with a timestamp SIMTIME and a sequence number seq in a unified clock domain; the dual attitude reference write-back unit, communicatively connected to the attitude acquisition unit, is used to write the tractor's pose data, trailer pose data, joint angles and angular velocities as a unique pose reference into the simulation engine; the simulation engine, communicatively connected to the dual attitude reference write-back unit, is used to calculate the relative motion relationship between the trailer and virtual obstacles according to the use case under the drive of the unique pose reference, and output the results. The system comprises: an object-level target feature or sensor-level simulation data stream carrying SIMTIME and seq; a middleware gateway, communicating with the simulation engine, used to perform timing shaping and protocol mapping on the target feature or simulation data stream, shaping it into an isochronous, auditable input stream, and encapsulating it according to the controller protocol before outputting it through a physical link; a vehicle controller, connected to the middleware gateway through a physical link, used to receive the encapsulated input stream and execute the autonomous driving algorithm; and a safety and interlocking manager, communicating with the attitude acquisition unit, simulation engine, middleware gateway, and vehicle controller respectively, used to jointly determine safety risks based on pose data, joint angles, angular rates, simulated target information, and real-time estimated trailer tail scan envelope information, and accordingly drive hierarchical interlocking control including normal operation, degraded operation, partial disconnection, and hard disconnection / emergency stop states. This invention constructs a hardware-in-the-loop test platform specifically for articulated commercial vehicles through a specific combination of the attitude acquisition unit, reference writer, simulation engine, middleware gateway, controller, and interlocking manager. This system provides a high-confidence and secure closed-loop environment for algorithm testing.

[0052] As a further aspect of the present invention, the system further includes:

[0053] The evidence chain and reporter are communicatively connected to the attitude acquisition unit, the dual attitude reference write-back unit, the simulation engine, the middleware gateway, and the safety and interlocking manager, respectively. They are used to collect configuration information, status events, and performance indicators from each module throughout the simulation testing process and solidify them into a structured evidence chain containing a preset minimum field set. This minimum field set includes fields describing the trailer profile, traction pin connection geometry, dual anchor point synchronization parameters, joint angle monitoring parameters, timing jitter budget, scheduling log hash value, and simulation seed. The evidence chain and reporter are also configured to generate standardized test reports based on the structured evidence chain for cross-vehicle, cross-trailer, or cross-version comparisons.

[0054] This invention's system, by adding evidence chain and reporting modules and defining their connection relationships and functions, achieves automatic collection, solidification, and report generation of key test data. This system architecture provides necessary system-level support for auditing, analyzing, and comparing test results across platforms.

[0055] According to a third aspect of the present invention, a vehicle-in-the-loop simulation device for autonomous driving of commercial vehicles is provided. The vehicle-in-the-loop simulation device for autonomous driving of commercial vehicles includes a processor and a memory. The memory stores at least one computer instruction, which is loaded and executed by the processor to implement the steps performed in the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles as described above.

[0056] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one computer instruction, the instruction being loaded and executed by a processor to implement the steps performed in the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles as described in any of the preceding claims.

[0057] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0059] Figure 1 is a flowchart of the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles provided in an embodiment of the present invention;

[0060] Figure 2 is a structural diagram of the vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles provided in an embodiment of the present invention. Detailed Implementation

[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention.

[0062] This invention provides a vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles, as shown in Figure 1, including the following steps:

[0063] Step 101: By using differential GNSS / IMU acquisition units deployed on the tractor head and trailer respectively, acquire the tractor head pose data and trailer pose data, and acquire the joint angle and angular rate between the tractor and trailer. Mark the tractor head pose data, trailer pose data, joint angle and angular rate with timestamp SIMTIME and sequence number seq in a unified clock domain and output them.

[0064] In this embodiment, differential GNSS / IMU refers to a navigation technology that combines a differential global navigation satellite system (such as RTK) with an inertial measurement unit (IMU). Furthermore, a unified clock domain is established and distributed to the real-time dynamic positioning RTK / inertial measurement device (IMU), middleware gateway, simulation engine, and controller ECU; all messages carry SIMTIME and seq. Specifically, the following steps are included:

[0065] (1) Selection of a unified clock source

[0066] A unified time reference source is selected as the master clock domain. This source can be a PPS (Pulse Per Second) / ToD (Time of Day) time signal provided by GNSS, a PTP master clock, or a calibrated software clock. The unified clock source provides a consistent time reference for both the simulation system and the actual vehicle system. In this embodiment, the PPS and ToD provided by GNSS are used as the unified clock source to provide a consistent time reference for both the simulation system and the actual vehicle system. The synchronization accuracy of the clock source must meet the requirements of attitude fusion, dual anchor point alignment, and event timing determination. Its time synchronization accuracy can reach the nanosecond to microsecond level (which can be calibrated according to application requirements) to ensure the timing consistency and auditability of the system.

[0067] (2) Time alignment and distribution

[0068] A unified clock domain is distributed to RTK / IMU, simulation engine, middleware gateway, and ECU through hardware synchronization (such as PPS, PTP) or software synchronization. Each module establishes a local time mapping relationship aligned with the unified clock domain.

[0069] (3) SIMTIME and sequence number generation

[0070] When generating data, each module generates a corresponding SIMTIME for each data item based on a unified clock domain, and assigns a monotonically increasing sequence number seq to the same data stream to represent the time sequence relationship.

[0071] (4) Message carrying and timing consistency verification

[0072] SIMTIME and seq are passed as fields between modules of the system along with the data. Downstream modules perform out-of-order detection, delay monitoring, frame loss statistics and beat shaping based on the fields, thereby ensuring consistency and auditability of the time caliber between the simulation side and the actual vehicle side.

[0073] SIMTIME: refers to a logical time identifier generated under a unified clock domain constraint, used to characterize the unified time perception of the same moment by various modules in the simulation system and the real vehicle system;

[0074] SIMTIME can be derived from a physical clock (such as GNSS / PPS, PTP) or a time-corrected software clock and transmitted as a message field along with the data.

[0075] seq: refers to the monotonically increasing sequence number associated with SIMTIME, used to identify the order of messages in the same data stream, and supports the detection and suppression of out-of-order, dropped, and duplicate messages.

[0076] SIMTIME and seq are used as timestamp and sequence number fields in data packets, which are encapsulated and transmitted along with object-level or sensor-level data.

[0077] Coordinate mapping: Project latitude and longitude / heading onto simulated world coordinates; align the zero point with the heading.

[0078] Pre-run checks: Load test cases and the previous evidence chain; after the chain self-check passes, it enters normal operation.

[0079] In one embodiment, the method for obtaining the joint angle and angular rate between the tractor and the trailer includes any one or a combination of two of the following:

[0080] Measured by a joint angle sensor; or

[0081] Based on the tractor head pose data and trailer pose data, inverse kinematics calculations are performed by combining the geometric connection relationship between the tractor and trailer, and the consistency of the results from the two methods is verified.

[0082] In practical applications, joint angle sensors can be deployed at the towing pin for direct measurement; alternatively, inverse calculations can be performed based on the dual GNSS / IMU pose data of the tractor and trailer through geometric relationships.

[0083] Alternatively, both of the above methods can be used simultaneously for cross-validation and anomaly detection. After completing the mechanical installation, power supply, and cable laying, a geometric model and coordinate system of the combined vehicle are established, and the reference points of the tractor / trailer, sensor mounting positions, traction pin positions, and key points of the outer contour (tail edge / outer corner / turning point), etc. are recorded; this geometric modeling serves as a unified basis for the transformation from dual anchor point pose to simulated vehicle projection, tail sweep envelope calculation, and trigger reference point determination.

[0084] Specifically, the joint angle φ and the angular velocity φ · The inverse geometry calculation can be completed based on the "tractor head pose + trailer pose + towing pin connection geometry". The following is an implementable geometric inverse geometry algorithm (without limiting the specific coordinate system implementation):

[0085] (1) Input and calibration parameters

[0086] Input: Tractor head position T H (t)=[R H (t),p H (t)]、Trailer position T T (t)=[R T (t),p T [(t)], all of which are derived from differential GNSS / IMU fusion solutions;

[0087] Among them, the tractor head position T H (t) is used to characterize the spatial attitude of the tractor unit at time t. It is composed of attitude components and position components, and its specific meanings are as follows:

[0088] R H (t): Represents the attitude information of the tractor unit at time t, used to describe the spatial orientation relationship of the tractor unit's coordinate system relative to the world coordinate system. The attitude information can be given in the form of a rotation matrix, quaternion, or equivalent attitude representation, and must include at least the heading (yaw) direction information, and may further include pitch and roll angle information.

[0089] p H (t): Represents the position vector of the tractor unit at time t, used to describe the spatial position of the tractor unit reference point (e.g., the origin of the tractor unit coordinate system or a predefined vehicle reference point) in the world coordinate system. Its components can be two-dimensional or three-dimensional coordinates.

[0090] Therefore, T H (t)=[R H (t),p H [(t)] is used to fully describe the spatial pose state of the tractor head in a unified clock domain, providing basic input for subsequent joint angle inverse kinematics, simulation pose rewrite, and tail sweep envelope estimation.

[0091] Trailer position TT (t) is used to characterize the spatial pose state of the trailer at time t. It is composed of both attitude and position components, and its specific meanings are as follows:

[0092] R T (t): Represents the attitude information of the trailer at time t, used to describe the spatial orientation relationship of the trailer coordinate system relative to the world coordinate system. The attitude information can be given in the form of a rotation matrix, quaternion, or equivalent attitude representation, and must include at least the heading (yaw) direction information of the trailer, and may further include pitch and roll angle information.

[0093] p T (t): Represents the position vector of the trailer at time t, used to describe the spatial position of the trailer reference point (e.g., the origin of the trailer coordinate system or a predefined trailer reference point) in the world coordinate system. Its components can be two-dimensional or three-dimensional coordinates.

[0094] Therefore, T T (t)=[R T (t),p T [(t)] is used to fully describe the spatial pose state of the trailer in a unified clock domain, and serves as one of the basic inputs for joint angle inverse solution, simulation pose rewrite, and tail sweep envelope prediction.

[0095] Calibration: Fixed mounting point r of the traction pin (joint) in the vehicle head coordinate system H→J and the fixed mounting point r in the trailer coordinate system T→J (or equivalent connection geometry parameters, such as the link vector from the towing pin to the trailer reference point); the above parameters are determined and fixed into the configuration during the vehicle geometry modeling / calibration stage.

[0096] (2) Calculate the positions of the joints on both sides in the world coordinate system and perform consistency checks.

[0097] • Calculate the world coordinates of the key points from the front side of the vehicle:

[0098]

[0099] • World coordinates of key points derived from the trailer side:

[0100]

[0101] • Consistency check: Calculation If the error exceeds the preset tolerance, an anomaly will be marked or compensation / reweighting fusion will be enabled (e.g., the more credible side will be used, or least squares consistency will be performed).

[0102] (3) Calculate the joint angle φ (yaw angle)

[0103] • Extract the heading angle (or yaw angle) ψ of the tractor and trailer. H (t), ψ T (t).

[0104] • The joint angle is defined as the angle between the two objects in the yaw direction:

[0105]

[0106] Here, wrap(·) normalizes the angle to the equivalent interval of (-π,π] or [0,2π) to avoid crossing the boundary.

[0107] A jump occurs at ±π.

[0108] Note: If the pose is given as a quaternion / rotation matrix, it can also be directly derived from the relative rotation. Extracting the yaw component yields

[0109] (4) Calculate the angular velocity φ·

[0110] • Based on discrete-time difference calculation:

[0111]

[0112] Where Δt is determined by the timestamp (SIMTIME) under the unified clock domain; to suppress the influence of GNSS / IMU noise, it can be... First perform low-pass filtering / sliding window fitting and then calculate the derivative, or... Amplitude limiting and consistency testing are employed.

[0113] (5) Fusion with joint angle sensor (optional)

[0114] When simultaneously equipped with joint angle sensor measurement At this time, cross-validation and fusion can be performed: for example, judging... Whether the tolerance is exceeded, or whether a weighted fusion output is used for the final result. The consistency verification result is output as an abnormal state along with the data for use by downstream cycle shaping, safety interlocking and evidence chain recording.

[0115] (6) Algorithm output

[0116] The output fields should include at least: Consistency check residual Δp J (t) or equivalent quality index, and the corresponding SIMTIME and seq, are used for subsequent "unique pose reference write-back", "tail scan envelope estimation" and "hierarchical interlocking determination".

[0117] This invention provides two methods for acquiring joint angles: direct measurement and geometric inverse kinematics, which can be cross-verified. This approach increases the redundancy of state information acquisition and improves the system's fault tolerance and data reliability when some sensors malfunction.

[0118] In one embodiment, after acquiring the tractor pose data and trailer pose data by differential GNSS / IMU acquisition units deployed on the tractor and trailer respectively, the above method further includes:

[0119] Under a unified clock domain, the tractor head position data and trailer position data are time aligned and numerical consistency checked, and abnormal states are marked.

[0120] In practical use, consistency checks and anomaly annotations are performed on the numerical values, including:

[0121] The tractor head pose data (pose_head), trailer pose data (pose_trailer), and joint angles obtained from different acquisition paths are compared. With angular velocity Perform multi-source numerical consistency verification to determine whether the numerical results meet the preset reasonable consistency conditions;

[0122] At the same time, by combining SIMTIME and sequence number seq under the unified clock domain, the continuity and trend of relevant values ​​in the time dimension are checked, and abnormal situations such as sudden changes, drifts or time misalignments are identified.

[0123] Further, based on the geometric relationships and physical constraints of the combined vehicle, the rationality of the pose and joint angle changes is verified;

[0124] When inconsistencies or anomalies are detected, the corresponding data is labeled with the anomaly type and status, and transmitted along with the data for downstream modules to use for cycle shaping, safety interlocking, and evidence chain recording.

[0125] After acquiring the dual-anchor point pose, the method of this invention performs time alignment and numerical consistency checks. This step ensures the synchronization and logical consistency between the tractor and trailer data, improving the overall quality of the pose data used as a simulation benchmark.

[0126] Step 102: Write the tractor head pose data, trailer pose data, joint angles and angular velocities into the simulation engine as the unique pose reference of the vehicle in the simulation world.

[0127] In this embodiment, the cycle time is updated according to the agreement. The tractor head pose data, trailer pose data, joint angles and angular rates are written into the simulation engine through the object state writing interface provided by the simulation engine.

[0128] Among them, the tractor head pose data is used to update the pose state of the tractor simulation object, the trailer pose data is used to update the pose state of the trailer simulation object, and the joint angles and angular rates are used to update the corresponding joint constraints or equivalent state parameters in the simulation engine.

[0129] Upon receiving a write request, the simulation engine updates the state of the corresponding object within the current simulation step, enabling the simulated vehicle to perform motion updates (acceleration, deceleration, steering), occlusion relationships, and collision determination based solely on the actual vehicle's position and pose.

[0130] The aforementioned scheme can realistically reproduce the unique motion geometry of commercial articulated vehicles, including off-tracking between the tractor and trailer tracks, trailer tail sweep, and phenomena such as swaying or wobbling. This ensures that the trigger reference point in the simulation test is geometrically consistent with the actual vehicle's tail edge or outer corner. Based on this, both regulatory scripts and custom scripts demonstrate higher stability and reliability in reproducing key indicators such as trigger time, minimum distance, and braking response.

[0131] In addition, the write-back process records the write time, success / lag / failure status and object ID mapping. When encountering engine load fluctuations or blockages, it reports back to the gateway for end-to-end rhythm coordination and anomaly location. At the same time, it writes key events into the evidence chain to support reproduction.

[0132] Step 103: Driven by a unique pose reference, the simulation engine calculates the relative motion relationship between the trailer and the virtual obstacle according to the use case, and outputs object-level target features or sensor-level simulation data streams carrying SIMTIME and seq.

[0133] In practical use, driven by a unique pose reference, the simulation engine advances environmental evolution according to regulations / custom use cases, outputting real-time sensor perception results data (such as id, dx, dy, v_rel, class, conf) or sensor streams (video / point cloud), uniformly labeled with SIMTIME+seq; it also discloses the refresh rate, maximum number of objects, and rendering status to ensure that downstream gateways perform field clearing (field meaning, coordinate system, positive and negative directions, units, etc.) and subsequent protocol mapping according to clearly defined criteria. Specifically, object-level target features include, but are not limited to, a structured target list output by the simulation engine after fusing multi-sensor information.

[0134] Step 104: The target features or simulation data stream from the simulation engine are time-series shaped and protocol-mapped through the middleware gateway, forming an isochronous and auditable input stream. After being encapsulated according to the controller protocol, it is injected into the vehicle controller through the physical link.

[0135] It should be noted that the middleware gateway transforms the upstream "non-isochronous, jittery" object / sensor stream into an "isochronous, auditable" input stream, and encapsulates and distributes it according to the controller protocol.

[0136] In one embodiment, timing shaping of target features or simulation data streams from a simulation engine includes at least one of the following operations:

[0137] Buffer shaping: Set a time buffer in the middleware gateway, using SIMTIME of the unified clock domain as a reference, sort and align the data within a preset safe time window, and send it out according to the output beat.

[0138] Adaptive timing: Based on the monitoring results of data processing latency, frame drop rate or downstream feedback status, the output frequency is dynamically adjusted. When instability is detected, the output frequency is reduced, and when stability is detected, it is gradually restored to the target timing.

[0139] Pruning process: When communication bandwidth or controller processing capacity is limited, the target set is prioritized based on the relative relationship between the target and the vehicle or the risk assessment results, and the top N targets with the highest priority are sent first.

[0140] Priority reordering: Adjusting the output order of data or targets based on security relevance;

[0141] Out-of-order suppression / deduplication: Based on the SIMTIME and seq carried by the data, the data is rearranged or deduplicated within the set out-of-order window.

[0142] In practical use, buffer shaping specifically means that when there are multiple timestamps in the time buffer that are in the same output beat window, the data with the timestamp closest to the target output time is selected first for distribution.

[0143] The adaptive beat mechanism employs a "fallback-monitoring-gradual recovery" control strategy. Its triggering relies on real-time monitoring of data processing latency, frame drop rate, or feedback status from downstream controllers. When system instability is detected, it enters the "fallback phase" to reduce the output frequency; thereafter, it continuously monitors the system status, and once the preset stability conditions are met, it gradually increases the frequency until it recovers to the target beat or reaches the stability upper limit.

[0144] The ranking factors used in Top-N pruning are more specific, including the relative position and speed of the target and the vehicle, target category information, perception confidence, and collision risk assessment results. When bandwidth is limited, in addition to prioritizing the distribution of high-priority targets, other targets can be temporarily withheld or simplified in representation.

[0145] The core principle of prioritization is clearly defined as: safety-related priorities take precedence. Prioritization can be implemented using a "risk score + ranking" approach to ensure that "safety-related priorities" have specific, enforceable rules. The following is a type of scoring and ranking method that is not limited to a specific implementation:

[0146] (1) Input elements (taking object-level targets as an example)

[0147] Calculate / obtain the relative position (d) for each target i. x,i d y,i Relative velocity v rel,i Target category c i Confidence level i Target size / outer frame (bbox) i (Optional), and the minimum distance d from the trailer's rear sweep envelope. tail,i (If tail sweep risk assessment is enabled in this embodiment.)

[0148] (2) Risk scoring function (example, calibrable / replaceable)

[0149] Construct a target risk score:

[0150] S i =w1·f TTC (i)+w2·f dist (i)+w3·f tail (i)+w4·f class (i)+w5·f conf (i)

[0151] Where w k For identifiable weights; the meanings of each sub-item are as follows (a set of implementable definitions are given):

[0152] Collision time related terms f TTC (i): Based on longitudinal / synthetic relative distance and relative velocity estimation (TTC), for example:

[0153]

[0154] And map it to a risk value (the smaller the TTC, the greater the risk), such as f TTC =clip(1 / TTC) i (or piecewise function)

[0155] Distance-related term f dist (i): Map risk based on the minimum geometric distance between the target and the vehicle's critical reference point (the closer the distance, the higher the risk), such as f dist =clip(1 / d)i ).

[0156] • Tail sweep related items f tail (i) (Commercial Vehicle Enhancement): Minimum distance d between the target and the trailer's rear sweep envelope tail,i Mapping risks, such as

[0157] f tail (i) = clip(1 / d) tail,i )

[0158] Automatically assign higher priority to targets that may be covered by tail sweep.

[0159] Category item f class (i): This mapping table can be configured to assign higher base risk to vulnerable road users, static hard obstacles, etc. (e.g., VRU > vehicles > roadside objects; or set higher weights for construction cones / guardrails, etc.).

[0160] · Confidence level term f conf (i): Used to suppress the bandwidth / computing power consumption of low-confidence noisy targets (e.g., f conf =conf i Or reduce / remove targets below the threshold.

[0161] (3) Sorting and Rearranging Rules

[0162] First press S i Sort in descending order to obtain a priority queue;

[0163] • If a "hard rule" is triggered (e.g., d) tail,i Entering the danger zone (or the TTC entering the urgent zone), the target can be prioritized (hard priority overrides soft score);

[0164] • When bandwidth / computing power is limited, output the top N targets according to the sorting results (consistent with the Top-N pruning logic), and delay the output or simplify the representation of the remaining targets.

[0165] (4) Priority of sensor-level data streams (optional supplement)

[0166] When the output is sensor-level (video / point cloud), "priority reordering" can fall under the data frame scheduling layer: for example, prioritizing the transmission of point cloud clusters / image patches corresponding to ROIs (high-risk areas), or prioritizing the transmission of incremental information associated with high-risk targets during congestion; its scheduling trigger can still be achieved by the aforementioned S i Or generated by hard rules.

[0167] Out-of-order suppression / deduplication operations strictly rely on the SIMTIME timestamp and seq sequence number carried by the data, and are completed within a set out-of-order time window.

[0168] The method of this invention processes simulation output data through specific operations such as buffer shaping, clock adaptation, and target pruning. This helps to transform nondeterministic data streams into stable, isochronous controller inputs, thereby improving the timing determinism of the entire test system and the repeatability of test results.

[0169] In one embodiment, the controller protocol is one of CAN, CAN-FD, Ethernet SOME-IP, UDP, video injection, or point cloud injection protocols; the physical link is a communication link consistent with or equivalent to the mass production status of the vehicle.

[0170] It should be noted that the controller protocol can be selected as object-level, fusion-level, or sensor-level.

[0171] The method of this invention specifies the use of communication protocols and physical links consistent with or equivalent to those used in mass production for signal injection. This helps reduce algorithm behavior deviations caused by differences in test interfaces and improves environmental consistency from the test environment to the real vehicle.

[0172] Step 105: Based on the tractor head pose data, trailer pose data, joint angles and angular velocities, target object information in the simulation environment, and real-time estimated trailer tail sweep envelope information, a joint safety risk assessment is performed, and a hierarchical interlocking control including normal operation state, degraded operation state, semi-disconnected state, and hard disconnect / emergency stop state is driven accordingly.

[0173] The trailer tail scan envelope information is estimated based on a unique pose reference and the geometric models of the tractor and trailer. In actual use, the controller receives object-level, fusion-level, or sensor-level input data that has been shaped and encapsulated according to the controller protocol on a real physical link. This data triggers the autonomous driving algorithm, which sequentially completes environmental recognition, driving decisions, and control command output, thereby driving vehicle actuators such as braking, steering, and traction.

[0174] Simultaneously, the controller periodically reads back its own operating status, health information, and key intermediate quantities, and transmits this information back to the middleware gateway and safety interlock manager for cycle coordination, anomaly tracing, and safety handling. This information is also aligned with the simulation trigger or collision determination time to verify causal consistency. Furthermore, the key status information provided by the controller also provides critical statuses for the safety and interlock manager to support hierarchical interlock criteria, enabling proactive handling of risks specific to commercial vehicles (such as tailing and folding knives), significantly improving safety in closed-site testing, and achieving a more robust engineering balance between false alarms and missed handling.

[0175] In one embodiment, the estimation process for the trailer tail scan envelope information includes:

[0176] In the trailer's own coordinate system, define a set of key points that characterize the outer contour of the rear;

[0177] Using the trailer pose data, the key points are transformed to the world coordinate system to obtain the set of points P(t) on the outer tail at the current moment;

[0178] Set a future time window [t, t+ΔT], and sample multiple future moments t_i within the window at a fixed step size; based on the current vehicle speed, heading and angular rate trends, calculate the trailer prediction pose corresponding to each future moment t_i through a motion prediction model; use each prediction pose to calculate the corresponding future moment tail outer point set P(t_i).

[0179] The outer envelope formed by the union of all future time point sets P(t_i) is determined as the trailer tail sweep envelope;

[0180] Calculate the minimum distance between the trailer's rear sweep envelope and the geometric representation of obstacles in the simulation environment.

[0181] Specifically, the estimation of the trailer tail sweep envelope is achieved through the following steps:

[0182] Step A: Based on the pre-established combined vehicle geometric model, define a set of key points (e.g., the outer corner points and several discrete points on the outer edge of the rear) in the trailer's own coordinate system to characterize the outer contour of the rear. This set of points is determined during model initialization and can be directly called upon subsequently.

[0183] Step B: Using the trailer pose data collected at the current moment, transform these key points from the trailer coordinate system to a unified world coordinate system to obtain the point set P(t) of the current actual outline position.

[0184] Step C involves performing motion prediction within a short time window to form a sweep envelope. A calibrable future time window [t, t+ΔT] is defined, and several future moments t_i are selected within the window at fixed step sizes. For each future moment, based on the current vehicle speed, heading, and joint angle change rate... The trailer pose data at time t_i is predicted using a kinematic model (e.g., a simplified model maintaining the current motion state), and the corresponding tail outer point set P(t_i) is calculated. The outer envelope formed by the union of all future point sets P(t_i) is the predicted tail sweep envelope. The kinematic model is a combined vehicle kinematic model that performs short-term forward prediction based on the current vehicle motion state, used to estimate the trailer pose change trend within future time windows; it does not involve solving higher-order dynamics. The following is a description of an implementable but not limited model:

[0185] In this embodiment, a combined vehicle kinematics prediction model that is "quasi-static and maintains the current motion trend for a short period of time" is adopted. Specifically:

[0186] 1. Selection of state variables

[0187] Starting from the current time t under a unified clock domain, select the current vehicle speed v(t), heading angle ψ(t), and heading angle change rate (yaw rate) of the tractor. and the joint angle between the tractor and the trailer With angular velocity As the initial state for prediction.

[0188] 2. Tractor Motion Prediction

[0189] Within the future time window [t, t+ΔT], assuming the tractor maintains its current speed and heading trend over a short period, the tractor's attitude can be predicted as follows:

[0190] o Tractor heading angle:

[0191]

[0192] o Tractor position:

[0193]

[0194] The integral can be approximated by a discrete time step in the implementation, where v(τ) represents the vehicle speed information of the tractor at that moment, and is used to characterize the instantaneous linear velocity of the tractor along its current direction of travel.

[0195] 3. Joint Angle and Trailer Attitude Prediction

[0196] Within the short-term prediction window, assuming the rate of change of joint angles maintains its current trend, then:

[0197]

[0198] The predicted heading angle of the trailer can be determined by the relationship between the heading angle of the tractor and the joint angle:

[0199]

[0200] The location of the trailer reference point is geometrically calculated based on the predicted pose of the tractor, the geometric relationship of the towing pin, and the aforementioned heading relationship.

[0201] 4. Model Constraints and Applicability Description

[0202] The model is a low-complexity kinematic prediction model, suitable for forward prediction within a short time window required for tail sweep envelope estimation; its purpose is to assess the spatial range that the trailer tail may cover in a short period of time in the future, rather than to accurately reproduce the vehicle's actual dynamic response.

[0203] In other embodiments, equivalent constant curvature models, monorail models, or their simplified forms can be used to replace the above prediction methods. As long as the spatial sweep range of the trailer tail can be reasonably predicted based on the current pose and joint state, it falls within the protection scope of this invention.

[0204] It should be noted that this invention does not limit the specific mathematical form or parameter configuration of the kinematic model. The relevant models and parameters can be configured and calibrated according to the vehicle type, test conditions and safety requirements.

[0205] Step D, calculate the minimum distance between the trailer's rear scan envelope and obstacles in the simulation environment, including:

[0206] 1. Within the prediction time window [t, t+ΔT], select several future times t. i .

[0207] 2. For any future time t i Calculate the set of points P(t) on the outer side of the rear of the trailer at that moment. i The minimum geometric distance between the object and the set of obstacles (Obstacles) in the simulation environment is defined as:

[0208]

[0209] 3. Within the prediction time window, find the minimum distance d(t) corresponding to each future time point. i Taking the minimum value, we get:

[0210]

[0211] Where, d min It represents the minimum possible distance between the rear outline of the trailer and any obstacle within the predicted time window, and is used for tail sweep risk assessment and graded interlock determination.

[0212] Step E involves outputting the estimation results in a structured format, including at least: the minimum spacing d_min, the corresponding simulation timestamp / serial number, the identifier of the associated key point, and the ID of the associated obstacle. This output is directly used for safety interlock determination and evidence chain recording.

[0213] This invention estimates the tail sweep envelope by defining key points at the rear of the trailer and combining them with short-term trajectory prediction based on the trailer's motion state. This method can perform forward-looking calculations of the area that the trailer's rear may cover during movement, providing earlier risk assessment for safety interlocking.

[0214] In one embodiment, the triggering condition for hierarchical interlocking control is:

[0215] The conditions for triggering the degraded operation state are: the minimum tail angle-obstacle distance is lower than the first safety threshold and continues for a preset number of frames, or the rate of change of the angular rate exceeds the preset threshold;

[0216] The condition for triggering the semi-disconnection state is: the minimum tail angle - obstacle distance is lower than the second safety threshold;

[0217] The conditions for triggering a hard disconnect / emergency stop state are: the minimum tail angle-obstacle distance is lower than the third safety threshold or a collision is predicted to occur.

[0218] Among them, the first security threshold > the second security threshold > the third security threshold.

[0219] In this embodiment, the first safety threshold, the second safety threshold, and the third safety threshold are configurable and calibrable safety parameters. Their specific values ​​are not fixed and can be calculated or set according to vehicle type, trailer geometry, and operating conditions. The principle for setting the above thresholds is: first safety threshold > second safety threshold > third safety threshold, which is used to distinguish different risk levels and trigger graded interlocking control.

[0220] In one implementation, the aforementioned safety threshold can be determined based on at least one of the following factors:

[0221] • Current speed of the tractor or equivalent speed of the combined vehicles;

[0222] • Trailer length, wheelbase, and rear outline geometry;

[0223] • Joint angle φ and angular velocity φ · The changing trend;

[0224] • Distribution of minimum safe distances under different risk levels in historical test data or simulation statistics.

[0225] For example, in low-speed turning test conditions, the first safety threshold can be set as a safety margin distance for early warning, which can trigger a degraded operation state; when the minimum tail angle-obstacle distance further decreases and falls below the second safety threshold, a semi-disconnect state is triggered; when the minimum tail angle-obstacle distance approaches zero or a collision is predicted to occur and falls below the third safety threshold, a hard disconnect or emergency stop state is triggered.

[0226] It should be noted that this invention does not limit the specific values ​​or calculation formulas of the above-mentioned safety thresholds. The relevant thresholds can be configured and calibrated according to vehicle parameters, test scenarios and safety strategies. As long as hierarchical interlocking control based on the degree of tail sweep risk can be achieved, they are all within the protection scope of this invention.

[0227] Specifically, the hierarchical interlocking state machine takes progressively stronger measures for the system based on the real-time risk assessment:

[0228] 1. Normal Operating Status (RUN): The system operates without any abnormalities and with all functions enabled. The simulation engine generates target and perception information normally, the middleware gateway sends data completely according to the set cycle, the controller executes the algorithm normally, and the safety interlock manager continuously monitors various indicators.

[0229] 2. Degraded Operation State (DEGRADE): Triggered when a controllable but intervention-required risk is detected (e.g., continuously decreasing tail sweep spacing, abnormal joint angle change trend, timing instability). In this state, system functionality is limited but connectivity is maintained. Specific measures include: reducing the update frequency of simulation inputs, enabling target pruning to retain only highly relevant or high-risk targets, and the gateway entering a clockwise adaptive "fallback phase" and expanding the buffer window to improve stability. The controller still operates in a closed loop, but due to the more conservative input information, the probability of aggressive decisions is reduced.

[0230] 3. Half-Disconnect State: Entered when the risk further escalates (e.g., minimum tail angle-obstacle distance approaches the danger threshold, joint angle changes rapidly and abnormally). This state does not involve a complete vehicle power outage, but rather the cutting off or freezing of dynamic environmental inputs from the simulation engine to the controller. The controller will no longer receive real-time simulation data and can operate based on the last valid input or built-in safety strategies (e.g., deceleration, exiting automatic mode), while the vehicle's actual dynamics and execution chain remain active. This essentially shifts the VIL testing system from a high-intervention to a low-intervention state.

[0231] 4. Hard Disconnect / Emergency Stop: This state is triggered immediately upon detecting an unacceptable or imminent danger (such as an impending collision, joint angle instability, or a serious system malfunction). The system will completely stop simulation input, cease injecting any data into the controller, and simultaneously issue an emergency stop command, causing the controller to disengage from automatic driving control and the vehicle to enter a safe braking or manual intervention state. The triggering cause, timing, and handling outcome of this event will be fully recorded and solidified as irreversible evidence of a safety event.

[0232] The method of this invention sets graded quantitative trigger thresholds for different interlocking states. This enables the system to take a progressive response, from degrading to emergency stop, based on the level of risk, which helps to maintain the continuity of testing as much as possible while ensuring safety.

[0233] In one embodiment, the above method further includes:

[0234] Throughout the simulation testing process, all configuration information, status events, and performance metrics are collected and solidified to form a structured chain of evidence and a standardized report containing a preset minimum set of fields, which is used for comparison and auditing of cross-vehicle, cross-trailer, or cross-version tests.

[0235] In this embodiment, the system will automatically perform statistical analysis on core indicators such as trigger time, minimum distance / stopping distance, relative speed, rate of change of acceleration (jerk), temporal distribution, and interlocking events during the testing process. Based on this, the system will further expand and generate enhanced key performance indicators (KPIs) for commercial vehicles, such as: tail sweep distance, minimum tail angle-obstacle distance, joint angle stability / jump count, and blade folding trend.

[0236] Simultaneously, the system will solidify a structured minimal field set and a time-series diagnostic summary, forming a traceable and comparable chain of evidence, ultimately outputting a standardized test report. This chain of evidence specifically includes the following:

[0237] 1. Preset project configuration file / identifier (remains unchanged in a single test):

[0238] Trailer profile: Describes the trailer's geometry and key parameters.

[0239] Hitch_geometry_id: Uniquely identifies the connection geometry configuration of the traction pin.

[0240] Dual-pose synchronization profile: Defines the synchronization rules and strategies for the pose data of the tractor and trailer.

[0241] Joint angle monitoring configuration (phi_monitor_profile): Sets the joint angle and angular velocity The monitoring rules and judgment thresholds.

[0242] Timing jitter budget profile: Defines the allowable timing jitter range and management strategy for each stage.

[0243] 2. Process records and fingerprints generated during the process (dynamically determined during test execution):

[0244] Schedule log hash (schedule_log_hash): Serves as a unique fingerprint of the actual runtime sequence and scheduling behavior.

[0245] Simulation random seed (sim_seed): Identifies the random number sequence used in this simulation to ensure that the scenario is reproducible.

[0246] Throughout the testing process, the system uniformly associates and solidifies the aforementioned static configurations and dynamic records, thereby constructing a traceable and reproducible chain of evidence. Based on this, the generated standardized report can reliably support performance comparison and audit analysis across vehicles, trailers, and algorithm versions.

[0247] The method of this invention requires the generation of a structured chain of evidence and a report containing a minimum set of fields throughout the testing process. This enables standardized recording and traceability of the testing process, facilitating comparative testing and result auditing across different vehicles, trailers, or software versions.

[0248] The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles provided in this invention synchronously collects the pose data and joint angles of the tractor and trailer, and drives the simulation operation as the sole pose reference of the vehicle in the simulation world under unified timing management constraints. Input is provided to the controller via a physical link for system-level verification of the autonomous driving algorithm for commercial vehicles. This solves the problem that traditional single-anchor-point schemes cannot accurately reproduce trailer motion. Timing shaping ensures the stability of the injected signal, and combined with tail-scan estimation and hierarchical interlocking, it improves the testing safety and scenario reproduction reliability for the unique safety risks of commercial vehicles.

[0249] In another embodiment, the "tail sweep risk in a right turn scenario of a tractor and trailer" is used as a test case to verify whether the minimum distance between the outer rear of the trailer and the obstacle during the turn meets the safety requirements.

[0250] The testing environment includes:

[0251] Real tractor and trailer

[0252] Closed testing site

[0253] Virtual obstacles and environment generated by simulation engine

[0254] Perception input: All data is generated by the simulation engine and can be object-level or sensor-level data.

[0255] The testing steps include:

[0256] Step S1: Real Vehicle Status Collection

[0257] The actual tractor and trailer are driving in a closed area. The attitude acquisition unit collects GNSS / IMU pose data (position, heading, etc.) on both the tractor and trailer, and can choose to acquire or inverse solve the joint angles. and angular velocity All data is generated under a unified clock domain and carries SIMTIME and sequence number seq.

[0258] Data flow: Real vehicle → Attitude acquisition unit → Test equipment interface.

[0259] Step S2: Dual-attitude fusion and consistency verification

[0260] The testing equipment performs time alignment, numerical consistency verification, and anomaly annotation on the pose data of the tractor and trailer, resulting in standardized pose_head, pose_trailer, and... Data flow.

[0261] Data flow: Attitude acquisition module → Dual attitude fusion module (within the test equipment).

[0262] Step S3: Dual-attitude reference write-back

[0263] The dual-pose reference writer updates the clock cycle according to the convention, writing the pose_head to the tractor object in the simulation engine and the pose_trailer to the trailer object. Write simulation joint constraints so that the simulation engine uses the real vehicle pose as the sole pose reference to advance the simulation.

[0264] Data flow: Test equipment → Simulation computer (simulation engine).

[0265] Step S4: Simulation Environment and Target Object Generation

[0266] Driven by the aforementioned pose reference, the simulation engine calculates the relative positional relationship between the trailer and the simulated obstacles, and outputs target data (such as obstacle position, category, etc.) or sensor-level data (such as simulation images). All outputs carry SIMTIME and seq.

[0267] Data flow: Generated within the simulation engine → Output to the middleware gateway.

[0268] Step S5: Input shaping and trigger determination

[0269] The middleware gateway performs buffering and shaping, clock cycle adaptation, and Top-N pruning on the simulation output (if bandwidth is limited). Meanwhile, the safety and interlocking manager determines whether a risk event has been triggered based on the simulated obstacle positions, the actual vehicle poses, and the trailer rear scan envelope estimation.

[0270] Data flow: Simulation output → Gateway shaping → Interlocking determination module.

[0271] Step S6: Execution of control commands

[0272] If the interlock is not triggered, the shaped simulated target data is injected into the controller according to the controller protocol. The controller generates control commands such as steering and braking, and sends them to the vehicle actuators through the real physical link.

[0273] Data flow: Test equipment → Controller → Real vehicle.

[0274] Step S7: Interlock Triggering and Handling

[0275] When the minimum tail angle-obstacle distance is detected to be lower than the safety requirement, the system triggers DEGRADE or HALF_DISCONNECT to degrade or disconnect the simulation input. If necessary, HARD_DISCONNECT / E-Stop is triggered, and the relevant events are recorded in a structured manner.

[0276] Step S8: Solidification and Output of the Chain of Evidence

[0277] Throughout the testing process, pose data, simulated target data, control commands, interlocking state changes, and schedule_log_hash, sim_seed, etc., were all recorded in a unified manner, ultimately forming a complete chain of evidence and a test report.

[0278] Based on the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles described in the embodiment corresponding to Figure 1 above, the following is a system embodiment of the present invention, which can be used to execute the method embodiment of the present invention.

[0279] The vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles provided in this embodiment of the invention is shown in Figure 2. The system includes:

[0280] The attitude acquisition unit 201 is deployed on the tractor head and trailer respectively. It is used to acquire the attitude data of the tractor head and the attitude data of the trailer, and to obtain the joint angle and angular rate between the tractor and the trailer. The data is marked with a timestamp SIMTIME and a sequence number seq in a unified clock domain and then output.

[0281] The dual-attitude reference writeer 202 is communicatively connected to the attitude acquisition unit 201 and is used to write the tractor head posture data, trailer posture data, joint angles and angular rates as the unique posture reference into the simulation engine 203.

[0282] The simulation engine 203 is connected in communication with the dual-attitude reference writer 202. It is used to calculate the relative motion relationship between the trailer and the virtual obstacle according to the use case under the drive of a single pose reference, and output the object-level target features or sensor-level simulation data stream carrying SIMTIME and seq.

[0283] The middleware gateway 204 communicates with the simulation engine 203 and is used to perform timing shaping and protocol mapping on target features or simulation data streams, shaping them into isochronous and auditable input streams, and then encapsulating them according to the controller protocol before outputting them through the physical link.

[0284] The vehicle controller 205 is connected to the middleware gateway 204 via a physical link to receive the encapsulated input stream and execute the autonomous driving algorithm.

[0285] The safety and interlocking manager 206 is connected to the attitude acquisition unit 201, the simulation engine 203, the middleware gateway 204 and the vehicle controller 205 respectively. It is used to jointly determine safety risks based on pose data, joint angles, angular rates, simulated target information and real-time estimated trailer tail scan envelope information, and drive hierarchical interlocking control including normal operation, degraded operation, partial disconnection and hard disconnection / emergency stop states.

[0286] Specifically, the safety and interlock manager 206 receives real-time pose data and joint angle data from the attitude acquisition unit 201, obstacle information from the simulation engine 203, timing health status from the middleware gateway 204, and feedback status from the vehicle controller 205, in order to perform joint risk assessment.

[0287] The vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles provided in this embodiment of the invention constructs a hardware-in-the-loop testing platform specifically for articulated commercial vehicles through a specific combination of an attitude acquisition unit 201, a dual attitude reference write-back unit 202, a simulation engine 203, a middleware gateway 204, a vehicle controller 205, and a safety and interlocking manager 206. This system provides a high-confidence and secure closed-loop environment for algorithm testing.

[0288] In one embodiment, the system further includes:

[0289] The evidence chain and reporter 207 are connected to the attitude acquisition unit 201, the dual attitude reference writer 202, the simulation engine 203, the middleware gateway 204, and the safety and interlock manager 206, respectively. They are used to collect configuration information, status events, and performance indicators from each module throughout the simulation test process and solidify them into a structured evidence chain containing a preset minimum field set. The minimum field set includes fields for describing the trailer outline, traction pin connection geometry, dual anchor point synchronization parameters, joint angle monitoring parameters, timing jitter budget, scheduling log hash value, and simulation seed. The evidence chain and reporter are also configured to generate standardized test reports for cross-vehicle, cross-trailer, or cross-version comparisons based on the structured evidence chain.

[0290] This invention's system, by adding evidence chain and reporting modules and defining their connection relationships and functions, achieves automatic collection, solidification, and report generation of key test data. This system architecture provides necessary system-level support for auditing, analyzing, and comparing test results across platforms.

[0291] Based on the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles described in the embodiment corresponding to Figure 1 above, another embodiment of the present invention also provides a vehicle-in-the-loop simulation device for autonomous driving of commercial vehicles. The vehicle-in-the-loop simulation device for autonomous driving of commercial vehicles includes a processor and a memory. The memory stores at least one computer instruction, which is loaded and executed by the processor to implement the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles described in the embodiment corresponding to Figure 1 above.

[0292] Based on the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles described in the embodiment corresponding to Figure 1 above, this embodiment of the invention also provides a computer-readable storage medium. For example, a non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, floppy disk, or optical data storage system, etc. This storage medium stores at least one computer instruction for executing the vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles described in the embodiment corresponding to Figure 1 above, which will not be elaborated further here.

[0293] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

[0294] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles, characterized in that, The method includes the following steps: acquiring tractor pose data and trailer pose data by using differential GNSS / IMU acquisition units deployed on the tractor and trailer respectively, and acquiring the joint angles and angular velocities between the tractor and trailer; marking the tractor pose data, trailer pose data, joint angles, and angular velocities with timestamps SIMTIME and sequence numbers seq in a unified clock domain and then outputting them; using the tractor pose data, trailer pose data, joint angles, and angular velocities as the unique pose reference of the vehicle in the simulation world, and writing them into the simulation engine; driven by the unique pose reference, the simulation engine calculates the relative motion relationship between the trailer and virtual obstacles according to the use case, and outputs an object carrying SIMTIME and seq. The system generates target feature or sensor-level simulation data streams. Through a middleware gateway, the target feature or simulation data streams from the simulation engine undergo timing shaping and protocol mapping to form an isochronous, auditable input stream. This stream is then encapsulated according to the controller protocol and injected into the vehicle controller via a physical link. Based on the tractor head pose data, trailer pose data, joint angles and angular rates, target information in the simulation environment, and real-time estimated trailer tail sweep envelope information, a joint safety risk assessment is performed. Based on this assessment, a hierarchical interlocking control system is driven, encompassing normal operation, degraded operation, partial disconnection, and hard disconnection / emergency stop states. The trailer tail sweep envelope information is estimated based on the unique pose reference and the geometric models of the tractor and trailer.

2. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The method of obtaining the joint angle and angular rate between the tractor and the trailer includes any one or a combination of the following: measurement by a joint angle sensor; or inverse calculation based on the tractor head pose data and the trailer pose data, combined with the geometric connection relationship between the tractor and the trailer, and the consistency of the results of the two methods is checked.

3. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The timing shaping of the target features or simulation data stream from the simulation engine includes at least one of the following operations: Buffer shaping: Setting a time buffer in the middleware gateway, using SIMTIME of the unified clock domain as a reference, sorting and aligning the data within a preset safe time window, and distributing it according to the output beat; Beat adaptation: Dynamically adjusting the output frequency based on monitoring results of data processing latency, frame drop rate, or downstream feedback status, reducing the output frequency when instability is detected, and gradually restoring it to the target beat when stability is detected; Pruning: When communication bandwidth or controller processing capacity is limited, prioritizing the target set based on the relative relationship between the target and the vehicle or risk assessment results, and distributing the top N targets with the highest priority first; Priority reordering: Adjusting the output order of data or targets according to safety relevance; Out-of-order suppression / deduplication: Reordering or deduplicating the data within a set out-of-order window based on the SIMTIME and seq carried by the data.

4. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The estimation process of the trailer tail sweep envelope information includes: defining a set of key points representing the outer contour of the tail in the trailer's own coordinate system; transforming the key points to the world coordinate system using the trailer pose data to obtain the current tail outer point set P(t); setting a future time window [t, t+ΔT], and sampling multiple future times t_i within the window at a fixed step size; calculating the predicted trailer pose corresponding to each future time t_i using a motion prediction model based on the current vehicle speed, heading, and angular rate trends; calculating the corresponding future tail outer point set P(t_i) using each predicted pose; determining the outer envelope formed by the union of all future time point sets P(t_i) as the trailer tail sweep envelope; and calculating the minimum distance between the trailer tail sweep envelope and the geometric representation of obstacles in the simulation environment.

5. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The triggering conditions for the hierarchical interlocking control are as follows: the condition for triggering the degraded operation state is: the minimum tail angle-obstacle distance is lower than the first safety threshold and continues for a preset number of frames, or the rate of change of the angular rate exceeds a preset threshold; the condition for triggering the semi-disconnected state is: the minimum tail angle-obstacle distance is lower than the second safety threshold; the condition for triggering the hard disconnect / emergency stop state is: the minimum tail angle-obstacle distance is lower than the third safety threshold or a collision is predicted to occur; wherein, the first safety threshold > the second safety threshold > the third safety threshold.

6. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, After acquiring the tractor head pose data and trailer pose data by differential GNSS / IMU acquisition units deployed on the tractor head and trailer respectively, the method further includes: performing time alignment and numerical consistency verification on the tractor head pose data and trailer pose data under a unified clock domain, and marking abnormal states.

7. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The method also includes: throughout the simulation test process, collecting and solidifying all configuration information, status events and performance indicators to form a structured evidence chain and standardized report containing a preset minimum field set, for comparison and auditing of cross-vehicle, cross-trailer or cross-version tests.

8. The vehicle-in-the-loop simulation method for autonomous driving of commercial vehicles according to claim 1, characterized in that, The controller protocol is one of CAN, CAN-FD, Ethernet SOME-IP, UDP, video injection, or point cloud injection protocols; the physical link is a communication link that is consistent with or equivalent to the mass production status of the vehicle.

9. A vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles, characterized in that, include: An attitude acquisition unit, deployed on both the tractor and trailer, is used to acquire tractor and trailer pose data, and obtain the joint angles and angular velocities between the tractor and trailer. The data is then stamped with a timestamp (SIMTIME) and a sequence number (seq) in a unified clock domain before being output. A dual-attitude reference writer, communicatively connected to the attitude acquisition unit, is used to write the tractor pose data, trailer pose data, joint angles, and angular velocities as a unique pose reference into the simulation engine. The simulation engine, communicatively connected to the dual-attitude reference writer, is used to calculate the relative motion relationship between the trailer and virtual obstacles according to the use case, driven by the unique pose reference, and outputs object-level target features or sensor-level simulation data streams carrying SIMTIME and seq. The middleware gateway, which is connected to the simulation engine, is used to perform timing shaping and protocol mapping on the target features or simulation data stream, shaping it into an isochronous and auditable input stream, and then encapsulating it according to the controller protocol before outputting it through the physical link. The vehicle controller, connected to the middleware gateway via the physical link, receives the encapsulated input stream and executes the autonomous driving algorithm. The safety and interlocking manager is communicatively connected to the attitude acquisition unit, the simulation engine, the middleware gateway, and the vehicle controller, respectively, and is used to jointly determine safety risks based on the pose data, joint angles, angular rates, simulated target information, and real-time estimated trailer tail scan envelope information, and accordingly drive hierarchical interlocking control including normal operation, degraded operation, partial disconnection, and hard disconnection / emergency stop states.

10. The vehicle-in-the-loop simulation system for autonomous driving of commercial vehicles according to claim 9, characterized in that, The system further includes an evidence chain and a reporter, which are communicatively connected to the attitude acquisition unit, the dual attitude reference write-back unit, the simulation engine, the middleware gateway, and the safety and interlocking manager, respectively. These are used to collect configuration information, status events, and performance indicators from each module throughout the simulation testing process and solidify them into a structured evidence chain containing a preset minimum field set. The minimum field set includes fields describing the trailer profile, traction pin connection geometry, dual anchor point synchronization parameters, joint angle monitoring parameters, timing jitter budget, scheduling log hash value, and simulation seed. The evidence chain and reporter are also configured to generate standardized test reports based on the structured evidence chain for cross-vehicle, cross-trailer, or cross-version comparisons.