# Control Design and Assessment for a Reversing Tractor-Trailer System Using a Cascade Controller
## 4 Simulation Results and Discussion  
The developed path-tracker and controller was tested and evaluated using a test path that has been previously used in similar papers (see for example: [10; 27; 28]) using MATLAB. The path contains three waves with different frequencies designed to test the overall performance of the suggested controller. The first frequency represents a smooth and normal path, the second frequency simulates sharp turns while the last frequency is meant to implement an unfeasible turn. The path consists of a non-smooth transition between the sinusoidal wave that are designed to test the controller in such regions especially the path-tracking algorithm since it relies on the curvature of the path to be smooth which is not valid in this case. Figure 4 is a plot of the used test path. The discontinuities can be seen at points (125, 0) and (225, 0). The derivative of the curve angle is undefined at these locations. The tractor-trailer system is located at (0, 0) with the tractor-trailer system oriented to perform a reverse movement. One of the advantages of the developed controller is the tracking of an imaginary moving target. This has helped in minimizing the lateral tracking error by anticipating high curvature turns in the path. That is the tractor-trailer system will start steering before reaching the curve since the required path to be followed is several steps ahead. Another advantage is the use of a weighted sum of both the lateral error and the heading angle error as inputs to the controller which helped in achieving a great performance, also with the help of the \(\delta_{\theta}(t)\) as a smoothing function, to achieve a stable and non-aggressive approach to the path. The target progression rate in Equation (11) was designed based on the tractor and trailer kinematics. This choice has led to consider the ability of the system to maneuver. It is noted that from Equation (18) a high \(k_{3}\) will put more weight on the heading error. The higher the gain, the faster the system will response to changes in the heading error. It must be noted that in the test path where heading error discontinuities were introduced, it is important to test the controller reaction to such a path characteristic (the path tangent heading). It has been observed from several simulations that a higher gain would cause the controller commands to be unrealistic by means of high steering movements and fast angle change that those systems in real life cannot perform. The cascade controller design of the stabilizing controller has helped in achieving the required articulated angle stability and Jackknife incident prevention. \(K_{THC}\) is the feedback gain of the trailer's heading rate in Equation (21). A higher value for this gain causes the system to respond fast to the path angle changes. This situation  
Figure 4: Plot of the test path used in the evaluation of the proposed controller. can destabilize the system if the required maneuver is hard to achieve. The gain \(K_{PC}\) in Equation (22) is tuned to achieve a stable articulated angle and not to exceed the limits of the articulated angles presented in Equations (9) and (10). The higher the gain, the more the articulated angle becomes stable. This leads the system becoming sluggish in maneuvering and also in achieving the required path tracker commands. For simulation, we set \(L_{1}\) = 3.5 m, \(L_{2}\) = 5 m, \(l\) = 1 m and \(v\) = 5 m/s. The simulation result on the sinusoidal test track is shown in Figure 5. The first subplot shows the lateral error \(y_{FM}\) calculated from the track to point M. It can be noted that as the frequency of the sinusoid increases, the error increases as well. This is caused by the moving target as it is ahead of the tractor-trailer system by several meter (depending on target progression rate) and the issued commands are for curvatures that the moving target lies on. In this case, the target passes through tight turns at the end of the track.