1 Introduction

Due to its robustness, adaptivity, and simplicity, the sliding mode strategy has emerged as a widely used approach in the control and automation fields. It is particularly suitable for handling nonlinear models, including the Pneumatic Artificial Muscle (PAM) system, which is inherently nonlinear. However, a common sliding-mode controller may not perform satisfactorily when applied to PAM systems with underactuated characteristics. Sliding Mode Control encompasses two key modes: reaching mode and sliding mode [1, 2]. During the reaching mode, the system trajectory progressively approaches the switching surface within a finite time. Subsequently, in the sliding mode, the trajectories exhibit a “sliding” behavior, smoothly converging towards the origin of the phase plane. An important characteristic of the sliding mode is its ability to ensure that the system behavior strictly adheres to the sliding surface, regardless of parametric uncertainties and disturbances. A challenge associated with sliding mode control is the occurrence of chattering caused by the high-frequency switching of the control signal. Chattering poses a significant concern in real-time systems, as it may lead to severe actuator damage and is therefore considered undesirable. The chattering problem in sliding mode control has been extensively addressed in the literature, as evident from various approaches proposed in references [3,4,5,6,7,8,9,10]. Among these approaches, the boundary layer method is the most commonly employed for chattering reduction [8,9,10]. By smoothing the control law, these methods successfully suppress chattering to a certain extent. However, this comes at the expense of sacrificing the robustness of the sliding mode controller, as it compromises the desired finite-time convergence to the sliding surface. Instead, the trajectories converge to a region or boundary close to the sliding surface, negatively impacting the controller’s overall robustness.

Besides the chattering phenomenon, the complexity and uncertainties associated with PAM systems pose challenges in designing effective controllers. Therefore, there is a pressing need for adaptive and intelligent algorithms to support the sliding mode control strategy. Researchers have recognized this challenge and explored new approaches to enhance control quality and overcome the limitations of conventional controllers. For example, in the work [11], a control design based on reinforcement learning was introduced for a pneumatic gearbox actuator. Other modern and adaptive approaches have also been considered and applied to PAM systems, such as model-free techniques for gripper fingers [12] and adaptive controllers for PAM subjects [28,29].

In this paper, we propose the utilization of RBFNN to approximate the uncertain parameters of an antagonistic configuration of PAMs and integrate it into a sliding mode control strategy. This approach aims to maintain excellent control quality and stability by leveraging the adaptive capabilities of RBFNN to mitigate the effects of model inaccuracies and eliminate chattering phenomena.

The remainder of this paper is organized as follows. Section 2 presents the experimental setup and the mathematical model of the PAM system. The subsequent Sect. 3 details the design of the proposed RBF-SMC controller, including a scheme design and a comprehensive analysis of the stability of the closed-loop system. In Sect. 4, the experimental results are presented to validate the effectiveness of the proposed methodology. Finally, Sect. 5 concludes the paper, summarizing the contributions and discussing potential future research directions.

2 System modeling

Figure 1a depicts the model of the pneumatic experimental platform on which the experiment was conducted. A pair of PAMs positioned antagonistically in the working object, simulating a human muscle. A single pneumatic artificial muscle has a nominal length of 400 mm and a diameter of 25 mm. Control valves (SMC, ITV2030-212 S-X26) regulate pressure and measure it. A potentiometer (WDD35D8T) records the angle as the pulley wheel rotates in response to a difference in pressure between two PAMs. An embedded controller (National Instrument’s MyRIO1900) will receive all that information, enabling us to intervene in the system using a computer. In Fig. 1b, the working principle of the configuration is depicted. Initially, both PAMs have equal pressure, leading to an identical level of contraction \(x_0\), and the pulley’s initial angle is set at \(\theta _0 = 0^{\circ }\). When a pressure difference \(\Delta P\) is applied, with one PAM pressurized and the other depressurized, the lengths of the two PAMs will vary, inducing rotation of the pulley and causing a consequent change in joint angle \(\theta \). The pressure values applied to each PAM are represented as \(P_{e}\) and \(P_{f}\), and they can be calculated as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} P_{e} = P_0 + \Delta {P}\\ P_{f} = P_0 - \Delta {P} \end{array}\right. } \end{aligned}$$
(1)

