1 Introduction

At present, a large number of people in China suffer from different degrees of lower extremity motor dysfunction due to car accidents, landslides, and aging. It not only tortures patients physically and mentally, but also brings heavy economic pressure to families and burdens to society [15, 20]. Patients with lower extremity motor function impairment may gradually develop some other symptoms if they stay in bed for a long time. On the physical side, muscle atrophy, local sores, and osteoporosis may occur. The occurrence of these complications can seriously affect the patient’s health [14]. However, in China with a large population, impaired lower extremity motor function emerges in an endless stream, and relevant medical technicians are in short supply. Patients need the care of professional and technical personnel during rehabilitation training. For medical staff, it takes a lot of time and physical strength, which is not conducive to improving efficiency and saving medical resources [16, 17, 28].

The traditional lower limb rehabilitation training is conducted manually in the hospital, and there may be a certain deviation in the doctor’s grasp of the patient’s impaired motor function. When the doctor visually finds that the patient’s posture is abnormal, the patient’s condition is already very serious. Although the modern rehabilitation training technology has been developed to a certain extent, the automation technology of rehabilitation training is relatively late in China. Therefore, the hardware cost of the system for lower limb rehabilitation training is relatively high, the system is relatively complex, and there are certain deviations in its accuracy. Therefore, how to accurately carry out rehabilitation training is an urgent problem to be solved.

Posture tracking of lower limbs is one of the key technologies for lower limb rehabilitation training. Lower limb posture can be obtained by optical motion capture system and inertial posture capture system performing various tasks (flexion and extension, internal rotation and external rotation, abduction and adduction) under different conditions (speed, environment) [5]. In [12], computer vision hardware and software systems are used to perform rehabilitation training for post-stroke patients. Reference [27] employs the computer vision technology to compare four conservative treatments and rehabilitation training of the rectus femoris in basketball training. Meanwhile, reference [19] developed a Kinect-based lower limb sensory muscle rehabilitation training system. Kinect bone tracking technology is used to obtain the three-dimensional (3D) coordinates of the posture and movement of the lower limbs of the human body respectively. In the reproduction, the accuracy and representativeness of the 3D coordinates of the joint points to describe the human body pose are not high. References [12, 27], and [19] all use an optical motion system to capture the lower limb posture information to assist in the rehabilitation training of the lower limb. However, its cost is high, and it is easily restricted by conditions such as illumination and occlusion. Therefore, its optical motion capture technology still faces great challenges in the application of lower limb health training.

The development of wearable inertial sensor technology has provided new ideas for the field of rehabilitation medicine, and researchers have developed a system that can remotely capture gestures in real time. The wearable inertial sensor is used to remotely monitor the patient’s motion data to improve the digitization and personalization of rehabilitation training. Through the analysis of the patient’s motion data, the medical staff can adjust the rehabilitation training intensity according to the patient’s recovery [19]. Reference [5] introduces a medical rehabilitation detection system. By wearing a micro motion capture module, it can measure the 3D motion capture of the lower limbs in real time, and analyze the motion process of the patient to be recovered. Reference [23] uses wireless wearable motion capture sensors to collect human movement data, processes the collected data format accordingly, and designs a human pose recognition algorithm, which can meet the needs of doctors for real-time monitoring of patients’ physiological parameters in the process of medical and health monitoring. In [5] and [23], inertial sensor-based posture capture technology is used to collect the lower limb posture information of the patient with motor function injury. Through the analysis of posture information, the doctor can grasp the recovery situation of the patient, so as to formulate the next rehabilitation plan. Inertial sensor attitude capture technology has been studied more widely in the field of attitude capture due to its low cost, simple system structure, convenient and flexible use. However, inertial sensors integrate gyroscopes, accelerometers, and magnetometers, and the accuracy will be disturbed by drift errors, motion acceleration, and surrounding magnetic fields, resulting in inaccurate output results. To sum up, the use of human pose capture technology for lower limb rehabilitation training still faces great challenges.

Due to the low cost and convenient, the wearable inertial sensors have been widely used in the field of rehabilitation medicine. Based on the inertial based-hardware equipment, the data fusion methods play an important role to improve the accuracy pf the human pose. For the data fusion algorithms of human pose tracking, the Kalman filter (KF) and the complementary filter (CF) are currently widely used.

