1 Introduction

Stroke is the main cause of death and disability. Although the mortality rate of stroke has begun to decline, its incidence rate remains high, and the number of patients with motor dysfunction caused by stroke also significantly increased [1]. The individual situation of stroke patients and the severity of stroke greatly vary, and about 65% of survivors will receive rehabilitation services. Clinicians need to master the rehabilitation nursing technology for stroke patients. However, there are still some problems in artificial rehabilitation treatment, such as fatigue and differences in multiple training, which will also bring huge economic costs to stroke patients [2]. As a kind of robot used in the field of rehabilitation medicine, the rehabilitation robot can help patients with motor or cognitive function training. In the past decades, several studies have focused on rehabilitation robots, but with the growth of the demand for auxiliary rehabilitation systems, it is necessary to develop auxiliary rehabilitation systems and rehabilitation equipment suitable for the needs of patients [3]. However, most of the rehabilitation robots only provide patients with motor function training or cognitive function training. Because patients have independent consciousness, the interactive control between rehabilitation robots and patients is essential [4]. The establishment of human-computer interaction mechanism can improve the rehabilitation concentration and rehabilitation effect of stroke patients [5, 6]. The human-computer interaction system can supplement the gait rehabilitation plan of patients, reduce the workload of doctors, give patients motivation and encouragement in the treatment process, and improve the participation and expression of patients in the treatment process [7]. In addition, the assisted rehabilitation system can adapt to the needs and ideas of each patient and efficiently ensure the comfort of patients in the process of rehabilitation, which plays a crucial role in assisting mobile robot technology. Although relevant researchers have developed several control modes sharing autonomy in recent years, this control mode has not been widely used [8].

Assisted rehabilitation robot can improve the enthusiasm of patients in the process of rehabilitation treatment, and efficiently bring the robot into the assisted and rehabilitation scene. Human-computer interaction plays a crucial role [3]. At present, researchers have designed a variety of human motion intention recognition technologies to improve the rehabilitation effect and efficiency of patients [9]. In the next five years, wearable inertial sensors will be widely accepted and used in clinical environment, not only to evaluate human mobility, motor performance and motor disorders, but also to extend to cognitive training based on home mobile health [10]. In the recognition of human motion, it is very important to design an intelligent wearable device that can provide recognition help [11, 12]. Simultaneously, through the body’s sensor network, it can also monitor the user’s state in real time or identify the walking activities [13] and gait events performed by the user [14]. This method has become an indispensable part of intelligent medical services [15]. The authors in [16] propose a walking assistant robot with walking stick to follow the user, which can assist and supervise patients with lower limb dysfunction to walk long distance through the estimation of human walking intention. However, this robot is only suitable for patients who recover to the stage of independent walking, and cannot provide patients with body weight support and more reliable safety protection. Based on the principle of bilateral lower limb motor coordination, the authors in [17] propose an adaptive sliding mode control strategy based on a complete radial basis function neural network for the rehabilitation of the patient’s affected limb by detecting the motor information on the unaffected side of the patient.

The rehabilitation robot is a nonlinear dynamic system, which needs to use control strategy to meet the coordination in human-computer interaction. However, for the nonlinear and time-varying system, it is difficult to establish an accurate mathematical model, and the traditional controller is difficult to achieve the ideal control effect. The authors in [4] proposed an adaptive control method of human centered lower limb rehabilitation robot based on human-computer interaction dynamic model, which overcomes the uncertainty of human limb and robot parameters and stiffness coefficient in the interaction force model. The authors in [18] propose an adaptive PD like control method for lower limb exoskeleton robot based on healthy human gait data, which enables the lower limb rehabilitation robot to track the human gait trajectory obtained through the motion capture system more quickly, and improves the comfort, anti-interference ability and convergence speed of tracking the desired trajectory in passive training. The authors in [19] discusse the feasibility of using biofeedback and fuzzy control rules to control patients for rehabilitation training. This method can promote patients to actively participate in rehabilitation treatment, efficiently guide the recovery of patients’ self-consciousness, and enhance the adaptability of robots to different populations. The authors in [20] propose a continuous and seamless auxiliary control method based on sliding mode adaptive control. The auxiliary torque required to reference the normal gait trajectory is completed through radial basis function neural network learning, so that the rehabilitation robot can adaptively provide auxiliary torque according to the needs of subjects. The authors in [21] propose a method of adjusting the model free controller for the middle angle of the wrist joint. This method can obtain the ideal finger dynamic equation required in the EMG control system based on the artificial hand, simulate the process behavior of the control system by the fuzzy model, optimize and adjust the free parameters of the intelligent proportional controller by using the meta heuristic gray wolf optimizer algorithm in a model-based manner. It can be seen from the above literature that there are different control strategies for different systems. Therefore, aiming at the modeling uncertainty, system load change and external interference in the control system of mobile rehabilitation robot, this paper focuses on finding an efficient control strategy to improve the performance of the system.

Therefore, it is necessary to reduce the influence of the uncertainty of mobile rehabilitation robot modeling, system load change and external interference on the stability and dynamic performance of the actuator system. Because neural network has good approximation characteristics, it is a common control method for nonlinear dynamic systems. For the approximation error of neural network, sliding mode control strategy is usually used to compensate, the authors in [22] propose an efficient control framework integrating neural network and compensation controller. This method improves the trajectory tracking ability, anti-interference ability and robustness of the mobile robot to a certain extent. The authors in [23] propose a RBF neural network adaptive sliding mode controller for nonlinear electromechanical actuator system to compensate the friction disturbance torque in the electromechanical actuator system, so that the electromechanical actuator system has better stability and dynamic performance. The authors in [24] propose an adaptive sliding mode dynamic controller based on disturbance observer, which can automatically adjust the control gain by estimating the disturbance in real time, so that the robot has good tracking performance and high accuracy in the steady state. The authors in [25] propose an autonomous grounding robot controller based on adaptive sliding mode on the premise of considering the change of robot load, and the feasibility of this method is proved by simulation results.

