#### Abstract

The trajectory tracking of underactuated nonlinear system with two degrees of freedom is tackled by an adaptive fuzzy hierarchical sliding mode controller. The proposed control law solves the problem of coupling using a hierarchical structure of the sliding surfaces and chattering by adopting different reaching laws. The unknown system functions are approximated by fuzzy logic systems and free parameters can be updated online by adaptive laws based on Lyapunov theory. Two comparative studies are made in this paper. The first comparison is between three different expressions of reaching laws to compare their abilities to reduce the chattering phenomenon. The second comparison is made between the proposed adaptive fuzzy hierarchical sliding mode controller and two other control laws which keep the coupling in the underactuated system. The tracking performances of each control law are evaluated. Simulation examples including different amplitudes of external disturbances are made.

#### 1. Introduction

In the past few years, there has been a surge of interest in the control of underactuated systems. These systems have high practical relevance [1–3]. Their applications are widely used in real systems and arise especially in space and undersea robots [3], mobile robots [4], manipulators with structural flexibility [5], overhead cranes [6], and so on. However, the control of these systems still remains an open problem due to their nonlinear coupling and complex internal dynamics. In this connection, sliding mode is one of the robust controller design methods. Owing to its insensitivity to system parameter variations, fast response, and good transient performance, sliding mode control (SMC) has been successfully applied to underactuated systems [7–13]. Nonetheless, designing a common sliding mode controller for underactuated systems is not appropriate. In fact, a singularity problem is faced while computing the inverse of a nonsquare matrix. To avoid this issue, Aloui et al. [14] proposed an adaptive fuzzy sliding mode control (AFSMC) based on regular inverse to synthesize the continuous part of the sliding mode law. An additional term is added to the control law to compensate the approximation of the singular matrix. In [13], a moving adaptive fuzzy sliding mode control (MAFSMC) for underactuated systems is developed. The sliding surfaces are moved by changing the magnitude of the slopes by adaptive laws. These two approaches keep the coupling existing in the underactuated system. In fact, one sliding surface is assigned to synthesize the sliding mode controller thanks to the regular inverse properties [15].

Another approach developed in literature consists of decoupling the underactuated system in several subsystems and assigning a sliding surface for each subsystem. Then, a hierarchical sliding mode approach is proposed to control the whole system [16–18]. Moreover, many papers discussed the combination of fuzzy logic with hierarchical sliding mode control to cope with various control problems of underactuated systems [9, 17, 19–22].

A stable hierarchical sliding mode control for a class of second-order underactuated systems is presented in [16, 23]. This class is often studied in the research papers because it is simple enough to permit completing dynamic experiments and analysis and still involves dynamic coupling and strong nonlinearities. In [9], an adaptive law is derived to tune the coupling factor of the hierarchical sliding mode controller so as to achieve favorable decoupling performance. Nonetheless, this paper only discusses the regulation not the tracking problem. Hwang et al. [22] treated the trajectory tracking of uncertain underactuated nonlinear dynamic systems. Indeed, fuzzy systems are used to approximate the unknown system’s functions as well as the upper bound of uncertainties caused by fuzzy modeling errors. In addition, a comparison between an adaptive fuzzy hierarchical sliding mode control (AFHSMC) and hierarchical sliding mode control (HSMC) was made. However, the performances of this approach were not compared to coupled sliding mode controller performances.

In this paper, we are interested in the trajectory tracking problem of an underactuated system with two degrees of freedom. For this purpose, AFHSMC is developed. Its principal characteristics are as follows: First, fuzzy logic systems with appropriate learning laws are used to approximate the unknown system functions. Second, the coupling issue of underactuated systems is solved through the decoupling structure of the hierarchical sliding mode. Finally, chattering problem is eliminated thanks to the reaching law approach [9, 24–27]. The main contribution of this paper is the comparison made between three cases of reaching laws to show their different abilities in reducing the chattering phenomenon. Most of papers using the AFHSMC only present the general case. Moreover, a comparison with AFSMC and MAFSMC is presented to compare between coupled and decoupled control in terms of tracking performances of underactuated systems.

The remaining sections of this paper are organized as follows: in Section 2, the system description and the problem formulation are provided. Section 3 is devoted to the controller development. It involves the design of adaptive fuzzy hierarchical sliding mode controller and the stability analysis. Simulation results adopting different expressions of reaching laws on an inverted pendulum are presented. In Section 4, a comparative study with two coupled adaptive fuzzy sliding mode controllers, AFSMC and MAFSMC, is made. Some conclusions on the developed work end the paper.

