Skip to main content

A multi-Kalman filter-based approach for decoding arm kinematics from EMG recordings

Abstract

Background

Remarkable work has been recently introduced to enhance the usage of Electromyography (EMG) signals in operating prosthetic arms. Despite the rapid advancements in this field, providing a reliable, naturalistic myoelectric prosthesis remains a significant challenge. Other challenges include the limited number of allowed movements, lack of simultaneous, continuous control and the high computational power that could be needed for accurate decoding. In this study, we propose an EMG-based multi-Kalman filter approach to decode arm kinematics; specifically, the elbow angle (θ), wrist joint horizontal (X) and vertical (Y) positions in a continuous and simultaneous manner.

Results

Ten subjects were examined from which we recorded arm kinematics and EMG signals of the biceps, triceps, lateral and anterior deltoid muscles corresponding to a randomized set of movements. The performance of the proposed decoder is assessed using the correlation coefficient (CC) and the normalized root-mean-square error (NRMSE) computed between the actual and the decoded kinematic. Results demonstrate that when training and testing the decoder using same-subject data, an average CC of 0.68 ± 0.1, 0.67 ± 0.12 and 0.64 ± 0.11, and average NRMSE of 0.21 ± 0.06, 0.18 ± 0.03 and 0.24 ± 0.07 were achieved for θ, X, and Y, respectively. When training the decoder using the data of one subject and decoding the data of other subjects, an average CC of 0.61 ± 0.19, 0.61 ± 0.16 and 0.48 ± 0.17, and an average NRMSE of 0.23 ± 0.07, 0.2 ± 0.05 and 0.38 ± 0.15 were achieved for θ, X, and Y, respectively.

Conclusions

These results suggest the efficacy of the proposed approach and indicates the possibility of obtaining a subject-independent decoder.

Background

With the increase in number of amputees worldwide, the need for the development of a better and more functional replacement arises [1]. Many attempts and developments were made throughout history starting with passive and cosmetic prostheses with no functionality, moving to body-powered prosthetics [2, 3], and reaching myoelectric prostheses that were introduced in early 1950’s [4]. Myoelectric prostheses represent a gate to developing a functional prosthesis with a step closer to the natural limb. Such devices use signals recorded from the nervous system, such as electromyography (EMG) signals to control the prosthesis. Using EMG signals has shown success in this application as they can be recorded non-invasively with no risks imposed. EMG signals have also been shown to carry neural information on the motor intention similar to direct nerve recordings, which indicates that movements could be decoded from EMG signals [5, 6].

Although this type of prosthesis has been first introduced long time ago, there have been significant efforts to date to develop advanced control techniques that could provide more accurate control of the prosthesis [7]. Many techniques employed pattern recognition methods to control the prosthesis in which signals are being classified to one of limited classes of movements in a discrete form [7,8,9]. The limited functionality and low reliability of these methods motivate the use of statistical techniques that could provide more promising solutions as they overcome some of the pattern recognition limitations. For instance, multiple approaches investigating simultaneous, proportional and continuous control using regression-based techniques have been introduced [10, 11]. Unlike pattern recognition techniques, such techniques do not map discrete movements, but rather calculate an estimation for each movement degree-of-freedom (DOF). This allows simultaneous and independent control for the user.

Other techniques were also used in which proportional control is employed which uses EMG signals to control speed or force of movement according to the recorded EMG, threshold control and onset analysis [12]. This approach can detect the onset and offset of muscle contraction. Although such approach demonstrated accurate performance, it has a high computational complexity which negatively impacts the feasibility of using it in real-time control.

Representing a plausible alternative control technique, the Kalman filter is considered one of the most powerful statistical methods. It has been widely used in various applications, such as tracking moving objects [13, 14], building a fuzzy inference system together with generalized neural networks [15], as well as using it in image and motion analysis to estimate pixels depth and depth uncertainty [16]. In addition, the Kalman filter has been widely used in brain–computer interface (BCI) applications. It has been demonstrated to control the motion of a mouse cursor using neural signals recorded from motor cortex [17]. It was also used in inferring hand motion from multi-cell recordings from the motor cortex [18]. The Kalman filter showed promising results in each application with high capability of state estimation, and low computational power. However, previous studies have demonstrated low prediction accuracy when using the Kalman filter in decoding EMG signals [11]. Using manually tuned Kalman filter or the more computationally expensive non-linear versions of the Kalman filter have been demonstrated to enhance the decoding accuracy [19, 20]. In some of these studies, a set of restricted movements were only allowed for the subjects to perform, which might impact the ability of the filter to model naturalistic movements. Finally, these studies focused on training subject-dependent Kalman filters that are specifically trained for each subject.

In this paper, we propose a multi-Kalman filter-based decoding scheme to estimate arm elbow angle θ, and X and Y positions of the wrist from surface EMG signals captured from 4 muscles group biceps, triceps lateral and anterior deltoid. We introduce a novel setup that we used to record the random and complex movements kinematics and EMG signals simultaneously from 10 different subjects. The subjects were instructed to perform sets of movements in 2D plane in a random form without restricting the movements to a specific sequence. In our approach, we first train multiple Kalman filters using pairs of parameters (i.e., (θ, X), (θ, Y) and (X, Y)) to obtain their parameters and then use them to decode the EMG signal. The best filter for each parameter is identified and subsequently used in decoding test data for each subject. We examined the performance of the approach in both a subject-dependent and subject-independent manner, where in the latter, Kalman filters were trained using EMG data of some subjects and tested on completely different subjects. Our results demonstrate the capability of the introduced approach to decode a wide range of angles and coordinates position in a more continuous form in both the subject-dependent and subject-independent cases. It showed that it could withstand the randomness and the sudden changes in the data set, resulting in an enhanced performance with minimal processing. This could allow prosthesis control in a smoother, continuous and simultaneous manner.