Combined with human-computer interaction technology and mobile robot technology, this paper carries out the research on the following control strategy of lower limb rehabilitation robot based on human motion intention, and takes the human behavior intention signal as the instruction to control the robot to follow human motion. However, the patient affects the change of robot human system load when walking. Therefore, it is difficult to identify the parameters in the robot model in practical application. Therefore, an adaptive radial basis function neural network sliding mode controller (ARBFNNSMC) is proposed in this paper. Aiming at the uncertainty of the dynamic parameters of the rehabilitation robot system and other external disturbances, and based on the dynamic model of the rehabilitation robot, the radial basis function neural network (RBFNN) adaptive method is used to approximate the switching gain coefficient, so as to enhance the adaptability to the changes of system parameters and other disturbance factors. Aiming at the approximation error and other nonlinear disturbances, the sliding mode control strategy is used to improve the control performance of the system, so as to ensure the global stability of the system, so that the robot can follow the subject along the set trajectory after identifying the human motion intention.

The remainder of this paper is organized as follows. In Section 2, some problems faced by stroke patients in the current rehabilitation field are described. According to the rehabilitation needs of patients, an intelligent control method based on human motion behavior to make the rehabilitation robot follow the motion of patients is proposed. By analyzing the characteristics of human walking, the mathematical model of motion behavior is established, a motion data acquisition system is designed, and the processing method of motion data and the correctness of data feature extraction are described. In order to improve the control effect of rehabilitation robot following human motion, an ARBFNNSMC algorithm is proposed, and the stability is analyzed. In Section 3, the experimental scheme of following motion control is designed, and then the experimental data are briefly analyzed. In Section 4, the experimental results of this paper under the current research background are analyzed and explained in detail, and the shortcomings of the current research are also found. Finally, the conclusions are drawn in Section 5.

2 Methods

2.1 System scheme design

2.1.1 Problem description

The coordinated movement between the rehabilitation robot and the stroke patient is a complex human-computer interaction process. The analysis of the interaction information between the patient and the rehabilitation robot can identify the patient’s motion intention. Finally, the following motion controller is constructed according to the motion intention data and the characteristics of the rehabilitation robot, so that the rehabilitation robot can achieve the goal of following the patient’s accurate movement and improve the rehabilitation training effect of the patient with maximum efficiency, However, in the process of walking rehabilitation training based on human-computer interaction, the following problems exist: (1) It is necessary to establish the interactive relationship of motion information between patients and robots in physical form. (2) It is necessary to define the physical characteristics of human body and the influence of patient degree on exercise behavior. (3) It is necessary to accurately perceive the motion signal in the process of human-computer interaction and apply it to the design of robot following controller. (4) The patient’s motion intention has more disturbance signals. Therefore, it is difficult for the rehabilitation robot to accurately follow the motion according to the patient’s motion intention. (5) The man-machine coupling relationship between patient and robot brings uncertainty to the design of rehabilitation robot control system.

2.1.2 Overall system design

The system of the rehabilitation robot platform is shown in Fig. 1a. The robot system consists of four parts: multi-sensor, control, weight support and driving systems [26]. Firstly, the user stands in the middle of the rehabilitation robot and wears auxiliary clothes to connect with the rehabilitation robot. During use, the weight support system provides auxiliary support for the user, in order to reduce the burden of lower limb movement when the user walks. The multi-sensor system senses the motion data of the human body and transmits the data to the control system. The latter sends the control command to the driving system, in order to make the robot follow the human body. The overall control system structure of the rehabilitation robot is presented in Fig. 1b.

Fig. 1
figure 1

(a) Structure design of the rehabilitation robot (b) Structure of the control system

2.2 Design and data analysis of the multi-sensor information system

During walking, people’s body posture will periodically and regularly change. Due to individual differences in height, weight, step frequency and step length, everyone’s posture change rules are different and have their own unique forms. The more obvious posture changes are the up and down fluctuation of human center of gravity and the left and right swing of shoulder, as shown in Figs. 2 and 3. The rehabilitation object to be studied in this paper is mainly the stroke patients in the middle and late stage of rehabilitation. The clinical performance of patients is that the muscle strength level is greater than level 3, and they have a clearer thinking consciousness and can make a clearer limb behavior. Although the body posture of stroke patients is different from that of healthy people, the posture change during walking still has the characteristics of periodicity and regularity. Firstly, by processing the motion posture data of stroke patients, the mathematical model of human motion behavior is established, the human behavior intention is recognized, and the behavior intention signal is used as the ideal input of the follow-up control of the rehabilitation robot. Secondly, in practical application, the center of gravity of the patient fluctuates up and down when walking, which makes the dynamic parameters of the rehabilitation robot system uncertain. Therefore, the influence of the change of the center of gravity of the human body on the dynamic parameters of the robot is explored, so as to lay a theoretical foundation for improving the control effect of the rehabilitation robot following the movement of the human body. This section introduces the design scheme of motion data acquisition system and the establishment of human motion mathematical model, and verify the correctness of data feature extraction.

Fig. 2
figure 2

Posture change of human motion center of gravity

Fig. 3
figure 3

Posture changes of human shoulder (a) straight forward (b) turn right (c) turn left

2.2.1 Design of the motion data acquisition system

The multi-sensor system collects the center of gravity fluctuation and shoulder displacement data with obvious changes during human walking. It is necessary to select the sensor used for sensing the human behavior, and determine the type, quantity and installation position of the sensor according to the characteristics of the human walking posture, in order to obtain accurate human motion data. The scheme of the multi-sensor motion data acquisition system is shown in Figs. 4 and 5. The system includes two displacement sensors and two tension sensors.

