The cascade optimal control of steer by wire system using hardware in the loop simulations

Received Nov 18, 2021 Revised Feb 25, 2022 Accepted Mar 10, 2022 This paper aims to further improve the performance of the control system on the steer by wire (SbW) of vehicle steering system, by presenting the development of optimal control system strategy for lateral motion and yaw motion which is arranged in a cascade so that the vehicle can always be maintained on the desired trajectory. The control system strategy to be developed is fuzzy logic control (FLC) as a lateral motion control and proportional integral derivative (PID) control as a yaw motion control, and to obtain an optimal control system, the modified-quantum particle swarm optimization (MQPSO) optimization method is used. The simulations are carried out using hardware in the loop simulations (HILS) which involve hardware, namely; motor stepper actuator and rotary encoder to determine and monitor the direction of the front wheels which are applied to the vehicle dynamics model in a real time. HILS test results show that vehicle movement can be maintained according to the desired trajectory (double lane change) with an average continues-root mean square (C-RMS) error of 0.015366 for lateral motion and 0.014967 for yaw motion, the average C-RMS error is greater 23.75% for lateral motion and 28.18% for yaw motion against the results of the software in the loop simulations (SILS) test.


INTRODUCTION
Steer by wire (SbW) system technology on the vehicle is a steering system technology that connecting the conventional mechanic between the steering and the front wheel changed into the electronic actuator [1], [2]. There are two characteristic of SbW system, the first one is the semi-automatic which is the system that still using steer wheel as the input in determining the direction of the front wheels of the vehicle, the second characteristic is fully automatic which is the system without using the steer wheel, so it need programmed trajectory input (lane guidance) [3], [4], to be able to determining the direction of the front wheels, or using global positioning system (GPS) [5]. A number of SbW test pattern has been done on the actual vehicle [6], small vehicle [7], [8], experiment vehicle [9], also on the vehicle model that using the mathematical equations of vehicle dynamics [10].
The dynamics of vehicle was divided into two, namely the ride model which states the movement of the vehicle in the vertical direction and the handling model which states the movement of the vehicle in the horizontal direction. When the vehicle is moving in the longitudinal direction, it is necessary to control the vehicle using the handling model so that it is always maintained so that there is no lateral movement [4], [9], Int J Pow Elec & Dri Syst ISSN: 2088-8694  The cascade optimal control of steer by wire system using hardware in the … (Fachrudin Hunaini) 765 [11], [12]. However, even though lateral motion control has been implemented, it is still possible that the maneuvering vehicle will experience under-steer and over-steer forces, which are rotating vehicle movements with an axis of center of gravity (CoG) or yaw motion. To reduce the yaw motion phenomenon, it is necessary to control yaw motion [4], [13]. Therefore, when the vehicle is moving and the lateral motion is well controlled, meaning that the vehicle is no longer experiencing lateral movement either the rear or the front of the vehicle, then lateral motion can be used as a reference or setting point to control the vehicle so as not to experience yaw motion. So that in this paper a yaw control system is developed to further enhance the movement of the vehicle when driving and maneuvering so that it is always maintained at the desired trajectory. The control system that continues from the lateral motion control system is then forwarded to the yaw motion control system, and this is called the cascade control system. The steering control system strategy has been widely developed using both fuzzy logic control (FLC) [14]- [18] and proportional integral derivative (PID) control [14], both control systems are quite reliable but still need to be supported by a method for tuning fuzzy parameters and PID with quickly and accurately in order to achieve precise control results. Swarm optimization-based optimization method offers a fast and accurate optimization process for tuning FLC and PID parameters [16], [19]- [21], one of which is modified-quantum particle swarm optimization (MQPSO). The pattern of testing the control system on vehicles using a mathematical vehicle model has several advantages, including vehicle parameters that can adjust to the actual vehicle as a whole, cost-effective, repeated test treatments are not at risk for an accidents, the data obtained is real time and degree of freedom (DOF) movement of vehicle dynamics is highly variable according to needs [10], [11], but to further improve the validation work of the control system performance it is necessary to simulate in real-time situations involving hardware such as sensors and actuators, hereinafter this platform referred to as the hardware-in-loop simulations (HILS) [21]- [23]. Based on the description above, the contribution of this paper is the development of an optimal control system on the SbW system so that it can always maintain vehicle movement on the desired track by using the FLC control system strategy as a lateral motion control, then the FLC control output is used as a reference for yaw motion control using a simpler control system, namely PID control which is arranged in a cascade and both control systems are optimized using an optimization method based on swarm optimization. The test is carried out using software-in-loop simulations (SILS) with the input variable in the form of a desired trajectory on a vehicle model which is then implemented in the HILS test which involves the actuator motor as the front wheel drive and sensors to monitor the direction of the front wheels of the vehicle.