KF is an optimization estimation method proposed by Rudolf Kalman, which uses the minimum mean square error as the criterion to construct a state prediction model, and uses the estimated value of the previous moment and the observed value of the current moment to estimate the optimal value of the current moment [29]. The KF can fuse the data measured by many different sensors and then estimate the system state optimally [2]. It mainly consists of two processes, namely the prediction process and the correction process. The correction process uses the measured values of sensors to obtain the new state update estimation and error estimation, and the prediction process uses the measurement uncertainty to update the system and the corresponding error estimation [8]. For instance, KF is employed in references [30] and [13] to estimate the receiving position of visible light samples and track and compensate doppler of underwater acoustic spread spectrum signal respectively. In reference [4], the improved KF-based algorithm can be used to solve the results of the improved rotorcraft unmanned aerial vehicle (UAV) integrated navigation. Reference [25] proposed a new adaptive Kalman filter(AKF) with unknown state noise statistics, which can improve the accuracy of INS/GNSS integrated navigation system. KF also plays an important role in guidance and control. In reference [7], an active suspension system control strategy was proposed for high mobility rescue vehicles, that is, a model predictive control strategy based on ensemble KF technology, which can make the vehicle run smoothly and operate stably. Reference [1] proposes an adaptive Kalman filter algorithm that can solve the problem of inaccurate or mismatched process noise, which can effectively reduce steady jitter and improve filtering adaptability and calculation accuracy.

In attitude tracking, KF has been used to improve the accuracy. Two-stage KF is applied in reference [21]. In the first stage, KF is used to fuse the results of multiple gyroscope arrays, and in the second stage, integrated KF is designed to estimate attitude quaternion. For attitude estimation in reference [22], linear KF model and nonlinear KF model were designed. For nonlinear models, extended KF (EKF) and unscented KF (UKF) were used to implement algorithms respectively, and adaptive parameter regulators were designed, thus forming three algorithms adaptive KF (AKF), adaptive EKF (AEKF), and adaptive UKF (AUKF). All three algorithms can reduce the attitude estimation error. In reference [9], the method based on time series modeling is adopted to establish a mathematical model for the original data of MEMS sensor, and then KF is carried out on the data according to the equation of state and measurement equation. Finally, the attitude angle is solved by fusion algorithm. Experimental results show that this method can greatly improve the accuracy of attitude angle. Reference [24], designed a quaternion attitude solution algorithm based on KF to solve the problem of low accuracy caused by micro-electro-mechanical systems (MEMS) inertial measurement unit (IMU). Compared with solving quaternion differential equations, the complexity of the fourth-order KF designed in the reference is not high. Experiments show that the algorithm can effectively improve the accuracy of MIMU attitude solution, and obviously improve the low accuracy of measuring instruments and unstable data, so it has strong engineering practical value.

To the CF for the attitude tracking, due to the drift of the sensor’s gyroscope, the attitude angle estimation by accelerometer and magnetometer will be affected by linear acceleration of the carrier and magnetic field interference. Therefore, CF can use the measurement values of the accelerometer and magnetometer to compensate the gyroscopic measurement values to update the attitude. Reference [18] [3] in order to accurately obtain the attitude estimation results, respectively, puts forward two kinds of improved CF, the improved adaptive CF can effectively reduce the attitude angle error, two-stage CF position fusion algorithm using the accelerometer and magnetometer survey data to estimate the attitude quaternion compensation correction, the influence of heading angle error on horizontal attitude measurement in magnetic interference environment is avoided. In reference [11], the attitude angle estimation results of EKF, linear CF and Mahony CF are compared, and the results show that the calculation cost of the CF is smaller, while the attitude estimation accuracy of the algorithm is similar. Reference [10] proposes a CF-based differential evolution algorithm for vector cross product compensation. The proposed algorithm compensates the high and low frequency signals in the sensor by vector cross product. The proportional integral (PI) compensator is used to compensate the data fusion. The differential evolution algorithm is used to seek the optimal parameters of the compensator and achieve the best attitude estimation. The proposed algorithm can effectively obtain high precision attitude angle, and the accuracy of attitude angle is higher than the EKF. Reference [26] designed a human body attitude angle solution algorithm based on fuzzy proportion integration differentiation (PID) regulation and complementary filtering, and calculated the motion data into human body attitude angle data. By comparing the experimental data of the fuzzy PID CF and the ordinary PI filtering algorithm, the experimental results show that the attitude angle processed by the fuzzy PID CF has better stability and high precision.

