**3. Control system design**

The suggested control brake system employs fuzzy-PID controller to obtain the desired vehicle speed based on tuning of traditional PID controller. The applied control algorithm must be able to function to any required vehicle speed that is determined by the driver. The proposed control system design applied to handle this task is schematically illustrated in **Figure 3**.

As depicted in **Figure 3**, the system input (brake pedal force) is determined by the driver in the form of voltage signal ranging from 0 V (refers to release pedal) to 5 V (refers to fully pressed pedal). Upon determining the required vehicle speed by lookup table, the speed signal is then sent to the control unit which is based on either PID or fuzzy-PID controllers. The implemented control algorithm then determines the desired voltage source that must be transmitted to electrical actuator in order to generate required braking torque. The wheel speed after that is decreased by applying brake torque causing modification in overall system dynamics which in turn leads to vehicle speed deceleration.

**Figure 3.** BBW control system design.

The error signal transmitted into control algorithm, however, is determined by the difference between input signal (desired vehicle speed) and feedback signal (wheel speed) which is given by the following relationship:

Error = required vehicle speed (input signal)–measured wheel (feedback signal) (1)

The control strategy used to deliver the desired vehicle speed is based on maintaining peak slip ratio within the maximum adhesion characteristic range [0.02–0.35]. Locating peak slip ratio within the maximum friction characteristic initiated from applying ideal and accurate brake torque is capable of deriving proper and acceptable vehicle-wheel speed relationship.

The control objective of both controllers is to decrease vehicle velocity to the desired vehicle speed (5 Km/h) while maintaining slip ratio within its maximum range [0.02, 0.35]. Besides, the control algorithms are designed to operate braking action on dry asphalt road type, whereas other road types and conditions (such as wet asphalt, wet and dry cobblestone, and concrete) are applied to examine and investigate whether the controllers can handle characteristic variations of the system or not.

#### a) PID controller design

initial vehicle speed is set to 50 Km/h, the voltage range [0–5] V will correspond to the vehicle

Upon determining the required brake request, the braking command is then sent to the control unit (CU) via wires as shown in **Figure 1**. The CU located at the wheel after that determines exactly the control signal that must be transmitted to the brake actuator unite in order to slow down or stop the vehicle. Nevertheless, the control signal of the CU is considered the input for the electrical actuator (permanent magnetic DC motor) where this signal takes the form of the desired braking torque. Consequently, electronic actuator of the brake unit operates based on the desired braking torque which in turn decreases (or stops) vehicle speed according to the desired speed.

The control unit, however, is updated through feedback control strategies where wheel speed is considered the input to the feedback control system according to applied control strategy. Moreover, the interaction between brake pedal, control unit, electronic actuator, and wheel as well as vehicle speed is completely accomplished by wires. In view of that, vehicle brake

The suggested control brake system employs fuzzy-PID controller to obtain the desired vehicle speed based on tuning of traditional PID controller. The applied control algorithm must be able to function to any required vehicle speed that is determined by the driver. The proposed control system design applied to handle this task is schematically illustrated in **Figure 3**.

As depicted in **Figure 3**, the system input (brake pedal force) is determined by the driver in the form of voltage signal ranging from 0 V (refers to release pedal) to 5 V (refers to fully pressed pedal). Upon determining the required vehicle speed by lookup table, the speed signal is then sent to the control unit which is based on either PID or fuzzy-PID controllers. The implemented control algorithm then determines the desired voltage source that must be transmitted to electrical actuator in order to generate required braking torque. The wheel speed after that is decreased by applying brake torque causing modification in overall system

dynamics which in turn leads to vehicle speed deceleration.

speed [0–50] Km/h as explained in **Figure 2(b)**.

86 New Trends in Electrical Vehicle Powertrains

system is designed and structured.

**3. Control system design**

**Figure 3.** BBW control system design.