RESEARCH METHOD 2.1. Vehicle dynamic model
This paper is a simulation using software and hardware of an active steering control system on a full vehicle model in the form of a Newtonian force equation consisting of a 7-DOF vehicle ride model and a 3-DOF vehicle handling model [20], [24], [25]. The vehicle model structure is a combination of vehicle ride models and vehicle handling models built using MATLAB-Simulink by taking the steer angle or the vehicle front wheel angle (δ) as the input plant.

Vehicle ride model
Vehicle ride is presented as a 7-DOF system which is expressed in 7 Newtonian force equations on the vehicle body which has a freedom of movement for bouncing, pitching, rolling, and vertical direction of each wheel [10] as shown in Figure 1: i) bouncing of the car body ( ), ii) pitching of the car body ( ), iii) rolling of the car body ( ), and iv) vertical direction for each wheel for: the left front wheel (̈, ), the right front wheel (̈, ), the left rear wheel (̈, ), and the right rear wheel (̈, ).

Vehicle handling model
The vehicle handling model used in this paper consists of 3 DOF which are 3 Newtonian force equations from the lateral (y) and longitudinal (x) and yaw (r) movement of the vehicle body. Lateral motion and longitudinal motion are expressed in terms of lateral acceleration (ay) and longitudinal acceleration (ax), while δ is the angle of displacement of the wheel direction as the angle of projection of lateral and longitudinal forces [26], [27] which is then used as plant input as shown in the Figure 2: i) Lateral motion ( ), ii) longitudinal motion ( ), and iii) yaw motion ().

Fuzzy logic control as a lateral motion control system
In this paper, FLC is used as a lateral motion (y) control system to suppress lateral motion errors that occur when the vehicle moves in the longitudinal direction (x), thus the direction of vehicle movement will always be on the desired trajectory. The main structure of FLC [28] as shown in Figure 3, consists of: − Fuzzification is used to change the crisp variable into a fuzzy variable which is expressed in membership functions (MF) as an expression of the degree of fuzzy membership. The form of MF used in this paper is one triangle and two trapezoids with language terms; negative (N), zero (Z), positive (P) are applied to the input (error and delta error) and output of the FLC. Optimal FLC control system design is a parameters design for membership function (MF) to be optimized. In this paper, the width and position of the midpoint of the shape of each MF can be changed based on the value of the multiplier (Δ) of the domain variable. The multiplier function proposed is a Δ. The value of Δi consists of; ΔER as a multiplier factor for the MF parameter on the input error; ΔDE as a multiplier factor for the MF parameter on the input delta error; and ΔOT as a multiplier factor for the MF parameter at the FLC output. The value of the multiplier Δi is determined through an iterative learning process until the optimal value is reached by using an optimization method based on swarm optimization. − A set of fuzzy rules used are grouped into a rule base as the basis for inference process (decision making) to obtain action from the control signal output from the condition input. The total rule base required is 9 rules which are presented in Table 1. The application of the implication function of each rule in the fuzzy knowledge base will be related to the fuzzy relation. In this paper, the Mamdani method is used with the implication function of the MIN method, so that the proportion that follows IF (antecedent) and the proportion that follows THEN (consequent) uses the AND operator. By using the rules as in Table 1, then 9 control rules can be obtained. Each rule contributes to the error pair (ER) and delta error (DE) which is the input for the fuzzy controller. − The defuzzification used in this paper is centroid defuzzification, which is a method of finding the center of gravity (COG) of the aggregation set.

