1 Introduction

The most important functional features of the car suspension system are providing the best car handling as well as improving passenger ride comfort [1]. Keeping continuous road-wheel contact increases the quality of driving. In the other side, isolating car body from unpleasant road disturbances improves the riding comfort. Hence, a tradeoff between these two conflict issues must be performed [2]. For example, having a soft suspension system is a priority in the family cars while, stiffer suspensions are preferred in sport cars. The active suspension system tries to provide both better ride comfort and car holding [3].

Recently, many control methods have been proposed to overcome these suspension problems. Linear Quadratic Gaussian (LQG) control [4], Linear Quadratic Regulator (LQR) control [3, 5], adaptive control [6], robust control [7,8,9], non-linear control [5, 10, 11], optimal control method [1] and PID control [12] have been utilized for controlling the active suspension system. In addition, some intelligent methodologies such as Fuzzy Logic Control (FLC) [3], Neural Network (NN) methods [13], Genetic Algorithm (GA) [9, 14] and the combination of the mentioned methods have been applied for active suspension system.

In this paper, Fuzzy Logic Self-Tuning PID (FLST-PID) is proposed as the strategy for controlling the active suspension system. In addition, other controllers like PID, FLC and \(\hbox {H}\infty \) are designed for this system and the results are compared with the proposed method.

The remainder of this paper is organized as follows. In Sect. 2 the mathematical model of the active suspension system based on half car model is presented. Section 3 concerns the controller design strategy for the system. In this section, the principle and the designing steps of PID, FLC, \(\hbox {H}\infty \) and the FLST-PID controller is represented. Section 4 dedicated to presenting the simulation results of designing the controllers for the active suspension system and the resultant discussion. The next part of this section comprises the ability of the proposed method and the other controllers in attenuating the disturbances and overcoming the uncertainties. Finally, the paper is concluded in Sect. 5.

2 Mathematical model of the active suspension system

Figure 1 presents the schematic of half-car model. This model has been widely used to model and design the controller for active suspension system. Some studies, like [1, 3, 7, 10, 15] are only a few examples presenting the application of this model in controlling the suspension system.

Fig. 1
figure 1

A half-car active suspension model [10]

In this figure, \(x_{bf}\) and \(x_{br}\) are used to denote the front and rear body displacement respectively; \(L_f \) and \(L_r \) stand the distance between the front and the rear axle and the center of mass; \(x_b \) is the center of mass displacement; \(\theta _0 \) is the pitch angle; The mass of the car body and the front and rear wheels are denoted by \(m_b , m_{wf} \) and \(m_{wr} \); \(I_b \) stands for the pitch moment of the inertia about the center of mass; the front and rear mass displacements are marked by \(x_{wf} \) and \(x_{wr} \), respectively. In addition, \(w_f , w_r , k_{wf} \) and \(k_{wr} \) are dedicated to the front and rear terrain height displacements and stiffness of the front and rear wheel, while \(c_{bf} \) and \(c_{br} \) are the stiffness of the passive elements of the front and rear wheels respectively. \(k_{bf} ,k_{br} , f_f \) and \(f_r \) are devoted to the front and rear tire stiffness, and the front and rear actuator force inputs, respectively [7, 10]. Using Newton’s second law, the dynamic equations of motion for this system can be derived as follows [3].

