## 3 Fuzzy Logic Control Design  
When the dynamical behavior of the object is studied, the controller is ready to be designed. One of the advantages of the solution described in this paper is that the controller requires the input variables, for which signals are transmitted in real time by the sensors available in modern vehicles. The fuzzy logic controller architecture is shown in Figure 3. In this case the plant is a vehicle model. The FLC consists of four design steps. Fuzzification is the process of converting the \"crisp\" (real number) input into fuzzy sets. A fuzzy set in turn is a pair consisting of an element in UOD and membership degree. The inference mechanism (engine) is used to turn the fuzzy input into a fuzzy output, using the composed rule-base block. Finally, defuzzification converts the fuzzy output into a numerical value. The MATLAB(r) (Natick, MA, USA) Fuzzy Logic Toolbox(tm) is used to design the FLC. At the beginning, the inputs and outputs must be stated. Two separate FLCs for ABS and ESP are introduced and combined to obtain robust brake and stability control. The block diagram scheme for a single wheel is presented in Figure 4. The anti-lock braking system controller involves longitudinal wheel speeds and vehicle acceleration. Using Equations (5) and (6), the slip for each wheel \(\lambda_{i}\) is calculated and the variable serves as an input. The second input is the tire-road friction coefficient, which corresponds to the vehicle body acceleration and is donated as \(\mu_{x}\), as stated in Equation (8). The ABS is activated together with the braking pedal displacement. When the vehicle velocity is lower than 8 km/h, the ABS does not function because, after the vehicle speed of 8 km/h, the distance traveled with locked wheels is not critical. The activation requirements are taken from [1] (pp. 74-94). \begin{table}
\begin{tabular}{c c c} \hline \hline \(\lambda\) (\%) & Front Wheels & Rear Wheels \\ \hline
**Dry road surface** & 19.85 & 18.96 \\
**Damp road surface** & 17.53 & 14.65 \\
**Wet road surface** & 13.21 & 10.88 \\
**Icy road surface** & 8.95 & 7.55 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Optimal wheel slip values for several road conditions. Figure 3: Fuzzy logic controller system block diagram: \(r(t)\)—reference input, \(u(t)\)—process inputs, \(y(t)\)—process. As soon as the emergency brake (full pedal actuation) is deployed, before the ABS is activated, the controller has enough time to measure the car's maximum deceleration and use it as a constant variable to understand the road surface. Moreover, the controller resets the \(\mu_{x}\) variable every second and the maximum value of \(a_{vx}\) is measured again. The fast reset has no effect on driving comfort as the process is very rapid. The reset is necessary for the FLC to understand if the road condition has remained the same, for example, when the road changes from a dry to an icy surface. The inputs of the ESP are the angular velocity of the vehicle about the vertical axis \(\psi\) and the steering wheel angle \(\delta\) operated by the driver (Figure 4). The ESP is activated together with the braking pedal and deactivates when the vehicle speed is below 8 km/h. The output of the ABS and the ESP is the braking pressure. The yaw controller has no impact when the yaw moment is not created, thus only ABS is responsible for efficient braking on a straight homogeneous road. The ESP FLC controls both sides of the vehicle. It either regulates the right or left pair of the vehicle wheels, depending on the body yaw rate direction. According to the curves in Figure 2, the front and rear wheels require different optimal wheel slip values. Therefore, the front and rear wheels will have different membership functions (MFs) for the \(\lambda\) input in ABS. Consequently, each wheel has a different controller. When the yaw FLC understands that the driver is losing vehicle control, it reduces the braking pressure from the side of the car, in which direction the vehicle starts to spin around its center of gravity (COG).