A cascade-form PID controller is designed based on manual tuning method, where the three terms of PID controller (proportional, integral, and derivative) are employed. Accordingly, the overall controller output is considered the sum of the contributions of the individual PID terms which is further expressed in Eq. (1), where *u* (*t*) is the PID control signal, *e*(*t*) is the error signal, and *Kp* , *Ki* , *Kd* are the proportional gain, integral gain, and derivative gain, respectively.

$$u\_{\perp}(t) = K\_p e(t) + K\_{\parallel} \int\_0 e(\tau) d\tau + K\_d \frac{d}{dt} e(t) \tag{2}$$

#### b) Fuzzy-PID controller design

Although PID manual tuning method provides stable output response, PID controller does not achieve the desired control specifications since the dynamics of the system has nonlinear and variant parameters which in turn degrade system performance. Therefore, fuzzy logic controller has been introduced to PID controller in order to improve the response as well as to enhance system performance based on fuzzy-PID tuning. In fact, fuzzy-PID controller is considered as a link between traditional control which has well-established theory and intelligent control that conquers traditional control problems like nonlinearity.

Fuzzy-PID scheme, in addition, can employ different structures and forms based on the input to the fuzzy controller on the one hand and on the arrangement of PID parameters and their locations with respect to fuzzy controller on the other hand. Nonetheless, these different structures are possible in the context of knowledge description and explanation, whereas they should be examined with respect to their functional behavior. The proposed structure of this study is schematically illustrated in **Figure 4**, which generates incremental and absolute fuzzy-PID signal based on direct action to tune PID parameters through fuzzy inference.

As shown in **Figure 4**, the error and rate change of error are considered as the time-varying inputs to the fuzzy logic controller (linguistic inputs), whereas tuned (proportional, integral,

**Figure 4.** Fuzzy-PID controller (MATLAB Simulink scheme).

and derivative) gains are the output of the controller (linguistic outputs). Regarding linguistic inputs, there are other choices (such as integral of error) that could also be used as input variables, yet the selection variables make good intuitive sense, particularly as the input error is naturally engaged in the control problem of regulating process output around specific set point. The controller input variable however must have proper information available to provide good decision to derive vehicle speed into the desired speed to achieve high-performance operation based on fuzzy-PID tuning. On the other hand, the linguistic output variables are expressed as tuned (proportional, integral, and derivative) gains where the output values of these tuned gains are implemented to tune the conventional PID controller as shown in **Figure 4**.

situation where the vehicle speed curve exists below the required speed curve and needs to

Upon determining linguistic quantification, the rule base of the control system is set to capture expert's knowledge on how to tune the system and describe applied control strategy. Since there are two input variables and three output variables, the possible rules can at most reach to

 (9) rules. These rules are listed in a tabular representation form as shown in **Tables 2** and **3**. The meaning of the above linguistic description is quantified via membership function, whereas triangular shape is considered in this study for all inputs as well as all outputs for its simplicity, linear grade distribution, and fairly limited availability of the relevant information about the linguistic terms. In due course, the selected membership functions and their associated universe of discourse as well as linguistic values of this study are revealed in **Figure 5**. The designed membership functions are overlapped, and the height of the intersection of each

Since a clear picture on the linguistic variables, rule base, and membership functions have been explained, we move to the important issue of how the exact fuzzy controller works. In doing so, the first component of fuzzy controller is fuzzification process which is the act of acquiring the value of the input variable and defining numeric magnitudes for the membership function that are set for that variable. After that, the inference mechanism takes the action

**1.** Matching the premise associated with all the rules to the controller inputs to determine which rules apply to the current condition. In other words, each rule in the rule base has different premise membership functions on the one hand and function of error and change

decrease applying torque to obtain the desired vehicle speed.

**Error**

**Error**

Change in error **N Z P**

Change in error **N Z P**

**N** N N Z **Z** N Z P **P** Z P P

Worked Example of X-by-Wire Technology in Electric Vehicle: Braking and Steering

