## 4 Model for Calculating the Roll Stability Boundary  
Transformer, introduced by [PERSON] et al. in 2017, features a self-attention mechanism originally designed to tackle challenges in natural language processing [39]. Due to its advantages, such as powerful feature extraction ability, efficient parallel computing ability, and the ability to process complex data with high dimensionality and nonlinearity, it also has better performance in regression prediction. In the lane-changing path generation module, we adjust the ratio of \(\omega_{1}\) and \(\omega_{2}\) to generate a series of unconstrained path clusters. Additionally, changes in the road adhesion coefficient, vehicle velocity, load capacity, and other driving conditions will also affect the stability boundary of the vehicle on the same path. The roll stability boundary of the intelligent semi-trailer is determined based on the maximum lateral load transfer ratio (LTR). LTR is a key index for evaluating the rollover risk of a vehicle. We use the Transformer model to predict the maximum LTR under different driving conditions. When the maximum LTR, denoted as \(LTR_{max}\), is less than 0.9, the semi-trailer is considered to maintain a stable state and is within the roll stability boundary. In other words, the value of 0.9 for \(LTR_{max}\) serves as a threshold to define the roll stability boundary [40]. This relationship allows us to precisely determine whether a planned path meets the roll stability requirements of the intelligent semi-trailer.  
The solution method of roll stability boundary takes the road adhesion coefficient, vehicle driving velocity, trailer load weight, and ratio of \(\omega_{1}\) and \(\omega_{2}\) as input features and takes the \(LTR_{max}\) as the output feature to conduct regression prediction. After training, the \(LTR_{max}\) under different driving conditions can be obtained, thus determining the stability boundary. LTR is a widely used index for vehicle rollover risk assessment [41] and is defined as:  
\[LTR=\frac{|F_{Z,L5}-F_{Z,R5}|}{F_{Z,L5}+F_{Z,R5}} \tag{17}\]  
where \(F_{Z,L5}\) represents the load on the left wheels of the five-axle semi-trailer, \(F_{Z,R5}\) represents the load on the right wheels of the five-axle semi-trailer. This ratio reflects the distribution of the vehicle's load between the left and right sides. When a vehicle is in a dynamic state, such as during lane-changing or cornering, the load distribution between the left and right wheels changes. A higher LTR indicates a greater imbalance in the load distribution, which increases the risk of the vehicle rolling over. For example, if the load on the right wheels is much larger than that on the left wheels, the LTR value will be closer to 1, and the vehicle is at a higher risk of rollover.  
We selected the LTR as an index to evaluate the roll stability of intelligent semi-trailers because it directly reflects the load-distribution situation related to vehicle rollover. Compared with other potential indexes, LTR is a well-established and widely used metric in the automotive industry for rollover risk assessment. It has a clear physical meaning and can effectively quantify the rollover risk under different driving conditions. By using LTR, we can accurately analyze the roll stability of the vehicle during the lane-changing process and ensure that the planned path can maintain the vehicle's stability, which is crucial for the safe operation of intelligent semi-trailers.