in which e and f correspond to the contraction and relaxation states of the PAM, respectively. The PAMs’ contractions (\(x_e\) and \(x_f\)) are determined from their initial value (\(x_0\)) and the pulley’s angle (\(\theta \)) as:

$$\begin{aligned} {x}_{e,f}=x_0\pm R\theta \end{aligned}$$
(2)
Fig. 1
figure 1

Experimental setup utilizing two opposing PAMs: a the real image of the system and b its schematic diagram

To obtain the total torque generated by the two PAMs, the following equation can be used:

$$\begin{aligned} T = (F^{PAM}_{e} - F^{PAM}_{f})R \end{aligned}$$
(3)

In this antagonistic configuration, R represents the radius of the pulley, and \(F^{PAM}_{e}\) and \(F^{PAM}_{f}\) represent the forces generated by each PAM. By employing the three-element model of a single PAM [30], these forces can be computed using the following expressions:

$$\begin{aligned} {\left\{ \begin{array}{ll} F^{PAM}_{e}= F_{e} - B_{e}{\dot{x}}_{e} - K_{e}x_{e}\\ F^{PAM}_{f}= F_{f} - B_{f}{\dot{x}}_{f} - K_{f}x_{f} \end{array}\right. } \end{aligned}$$
(4)

In the provided equation, the spring, dam**, and contractile force coefficients are represented by K, B, and F, respectively, and they are functions of the pressure supplied to PAM as

$$\begin{aligned} {\left\{ \begin{array}{ll} K(P) &{}= K_0 + K_1P\\ B(P) &{}= B_{0e,f} + B_{1e,f}P\\ F(P) &{}= F_0 + F_1P \end{array}\right. } \end{aligned}$$
(5)

Given similar mechanical properties of the two PAMs, Eqs. 1, (2), (3), (4), and (5) can be used to obtain the torque T:

$$\begin{aligned} \begin{aligned} T&=\left[ 2F_1-2K_1 x_0-(B_{1e}-B_{1f})R{\dot{\theta }} \right] r\Delta P\\&\quad - \left[ B_{0e}+B_{0f}+(B_{1e}+B_{1f})P_0\right] R^2{\dot{\theta }}\\&\quad -(2K_0+2K_1P_0)R^2\theta \end{aligned} \end{aligned}$$
(6)

Hence, considering the presence of disturbances in any system, the dynamic behavior of the system can be described by the following equation:

$$\begin{aligned} {\ddot{\theta }} = \frac{T}{J}={\lambda _3}{{\dot{\theta }}} + {\lambda _2}\theta + {\lambda _1} + {\lambda _0}\Delta P + d \end{aligned}$$
(7)

where J denotes the pulley’s moment of inertia, \(\textit{d}\) represents external disturbances with the assumption that it is bounded as \(\vert d \vert \le D\), D is a positive constant, and the parameters \(\lambda _i\) of the mathematical model are specified as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} \lambda _1 = \displaystyle {\frac{\left[ 2F_1-2K_1x_0-(B_{1e} -B_{1f})r{\dot{\theta }}\right] r}{J}}\\ \lambda _2 = \displaystyle {\frac{-(2K_0+2K_1P_0)r^2}{J}}\\ \lambda _3 = \displaystyle {\frac{-\left[ B_{0e}+B_{0f}+(B_{1e} +B_{1f})P_0\right] r^2}{J}} \end{array}\right. } \end{aligned}$$
(8)

The parameters \(\lambda _3 = 7.35 \times 10^{-4}\), \(\lambda _2 = -4.83\), \(\lambda _1 = 205\), and \(\lambda _0 = 18.01\) are obtained through the identification procedure, as reported in [31].