http://dx.doi.org/10.5772/intechopen.76852

89

**N** Z Z PS **Z** Z PS PL **P** PS PL PL

32

two successive fuzzy sets is ½.

**Table 2.** Fuzzy rule base for proportional gain.

**Table 3.** Fuzzy rule base for integral and derivative gains.

through two steps:

The adopted linguistic values and their corresponding abbreviations in conjunction with their linguistic variables are summarized in **Table 1**.

This table provides a language to express the control decision-making process in the context of established input–output framework. For example, the statement "error is negative" can be referred to the situation where the vehicle speed curve exists above the desired speed and needs more braking force. In contrast, the statement "error is positive" can be referred to the


**Table 1.** Linguistic variables alongside their linguistic values and abbreviations.


**Table 2.** Fuzzy rule base for proportional gain.


**Table 3.** Fuzzy rule base for integral and derivative gains.

and derivative) gains are the output of the controller (linguistic outputs). Regarding linguistic inputs, there are other choices (such as integral of error) that could also be used as input variables, yet the selection variables make good intuitive sense, particularly as the input error is naturally engaged in the control problem of regulating process output around specific set point. The controller input variable however must have proper information available to provide good decision to derive vehicle speed into the desired speed to achieve high-performance operation based on fuzzy-PID tuning. On the other hand, the linguistic output variables are expressed as tuned (proportional, integral, and derivative) gains where the output values of these tuned

The adopted linguistic values and their corresponding abbreviations in conjunction with their

This table provides a language to express the control decision-making process in the context of established input–output framework. For example, the statement "error is negative" can be referred to the situation where the vehicle speed curve exists above the desired speed and needs more braking force. In contrast, the statement "error is positive" can be referred to the

**Linguistic variables Linguistic values Linguistic value**

Input Error Positive, zero, and negative P, Z, and N, respectively

Output Proportional gain Positive, zero, and negative P, Z, and N, respectively

**Table 1.** Linguistic variables alongside their linguistic values and abbreviations.

Integral gain Zero, positive small, and positive large Z, PS, and PL, respectively Derivative gain Zero, positive small, and positive large Z, PS, and PL, respectively

**abbreviation**

gains are implemented to tune the conventional PID controller as shown in **Figure 4**.

linguistic variables are summarized in **Table 1**.

**Figure 4.** Fuzzy-PID controller (MATLAB Simulink scheme).

88 New Trends in Electrical Vehicle Powertrains

Rate change of error

situation where the vehicle speed curve exists below the required speed curve and needs to decrease applying torque to obtain the desired vehicle speed.

Upon determining linguistic quantification, the rule base of the control system is set to capture expert's knowledge on how to tune the system and describe applied control strategy. Since there are two input variables and three output variables, the possible rules can at most reach to 32 (9) rules. These rules are listed in a tabular representation form as shown in **Tables 2** and **3**.

The meaning of the above linguistic description is quantified via membership function, whereas triangular shape is considered in this study for all inputs as well as all outputs for its simplicity, linear grade distribution, and fairly limited availability of the relevant information about the linguistic terms. In due course, the selected membership functions and their associated universe of discourse as well as linguistic values of this study are revealed in **Figure 5**. The designed membership functions are overlapped, and the height of the intersection of each two successive fuzzy sets is ½.

Since a clear picture on the linguistic variables, rule base, and membership functions have been explained, we move to the important issue of how the exact fuzzy controller works. In doing so, the first component of fuzzy controller is fuzzification process which is the act of acquiring the value of the input variable and defining numeric magnitudes for the membership function that are set for that variable. After that, the inference mechanism takes the action through two steps:

**1.** Matching the premise associated with all the rules to the controller inputs to determine which rules apply to the current condition. In other words, each rule in the rule base has different premise membership functions on the one hand and function of error and change

