Introduction

The rising number of patients with lower limb dysfunction is attributed to population aging, as well as the increasing prevalence of cardiovascular and cerebrovascular diseases, spinal cord injuries, traumatic brain injuries, and other diseases1,2. Despite the beneficial effects of traditional rehabilitation treatments in restoring certain functions to a limited extent, these approaches often face challenges related to insufficient training intensity, poor reproducibility, and limited therapeutic efficacy3. Hence, it is crucial to identify a more effective and precise rehabilitation treatment method4. The advent of lower limb rehabilitation robots offers a novel approach to addressing the aforementioned issues5. The system enables precise control and training of lower limb motion function through integration of advanced mechanical structure, sensor technology, motion control system and intelligent algorithm. It is becoming a research focus in the field of rehabilitation medicine6.

With regard to the mechanical structure, Hong et al.7 devised an ankle spring configuration for a lower limb exoskeleton robot, based on foam core sandwich structural composites (FCSC). The structure facilitates enhanced motion assistance through an elastic energy storage and release mechanism, thereby reducing the necessity for additional sensors. Concurrently, Shin et al.8 concentrated on the optimization of the knee joint structure of a lower limb wearable robot, devising a multilink structure incorporating a four-rod and six-rod mechanism. This design not only accurately simulates the natural motion pattern of the human knee joint, but also effectively improves the naturalness of motion assistance and the overall operational efficiency of the system by achieving a predetermined transmission ratio. Furthermore, Song et al.9 examined a compact crank-slider series elastic actuator (CS-SEA) structure. This structure incorporates a crank-slider mechanism with a built-in linear spring pack. The objective of this design is to address the issue of torque assistance in lower limb exoskeletons, while simultaneously achieving highly compliant physical interactions.

In terms of sensor technology, Francelino et al.10 developed an accurate estimation system for human continuous body segment posture and joint angle, which can achieve precise assessment using only two sensors: an accelerometer and a gyroscope. Concurrently, Zhang et al.11 proposed a dynamic adaptive neural network (GA-DANN) algorithm, which ingeniously incorporates the multidimensional attributes of surface electromyographic signals (sEMG) in the time domain, frequency domain, and sample entropy, and optimises the learning rate through genetic algorithms (GA) with the objective of enhancing the precision of lower limb movement intention recognition. Furthermore, Kim et al.12 devised a quantitative assessment methodology based on barometric sensors for real-time monitoring and quantifying the degree of misalignment between the exoskeleton robot and the wearer’s knee joint, improving the accuracy and objectivity of the assessment.

In the context of motion control systems, Xu et al.13 proposed an innovative framework for motion generation that combines dynamic motion primitives and impedance models. The framework has been developed with the objective of enabling the dynamic adjustment of the stiffness characteristics of a lower limb rehabilitation robot by means of real-time analysis of the surface electromyogram signal (sEMG). Meanwhile, Park et al.14 investigated the integration of hybrid control strategies with disturbance observers, real-time switching of controllers through adaptive modelling techniques, and the introduction of filter combinations to enhance the stability of lower limb exoskeleton systems. Moreover, Kenas et al.15 developed a seamless integration of model-free adaptive control, non-singular fast terminal sliding mode control and multilayer perceptron (MLP) neural network to optimise the rehabilitation motion control of a 10-degree-of-freedom lower limb exoskeleton.

With regard to intelligent algorithms, Sharifi et al.16 proposed an advanced control strategy for lower limb exoskeletons. This strategy employs an adaptive central pattern generator to facilitate human-robot interaction and an adaptive disturbance observer to adjust trajectory and tracking control in real time. On the other hand, Tsai et al.17 proposed the Adaptive Self-Organising Fuzzy Sliding Mode Controller (ASOFSMC), based on Pneumatic Artificial Muscle (PAM) 2-degree-of-freedom lower limb rehabilitation robot, with the objective of enhancing the precision of lower limb rehabilitation robot control. Furthermore, Laubscher et al.18 put forth a hybrid control strategy that integrates impedance and sliding mode to facilitate secure human-robot interaction.

However, most of these studies mentioned above did not consider the problem of initial state deviation between the patient and the lower limb rehabilitation robotic system, which has a significant impact on the patient’s rehabilitation outcome during the actual rehabilitation process19. Therefore, it is particularly important to choose a control scheme that can cope with the initial state deviation of the system. In the field of robotic systems, there have been research efforts aimed at solving similar challenges. For example, Liu et al.20 proposed an adaptive iterative learning control based on RBF neural network for hybrid robot trajectory tracking containing random initial error and full state constraints. The time-varying boundary layer error function is constructed, the initial conditions of iterative learning control are relaxed, and the tangential potential Lyapunov function is designed to ensure the state constraints. In addition, in the field of robotics, the application of Reinforcement Learning has become increasingly widespread. Nguyen et al.21 introduces an Off-policy algorithm tailored for spacecraft control systems, which aims to address the convergence issues of the Q-learning algorithm in time-varying linear Discrete-Time Systems under complete dynamic uncertainty. On the other hand, Dao et al.22 proposes both On-Policy and Off-Policy strategies for Bilateral Teleoperators systems characterized by variable time delays and dynamic uncertainties. These two strategies collectively address the conflict between synchronous control issues and optimal control performance for robots in unknown environments. Furthermore, Xue et al.23 presents a data-driven, model-free Inverse Reinforcement Learning algorithm specifically designed to solve the inverse H ∞ control problem in robotic systems. Additionally, Wang et al.24 introduces a model-free, Off-policy reinforcement learning algorithm that aims to tackle the Fully Cooperative consensus problem in nonlinear continuous-time Multiagent Systems. While Reinforcement Learning has found applications in the field of robotics, its learning efficiency still requires improvement (Cai et al.25). Therefore, this paper opts for the Iterative Learning Control algorithm.

Iterative learning control represents a methodology for enhancing the repetitive control performance of a system by leveraging the insights gleaned from past executions, with the objective of optimising the control accuracy and overall performance of the improved system26. Furthermore, Cheng et al.27 designed a variable gain iterative learning control strategy to address the challenges associated with the difficult dynamic modeling of hybrid robotic arms, as well as the issues of slow trajectory tracking and large positional errors encountered by traditional controllers. Further, Ye et al.28 put forth a distributed iterative learning control strategy for non-complete mobile robots, which addresses the issues of unknown control gains and the necessity for a predefined reference trajectory model. Furthermore, Maqsood et al.29 address the uncertainty of human dynamics by dividing the task space, combining adaptive impedance control with iterative trajectory learning, and dynamically adjusting the robot assistance to match the user’s motion. This enables the compensation for unintentional force deviations, thereby achieving stable and effective rehabilitation assistance. It can be seen that iterative learning provides a viable solution to the problem of controlling robotic systems.

Given the potential and feasibility of iterative learning control in enhancing robot system performance, this paper aims to utilize an iterative learning control scheme to address the consensus tracking problem in LLRRS with initial state deviations. The contributions of this paper are as follows:

  1. 1.

    A closed-loop PD-type iterative learning control scheme with initial state learning is designed to effectively solve the motion trajectory tracking control problem of LLRRS in the presence of initial state deviations. This scheme only requires input and output data from the system.

  2. 2.

    The initial state learning method designed by introducing the exponential variable gain factor. It accelerates the convergence speed of the state consistency of the LLRRS under the premise of effective consensus of the system state.

  3. 3.

    Based on prototype experiments with LLRRS, the feasibility and effectiveness of the designed exponential variable gain closed-loop iterative learning control algorithm with initial state learning are verified, further expanding its practical application value.