$$\begin{aligned}&m_b \ddot{x}_b +c_{bf} (\dot{x}_{bf} -\dot{x}_{wf} )+k_{bf} (x_{bf} -x_{wf} ) \nonumber \\&\quad +\, c_{br} (\dot{x}_{br} -\dot{x}_{wr} )+k_{br} (x_{br} -x_{wr} )-f_f -f_r =0. \end{aligned}$$
(1)
$$\begin{aligned}&I_b \ddot{\theta }_b +L_f c_{bf} (\dot{x}_{bf} -\dot{x}_{wf} )+k_{bf} (x_{bf} -x_{wf})\nonumber \\&\quad - L_r c_{br} (\dot{x}_{br} -\dot{x}_{wr} )+k_{br} (x_{br} -x_{wr} )-f_f -f_r =0. \end{aligned}$$
(2)
$$\begin{aligned}&m_{wf} \ddot{x}_{wf} -c_{bf} (\dot{x}_{bf} -\dot{x}_{wf} )+k_{bf} (x_{bf} -x_{wf} ) \nonumber \\&\quad +\, k_{wf} (x_{wf} -w_f )=0. \end{aligned}$$
(3)
$$\begin{aligned}&m_{wr} \ddot{x}_{wr} -c_{br} (\dot{x}_{br} -\dot{x}_{wr} )+k_{br} (x_{br} -x_{wr} ) \nonumber \\&\quad +\, k_{wr} (x_{wr} -w_r )=0. \end{aligned}$$
(4)

In this system, the pitch angel can be defined as:

$$\begin{aligned} \theta _b =\frac{x_{bf} -x_{br} }{L_f +L_r }. \end{aligned}$$
(5)
Table 1 The values of the system parameters [3]

By substituting (3) into (1) and (4) into (2), the following equations yield:

$$\begin{aligned}&\frac{m_b }{L_f +L_r }(L_f \ddot{x}_{bf} +L_r \ddot{x}_{br} )\nonumber \\&\quad +\, c_{bf} (\dot{x}_{bf} -\dot{x}_{wf} )+k_{bf} (x_{bf} -x_{wf} ) \nonumber \\&\quad +\, c_{br} (\dot{x}_{br} -\dot{x}_{wr} )\nonumber \\&\quad +\, k_{br} (x_{br} -w_{wr} ) - f_f -f_r =0, \end{aligned}$$
(6)
$$\begin{aligned}&\frac{I_b }{L_f +L_r }(\ddot{x}_{bf} -\ddot{x}_{br} )\nonumber \\&\quad +\, L_f [c_{bf} (\dot{x}_{bf} -\dot{x}_{wf} )+k_{bf} (x_{bf} -x_{wf} ) \nonumber \\&\quad - \,f_f ]-L_r [c_{br} (\dot{x}_{br} -\dot{x}_{wr} )\nonumber \\&\quad +\, k_{br} (x_{br} -x_{wr} )-f_r ]=0. \end{aligned}$$
(7)

Considering the state variable as (8), the state space of the system can be rewritten as (9):

$$\begin{aligned} x= & {} [x_1 x_2 x_3 x_4 x_5 x_6 x_7 x_8 ]^{T} \nonumber \\= & {} [\dot{x}_{bf} \dot{x}_{wf} \dot{x}_{br} \dot{x}_{wr} x_{bf} x_{wf} x_{br} x_{wr} ]^{T}, \end{aligned}$$
(8)
$$\begin{aligned} \dot{x}= & {} Ax+Bu+Gw. \end{aligned}$$
(9)

In this model the AB and G matrices can be represented as:

$$\begin{aligned} A=\left[ {{\begin{array}{ll} {A_1 }&{} {A_2 } \\ I&{} 0 \end{array} }} \right] , \end{aligned}$$
(10)

where