3 Control design

According to Eq. (7), the PAM system can be rewritten by the following equation:

$$\begin{aligned} \ddot{\theta }= \left( {\lambda _3}{{\dot{\theta }}} + {\lambda _2}\theta + {\lambda _1}\right) +{\lambda _0}u + d \end{aligned}$$
(9)

in which \(u = \Delta P\) represents the control signal. By setting \( f(\theta ,{{\dot{\theta }}}) = {\lambda _3}{{\dot{\theta }}} + {\lambda _2}\theta + {\lambda _1}\), we have

$$\begin{aligned} \ddot{\theta }= f(\theta ,{{\dot{\theta }}}) + {\lambda _0}u + d \end{aligned}$$
(10)

where \(f( \cdot )\) represents an uncertain component. Let \(\theta _d\) be the desired output position signal, and the tracking error is:

$$\begin{aligned} e = \theta _d - \theta \end{aligned}$$
(11)

The sliding mode function is constructed as:

$$\begin{aligned} s = \dot{e} +c e \end{aligned}$$
(12)

where \(c > 0\). If f is known, the control law can be designed as:

$$\begin{aligned} u =\dfrac{1}{\lambda _0}[-f({{\varvec{x}}}) + \ddot{\theta }_d + c\dot{e} + k sgn(s)] \end{aligned}$$
(13)

where \(k > 0\) represents a constant rate and \(sgn(\cdot )\) is the sign function.

Fig. 2
figure 2

RBF Neural network-based control diagram

To increase control accuracy and adjust to parameter fluctuations, this work aims to introduce an SMC strategy combined with the RBFNN for uncertainty estimation purposes and simultaneously apply it to the PAM configuration. The adaptive law will result in stable closed-loop systems and is theoretically proven by the Lyapunov stability theory. The block scheme of the proposed closed-loop neural-based control system, in which an RBFNN is used to generate control legislation, is presented in Fig. 2. The desired signal, denoted as \(\theta _d\), represents the target trajectory, while the output signal \(\theta \) corresponds to the actual joint angle measured by a potentiometer, and \({{\varvec{x}}} = [\theta ,{{\dot{\theta }}}]^{T}\) is the system’s state vector

The closed-loop control system allows for feedback, whereby the tracking error is used to provide input to the RBFNN, the adaptive mechanism, and the SMC controller. The uncertain component \(f({{\varvec{x}}})\) is estimated through the adaptive clustering process and subsequently transmitted to the controller. Two electrical valves adjust the pressures, denoted as \(P_1\) and \(P_2\), applied to the two antagonistic PAMs based on the control signal u to achieve the desired motion.

Fig. 3
figure 3

The 2-m-1 RBFNN structure

In this research, the 2-m-1 RBFNN structure (Fig. 3) is used to estimate function \(f(\cdot )\) using the following algorithm:

$$\begin{aligned} {f}({{\varvec{x}}}) = {{{\varvec{W}}}^{*}}^{T}{{\varvec{h}}}+\delta \end{aligned}$$
(14)

where choosing \({\varvec{r}}=[e~~{\dot{e}}]^T\) is the input of the network, \({{\varvec{W}}}^{*}\) is the optimal weight value, \(\delta \) is the approximation error (\(\delta \le \delta _N\)). \({\varvec{h}}=[h_j]^T\), is the output of Gaussian function, and \(h_j\) is defined as follows.

$$\begin{aligned} h_j = exp \left( -\dfrac{\parallel {\varvec{r}}-{\varvec{p}}_{ij}\parallel ^2}{b_j^2} \right) \end{aligned}$$
(15)

where

$$\begin{aligned} {\varvec{p}} = [p_{ij}] = \begin{bmatrix} p_{11} &{} p_{12} &{}... &{} p_{1m}\\ p_{21} &{} p_{22} &{}... &{} p_{2m} \end{bmatrix} \end{aligned}$$