Results

Recorded data

We examined the performance of the proposed multi-Kalman filter approach using 20 sets of data. Two sessions were recorded from each subject, where the first session data set was used to train the Kalman filters and obtain the four parameters A, H, Q and W (see Additional file 1: Fig. S1), and the other session data set was used for testing. Figure 1 shows samples of X–Y position, elbow angle θ as well as the corresponding EMG signals. The figures demonstrate how a change in arm movement results in a clear muscle activity. For instance, the figures show a clear synchronization between the biceps EMG (Fig. 1d) and X (Fig. 1a) and θ (Fig. 1c) positions parameters.

Fig. 1
figure 1

Sample data set of elbow angles and corresponding EMG recorded from biceps, triceps, Anterior and lateral Deltoid muscles. a X-Position of the wrist. b Y-position of the wrist. c Elbow angle θ. d Corresponding Normalized Biceps EMG. e Corresponding Normalized Triceps EMG. f Corresponding Normalized Anterior Deltoid EMG. g Corresponding Normalized Lateral Deltoid EMG zoomed in to show the change in signal

Subject-dependent performance

We first examined the performance of the proposed parameters combination Kalman filter approach when trained and tested using the data of each subject. The data set of each subject was randomly split to 75% training data and 25% testing data for 10 different folds. Figure 2 shows a sample of the decoded and actual state for θ, X and Y for the subject with the best performance (Subject 3). The results show that the proposed approach is able to follow the actual input and its transitions accurately, even when a sudden change in the movement occurs. The figure also demonstrates that the pattern of change for θ and X is similar, representing the nature of the movements done by the subject. Figure 3 shows the CC and NRMSE obtained for each subject for the θ, X and Y parameters. The parameters combination approach decoded the test data set with a mean CC, computed across subjects, of 0.68 ± 0.1, 0.67 ± 0.12 and 0.64 ± 0.11, and with mean NRMSE of 0.21 ± 0.06, 0.18 ± 0.03 and 0.24 ± 0.07 for θ, X and Y, respectively. Results indicate that the Kalman filter was able to decode θ for most subjects with high performance and had a lower performance for 20% of subjects. Tables 1 and 2 show the detailed CC and NRMSE values for each subject.

Fig. 2
figure 2

Sample of the multi-Kalman filter performance showing (a) decoding result for θ, (b) X and (c) Y

Fig. 3
figure 3

CC and NRMSE for each subject for each of (a) θ, (b) X and (c) Y the subject-dependent test

Table 1 Detailed CC for each subject for θ, X and Y for the subject-dependent test
Table 2 Detailed NRMSE for each subject for θ, X and Y for the subject-dependent test

Subject-dependent performance using biceps and triceps signals only

To assess whether all four sets of electrodes are needed or using signals recorded from the biceps and triceps muscles would be sufficient, we examined the performance of the Kalman filter when using EMG signal from biceps brachii and triceps brachii only. The data set of each subject was randomly split to 75% training data and 25% testing data. Figure 4 shows a sample of the decoded and actual state for θ, X and Y for the subject with the best performance using this set of electrodes (Subject 2). While the decoded parameters appear to be able to track their corresponding actual values, this occurs at a lower accuracy compared to using all four sets of electrodes. Figure 5 shows the CC and NRMSE obtained for each subject for the θ, X and Y parameters. The parameters combination approach decoded the test data set with a mean CC, computed across subjects, of 0.42 ± 0.32, 0.386 ± 0.32 and 0.46 ± 0.488, and with mean NRMSE of 0.35 ± 0.12, 0.351 ± 0.09 and 0.338 ± 0.17 for θ, X and Y, respectively. Results indicate that the Kalman filter performance dropped significantly for 80% of subjects, while it remained unaffected for the other 20% compared to using all four sets of electrodes. These results support our observation, since for movements, such as shoulder flexion and extension, the deltoid muscles are activated.

Fig. 4
figure 4

Sample of the multi-Kalman filter performance when using signals from the biceps brachii and triceps brachii only showing (a) decoding result for θ, (b) X and (c) Y

Fig. 5
figure 5

CC and NRMSE for each subject when using signals from the biceps brachii and triceps brachii only for each of (a) θ, (b) X and (c) Y the subject-dependent test using biceps and triceps EMG signals only

Subject-independent leave-one-out performance

We next examined the performance of the multi-Kalman filter approach when trained using the data of 9 subjects and tested using the data of the left-out 10th subject. This test was performed to examine the performance of Kalman filter if training was done using more diverse data sets that could completely eliminate the need for recording training data from each subject. Figure 6 shows a sample of the decoded and actual states for θ, X and Y of Subject 1. The figure demonstrates similarity, albeit lower than that achieved in the subject-dependent test, that is quantified in Fig. 7 for all subjects showing the CC and NRMSE for the three parameters. A mean CC of 0.61 ± 0.19, 0.61 ± 0.16 and 0.48 ± 0.17 and mean NRMSE of 0.27 ± 0.07, 0.2 ± 0.05 and 0.38 ± 0.15 were achieved for θ, X and Y, respectively. Despite such drop, a slight improvement in the performance for some subjects can be detected as well, as in Subject 5, for example. Tables 3 and 4 show the detailed CC and NRMSE for each subject.