Fig. 4
figure 4

Schematic diagram of a dual displacement sensor (a) top view (b) axonometric view

Fig. 5
figure 5

Schematic diagram of a double tension sensor (a) walking on the right side of limb (b) walking on the left side of limb

The system uses the MPS-XXXS pull rope displacement sensor, with a displacement accuracy of 0.1 mm and a displacement stroke range of 0-200 mm. The Dyly-106 tension sensor is used with a range of 0-50 kg and a tension accuracy of 0.03 kg. Both sensors have the advantages of high precision, fast response and long service life, and meet the actual working conditions. The data collected by the displacement and tension sensors are digital. The motion data is sent to MCU through RS-485. The sampling frequency of the sensor is 200 Hz. The feedback data of the displacement and tension sensors is the basis for the subsequent controller design and robot motion control [26].

2.2.2 Notation

For better readability and comprehensibility, we briefly summarize some important Notations used in the paper. In human motion intention recognition, x1 and x2 represent the displacement of the left and right sides of the displacement sensor. v1 and v2 represent the behavior speed of the left and right sides of the human body. λ represents the constant coefficient between the displacement and the speed of human body. F1 and F2 represent the set value of the left and right auxiliary force of the robot. F1r and F2r represent the actual auxiliary force value fed back by the left and right force sensors of the robot. ΔF1 and ΔF2 are the auxiliary forces changes on the left and right sides of the human body, respectively. represents the change value of the auxiliary force caused by the change of the center of gravity of the human body. In the robot dynamic equation, m represents the dynamic parameters of the rehabilitation robot, m is the sum of m1 and m2, where m1 is the mass of the rehabilitation robot and m2 is the auxiliary force of the patient. In the design of robot following control algorithm, τeq represents for equivalent control law, τsw represents for switching control law, ξ is the gain coefficient of the switching control law, hij represents Gaussian function, cij and σij are the center vector and extension constant of Gaussian function, respectively. w represents the adjustment weight from hidden layer to output layer of RBFNN. β represents adaptive parameters.

2.2.3 Motion data analysis and processing

Firstly, the displacement of the human shoulder is considered as the external control input of the overall system of the rehabilitation robot, and the linear relationship between the displacement x1 and x2 of the displacement sensor and the behavior speed v1 and v2 is established. The relationship between the displacement of the sensor and the behavior speed of the human body is shown in Fig. 6. The speed obtained by the linear relation (1) is considered as the motion speed of the human body, which is considered as the expected input of the internal controller of the robot. If the robot can accurately follow the desired motion speed, the control goal of following the motion of the human body can be realized.