denotes the coordinate value of the center point of the Gaussian function of neural network j for the \(i^{th}\) input, \(i = \{1, 2\}\) relates to the element number of the input vector, and \(j = \{1,2,\ldots ,m\}\) stands for the number of hidden layer nodes. The breadth value of the Gaussian function for neural node j is represented by the vector \({\varvec{b}} = [b_j] = [b_1,\ldots ,b_m]^T\).

Then the output of RBFNN is calculated as:

$$\begin{aligned} {\hat{f}}({{\varvec{x}}}) = \hat{{{\varvec{W}}}}^{T}{{\varvec{h}}} \end{aligned}$$
(16)

in which, the estimated weight vector is denoted as \(\hat{{{\varvec{W}}}}\), and \({{\varvec{h}}}\) represents the Gaussian function.

The control signal (13) can be expressed as:

$$\begin{aligned} u = \dfrac{1}{\lambda _0}[-{{\hat{f}}} + \ddot{\theta }_d + c\dot{e} + ksgn(s)] \end{aligned}$$
(17)

Subsequently, we obtain:

$$\begin{aligned} \dot{s}&= \ddot{e} + c\dot{e} = \ddot{\theta }_d - \ddot{\theta }+ c\dot{e} \nonumber \\&= \ddot{\theta }_d - f - {\lambda _0}u - d + c\dot{e} \nonumber \\&= \ddot{\theta }_d - f - [-{{\hat{f}}} + \ddot{\theta }_d + c\dot{e} + ksgn(s)] - d + c\dot{e} \nonumber \\&= -{{\tilde{f}}} - d - ksgn(s) \end{aligned}$$
(18)

where

$$\begin{aligned} \begin{aligned} {{\tilde{f}}}&= f- {{\hat{f}}}\\&={{{\varvec{W}}}^{*}}^{T}{{\varvec{h(x)}}}+\delta - \hat{{{\varvec{W}}}}^{T}{{\varvec{h(x)}}} \\&= \tilde{{{\varvec{W}}}}^{T}{{\varvec{h(x)}}}+\delta \end{aligned} \end{aligned}$$
(19)

and \(\tilde{{{\varvec{W}}}} = {{\varvec{W}}}^{*}- \hat{{{\varvec{W}}}}\).

Define the Lyapunov function as:

$$\begin{aligned} V = \frac{1}{2}{s}^{2} + \frac{1}{2\sigma }\tilde{{{\varvec{W}}}}^{T} \tilde{{{\varvec{W}}}} \end{aligned}$$
(20)

where constant \(\sigma > 0\). With (18) and (19), differentiating the Lyapunov function with respect to time:

$$\begin{aligned} {\dot{V}}&= s\dot{s} + \sigma \tilde{{{\varvec{W}}}}^{T} \dot{\tilde{{{\varvec{W}}}}}\\&= s[-{{\tilde{f}}}-d-ksgn(s)]- \sigma \tilde{{{\varvec{W}}}}^{T} \dot{\hat{{{\varvec{W}}}}} \nonumber \\&=s[-\tilde{{{\varvec{W}}}}^{T}{{\varvec{h}}}- \delta -d-ksgn(s)]- \sigma \tilde{{{\varvec{W}}}}^{T} \dot{\hat{{{\varvec{W}}}}} \nonumber \\&=-\tilde{{{\varvec{W}}}}^{T}[s{{\varvec{h}}}+\sigma \dot{\hat{{{\varvec{W}}}}}] -s[\delta +d+ksgn(s)]\nonumber \\&=-\tilde{{{\varvec{W}}}}^{T}[s{{\varvec{h}}}+\sigma \dot{\hat{{{\varvec{W}}}}}] -s[\delta +d]-k\vert s \vert \nonumber \end{aligned}$$
(21)

Since the approximation error \(\delta \) is limited and sufficiently small, we can design \(k \ge \delta _N + D\), then the adaptive law is expressed as:

$$\begin{aligned} \dot{\hat{{{\varvec{W}}}}}=-\frac{1}{\sigma }s{{\varvec{h}}}, \end{aligned}$$
(22)

Therefore we can obtain approximately:

$$\begin{aligned} {\dot{V}} = -s[\delta +d]-k\vert s \vert \le 0 \end{aligned}$$
(23)

The system exhibits Lyapunov stability.

4 Experimental results

This section investigates the efficacy of the proposed controller in attaining the intended trajectories. The experiment was carried out utilizing the NI-Myrio 1900 microcontroller in conjunction with the NI LabVIEW software application. For the implementation of the control algorithm, a discrete sampling time of 5 milliseconds (\(T_s\)) was selected.

Fig. 4
figure 4

Experiment results when tracking combined sinusoidal trajectories

Fig. 5
figure 5

Experiment results when tracking hip trajectories

Fig. 6
figure 6

Experiment results when tracking knee trajectories

Given the complexity of the artificial neural system, we have selected a configuration of a 2-5-1 RBF neural network. In this configuration, the neural network input consists of two nodes representing the control tracking error and its rate of change. The hidden layer p comprises 5 nodes to cover the signal’s range and compute weight vectors. The width value b is considered to give the most efficient effect. The output layer consists of one node that represents the approximated parameter f(x) of the PAM object. Through the process of system modelling, the value of \(\lambda _0 = 18.01\) has been determined. Other parameters such as \(\sigma \), k, and c belong to the sliding mode control section, which were refined through the fine-tuning process. The parameters display as following: \({\textbf {p}} = \begin{bmatrix} -20 &{} -15 &{} 0 &{} 15 &{} 20 \\ -20 &{} -5 &{} 0 &{}5 &{} 20 \\ \end{bmatrix}\), \(c = 1\), \(\sigma = 0.8\), \(k = 0.015\), \(\lambda _0 = 18.01\), \({\textbf {b}} = [2, 2, 2, 2, 2]\). Subsequently, the experiment was conducted to evaluate the proposed controller’s performance in two tasks: tracking the conjunction of sinusoidal trajectories and tracking gait trajectories. These performances were then compared with the results obtained from a conventional sliding mode control method.

4.1 Tracking the conjuncture of sinusoidal signals

In this part, the desired trajectories are composed of several different signals. Therefore, three sinusoidal signals, each with different amplitudes and frequencies, are combined to create the reference signal. The equation for the reference trajectory is chosen as follows: \( \displaystyle \theta _d = A \sin (2\pi ft) + 0.5A \sin (2\pi 0.1ft) + 0.2A \sin (2\pi 0.5ft)\).

In the practical experiments, the base amplitude \(A=30^\circ \) the base frequency f is examined at values of 0.2Hz and 0.3Hz. The results of these two experiments are shown in Fig. 4. The upper and lower sub-figures, respectively, represent the tracking performance and tracking error.

Table 1 Quantitative evaluation of two controllers at combined sinusoidal signals experiment

The scenarios’ results demonstrate the proposed controller’s remarkable tracking capabilities. Maximum tracking error (MTE) is approximately \(3.0^{\circ }\), ensuring satisfactory accuracy. Compared to basic sliding mode control, RBF-SMC outperforms significantly, especially with a high angle rate of change. RBF-SMC maintains high-performance tracking, while the simpler controller shows lower accuracy with a maximum tracking error of about \(6.0^\circ \), two times higher than the proposed controller. The root-mean-square error (RMSE) statistics, shown in Table 1, indicate that the RBF-SMC controller achieves an RMSE of approximately \(1.1^\circ \), which is two times better than its counterpart with an RMSE value of about \(2.5^\circ \).

4.2 Tracking gait-pattern signals

To assess the system’s tracking capability for rehabilitation purposes, we investigated its performance with gait trajectories. By utilizing data on human gait obtained from a previous study [32], we generated reference signals for the hip and knee joints, which were then employed in our experiments. The experiment results for tracking the hip and knee trajectories are presented in Figs. 5 and 6, respectively.