In this work, one human lower limb posture tracking method employing five inertial measurement units (IMUs) will be proposed. Moreover, in order to improve the estimation accuracy of the quaternion in IMU, the dual predictive quaternion KF will be proposed for the IMU. To the dual predictive quaternion KF, two predictive quaternion KFs are employed for one IMU in this paper, one is used to estimate the angular velocity, the other one is used to estimate the quaternion, then, the estimated angular velocity and quaternion have been used for the proportional integral (PI)-based angular velocity compensation. The real test shows that the proposed method is effective to improve the accuracy of the human lower limb posture tracking, especially when the IMU data is outage.

The remaining part of this paper is organized as follows. Section 2 introduces the schematic the human lower limb posture tracking strategy. The lower limb pose fusion algorithm is designed in Section 3.The test is proposed in Section 4. Finally, conclusions are addressed in Section 5.

2 Human lower limb posture tracking strategy

In this section, we will introduce the human lower limb posture tracking strategy. The scheme of the human lower limb posture tracking used in this work is shown in Fig. 1. In this work, we employ five inertial measurement units (IMUs): one is fixed on the abdomen of the human body, two IMUs are fixed at the left and right thighs of the human body respectively, and two IMUs are respectively fixed at the left and right lower legs of the human body respectively. The human lower limb posture tracking used in this work includes the following steps:

  • Five IMUs measure the quaternion \({\hat{\textbf{q}}}_t^i, i \in [1,5]\) of the corresponding joint parts at the time index t in parallel.

  • The \({\hat{\textbf{q}}}_t^i, i \in [1,5]\) are used by five dual-predictive Kalman filters (PKFs) to provide the estimation of the quaternion \(\mathbf{{q}}_t^i, i \in [1,5]\) .

  • Based on IMU fixed on the abdomen of the human, the human lower limb posture are computed by the \(\mathbf{{q}}_t^i, i \in [1,5]\).

Fig. 1
figure 1

The human lower limb posture tracking strategy employing IMU

Fig. 2
figure 2

The structure of the \(i^{th}\) dual-predictive Kalman filter for the \(i^{th}\) IMU

3 Dual-predictive Kalman filter

To the data fusion filter, we proposed one Kalman filter-based method in [6]. In this work, we improve the data fusion method and the data fusion filter based on the the [6].

3.1 The structure of the dual-predictive Kalman filter

In order to facilitate the collection of IMU’s data, wireless communication technology is used. It should be pointed out that although the IMU can output the data seamlessly, the wireless communication technology may make the outage of the sensor’s data.

In order to improve the estimation accuracy and overcome the outage of the data, in this work, we proposed dual-KF for each IMU. And in this section, we will design the dual-KF. From the Fig. 1, we can see that we employ five IMUs in this work, thus, we employ five dual-KFs in this work. The structure of the \(i^{th}\) dual-predictive Kalman filter for the \(i^{th}\) IMU is shown in Fig. 2. To the \(i^{th}\) dual-KF, it includes the following steps:

  • The angular velocities \((\hat{\omega }_x^i,\hat{\omega }_y^i,\hat{\omega }_z^i)\) in three mutually perpendicular directions of the \(i^{th}\) are input to one predictive Kalman filter to provide the estimation of the angular velocities \((\omega _x^i,\omega _y^i,\omega _z^i)\) respectively, which is used to build the state transition matrix \(\mathbf{{F}}^q_{t+1}\) used for the other predictive Kalman filter.

  • With the quaternion \({\hat{\textbf{q}}}^i_t\) measured from the \(i^{th}\) IMU, the other predictive Kalman filter is used to estimation of the \(\mathbf{{q}}^i_t\).

  • Both the \({\hat{\textbf{q}}}^i_t\) and \(\mathbf{{q}}^i_t\) are used to calculate their respective direction cosine matrix (DCM).

  • The \({\hat{\textbf{q}}}^i_t\)- and \(\mathbf{{q}}^i_t\)-based DCM are used to compensate the angular velocity, which is used to build the state transition matrix \(\mathbf{{F}}^q_{t+1}\).