$$ \left\{\begin{array}{l}v_{1}=\lambda\times\mathrm{x}_{1}\\v_{2}=\lambda\times \mathrm{x}_{2} \end{array}\right. $$
(1)

where λ is the constant coefficient between the displacement and human motion speed.

Fig. 6
figure 6

Relationship between human motion displacement and behavior speed (a) left (b) right

Since the rehabilitation robot needs to provide auxiliary force for stroke patients, the dynamic parameter m of the robot will change according to the auxiliary force. Because parameter m directly affects the control effect of the rehabilitation robot controller, the law and characteristics of the center of gravity change in the process of human walking are studied. Data support is also provided for the subsequent controller design. The initial values of the auxiliary force are set as F1 and F2. With the change of the center of gravity of the human body during walking, the actual auxiliary force values fed back by the tension sensor are F1r and F2r. The change values of the auxiliary force on both sides of the human body are then:

$$ \left\{\begin{array}{l}{\Delta} F_{1}=F_{1r}-F_{1}\\{\Delta} F_{2}=F_{2r}-F_{2} \end{array}\right. $$
(2)

The variation values of the auxiliary forces on both sides of the human body are treated and considered as the variation characteristics of the center of gravity of the human body. The variation values of this point are given by:

$$ {\Delta} m=\frac{\Delta F_{1}+{\Delta} F_{2}}{2} $$
(3)

In (2) and (3), ΔF1 and ΔF2 are the auxiliary forces changes on the left and right sides of the human body, respectively.

2.2.4 Correctness verification of data feature extraction

In order to verify the correctness of the data processing method of the human center of gravity change, the human center of gravity change data collected by Minisun-IDEEA gait analyzer is used as the reference standard for verification [27,28,29]. Firstly, a healthy adult volunteer is selected as the object of human center of gravity data acquisition. The motion data of volunteers are then collected by the IDEEA gait analyzer and rehabilitation robot data acquisition system. The change curve of the human center of gravity, obtained by gait analyzer, is shown in Fig. 7. The change curve of auxiliary power on the left and right sides of the human body, obtained by the robot data acquisition system, is presented in Fig. 8.

Fig. 7
figure 7

Fluctuation curve of human gravity center

Fig. 8
figure 8

Variation curve of left and right auxiliary forces of human body

By comparing the human motion data in Figs. 7 and 8, it can be seen that, when the center of gravity of the human body moves up, the auxiliary force of the robot decreases. On the contrary, when the center of gravity moves down, the auxiliary force increases. Therefore, the auxiliary force curves on the left and right sides of the human body have the opposite characteristics with the center of gravity curve. Since the units of the gravity center displacement value and auxiliary force value are different, the human motion data collected by the robot, are uniformly processed. It can be seen from Fig. 9 that the displacement behavior of the left and right sides of the human body, and the reference displacement of the gravity center, are approximately the same. The human weight center displacement obtained by the gait analyzer is almost 30 mm. The human body displacement collected by the robot is almost 25 mm on the left side, while that on the right side is almost 27.5 mm with a small error, which proves the reliability of the data acquisition system design and the correctness of feature extraction.

Fig. 9
figure 9

Comparison curve of human gravity center displacement

Finally, the Fourier function first-order polynomial is used to approximate the function expression of the auxiliary force change curve. The auxiliary force change fitting curve is shown in Fig. 10. The obtained relationship is expressed as:

$$ f(x)=a_{0}+a_{1}\cos(x\times w)+a_{2}\sin(x\times w) $$
(4)

where a0, a1, a2 and w are the fitting function coefficients.

In the subsequent design of rehabilitation robot controller, the result of this function is considered as the disturbance factor in the robot system.

Fig. 10
figure 10

Fitting curve of auxiliary force change

2.3 Dynamics modeling of the rehabilitation robot

The research object of this paper is a mobile rehabilitation robot with six wheels structure. As shown in Fig. 11, this robot is composed of two central driving wheels and four front and rear universal wheels installed on the same axis [26]. Vector (x,y,𝜃)T represents the posture of the rehabilitation robot in the coordinate system OXY, where (x,y) represents the p coordinate of the rehabilitation robot reference point, 𝜃 denotes the steering angle of the rehabilitation robot. The spacing of the driving wheels is 2b, while the radius of the driving wheels is r.

Fig. 11
figure 11

Schematic diagram of the rehabilitation robot

The rotational angular speeds of the left and right driving wheels of the rehabilitation robot are φl and φr. Let V (t) = [v,w]T, where v and w are respectively used to represent the linear and angular speed of the rehabilitation robot point p. The motion speed of the rehabilitation robot is given by:

$$ V(t)=\left[\begin{array}{c} v\\ w \end{array}\right]=\left[\begin{array}{cc} \frac{r}{2}&\frac{r}{2}\\ \frac{r}{2b}&-\frac{r}{2 b} \end{array}\right]\left[\begin{array}{c} \varphi_{l}\\ \varphi_{r} \end{array}\right] $$
(5)

The dynamic model of the rehabilitation robot is the most essential model, and it can best reflect its motion characteristics. The dynamic equation of the rehabilitation robot is given by:

$$ \bar{M}(q)\dot{V}+\bar{C}(q,\dot{q})V+\bar{\tau}_{d}=\bar{B}(q)\tau $$
(6)

According to (6):

$$ \dot{V}=\bar{M}^{-1}(q)\left[\bar{B}(q)\tau-\bar{\tau}_{d}\right]=B_{0} \tau-\bar{M}^{-1}(q)\bar{\tau}_{d} $$
(7)

where \(\bar {M}(q)\) is the inertia matrix, \(\bar {C}(q,\dot {q})\) is the Coriolis force and centripetal force matrix, \(V(t)=\left [v_{p}, w_{p}\right ]^{T}\) is a generalized velocity vector, \(\bar {\tau }_{d}\) is the unknown disturbance of bounded unmodeled dynamics, \(\bar {B}(q)\) is a nonsingular matrix related only to the wheel spacing b and wheel radius r, and τ is the input of the driving wheel torque control of the rehabilitation robot.

Each matrix is taken as:

\(\bar {M}(q)=\left [\begin {array}{cc}m&0\\0&I \end {array}\right ]\); \(\quad \bar {C}(q,\dot {q})=\left [\begin {array}{ll}0&0\\0& 0 \end {array}\right ]\); \(\quad \bar {B}(q)=\frac {1}{r}\left [\begin {array}{cc}1&1\\b&-b \end {array}\right ]; \quad \tau =\left [\begin {array}{c}\tau _{1}\\\tau _{2} \end {array}\right ]\); \(\bar {M}^{-1}(q)=\frac {1}{m I}\left [\begin {array}{cc}I&0\\0&m \end {array}\right ]\); \(\quad B_{0}=\bar {M}^{-1}(q)\bar {B}(q)=\frac {1}{m r I}\left [\begin {array}{cc}I&I\\mb&-mb \end {array}\right ]\)

The rehabilitation robot requires to provide auxiliary force for the patient. Part of the weight of the patient’s body will be applied to the robot as a load. Different patients need different auxiliary force and different load on the robot. Therefore, the dynamic parameter m of the robot changes. In the previous matrix, m is the sum of m1 and m2, where m1 is the mass of the rehabilitation robot and m2 is the auxiliary force of the patient, I is the central moment of inertia of the rehabilitation robot, τ1 and τ2 are the torque of the left and right drive wheels, respectively.

By ignoring the uncertain interference (\(\bar {\tau }_{d}=0\)), (7) is simplified as:

$$ \dot{V}=B_{0}\tau $$
(8)

2.4 Controller design of rehabilitation robot

2.4.1 Control algorithm design

In this paper, a sliding mode controller is designed by combining the motion speed input of human body and the torque input of dynamics to overcome the instability of the system, make the speed of the rehabilitation robot converge to the expected speed given by human body motion, meet the performance of the system, and consider the motion speed Vc of the human body as the expected input of the robot:

$$ V_{c}=\left[\begin{array}{c} v_{c}\\ w_{c} \end{array}\right]=\left[\begin{array}{c} \left( v_{1}+v_{2}\right)/2\\ \left( v_{1}-v_{2}\right)/2b \end{array}\right] $$
(9)

The speed following error is defined as:

$$ e_{c}=V_{c}-V=\left[\begin{array}{l} e_{1}\\ e_{2} \end{array}\right]=\left[\begin{array}{c} v_{c}-v\\ w_{c}-w \end{array}\right] $$
(10)

The sliding surface,selected according to equation(8),is given by:

$$ S=\left[\begin{array}{c} s_{1}\\ s_{2} \end{array}\right]=e_{c}+{\eta{\int}_{0}^{t}}e_{c}d\tau $$
(11)

where η is the sliding mode area fraction constant and η > 0.

The derivative of (11) can be computed as:

$$ \dot{S}=\dot{e}_{c}+\eta e_{c}=\dot{V}_{c}-B_{0}\tau+\eta e_{c} $$
(12)

In order to make the state trajectory stay on the sliding mode surface (\(\dot {S}\)= 0), the equivalent control rate τeq is expressed as:

$$ \tau_{eq}=B_{0}^{-1}\left( \dot{V}_{c}+\eta e_{c}\right) $$
(13)

where \(B_{0}^{-1}=\frac {r}{2b}\left [\begin {array}{cc}mb&I\\mb&-I \end {array}\right ]\).

On the premise that the system model is accurately known, the equivalent control law τeq can make the system stable on the sliding mode surface. When considering the uncertainty caused by the change of the center of gravity of the human body to the dynamic parameter m and other external disturbances, (8) can be rewritten as:

$$ \dot{V}=\bar{B}_{0} \tau+{\Delta} B_{0} \tau+d(t) $$
(14)

where \(\bar {B}_{0}\) is the nominal part of the system matrix, determined by the parameters r, b, I and m1 of the robot and the auxiliary force value m2 of the patient. ΔB0 is the internal disturbed part of the system matrix, determined by the dynamic parameters Δm and ΔI caused by the change of the center of gravity of the human body, d(t) is an external disturbance vector, including plane friction and disturbance torque, whose specific value is difficult to be determined in practical applications. Wherein, the change function (4) of the patient’s auxiliary force is substituted into matrix B0 in order to obtain:

$$ {\Delta} B_{0}=\frac{1}{\Delta m r {\Delta} I}\left[\begin{array}{cc} {\Delta} I & {\Delta} I \\ {\Delta} m b & -{\Delta} m b \end{array}\right] $$
(15)

The system uncertainty is expressed as:

$$ \delta(t)={\Delta} B_{0} \tau+d(t) $$
(16)

The dynamic equation of the rehabilitation robot can be expressed as:

$$ \dot{V}=\bar{B}_{0} \tau+\delta(t) $$
(17)

In order to satisfy the sliding condition, a discontinuous control law is introduced τsw to enhance the robustness of the system. Finally, the integral sliding mode motion following control law is determined by the equivalent control law τeq and switching control law τsw composition:

$$ \tau=\tau_{e q}+\tau_{s w}=B_{0}^{-1}\left( \dot{V}_{c}+\eta e_{c}+\xi \operatorname{sgn}(S)\right) $$
(18)

where ξ is the gain coefficient of the switching control law, \(\xi =\left [\begin {array}{ll}\xi _{1}&0\\0&\xi _{2} \end {array}\right ]\), \(\operatorname {sgn}(S)=\left [\operatorname {sgn}\left (s_{1}\right ), \operatorname {sgn}\left (s_{2}\right )\right ]^{T}\), and ξ is a normal number.

When the sliding mode control theory is used to design the control law, this modeling uncertainty produces a large switching gain, which results in large chattering. In order to compensate the chattering phenomenon in sliding mode control, RBFNN with Gaussian activation function is designed to approximate the system. RBFNN is a three-layer feedforward network composed of input layer, hidden layer and output layer. It has the performance of optimal approximation and global optimization. In addition, it is widely used in pattern recognition, function approximation, signal processing and other fields. The structure of RBFNN is presented in Fig. 12.

Fig. 12
figure 12

Structure diagram of RBFNN

The hidden layer neurons use a Gaussian function:

$$ h_{ij}=\exp\left( -\frac{\left\|x_{i}-c_{ij}\right\|}{2\sigma_{ij}^{2}}\right), \quad i=1,2, j=1,2,{\cdots} n $$
(19)

where cij and σij (cij, σij > 0) are the center vector and extension constant of Gaussian function, respectively.

The sliding surface is defined as the input of RBFNN, the input is xi = si, i = 1,2, the output value of neural network is ξi, and the RBFNN algorithm based on Gaussian function is:

$$ \xi_{i}={W_{i}^{T}} H_{i}={\sum}_{i=1}^{n} w_{i n} h_{i n} $$
(20)

where \(W_{i}=\left [w_{i1}w_{i2}{\cdots } w_{in}\right ]^{T}\) is the adjustment weight from hidden layer to output layer of RBFNN, \(H_{i}=\left [h_{i1}h_{i2}{\cdots } h_{in}\right ]^{T}\) is the activation function of the hidden layer.

It is assumed that the upper bound of system uncertainty δ(t) and the upper bound of switching term coefficient ξ of sliding mode control exist. In addition, the upper bound of system uncertainty satisfies: \(\xi _{i}-\left \|\delta _{i}\right \|>\varepsilon _{i}\), εi > 0. Because the rehabilitation robot has parameter uncertainty and unpredictable disturbance, the upper bound of uncertainty ξi is difficult to predict. For the RBFNN structure, its ideal output is given by:

$$ \xi_{i}^{*}=W_{i}^{* T} H_{i}+\tilde{\xi} $$
(21)

where ξi is the estimation error of switching gain and ξi is bounded \(\left (\left \|\tilde {\xi }_{i}\right \| \leq \varepsilon _{i}\right )\).

Since the ideal vector W of neural network weight cannot be obtained, it needs to be estimated when designing the controller. \(\hat {\xi }_{i}\) is the estimated value of \(\xi _{i}^{*}\), then the adaptive switching gain \(\hat {\xi }_{i}\) of the sliding mode control output from RBFNN is expressed as:

$$ \hat{\xi}_{i}=\hat{W}_{i}^{T}H_{i} $$
(22)

The weight adaptive law of the neural network is given by:

$$ \dot{\hat{W}}_{i}=\beta_{i}H_{i}\left\|s_{i}\right\|, i=1,2 $$
(23)

where βi > 0 is the adaptive parameter.

The ARBFNNSMC law obtained by substituting (22) into (18) is given by:

$$ \tau=\tau_{eq}+\tau_{sw}=B_{0}^{-1}\left( \dot{V}_{c}+\eta e_{c}+\hat{\xi} \operatorname{sgn}(S)\right) $$
(24)

The design of the final rehabilitation robot controller is based on the equivalent sliding mode control of the robot dynamic model and the robust switching term, in order to suppress the system uncertainty. The coefficient of the switching term should be the upper bound of the sum of these uncertainties. The RBFNN is used to adaptively learn and approach the upper bound of the system uncertainty. The output time of the neural network is compared with the actual uncertainty of the system. The weight of the neural network is adaptively adjusted according to the difference between them, so as to approach the uncertainty and perform the self-adjustment of the number of switching terms. The structural framework of the dynamic control system of the rehabilitation robot is shown in Fig. 13.

Fig. 13
figure 13

Framework of ARBFNNSMC system

The number of hidden layer units of the neural network is selected according to the experience. The number of hidden layer units of RBFNN used in this paper is 5. The selection range of the central point of the neural network should be evenly selected between the upper and lower limits of its input change. The center value of Gaussian radial basis function is considered as a uniform distribution with an interval of 0.25, and the expansion constant σij of hidden layer nodes is determined according to the maximum distance of data center.

$$ \sigma_{i j}=\frac{d_{\max }}{\sqrt{2 n}}, i=1,2, j=1,2, {\cdots} n $$
(25)

where dmax is the maximum distance between data centers.

The parameters of the rehabilitation robot are m1 = 165 kg, I = 46.3kgm2, r = 0.06 m, b = 0.45 m. For the parameter setting of rehabilitation robot controller, the weight vector of the neural network is obtained by adaptive law. Therefore, the initial value of weight matrix w is set to zero. In practical applications, combined with the adaptive law formula (cf. (23)), adaptive learning adjusts the robust term coefficients ξ1 and ξ2 of sliding mode control, and implements control law formula (cf. (24)). The specific parameter design of the robot controller is shown in Table 1.

Table 1 Rehabilitation robot controller parameters

2.4.2 Stability analysis

The Lyapunov function is chosen as:

$$ V=\frac{1}{2}s^{T}s+\frac{1}{2}\beta_{1}^{-1}\hat{W}_{1}^{T}\hat{W}_{1}+\frac{1}{2}\beta_{2}^{-1}\hat{W}_{2}^{T}\hat{W}_{2} $$
(26)

The derivative of (26) is obtained and combined with the adaptive control law:

$$ \begin{aligned} &\dot{V}=s^{T}\dot{s}-{\sum}_{i=1}^{2}\beta_{i}^{-1}\hat{W}_{i}^{T} \dot{\hat{W}}_{i}\\&=s^{T}\left( \dot{e}_{c}+\eta e_{c}\right)-{\sum}_{i=1}^{2}\beta_{i}^{-1}\hat{W}_{i}^{T}\dot{\hat{W}}_{i}\\&=s^{T}[-\hat{\xi}\operatorname{sgn}(S)-\delta(t)]-{\sum}_{i=1}^{2}\beta_{i}^{-1}\hat{W}_{i}^{T}\dot{\hat{W}}_{i}\\&=-{\sum}_{i=1}^{2}\left\{s_{i}\left[\hat{W}_{i}^{T}H_{i}\operatorname{sgn}\left( S_{i}\right)\right]+s_{i}\delta_{i}(t)+\beta_{i}^{-1}\hat{W}_{i}^{T}\dot{\hat{W}}_{i}\right\}\\&=-{\sum}_{i=1}^{2}\left\{\left\|s_{i}\right\|\left( \hat{W}_{i}^{T}H_{i}-\xi_{i}\right)+\left\|s_{i}\right\|\xi_{i}+s_{i}\delta_{i}(t)+\beta_{i}^{-1}\hat{W}_{i}^{T}\dot{\hat{W}}_{i}\right\}\\&=-{\sum}_{i=1}^{2}\left\{\left\|s_{i}\right\|\varepsilon_{i}+\left( \left\|s_{i}\right\|\xi_{i}+s_{i}\delta_{i}(t)\right)\right\}\leq0 \end{aligned} $$
(27)

Since \(\xi _{i}-\left \|\delta _{i}\right \|>\varepsilon _{i}>0\), ξi > −δi. Since\(\left \|S_{i}\right \|>S_{i}\), \(\left \|S_{i}\right \| \xi _{i}>-S_{i} \delta _{i}\), that is \(\left \|s_{i}\right \| \xi _{i}+s_{i} \delta _{i}>0\), and \(\left \|s_{i}\right \| \varepsilon _{i}>0\), then \(\dot {V} \leq 0\). Therefore, \(\dot {V}\) is semi negative definite, and the sliding surface s will tend to zero. When s = 0, \(e_{c}=-\eta {{\int \limits }_{0}^{t}} e_{c}(\tau ) d \tau \), \(\mathbf {e}_{c}(\infty ) \rightarrow 0\), the closed-loop system is asymptotically stable.

3 Results

3.1 Experimental design and result analysis

3.1.1 Experimental design of motion control

The following motion control effect of the rehabilitation robot can be evaluated using a quantitative analysis. More precisely, it can be evaluated by controlling the rehabilitation robot to complete the established trajectory and analyzing the position, velocity and angular velocity errors. The “straight line” and “curve” trajectories are the most commonly used. In order to verify the use effect of the robot in the actual environment, two groups of experiments are carried out. The subject walks along the target trajectory on the ground, and the rehabilitation robot follows the subject’s motion. Collect the robot’s walking trajectory, and analyze the pose error between the actual walking trajectory and the target trajectory to judge the robot’s following motion control effect. In this paper, two subjects of different gender, age, height and weight are selected in the experiment. The information of the subjects is shown in Table 2, and the experimental site is shown in Fig. 14.

Table 2 Motion Control Experiment Volunteer Information
Fig. 14
figure 14

The picture of following the movement experiment (a) healthy subjects walking in a straight line (b) healthy subjects walking in a curve (c) patients walking in a straight line (d) patients walking in a curve

The robot tracking control performance is evaluated by letting the subjects walk along the given path. The target path of Experiment 1 is a “straight line” track, while that of Experiment 2 is a “curve” track. The red dot on the ground is the target trajectory to be tracked. The subject walked along the target trajectory, and the robot followed him.

The mathematical expression of the “straight line” target track is given by:

$$ \left\{\begin{array}{c} x_{r}=t\\ y_{r}=t\\ \theta_{r}=\pi/4 \end{array}\right. $$
(28)

The mathematical expression of the curve target track is given by:

$$ \left\{\begin{array}{c} x_{r}=0.3\times t\\ y_{r}=0.6\times sin(t)\\ \theta_{r}=0 \end{array}\right. $$
(29)

The subject walked along the target trajectory, and the robot followed him, and to calculate the position and angle of the rehabilitation robot reference point through the angular velocity value of the driving wheel encoder. The calculation steps are as follows:

Actual running linear speed and angular speed of the rehabilitation robot body:

$$ \left\{\begin{array}{c} v_{r}=\left( v_{l}+v_{r}\right)/2\\ w_{r}=\left( v_{l}-v_{r}\right)/2b \end{array}\right. $$
(30)

The pose of the next moment is calculated according to the pose of the rehabilitation robot at the last moment and (25) and (26):

$$ \left\{\begin{array}{c} \theta_{t}=\theta_{t-1}+w_{r}\\x_{t}=x_{t-1}+v_{r}\times\cos \theta_{t}\\y_{t}=y_{t-1}+v_{r}\times\sin\theta_{t} \end{array}\right. $$
(31)

The following effect of the reference trajectory is evaluated using the integral square error (ISE) normalization method of the pose error evaluation function ERROR. The pose error evaluation function error defines the target pose \(\left (x_{r}, y_{r}, \theta _{r}\right )\) and actual pose \(\left (x_{t}, y_{t}, \theta _{t}\right )\). The pose error can be expressed as:

$$ ERROR=\frac{1}{L} {{\sum}_{0}^{t}}\left( \left( x_{r}-x_{t}\right)^{2}+\left( y_{r}-y_{t}\right)^{2}+\left( \theta_{r}-\theta_{t}\right)^{2}\right) $$
(32)

where L is the total length of the trajectory.

The experimental results are recorded by the encoder of the driving wheel, and the data are transformed into the position and attitude of the robot reference point through kinematics.

3.1.2 Analysis of experimental results of robot following motion

According to the designed dynamic controller, the following motion experiment is performed on the rehabilitation robot system when the load changes. The control mode of the rehabilitation robot is set to automatic, and the auxiliary force provided to the subjects is 24 kg. The healthy subjects complete the motion task within 30 s, while the patients complete the motion task within 60 s. The robot followed two subjects and completed the given task within the specified time. The experimental results of the subjects walking along the “straight line” track are shown in Figs. 15 and 16. The subjects need a short human-computer interaction adaptation process when walking along the “straight line” trajectory. In this process, due to the asymmetric change of displacement data, it can be seen from (1) and (9) that the angular velocity of the robot will obviously fluctuate. Therefore, there are obvious errors in the following trajectory at the initial stage of straight-line walking. In addition, it is easy for the subject to move the displacement sensors on both sides of the body to the maximum value of the stroke, and make a small movement at the maximum displacement. Therefore, when the subject’s adaptation stage is over, the human motion speed identified by the human behavior intention model can be approximately constant. Therefore, when the obtained speed is finally used as the input of the mobile rehabilitation robot, the following trajectory of the robot in the later stage shows a good following effect. In general, the following trend of the experimental trajectory of the two subjects is coherent with that of the target trajectory, and the position error with the target trajectory is small and convergent. The position and pose error evaluation function values of the two subjects are 5.35 and 6.64, respectively. This indicates that the control effect of the rehabilitation robot following the human motion in the linear motion meets the requirements. However, it can be seen from the figure that the effect of the robot following the healthy person is better than that of the patient. Moreover, in the forward direction control, the healthy person does better, and the angle change of the robot following the healthy person is smaller and the convergence is faster. Figure 17 shows the convergence of RBFNN adaptive control gain coefficient in linear following motion of healthy people and patients.

Fig. 15
figure 15

Follow the experimental curve of linear motion of healthy subjects (a) follow the trajectory (b) pose error (c) speed error (d) control torque

Fig. 16
figure 16

Follow the experimental curve of linear motion of patients (a) follow the trajectory (b) pose error (c) speed error (d) control torque

Fig. 17
figure 17

Linear motion adaptive switching gain coefficient convergence curve (a) healthy person (b) patient

Figures 18 and 19 show the experimental results of two subjects walking along the “curve” track. It can be seen that, when following a more complex trajectory, the subject needs to constantly adjust the walking posture. The patient’s body coordination is poor when walking, and it is easier to make the motion input uncertain when walking along the curve. Although the two subjects completed the movement task within the specified time, and the trend of the actual walking trajectory is approximately consistent with that of the target trajectory, clear pose errors exist. The evaluation function values of the pose errors of the two subjects are 36.19 and 73.61, respectively. This indicates that the effect of the rehabilitation robot following the healthy person in the curve movement is better than that of the patient, and the healthy person does better in the direction control of the movement. The angle change of the robot following the healthy person is less than that of the patient, and the consistency is better. Healthy people walk faster, and therefore the fluctuation of speed error curve of healthy people is more significant than that of patients. However, due to the uncoordinated body of patients, the fluctuation of torque curve is more significant than that of healthy people. Figure 20 shows the convergence of RBFNN adaptive control gain coefficient in curve following motion of healthy people and patients.

Fig. 18
figure 18

Follow the experimental curve of curvilinear motion of healthy subjects (a) follow the trajectory (b) pose error (c) speed error (d) control torque

Fig. 19
figure 19

Follow the experimental curve of curvilinear motion of patients (a) follow the trajectory (b) pose error (c) speed error (d) control torque

Fig. 20
figure 20

Curve motion adaptive switching gain coefficient convergence curve (a) healthy person (b) patient

Table 3 shows the comparison results of the calculated values of error evaluation function of subjects under the same “straight line” and “curve” trajectory experimental conditions. The calculation results show that the patients pose error is larger than that of healthy subjects.

Table 3 Motion control experiment volunteer information

4 Discussion

It can be seen from the “straight line” trajectory tracking experimental results of healthy people and patients that, in the “straight line” movement, the body posture of healthy people significantly changes, and the motion characteristics of healthy people are clear and easy to be distinguished. In addition, the dynamic controller of the robot can adaptively adjust the switching gain of the controller in real time, according to the change characteristics of the healthy person center of gravity when walking. Therefore, the rehabilitation robot can quickly identify the motion posture of healthy people, and then accurately follow the trajectory of healthy people. The pose and velocity errors of the robot are small, and the system can quickly converge to a stable motion state. However, the patient’s lower limb motor function is limited, the body coordination is poor, and the movement posture is not clear due to discontinuous walking. Therefore, a certain error exists in the recognition of the patient’s movement posture by the robot multi-sensor data acquisition system. The error in the early stage of the robot following the patient’s linear movement is clear, and the speed also changes sharply. Moreover, when the patient walks, the change range of the center of gravity is greater, and the system disturbance to the rehabilitation robot is also greater. Through the continuous adaptive learning of the control algorithm, the control switching gain of the dynamics is corrected in real time. In the later stage of motion, the pose and speed errors of the robot begin to decrease, and the system gradually tends to a stable following motion state. Although the pose error of the robot following the patient is greater than that of the healthy person, there is no clear difference in the experience of the two subjects in the process of practical application. Furthermore, the pose error in the straight-line following motion of the robot can be ignored.

In the “curve” movement, the subject needs to continuously adjust the body posture, and the displacement of the displacement sensor changes in real time according to the change of the subject’s shoulder posture. According to the “straight line” trajectory tracking experiment, the efficiency of the proposed ARBFNNSMC algorithm has been proved. However, it can be seen from the “curve” trajectory tracking experimental results of healthy people and patients that there is an obvious deviation in the motion trajectory of the robot following the two subjects along the curve. This indicates that the robot multi-sensor data acquisition system has a poor recognition effect on the left and right turning motion posture of the patients. Since the healthy person and the patient have to respectively complete the task in 30 s and 60 s, the walking speed of the healthy person is higher than that of the patient, and the motion speed of the rehabilitation robot following the healthy person is also faster, making the robot too fast when following the human body in steering and easy to produce sudden changes in angular velocity. In addition, because the limb reaction speed of the healthy person is better than that of the patient, and the motion characteristics are more obvious when walking along the track. The rotation action is more natural than that of the patient, the rotation angle of the robot following the healthy person is also more regular. Therefore, when the robot follows the subject to turn, the motion response of the healthy person is better than that of the patient. Since the patient’s movement is slow and the body’s movement during steering is not significant. Although there is no sudden change in angular velocity when the robot turns, there is a significant delay in following the patient’s trajectory. Although the error of the rehabilitation robot following the subject’s curve motion is greater than the linear motion, the rehabilitation robot can still recognize the motion posture of the healthy person. The position, posture and speed errors of the robot change within a small range. Finally, the system can converge to a stable motion state. The “curve” trajectory tracking experiment also demonstrates that the control algorithm can improve the tracking control effect in human motion tracking control.

In the “straight line” and “curve” trajectory tracking experiments, the robot performed the simple recognition of the subject’s motion intention, based on the feedback data of the displacement sensor. The two groups of experiments proved the efficiency of the dynamic model and control algorithm of the mobile platform. However, the follow-up effect of patients was different from that of healthy subjects. Therefore, the intention recognition algorithm and mobile platform control algorithm should be further improved.

5 Conclusions

This paper first designs a human-computer interaction data acquisition device based on a multi-sensor system according to the characteristics of the human body’s movement behavior. It then analyses the change information of human posture in order to derive the change pattern and behavioral intention of the human body’s center of gravity. In addition, considering the changes of the robot auxiliary force, the influence of the fluctuation of human gravity center on the control system parameters and other external disturbances in the tracking process of the mobile rehabilitation robot, a sliding mode control is introduced. The RBFNN is used to perform the adaptive adjustment of switching gain coefficient, enhance the adaptability to the changes of system parameters and other disturbance factors, and eliminate the jitter phenomenon in sliding mode control. Finally, the robot following motion experiment is designed. The control experiment, quantitative analysis and evaluation methods are used to test the following motion control effect of the rehabilitation robot on healthy subjects and patients. The experimental results show that the robot can follow different subjects to complete the tasks of straight lines and curves. This proves the correctness of the dynamic modeling method of the mobile platform, and the efficiency of the control algorithm. The algorithm has the characteristics of strong convergence and robustness, which proves that the proposed intelligent control scheme is feasible. However, compared with the effect of following healthy subjects, the error of the robot following patient motion is large, in contrast to that of healthy subjects. In future work, because the human-computer interaction data acquisition device of the robot has a better recognition effect on the posture of healthy people than patients, it is crucial to further improve the goodwill map recognition algorithm. We also aim at performing further research on the intention recognition algorithm. Therefore, the robot could accurately identify the motion intention of patients and achieve a better follow-up control effect.