Fig. 6
figure 6

Sample of multi-Kalman filter performance showing (a) decoding result for θ, (b) X and (c) Y for the subject-independent leave-one-out test

Fig. 7
figure 7

CC and NRMSE for each subject for each of (a) θ, (b) X and (c) Y for the subject-independent leave-one-out test

Table 3 Detailed CC for each subject for θ, X and Y for the subject-independent leave-one-out test
Table 4 Detailed NRMSE for each subject for θ, X and Y for the subject-independent leave-one-out test

Subject-independent performance based on best subject training

In this test, we examined the performance of the approach when we train using data from the subject with best subject-dependent performance and test using data of each of the other subjects. The data set of Subject 3 was used for training in this case given the elevated performance obtained using the proposed approach for this subject compared to other subjects as demonstrated in Fig. 3. Figure 8 illustrates a sample of the decoded and actual state for θ, X and Y of Subject 1. Figure 9 shows the CC and NRMSE obtained for each subject for each of the 3 parameters. The overall performance showed a drop compared to the subject-dependent test, with mean CC of 0.61 ± 0.19, 0.61 ± 0.16 and 0.48 ± 0.17 and mean NRMSE 0.23 ± 0.07, 0.2 ± 0.05 and 0.38 ± 0.15 for θ, X and Y, respectively. Despite such drop, a slight improvement in the performance for some subjects can be detected as well, as in Subject 5, for example. Tables 5 and 6 show the detailed CC and NRMSE for each subject.

Fig. 8
figure 8

Sample of the multi-Kalman filter performance showing (a) θ, (b) X and (c) Y for the subject-independent testing with the Kalman filters using data of Subject 3

Fig. 9
figure 9

CC and NRMSE for each subject for each of (a) θ, (b) X and (c) Y for the subject-independent testing with the Kalman filters using data of Subject 3

Table 5 Detailed CC for each subject for θ, X and Y for the subject-independent testing with the Kalman filters using data of Subject 3
Table 6 Detailed NRMSE for each subject for θ, X and Y for the subject-independent testing with the Kalman filters using data of Subject 3

Comparison to other Kalman filter approaches

We examined the performance of the multi-Kalman filter proposed approach in comparison to the other two approaches (the single Kalman filter approach and the three Kalman filter approach). Figure 10 shows the result of different attempts to construct a Kalman filter with one, two and three parameters, with the average CC for each parameter in each method for the subject-dependent testing. Results demonstrate that the proposed parameters combination approach achieves the best performance. Parameters combination resulted in a mean CC of 0.698, 0.675 and 0.652 compared to 0.069, 0.109 and 0.0308 for the single Kalman filter approach and 0.67, 0.629 and 0.688 for the three Kalman filter approach, for θ, X and Y position, respectively.

Fig. 10
figure 10

Average CC for three parameters when using 3 Kalman filters, 1 Kalman filter and Parameters Combination approaches

Discussion

Enhancing movement kinematics decoding from EMG signals represents one crucial step toward the development of prosthetics with naturalistic movements. Here, we aimed to develop a multi-Kalman filters approach that results in the best performance for each decoded movement parameter. The proposed approach showed enhanced performance when tested in subject-dependent and subject-independent manners. The proposed technique is capable of overcoming measurement noise and shows the possibility of across-subjects decoding.

There have been multiple efforts employing a variety of techniques for movement decoding from EMG signals. For instance, Loconsole et al. used time-delayed neural network (TDNN) for online torque prediction and control of robot joints, using sEMG signals as the input to the model. The achieved results demonstrate the possibility of using this approach to support patients with movements difficulty [21]. However, in such setup, it is unclear if this model can predict direct kinematics, such as elbow/finger angles, or a given position of arm. In addition, the trajectory of the movement was limited and might only be suitable for rehabilitation rather than prosthesis control. Natsakis et al. attempted to estimate the kinematics from the elbow down using EMG signals measured from biceps, triceps, deltoid and brachioradialis muscles group [22]. In this study, a neural network model was used in the estimation process. However, the study does not show if this model can be used for amputees with missing brachioradialis muscle. In addition, the approach was only examined using limited repetitive set of movements without reporting the performance if the subjects were instructed to move in no planned pattern. Finally, Kapelner et al. attempted to predict wrist kinematics using both EMG signals and neural features extracted from the decomposition of recorded EMG. A simple linear regression model is used in this approach for prediction. However, one limitation of this study is including only single DOF contractions [23].

Given the limitations of the aforementioned studies, the Kalman filter has been utilized in our method given its known strength in prediction problems for continuous systems [24,25,26]. Multiple studies have introduced the usage of Kalman filter for movement decoding, however, using motor cortex neuronal activity recorded invasively [17, 27, 28]. Such technique could provide access to the activity of single neurons which results in accurate decoding of movement intention. However, it is still far from being applied in practice given the complications that might be associated with electrode implantation surgeries. Therefore, using EMG could provide better alternative for which different decoding schemes have been proposed for a similar purpose.