$$\begin{aligned} A_1= & {} \left[ {{\begin{array}{c@{\quad }c@{\quad }c@{\quad }c} {-\dfrac{c_{bf} }{m_b }-\dfrac{I_f^2 c_{bf} }{I_b }}&{} {\dfrac{c_{bf} }{m_b }+\dfrac{I_f^2 c_{bf} }{I_b }}&{} {-\dfrac{c_{br} }{m_b }+\dfrac{I_f I_r c_{br} }{I_b }}&{} {\dfrac{c_{br} }{m_b }-\dfrac{I_f I_r c_{br} }{I_b }} \\ {\dfrac{c_{bf} }{m_{wf} }}&{} {-\dfrac{c_{bf} }{m_{wf} }}&{} 0&{} 0 \\ {-\dfrac{c_{bf} }{m_b }+\dfrac{I_f I_r c_{bf} }{I_b }}&{} {\dfrac{c_{bf} }{m_b }-\dfrac{I_f I_r c_{bf} }{I_b }}&{} {-\dfrac{c_{br} }{m_b }-\dfrac{I_r^2 c_{br} }{I_b }}&{} {\dfrac{c_{br} }{m_b }+\dfrac{I_r^2 c_{br} }{I_b }} \\ 0&{} 0&{} {\dfrac{c_{br} }{m_{wr} }}&{} {-\dfrac{c_{br} }{m_{wr} }} \\ \end{array} }} \right] ,\nonumber \\ A_2= & {} \left[ {{\begin{array}{l@{\quad }l@{\quad }l@{\quad }l} {-\dfrac{k_{bf} }{m_b }-\dfrac{I_f^2 k_{bf} }{I_b }}&{} {\dfrac{k_{bf} }{m_b }+\dfrac{I_f^2 k_{bf} }{I_b }}&{} {\dfrac{k_{br} }{m_b }-\dfrac{I_f^2 k_{br} }{I_b }}&{} {-\dfrac{k_{br} }{m_b }+\dfrac{I_f^2 k_{br} }{I_b }} \\ {\dfrac{k_{bf} }{m_{wf} }}&{} {-\dfrac{k_{bf} +k_{wf} }{m_{wf} }}&{} 0&{} 0 \\ {-\dfrac{k_{bf} }{m_b }+\dfrac{I_f I_r k_{bf} }{I_b }}&{} {\dfrac{k_{bf} }{m_b }-\dfrac{I_f I_r k_{bf} }{I_b }}&{} {-\dfrac{k_{br} }{m_b }-\dfrac{I_r^2 k_{br} }{I_b }}&{} {\dfrac{k_{br} }{m_b }+\dfrac{I_r^2 k_{br} }{I_b }} \\ 0&{} 0&{} {\dfrac{k_{br} }{m_{wr} }}&{} {-\dfrac{k_{br} +k_{wr} }{m_{wr} }} \\ \end{array}}} \right] ,\nonumber \\ B= & {} \left[ {{\begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} {\dfrac{1}{m_b }+\dfrac{L_f^2 }{I_b }}&{} {-\dfrac{1}{m_{wf} }}&{} {\dfrac{1}{m_b }-\dfrac{L_f L_r }{I_b }}&{} 0&{} 0&{} 0&{} 0&{} 0 \\ {\dfrac{1}{m_b }-\dfrac{L_f L_r }{I_b }}&{} 0&{} {\dfrac{1}{m_b }+\dfrac{L_r^2 }{I_b }}&{} {-\dfrac{1}{m_{wr} }}&{} 0&{} 0&{} 0&{} 0 \\ \end{array}}} \right] ^{ T}, \nonumber \\ G= & {} \left[ {{\begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} 0&{}{\dfrac{k_{wf} }{m_{wf} }}&{} 0&{} 0&{}0&{} 0&{} 0&{} 0 \\ 0&{} 0&{} 0&{} {\dfrac{k_{wr} }{m_{wr} }}&{}0&{} 0&{} 0&{} 0 \\ \end{array} }} \right] ^{T}. \end{aligned}$$
(11)

Where the symbols I and 0 are dedicated to identity and zero matrices, respectively. To drive a numerical model, the values of the system’s parameters are replaced by the Table 1.

3 Controller design for the active suspension system:

As we know, the controller is used for many purposes such as achieving the internal stability, trajectory tracking, reducing the noise effect, decreasing the sensitivity to the variation of model parameters and attenuating the effect of disturbances. In this study, four types of controllers consist of PID, FLC, \(\hbox {H}\infty \) and FLST-PID controller are designed for the road disturbance rejection. In the next subsections, the introduction of the mentioned controllers and the designing rules are represented.

3.1 PID controller

PID as one of the most popular controllers which is utilized in various systems, computes the control signal based on the following equations:

$$\begin{aligned} u(t)= & {} K_p e(t)+K_i \int {e(t)dt} +K_d \frac{d}{dt}e(t), \end{aligned}$$
(12)
$$\begin{aligned} e(t)= & {} r(t)-y(t). \end{aligned}$$
(13)

where u(t), r(t), y(t) and e(t) are the control, reference, output and error signal and \(K_p \), \(K\) \(_{i}\) and \(K_d \) are the proportional, integral and derivative terms, respectively. These parameters, as the most important parts of the control signal, should be computed and tuned. The changes in the controller parameters have some effects on the performance of closed loop system.

The appropriate performance of PID controller depends on the optimal selection and tuning of the controller terms [2]. Iterative learning algorithm [6], Ziegler–Nichols tuning criterion [2, 12] and heuristic tuning [16] are some of interesting approaches of tuning PID, utilized in designing the PID controller for active suspension systems [17].

3.2 Fuzzy logic controller

Designing fuzzy controllers consist of three stages: input, processing and output. On the input stage or “fuzzification”, the crisp input value converts to a fuzzy value. During the processing stage, through considering an appropriate fuzzy rule base, the results generate and combine. Finally, the output stage or “defuzzification” converts the combined results back into a specific control output value [18].

There are various methods for selecting the input variable of fuzzy controller such as body displacement error and its change, body velocity error and its change and body acceleration error and its change [19]. In this paper, body velocity error and its change, acceleration error, are considered as the inputs and the force is assumed as the output. For the inputs and the output, 5 levels are noticed as Negative Large (NL), Negative Small (NS), Zero (ZE), Positive Small (PS) and Positive Large (PL). Figures  2, 3 and 4 represent the membership functions used for the fuzzy controller inputs and output.

Fig. 2
figure 2

Membership function of the input variable “velocity”

Fig. 3
figure 3

Membership function of the input variable “acceleration”

Fig. 4
figure 4

Membership function of the output variable “force”

3.3 Self-tuning PID controller based on fuzzy logic

When the operating condition changes, the designed controller doesn’t have good performance, necessarily. In other words, although the classical PID controller keeps a zero steady-state error to a step input, but it also has undesirable speed overshoot, sensitivity to controller gains and slow response due to changes in system parameters [20]. Utilizing the self-tuning PID controller is an appropriate solution to dominance these conditions [21].

Against the conventional PIDs, in FLST-PID, the gain values of PID parameters are changed during controlling the system and tuned based on the fuzzy logic rules. This controller, known as an auto-adaptive controller, uses the error and the change of error as its inputs and can meet the desire of self-tuning parameters based on e and \(\dot{e}\) [22]. There are many intelligent methods for tuning the controller parameters in which the fuzzy logic rules are used for this purpose [23, 24]. Figure 5 presents the structure of the FLST-PID.

Similar to FLC, velocity error (ve) and its changes (ce) are considered as inputs for fuzzy inference in this section. The membership functions of the inputs are completely similar to FLCs (Figs. 2, 3). Moreover, three outputs i.e. \(K_p , K_I\) and \(K_D \) are obtained from the fuzzy inference. The input variables are classified as bellows: Negative Large (NL), Negative Small (NS), Zero (ZE), Positive Small (PS) and Positive Large (PL). For the output variables seven levels are considered as Positive Very Small (PVS), Positive Small (PS), Positive Medium Small (PMS), Positive Medium (PM), Positive Medium Large (PML), Positive Large (PL) and Positive Very Large (PVL). For example, the membership function for one of the outputs \((K_p )\) is presented in Fig. 6.

Fig. 5
figure 5

The structure of the FLST-PID [24]

Fig. 6
figure 6

Membership function of the output variable “\(K_p \)

Membership functions are assumed Triangular form. The fuzzy rules for designing the outputs based on the error and its changes are presented in Tables  2, 3 and 4. They contain the rules for tuning the PID parameters [24]. It is notable that the minimum is selected for the fuzzy inference engine. Moreover, the control signal can be determined using the center average deffuzification method.