Therefore, as long as the input to the inference process (set of rules) is on, its corresponding output operates which is in the form of implied fuzzy sets. However, these implied fuzzy sets are then converted to crisp values (numeric values) by combining their effects to give the most certain controller outputs. The defuzzification process is obtained by bisector method which divides the area by a vertical line into two equal subregion areas. In addition, the mean of maximum and the largest of maximum are also applied to the system for the purpose of

Worked Example of X-by-Wire Technology in Electric Vehicle: Braking and Steering

http://dx.doi.org/10.5772/intechopen.76852

91

The vehicle model and controller algorithms are examined in MATLAB software. For the results of investigation and analysis, the initial vehicle-wheel speeds are set to 100 Km/h, whereas the desired vehicle speed is set to 5 Km/h. The reason of choosing 5 Km/h as the desired vehicle speed instead of zero Km/h is because slip ratio magnitude goes to infinity as vehicle speed approaches zero which in turn leads to inappropriate output behavior. On the other hand, selecting the desired low speed helps to examine maximum slip ratio that controls algorithm derives; hence, the ability to evaluate control performance and output response of

The output responses of fuzzy-PID controller for dry asphalt road type are presented in **Figure 6**, whereas **Figure 6(a)** demonstrates the output responses of vehicle-wheel, and **Figure 6(b)** shows the output responses of slip ratio. Yet, the output responses of traditional PID controller are imposed in the same figure (**Figure 6**) to illustrate the comparison between

As shown in **Figure 6(a)**, both controllers could derive stable output response smoothly. However, the output performance of the fuzzy-PID controller is much better than conventional PID controller since PID controller derives large steady-state error on the one hand and takes long time (approximately 15 seconds) to approach the desired vehicle speed (5 Km/h) on the other hand. In contrast, fuzzy-PID controller overcomes these problems being provided better output performance with zero steady-state error. As a result, fuzzy-PID controller could obtain the required vehicle speed within approximately 9 seconds which in turn assists to reduce stopping vehicle time 60% as compared to PID controller and more importantly the ability of fuzzy-PID controller to eliminate steady-state error to zero. Therefore, fuzzy-PID

On the other side, the output response of slip ratio associated with vehicle-wheel speed as shown in **Figure 6(b)** reveals smooth output response particularly before attaining the desired output speed. As depicted from the figure, the maximum slip ratio is the same for both controllers which approximately equals to 0.027. Though the maximum slip ratio magnitude seems a small value, the main cause for vehicle-wheel deceleration is considered since friction force between road surface and wheel surface principally depends on the slip ratio magnitude even though if the slip ratio possesses very small magnitude that may reach

validity in which both of them provide close output result.

**4. Simulation result and analysis**

the system will be more effective and visible.

traditional PID controller and fuzzy-PID controller.

controller shows superior and outstanding controller.

to mili-slip ratio.

**Figure 5.** Membership functions and their corresponding values. (a) Membership functions and their values for error input *e*(*t*). (b) Membership functions and their values for change of error ∆*e*(*t*). (c) Membership functions and their values for proportional gain. (d) Membership functions and their values for integral gain. (e) Membership functions and their values for derivative gain.

in error on the other hand; therefore, the quantification of the certainty that each rule base applies to the current condition can be obtained upon providing specific values for the error and change in error.

**2.** Determining the conclusion (what the control action to take) that should be applied by using selected rules to relate to the current situation. This conclusion is classified with a fuzzy set that signifies the certainty that the input to the plant should undertake various values.

Therefore, as long as the input to the inference process (set of rules) is on, its corresponding output operates which is in the form of implied fuzzy sets. However, these implied fuzzy sets are then converted to crisp values (numeric values) by combining their effects to give the most certain controller outputs. The defuzzification process is obtained by bisector method which divides the area by a vertical line into two equal subregion areas. In addition, the mean of maximum and the largest of maximum are also applied to the system for the purpose of validity in which both of them provide close output result.