In our study, we have proposed solution that could address some of the limitations in prosthesis control. The Kalman filter is ideal for dynamic systems for which it is able to iteratively decode the signals using consecutive data inputs [29, 30]. This allows it to quickly estimate the true value while taking into consideration the uncertainty of the given data. Another advantage of Kalman filters is that they do not require significant memory resources as they only need the previous state for the next estimation [31]. This makes Kalman filters suitable for real-time applications, such as prosthesis control. It could be applied to time-domain EMG without the need to extract other frequency-domain features (see Additional file 1: Figs. S2–S5). It would not require high computational power compared to using neural networks and deep learning techniques. Moreover, it can overcome the measurement (EMG signal) noise, which is critical in such application given that EMG signals are noisy [32], especially when recorded non-invasively. We have also shown the possibility of training using one subject’s data and using the model to decode the movement for a completely different subject.

This work could be extended to take into account the dynamics of EMG signals when the muscle is in fatigue, as we were attentive to give intervals of rest to our subjects to avoid changes in the muscle activity. Thus, the behavior of the proposed approach cannot be predicted if, for a given movement, a different EMG signal is introduced for decoding. This might not be practical for clinical setups. This could be alleviated using an adaptive Kalman filter-based decoder, such as the adaptive Kalman filter [33]. Another issue is that the Kalman filter employed in our approach assumes a linear relationship between the movement and the recorded EMG signal. While it was successful in decoding the movement with acceptable performance, it is expected that using a non-linear filter such as the unscented Kalman filter would be able to decode with better performance, however, with a relatively higher computational complexity [34]. Finally, in this paper, we recorded both movement kinematics and EMG signals using a rather limited setup. With the many new advanced hardware for EMG recording and movement tracking being introduced, it makes us expect that the usage of such technologies might enhance the noise filtration and provide more accurate readings. In addition, it would result in less delay in the simultaneous recording of both EMG and kinematics. It could also allow online decoding of the EMG signal and investigating its behavior. With the suggestions above, the approach and results demonstrated in this paper could provide means for prosthesis control improvement.

Conclusions

In this paper, we introduced an EMG decoding scheme for arm kinematics in 2D plane. Our approach consists of 4 phases: data recording, preprocessing of data, identifying the best combination of parameters for the decoding process and training the Kalman filter using the training data set. The proposed algorithm was tested on multiple subjects, where one recording session is used for training and the other recorded session is used for testing the performance of the algorithm. We also examined the performance when the training data of one subject is used to train the algorithm and subsequently use the trained decoder to decode the data of other subjects. Results showed the ability of the proposed multi-Kalman filter approach to decode kinematics in 2D plane using EMG signals recorded from 4 muscle group. We also demonstrated the success in training the filter using data from one subject and decoding the data of another subject. Our results demonstrate the ability of the proposed approach to decode arm kinematics in a continuous and simultaneous form which could result in a smoother movement prosthesis than the ones available nowadays. Such an algorithm would enable the introduction of a new family of prostheses that can behave in a closer form to a natural arm.

Methods

Experimental setup

Ten healthy, right-handed subjects participated in this study (five males, five females, age range 21–33). None of them had any history of neuromuscular disorder and all of them provided written consent to the procedures. The objective of the experiment was to record EMG signals simultaneously with the corresponding kinematics of the arm. Subjects had 9 electrodes connected to 4 muscle groups: biceps, lateral triceps, anterior deltoid and lateral deltoid for EMG recording. The 9th electrode was used as reference and was positioned at the center of the scapula. Prior to attaching the electrodes, subjects’ skin was wiped using an isopropyl alcohol pad for removal of oils and surface residues to increase recording electrodes impedance [35]. The skin was allowed to air dry for a few seconds before placing the gel electrodes. Electrodes placement was done following recommendations in [36].

Four markers were used: two near the surgical neck, one at the elbow joint and one at the carpal (wrist) joint, for movement tracking, as illustrated in Fig. 11. The markers were fixed on wearable bands. All subjects used the same band without changing the location of the markers shown in Fig. 11c, .

Fig. 11
figure 11

a Subject’s arm showing electrodes connected to biceps and deltoid muscle groups. b Subject’s arm showing electrodes connected to triceps deltoid and reference. c Subject’s arm with markers attached to the arm position matching movement number 1. d Sample of the subject’s arm movement number 2

Participants were instructed to make sets of movements in 2D space with no specific order or frequency. The movements were classified as follows:

  1. 1)

    Flexion and extension of forearm. This movement takes place while resting the elbow joint on a fixed table or without resting it on the table. This leads to a change of the elbow angle while using mainly the biceps brachii and triceps brachii.

  2. 2)

    Shoulder flexion/extension with or without forearm flexion/extension. This movement reflect an imitation of reaching out to an object.

  3. 3)

    Resting the arm on the table to avoid muscle fatigue. Subjects were instructed to rest anytime they feel tired until well-rested. The average time per rest was estimated at 2–3 s.

Figure 12 shows a detailed description of the movements described. Subjects were not instructed to avoid supination and/or pronation of forearm during movements. All subjects participated in two sessions, separated with 5 to 10 min breaks. The sessions were 400 and 200 s long, respectively.