Proportional integral derivative (PID) control as a yaw motion control system
The FLC output is the setting point for the PID control as shown in Figure 3. The result of the comparison of the setting point to the yaw motion output is yaw motion error which will be controlled by PID control. PID control output is then used as steering input on vehicle model. By using the PID controller block from the Simulink library browser, the values of the parameters Kp, Ki, and Kd required by the PID control, as in FLC, are also optimized to obtain the optimal value which expressed in the variable of the multiplier, namely ΔKp, ΔKi, and ΔKd.

Optimal control system strategy
The optimization method used in this paper is based on swarm optimization, namely MQPSO, which is compared with its predecessor optimization methods, namely PSO and QPSO. The process of optimizing the parameter on the control system, begins with determining the initial population of particles randomly and evaluated on the control system of the vehicle model. The particle population (swarm) is a multiplier factor of the control system parameters, which consists of 3 FLC parameters (ΔER, ΔDE, and ΔOT) and 3 PID control parameters (ΔKp, ΔKi, and ΔKd). Furthermore, the particles will be updated and re-evaluated until the maximum iteration to get the smallest error and the best particle position. At this stage, it means that the control system parameters have reached the optimal value. The optimization stages are as shown in [19]- [21]:

. Evaluation of population initialization
Each swarm/current position is a particle that will be evaluated to get fitness in the control system. The fitness of particle expressed in integral time-weighted absolute error (ITAE) minimization criteria [29].

− Step 4. Evaluation of new particles
At this stage, the evaluation of new particles is carried out by evaluating each particle position in the control system using ITAE at each iteration until the maximum iteration is achieved to obtain the fitness of particles. At the end of the process, the best global fitness value will be sought, which means this value corresponds to the best global position value which is the optimal particle position value (Δi).

Simulations strategy
The FLC and PID cascade control system (FLC-PID) that is built to adjust the direction of the front wheels of the vehicle according to the desired trajectory as shown in Figure 3 which illustrates the SILS and HILS block scheme of the control system on the fully automatic SbW model. In the SILS block scheme, the input system used is a look up table trajectory in this case in the form of a double lane change as a reference which will be compared with one of the output vehicle models in the form of lateral motion so that the lateral motion error is obtained to be controlled by the FLC. Furthermore, in a cascade, the FLC output is compared with the output of other vehicle models, namely yaw motion so that the yaw motion error is obtained to be controlled by the PID. In the SILS testing process, the PID control output is used as a steering input on the vehicle model, while in the HILS testing process as shown in the HILS block scheme, the PID control output is connected to an actuator in the form of a stepper motor whose angular position is always censored by a rotary encoder which is then used as steering input on the vehicle model and of course both the FLC and PID control systems have been optimized first by swarm optimization based. Figure 3 illustrates the schematic of the SILS and HILS blocks of the control system on the fully automatic SbW model.

RESULTS AND DISCUSSION
The test begins by using SILS on the lateral motion control system only on vehicle models using FLC which is optimized using PSO, QPSO, and MQPSO. The next test is the SILS test which was developed on a lateral motion control system using FLC cascade with a yaw motion control system using PID control on a vehicle model where the two control systems are also optimized using PSO, QPSO, and MQPSO. Next, compare the results of the FLC single control for lateral motion only with the results of the FLC-PID cascade control as a lateral motion control and yaw motion control. The test ended with the implementation of the most optimal cascade control system on the vehicle steering system through HILS testing.