Table 2 Fuzzy rules for computing \(K_p\)
Table 3 Fuzzy rules for computing \(K_i\)
Table 4 Fuzzy rules for computing \(K_d\)

It is notable that unlike the conventional PID with constant coefficients, in the FLST-PID, the gain values vary during the controlling process based on the error and its changes. Thus, the “self-tuning” term is qualified for the proposed structure.

3.4 \(\hbox {H}\infty \) controller

In order to evaluate the competence of the proposed method, the performance of the FLST-PID is compared to the PID and FLC. In addition, \(\hbox {H}\infty \) as one of the robust controller is employed to have a more challenging comparison. Therefore, this controller is designed for the active suspension system based on half car model. \(\hbox {H}\infty \) is used to achieve stabilization with guaranteed performance. In this method, the control problem becomes to a mathematical optimization problem in order to find the controller that solves this optimization [9]. Considering the standard configuration of a control problem as Fig. 7 yields:

Fig. 7
figure 7

General control configuration

$$\begin{aligned} \left[ {\begin{array}{l} z \\ v \\ \end{array}} \right] =P(s)\times \left[ {\begin{array}{l} \omega \\ u \\ \end{array}} \right] =\left[ {{\begin{array}{ll} {P_{11} (s)}&{} {P_{12} (s)} \\ {P_{21} (s)}&{} {P_{22} (s)} \\ \end{array} }} \right] \times \left[ {\begin{array}{l} \omega \\ u \\ \end{array}} \right] . \end{aligned}$$
(14)

In (14), P(s) is the linear system, \(\omega , u\) and z are the exogenous and control inputs and controlled output signals and v represent the measured variables. v is used in K to calculate the control variable u.

$$\begin{aligned} u=K(s)\times v. \end{aligned}$$
(15)

The relation between \(\omega \) and z can be defined as:

$$\begin{aligned} z=F_l (P,K)\times \omega , \end{aligned}$$
(16)

where \(F_l\) is described as:

$$\begin{aligned} F_l (P,K)=P_{11} +P_{12} K(I-P_{22} K)^{-1}P_{21} . \end{aligned}$$
(17)

Hence, finding a controller K such that \(F_l (P,K)\)is minimized according to the \(\hbox {H}\infty \) norm is the main objective of designing the \(\hbox {H}\infty \) controller. Several methods can be employed for solving the optimal problem and designing the \(\hbox {H}\infty \) controller [25, 26].

4 Simulation results and discussion

In this section, the simulation of half-car suspension system is performed based on the introduced structure of controllers. Using the mathematical model of the system (Eqs. (9, 10, 11)) as well as the numerical value of the parameters (Table 1) lead to a numerical model which is utilized in the simulation. Two types of road disturbances on each wheel are considered here as the inputs. Moreover, some uncertainties on the masses are inserted to the input disturbance in the third subsection.

4.1 Sinusoidal input

Sinusoidal input with amplitude of 0.1 m and frequency of 10 Hz is the first type of road disturbance as shown in Fig. 8 [16]. The performance of the active system using PID, FLC, \(\hbox {H}\infty \) and FLST-PID controllers for the vertical body displacement for the sin wave input are presented in Fig. 9. Moreover, Fig. 10 shows the control signal of the proposed controllers.

Fig. 8
figure 8

Displacement for sinusoidal input road profile

Fig. 9
figure 9

Body displacement for sinusoidal input

A comparison between the performance of the controllers in term of maximum overshoot, Mean Square Error (MSE) and the maximum of control signal are presented in Table 5. As can be comprehended from the Table 5, the proposed structure (FLST-PID) has the best performance. It means, this controller has the lowest values of displacement and MSE. Moreover, although \(\hbox {H}\infty \) has the lowest maximum control signal, the overall used forces for attenuating the sin disturbance in the FLST-PID structure is optimized. Therefore, the active suspension system utilizing this approach performs better as compared to the others.