For the hip joint, the desired angle range spans from \(-16.5^{\circ }\) to \(+13.5^{\circ }\), while for the knee joint, it ranges from \(0.0^{\circ }\) to \(+40.0^{\circ }\). All the mentioned desired trajectories were conducted at frequencies of 0.2Hz and 0.5Hz.

Table 2 Quantitative evaluation (MTE/RMSE (\(^\circ \))) of two controllers when tracking gait-pattern signals

The experiment has been successfully completed, and stability is achieved in every situation tested. When assessed by the MTE criteria, not significant in comparison between RBF-SMC and the conventional SMC controller when tracking hip joint trajectories with the MTEs of both controllers are about \(16^\circ \). The reason is the initial angle of the desired signal is non-zero while the actual angle is initially set as zero (Fig. 5). However, the RBF-SMC controller exhibits faster convergence speed and lower error. The superior performance of the RBF-SMC method can also be discerned from the RMSE criteria presented in Table 2. While tracking the hip joint trajectory, the conventional method’s performance deteriorates rapidly (RMSE values are \(2.47^{\circ }\) at 0.2Hz and \(3.27^{\circ }\) at 0.5Hz). In contrast, the RBF-SMC method maintains a high level of tracking ability with RMSEs of \(1.84^{\circ }\) at 0.2Hz and \(2.28^{\circ }\) at 0.5Hz. Similar results are observed for the knee joint.

4.3 Tracking experiments with external disturbances

For the purpose of rehabilitation, the robustness and stability of the system have to be examined carefully. In practice, we cannot dismiss the disturbances, which always pull down the control quality. With the antagonistic PAM horizontally setup, when the system has worked well for about 5 s, we suddenly add a ten-kilogram load to it in a vertical direction. Figures 7 and 8 show the experimental results in numerous different cases. An extremely heavy load immediately breaks the stability. The RBF-SMC strategy takes about 2 s to regain stability, while a conventional SMC spends a very long period of time or almost loses quality. The results proved that the system driven by RBF-SMC can maintain equilibrium and withstand significant external perturbations. However, under the effect of a massive disturbance, the control quality might have a slight decline.

Fig. 7
figure 7

Experiment results when tracking combined sinusoidal trajectories with an external disturbance

Fig. 8
figure 8

Experiment results when tracking gait trajectories at 0.2Hz with an external disturbance

5 Conclusion and discussion

In conclusion, this paper presents an adaptive control approach based on RBF neural approximation for an antagonistic configuration of dual PAMs. The design incorporates an RBFNN to approximate the control law, and the stability of the system is analyzed using Lyapunov’s stability theory. The proposed RBF-SMC controller demonstrates remarkable adaptability to varying system conditions while achieving exceptional tracking performance. The experimental results substantiate the efficacy of the proposed RBF-SMC controller. For instance, when tracking sinusoidal signals with a \(40^\circ \) amplitude and no additional load, the tracking error consistently stays below \(4.0^\circ \), which accounts for only \(10\%\) of the amplitude, regardless of the frequency. This robust tracking performance showcases the controller’s ability to effectively regulate the PAMs’ motion and maintain accurate tracking over diverse operating conditions.

Regarding the sliding mode control strategy, our work adds to the extensive literature addressing its challenges and limitations, particularly the chattering issue. The proposed RBF-SMC approach effectively mitigates chattering by leveraging the approximation capability of the RBFNN while maintaining a robust control performance. This development not only improves control quality but also enhances the practicality and safety of the PAM system, making it well-suited for rehabilitation applications.

In our future research, we plan to delve into more sophisticated RBF algorithms and combine them with other control strategies to maximize the potential of neural networks. By doing so, we can further enhance the performance and effectiveness of the control system. Additionally, we plan to conduct more practical experiments specifically tailored for rehabilitation purposes.