**5. Calculation of Trajectory** *yM***(***x***)**

#### *5.1. Data Necessary to Plan the Obstacle-Avoiding Trajectory*

At first, the control system calculates trajectory *yM*(*x*) (Figures 2 and 3). The calculations are based on the information received from the environment perception system that a critical situation has arisen. The process of analyzing the critical situation begins at the instant when the perception system identifies the appearance of an obstacle (*y*<sup>0</sup> > 0) on the lane used by the vehicle at a distance of *x*<sup>0</sup> ahead (Figure 1). If *x*<sup>0</sup> < *SZ* then the obstacle avoidance procedure is started. *SZ* is the length of the stopping distance of the CT unit in the current local road conditions. The trajectory *yM*(*x*) necessary for safe obstacle avoidance is calculated with taking into account the following:


When trajectory *yM*(*x*) is calculated, the following limitations posed by the design features of the CT unit must be taken into account:

$$
\delta \le \delta\_{MAX} = \mathfrak{A}0\dots35 \deg - \text{confinement of the streaming angle} \tag{18}
$$

$$R\_{A\text{ MIN}} \ge \frac{L}{t\mathcal{g}\delta\_{MAX}}\ R\_{BMIN} \ge \sqrt{R\_{AMIN}^2 + l\_h^2 - l\_{hp}^2} \tag{19}$$

where:

*RA MIN*, *RB MIN*—minimum radii of curvature of car and trailer's trajectories, respectively; *L*—motorcar's wheelbase;

*lh* and *lhp*—distances from the coupling device centerline to the rear axle of the towing vehicle and to the trailer axle, respectively.

#### *5.2. Methods Considered and Their Calculational Models*

In result of an analysis of the methods of planning a safe vehicle trajectory [1,9,20], the functions based on a cosine curve, circular arcs, and parabola segments were selected for further consideration. Thus, the following functions, going through point *P*(*x*0; *yP*), have been used for designing the trajectory in the global coordinate system based on lane edge *Rmin* (Figure 1):

1. Cosine curve (dark blue in Figure 12):

$$y\_M(\mathbf{x}) = 0.5(y\_P - 0.5d) \left(1 - \cos\left(\frac{\mathbf{x}}{\mathbf{x}\_0} 180^\circ\right)\right) + 0.5d \text{ for } \mathbf{x} \in \left<0; \mathbf{x}\_0\right>\tag{20}$$

2. Circular arcs tangent to each other at point *M*1(0.5*x*0; 0.5(*yP* − 0.5*d*) + 0.5*d*), with identical radius *R*<sup>0</sup> (red in Figure 12):

$$y\_M(\mathbf{x}) = R\_0 - \sqrt{R\_0^2 - \mathbf{x}^2} + 0.5d \text{ for } \mathbf{x} \in \left(0; 0.5\mathbf{x}\_0\right)$$

$$y\_M(\mathbf{x}) = \sqrt{R\_0^2 - \left(\mathbf{x} - \mathbf{x}\_0\right)^2} + y\_P - R\_0 \text{ for } \mathbf{x} \in \left(0.5\mathbf{x}\_0; \mathbf{x}\_0\right) \tag{21}$$

$$R\_0 = 0.25 \frac{\mathbf{x}\_0^2 + \left(y^p - 0.5d\right)^2}{y\_P - 0.5d}$$

3. Two parabolas tangent to each other at point *M*2(0.1*x*0; 0.1(*yP* − 0.5*d*) + 0.5*d*), (green in Figure 12, defined by equations):

$$y\_M(\mathbf{x}) = a\_1 \mathbf{x}^2 + 0.5d \text{ for } \mathbf{x} \in \langle 0; 0.1 \mathbf{x}\_0 \rangle$$

$$a\_1 = \frac{0.1(y\_P - 0.5d)}{\left(0.1 \mathbf{x}\_0\right)^2} \tag{22}$$

$$\begin{array}{l} y\_M(\mathbf{x}) = a\_2(\mathbf{x} - \mathbf{x}\_0)^2 + y\_P \text{ for } \mathbf{x} \in \langle 0.1 \mathbf{x}\_0; \mathbf{x}\_0 \rangle \\ a\_2 = \frac{-0.9(y\_P - 0.5d)}{\left(0.1 \mathbf{x}\_0 - \mathbf{x}\_0\right)^2} \end{array} \tag{23}$$