#### 2. System Description and Problem Formulation

##### 2.1. System Description

Consider an underactuated nonlinear dynamic system with two degrees of freedom which is expressed as follows: where is the state variable vector ( denotes the transpose of ), is the control input vector, and is the output vector.

and , , are partially unknown continuous nonlinear functions and , , are unknown time-varying external disturbances. In the remainder of this paper, the time variable is omitted for abbreviation reason. However, without loss of generality, the following assumptions are considered.

*Assumption 1. *The state vector is available for measurement.

*Assumption 2. *Each control gain is finite and nonzero.

*Assumption 3. *The external disturbance is assumed to be bounded such that , , where the upper bound is known.

##### 2.2. Problem Formulation

Underactuated systems represent a challenging class of coupled nonlinear systems since the number of their inputs is fewer than the number of their outputs. The coupling that exists between the control input and the outputs causes a problem in the design of an adaptive fuzzy controller.

Based on these facts, the control objective of this paper is to design a hierarchical adaptive fuzzy sliding mode controller with suitable learning laws for a class of underactuated nonlinear dynamic systems so that the overall system is stabilized and the outputs are forced to follow the desired values.

To deal with the chattering dilemma, different reaching laws are presented. Finally, simulations are performed and a comparison with other adaptive sliding mode controllers such as AFSMC and MAFSMC is presented to evaluate the tracking performances of the different control laws.

#### 3. Design of Adaptive Fuzzy Hierarchical Sliding Mode Controller

##### 3.1. Controller Design

In this section, a fourth-order underactuated system is viewed as two subsystems with second-order canonical form including the states and . A sliding surface is designed for each subsystem, and, then, the control scheme is constructed by the combination of the equivalent controllers. We define 2 first-level sliding surfaces as follows:We note that where , , and and are positive constants. are the desired reference trajectory of the outputs . They are known bounded functions of time with bounded known derivatives and are assumed to be -time differentiable.

By differentiating the sliding surfaces with respect to time , we obtain the equivalent controllers as follows: Each one of the equivalent controllers presented above is designed to only stabilize its corresponding subsystem. Our control objective is then not satisfied.

Obviously, the total control law should be a combination of the equivalent controllers of each subsystem or the sliding surface should include both of the sliding surfaces. That is why we design a global sliding surface which is combining the two subsurfaces as follows: where and satisfy and .

*Comment 1. *The reason that we divide the whole system into two subsystems is to design the hierarchical structure of the sliding surface. The aim is not to compensate or eliminate the coupling in the system as [9].

The total control combines the equivalent controllers which stabilize the subsystems and a switching control to stabilize the whole sliding surface. So, the total controller is defined as follows: To calculate the switching controller, we proceed as follows.

First, we differentiate with respect to time; we can obtain Replacing by its expression (7), we obtainThen, we define the sliding mode reaching law which directly specifies the dynamics of the switching function and is generally described by the differential equation:where parameters and are positive and the scalar function satisfies the condition when .

Tuning parameters and yield different structures of the reaching law and help reducing the chattering phenomenon. Three different cases are presented.

*Case 1. *The constant rate reaching law is as follows:

*Case 2. *The constant plus proportional rate reaching law is as follows:

*Case 3. *The power rate reaching law is as follows:

*Comment 2. *There are many other reaching laws in the literature [24, 28, 29]. The ones presented above are just examples.

Using the general form (10), the switching controller can be deduced as follows:Substituting (5) and (14) into (7), we obtain

Since , , , and are partially unknown nonlinear functions, control law (15) cannot be obtained. Based on the learning functions, adaptive fuzzy hierarchical sliding mode control is used to approximate them. According to the universal approximation theorem [30], fuzzy logic systems (FLS) are capable of uniformly approximating any nonlinear function over a compact set to any degree of accuracy. A MISO fuzzy logic system performs a mapping from an input vector to an output variable [31]. The output of the FLS with central average defuzzification is expressed as follows:where is a vector grouping all consequent parameters and is a set of fuzzy basis functions defined bywhere , is the total number of rules, and is the membership function which represents the fuzzy meaning of the symbol . The fuzzy logic systems , , , and approximate , , , and , respectively, and they are obtained bywhere and are the corresponding adjustable parameter vectors of each fuzzy system which are tuned online. and are the fuzzy basis vectors.

Define the optimal parameter vectors , of the previous fuzzy systems: where Note that while assuming that the fuzzy parameter vectors and never reach the boundary of and , respectively, we can define the vector of the minimum approximation errors as follows: By incorporating FLS given below with hierarchical sliding mode control, resulting AFHSMC tracking control can be expressed as follows:

*Remark 4. *Parameters and are chosen such as .

Theorem 5. *Consider the class of underactuated nonlinear systems (1), the control law (22) where the functions and are given by (18) ensures that all the closed loop signals are bounded and the tracking errors converge to zero asymptotically. The parameter vectors and are given bywhere , , , and are positive constants.*

##### 3.2. Stability Analysis

The time derivative of can be obtained from (8) as follows:By replacing by its expression (22) and adding and subtracting , we obtainDefine **; ; and .So we can obtain **; ; and .Then,Consider now the following Lyapunov function:The time derivative of is Substituting (23) into (28) yields Furthermore, it can be proved from (30) that the global sliding surface is stable and the closed loop system is stable.

##### 3.3. Simulation Results

In order to test the effectiveness and the robustness of the proposed hierarchical sliding mode controller compared to other controllers, the model of the movable cart with an inverted pendulum considered as an underactuated system with two degrees of freedom has been simulated using the Matab/Simulink software. In the beginning, the four system functions of Figure 1 are described as follows: is the force input to move the cart; and , , , and represent the angle of the pendulum with respect to the vertical axis, the angular velocity of the pendulum with respect to the vertical axis, the position of the cart, and the velocity of the cart, respectively. is the acceleration of the gravity; is the length of the pendulum; is the mass of the cart; is the mass of the pole.

Let .

The external disturbances are given by . The control objective is to force the outputs and to track the desired trajectories and , respectively.

The parameter values of the inverted pendulum are given in Table 1.

To approximate the unknown nonlinear functions, three fuzzy sets are defined over interval for , , , and and their membership functions are, respectively, as follows: *Simulation 1*. We apply the AFHSMC presented in Section 3 to deal with the tracking issue. The initial conditions are chosen as . We choose the adaptation gains as and .

The numerical values of the controller parameters are chosen as follows: ; ; ; ; ; ; .

For verifying the reliability of this control law, the simulations for s are presented.

The 3 cases of the different reaching laws presented previously are simulated. The corresponding simulation results are shown in Figures 2–13.

*(i) Figures 2–5 Corresponding to the Constant Rate Reaching Law*. Figures 2–5 reveal simulation results for the first case of the reaching laws: .

The evolutions of position and velocity of the pendulum and the cart are displayed in Figures 2 and 3, respectively. They show the good performances of the controller in particularly the good tracking of the reference signals: , , , and . It is proved from Figure 4 that the sliding surfaces and are attractive. They are reduced to zero as expected. In Figure 5, it is shown that there is chattering in the control law. In fact, the choice of in the constant reaching law expression causes a problem: if is too small, the reaching time will be too long. On the other hand, a large value of will cause severe chattering.

*(ii) Figures 6–9 Corresponding to Constant Plus Proportional Rate Reaching Law*. Figures 6–9 show the simulation results when a constant plus proportional rate reaching law is used: . In Figures 6 and 7, we see that the tracking performances are satisfying. Figure 8 shows the convergence of zero of the sliding surfaces and their attractiveness. The control law is displayed in Figure 9. We can see that the chattering phenomenon is still existing but it is alleviated in comparison with the first case of the reaching laws. In fact, by adding the proportional rate term , the states are forced to approach the sliding surface faster when is large. Thus, using small values of reduces the chattering and does not affect the speed of convergence.

*(iii) Figures 10–13 Corresponding to Power Rate Reaching Law*. Figures 10–13 display the simulation results of AFHSMC using the power rate reaching law . Good trajectory tracking performances are shown in Figures 10 and 11. From Figure 12, we can see that the sliding surfaces are reduced to zero which confirms their attractiveness. Moreover, the control law curve displayed in Figure 13 shows that the chattering phenomenon is eliminated. This reaching law increases the reaching speed when the state is far away from the sliding surface but reduces the rate when the state is near the sliding surface. The result is a fast reaching and low chattering reaching mode. Since it has given the best results in trajectory tracking and chattering elimination, the notation AFHSMC is reserved to the control law using the power rate of the reaching laws in the rest of the paper.

#### 4. Comparison with Adaptive Fuzzy Sliding Mode Designed for Underactuated Systems

In this section, we consider the fourth-order underactuated system in its original coupled form. We aim at presenting a comparison between AFSMC for underactuated systems designed by Aloui et al. [14], MAFSMC [13], and the proposed approach developed in Section 3 which is defined as AFHSMC.

