1 Introduction

In recent years, with the advancement of sensor technology and deep learning, significant achievements have been made in the field of exoskeleton robots, which have attracted the interest of many researchers. Exoskeleton robots have recently carried out related research or applications in industrial [1], military [2], power augmentation applications [3], etc., especially in the medical field [4, 5]. Currently, there are millions of people worldwide experiencing neuro-motor disabilities, such as cerebral palsy and stroke, and recent research suggests that robots can assist in the recovery from neurological disorders [6]. These patients require systematic treatment with stationary rehabilitation equipment in the early stages to enhance muscle stimulation. In the later stages of treatment, these patients can get out of bed with the help of exoskeleton to perform some simple autonomous activities when the muscles of the lower limbs have recovered to a certain level, which will improve the quality of life of the patients and promote the rehabilitation of the lower limbs.

The advantage of using powered exoskeletons comes from their ability to assist during locomotion [7]. Powered lower extremity exoskeletons (such as Indego [8], ReWalk [9], etc.) have been designed and fabricated to provide power to the wearer. Although these developed exoskeletons are now being used in life to help the wearer reduce the burden or provide assistance [10], the human–robot interaction and coordinated movement between the exoskeleton robot and the wearer is still a difficult problem to be solved. To address this challenge, many exoskeleton manufacturers (such as Honda SML [11], Cyberdyne [12], and Keepgo [13], etc., use pre-specified reference gait trajectories to achieve the effect of assisting the wearer. Although this predefined method has the characteristics of strong stability, simple control and high operation efficiency, each person's gait pattern is unique due to differences in body shape and walking habits [14], such as walking speed, step length, etc. Thus, working with a fixed gait trajectory can easily cause severe discomfort to the different wearer. Previous studies have shown that the important influencing factors of gait characteristics are waist circumference, weight, height, age, and hip width [15]. If all the influencing factors are taken into account, it will increase the complexity of the system. And the wearer’s movement has a certain randomness in the process of walking, so it is necessary to consider a relatively novel control strategy.

Studies have shown that a purely pre-defined approach based on Clinical Gait Analysis (CGA) database is not effective because it does not encourage users to actively participate in gait [19]. Therefore, an effective control strategy should be able to allow the wearer to deeply participate in the generation process of the gait trajectory in real time, promote neural plasticity, and possibly lead to the restoration of neural control [18]. Several recent studies have proposed new exoskeleton control strategies, ranging from force control [16] and trajectory control [17] to deep learning prediction models [18].

One possible solution to these problems is Deep Learning (DL). Several researchers have begun to use different DL techniques to generate gait trajectories by fusing mechanosensing information on exoskeletons. Once the model is trained, the neural network can perform real-time processing on embedded systems through a series of matrix operations. This approach allows the device to more accurately adapt to the user's dynamic movements. For example, Sharififi et al. [20] proposed a new adaptive central pattern generator (ACPGs) for estimating the required online Central Pattern Generator (CPG)-based trajectory shaping and low-level nonlinear trajectory tracking control. And the effectiveness of the proposed online tuning and autonomous control strategies is demonstrated by relevant experiments. Wang et al. [21] proposed an integrated subject adaptive real-time motion pattern recognition method based on lower-limb exoskeleton system. The method can identify 12 motion patterns, and achieve a good recognition effect [22]. They also proposed a state machine-based method for online generation of parametric gait, which controls gait through three parameters: speed, step length and step height, and can provide paraplegics with the ability to recover gait function. Park et al. [23] proposed a hybrid control method. The method adaptively identifies the exoskeleton system as a hybrid nominal model and an online exchange model-based tracking controller that jointly participate in the generation phase of the user's gait trajectory. The effectiveness of the proposed method was verified by one user participating in the experiments. Kang et al. [24] shared a deep convolutional neural network-based locomotion pattern classifier for hip exoskeleton applications. Experimental results show that the model shows a classification error of 3.13%, outperforming other machine learning-based benchmarks commonly found in the field [25]. They designed a knee joint flexible axis to achieve flexible force transfer considering the mechanical structure of the Lower Limb Rehabilitation Exoskeleton Robot (LLRER). Second, a sliding mode impedance closed-loop controller was developed based on the kinematic and kinetic models of LLRER to achieve active supple control of the exoskeleton knee joint. And the stability of the designed control system was verified by Lyapunov method.

Although these deep learning-related studies provide important references for developing locomotion trajectory generation strategies for lower-limb exoskeleton robots, these models also face some limitations that hinder the development of this field. First, wearers’ movement has a certain randomness and will produce a lot of noise signal, which poses a certain threat to the accuracy of the movement trajectory generated by the deep learning model. Second, frequent human–robot interaction is not beneficial for exoskeleton system stability if the exoskeleton's locomotion trajectory is in a similar state for a long time (such as continuous level walking tasks or constant speed movement on a treadmill). When the human–machine is in a relatively stable state, using the reference gait trajectory to actively apply to the joint will increase the wearer's comfort. But when the wearer tries to change the current locomotion state (such as changing the current walking speed, step length, etc.), it requires tedious manual tuning on a user-specific basis, which may not be feasible for real-world applications. Therefore, an effective control strategy should stably generate gait trajectories while allowing the exoskeleton system to continuously adapt to the wearer's desired locomotion intentions according to the HRI force, facilitates the stability of the human–machine system while maintaining consistent human–machine movement coordination, which makes the wearer feel more natural.

2 Proposed Method

TAGT is a hierarchical control strategy based on multi-modal information fusion, and the control architecture of the powered knee exoskeleton can be broken into three layers according to different functions: High, mid, and low-level controls. The top layer is the gait phase detection layer, which is to detect the heel strike event in real time; The middle layer is the gait pattern planning layer, which is responsible for generating the locomotion trajectory of the knee joint; And the bottom layer is the motor driver layer, which receives commands through the CAN-Bus and drives the motor to the specified position through the closed-loop PID controller. We focus on the mid layer control, mainly the gait pattern planning strategy—TAGT control model. The inputs to the TAGT model are the interactive force signals and the motion trajectory of the hip joint, and the output signals are the knee motion trajectory of the exoskeleton robot. In order to reduce the threat of the input noise signal to the model prediction, this paper adopts the second-order Butterworth filter to filter the signal collected by the sensor.

2.1 Gait Phase Detection

The TAGT control strategy proposed in this paper is based on the reference trajectory CGA, and HRI force is applied to continuously optimize the generated gait trajectory. Among them, gait phase detection is the key to optimizing gait trajectory and human–computer interaction. A common approach is to use mechanical sensors, and we utilized a Force-Sensitive Resistive (FSR) sensor placed on the heel to estimate gait phase. The average stride time can be calculated from the time interval between the two adjacent heel strike events, as shown in the light blue area in Fig. 1.

Fig. 1
figure 1

Filtered gait sequence and gait cycles division. FootP1 represents the heel pressure. KneeD and HipD represent the knee and hip angles, respectively

Each wearer has certain differences in walking habits and walking pace, and even the same wearer may have differences in pace in different time periods. As shown in Fig. 1, in terms of walking pace, there is a difference in the walking cycle Ti, for example: Ti-3 ≠ Ti-2 ≠ Ti-1 ≠ Ti ≠ Ti+1, etc. In order to record the locomotion cycle at different times, this paper uses a dynamic threshold method to assess the occurrence of heel strike events. The heel pressure analog P is selected for comparison with the generated dynamic threshold, and the dynamic threshold ζ over the time interval t can be calculated as:

$$\varsigma {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} \min ({\kern 1pt} P(t) + \kappa \cdot ((\max ({\kern 1pt} P(t)){\kern 1pt} {\kern 1pt} {\kern 1pt} - {\kern 1pt} {\kern 1pt} \min ({\kern 1pt} P(t)){\kern 1pt} {\kern 1pt} {\kern 1pt} ){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} + {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \xi {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(1)

where k is the scale factor and ξ is the deviation term. k = 0.6, ξ = 10 are empirically set thresholds after extensive experiments. For each sampling point, the corresponding label is defined as follows.

$$\lambda {\kern 1pt} {\kern 1pt} {\kern 1pt} { = }{\kern 1pt} {\kern 1pt} {\kern 1pt} \left\{ \begin{gathered} 1{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\text{if}}{\kern 1pt} {\kern 1pt} (P{(}t{) - }P{(}t - 1{)}{\kern 1pt} ){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} > {\kern 1pt} {\kern 1pt} {\kern 1pt} \varsigma {\kern 1pt} {\kern 1pt} \hfill \\ 0{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\text{if}}{\kern 1pt} {\kern 1pt} (P{(}t - 1{) - }P{(}t{)}{\kern 1pt} ){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} < {\kern 1pt} {\kern 1pt} {\kern 1pt} \varsigma \hfill \\ \end{gathered} \right.{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(2)

According to this definition, λ = 0 corresponds to the beginning of the heel strike event and λ = 1 to the end of the heel strike event. The gait cycle is updated by the heel strike event, and different gait trajectories are generated according to different gait cycles.

2.2 Gait Pattern Planning

The TAGT model is a hybrid approach that combines the advantages of deep learning and predefined control methods. It utilizes a deep neural network to learn the personalized mapping between the hip joint and knee joint trajectories, and then applies a predefined control method to generate a comfortable locomotion trajectory based on the learned mapping. The TAGT model is designed to address the challenges of real-time performance and reliability of deep learning using a lightweight neural network architecture and incorporating a safety constraint module to ensure stable and safe locomotion. The TAGT model first collects motion data from the wearer and uses it to train a neural network to learn the personalized mapping between the hip joint and knee joint trajectories. The neural network architecture is designed to be lightweight to reduce the computation time and improve the real-time performance. The trained neural network is then integrated with the predefined control method to generate a comfortable locomotion trajectory. To ensure stable and safe locomotion, the TAGT model incorporates a safety constraint module that checks the generated trajectory against predefined safety constraints. If the trajectory violates any safety constraint, the safety constraint module will adjust the trajectory to ensure stable and safe locomotion. Overall, the TAGT model is a robust approach that combines the strengths of deep learning and predefined control methods to achieve personalized and comfortable locomotion while ensuring real-time performance and reliability, and its flowchart is shown in Fig. 2.

Fig. 2
figure 2

Flowchart of the TAGT

The algorithms of the TAGT can be interpreted as follows:

  • The main goal of TAGT is to adjust gait through algorithm iteration, so as to generate gait patterns that can match the walking habits of the wearer. First, the TCGP model was applied to generate the wearer's movement trajectory, providing assistance to the wearer. Meanwhile, the heel strike event is detected through foot pressure measurement to extract the gait cycle signal.

  • Then, the APGP algorithm is used to generate gait feature vectors τ(j) (step speed and step height) and through continuous iteration, update the predefined gait database so that the updated gait database can match the wearer's movement trajectory.

  • TAGT operates in the learning domain, where two datasets are accumulated, a subset of step length and a subset of step height. And these two datasets are stored in Φ, whose size is predefined as N.

  • Each gait feature vector τ(j) (step length, step height) while walking is saved by the algorithm. If the cycle period j has not been superimposed to the number N, continue to wait for the occurrence of the heel strike event and generate the next gait feature vector τ(j + 1).

  • After this, after the completion of the N-step strategy, if the τ(j) in Φ has no outliers and the HRI force is within a reasonable range, the step length and step height stored in the database Φ need to be averaged to stack an average step length and step height (τ), and update the learned τ to the standard CGA database and generate human adaptive gait patterns.

  • If a human–machine confrontation occurs during the movement, it will trigger a large HRI force. And a large problem in the data acquisition process can cause the gait vector Φ to deviate significantly from the normal range. When Φ and HRI force do not meet the set conditions, it will pose a potential safety hazard to the wearer. In order to enhance the safety during the wearing process, a safety constraint module has been added to the TAGT model. When Φ and HRI force do not satisfy the set conditions, the TCGP model or sensitivity scaling method is used to generate personalized gait trajectories. If the HRI force exceeds the set threshold TH, the human adaptive gait pattern is generated by the sensitivity amplification method, and the control model will then become a follow-up system. Conversely, the human adaptive gait pattern will be generated by TCGP, and the control model at this time will become an active system.

The gait feature vector \({{\varvec{\uptau}}}{\kern 1pt} {\varvec{(j)}}{\kern 1pt} {\kern 1pt} {\kern 1pt} { = }{\kern 1pt} {\kern 1pt} {\kern 1pt} {\{}k_{h} {(}{\kern 1pt} j{\kern 1pt} {),}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} k_{l} {(}{\kern 1pt} j{\kern 1pt} {\kern 1pt} {)\}}\) is composed of the step height factor kh and the step length factor kl. A total of m sampling points are generated during the two adjacent heel strike events, including the knee joint angle Dk and the heel pressure P. Then the step height factor kh (j) = max(Dk)/max(Dcga) and the step size factor kl (j) = m/50 can be obtained, and stored in the database Φ. After looping N times, kh = average(Φ[kh]) and kl = average(Φ[kl]) can be calculated.


where

$$D_{{\text{k}}} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \left[ \begin{gathered} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta {\kern 1pt} {\kern 1pt} {\kern 1pt} (0){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} (1) \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vdots \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta {\kern 1pt} {\kern 1pt} (m - 1){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ \end{gathered} \right]{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \in {\kern 1pt} {\kern 1pt} {\kern 1pt} R^{m} {\kern 1pt} ,{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} D_{{{\text{cga}}}} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \left[ \begin{gathered} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta_{c} {\kern 1pt} {\kern 1pt} {\kern 1pt} (0){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta_{c} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} (1) \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vdots \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vartheta_{c} {\kern 1pt} {\kern 1pt} (50){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ \end{gathered} \right]{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \in {\kern 1pt} {\kern 1pt} {\kern 1pt} R^{50} ,$$

\({\kern 1pt} {{\varvec{\Phi}}}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \left[ \begin{gathered} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \tau {\kern 1pt} {\kern 1pt} {\kern 1pt} (0){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \tau {\kern 1pt} {\kern 1pt} {\kern 1pt} (1) \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \vdots \hfill \\ {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \tau {\kern 1pt} {\kern 1pt} (N - 1){\kern 1pt} {\kern 1pt} {\kern 1pt} \hfill \\ \end{gathered} \right]{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \in {\kern 1pt} {\kern 1pt} {\kern 1pt} R^{N} {\kern 1pt} {\kern 1pt}\), Φ[kh] and Φ[kl] represent the kh factor and the kl factor stored in the database Φ, respectively. After m loops, the quadratic Lagrangian interpolation method is applied to transform the predefined CGA dataset to the dataset Dlg containing m dimensions:

$$x = index/k_{l}$$
$$l_{j} (x){\kern 1pt} {\kern 1pt} : = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \prod\limits_{{i = 0,{\kern 1pt} {\kern 1pt} i \ne j}}^{k} {\frac{{x - x_{i} }}{{x_{j} - x_{i} }}} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \frac{{x - x_{0} }}{{x_{j} - x_{0} }} \cdot \cdot \cdot \frac{{(x - x_{j - 1} )(x - x_{j + 1} )}}{{(x_{j} - x_{j - 1} )(x_{j} - x_{j + 1} )}} \cdot \cdot \cdot \frac{{x - x_{k} }}{{x_{j} - x_{k} }}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(3)
$$L(x){\kern 1pt} {\kern 1pt} : = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \sum\limits_{j = 0}^{k} {y_{i} } l_{j} (x){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(4)

in which, index is the index value of each loop, index = 0,1,2,3,..,(m-1), k = 2. The scaling method is used to transform Dlg again to the personalized CGA dataset Dls:

$$\min \_Arr{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \min (D_{\lg } ){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(5)
$$R\_Zero{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} D_{\lg } {\kern 1pt} {\kern 1pt} {\kern 1pt} - {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \min \_Arr{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(6)
$$D_{{{\text{l}} s}} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} R\_Zero{\kern 1pt} {\kern 1pt} {\kern 1pt} *{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} k_{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} + {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \min \_Arr{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(7)

Figure 3 shows the results of processing the predefined CGA datasets using Lagrangian quadratic interpolation and linear scaling, respectively. And the processed knee joint trajectory is relatively compliant.

Fig. 3
figure 3

Personalized CGA method processing results. a Results obtained by Lagrangian quadratic interpolation, k in the legend is kl in the model, b results obtained by linear scaling, k in the legend is kh in the model

When the HRI force is large and greater than a certain threshold, it means that the locomotion trajectory output by the control model is not the wearer's locomotion intention, and the current judgment needs to be corrected in time. In order to respond faster to the wearer's locomotion intention, this paper adopts the Sensitivity Amplification (SA) method [26] to solve the human–machine conflict scene, and the control model at this moment becomes a follow-up system. SA is a positive feedback closed-loop system. According to the structure, we can get:

$$q{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} q \cdot H \cdot G{\kern 1pt} {\kern 1pt} + {\kern 1pt} {\kern 1pt} {\kern 1pt} d \cdot N{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(8)

Thus, the output of the model when the disturbance amount is d is:

$$q{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \frac{N}{{1{\kern 1pt} {\kern 1pt} { - }{\kern 1pt} {\kern 1pt} GH}}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(9)

where d is the human–robot interaction force, which is converted into a kinematic angle through the mapping of N, G is the controller, and H is the exoskeleton dynamics model. In order to simplify the model, H is designed as (1–1/α)/G, and (9) will become:

$$q{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \alpha N \cdot d{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(10)

Let ξ = αN, and the output angle q is designed to be incremented by Δq, then (10) becomes:

$$\Delta q{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \xi \cdot d{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(11)

As the interaction force differs, the final angle of the control model output becomes:

$$q{\kern 1pt} {\kern 1pt} { = }{\kern 1pt} {\kern 1pt} q{\kern 1pt} {\kern 1pt} { + }{\kern 1pt} {\kern 1pt} \Delta q{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(12)

The core of the stability of the TAGT model is the reliability of the TCGP model, which is directly related to the comfort of human–machine wear. To generate an individualized gait pattern, Wang et al. [21] proposed an adaptive real-time motion pattern recognition (LMR) method based on Convolutional Neural Network (CNN) and Genetic Algorithm (GA). And the hyper-parameters were also optimized using a Bayesian algorithm, and the method can identify 12 movement patterns for everyday applications of the exoskeleton. Wu et al. [14] proposed a personalized gait pattern generation method, using Gaussian process regression method to establish the mapping relationship between body parameters and gait features. The personalized gait pattern is then reconstructed using an auto-encoding neural network and a scaling process. Yun et al. [27] proposed a method for predicting the kinematics of human gait patterns based on a statistical and stochastic approach, which used Gaussian process regression to establish a random function mapping from body parameters to gait kinematics, generating gait kinematic correlations joint locomotion trajectories.

In this paper, the generated gait pattern is mainly used for the lower extremity knee-assisted exoskeleton robot. To generate a personalized knee gait trajectory O, we improved the LSTM network and named it TCGP, and its network structure is shown in Fig. 4. The input parameter I of TCGP network is the 200-dimensional trajectory of rotation angle of knee joint, IR200.

$$I{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \left[ {\theta^{h} } \right]{\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} \left[ {\theta_{1}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{2}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{3}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \cdot \cdot \cdot {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{200}^{h} {\kern 1pt} {\kern 1pt} } \right]{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(13)
Fig. 4
figure 4

TCGP network structure


where \({\{ }\theta_{1}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{2}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{3}^{h} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \cdot \cdot \cdot {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \theta_{200}^{h} {\}}\) is the time series of continuous rotation of the hip joint.

Our ultimate goal is to learn an end-to-end mapping function (F) between I and O. Given a training dataset, we solve the following problems:

$$\mathop \theta \limits^{ \wedge } {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} { = }{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \arg \mathop {\min {\kern 1pt} }\limits_{\theta } {\kern 1pt} \frac{1}{N}{\kern 1pt} \sum\limits_{i = 1}^{N} {\text{L}} {\kern 1pt} {\kern 1pt} (F_{\theta } (I_{i}^{h} ),{\kern 1pt} {\kern 1pt} {\kern 1pt} O_{i} ){\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(14)

where \(\theta = \{ \omega_{1} , \, \omega_{2} , \, \omega_{3} ...\omega_{{\text{n}}} , \, b_{1} , \, b_{2} , \, b_{3} ...b_{{\text{n}}} \}\), denotes the weights and bias of our n-layer TCGP network. L is the loss function used to minimize the difference between \({\kern 1pt} \left\{ {I_{{\text{i}}}^{h} } \right\}\) and \(\left\{ {O_{{\text{i}}} } \right\}\).

The TCGP network is mainly composed of multiple convolutional blocks and LSTM networks [27]. The TCGP network adopts a layered transfer strategy, the top layer is an LSTM network, and the bottom layer is a one-dimensional convolutional layer. The LSTM network is a relatively classic time series prediction network, which can use the correlation information with a large interval to connect such "long-term dependencies" to predict the output of the next moment. The LSTM network is copied from LSTM cells with the same structure, and 77 cells are connected in series in this article.

The output of the LSTM network is connected to the input of the convolutional network. The convolutional network uses a one-dimensional convolution that only convolves in the width direction, and the convolution kernel is set to 3, the input channel and output channel are set to 1, and the stride is set to 1. In order to ensure the nonlinear ability of the neural network and the effectiveness of information transmission deep in the network, three CNN Blocks and a residual network are added to the network. Residual connections are an effective way to train deep networks to reduce vanishing gradients, which enables gait features to be passed across layers.

TCGP network can obtain the main features of the gait sequence through a large number of gait data training network parameters. In the training task, the optimizer selects the Adaptive Moment Estimation (ADAM) method, the loss function selects the Root Mean-square Error (RMSE) to represent the error between the predicted vector θ and the real vector \({\kern 1pt} \hat{\vartheta }\). During training, the optimizer optimizes the network parameters by minimizing the RMSE.

$${\kern 1pt} RMSE{\kern 1pt} {\kern 1pt} {\kern 1pt} (P,{\kern 1pt} {\kern 1pt} \mathop P\limits^{ \wedge } ){\kern 1pt} {\kern 1pt} {\kern 1pt} = {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \sqrt[{{0}{\text{.2}}}]{{\frac{1}{{\text{m}}}\sum\limits_{i = 1}^{m} {(\theta_{i} - \mathop \theta \limits^{ \wedge }_{i} )^{2} } }}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt}$$
(15)

2.3 Evaluation Criteria of Model Performance

Referring to [28], Pearson Correlation Coefficient (ρ), Threshold Absolute Deviation (TAD), and Mean Absolute Deviation (MAD) are used to evaluate the performance of the model in predicting gait trajectories. The Pearson correlation coefficient can show the overall similarity between the generated gait sequence and the real gait sequence. Threshold absolute deviation and mean absolute deviation can reflect the subtle differences between the generated gait sequence and the real gait sequence, where the threshold χ in the threshold absolute deviation was set to 5°, which is consistent with the previous study [21].

3 Experiments Results

3.1 Lower Limb Knee Joint-Assisted Exoskeleton Robot

The knee-assisted exoskeleton robot (KALEX is developed by our team and utilized in this article to verify the performance of the proposed framework. In terms of degrees of freedom, KALEX is designed with 10 degrees of freedom to meet the wearer's comfort. Knee flexion and extension were driven by a brushless DC flat motor (HT-N42, Haitai Motor, China), and absolute magnetic encoder (MA700, Monolithic Power Systems, USA) was placed in the device at the output of the actuator to measure the knee joint’s angle. The ankle joint is a spring-driven joint, and the hip joint is an unassisted free joint. In addition, inertial measurement units (JY901, WIT, China) (IMUs) were installed on each of the thigh segments of the KALEX suit. The IMU on this device can calculate the Euler angles through the built-in Kalman filter to obtain a real-time measurement of the absolute inclination of the hip joint. One-dimensional force sensors (DLWH-30, Qisheng Sensor, China) were installed on the calf segment of the KALEX suit to perceive the human–computer interaction force. Finally, FSR sensor (MD30-60, K-CUT, China) was used to detect the impact on the heel during walking. All sensors and actuators are commanded using a microprocessor incorporated with a STM32F103 (STMicroelectronics, Italy). The designed KALEX exoskeleton platform is shown in Fig. 5.

Fig. 5
figure 5

KALEX exoskeleton platform

3.2 Data Set for Walking Gait

To verify the validity of the model, five healthy subjects with an average age of 23.6 years (SD: 1.95 years), an average height of 169.4 cm (SD: 7.09 cm), and an average weight of 60.08 kg (SD: 7.98 kg), were recruited to walk on the treadmill with the powered knee exoskeleton at walking speeds ranging from 0.8 km/h to 2.4 km/h in 0.4 km/h increments, with about 10 consecutive steps at each pace. In all walking conditions, mechanical sensor data from the thigh IMUs, knee angle from the encoder, and heel contact information from the FSR sensor were recorded.

3.3 Experimental Protocol

The experimental protocol of this article is shown in Fig. 9. Two experimental sessions were conducted in order to verify the performance goals of TAGT model.

Session 1: Capability of predicting gait patterns on the test set. (i.e., verifying the accuracy of TCGP's gait trajectory prediction by the ρ, MAD, and TAD.

Session 2: Superiority of the adjusted gait pattern in several performance metrics (e.g., average human–robot interaction force, energy consumption, etc.) during practical operation.

Note that TCGP is an important part of TAGT model and the tasks of training, testing, and saving the TCGP model are completed in Session 1. Verifying the comprehensive performance of TAGT models in Session 2, including TCGP, sensitivity amplification, and personalized CGA gait control models. In order to verify the effect of CGA mode on TAGT, CGA alone was used as a variable to conduct related control experiments.

3.4 Session 1: Gait Pattern Prediction Test

In Sect. 2.3, the evaluation criteria of the models have been established, including Pearson correlation coefficient, threshold absolute deviation, and mean absolute deviation. All the data of four subjects are randomly selected for model training and the parameters of the model are fixed, and all the data of the last subject are used as the test set to evaluate the prediction results of the model. All subjects have given informed consent to the experiment and have conducted the relevant experimental studies within the limits of legality.

According to Sect. 2.2, a designed TCGP network is employed to predict knee gait trajectories based on the hip locomotion trajectories. The hyper-parameters of TCGP are determined by empirical and trial-and-error methods. The desired locomotion trajectories, generated by TCGP for the knee joint, are shown in Fig. 6, which can be seen that the predicted value of TCGP is very close to the true value. In these lines, "Trajectory error", "qd of Right Knee", and "q of Right Knee" are the predicted trajectory error, the desired output knee angle, and the actual output knee angle, respectively. Obviously, the predicted trajectories of the TCGP model are very close to the real trajectories.

Fig. 6
figure 6

Desired and actual trajectories

The evaluation parameters (ρ, MAD, and TAD) were counted to evaluate the effect of the gait pattern prediction model. Table 1 compares the TCGP model with the CGA method [29]. The ρ (i.e., 0.978) between the predicted knee angle trajectory and the real trajectory is higher comparing to CGA (i.e., 0.593). For the TCGP model, the TAD (i.e., 11.07%) percentage is much smaller than the CGA (i.e., 59.94%). The MAD (i.e., 1.96°) predicted by TCGP was 80.5% lower than CGA (i.e., 10.04°).

Table 1 Mean of assessment parameters from test set

3.5 Session 2: Apply TAGT to the Exoskeleton

The ultimate goal of TAGT is to generate personalized gait patterns on lower-extremity exoskeleton robots to help the wearer walk with their own unique gait profile. In order to evaluate the performance of the developed TAGT and assess its adaptive features in high and low levels, comprehensive experiments were conducted on the KALEX exoskeleton as the testbed. An able-bodied wearer (27 years old) wore the exoskeleton, as shown in Fig. 7, and performed exercise experiments with a minimum duration of 15 min, respectively, with CGA as the variable. The proposed strategy was implemented in the real-time Pytorch environment running on a PC (Intel Core i7-6567U CPU @ 3.30 GHz and 8.00 GB RAM), and the required USART communications (between controller and PC,) and the required computations were conducted with the sampling time of 10 ms. Preliminary tests were first conducted to identify the hyper-parameters of the combined exoskeleton–human limb system to generate the ideal locomotion trajectory of the wearer accurately.

Fig. 7
figure 7

KALEX lower limb exoskeleton worn by one able-bodied participant for overground walking

It should be noted that the TCGP model is implemented based on the Python programming language. In order to elaborate more on the autonomous shaping of the personalized CGA in TAGT, Fig. 8 shows the trajectory changes of the wearer's right knee joint over time, where shaded purple and shaded green are gait trajectories generated in TCGP mode and personalized CGA mode, respectively. Figure 8 shows that the wearer's assist trajectory in the initial stage is generated by the TCGP model. After a period of time, the gait features converged to a steady-state response, and generating a personalized CGA (PCGA) gait trajectory. From Fig. 8, it can be seen that the generated PCGA gait trajectories have strong consistency with the gait trajectories generated by the TCGP model in terms of gait cycle and gait peak characteristics. A gait cycle contains about 130 sampling points, and the gait peak is about 27.5°. Note that the step length and step height characteristics of the PCGA are generated at the end of a gait cycle; in other words, the adjustment of the gait characteristics starts after each heel touch event to generate a new PCGA trajectory, as shown in Fig. 9. From Fig. 9, it can be seen that the resulting adaptive trajectory is similar to the previous cycle in terms of step length and step height, but there are still large deviations in the intermediate process.

Fig. 8
figure 8

Transition from TCGP mode to PCGA mode

Fig. 9
figure 9

Schematic diagram of the trajectory generated by PCGA and the real trajectory

Next, TAGT model judges whether to perform mode conversion through the HRI force transmitted by the knee joint. Figure 10 shows that the wearer walking in PCGA mode at the initial stage, after a period of time, the wearer and the exoskeleton robot confront each other, resulting in a large HRI and exceeding a certain threshold. According to the TAGT logic shown in Fig. 2, when the HRI threshold exceeds TH, it will switch to SA mode, as shown in "SA Model" in Fig. 10. At this moment, the exoskeleton system becomes a follower system. In the "CGA Model" stage, the peak value of the gait trajectory and the number of sampling points in one gait cycle are 43° and 245, respectively. In the "SA" phase, the peak and gait cycle sampling points of the gait trajectory were in the interval of 64.5°–68° and 232–255, respectively, and the maximum rate of change between them did not exceed 6% and 10%, respectively. After continuing a similar gait pattern, it was touched again to activate the PCGA pattern. After TAGT captures the new gait features, it generates a new "New CGA Model" after adjusting the predefined CGA. The peak value of the expected gait trajectory of the knee joint and the number of sampling points in the gait cycle were revised from 43° and 245 to 65.7° and 242, respectively, completing the generation of PCGA data.

Fig. 10
figure 10

Transition from PCGA mode to SA mode

In order to compare the influence of PCGA variables on the TAGT model, a control experiment was done in this article. Group I: complete TAGT model, group II: TAGT model without PCGA link. In this article, using this safe, easy-to-administer, and well-represented daily living activities test, the average HRI of 5-min walking at each pace was measured. Furthermore, to analyze the consumption of the necessary metabolism, oxygen consumption was simultaneously measured. During the experiment, the wearer was equipped with a metabolic system.

For the convenience of writing, this article calls the gait patterns generated by TAGT and TAGT without PCGA as Gait II and Gait I, respectively. The average HRI at each walking speed was plotted as a bar graph for Gait II and Gait I as shown in Fig. 11. The maximum and minimum values of HRI produced by Gait I were 20.76N and 19.42N, respectively, and the maximum and minimum values of HRI produced by Gait II were 19.91N and 18.54N, respectively, at the three walking speeds. In addition, Gait II showed an average reduction of 5.01% in HRI relative to Gait I at three walking speeds.

Fig. 11
figure 11

Comparison of HRI at three walking speeds

To further compare the effects of different exoskeleton control models on metabolism, the cumulative values of oxygen consumption at each walking speed were plotted as a bar graph as shown in Fig. 12. Gait II was reduced by an average of 7.1% relative to Gait I at the three paces, which indicates no statistical difference. Therefore, PCGA has a certain contribution to the TAGT model in terms of reducing metabolic consumption. During the experiment, Fig. 12 shows that the walking speed increased from 0.8 km/h to 2.4 km/h, the oxygen consumption increased by 56.49% in the Gait I mode, and the oxygen consumption increased by 73.135% in the Gait II mode, which indicates that Gait I is more sensitive to the walking speed.

Fig. 12
figure 12

Comparison of cumulative oxygen consumption at three walking speeds

4 Conclusion

How to plan a personalized gait pattern suitable for each wearer is one of the key technologies for developing exoskeleton robots. In this article, we propose a time-varying adaptive gait trajectory generator with hierarchical control for a powered exoskeleton, with the aim of helping the wearer quickly plan a personalized gait pattern with high matching and minimizing human–robot confrontation during movement. To ensure the safety and comfort of the wearer during continuous walking, the actual gait phase of the wearer needs to be synchronized with the expected gait phase of the powered exoskeleton. For this purpose, we proposed to recursively update the gait parameters of TAGT, that is, the step length and step height, to ensure that the personalized CGA generated in the state of continuous walking can highly match the walking habits of the wearer. Our results demonstrate that the TAGT model based on hierarchical control can robustly adapt to different walking speeds, validating the effectiveness of the proposed TAGT control strategy.

This study introduced a multi-modal fusion-based control framework to assist the wearer's locomotion. TCGP algorithm designed in this article was used to predict the motion intention of the wearer and generate a real-time gait trajectory online. The hybrid control scheme that the sensitivity amplification method and the personalized CGA method were integrated into the switching model realizes synchronization with the current state of the wearer, and ultimately ensures its control performance. The proposed method can be applied to most powered exoskeletons currently developed, providing better assistive methods for various types of wearers. With the development of this method, it is necessary to develop a gait adaptation method that adapts to various terrain conditions, and also considers the human–robot balance problem into the control strategy. The control methods under different terrains are similar, but first, it is our future work to solve that accurately discriminates the current terrain conditions and integrates it into our designed the control strategy.