**Figure 12.** Shapes of trajectory *yM*(*x*), obtained from the three trajectory calculation methods.

#### **6. Test Results Concerning the Selection of a Method to Calculate the CT Unit Trajectory in a Critical Situation**

*6.1. Assumptions Adopted for The Simulation Tests at the Method Selection Stage*

The properties of the control system depend on many factors. These factors were divided into three groups: constant, temporary, and variable ones. The group of temporary factors included the trajectory planning algorithm and the *La* value. As a variable factor, the clearance margin (*yW*) value, applied as a parameter to the control system, is considered. Tests were prepared to select the said factors for the critical situation under consideration. The following main assumptions were adopted for the simulation tests:


When the model parameter values were selected, the maximum possible trailer weight was assumed. Such a choice has a favorable impact on transport efficiency but adversely affects the stability of motion of a CT unit along a curvilinear path [14].

At this stage, the tests were carried out for the following solution alternatives examined:


While the simulation tests covered so many solution alternatives, only one critical situation was addressed, where another motor vehicle suddenly appeared on a road intersection with poor visibility and blocked the whole width of the lane used by the CT unit (Figure 1).

#### *6.2. Example of Calculation Results*

Simulation tests were carried out for 840 trajectory planning alternatives, as described above. Fragments of the calculation results have been presented in Figures 13–15 and in Table 1; a complete set of the results will be used in the procedure of selecting a method to calculate the CT unit trajectory and the *La* value. Figure 13 shows the courses of the trajectories *yM*(*x*) and *yT*(*x*) determined for different *La* values (according to (2)) and for three vehicle trajectory calculation methods. Trajectory *yM*(*x*) has been plotted with a

dotted line. Figure 13A,C,E (on the left) show examples of trajectories of the CT unit moving with a speed of *v* = 60 km/h; on the right (Figure 13B,D,F), there are model responses obtained for each of the trajectory planning methods and for three vehicle speed values. The obstacle avoidance process obtained for three trajectory calculation alternatives and for vehicle speeds *v* = 60 km/h, 70 km/h, and 80 km/h has been presented in Figure 14. Figure 15 shows a comparison of animations of the CT unit's motion on dry and wet road surfaces.

**Figure 13.** Comparison of trajectories *yM*(*x*) and *yT*(*x*) for different trajectory calculation methods (left) and of car paths *yCA*(*x*) obtained (right) for dry road surface; (**A**,**B**)—method with a cosine curve; (**C**,**D**)—method with circular arcs; (**E**,**F**)—method with parabolas.

**Figure 14.** Comparison of animations of the CT unit's motion for *v* = 60 km/h, 70 km/h and 80 km/h and for three *yM*(*x*) determination methods; dry road surface.

**Figure 15.** Comparison of animations of the CT unit's motion on dry and wet road surface for *v* = 60 km/h, 70 km/h and 80 km/h; trajectory calculation method with a cosine curve.

This brief summary of research results shows the impact of the *yM*(*x*) calculation method on the obstacle avoidance process. The example presented in Figure 13 indicates the favorable course of the process when the methods with a cosine curve or circular arcs are used to calculate *yM*(*x*). In Figure 14, we can see that the cosine method produced an advantageous effect for *v* = 70 km/h, but for *v* = 80 km/h, the trajectory calculated by the method with parabolas is better. For the wet road (Figure 15), good results were obtained for *v* = 60 km/h and the cosine method. The selection of *La*, in turn, has an impact on the trajectory curvature in each of the methods under consideration. For rising vehicle speed values, increasing the impact of the trajectory planning methods on the course of the obstacle avoidance process can be observed in the analysis.

This means that to select the optimum method of planning the trajectory *yM*(*x*) and value *La*, a lot of obstacle avoidance alternatives and curves representing changes in various physical quantities, obtained as simulation results, must be taken into consideration, because each of them helps to describe a different aspect of vehicles' behavior in a critical situation.



In the table, the vehicle corners have been given symbols according to the *Nis* system, where *i* = {*FR*, *RR*} (**F**ront **R**ight, **R**ear **R**ight) and *s* = {*A*, *B*} (car and trailer, respectively).