Software in the loop simulations lateral control using optimal fuzzy logic control
The SILS test of the lateral motion control system using FLC which has been optimized using the PSO, QPSO, and MQPSO methods, obtained three multiplier factor values, which is the value of Δi (ΔER, ΔDE, and ΔOT) as Table 2, with the optimization results expressed in ITAE and the performance simulation results expressed in continues-root mean square (C-RMS) error. ΔER, ΔDE, and ΔOT is the multiplier parameter that has been obtained to determine the width and midpoint of each MF at the input and output FLC, the optimal form of MF can be seen in Figure 4. The performance of the optimal lateral motion control system performance using FLC from the vehicle steering system through the SILS test is expressed in the ratio of the desired trajectory input to the lateral motion output with the optimal control of FLC based on the swarm optimization method shown in Figure 5. The results of the SILS test show that the FLC-PID control system optimized using MQPSO has a C-RMS error of 0.009807 which is smaller than the one optimized using PSO (0.021139) and QPSO (0.019200).

SILS lateral and yaw control using the optimal FLC and PID
In this section, a cascade control system simulation test is conducted, which are FLC to control lateral motion and PID control system to control yaw motion via SILS. The control system parameters are first optimized using swarm optimization based to obtain the value of the multiplier factor Δi (ΔER, ΔDE, ΔOT, ΔKp, ΔKi, and ΔKd,) as shown in Table 3 with the error size used in the optimization process is ITAE, while the error size used in the simulation is the C-RMS error. Figure 6 shows the output of lateral motion by FLC optimal control, Figure 7 shows yaw motion output by PID optimal control, Figure 8 shows optimal control output of FLC-PID cascade, and Figure 9 shows performance of optimal lateral motion control system performance using FLC-PID based on the swarm optimization method of the vehicle steering system through SILS testing is expressed in the ratio of the desired trajectory input to the actual trajectory. The ER, DE, and OT values obtained are multipliers to determine the width of the triangle and the position of the midpoint of each MF and the values of Kp, Ki, and Kd are expression values for the PID control parameter constants. The performance of the optimal control system of the vehicle steering system through the SILS test is shown in Figure 9. The vehicle steering control system can maintain vehicle movement at the desired trajectory. The FLC-PID control system optimized using MQPSO has a smaller C-RMS error from lateral motion and yaw motion than the one optimized using PSO and QPSO.

Hardware-in-loop simulations test
Furthermore, the best results from the SILS test obtained are the optimal control system on FLC and PID (FLC-PID-MQPSO) as cascade control on lateral motion and yaw motion applied to the HILS test. In the SILS test model, an inner loop control is added as a rack and pinion drive control circuit from the steering system mechanical circuit consisting of actuators and sensors (stepper motors and rotary encoder) as shown in the schematic block of Figure 3 (HILS). The output inner loop control then becomes the steering input on the vehicle model. Figure 10 shows a graph of the HILS test results for the inner loop control which is the input to the actuator motor driving the front wheels of the vehicle and the output inner loop control is the output from the sensor/rotary encoder which is expressed in degrees of yaw motion (-30 o s/d 30 o ), as shown in Figure 11. Table 4 shows the comparison of the average of C-RMS error from the results of the SILS and HILS tests. Furthermore, the response characteristics of the HILS test results are shown in Figure 12. Figure 13 is a rig for the HILS test.

CONCLUSION
Lateral motion control which is cascaded with yaw motion control using FLC-PID optimized with MQPSO is able to eliminate lateral motion and yaw motion so that it can maintain and keep the vehicle moving on the desired trajectory with very small error. HILS test results show that vehicle movement can be maintained according to the desired trajectory (double lane change) with an average C-RMS error of 0.015366 for lateral motion and 0.014967 for yaw motion, the average of C-RMS error is greater 23.75% for lateral motion and 28.18% for yaw motion on the results of the SILS test. This shows that there is a delay in the simulation process in the HILS test caused by the operating time of the maximum stepper motor rotation reaching 60 ms and the maximum release time of 15 ms, so that the average of C-RMS error in the inner loop control is greater than the average of C-RMS error in lateral motion and yaw motion of 0.058864. The results of the HILS test become a recommendation for the development of steering input using a steer wheel so that this model can be categorized as SbW semiautomatic.