##### 4.1. Robust Adaptive Fuzzy Sliding Mode Control for Underactuated Systems

This control law is defined in [14] for MIMO underactuated systems. In this section, it is applied for the special case of underactuated systems defined previously. The control law is defined as follows:where , , and . is a positive constant and .

We also note that and .

The term is introduced in the control law in order to cancel the approximation error. It satisfies the following expression:where is a robust compensator of both fuzzy and PI approximation [14].

*Comment 3. * is a proportional integral switching structure which replaces the discontinuous term existing in the conventional sliding mode controller to attenuate the chattering resulting from fast and large bounded unknown disturbances.

##### 4.2. Moving Adaptive Fuzzy Sliding Mode Controller

Moving adaptive fuzzy sliding mode controller is characterized by its variable sliding surface [32]. The sliding surface is moved by changing the magnitude of the slope by adaptive law such thatThe resulting control law is expressed as follows:withwith .

*Comment 4. *Changing the magnitude of the slopes by adaptive laws (35) ensures a tradeoff between reaching phase and sliding phase which enhance the robustness of the control law against perturbations.

##### 4.3. Simulation Results

*Simulation 2*. To test the performances of AFHSMC, Figures 14–17 and 18–21 show, respectively, the results of simulating AFSMC and MAFSMC for the same system under the same conditions choosing the corresponding constants such as and .

Figures 14 and 15 reveal trajectories’ tracking of AFSMC. It is worth mentioning that the tracking performances are satisfying. The related sliding surfaces are presented in Figure 16. They almost asymptotically converge to zero. The control law displayed in Figure 17 shows the absence of chattering. In fact, a proportional integral adaptive term is used in the AFSMC to replace the discontinuous term which is generally the principle cause of this undesired phenomenon. Figures 18 and 19 present the tracking performances of MAFSMC. The sliding surfaces are displayed in Figure 20. They are reduced to zero as expected. The control law is presented in Figure 21. There is no chattering. Moreover, in order to show the robustness of the proposed control, slow and small disturbances and fast and large disturbances are examined. Table 2 summarizes the integral of the absolute error of the responses of the three methods presented in this paper to time-varying external disturbances. A choice of and is made.

By comparing the simulation results of the tracking performances of AFSMC for underactuated systems, MAFSMC, and the proposed approach AFHSMC, it can be seen that, under the conditions adopted in the presented simulations, the different algorithms have acceptable tracking performances and eliminate the chattering in the control law.

For a better evaluation of these three control methods, we adopt a quantitative comparison of tracking errors by using the integral of the absolute error (IAE):This comparison is made adopting slow and small disturbances in the first place and then fast and large disturbances in the second place.

Table 2 resumes the different IAE of the algorithms cited above.

After comparisons among simulations results, Figures 2–21 and Table 2, the following observations are drawn: we confirm the efficiency of the three algorithms when the disturbances are not very important. However, when the system is exposed to fast and large disturbances, the superiority of MAFSMC and AFHSMC on AFSMC is clear. In fact, with the AFSMC controller, the system cannot handle the important perturbations which affect the reaching phase and do not allow the system to reach the sliding phase. The same table shows that the tracking performances of MAFSMC are more accurate than AFHSMC. However, this control law requires a complicated calculation (the compensative term , the proportional integral switching term, the adaptive laws of the sliding surfaces coefficients, etc.). As a conclusion, both MAFSMC and AFHSMC give satisfactory results in terms of trajectories tracking and chattering elimination. Nonetheless, computing a decoupled sliding mode controller for an underactuated system seems to be easier than a coupled sliding mode controller which gives the superiority to AFHSMC.

#### 5. Conclusion

In this paper, the AFHSMC has been proposed for getting a compromise between tracking performance and robustness and to eliminate the undesired chattering of the control input signal resulting from the fast and large external disturbances for a class of underactuated systems with two degrees of freedom. The structure of the control system is assumed to be unknown so inference fuzzy systems are used to estimate those unknown functions. To deal with the chattering problem, different reaching laws are proposed and simulated for a movable cart with an inverted pendulum. In order to test the robustness of the proposed control law, a comparison with two other adaptive fuzzy sliding mode controllers, AFHSMC for underactuated systems and MAFSMC, is made. Simulation results confirm the robustness of both AFHSMC and MAFSMC, but taking into consideration the difficulty of the calculation of the control law in the MAFSMC case, the proposed method is considered better.

#### Competing Interests

The authors declare that there are no competing interests regarding the publication of this paper.