The following sections of this paper are organized as follows: Firstly, the construction of the lower limb rehabilitation robot system model and the establishment of the target motion trajectory are introduced in details; Then the motion controller based on iterative learning control is designed, verifies its convergence behaviour and conducts simulation analysis; Then the system performance is evaluated through the test of the experimental prototype; Finally, a summary of the entire text is provided, and future research directions are proposed.

Lower limb rehabilitation robotic system model and target motion trajectory

To facilitate the analysis of the motion process of the Lower Limb Rehabilitation Robot System (LLRRS), it is necessary to establish a mathematical model, which is preceded by the following two assumptions:

Assumption 1

The LLRRS operates solely within the sagittal plane.

Assumption 2

The masses of both the thigh (calf) of the LLRRS are concentrated at their respective centers of mass.

Lower limb rehabilitation robotic system model

Since the normal gait of human walking is completed alternately by two legs, and the movements of both legs are completely consensus. Therefore, any single leg can be selected for modeling. The simplified model is shown in Fig. 1 below.

Fig. 1
figure 1

Single leg model of lower limb rehabilitation robot.

where point O is the hip joint, set as the origin of the coordinates; point N is the knee joint; point S is the ankle joint; the angle between the thigh link ON and the vertical line is defined as \({\theta _1}\), while the angle between the extension line of ON and the calf link NS is defined as \({\theta _2}\); l1 denotes the length of the thigh link ON, and l2 denotes the length of the calf link NS; the centre of mass coordinates of the thigh (calf) link are denoted as P(x1,y1) and Q(x2,y2) respectively; the thigh (calf) link masses are m1 and m2 respectively.

The kinetic equations of the LLRRS are derived from the Lagrange Equation30 as follows:

$$u(t)=D(\theta )\ddot {\theta }+H(\theta ,\dot {\theta })\dot {\theta }+G(\theta )+{T_d}$$
(1)

where \(u(t)\) represents the joint moment matrix, \(\theta\) is the lower limb joint angle, \(\dot {\theta }\) is the joint angular velocity, and \(\ddot {\theta }\) is the joint angular acceleration. \(D(\theta )\) is the inertia matrix, specified as:

$$\left\{ \begin{gathered} {D_{11}}=\frac{1}{4}{m_1}l_{1}^{2}+{m_2}l_{1}^{2}+\frac{1}{4}{m_2}l_{2}^{2}+m{}_{2}{l_1}{l_2}\cos {\theta _2} \\ {D_{12}}={D_{21}}= - \frac{1}{4}{m_2}l_{2}^{2} - \frac{1}{2}m{}_{2}{l_1}{l_2}\cos {\theta _2} \\ {D_{22}}=\frac{1}{4}m{}_{2}l_{2}^{2} \\ \end{gathered} \right.$$
(1a)

\(H(\theta ,\dot {\theta })\) is the centrifugal and Coriolis force matrix, specified as:

$$\left\{ \begin{gathered} {H_{11}}= - m{}_{2}{l_1}{l_2}{{\dot {\theta }}_2}sin{\theta _2} \\ {H_{12}}=\frac{1}{2}m{}_{2}{l_1}{l_2}{{\dot {\theta }}_2}sin{\theta _2} \\ {H_{21}}=m{}_{2}{l_1}{l_2}{{\dot {\theta }}_1}sin{\theta _2} \\ {H_{22}}=0 \\ \end{gathered} \right.$$
(1b)

\(G(\theta )\) is the gravity matrix, specifically:

$$\left\{ \begin{gathered} {G_1}=(\frac{1}{2}{m_1}+{m_2})g{l_1}\sin {\theta _1}+\frac{1}{2}{m_2}g{l_2}\sin ({\theta _1} - {\theta _2}) \\ {G_2}= - \frac{1}{2}{m_2}g{l_2}\sin ({\theta _1} - {\theta _2}) \\ \end{gathered} \right.$$
(1c)

\({T_d}\) is the system error and perturbation, specifically:

$${T_d}={[0.3\sin t\quad 0.1(1 - {e^{ - t}})]^T}$$
(1d)

Letting \(A(t,\theta ,\dot {\theta })= - {D^{ - 1}}(\theta )\left[ {H(\theta ,\dot {\theta })\dot {\theta }+G(\theta )+{T_d}} \right]\), then Eq. (1) is written as:

$$\ddot {\theta }={D^{ - 1}}(\theta )u(t)+A(t,\theta ,\dot {\theta })$$
(2)

Equation (2) can be further written in state space form, i.e.:

$$\left\{ \begin{gathered} \dot {x}(t)=\Phi (t,x(t))+M(t)u(t) \hfill \\ y(t)=Cx(t) \hfill \\ \end{gathered} \right.$$
(3)

where\(\Phi (t,x(t))=\left[ \begin{gathered} {\dot {\theta }} \hfill \\ A(t,\theta ,\dot {\theta }) \hfill \\ \end{gathered} \right]\),\(M(t)=\left[ \begin{gathered} 0 \hfill \\ {D^{ - 1}}(\theta ) \hfill \\ \end{gathered} \right]\),\(x(t)=\left[ \begin{gathered} \theta \hfill \\ {\dot {\theta }} \hfill \\ \end{gathered} \right]\),\(C=\left[ {\begin{array}{*{20}{c}} 0&I \end{array}} \right]\).

Target motion trajectory of lower limb rehabilitation robot

In this study, normal human gait data are used as the target motion trajectory of the LLRRS. In order to facilitate the subsequent motion control of the LLRRS, the data are now fitted to a continuous function and the second order derivatives of the fitted function are ensured to be continuous. In this paper, a segmented 3rd order polynomial is used for fitting and its second order derivative is set to be:

$$\ddot {\theta }(t)={F_\kappa }\frac{{{t_{\kappa +1}} - t}}{{{h_\kappa }}}+{F_{\kappa +1}}\frac{{{t_{\kappa +1}} - t}}{{{h_\kappa }}}$$
(4)

where F is the function fitting coefficient, h is the fitting step, and \(\kappa\) is the discrete data. One obtains:

$$\theta (t)={F_\kappa }\frac{{{{({t_{\kappa +1}} - t)}^3}}}{{6{h_\kappa }}}+{F_{\kappa +1}}\frac{{{{(t - {t_\kappa })}^3}}}{{6{h_\kappa }}}+(\theta ({t_\kappa }) - \frac{{{F_\kappa }h_{\kappa }^{2}}}{6})\frac{{{t_{\kappa +1}} - t}}{{{h_\kappa }}}+(\theta ({t_{\kappa +1}}) - \frac{{{F_\kappa }h_{\kappa }^{2}}}{6})\frac{{t - {t_\kappa }}}{{{h_\kappa }}}$$
(5)

Further, due to \(\theta ^{\prime}({t_\kappa }+0)=\theta ^{\prime}({t_\kappa } - 0)\), one gets:

$$- \frac{{{h_\kappa }}}{3}{M_\kappa } - \frac{{{h_k}}}{6}{M_{\kappa +1}}+\frac{{\theta ({t_{\kappa +1}}) - \theta ({t_\kappa })}}{{{h_k}}}=\frac{{{h_{\kappa - 1}}}}{6}{M_{\kappa - 1}}+\frac{{{h_{\kappa - 1}}}}{3}{M_\kappa }+\frac{{\theta ({t_\kappa }) - \theta ({t_{\kappa - 1}})}}{{{h_{\kappa - 1}}}}$$
(6)

Letting \({d_k}=6\frac{{\theta [{t_\kappa },{t_{\kappa +1}}] - \theta [{t_{\kappa - 1}},{t_\kappa }]}}{{{h_{\kappa - 1}}+{h_\kappa }}}\), \({\alpha _i}=\frac{{{h_{\kappa - 1}}}}{{{h_{\kappa - 1}}+{h_\kappa }}}\), \(\beta =\frac{{{h_\kappa }}}{{{h_{\kappa - 1}}+{h_\kappa }}}\),then Eq. (6) is collapsed as:

$${\alpha _\kappa }{M_\kappa }+2{M_\kappa }+{\beta _\kappa }{M_\kappa }={d_\kappa }$$
(7)

The results of the function fitting are as follows:

$${\theta _{1fit}}(t)=\left\{ \begin{gathered} - 112.63{(t - 0)^3}+40.70{(t - 0)^2}+3.24(t - 0)+39.99\quad t \in [0,0.12) \hfill \\ - 112.63{(t - 0.12)^3} - 81.25{(t - 0.12)^2} - 17.88(t - 0.12)+38.82\quad t \in [0.12,0.24) \hfill \\ 256.45{(t - 0.24)^3} - 121.80{(t - 0.24)^2} - 42.24(t - 0.24)+35.31\quad t \in [0.24,0.36) \hfill \\ 66.59{(t - 0.36)^3} - 29.48{(t - 0.36)^2} - 60.40(t - 0.36)+28.93\quad \;\;\,t \in [0.36,0.64) \hfill \\ 7.04{(t - 0.64)^3}+26.46{(t - 0.64)^2} - 61.24(t - 0.64)+11.17\quad \quad \,t \in [0.64,0.8) \hfill \\ \end{gathered} \right.$$
(8)
$${\theta _{1fit}}(t)=\left\{ \begin{gathered} 136.52{(t - 0.8)^3}+29.84{(t - 0.8)^2} - 52.23(t - 0.8)+2.08\quad \quad \;\;t \in [0.8,0.92) \hfill \\ 281.48{(t - 0.92)^3}+78.99{(t - 0.92)^2} - 39.17(t - 0.92) - 3.52\quad t \in [0.92,1) \hfill \\ 151.09{(t - 1)^3}+146.54{(t - 2)^2} - 21.13(t - 1) - 6.01\quad \quad \quad \quad \;\;\,\,t \in [1,1.08) \hfill \\ 377.82{(t - 1.08)^3}+182.81{(t - 1.08)^2}+5.22(t - 1.08) - 6.68\quad \;\,t \in [1.08,1.16) \hfill \\ - 388.63{(t - 1.16)^3}+273.48{(t - 1.16)^2}+41.72(t - 1.16) - 4.90\quad t \in [1.16,1.32) \hfill \\ \end{gathered} \right.$$
(8a)
$${\theta _{1fit}}(t)=\left\{ \begin{gathered} - 486.12{(t - 1.32)^3}+86.94{(t - 1.32)^2}+99.39(t - 1.32)+7.18\quad t \in [1.32,1.48) \hfill \\ 59.53{(t - 1.48)^3} - 146.40{(t - 1.48)^2}+89.88(t - 1.48)+23.32\quad \,t \in [1.48,1.60) \hfill \\ 116.83{(t - 1.6)^3} - 124.97{(t - 1.6)^2}+57.31(t - 1.6)+32.1\quad \quad \;\;\,\,t \in [1.60,1.72) \hfill \\ - 29.18{(t - 1.72)^3} - 82.91{(t - 1.72)^2}+32.37(t - 1.72)+37.38\quad t \in [1.72,1.84) \hfill \\ 138.55{(t - 1.84)^3} - 93.41{(t - 1.84)^2}+11.21(t - 1.84)+40.02\quad \;t \in [1.84,1.92) \hfill \\ 138.56{(t - 1.92)^3} - 60.16{(t - 1.92)^2} - 1.07(t - 1.92)+40.39\;\,\,\quad t \in [1.92,2] \hfill \\ \end{gathered} \right.$$
(8b)
$${\theta _{2fit}}(t)=\left\{ \begin{gathered} - 749.41{(t - 0)^3}+311.91{(t - 0)^2}+12.50(t - 0)+8.16\quad \quad \quad \quad \quad \;\,t \in [0,0.12) \hfill \\ - 749.41{(t - 0.12)^3}+42.12{(t - 0.12)^2}+54.99(t - 0.12)+12.86\quad \;\;t \in [0.12,0.24) \hfill \\ - 526.15{(t - 0.24)^3} - 227.67{(t - 0.24)^2}+32.72(t - 0.24)+18.77\quad t \in [0.24,0.3) \hfill \\ 867.93{(t - 0.3)^3} - 322.38{(t - 0.3)^2} - 0.28(t - 0.3)+19.8\quad \quad \quad \quad \,t \in [0.3,0.36) \hfill \\ 458.60{(t - 0.36)^3} - 166.15{(t - 0.36)^2} - 29.59(t - 0.36)+18.81\;\,\,\quad t \in [0.36,0.52) \hfill \\ \end{gathered} \right.$$
(9)
$${\theta _{2fit}}(t)=\left\{ \begin{gathered} 70.39{(t - 0.52)^3}+53.98{(t - 0.36)^2} - 47.54(t - 0.52)+11.7\quad \,t \in [0.52,0.72) \hfill \\ 104.54{(t - 0.72)^3}+96.21{(t - 0.72)^2} - 17.50(t - 0.72)+4.91\;\;\,\,t \in [0.72,0.8) \hfill \\ - 138.91{(t - 0.8)^3}+121.30{(t - 0.8)^2} - 0.10(t - 0.8)+4.18\quad \;\;t \in [0.8,0.88) \hfill \\ 590.12{(t - 0.88)^3}+87.96{(t - 2)^2}+16.64(t - 0.88)+4.88\quad \;\,\,\,t \in [0.88,1) \hfill \\ - 322.21{(t - 1)^3}+300.41{(t - 1)^2}+63.24(t - 1)+9.16\quad \quad \quad \;\,\,\,t \in [1,1.2) \hfill \\ \end{gathered} \right.$$
(9a)
$${\theta _{2fit}}(t)=\left\{ \begin{gathered} - 0.002{(t - 1.2)^3}+107.07{(t - 1.2)^2}+144.74(t - 1.2)+31.25\quad \quad t \in [1.2,1.36) \hfill \\ 101.87{(t - 1.36)^3} - 455.34{(t - 1.36)^2}+89.02(t - 1.36)+52.35\quad t \in [1.36,1.46) \hfill \\ 157.52{(t - 1.46)^3} - 424.78{(t - 1.46)^2}+1.00(t - 1.46)+56.8\quad \quad t \in [1.46,1.56) \hfill \\ 718.05{(t - 1.56)^3} - 377.53{(t - 1.56)^2} - 79.23(t - 1.56)+52.81\quad t \in [1.56,1.72) \hfill \\ 835.84{(t - 1.72)^3} - 32.86{(t - 1.72)^2} - 144.89(t - 1.72)+33.41\quad t \in [1.72,1.88) \hfill \\ 835.84{(t - 1.88)^3}+368.34{(t - 1.88)^2} - 91.21(t - 1.88)+12.81\quad t \in [1.88,2] \hfill \\ \end{gathered} \right.$$
(9b)

where, \({\theta _{1fit}}\) and \({\theta _{2fit}}\) represent the motion trajectories of the hip and knee joints, respectively. The function curve is shown in Fig. 2, the red circle represents the data points collected by Real Gait DeLong Whole Body 3D Gait and Motion Analysis System, while the blue solid line represents the fitting function. It can be observed from the figure that the blue solid line and the red circle essentially overlap, which indicates that the fitting function obtained by using the segmented 3rd degree polynomial method has a satisfactory fitting effect.

Fig. 2
figure 2

Joint data points and fitting functions.

Remark 1

In Fig. 2, the abscissa represents time, with units in seconds. The ordinate indicates the hip and knee joint angles of normal gait, with units in degrees.

The following error analysis is performed on the fitted function with the expression:

$$er{r_{hip}}=\mathop {\hbox{max} }\limits_{{0 \leqslant t \leqslant 2}} |{Z_{hip}}(t) - {\theta _{1fit}}(t)|=0.1237^\circ$$
(10)
$$er{r_{knee}}=\mathop {\hbox{max} }\limits_{{0 \leqslant t \leqslant 2}} |{Z_{knee}}(t) - {\theta _{2fit}}(t)|=0.9821^\circ$$
(11)

where err is the fitting error and Z is the sampling point.

The results of the function fitting error analysis indicate that the maximum fitting errors of both the hip and knee joints are within 1°, which is a satisfactory fit and thus can be used as the target motion trajectory of LLRRS.

Motion controller design for lower limb rehabilitation robotic system

In actual patient rehabilitation training, the initial state of the LLRRS is frequently shifted due to external disturbances or uncertainties, etc., resulting in the LLRRS being unable to maintain the desired initial state. This deviation may cause the LLRRS to fail to function properly. Therefore, this section aims to design the iterative learning controller with initial state learning for the initial position deviation problem of LLRRS.

Design of a closed-loop PD-type iterative learning controller based on initial state learning

To facilitate the description of the design process of the control algorithm, the following 2 assumptions are made:

Assumption 3

and C in the mathematical model (3) of the LLRRS are bounded; \(I+CM(t)L\) is invertible; and \(\Phi (t,{x_k}(t))\) satisfies the Lipschitz condition.

Assumption 4

There exists an optimal control input \({u_d}(t)\) to the LLRRS, an optimal state \({x_d}(t)\), and a target trajectory \({y_d}(t)\), which is continuous in \(t \in [0,T]\).

The iterative learning algorithm for the LLRRS equations is given by:

$$\left\{ \begin{gathered} {{\dot {x}}_k}(t)=\Phi (t,{x_k}(t))+M(t){u_k}(t) \hfill \\ {y_k}(t)=C{x_k}(t) \hfill \\ \end{gathered} \right.$$
(12)

where k denotes the k-th iteration learning number of LLRRS.

The output error is:

$${e_k}(t)={y_d}(t) - {y_k}(t)$$
(13)

The input control law uses a closed-loop PD-type iterative learning control algorithm:

$${u_{k+1}}(t)={u_k}(t)+K{e_{k+1}}(t)+L{\dot {e}_{k+1}}(t)$$
(14)

where \({e_{k+1}}(t)\) and \({\dot {e}_{k+1}}(t)\) denote the tracking error and its error derivative for the k + 1-th iteration learning of LLRRS, respectively, and K and L are the iterative learning gain matrices to be determined.

The iterative learning control algorithm is also used to iteratively learn the initial state of the LLRRS, and its initial state control law is designed as:

$${x_{k+1}}(0)={x_k}(0)+M(0)L{e_{k+1}}(0)$$
(15)

where \({x_k}(0)\) is the initial state of the k-th iteration of the LLRRS and \({e_{k+1}}(0)\) is the initial value of the tracking error of the k + 1-th iteration of the LLRRS.

The control block diagram of LLRRS is shown in Fig. 3, which is mainly composed of two parts: initial value learning module and trajectory tracking module. Initial value learning module: this module learns the initial value deviation according to the initial state, initial deviation and learning rate of LLRRS.The module is capable of dynamically adjusting the initial state in order to reduce the initial deviation of LLRRS. Trajectory tracking module: this module performs estimated tracking learning based on the joint force learned in the previous iteration, the angular deviation in the current cycle, the rate of change of the angular deviation, and the learning rate. This module facilitates the dynamic tracking of the LLRRS trajectory. Following a sufficient number of iterations of learning, the initial state deviation of LLRRS is gradually reduced, thereby ensuring that the motion trajectory of LLRRS is gradually consensus with the target trajectory.

Fig. 3
figure 3

Block diagram of closed-loop PD-type iterative learning control based on initial state learning.

The following is pseudo-code for closed-loop PD-type iterative learning control based on initial learning:

Algorithm 1

Control of the operation of a robot for the rehabilitation of the lower limbs in the presence of an initial state deviation.

figure a

The following is an analysis of the convergence behaviour of a closed-loop PD-type iterative learning control based on initial state learning:

Lemma 1 31

Letting \(x(t)\), \(c(t)\) and \(a(t)\) (\(a(t) \geqslant 0\))be real-valued continuous functions on \(t \in [0,T]\). If \(x(t) \leqslant c(t)+\int_{0}^{t} {a(\tau )x(\tau )d\tau }\), then

$$x(t) \leqslant c(t)+\int_{0}^{t} {a(\tau )c(\tau ){e^{\int_{0}^{t} {a(\sigma )d\sigma } }}d\tau }$$
(16)

Lemma 2 32

Assuming on \(t \in [0,T]\) that the operator \(Q:{C_r}[0,T] \to {C_r}[0,T]\) satisfies \(\left\| {Q(x)(t)} \right\| \leqslant M(q+\int_{0}^{t} {\left\| {x(s)} \right\|ds} )\;;\;\left\| {Q(x)(t) - Q(y)(t)} \right\| \leqslant M\int_{0}^{t} {\left\| {x(s) - y(s)} \right\|ds}\), where \(M \geqslant 0,q \geqslant 0\,\forall x,y \in {C_r}[0,T]\), the following conclusions follow:

(a1) \(\forall y \in {C_r}[0,T]\), there exists a unique \(\forall x \in {C_r}[0,T]\) such that

$$x(t)+Q(x)(t)=y(t),t \in [0,T]$$
(17)

(a2) Define the operator Q to be \(\bar {Q}(y)(t)=Q(x)(t)\), \(\forall y \in {C_r}[0,T]\), where \(\forall x \in {C_r}[0,T]\) is the unique solution of (a1), then there exists a constant of \({M_1}>0\) such that

$$\left\| {\bar {Q}(y)(t)} \right\| \leqslant {M_1}(q+\int_{0}^{t} {\left\| {y(s)} \right\|ds} )$$
(18)

Lemma 3 33

Letting the sequence of constants \({\left\{ {{b_k}} \right\}_{k \geqslant 0}}({b_k} \geqslant 0)\) converge to zero and the operator Q satisfy \(\left\| {{Q_k}(u)(t)} \right\| \leqslant M({b_k}+\int_{0}^{t} {\left\| {u(s)} \right\|ds} )\), where the constant \(M \geqslant 1\), and the r-dimensional vectors of \({C_r}[0,T]\) take the maximum norm. Letting \(P(t)\) be a matrix of \(r \times r\) dimensional continuous functions, and \(P:{C_r}[0,T] \to {C_r}[0,T]\) be \(P(u)(t)=P(t)u(t)\). If the spectral radius of P is less than 1, then

$$\mathop {\lim }\limits_{{n \to \infty }} (P+{Q_n})(P+{Q_{n - 1}}) \cdots (P+{Q_0})(u)(t)=0$$
(19)

holds consistently for t.

Theorem 1

If LLRRS (12) satisfies condition \(\rho [{(I+CM(t)L)^{ - 1}}]<1,t \in [0,T]\), then LLRRS in any initial state, one has:

$$\mathop {\lim }\limits_{{k \to \infty }} {y_k}(t)={y_d}(t), t \in [0,T]$$
(20)

where \({y_d}(t)\) is the target motion trajectory of LLRRS.

Proof

It can be derived from Eq. (12), Eqs. (14) and (15) in the previous section:

$$\begin{gathered} {x_{k+1}}(t)={x_{k+1}}(0)+\int_{0}^{t} {\left[ {\Phi (\tau ,{x_{k+1}}(\tau ))+M(\tau ){u_{k+1}}(\tau )} \right]d\tau } \\ ={x_k}(0)+M(0)L{e_{k+1}}(0)+\int_{0}^{t} {\Phi (\tau ,{x_{k+1}}(\tau ))d\tau } +\int_{0}^{t} {M(\tau )\left[ {{u_k}(\tau )+K{e_{k+1}}(\tau )+L{{\dot {e}}_{k+1}}(\tau )} \right]d\tau } \\ ={x_k}(t)+\int_{0}^{t} {\left[ {\Phi (\tau ,{x_{k+1}}(\tau )) - \Phi (\tau ,{x_k}(\tau ))} \right]d\tau } +\int_{0}^{t} {M(\tau )K{e_{k+1}}(\tau )d\tau } +M(t)L{e_{k+1}}(t) \\ +\int_{0}^{t} {\dot {M}(\tau )L{e_{k+1}}(\tau )d\tau } \\ \end{gathered}$$
(21)

Meanwhile, the difference between the k + 1-th state and the k-th state of the LLRRS can be obtained as:

$$\begin{gathered} {x_{k+1}}(t) - {x_k}(t)=\int_{0}^{t} {(\Phi (\tau ,{x_{k+1}}(\tau )) - \Phi (\tau ,{x_k}(\tau )))d\tau } +M(t)L{e_{k+1}}(t) \\ - \int_{0}^{t} {(\dot {M}(\tau )L+M(\tau )K){e_{k+1}}(\tau )d\tau } \\ \end{gathered}$$
(22)

Taking simultaneous paradigms for both sides of the above Eq. (22), we have, according to the aforementioned Lemma 1:

$$\begin{gathered} \left\| {{x_{k+1}}(t) - {x_k}(t)} \right\| \leqslant \varphi \int_{0}^{t} {\left\| {{x_{k+1}}(\tau ) - {x_k}(\tau )} \right\|d\tau } +ml\left\| {{e_{k+1}}(t)} \right\|+n\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } +mk\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } \\ \leqslant ml\left\| {{e_{k+1}}(t)} \right\|+{n_2}\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } \\ \end{gathered}$$
(23)

where \(m=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| {M(t)} \right\|\), \(l=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| L \right\|\), \(k=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| K \right\|\), \(n=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| {\dot {M}(t)L} \right\|\), \({n_2}={n_1}+\varphi ml{e^{\varphi T}}+{n_1}\varphi T{e^{\varphi T}}\), \({n_1}=n+mk\).

From the aforementioned Eqs. (12) and (13), it can also be obtained:

$${e_{k+1}}(t) - {e_k}(t)=\left[ {{y_d}(t) - {y_{k+1}}(t)} \right] - \left[ {{y_d}(t) - {y_k}(t)} \right]=C\left[ {{x_k}(t) - {x_{k+1}}(t)} \right]$$
(24)

Further, from Eqs. (24) and (22), the following equation also holds, viz.:

$$\begin{gathered} {e_{k+1}}(t)={\left[ {I+CM(t)L} \right]^{ - 1}}{e_k}(t)+{\left[ {I+CM(t)L} \right]^{ - 1}} \cdot \hfill \\ C[\int_{0}^{t} {\dot {M}(\tau )L{e_{k+1}}(\tau )d\tau } - \int_{0}^{t} {M(\tau )K{e_{k+1}}(\tau )d\tau } \hfill \\ - \int_{0}^{t} {(\Phi (\tau ,{x_{k+1}}(\tau )) - \Phi (\tau ,{x_k}(\tau )))d\tau } ] \hfill \\ \end{gathered}$$
(25)

Letting \(Q(t)={\left[ {I+CM(t)L} \right]^{ - 1}}\) again, the operator can be defined as

$$\begin{gathered} {S_{k+1}}\left( {{e_{k+1}}} \right)(t)= - {\left[ {I+CM(t)L} \right]^{ - 1}}C[\int_{0}^{t} {(\dot {M}(\tau )L+M(\tau )K){e_{k+1}}(\tau )d\tau } \\ - \int_{0}^{t} {(\Phi (\tau ,{x_{k+1}}(\tau )) - \Phi (\tau ,{x_k}(\tau )))d\tau } ] \\ \end{gathered}$$
(26)
$${e_{k+1}}(t)+{S_{k+1}}\left( {{e_{k+1}}} \right)(t)=Q(t){e_k}(t)$$
(27)

Taking paradigms for both ends of Eq. (27) and estimating the operator \({S_{k+1}}\), there are:

$$\begin{gathered} \left\| {{S_{k+1}}\left( {{e_{k+1}}} \right)(t)} \right\| \leqslant (hcn+hcmk)\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } +hc\varphi \int_{0}^{t} {\left\| {{x_{k+1}}(\tau ) - {x_k}(\tau )} \right\|d\tau } \\ \leqslant {H_1}\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } \leqslant {H_2}\int_{0}^{t} {\left\| {{e_{k+1}}(\tau )} \right\|d\tau } \\ \end{gathered}$$
(28)

where \({H_1}=hc{n_1}+hc\varphi ml+hc\varphi {n_2}T,{H_2}=\hbox{max} (1,{H_1})\), \(h=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| {{{\left[ {I+CM(t)L} \right]}^{ - 1}}} \right\|\), \(c=\mathop {\sup }\limits_{{t \in [0,T]}} \left\| C \right\|\).

Furthermore, assuming \({e_{k+1}}(t), {e_k}(t) \in {C_r}[0,T]\), according to the aforementioned Lemma 2 we have

$${e_{k+1}}(t)+{\bar {S}_{k+1}}\left( {Q{e_k}} \right)(t)=Q(t){e_k}(t)$$
(29)

where \({\bar {S}_{k+1}}\) satisfies \(\left\| {\bar {Q}(y)(t)} \right\| \leqslant {M_1}(q+\int_{0}^{t} {\left\| {y(s)} \right\|ds} )\)

$$\left\| {{{\bar {S}}_{k+1}}\left( {Q{e_k}} \right)(t)} \right\| \leqslant {N_1}\int_{0}^{t} {\left\| {Q(\tau ){e_k}(\tau )} \right\|d\tau } ,{N_1}>0$$
(30)

and define \({J_{k+1}}:{C_r}[0,T] \to {C_r}[0,T]\) as

$${J_{k+1}}{e_k}(t)= - {\bar {S}_{k+1}}\left( {Q{e_k}} \right)(t)$$
(31)

\(\exists {N_2} \geqslant 1\), then we have

$${e_{k+1}}(t)=Q(t){e_k}(t)+{J_{k+1}}({e_k})(t)=(Q+{J_{k+1}})(Q+{J_k}) \cdots (Q+{J_1}){e_0}(t)$$
(32)

Finally, it follows from the previous Lemma 3 that if the spectral radius of \(Q(t)\) is less than 1, i.e., \(\rho [{(I+CM(t)L)^{ - 1}}]<1\), then

$$\mathop {\lim }\limits_{{k \to \infty }} {e_{k+1}}(t)=0$$
(33)

This completes the proof of Theorem 1.

Design of exponential variable gain type iterative learning controller based on initial state learning

Although the above proposed closed-loop PD-type iterative learning control algorithm based on initial state learning can effectively realize the trajectory tracking control of the LLRRS hip (knee) joint, its iterative learning efficiency is lower and its convergence speed is slower. The faster convergence speed often indicates that the system is better able to adapt to different initial conditions and environmental changes, and exhibits higher robustness. This is particularly important in systems operating in non-static or changing environments34. To further improve the convergence speed of the LLRRS trajectory tracking error, an exponential variable gain type accelerated iterative learning consensus control scheme based on initial state learning is designed in this subsection.

Based on the closed-loop PD iterative learning control law (Eq. 14), an exponential factor term is added to obtain the exponential variable gain type iterative learning control law for LLRRS, as shown below:

$${u_{k+1}}(t)={u_k}(t)+\lambda (t)\left( {K{e_{k+1}}(t)+L{{\dot {e}}_{k+1}}(t)} \right)$$
(34)

where \(\lambda (t){\text{=}}{e^{\alpha t}}\) and \(\alpha\) is the exponential learning factor with the value range (0,1). Meanwhile, the initial state learning control law based on the aforementioned Eq. (15) is also adjusted to:

$${x_{k+1}}(0)={x_k}(0)+M(0)L\lambda (0){e_{k+1}}(0)$$
(35)

The process of analyzing the convergence behaviour of the exponential variable gain type iterative learning control algorithm based on initial state learning is similar to that of the closed-loop PD-type iterative learning control based on initial state learning in previous section, and will not be repeated here. It is finally concluded that if LLRRS Eq. (12) satisfies condition

$$\rho [{(I+CM(t)\lambda (t)L)^{ - 1}}]<1,t \in [0,T]$$
(36)

then LLRRS in any initial state, one has: the actual output converges to the desired objective.

Next, a theoretical proof that an exponential variable gain type iterative learning control algorithm based on initial state learning converges faster than a closed-loop PD type iterative learning control algorithm based on initial state learning is given.

Define

$$\left\{ \begin{gathered} {\rho _{PD}}=\rho \left[ {{{\left( {{\rm I}+CM(t)L} \right)}^{ - 1}}} \right] \hfill \\ {\rho _{EXP}}=\rho \left[ {{{\left( {{\rm I}+CM(t)\lambda (t)L} \right)}^{ - 1}}} \right] \hfill \\ \end{gathered} \right.\;\;$$
(37)

where let \({\rho _{PD}}\) denote the spectral radius of the closed-loop PD type iterative learning control system, and \({\rho _{EXP}}\) represent the spectral radius of the exponential variable gain iterative learning control system.

Theorem 2

It is known that both \({\rho _{PD}}\) and \({\rho _{EXP}}\) are less than 1, If satisfies condition

$${\rho _{PD}} - {\rho _{EXP}}>0$$
(38)

Then it is shown that the exponential variable gain iterative learning control algorithm of LLRRS converges faster than the closed-loop PD-type iterative learning control algorithm in any initial state.

Proof

Utilizing the scaling method based on matrix norms, it can be obtained:

$$\begin{gathered} {\rho _{PD}} - {\rho _{EXP}}=\rho \left[ {{{\left( {{\rm I}+CM(t)L} \right)}^{ - 1}}} \right]\; - \rho \left[ {{{\left( {{\rm I}+CM(t)\lambda (t)L} \right)}^{ - 1}}} \right] \\ \leqslant \left\| {{{\left( {{\rm I}+CM(t)L} \right)}^{ - 1}}} \right\| - \left\| {{{\left( {{\rm I}+CM(t)\lambda (t)L} \right)}^{ - 1}}} \right\| \\ \end{gathered}$$
(39)

Given that both \({\rho _{PD}}\) and \({\rho _{EXP}}\) possess inverse matrices, obtain their respective inverses.

Define

$$H=\left\| {\left( {{\rm I}+CM(t)L} \right)} \right\| - \left\| {\left( {{\rm I}+CM(t)\lambda (t)L} \right)} \right\|$$
(40)

Here, according to the properties of matrix norms, one obtains

$$\begin{gathered} H \leqslant \left[ {\left\| {\rm I} \right\|+\left\| {CM(t)L} \right\|} \right] - \left[ {\left\| {\rm I} \right\|+\left\| {CM(t)\lambda (t)L} \right\|} \right] \\ =\left\| {CM(t)L} \right\|\left[ {1 - \lambda (t)} \right] \\ \end{gathered}$$
(41)

where \(\left\| {CM(t)L} \right\|>0\), and \(\lambda (t)\; \geqslant 1\) (The equality sign holds if and only if t = 0). It can be obtained: \(H \leqslant 0\).

Finally, one obtains

$$\left\| {{{\left( {{\rm I}+CM(t)L} \right)}^{ - 1}}} \right\| - \left\| {{{\left( {{\rm I}+CM(t)\lambda (t)L} \right)}^{ - 1}}} \right\|>0$$
(42)

This completes the proof of Theorem 2.

Design of exponential variable gain type iterative learning controller based on initial state learning

Simulation analysis of closed-loop PD-type iterative learning control based on initial state learning

The target motion trajectory of the LLRRS has been given above. The mathematical model of the LLRRS adopts the aforementioned Eq. (12), with a simulation cycle length of 2 s, a sampling time of 0.01 s, and an initial value of the target motion trajectory:

$${x_d}(0)=\left[ {\begin{array}{*{20}{c}} {39.99}&{ - 3.24}&{8.16}&{12.50} \end{array}} \right]$$
(43)

The initial value of LLRRS is:

$$x(0)=[\begin{array}{*{20}{c}} { - 3.85}&{ - 18.30}&{54.74}&{ - 20.65} \end{array}]$$
(44)

The iterative learning control gain matrix is taken:

$$\left\{ \begin{gathered} K=diag\left[ {\begin{array}{*{20}{c}} {30}&{40} \end{array}} \right] \hfill \\ L=diag\left[ {0.\begin{array}{*{20}{c}} 8&{0.6} \end{array}} \right] \hfill \\ \end{gathered} \right.$$
(45)

Calculating the spectral radius \({\rho _{PD}}\), we have

$$\rho [{(I+CM(t)L)^{ - 1}}]\;{\text{=}}\;{\text{0.77}}<1$$
(46)

The convergence condition is satisfied.

The tracking iterative control process of the hip and knee joints of the LLRRS is shown in Fig. 4. In the first iterative learning stage (a and e), it can be observed that there exists a significant deviation between the target curve (red dashed line) and the actual curve (blue solid line), which indicates that the hip (knee) joints of the LLRRS fail to track the target trajectory effectively, and that it needs further improvement. In the third iterative learning stage (b and f), although some deviation still exists, this deviation has been significantly reduced relative to the initial learning result, indicating the effectiveness of the iterative learning process and the trend of tracking error decreasing gradually. Subsequently, in the 17th iteration learning stage (c and g) and the 20th iteration learning stage (d and h), the actual curves basically coincide with the target curves, indicating that the hip (knee) joint of the LLRRS has been able to track the target trajectory effectively. In summary, the closed-loop PD-type iterative learning control algorithm with initial state learning shows good results in the LLRRS, successfully solves the initial state deviation problem, and achieves accurate tracking of the motion trajectory.

Fig. 4
figure 4

Tracking iterative control process of hip (knee) joints of lower limb rehabilitation robot.

Remark 2

In Fig. 4, the abscissa represents time, with units in seconds. The ordinate of subplots (a)-(d) indicates the hip joint angle of the LLRRS, and the ordinate of subplots (e)-(h) indicates the knee joint angle of the LLRRS, both with units in degrees.

Fig. 5
figure 5

Maximum error in the iterative learning process of the hip (knee) joint of lower limb rehabilitation robot.

Remark 3

In Fig. 5, the abscissa represents the number of iterations for the closed-loop PD type iterative learning control of the LLRRS, with units in times. The ordinate indicates the maximum angular error of the hip (knee) joint of the LLRRS, with units in degrees.

As shown in Fig. 5, the maximum angular tracking error of the hip (knee) joint of the LLRRS during iterative learning is shown, where the red line with stars represents the hip joint and the blue line with circles represents the knee joint. From the global perspective, both the red line with stars and the blue line with circles show a decreasing trend, and the blue line with circles decreases faster, which indicates that the closed-loop PD-type iterative learning control algorithm with initial state learning can effectively reduce the angular tracking error of the hip (knee) joints of the LLRRS, and in particular the angular tracking error of the knee joints decreases more significantly. From the local perspective, after 18 iterations of learning, the errors of both knee and hip joints are reduced to lower values, below 0.2°. The variation graph of this maximum error argues the effectiveness of the closed-loop PD-type iterative learning control algorithm with initial state learning and shows that it can effectively control the motion trajectory tracking of the LLRRS.

The 20th iteration learning results, as shown in Fig. 6, demonstrate the LLRRS hip (knee) joint trajectory tracking errors. The red solid line represents the hip joint and the blue solid line represents the knee joint. It can be observed that the tracking error of the hip joint is maintained within 0.15°, while the error of the knee joint is controlled within 0.05°, both of which are relatively small. The effectiveness of the closed-loop PD-type iterative learning control algorithm with initial state learning in realising LLRRS motion trajectory tracking is thus verified from the error perspective.

Fig. 6
figure 6

Angular error for 20th iteration learning.

Remark 4

In Fig. 6, the abscissa represents time, with units in seconds. The ordinate indicates the angular error of the hip (knee) joint of the LLRRS under the 20th iteration of the closed-loop PD type iterative learning control, with units in degrees.

According to the 20th iteration learning results shown in Fig. 7, the joint angular velocities and angular velocity errors are demonstrated as described below: in (a), the red dashed line represents the target angular velocity of the hip joint, and the blue solid line represents the actual angular velocity; and in (b), the red dashed line represents the target angular velocity of the knee joint, and the blue solid line represents the actual angular velocity, in which the red lines in the two figures originate from Eq. (8) and Eq. (9) of the target derivatives of the angular curves. It is observed that the blue solid lines in (a) and (b) basically coincide with the red dashed lines, which indicates that the angular velocity of the hip (knee) joint of the LLRRS can effectively track the target angular velocity. Figure (c) demonstrates the tracking error of the hip joint angular velocity, with the maximum error within 2.96°/s; while Figure (d) presents the tracking error of the knee joint angular velocity, with the maximum error within 0.7°/s. The small angular velocity tracking error indicates that the smooth and stable movement process of the LLRRS helps to ensure the life safety of the patients and reduces the risk of secondary injuries to the patients during the rehabilitation process.

Fig. 7
figure 7

Angular velocity and error of hip (knee) joint of lower limb rehabilitation robot.

Remark 5

In Fig. 7, the abscissa represents time, with units in seconds. Under the 20th iteration of the closed-loop PD type iterative learning control for the LLRRS, the ordinate of (a) and (b) indicates the angular velocity of the hip (knee) joint, while the ordinate of (c) and (d) indicates the angular velocity error of the hip (knee) joint, both with units in degrees per second.

Simulation analysis of exponential variable gain type iterative learning control based on initial state learning

The parameters K and L of the system control law of Eq. (34) take the same values as in Eq. (45), and the exponential learning factor takes the value of 0.8.

The results shown in Fig. 8, the maximum angular tracking error of the LLRRS under the control of the exponential variable gain type iterative learning algorithm based on initial state learning is demonstrated as follows: the red line with a star represents the hip joint, and the blue line with a circle represents the knee joint. Observed on the global perspective, the two curves gradually converge to 0, which indicates that the algorithm is able to gradually reduce the angular error of the LLRRS hip (knee) joint. From a local perspective, after 20 iterations of learning, the maximum tracking errors of the hip (knee) joint angles are all controlled within 0.1°, indicating that the angle tracking errors are relatively small.

Compared with Fig. 5, the closed-loop PD iterative learning algorithm based on initial state learning needs 18 iterations to converge, while the exponential variable gain iterative learning algorithm based on initial state learning needs only 9 iterations to converge. It can be seen that the exponential variable gain iterative learning algorithm converges significantly faster than the closed-loop PD iterative learning algorithm.

Fig. 8
figure 8

Maximum angle tracking error of hip (knee) joint of lower limb rehabilitation robot with exponential variable gain type iterative learning process based on initial state learning.

Remark 6

In Fig. 8, the abscissa represents the number of iterations for the exponential variable gain iterative learning control of the LLRRS, with units in times. The ordinate indicates the maximum angular error of the hip (knee) joint of the LLRRS, with units in degrees.

Figure 9 illustrates the tracking errors of the hip (knee) joints for the exponential variable gain type iterative learning control algorithm based on initial state learning in the 20th iteration of learning. The red solid line represents the hip joint and the blue solid line represents the knee joint. It is observed that the maximum errors of the hip (knee) joints are all less than 0.02°, indicating that the tracking errors are small. Compared with Fig. 6, the hip (knee) joint angle tracking errors in Fig. 9 are all significantly reduced, which indicates that the exponential variable gain iterative learning control algorithm based on initial state learning has a better control effect compared with the closed-loop PD iterative learning control algorithm.

Fig. 9
figure 9

Hip (knee) joint angle tracking error at the 20th iteration of the exponential variable gain iterative learning algorithm based on initial state learning.

Remark 7

In Fig. 9, the abscissa represents time, with units in seconds. The ordinate indicates the angular error of the hip (knee) joint of the LLRRS under the 20th iteration of the exponential variable gain iterative learning control, with units in degrees.

Fig. 10
figure 10

Hip (knee) joint angular velocity and angular velocity error in the 20th iteration of exponential variable gain type iterative learning control based on initial state learning.

Remark 8

In Fig. 10, the abscissa represents time, with units in seconds. Under the 20th iteration of the exponential variable gain iterative learning control for the LLRRS, the ordinate of (a) and (b) indicates the angular velocity of the hip (knee) joint, while the ordinate of (c) and (d) indicates the angular velocity error of the hip (knee) joint, both with units in degrees per second.

Based on the results shown in Fig. 10, the angular velocity and angular velocity errors of the exponential variable gain type iterative learning control for the LLRRS hip (knee) joints in the 20th iteration of learning are demonstrated as follows: in (a), the red dashed line represents the desired angular velocity of the hip joint, and the blue solid line represents the actual angular velocity; whereas, in (b), the red dashed line represents the desired angular velocity of the knee joint, and the blue solid line represents the actual angular velocity. It is observed that the red dashed line basically coincides with the blue solid line, which indicates that the hip (knee) joint can effectively track the desired angular velocity under the exponential variable gain type iterative learning control. In (c), the hip joint angular velocity error is demonstrated, with a maximum error of 2.09°/s, while in (d), the knee joint angular velocity error is demonstrated, with a maximum error of 0.45°/s. Compared with the results in Fig. 8 (the maximum error of 2.96°/s for the hip joint and the maximum error of 0.7°/s for the knee joint), the angular velocity control of the hip (knee) joint is smoother and more stable. The exponential variable gain type iterative learning control is proved to be better than the closed-loop PD type iterative learning control in terms of joint angular velocity and angular velocity error.

Experimental prototype testing of a lower limb rehabilitation robotic system

The study was approved by the Hezhou University and was carried out in accordance with the approved guidelines. Written informed consent was provided by all participants.

The LLRRS experimental prototype test platform is shown in Fig. 11, which operates in a flat ground environment. The parameters of the Joint are specified in Table 1. Hip drive motors with a rated speed of 27 RPM, a rated torque of 133 N∙m, and a peak torque of 194 N∙m; and knee drive motors with a rated speed of 35 RPM, a rated torque of 107 N∙m, and a peak torque of 169 N∙m. These motors provide the necessary power and agility for the movement of the LLRRS. The motors use 17-bit encoders for position feedback and communicate via a CAN bus to ensure efficient control and data transfer. The experimental prototype platform is supplied with 48 V to ensure stable operation and sufficient power output of the system. The motor drive control core adopts the STM32F407 chip, which has powerful processing capability and rich peripheral interfaces and is suitable for real-time control. The upper layer of the exponential variable gain iterative learning control algorithm running platform adopts PC to implement the complex control algorithm and data processing tasks.

Table 1 The parameters of the joint.
Fig. 11
figure 11

Experimental prototype test platform of lower limb rehabilitation robotic system.

The target motion trajectory previously determined is adopted as the desired motion trajectory of the LLRRS. Subsequently, an exponential variable gain type iterative learning control algorithm based on initial state learning is run to achieve the motion control of the LLRRS. During the experimental process, the motion of the LLRRS is closely observed, including the intuitive effects in terms of the smoothness, accuracy and stability of its motion. At the same time, the data of the hip (knee) joint of LLRRS were collected, including the joint angle, joint angular velocity and other data. By quantitatively analyzing these data, the motor performance and control effect of the LLRRS in performing the rehabilitation tasks were assessed, including the precision of the LLRRS movement, the coverage of the range of motion, and the smoothness of the joint movement, so as to have a comprehensive understanding of the performance and effect of the LLRRS in the rehabilitation tasks.

Fig. 12
figure 12

Walking experiment of the experimental prototype of lower limb rehabilitation robotic system.

Figure 12 shows the process of walking training by a volunteer wearing the LLRRS experimental prototype. Specifically, Figure (a) depicts the volunteer wearing the LLRRS device and in a static standing position assisted by the use of crutches, with the left leg in front and the right leg behind. Subsequently, in (b) to (d), the complete process of the LLRRS driving the volunteer’s right leg to perform a forward-striding movement by activating the drive motors in its hip (and knee) joints until it successfully lands is demonstrated. Figure (e) reflects the steps in which the crutches are synchronized to move forward to maintain balance. Immediately thereafter, in (f) to (h), the system again activates the hip (knee) drive motors to guide the left leg to perform a similar stepping and landing action, thus realizing a walking cycle of alternating, continuous forward movement of both legs assisted by the motors.

Fig. 13
figure 13

Hip (knee) joint angle curve of the experimental prototype of lower limb rehabilitation robotic system.

Remark 9

In Fig. 13, the abscissa represents time, with units in seconds. The ordinate indicates the angle of the hip (knee) joint, with units in degrees.

Fig. 14
figure 14

Hip (knee) joint angle tracking error curve of the experimental prototype of lower limb rehabilitation robotic system.

Remark 10

In Fig. 14, the abscissa represents time, with units in seconds. The ordinate indicates the angular error of the hip (knee) joint, with units in degrees.

Figure 13 demonstrates the joint angle curves of the hip (knee) joint of one leg during walking experiments with the LLRRS experimental prototype. (a) and (b) represent the hip and knee joints, respectively. In both figures, the red dashed line represents the desired joint angle, while the blue solid line represents the actual joint angle of the LLRRS during movement. Observed from a global perspective, the trend of the red dashed line and the blue solid line are basically the same, indicating the effectiveness of the exponential variable gain type iterative learning control algorithm based on initial state learning. However, observed from a local perspective, there are some deviations between the red dashed line and the blue solid line. The specific deviations can be observed in Fig. 14, where the red solid line represents the hip joint angle deviation and the blue solid line represents the knee joint angle deviation, and the maximum angle tracking error of the hip joint is 7.14° and the maximum angle tracking error of the knee joint is within 5.74°. Compared with the simulation results Fig. 9, there is a certain gap in the tracking effect of the LLRRS hip (knee) joint. This may be due to the following reasons: firstly, in modelling, only the motion of the lower limb in the sagittal plane is considered, while in reality, the LLRRS moves in three-dimensional space; secondly, the consideration of the systematic interference term in Eq. (1) is not precise enough, resulting in certain error in the modelling of the LLRRS. However, the intuitive effect of the walking experiments with the experimental prototype of the LLRRS shows that the walking training can be be carried out normally, indicating that the exponential variable gain type iterative learning control algorithm based on initial state learning is effective and can achieve consensus tracking control of the hip (knee) joint with LLRRS.

Figure 15 illustrates the joint angular velocity profile and angular velocity error profile of the LLRRS experimental prototype at the single leg hip (knee) joint during the walking experiment. Where, figure (a) represents the hip joint and figure (b) represents the knee joint. In both figures, the red dashed line represents the desired angular velocity, while the blue solid line represents the hip (knee) joint angular velocity of the LLRRS during operation. From the global observation, the red dashed line and the blue solid line have basically the same trend, indicating that the hip (knee) joint angular velocity of the LLRRS can track the desired curve. However, local observation reveals that there is some deviation between the blue solid line and the red dashed line. The specific deviations can be observed in (c) and (d), in which the maximum deviation of hip joint angular velocity is 36.24°/s and the maximum deviation of knee joint angular velocity is 33.02°/s. There is a lack of smoothness in the motion process of the LLRRS as observed from the aspect of angular velocity. The reason for this may be that the current mode control parameters of the motor are not set appropriately, resulting in insufficient accuracy and timely response. Therefore, the smoothness of the LLRRS needs to be further optimised in the future to improve its motion rehabilitation effect.

Fig. 15
figure 15

Hip (knee) joint angular velocity tracking curve and error curve of the experimental prototype of lower limb rehabilitation robotic system.

Remark 11

In Fig. 15, the abscissa represents time, with units in seconds. The ordinate of (a) and (b) indicates the angular velocity of the hip (knee) joint, while the ordinate of (c) and (d) indicates the angular velocity error of the hip (knee) joint, both with units in degrees per second.

Subsequently, the experimental results are compared with those of previous studies to further explore their significance and implications. Specifically, when compared to Model-free adaptive variable impedance control35, in the presence of initial state deviations, the LLRRS under the action of the controller designed in this paper exhibits lower trajectory tracking errors and demonstrates enhanced robustness. Furthermore, in contrast to A model-free deep reinforcement learning36, the controller designed in this study boasts higher learning efficiency, enabling it to achieve the desired control effect more rapidly and with smaller trajectory tracking errors.

Conclusions

This paper focuses on the motion trajectory tracking control problem of a lower limb rehabilitation robotic system (LLRRS) in case of initial state deviation. Firstly, the motion trajectory data of the normal human lower limbs were fitted with functions to serve as the desired motion trajectory for the LLRRS. Subsequently, the LLRRS was modelled, and a PD-type iterative learning control algorithm incorporating initial state learning was proposed to control the motion trajectory tracking of the LLRRS. Meanwhile, a detailed mathematical analysis of the convergence conditions of the algorithm was conducted, and the control effectiveness of the algorithm was verified by simulation experiments. Furthermore, addressing the issue of the slow convergence speed of the PD-type iterative learning control algorithm, an exponential variable gain type iterative learning control algorithm with initial state learning was proposed, and its improved convergence speed was mathematically proven. In addition, the experimental prototype validated the effectiveness of the algorithm, demonstrating its ability to achieve the motion trajectory tracking control of the LLRRS under the condition of initial state deviation. Although there were certain deviations in the experimental results, they did not adversely affect the walking training.

These findings are of profound significance for the design and application of LLRRS, and this paper contributes valuable references and insights for further research in this field. Nonetheless, the paper also acknowledges certain limitations, including the need for further reduction in experimental errors and enhancement of the operational smoothness of LLRRS. In the future, the algorithm can be further improved to enhance the control accuracy and operational smoothness of LLRRS.