In this paper, PI algorithm is used to correct the zero bias of gyroscope to make the obtained angular velocity more accurate, and then the state transition matrix of KF is constructed by using the corrected angular velocity. The state equations and measurement equations of the two predictive Kalman filter will be introduced in the following section.

3.2 The data fusion model of the predictive Kalman filter for the angular velocities

In this subsection, the data fusion model of the predictive Kalman filter for the angular velocities of the \(i^{th}\) IMU will be designed. The state equation of the data fusion model can be written as the Eq. 1.

$$\begin{aligned} \varpi _t^{i - } = {\mathbf{{F}}^\varpi }\varpi _t^{i} + \mathbf{{w}}_t^\varpi \,, \end{aligned}$$
(1)

where \(\varpi _t^i = {\left[ {\omega _{x,t}^i,\omega _{y,t}^i,\omega _{z,t}^i} \right] ^T}\), \({\mathbf{{F}}^\varpi } = \left[ {\begin{array}{*{20}{c}}1&{}0&{}0\\ 0&{}1&{}0\\ 0&{}0&{}1 \end{array}} \right] \), \(\mathbf{{w}}_t^\varpi \sim N\left( {0,{\mathbf{{Q}}^\varpi }} \right) \) is the system noise.

Moreover, the measurement equation of the \(i^{th}\) is listed as the Eq. 2.

$$\begin{aligned} \mathbf{{y}}_t^{i,\varpi } = \gamma _{}^i\left( {\mathbf{{H}}_{}^{i,\varpi }\varpi _t^{i - } + \mathbf{{v}}_t^{i,\varpi }} \right) + \left( {1 - \gamma _{}^i} \right) \mathbf{{H}}_{}^{i,\varpi }{\mathbf{{F}}^\varpi }\varpi _t^i, \end{aligned}$$
(2)

where \(\mathbf{{y}}_t^{i,q} = {\left[ {\begin{array}{*{20}{c}} {\hat{q}_{0,t}^i}&{\hat{q}_{1,t}^i}&{\hat{q}_{2,t}^i}&{\hat{q}_{3,t}^i} \end{array}} \right] ^T}\) is the measurement vector, \(\mathbf{{H}}_{}^{i,\varpi } = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0\\ 0&{}1&{}0\\ 0&{}0&{}1 \end{array}} \right] \), \(\gamma _{}^i\) is the outage factor, if the data available, we set \(\gamma _{}^i = 1\), if the data is outage, we set \(\gamma _{}^i = 0\), \(\mathbf{{v}}_t^\varpi \sim N\left( {0,{\mathbf{{R}}^\varpi }} \right) \) is the measurement noise.

3.3 The data fusion model of the predictive Kalman filter for the quaternion

In this subsection, the data fusion model of the predictive Kalman filter for the quaternion of the \(i^{th}\) IMU will be designed. The state equation of the data fusion model can be written as the Eqs. 3, 4 and 5.

$$\begin{aligned} \mathbf{{q}}_t^{i - } = {\mathbf{{F}}^q_t}{} \mathbf{{q}}_t^{i } + \mathbf{{w}}_t^q \,, \end{aligned}$$
(3)
$$\begin{aligned} {\mathbf{{F}}^q_t} = \mathbf{{I}} + \frac{{\Delta t}}{2}{\varvec{\Omega }}_{t-1}^i \,, \end{aligned}$$
(4)
$$\begin{aligned} {\varvec{\Omega }}_{t-1}^i = \left[ {\begin{array}{*{20}{c}} 0&{}{ - \omega _{x,t-1}^i}&{}{ - \omega _{y,t-1}^i}&{}{ - \omega _{z,t-1}^i}\\ {\omega _{x,t-1}^i}&{}0&{}{\omega _{z,t-1}^i}&{}{ - \omega _{y,t-1}^i}\\ {\omega _{y,t-1}^i}&{}{ - \omega _{z,t-1}^i}&{}0&{}{\omega _{x,t-1}^i}\\ {\omega _{z,t-1}^i}&{}{\omega _{y,t-1}^i}&{}{ - \omega _{x,t-1}^i}&{}0 \end{array}} \right] \,, \end{aligned}$$
(5)