Fig. 12
figure 12

Visual illustration of the plane of movements. a Elbow angle that was captured. b xy plane of arm movement

Data recording

SIMI reality motion system (SIMI, Germany) was used as an environment for motion capturing using an image analysis technique. Video recording was made using a Basler A60xf EMVA (Basler Technologies, Ahrensburg, Germany) with frame rate of 15 frames per second and saved using synchronized industrial cameras. The hardware used for EMG capturing was Noraxon TelyMyo 2400 T (Noraxon, USA, Inc.). A national instrument card NI USB-6225 (National Instruments Corporation, Austin, USA) was also used for the digitization process of the signals. EMG signals were recorded simultaneously with the video of motion through both SIMI and Noraxon platforms.

At the end of each session, the tracking system was used to analyze motion using marker-based automatic tracking after proper calibration. The resulting data file for each subject contained the time samples, the elbow angle, the four EMG signals, and the X and Y positions of wrist marker. Using the positions of each of the remaining 3 markers, we calculated the elbow angle \({\varvec{\uptheta}}\) using an embedded function in SIMI software.

Data pre-processing

The EMG signal recordings underwent filtration process on two stages, the first stage was using a built-in hardware 1st order high-pass filter with 10 Hz ± 10% cutoff. An additional 8th order Butterworth/Bessels low-pass anti-alias filter set to 500 Hz ± 2% cutoff was applied [37]. The second stage was smoothing the signal using root mean square (RMS), which acts as a linear envelope for the EMG signal. The RMS squares the raw signal which is considered a measurement of the power of the signal [38, 39]. All the collected signals were then normalized by subtracting the minimum value and then dividing each sample by the maximum value of all samples:

$$\mathbf{h}\left(t\right)=\frac{\left(\mathbf{k}-\mathrm{min}(\mathbf{k})\right)}{\mathrm{max}\left(\mathbf{k}-\mathrm{min}(\mathbf{k})\right)}$$
(1)

where k denotes the X-axis position, Y-axis position or the elbow joint angle \(\theta\). In addition, all EMG signals were multiplied by a constant factor of 103 and measured kinematics was multiplied by factor of 102 to increase their amplitude as specified for the Noraxon device.

Data analysis

Our objective is to estimate the kinematic state of the arm at a specific instance of time n. The state is defined by \({\widehat{\mathbf{r}}}_{n}=[{\varvec{\uptheta}},\mathbf{X},\mathbf{Y}]\), representing the elbow joint angle, X-position and Y-position of the wrist joint, respectively, at given time T = \(\Delta\) t × n, where \(\Delta\) t is our time window which was set to 100 ms. The three parameters are used to describe the movement described in Sect. 5.1. These parameters are independent as the same (\(\mathbf{X},\mathbf{Y}\)) coordinates can be reached by different elbow angle, depending on whether the subject elbow is resting on the table or not.

We utilized the Kalman filter for this task, which is an iterative process that uses a set of equations and discrete consecutive inputs to estimate the true value of the model being observed [25]. The Kalman filter assumes a linear relationship between the state rn and the measurement zn represented by

$${\mathbf{z}}_{n}={\mathbf{H}}_{n}{\mathbf{r}}_{n}+{\mathbf{Q}}_{n}$$
(2)

where \({\mathbf{H}}_{n}\) is a matrix that linearly relates the hand kinematics state rn to the EMG signals zn produced from the muscles and \({\mathbf{Q}}_{n}\) is the measurement noise.

The next state is computed using the system model:

$${{\varvec{r}}}_{n+1}={\mathbf{A}}_{n}{\mathbf{r}}_{n}+{\mathbf{w}}_{n}$$
(3)

where \({\mathbf{A}}_{n}\) is the coefficient matrix that linearly relates the current state to the next state and \({\mathbf{w}}_{n}\) is the process noise.

Although \({\mathbf{H}}_{n}\), \({\mathbf{A}}_{n}\), \({\mathbf{Q}}_{n}\) and \({\mathbf{w}}_{n}\) could be time-variant, we assume here that they are time-invariant to allow estimating them using the training data. The parameters A and H are estimated using the least-squares method as [18]

$$\mathbf{A}={\mathbf{R}}_{2}{\mathbf{R}}_{1}^{{\varvec{T}}}{({\mathbf{R}}_{1}{\mathbf{R}}_{1}^{{\varvec{T}}})}^{-1}$$
(4)
$$\mathbf{H}=\mathbf{z}{\mathbf{R}}^{{\varvec{T}}}{(\mathbf{R}{\mathbf{R}}^{{\varvec{T}}})}^{-1}$$
(5)

where