Fig. 10
figure 10

Control signals of the controllers for sinusoidal input

Table 5 A comparison between the performances of the controllers for sinusoidal input

4.2 Bump and hole input

The bump and hole is the second input disturbance introduced as the road profile. This input represents a vehicle motion when hitting a hole of 0.1 m height and hole of 0.1 m depth as shown in Fig. 11. Similar to sine wave input, the performance of the active suspension systems, in term of vertical displacement of the body and the control signal of the proposed controllers are illustrated in Figs. 12 and 13, respectively.

Fig. 11
figure 11

Displacement for bump and hole input road profile

Fig. 12
figure 12

Body displacement for bump and hole input

Fig. 13
figure 13

Control signals of the controllers for bump and hole input

Table 6 A comparison between the performances of the controllers for bump and hole input

Table 6 represents the comparison between the performance of the controllers for the active suspension system considering the bump and hole input. As can be seen, the proposed structure of the controller has the best performance in terms of MSE, maximum overshoot and control signal, albeit the settling time of \(\hbox {H}\infty \) is minimized. Overall, the FLST-PID can effectively absorb the vehicle vibration which guarantees better ride comfort. Moreover, the variations of PID gains in the proposed controller for the bump and hole input are presented in Fig. 14. The flexibility of the PID terms improved the performance of FLST-PID in attenuating the disturbance and uncertainties.

Fig. 14
figure 14

The variations of PID gains in the proposed controller for the bump and hole input

4.3 Combination of bump and hole input and uncertainty

In this section, the bump and hole is the selected input disturbance for the road profile once again. The difference is that an 20% increase in the all of the mass values of active suspension system model (include the masses of car body and the front and rear wheel) is assumed. Afterwards, the designed controllers for nominal values of system parameters are applied to the uncertain system. The performances of the active suspension systems, in term of vertical displacement of the body and the control signal of the proposed controllers are illustrated in Figs. 15 and 16, respectively.

Fig. 15
figure 15

Body displacement for the combination of uncertainty and bump and hole input

Fig. 16
figure 16

Control signals of the controllers for the combination of uncertainty and bump and hole input

Table 7 represents the comparison between the performance of the controllers for the active suspension system in the case of combination of uncertainty and disturbance. As can be observed, the performance of the FLST-PID and \(\hbox {H}\infty \) (which have the adaptive and robust structure, respectively) are significantly better than the PID and FLC. This illustrates the competence of adaptive and robust techniques in designing controllers, especially when the system parameters may be changed. The comparison between FLST-PID and \(\hbox {H}\infty \) indicates that for the initial times (less than fourth second) \(\hbox {H}\infty \) works more appropriately, while for the remaining time (larger than fourth second) FLST-PID has the more acceptable performance. The reason is the self-tuning structure of proposed controller. In the beginning, the PID coefficients are equal to controller terms which is designed for the nominal system. After the controller parameters tuned based on fuzzy rules, the performance of the FLST-PID is improved gradually. Therefore, the proposed structure has a higher ability in dominance the uncertain condition in total.

Table 7 A comparison between the performances of the controllers for combination of uncertainty and bump and hole input

5 Conclusion

In this paper a self-tuning PID controller based on fuzzy logic is suggested for the control of car active suspension system. The purpose of designing the controller is improving the ride comfort by cancelling the road disturbance. The considered model for the system is a half car model. Moreover, three other active controllers namely; PID, FLC and \(\hbox {H}\infty \) are designed for the disturbance rejection. The results of the simulation for two types of disturbances show that FLST-PID controller has the lowest overshoot, MSE and control signal values which leads to improve the safety and comfort. In addition, the simulation result of the combination of disturbance and uncertainty clarifies the present controller has the best performance after tuning its parameters. The ability of the proposed structure in the attenuating of the combination of disturbance and uncertainty in comparison to the other controllers indicates the selected structure can improve the ride comfort.