where \(\mathbf{{q}}_t^i = {\left[ {\begin{array}{*{20}{c}} {q_{0,t}^i}&{q_{1,t}^i}&{q_{2,t}^i}&{q_{3,t}^i} \end{array}} \right] ^T}\), \(\Delta t\) is the sample time, \(\mathbf{{w}}_t^q \sim N\left( {0,{\mathbf{{Q}}^q }} \right) \) is the system noise.

The measurement equation of the \(i^{th}\) is listed as the Eq. 6.

$$\begin{aligned} \mathbf{{y}}_t^{i,q} = \gamma _{}^i\left( {\mathbf{{H}}_{}^{i,q}{} \mathbf{{q}}_t^{i - } + \mathbf{{v}}_t^{i,q}} \right) + \left( {1 - \gamma _{}^i} \right) \mathbf{{H}}_{}^{i,q}{\mathbf{{F}}^q}{} \mathbf{{q}}_t^i, \end{aligned}$$
(6)

where \(\mathbf{{y}}_t^{i,q} = {\left[ {\begin{array}{*{20}{c}} {\hat{q}_{0,t}^i}&{\hat{q}_{1,t}^i}&{\hat{q}_{2,t}^i}&{\hat{q}_{3,t}^i} \end{array}} \right] ^T}\) is the measurement vector, \(\mathbf{{H}}_{}^{i,q} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0&{}0\\ 0&{}1&{}0&{}0\\ 0&{}0&{}1&{}0\\ 0&{}0&{}0&{}1 \end{array}} \right] \), \(\mathbf{{v}}_t^q \sim N\left( {0,{\mathbf{{R}}^q }} \right) \) is the measurement noise.

3.4 Angular velocity compensation

In this subsection, the angular velocity compensation method used in this work will be introduced. With the \(\mathbf{{q}}_t^i\), the estimated DMC can be computed as the Eq. 7.

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}}{\mathrm{{v}}_{x,t}^i}\\ {\mathrm{{v}}_{y,t}^i}\\ {\mathrm{{v}}_{z,t}^i} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {2\left( {q_{1,t}^iq_{3,t}^i - q_{0,t}^iq_{2,t}^i} \right) }\\ {2\left( {q_{2,t}^iq_{3,t}^i + q_{0,t}^iq_{1,t}^i} \right) }\\ {{{\left( {q_{0,t}^i} \right) }^2} - {{\left( {q_{1,t}^i} \right) }^2} - {{\left( {q_{2,t}^i} \right) }^2} + {{\left( {q_{3,t}^i} \right) }^2}} \end{array}} \right] , \end{aligned}$$
(7)

where \({\left[ {\begin{array}{*{20}{c}} {\mathrm{{v}}_{x,t}^i}&{\mathrm{{v}}_{y,t}^i}&{\mathrm{{v}}_{z,t}^i} \end{array}} \right] ^T}\) is the \(\mathbf{{q}}_t^i\)-based angular velocity at the time index t.

Meanwhile, we compute the other DMC using the \({\hat{\textbf{q}}}_t^i\) via the Eq. 8.

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}} {\mathrm{{va}}_{x,t}^i}\\ {\mathrm{{va}}_{y,t}^i}\\ {\mathrm{{va}}_{z,t}^i} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {2\left( {\hat{q}_{1,t}^i\hat{q}_{3,t}^i - \hat{q}_{0,t}^i\hat{q}_{2,t}^i} \right) }\\ {2\left( {\hat{q}_{2,t}^i\hat{q}_{3,t}^i + \hat{q}_{0,t}^i\hat{q}_{1,t}^i} \right) }\\ {{{\left( {\hat{q}_{0,t}^i} \right) }^2} - {{\left( {\hat{q}_{1,t}^i} \right) }^2} - {{\left( {\hat{q}_{2,t}^i} \right) }^2} + {{\left( {\hat{q}_{3,t}^i} \right) }^2}} \end{array}} \right] , \end{aligned}$$
(8)