$$\mathbf{R}=\left(\begin{array}{ccc}{\mathrm{r}}_{\mathrm{1,1}}& \dots & {\mathrm{r}}_{1,\mathrm{M}}\\ \vdots & \ddots & \vdots \\ {\mathrm{r}}_{\mathrm{2,1}}& \dots & {\mathrm{r}}_{2,\mathrm{M}}\end{array}\right), \mathbf{R}1=\left(\begin{array}{ccc}{\mathrm{r}}_{\mathrm{1,1}}& \dots & {\mathrm{r}}_{1,\mathrm{M}-1}\\ \vdots & \ddots & \vdots \\ {\mathrm{r}}_{\mathrm{2,1}}& \dots & {\mathrm{r}}_{2,\mathrm{M}-1}\end{array}\right)$$
(6)
$$\mathbf{R}2=\left(\begin{array}{ccc}{\mathrm{r}}_{\mathrm{1,2}}& \dots & {\mathrm{r}}_{1,\mathrm{M}}\\ \vdots & \ddots & \vdots \\ {\mathrm{r}}_{\mathrm{2,2}}& \dots & {\mathrm{r}}_{2,\mathrm{M}}\end{array}\right), \mathbf{Z}=\left(\begin{array}{ccc}{\mathrm{z}}_{\mathrm{1,1}}& \dots & {\mathrm{z}}_{1,\mathrm{M}}\\ \vdots & \ddots & \vdots \\ {\mathrm{z}}_{\mathrm{4,1}}& \dots & {\mathrm{x}}_{4,\mathrm{M}}\end{array}\right)$$
(7)

The computed A and H are then used to estimate W and Q by

$$\mathbf{W}=\left({\mathbf{R}}_{2}-\mathbf{A}{\mathbf{R}}_{1}\right){\left({\mathbf{R}}_{2}-\mathbf{A}{\mathbf{R}}_{1}\right)}^{{\varvec{T}}}/(M-1)$$
(8)

and

$$\mathbf{Q}=(\mathbf{Z}-\mathbf{H}\mathbf{R}){(\mathbf{Z}-\mathbf{H}\mathbf{R})}^{{\varvec{T}}}/M$$
(9)

After the estimation of all Kalman filter parameters, Kalman filters are constructed for each subject and the obtained parameters are used to decode the elbow angle θ, and X and Y positions of the wrist using the measured EMG signal zn using the following sequence.

  1. (a)

    Kalman filter time update equations

    At each time instant n, we estimate the next state \({\widehat{\mathbf{r}}}_{n}^{-}\) using the prior state and the error covariance matrix \({\mathbf{P}}_{n}^{-}\) using the following equations:

    $${\widehat{\mathbf{r}}}_{n}^{-}=\mathbf{A}{\widehat{\mathbf{r}}}_{n-1},$$
    (10)
    $${\mathbf{P}}_{n}^{-}=\mathbf{A}{\mathbf{P}}_{n-1}{\mathbf{A}}^{\mathbf{T}}+\mathbf{w}$$
    (11)

    where initially, \({\widehat{\mathbf{r}}}_{n}^{-}\) and \({\mathbf{P}}_{n}^{-}\) are set to one.

  2. (b)

    Kalman filter measurement update equations

    In the next step, we obtain the Kalman gain k and use it with the previous state \({\widehat{\mathbf{r}}}_{n}^{-}\) and the measured EMG zn to correct the estimate computed earlier along with the error covariance matrix H using the following equations

    $${\mathbf{K}}_{n}={\mathbf{P}}_{n}^{-}{\mathbf{H}}^{\mathbf{T}}{(\mathbf{H}{\mathbf{P}}_{n}^{-}{\mathbf{H}}^{\mathbf{T}}+\mathbf{Q})}^{-1},$$
    (12)
    $${\widehat{\mathbf{r}}}_{n}={\widehat{\mathbf{r}}}_{n}^{-}+{\mathbf{K}}_{n}\left({\mathbf{z}}_{n}-\mathbf{H}{\widehat{\mathbf{r}}}_{n}^{-}\right)\boldsymbol{ },$$
    (13)
    $${\mathbf{P}}_{n}=\left(\mathbf{I}-{\mathbf{K}}_{n}\mathbf{H}\right){\mathbf{P}}_{n}^{-}.$$
    (14)

    The previous equations represent a single iteration, where our kinematics parameters are being decoded for a time-window of 100 ms.

Decoding methodology

In our study, we propose to decode our three parameters, θ, X and Y using a multi-Kalman filter approach. In this method, we construct two Kalman filters for decoding the three parameters. A cross-validation process is first performed on all data sets of each subject to decide which parameters combination is the most suitable. In this process, 20% of data were randomly selected to investigate which parameters combination results in better decoding performance. This data was then added to the training data, and used again as part of training data. Accordingly, for each subject, three Kalman filters are constructed in the validation step to test each pair of combinations. The two filters with the best combination results are then used in the decoding process. Figure 13 shows a graphical illustration of the cross-validation process, where we start with testing combinations (θ, X), , Y) and (X, Y). We then investigate the decoding accuracy for each parameter and use the combination that results in the best performance for each parameter.

Fig. 13
figure 13

a Block diagram illustrating the cross-validation process for each subject to find the best decoding parameters combination. b Block diagram that shows the entire parameter combination decoding approach

To compare, we also attempted to decode the three parameters using a single Kalman filter, where we use only one Kalman filter to decode all three parameters θ, X, Y using the measurement EMG zn. We also examined a three Kalman filter approach, where we construct a separate Kalman filter for each parameter to decode separately. Figure 14 shows a block diagram illustrating the steps of each of these two approaches.

Fig. 14
figure 14

Block diagram showing a single and b three Kalman filters approaches

Performance evaluation

The correlation coefficient (CC) between the predicted movement and the actual movement is used as a performance measure metric given the linear relationship between the actual and predicted variables (see Additional file 1: Figs. S6 and S7), where the CC is estimated using Pearson’s formula [40]:

$$\mathrm{CC}=\frac{M\sum ab-(\sum a)(\sum b)}{\sqrt{\left[M\sum {a}^{2}-{(\sum a)}^{2}\right][M\sum {b}^{2}-{(\sum b)}^{2}]}}$$
(15)

where M is the number of samples, and a and b are the corresponding signals that we are testing their relation to each other (the actual and decoded kinematic movement parameters). In addition, root-mean-square error (RMSE) and normalized RMSE (NRMSE) were used:

$$\mathrm{RMSE}=\sqrt{\frac{{\sum }_{i=1}^{n}{(a-b)}^{2}}{N}}$$
(16)
$$\mathrm{NRMSE}=\frac{\mathrm{RMSE}}{\mathrm{max}\left(a\right)-\mathrm{min}(a)}$$
(17)

where N is the number of data samples.

Availability of data and materials

The data sets used and/or analysed during the current study are available from the corresponding author on reasonable request.

References

  1. Carey SL, Lura DJ, Highsmith MJ. Differences in myoelectric and body-powered upper-limb prostheses: Systematic literature review. J Rehab Res Develop. 2015;52:3.

    Article  Google Scholar 

  2. Biddiss EA, Chau TT. Upper limb prosthesis use and abandonment: a survey of the last 25 years. Prosthet Orthot Int. 2007;31(3):236–57.

    Article  Google Scholar 

  3. Carey SL, Stevens PM, Highsmith MJ. Differences in myoelectric and body-powered upper-limb prostheses: systematic literature review update 2013–2016. J Prosthet Orthot. 2017;29:P17–20.

    Article  Google Scholar 

  4. Childress DS. Historical aspects of powered limb prostheses. Clin Prosthet Orthot. 1985;9(1):2–13.

    Google Scholar 

  5. Farina D, Jiang N, Rehbaum H, Holobar A, Graimann B, Dietl H, Aszmann OC. The extraction of neural information from the surface EMG for the control of upper-limb prostheses: emerging avenues and challenges. IEEE Trans Neural Syst Rehabil Eng. 2014;22(4):797–809.

    Article  Google Scholar 

  6. Bi L, Guan C. A review on EMG-based motor intention prediction of continuous human upper limb motion for human-robot collaboration. Biomed Signal Process Control. 2019;51:113–27.

    Article  Google Scholar 

  7. Lee SW, Wilson KM, Lock BA, Kamper DG. Subject-specific myoelectric pattern classification of functional hand movements for stroke survivors. IEEE Trans Neural Syst Rehabil Eng. 2011;19(5):558–66.

    Article  Google Scholar 

  8. Chu J-U, Moon I, Mun M-S. A real-time EMG pattern recognition system based on linear-nonlinear feature projection for a multifunction myoelectric hand. IEEE Trans Biomed Eng. 2006;53(11):2232–9.

    Article  Google Scholar 

  9. Hahne JM, Schweisfurth MA, Koppe M, Farina D. Simultaneous control of multiple functions of bionic hand prostheses: Performance and robustness in end users. Sci Robotics. 2018;3(19):e3630.

    Article  Google Scholar 

  10. Roche AD, Lakey B, Mendez I, Vujaklija I, Farina D, Aszmann OC. Clinical perspectives in upper limb prostheses: an update. Curr Surg Rep. 2019;7(3):5.

    Article  Google Scholar 

  11. Sarasola-Sanz A, Irastorza-Landa N, Shiman F, López-Larraz E, Spüler M, Birbaumer N, Ramos-Murguialday A. EMG-based multi-joint kinematics decoding for robot-aided rehabilitation therapies. In: Rehabilitation Robotics (ICORR), 2015 IEEE International Conference on. IEEE; 2015. p. 229–234.

  12. Micera S, Carpaneto J, Raspopovic S. Control of hand prostheses using peripheral information. IEEE Rev Biomed Eng. 2010;3:48–68.

    Article  Google Scholar 

  13. Chan Y, Hu A, Plant J. A Kalman filter based tracking scheme with input estimation. IEEE Trans Aerosp Electron Syst. 1979;2:237–44.

    Article  Google Scholar 

  14. Singer RA. Estimating optimal tracking filter performance for manned maneuvering targets. IEEE Trans Aerosp Electron Syst. 1970;4:473–83.

    Article  Google Scholar 

  15. Jang J-SR. Fuzzy Modeling Using Generalized Neural Networks and Kalman Filter Algorithm. AAAI 1991; 91:762–767.

  16. Matthies L, Kanade T, Szeliski R. Kalman filter-based algorithms for estimating depth from image sequences. Int J Comput Vision. 1989;3(3):209–38.

    Article  Google Scholar 

  17. Wu W, Black MJ, Mumford D, Gao Y, Bienenstock E, Donoghue JP. Modeling and decoding motor cortical activity using a switching Kalman filter. IEEE Trans Biomed Eng. 2004;51(6):933–42.

    Article  Google Scholar 

  18. Wu W, Black M, Gao Y, Bienenstock E, Serruya M, Donoghue J: Inferring hand motion from multi-cell recordings in motor cortex using a Kalman filter. In: SAB’02-workshop on motor control in humans and robots: On the interplay of real brains and artificial devices; 2002. p. 66–73.

  19. George JA, Davis TS, Brinton MR, Clark GA. Intuitive neuromyoelectric control of a dexterous bionic arm using a modified Kalman filter. J Neurosci Methods. 2020;330: 108462.

    Article  Google Scholar 

  20. Nakagome S, Luu TP, Brantley JA, Contreras-Vidal JL. Prediction of EMG envelopes of multiple terrains over-ground walking from EEG signals using an unscented Kalman filter. In 2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC). IEEE; 2017. p. 3175–8.

  21. Loconsole C, Dettori S, Frisoli A, Avizzano CA, Bergamasco M: An EMG-based approach for on-line predicted torque control in robotic-assisted rehabilitation. In,. IEEE Haptics Symposium (HAPTICS). IEEE. 2014;2014:181–6.

    Google Scholar 

  22. Natsakis T, Busoniu L. EMG based prediction of upper limb intention of motion using a combination of non-linear auto-regressive models.

  23. Kapelner T, Vujaklija I, Jiang N, Negro F, Aszmann OC, Principe J, Farina D. Predicting wrist kinematics from motor unit discharge timings for the control of active prostheses. J Neuroeng Rehabil. 2019;16(1):47.

    Article  Google Scholar 

  24. Welch G, Bishop G. An introduction to the Kalman filter. 1995.

  25. Bishop G, Welch G. An introduction to the Kalman filter. Proc of SIGGRAPH, Course. 2001;8(27599–23175):41.

    Google Scholar 

  26. Li Q, Li R, Ji K, Dai W. Kalman filter and its application. In: 2015 8th International Conference on Intelligent Networks and Intelligent Systems (ICINIS). IEEE; 2015. p. 74–7.

  27. Wu W, Gao Y, Bienenstock E, Donoghue JP, Black MJ. Bayesian population decoding of motor cortical activity using a Kalman filter. Neural Comput. 2006;18(1):80–118.

    Article  MathSciNet  MATH  Google Scholar 

  28. Wu W, Black M, Gao Y, Bienenstock E, Serruya M, Donoghue J. Inferring hand motion from multi-cell recordings in motor cortex using a Kalman filter. In: SAB’02-workshop on motor control in humans and robots: On the interplay of real brains and artificial devices. 2002. p. 66–73.

  29. Zhang Y, Chen B, Yu L, Ho DW. Distributed Kalman filtering for interconnected dynamic systems. IEEE Transactions on Cybernetics; 2021.

  30. Linear Dynamic Systems. In: Kalman Filtering. 2002. p. 25–55.

  31. Khan R, Khan SU, Khan S, Khan MUA. Localization performance evaluation of extended Kalman filter in wireless sensors network. Procedia Computer Sci. 2014;32:117–24.

    Article  Google Scholar 

  32. Amrutha N, Arul V. A Review on Noises in EMG Signal and its Removal. Int J Sci Res Publ. 2017;7:23–7.

    Google Scholar 

  33. Rutan SC. Adaptive kalman filtering. Anal Chem. 1991;63(22):1103A-1109A.

    Article  Google Scholar 

  34. Li Z, O’Doherty JE, Hanson TL, Lebedev MA, Henriquez CS, Nicolelis MA. Unscented Kalman filter for brain-machine interfaces. PLoS ONE. 2009;4(7): e6243.

    Article  Google Scholar 

  35. Ghapanchizadeh H, Ahmad SA, Ishak AJ: Recommended surface EMG electrode position for wrist extension and flexion. In,. IEEE Student Symposium in Biomedical Engineering & Sciences (ISSBES). IEEE. 2015;2015:108–12.

    Google Scholar 

  36. Konrad P. The abc of emg. A practical introduction to kinesiological electromyography. 2005;2005(1):30–5.

    Google Scholar 

  37. Noraxon TeleMyo 2400T User Manual. https://www.manualslib.com/manual/828960/Noraxon-Telemyo-2400t-V2.html?page=3#manual.

  38. Santos AB, Soares DP, Candotti CT. Smoothing EMG signals: Implications on delay calculation. RPCD. 2012;12(1):60–72.

    Article  Google Scholar 

  39. Merletti R, Parker PJ. Electromyography: physiology, engineering, and non-invasive applications. New York: Wiley; 2004.

    Book  Google Scholar 

  40. Mukaka MM. A guide to appropriate use of correlation coefficient in medical research. Malawi Med J. 2012;24(3):69–71.

    Google Scholar 

Download references

Acknowledgements

Not applicable.

Funding

This work was supported by Deutscher Akademischer Austauschdienst (DAAD) German Egyptian Research short term scholarship (GERSS) application number 57237401.

Author information

Authors and Affiliations

Authors

Contributions

HE, JA, RR and KH conceived and designed the experiments. HE performed the experiments. HE and SE analyzed the data. HE and SE wrote the paper. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Seif Eldawlatly.

Ethics declarations

Ethics approval and consent to participate

All procedures performed in this study were in accordance with the ethical standards of medical ethics committee of the Medical Association of Saarland, Germany (127/18) and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Additional file 1.

Supplementary Performance Analysis and Comparison

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

ElMohandes, H., Eldawlatly, S., Audí, J.M.C. et al. A multi-Kalman filter-based approach for decoding arm kinematics from EMG recordings. BioMed Eng OnLine 21, 60 (2022). https://doi.org/10.1186/s12938-022-01030-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s12938-022-01030-6

Keywords