# A Turning Brake System for Motorcycles via an Autoregulative Optimal Slip Ratio
## 4 Roll Angle Estimation Based on Kalman Filter  
### Roll Angle Estimation Method  
According to Figure 4, the roll angle is also necessary to obtain the optimal slip ratio. However, the roll angle cannot be measured directly through a common sensor. The inertial measurement unit (IMU) installed on a motorcycle can measure acceleration and angular velocity. The transformation relationship between vehicle acceleration \(\left[A_{x}\ A_{y}\ A_{z}\right]\) and  
Figure 6: Brake cylinder pressure and velocity. (**a**) Front and rear brake cylinder pressure; (**b**) motorcycle speed. Figure 7: Simulation of vertical force. (**a**) Front wheel vertical force; (**b**) rear wheel vertical force. IMU acceleration measurement \(\left[a_{xm}\ a_{ym}\ a_{zm}\right]\), relative to the coordinate axis direction of the global coordinate system, is shown as follows:  
\[\left\{ \begin{array}{l}A_{x}=a_{xm}\\ A_{y}=a_{ym}\cos\phi-a_{zm}\sin\phi\\ A_{z}=a_{ym}\sin\phi+a_{zm}\cos\phi\end{array} \right. \tag{5}\]  
The transformation relationship between the body angular velocity [\(\omega_{xm}\ \omega_{ym}\ \omega_{zm}\)] measured by IMU and the Euler angular velocity is as follows:  
\[\left\{ \begin{array}{l}\omega_{xm}=\dot{\phi}\\ \omega_{ym}=\dot{y}\sin\phi\\ \omega_{zm}=\dot{y}\!\cos\phi\end{array} \right. \tag{6}\]  
where \(\dot{\psi}\) is the yaw rate. Under steady turning, the lateral acceleration \(A_{y}\) relative to the global coordinate system is the product of the longitudinal speed \(v_{x}\) and yaw rate, which can be obtained by synthesizing Equations (5) and (6):  
\[\dot{\phi}_{a,k}=\sin^{-1}\frac{a_{ym,k}\!\cos\phi_{a,k-1}-v_{x,k}\dot{\psi}_{ k}}{a_{zm,k}} \tag{7}\]  
According to Equation (7), the current roll angle can be obtained from the acceleration \(a_{ym}\) and \(a_{zm}\), measured by IMU, the longitudinal vehicle speed \(v_{x}\), the roll angle of the previous moment and the yaw rate. The longitudinal vehicle speed can be measured by wheel speed sensor. The yaw rate can be estimated by the following equation:  
\[\dot{\psi}_{\omega,k}=\text{sigmf}(\omega_{zm,k})\sqrt{\omega_{ym,k}^{2}+ \omega_{zm,k}^{2}} \tag{8}\]  
Equations (7) and (8) can be used as the roll angle and yaw rate measured value, which are calculated by the measured signals. However, there is always noise in the actual measurement process. The roll angle and yaw rate, calculated according to the above equation, are different from the actual value. Therefore, it is necessary to estimate the actual value based on the measurement signal and other known information. The estimation input and output is shown in Figure 8.  
Among many filtering methods, the Kalman filter is a time-domain filtering method, which can estimate not only the stationary one-dimensional random process, but also the non-stationary multidimensional random process. In addition, the Kalman filter is recursive, and the data storage is small, which is convenient for real-time application on a computer. Because of the above advantages, the Kalman filter has been widely used in engineering practice. Therefore, the Kalman filter is used to estimate the roll angle in this paper. The precondition for estimating the roll angle is to establish the state space expression, including the system noise and the measurement noise. This study focuses on the braking condition of motorcycles during cornering, where the input to the braking system, that is, the optimal slip ratio, is obtained based on the vertical load and the roll angle. Figure 8: Estimation input and output. The kinematic analysis, based on the IMU (Inertial Measurement Unit) mentioned above, aims to obtain the measurement of the motorcycle's roll angle, while the steering angle and the driver's influence are simulated by the motorcycle dynamics software BikeSim; therefore, it is assumed that the driver is affixed to the motorcycle.