where \({\left[ {\begin{array}{*{20}{c}} {\mathrm{{va}}_{x,t}^i}&{\mathrm{{va}}_{y,t}^i}&{\mathrm{{va}}_{z,t}^i} \end{array}} \right] ^T}\) is the \({\hat{\textbf{q}}}_t^i\)-based angular velocity at the time index t. Then, the cross product can be computed as the Eq. 9.

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}} {\mathrm{{e}}_{x,t}^i}\\ {\mathrm{{e}}_{y,t}^i}\\ {\mathrm{{e}}_{z,t}^i} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {va_{y,t}^i \times v_{z,t}^i - va_{z,t}^i \times v_{y,t}^i}\\ {va_{z,t}^i \times {v_x} - va_{x,t}^i \times v_{z,t}^i}\\ {va_{x,t}^i \times v_{y,t}^i - va_{y,t}^i \times v_{x,t}^i} \end{array}} \right] , \end{aligned}$$
(9)

Then, we calculate the error by proportional integral (PI) method and compensate the angular velocity by using the Eq. 10. And the \({\left[ {\begin{array}{*{20}{c}} {\omega _{x,t}^i}&{\omega _{y,t}^i}&{\omega _{z,t}^i} \end{array}} \right] ^T}\) can be used to compute the \(\mathbf{{F}}^q_{t+1}\) at the time index \(t+1\). Kp and Ki represent proportional control parameters and integral control parameters respectively. By adjusting Kp and Ki, zero deviation of gyroscope can be corrected.

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}} {\omega _{x,t}^i}\\ {\omega _{y,t}^i}\\ {\omega _{z,t}^i} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\omega _{x,t}^i}\\ {\omega _{y,t}^i}\\ {\omega _{z,t}^i} \end{array}} \right] + Kp\left[ {\begin{array}{*{20}{c}} {e_{x,t}^i}\\ {e_{y,t}^i}\\ {e_{z,t}^i} \end{array}} \right] + \left( {\left[ {\begin{array}{*{20}{c}} {\mathrm{{e}}_{x,t}^{I,i}}\\ {\mathrm{{e}}_{y,t}^{I,i}}\\ {\mathrm{{e}}_{z,t}^{I,i}} \end{array}} \right] + Ki\left[ {\begin{array}{*{20}{c}} {\mathrm{{e}}_{x,t}^i}\\ {\mathrm{{e}}_{y,t}^i}\\ {\mathrm{{e}}_{z,t}^i} \end{array}} \right] } \right) . \end{aligned}$$
(10)

4 Test

In this section, we will introduce one real test to show the effectiveness of the proposed method. Firstly, we will design the real test, which will be used in this work. Secondly, the performance of the proposed method will be investigated.

Fig. 3
figure 3

The test platform used in this work

Fig. 4
figure 4

The screenshot of the experiment process

4.1 The design of the experimental parameter

The real test has been done in No.1 teaching building of University of Jinan, China. Figure 3 shows the test platform used in this work. In this work, we employ one target human, one rehabilitation training bicycle, five IMUs, and one computer. This paper uses the simple rehabilitation bicycle equipment. The research focus of this paper is the lower extremity gesture capture. When patients with lower extremity motor function injury are undergoing rehabilitation training by pedaling on a bicycle, the sensor can capture the lower extremity gesture information and evaluate the recovery situation by analyzing the gesture information. And we employ five IMUs, one is fixed on the abdomen of the human body, two IMUs are fixed at the left and right thighs of the human body respectively, and two IMUs are respectively fixed at the left and right lower legs of the human body respectively. The IMUs are used to collect the attitude information of the target human. In this work, we employ XSENS DOT. XSENS DOT is a wearable sensor development platform that features sensors that combine accelerometers, gyroscopes and magnetometers to provide accurate attitude. The computer is used to collect the sensors’ data via wireless RS232. In this work, we set \(\delta t = 0.02 s\). When we do the real test, the target human runs the rehabilitation training bicycle. Meanwhile, the five IMUs collect the sensors’ data. The screenshot of the experiment process is shown in Fig. 4.

Fig. 5
figure 5

