# A Study of a Cornering Braking Control System for a Motorcycle
## 4 The Design of a Cornering Braking Control System  
The controller structure is shown in Figure 10. There are three parts: an optimal slip ratio lookup table, a control system, and the motorcycle dynamics. It controls the motorcycle's dynamic state and four dynamic parameters are used for the optimal slip ratio via the lookup table to determine the best slip ratio. The current slip ratio is fed back to the controller. The difference between the current and the best slip ratio is the input for the controller, which forms a closed-loop control to regulate the slip ratio for both tires. A motorcycle is unstable when it is static. The roll angle can be 45 degrees during turning. This is a highly nonlinear, time-varying system. BikeSim is used to simulate the motorcycle's dynamics. The control algorithm must learn, reason, and make decisions and adjustments to account for changes in the dynamic information. Artificial intelligence technology, such as fuzzy logic control, neural networks, self-adaptation, and so on, provides a theoretical basis. Among them, the principle of fuzzy logic control is shown in Figure 11. This combines the artificial experience and knowledge in a database and a rule base. The controller can simulate the fuzzy reasoning and make decisions, similarly to humans, to give the control command to the controlled object. This control method is robust for a highly nonlinear system. However, the precision of fuzzy control greatly depends on the database and the rule base being tested repeatedly. It is also difficult to eliminate static errors. Figure 8: Optimal slip ratio \(\kappa^{*}\). Figure 9: Optimal slip ratio lookup table. To address the disadvantages of fuzzy control, a Fuzzy PID control strategy was used to control the motorcycle, which consisted of fuzzy logic and a PID controller. Owing to their simplicity and accuracy, PID controllers have been widely applied in many fields. However, for a nonlinear and hysteretic system whose mathematical model is unknown, a traditional PID controller cannot achieve good performance because it cannot adapt its parameters, including the proportionality, the integral, and the differential coefficient, if the process changes. Fuzzy logic provides an effective way to make PID adaptive. The principle of a fuzzy PID is shown in Figure 12. Fuzzy logic was used to adapt the PID parameters based on the error and error rate input, so the control parameter was self-learning and self-adjusting. Figure 11: Principle of fuzzy logic control. Figure 10: Block diagram for a cornering braking controller. In order to test the effect of the proposed control system, this study applied the method of co-simulation via BikeSim and MATLAB. BikeSim, a mature motorcycle dynamics software, can perfectly simulate many kinds of motorcycle behavior conveniently, which offers a new approach to control and simulate complicated mechanisms. More importantly, BikeSim has an interface with MATLAB, which means it can exchange data with MATLAB. In this simulation experiment, a motorcycle tire and vehicle dynamics model was created, and the vehicle kinematic data were transferred to the MATLAB/Simulink environment. The braking control system, including the optimal slip ratio and Fuzzy PID controller, was established by Simulink and provided the control torque for two tires according to the vehicle's kinematic parameters. As shown in Figure 13a, in the beginning, the motorcycle was turning with an initial speed of 100 km/h and an initial roll angle of 30\({}^{\circ}\). After one second, the motorcycle began to brake during turning and the cornering braking control system started to work. The motorcycle dynamics parameters changed, as shown in Figure 13b-h. The vertical forces (shown In Figure 13b), the camber angles (shown in Figure 13c), and the sideslip angles (shown in Figure 13d) changed, so the optimal slip ratio for both tires changed. The proposed control system automatically adjusted the optimal slip ratio.