The \(\textbf{q}^1\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value

Fig. 6
figure 6

The \(\textbf{q}^2\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value

Fig. 7
figure 7

The \(\textbf{q}^3\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value

Fig. 8
figure 8

The \(\textbf{q}^4\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value

Fig. 9
figure 9

The \(\textbf{q}^5\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value

Fig. 10
figure 10

The CDF of \(\textbf{q}^1\) error measured by KF, dual KF, dual PKF, dual PKF PI

Fig. 11
figure 11

The CDF of \(\textbf{q}^2\) error measured by KF, dual KF, dual PKF, dual PKF PI

4.2 The performance of the proposed method

In this subsection, we will investigate the performance of the proposed method. In order to show the effectiveness, in this subsection, we compare the performance of the proposed dual predictive quaternion Kalman filter with PI (PKF PI) with the traditional Kalman filter (KF), dual KF, and dual predictive KF (PKF). The \(\textbf{q}^i, i\in [1,5]\) measured by KF, dual KF, dual PKF, dual PKF PI, measurement, and the reference value are shown in Figs. 5, 6, 7, 8 and 9. From the figures, we can see easily that all the methods mentioned above can reduce the estimation error when compared with the measurement. Moreover, the proposed dual PKF PI’s estimation gets more close to the reference value when compared with the KF, dual KF, and dual PKF. It should be pointed out that the performances of the dual KF and dual PKF are similar, since the predictive method is proposed for the outage of the data. In order to show the effectiveness of the proposed method more detailed, the cumulative distribution function (CDF) of \(\textbf{q}^i, i\in [1,5]\) error measured by the KF, dual KF, dual PKF, dual PKF PI are shown in Figs. 10, 11, 12, 13 and 14. From the figures, one can infer easily that the proposed method has the smallest error when compared with the KF, dual KF, and the dual PKF. When the probability is 0.9, the attitude errors obtained by the above method are all reduced compared with those obtained by the measurement. It is particularly noted that the method proposed in this paper achieves the best performance in terms of reducing the attitude errors, and the performance is improved by more than 30% when compared with the measured values of the sensor.

Fig. 12
figure 12

The CDF of \(\textbf{q}^3\) error measured by KF, dual KF, dual PKF, dual PKF PI

Fig. 13
figure 13

The CDF of \(\textbf{q}^4\) error measured by KF, dual KF, dual PKF, dual PKF PI

4.3 The performance of the proposed method when the data is unavailable

In this subsection, the performance of the proposed method when the data is unavailable will be investigated. It should be pointed out that the IMU data can not be available, in this work, we consider that the outage of the sensor’s data derived from the wireless communication data transmission. In this section, we simulated nine data outage zone. And the CDF of \(\textbf{q}^i, i\in [1,5]\) error measured by the KF, dual KF, dual PKF, dual PKF PI when the data is unavailable are shown in Figs. 15, 16, 17, 18 and 19. From these figures, it can be seen easily that for all five IMUs’ data, the proposed dual PKF PI has the smallest error when compared with the KF, dual KF, and dual PKF, which shows that the proposed method is effective to improve the estimation accuracy when the data is available.

Fig. 14
figure 14

The CDF of \(\textbf{q}^5\) error measured by KF, dual KF, dual PKF, dual PKF PI

Fig. 15
figure 15

The CDF of \(\textbf{q}^1\) error measured by KF, dual KF, dual PKF, dual PKF PI when the data is unavailable

Fig. 16
figure 16

The CDF of \(\textbf{q}^2\) error measured by KF, dual KF, dual PKF, dual PKF PI when the data is unavailable

Fig. 17
figure 17

The CDF of \(\textbf{q}^3\) error measured by KF, dual KF, dual PKF, dual PKF PI when the data is unavailable

Fig. 18
figure 18

The CDF of \(\textbf{q}^4\) error measured by KF, dual KF, dual PKF, dual PKF PI when the data is unavailable

Fig. 19
figure 19

The CDF of \(\textbf{q}^5\) error measured by KF, dual KF, dual PKF, dual PKF PI when the data is unavailable

5 Conclusion

In this work, five IMUs have been used to in human lower limb posture tracking. Moreover, in order to improve the estimation accuracy of the quaternion in IMU, the dual predictive quaternion Kalman filter has been proposed and been used for IMU. To the dual predictive quaternion Kalman filter, two predictive quaternion Kalman filters have been used for one IMU in this paper: one has been used to estimate the angular velocity, the other one is used to estimate the quaternion, then, the estimated angular velocity and quaternion have been used for the PI-based angular velocity compensation. The real test shows that the proposed method is effective to improve the accuracy of human lower limb posture tracking. Compared with the observed value, the performance improves by more than about 30%. When the IMU data is outage due to the wireless communication, the proposed method can supplement the interrupt data with good attitude accuracy.