WorksComputer Science
Feature extraction for LSTM-based finger-joint angle estimation from sEMG
Abstract
Continuous estimation of finger-joint angles from surface electromyography (sEMG) is a promising approach for controlling dexterous myoelectric prostheses. Deep time series models have been applied successfully in this context, typically relying on feature extraction rather than raw signals, given limited subject-specific data. Various time-domain and frequency-domain features can be used, extracted for a given window and step size. This study systematically investigates these three design choices for Long Short-Term Memory (LSTM) regression on the Ninapro DB2 dataset. Window sizes from 300 to 1200 ms and step sizes from 10 to 100 ms were evaluated in combination with six time- and frequency-domain features. Models were evaluated using regression performance metrics, inference time, and memory footprint to assess feasibility on embedded microcontroller hardware suitable for a prosthetic device. A 300 ms window with a 100 ms step, paired with either the Mean Absolute Value (MAV) or Root Mean Squared (RMS) feature, yielded the best performance (test PCC of 0.779 +/- 0.080 / 0.779 +/- 0.085). Window size, step size, and feature choice were found to interact non-trivially: jointly tuning them can improve both accuracy and computational feasibility for real-time, embedded myoelectric control.
Introduction
Smart prosthetics are able to translate human intention into movement. Such devices rely on electronic components and control systems for actuation, rather than being purely mechanical in nature. For a natural interactive interface and intuitive prosthetic control, an efficient Human Machine Interface (HMI) system is required [8, 11], one that reacts to human intentions quickly and accurately, without placing new physical or mental burdens on the amputee [8, 33]. A practical smart prosthesis control system should therefore have a quick response time, both to reduce perceived lag and to make the prosthesis feel more intuitive to use.
Many smart prostheses, especially those for upper-limb amputees, make use of electromyography (EMG) signals to interpret human intention. These signals are electrical in nature, generated by neuromuscular activity during muscle contraction. EMG signals are widely used in clinical diagnosis, rehabilitation of motor disability, and biomedical applications [9]. EMG sensors are broadly classified into two categories: invasive, using wires inserted beneath the skin and fat to contact muscle directly, and non-invasive, using electrodes placed on the skin’s surface. In the field of wearable electronics and prostheses, there has been minimal interest in the use of invasive EMG electrodes. Even though they have excellent spatial selectivity (i.e., demonstrate robustness against cross-talk) and deliver high-quality data, they are invasive and require a specialist to place them [7].
Non-invasive electrodes have gained popularity because they are more comfortable to wear and easy to use [7, 15]. Among these, direct contact electrodes, compared to gel electrodes, have no removable parts and a very low maintenance cost, making them the ideal choice [15]. Surface electromyography (sEMG) signals, captured by non-such invasive electrodes, are widely used for HMI control as they provide abundant information about the subject’s movement intentions [11]. The main advantages of sEMG signals over other bio-signals, such as eye movement, are ease of capture and lower data dimensionality [5, 29]. Due to these advantages, sEMG has been applied in various ways, including wheelchair control [21], stroke rehabilitation [1, 22], classification of hand movements [18, 27], and estimation of hand grasping ability [23, 25].
There is an abundance of research on classification of gestures; however in recent years the focus has been slowly shifting towards regression of joint angles to better accommodate amputees. When it comes to prosthetic control, classification systems restrict the user to a limited set of movements (for example, three programmable motions: grasping, pinching, and wrist rotation) and lack continuous and natural gesture movement [16, 20]. In contrast, regression systems enable the smooth, synchronous movement required for daily activities by estimating joint angles in the hand and wrist and allowing the prosthetic to move accordingly [16, 20].
To predict these angles, sEMG signals can be seen as sequences of values, making Recurrent Neural Networks (RNNs) well suited to processing them [14]. One such model often used is the Long Short-Term Memory (LSTM) model [2, 16, 19], originally proposed by Hochreiter and Schmidhuber [17]. This model makes use of gates and internal recursion to dynamically control the time scale [14]. Other architectures that have also been employed for the task of finger angle regression include Temporal Convolutional Networks (TCNs) [8] and Convolutional Neural Network (CNN)-attention models [28, 12].
The input to these models is rarely the raw sEMG data, but rather extracted features [11, 27, 28]. In this context, various Time Domain (TD), Frequency Domain (FD), and joint Time-Frequency Domain (TFD) features have been in vestigated [18, 27]. Feature extraction relies on a window and a step size. The window defines a contiguous block of data points, typically specified as a time duration or number of samples, from which a feature is extracted. The step size determines how far the window moves along the time axis between extractions, with overlapping windows resulting when the step is smaller than the window. Together, the window size determines how much data is summarised into each feature, and the step size determines the rate at which features are supplied to the model; both have been shown to affect model performance [2, 4].
The window and step size also directly affect the response time of the prosthesis. The window size determines the initial latency before sufficient data has been acquired to generate the first prediction, whereas all subsequent predictions are delayed only by the step size. Farrell and Weir [10] found myoelectric prosthesis performance degrades noticeably when the controller delay exceeds approximately 100–125 ms. For all predictions after the first, the controller delay is the sum of the step size, feature extraction, inference, and prosthesis actuation time. This total should therefore not exceed 125 ms, the upper end of this range. We select a maximum step size of 100 ms, which leaves 25 ms for the remaining three components. The system should have a low memory footprint, allowing a wider range of microcontroller units (MCUs) to be viable for the prosthesis implementation and reducing overall cost. This means smaller model architectures and features with a lower memory requirements are favoured in this work.
This work builds on that of Long et al. [24], whose focus was on improving, via transfer learning, the accuracy of a multi-subject model when applied to an individual subject. To do this, they used a group of baseline models, including an LSTM, alongside their own LSTM aggregation module with multi-scale convolution (LSTA-conv). Their work began with single-subject models and systematically progressed towards multi-subject models.
This work adopts the LSTM architecture for several reasons. As introduced earlier, sEMG signals are naturally represented as sequences, and the LSTM’s gating mechanism is well suited to modelling such temporal dependencies [14]. The architecture is also comparatively simple to implement and has been widely adopted for finger-joint angle regression from sEMG, including on the NinaPro dataset used in this work [16, 2, 19, 24], providing a well-established point of comparison. Finally, LSTMs are generally considered more lightweight than more recent attention- or convolution-augmented alternatives [28, 12, 8], making them better suited to the low memory footprint required for embedded, real-time deployment on a prosthetic device.
Related studies employ a range of feature extraction techniques, and some report model training time [2, 4, 16, 24], a metric with little bearing on a deployed prosthesis, since training is completed prior to deployment. Model inference time, which directly affects real-time performance, is reported far less consistently. Similarly, very little information is given in regards to Hyperparameter (HP) tuning [2, 4, 16, 24]. HP tuning is the process of incrementally improving the performance of a model by altering its HPs after most of the essential data cleaning, model design, and training configurations have been completed [13].
We consider LSTM modelling of sEMG for finger-joint angle regression and examine the implications of different window sizes, step sizes, and features. Our contributions are as follows:
We investigate the feasibility of using various feature types and extraction parameters (window size, step size, and feature type) in an embedded systems environment with a strict controller delay constraint.
We analyse the impact of various combinations of window sizes, step sizes, and features on model performance.
We demonstrate the importance of a strict validation protocol and consistent HP tuning for reliable analysis.
Methods and Approach
This section introduces the task in more detail, and describes the experimental approach followed. The dataset used, related performance metrics, and baseline results benchmarked against are described first, followed by the overall experimental approach, including subject selection, dataset pre-processing, and HP tuning protocols.
Dataset
The Non-Invasive Adaptive Hand Prosthetics (Ninapro) datasets [26] are publicly available multimodal databases aimed at fostering machine learning research on human, robotic, and prosthetic hands. Where kinematic information is included, subjects are recorded wearing a CyberGlove, a sensorised glove used to capture finger-joint angles, as in Figure 1. The figure shows 22 angle sensors, or strain gauges, with their placement indicated by the stitching in the glove. For this work, only the first two joints of each finger are predicted, matching the joints predicted by Long et al. [24].

Figure 1. NinaPro CyberGlove II with angle sensors indicated [26].
Of the NinaPro collection of databases, DB2 is of particular interest to this study and is summarised in Table 1. The database comprises 40 subjects, 29 male and 11 female and uses Delsys Trigno Wireless equipment, with 12 channels, a 20 to 450 Hz bandpass filter, and a 2 kHz sampling frequency at 16 bits. The exercises are labelled B, C, and D, corresponding to basic finger movements, grasping and functional movements, and force patterns. Exercises B and C contain between 12 and 23 hand gestures, where each gesture is repeated six times per subject. Consistent with Long et al. [24], this work focuses on exercise C, specifically on the six gestures numbered 1, 2, 5, 7, 10, and 20, which cover a range of grasping motions.
| Parameter | Value |
| Participants (male/female) | 40 (29/11) |
| Electrodes | 12 |
| EMG sensor | Delsys Trigno Wireless EMG system |
| Sampling frequency | 2 kHz |
| Exercises | B, C, D |
Table 1. NinaPro DB2 characteristics [26].
Performance Metrics
Three complementary regression performance metrics are used in this work: coefficient of determination (), Pearson Correlation Coefficient (PCC), and Root
Mean Square Error (RMSE). The assesses the ability of a model to predict or explain the outcome in a linear regression setting, indicating the proportion of the variance in the output variable that is predicted or explained by the predictor variable [31]. The PCC measures the direction and strength of linear association between two variables. PCC values range from -1 to 1, with 1 indicating a positive linear relationship, -1 a negative linear relationship, and 0 meaning there is no linear correlation between the variables. The RMSE measures the average magnitude of the error between predicted and true values, in the same units as the target variable. Additional performance metric detail is provided in Appendix § 7.§ 1.
Benchmarking
The test results reported by Long et al. [24] for their baseline, single-subject LSTM model, alongside their main contribution (LSTA-conv), are shown in Table 6. We duplicate the architecture and setup of the baseline LSTM of Long et al. [24] as far as possible. Differences between our baseline and that of Long et al. [24] include possible differences in HP and architectural choices where specifics were not provided. In addition, data pre-processing was adapted (discussed in § 2.5). The authors also used a static window size (1000 ms), step size (50 ms), and a single feature (Root Mean Squared (RMS)) – factors that this work will investigate.
Table 6: Summary of model test and validation performance. The number of subjects (S) and the HP tuning protocol (HHP) is noted along with the four performance metrics, loss, , PCC, and RMSE. The best validation and test (for 12 subjects) performance is written in boldface, together with all values that lie within one standard error of the best value.
| Work | S - HPP | Loss | PCC | RMSE | |
| Test (35) | |||||
| Long et al. baseline | 35 - | - | 0.632 ± 0.030 | 0.749 ± 0.017 | 9.666 ± 0.305 |
| Long et al. LSTA-conv | 35 - | - | 0.727 ± 0.041 | 0.825 ± 0.015 | 7.926 ± 0.325 |
| Test (12) | |||||
| Phase 1 Baseline | 12 - B | 218.775 ± 91.774 | 0.389 ± 0.220 | 0.693 ± 0.112 | 13.868 ± 2.844 |
| Phase 5 MAV | 12 - B | 168.550 ± 70.535 | 0.544 ± 0.183 | 0.779 ± 0.080 | 12.181 ± 2.568 |
| Phase 5 RMS | 12 - B | 167.512 ± 72.967 | 0.540 ± 0.193 | 0.779 ± 0.085 | 12.112 ± 2.600 |
| Validation | |||||
| Phase 1 Replication | 35 - | 144.411 ± 51.992 | 0.537 ± 0.163 | 0.766 ± 0.097 | 11.459 ± 2.038 |
| Phase 1 Baseline | 35 - B | 94.840 ± 43.653 | 0.689 ± 0.117 | 0.848 ± 0.066 | 9.213 ± 2.005 |
| Phase 2 Baseline | 6 - A | 122.855 ± 80.398 | 0.632 ± 0.142 | 0.817 ± 0.069 | 10.264 ± 3.389 |
| Phase 4 MAV | 6 - A | 89.007 ± 53.236 | 0.749 ± 0.096 | 0.879 ± 0.049 | 8.733 ± 2.712 |
| Phase 4 RMS | 6 - A | 93.288 ± 61.610 | 0.743 ± 0.108 | 0.878 ± 0.050 | 8.880 ± 3.010 |
| Phase 5 MAV | 12 - B | 78.893 ± 44.872 | 0.768 ± 0.089 | 0.890 ± 0.043 | 8.291 ± 2.320 |
| Phase 5 RMS | 12 - B | 84.324 ± 48.175 | 0.761 ± 0.097 | 0.888 ± 0.047 | 8.555 ± 2.377 |
Table 6. Summary of model test and validation performance.
A final difference relates to how the dataset was partitioned, as this work uses a training, validation and test set while Long et al. [24] only used a training and test set. In both cases, datasets were partitioned based on gesture repetitions, with Long et al. [24] using a 4/2 training/test split, while this work uses a 4/1/1 training/validation/test split. Due to the mentioned differences, the works are not directly comparable, but the results from Long et al. [24] remain a useful point of reference.
Experimental Approach
This study consists of five distinct phases:
Benchmarking: Replication of the baseline system, and review of the data pre-processing choices described in § 2.5.
Subject Selection: A smaller set of subjects is selected for experimentation. With single-subject models, each subject requires its own HP tuning process, which quickly becomes prohibitively expensive but cannot be omitted, as results were found to be sensitive to HP tuning. The number of subjects is therefore decreased rather than reducing HP tuning. This process is described in § 3.2.
Exploring Window and Step Sizes: For the selected subjects, five initial window sizes are investigated: 300, 550, 800, 1000, 1200 ms, and three step sizes: 10, 50, 100 ms. The smallest window size is limited to 300 ms since model predictions become increasingly noisy with smaller window sizes, seen from previous experiments. The largest window is selected as 1200 ms since a larger window reduces the number of sample points and the dataset is already limited in size. At this stage, the RMS feature is extracted from each window, matching the pre-processing method used by Long et al. [24]
The step sizes are chosen to bracket the value used by Long et al. [24] (50 ms), including both a smaller (10 ms) and a larger (100 ms) option. The context of this work is for a prosthetic control system that has a minimum actuation delay of 10 ms, therefore predictions arriving faster than 10 ms would arrive before the system has time to act on them, leaving some predictions unused. Thus smaller step sizes are not considered. The largest step size is selected as 100 ms to respect the controller delay constraint of the prosthesis. Since the prosthesis has a maximum acceptable controller delay of 125 ms, and 100 ms is allocated to data acquisition, this leaves 25 ms for pre-processing, inference, and actuation.
Feature Analysis: In this phase, six features are investigated, three from the Time Domain (TD) and three from the Frequency Domain (FD): RMS, Mean Absolute Value (MAV), Variance (VAR), Mean Frequency (MNF), Median Frequency (MDF), and Mean Power (MNP). Their equations are included in Appendix § 7.§ 2. A substantially larger set of sEMG features has been documented in the literature [30]. The six features used here were selected from this broader set for their relative simplicity of computation and their established use in related sEMG-based finger-joint angle regression work [2, 4, 24, 28]. They are first tested for suitability for deployment on an embedded system, based on their computational and memory complexity. Then, the top three window-step size combinations are used in conjunction with the suitable features, to determine the best three-way combination.
Extended Evaluation: In the final phase, six more subjects are added to the existing six (as described in § 3.2) and the two best-performing (based on validation metrics) features, with their respective window-step combinations, are tuned using a more extensive HP tuning protocol (protocol B as described in § 2.6) to confirm results.
Dataset Pre-processing
Atzori et al. [3] performed three pre-processing steps on the Ninapro DB2 that are included in the publicly available dataset. Firstly, synchronising: the different streams (sEMG, angle, accelerometer etc.) were upsampled to 2 kHz using linear interpolation for real-valued streams or nearest-neighbours for discrete valued streams. Secondly, relabelling: by realigning the stimuli data with the streams to account for human reaction time and experimental conditions. Thirdly, filtering: the sEMG data was filtered to remove 50 Hz (and harmonics) Power Line Interference (PLI), using a Hampel filter.
The sEMG data is further processed in three additional steps based on the pre-processing procedure described by Long et al. [24]. First, it is filtered using a fourth-order, 5–450 Hz bandpass filter with a 50 Hz notch filter, to remove noise and PLI (in addition to the processing described earlier). The bandpass filtering is partially redundant, as the Delsys hardware already applies a bandpass filter with a 20 to 450 Hz range. Second, the finger-angle data is smoothed using a second-order low-pass filter with a cut-off frequency of 1 Hz. Third, the extracted features are normalised. In contrast to Long et al. [24], -law scaling is not applied and min-max normalisation is replaced by z-normalisation, as both these factors were shown to improve results, in a separate set of experiments. For reference, results are included in Appendix § 9.
HP Tuning
The HP tuning process requires three datasets: a training set to fit the parameters, a validation set to measure the impact of selected HPs, and a test set to verify the performance of the best-tuned model [13]. Ultimately, the goal of HP tuning is to reduce the expected error on unseen data.
Table 2 describes the two HP tuning protocols used in this work. The left side of the table outlines the first tuning protocol, Protocol A, a computationally light method used in Phases 3 and 4, to maximise model performance while limiting tuning time. Protocol A tunes the learning rate, dropout and model width over 30 sweeps, applied separately to each subject. The right side of the table outlines the second tuning protocol, B, applied in Phases 1, 2 and 5 to determine a baseline model performance, confirm results and establish the best possible performance for the chosen window-step-feature configuration. Unlike Protocol A, Protocol B also tunes weight decay and batch size, over 60 sweeps rather than 30. Table 3 lists the static HPs used for the LSTM model under Protocol A; all other HPs are held constant, except the extracted feature (variable in Phase 4) and weight decay and batch size (tunable in Phases 1, 2, and 5). The input chunk includes six past samples plus the current sample; the output chunk predicts only the current timestep.
Implementation
All experiments were implemented using the KnowIt codebase [32], which is designed for building and interpreting artificial neural networks that perform time series modelling. Hyperparameter sweeps, as described in § 2.6, were managed and tracked using Weights & Biases [6].
| Parameter | Value | Parameter | Value |
| Stacked models | 5 | Task | Regression |
| Number of inputs | 12 channels | Stateful-ness | Stateless |
| Number of outputs | 10 finger angles | Loss function | MSE |
| Maximum epochs | 200 | Extracted feature | RMS |
| Batch size | 64 | Optimiser | Adam |
| Weight decay | Layernorm | True | |
| Input chunk | [-6, 0] | Residual connections | True |
| Output chunk | [0, 0] | Learning rate scheduler | Reduce on plateau, delta: 0.5, patience: 10, threshold: 20 |
Table 3. Static HPs for the LSTM model under Protocol A. Extracted feature, weight decay, and batch size vary under Protocol B (see Table 2).
| Parameter | Protocol A: Search Space | Protocol A: Distribution | Protocol B: Search Space | Protocol B: Distribution |
| Dropout | [0.0, 0.1, 0.2, 0.3] | – | [0.0, 0.1, 0.2, 0.3] | – |
| Learning rate | , | Log-normal | , | Log-normal |
| Width | [64, 256] | – | [64, 256] | – |
| Weight decay | – | – | , | Log-normal |
| Batch size | – | – | [4, 64, 1024] | – |
Table 2. HPs and corresponding search spaces for HP tuning Protocols A and B.
Results
Results are presented per phase, for each of the five phases described in § 2.4.
Benchmarking
This subsection has two aims: to replicate the baseline LSTM of Long et al. [24], estimating unclear HPs given the differences outlined in § 2.3; and to determine the best achievable LSTM performance on NinaPro DB2 [26], through systematic pre-processing changes and Protocol B tuning across all 35 subjects. Table 6 records validation results without HP tuning (Phase 1 Replication) and with adjusted pre-processing plus Protocol B tuning (Phase 1 Baseline). Replication matched Long et al.’s [24] results to a satisfactory, if imprecise, degree, given the differences between the two works; adjusted pre-processing and Protocol B tuning surpassed Long et al. [24] on and PCC, though not on RMSE.
Subject Selection
Of the 40 subjects in DB2, 35 were used for benchmarking, matching Long et al.’s [24] criterion of including only right-handed subjects. Due to the significant HP tuning time required per subject (§ 3.1), this group is reduced to six for subsequent experiments: subjects are ranked from worst to best by validation loss, and two poorly-performing (6, 40), two average-performing (20, 39), and two well-performing (9, 17) subjects are selected, ensuring the group is broadly representative of the full 35-subject dataset. Table 6 reports the average validation performance of these six subjects using adjusted pre-processing and HP tuning (Phase 2 Baseline); performance falls between the other two conditions, better than the unmodified replication, but worse than with Protocol B, nearly matching the results of Long et al. [24].
Exploring Window and Step Sizes
Performance: Figure 2 shows the validation performance across all 15 window-step combinations, with dark blue indicating better performance; each block also shows the mean and standard deviation. Smaller window and step sizes generally perform best. While the 300 ms window seem to have different behaviour (best performance at 100 ms step size) this difference falls within the standard error interval. Based on all of the metrics, the top three combinations are 0.3-0.1, 0.55-0.01, and 0.8-0.01.

Figure 2. Performance of window and step size combinations, using the RMS feature, evaluated on the validation set. For all graphs, darker blue indicates better performance and darker red indicates worse performance.
Each of the four metrics identifies the same ranking of window-step combinations as best- and worst-performing, which is expected given that , PCC, and RMSE each capture overlapping aspects of fit quality on the same predictions, and PCC both reflect how well the model’s predictions track the structure of the target, while RMSE captures the magnitude of residual error. Although the four metrics agree on relative ranking, they are not redundant: PCC confirms the model correctly follows the directional trend of the target even where its absolute scale is off, confirms the predictions are neither flat (underfitting) nor erratic (overfitting) relative to the target’s variance, and RMSE confirms the magnitude of the remaining error is small in absolute terms. The consistent agreement across all four metrics indicates that the identification of the best-performing window-step combinations are not due to an artefact of one metric’s particular sensitivity.
Assessment of Subject Selection: To assess whether the subject selection in § 3.2 was representative, Figure 3a summarises the performance of each subject over all 15 experiments. The graph’s y-axis indicates the validation loss, while the x-axis groups datasets by rank: for each experiment, the six subjects’ datasets are ordered from worst to best performing (based on validation loss) and assigned to positions 1 (best) through 6 (worst). A given subject’s rank position may therefore vary from one experiment to another.

Figure 3. (a) Phase 3, 15 experiments. (b) Phase 4, 18 experiments.
Fig. 3: Subject-specific performance per experiment, with the average and standard deviation of validation loss calculated across all experiments. The x-axis ranks the subjects in order of performance for each experiment, with the worst-performing subject plotted on the left (position 6) and the best-performing subject to the right (position 1).
Each subject is indicated by a distinct colour; ideally, the two poorest-performing subjects (40, 6) would only appear in the leftmost positions (5, 6), and the two best-performing (9, 17) only in the rightmost (1, 2), matching their designations in § 3.2. In the figure, each pair remains within its designated group, suggesting that window and step size affect all performance groups similarly and confirming the six subjects as representative of the broader 35-subject group.
Latency: Figure 4 summarises timing metrics for each window-step combination, including RMS feature extraction time, inference time, and total time. Five combinations, 0.55-0.05, 0.55-0.1, 0.8-0.05, 0.3-0.05, and 0.8-0.1, extract the feature noticeably faster than the rest, in under 0.7 ms; the remaining combinations take 1.8–1.9 ms. Inference times mostly fall between 1.8 and 2.5 ms. The quickest total time is 2.4 ms (0.55-0.05), and the slowest is 4.44 ms (1.0-0.05), both comfortably within the 125 ms controller delay constraint (even at a step size of 100 ms), with the worst case contributing at most 5 ms (≈4% of the total delay constraint).

Figure 4. Timing information for each window-step combination, including feature extraction time, model inference time, and the sum of the two as the total time.
Feature Analysis
Computational Complexity: To determine which features from the time and frequency domains are viable options for an embedded system on a smart prosthesis, the theoretical and practical computational and memory complexity of each feature is analysed. Table 4 lists each feature’s theoretical computational and memory complexities, expressed using Big-O notation (based on how operations and memory scale with the window size ) and standard equations, given in Appendix § 7.§ 2. Features with computational or memory complexity beyond are considered high-risk for real-time deployment.
| Feature | Computational | Memory |
| RMS | ||
| MAV | ||
| VAR | ||
| MNF | ||
| MDF | ||
| MNP |
Table 4. Theoretical Big-O complexity characteristics for six time- and frequency-domain features.
The power spectrum was calculated using three different algorithms (Fast Fourier Transform (FFT), Periodogram, and Welch), over 10 windows of 1200 ms (2400 samples); the results are shown in Table 5. On average the periodogram calculated the spectrum the fastest and achieved the lowest standard deviation. Thus signal.periodogram will be used to calculate the power spectrum for the frequency features.
| Algorithm | Time [ms] |
| Fast Fourier Transform | 0.690 ± 0.163 |
| Periodogram | 0.580 ± 0.136 |
| Welch | 0.760 ± 0.172 |
Table 5. The average time taken to compute the power spectrum, required for frequency-domain features (MNF, MDF, MNP), using three different algorithms over a 1200 ms window.
Figure 5 shows the average time (left axis) versus window size for each feature, averaged over ten trials. As predicted by the theoretical analysis (Table 4), all features show a general increase in calculation time as window size increases. RMS and MAV take the most time to calculate, a little less than 1.4 ms at the worst. The rest of the features are calculated in less than a millisecond across all

Figure 5. (Left axis) Timing graph for each feature and window size, indicated by the solid lines. (Right axis) memory usage for time and frequency domain features over various window sizes, indicated by the dashed lines.
window sizes. The right-hand y-axis shows the memory usage of the FD and TD features on a logarithmic scale. The FD features require a maximum of 124,904 bytes (125 kB) at a window size of 1.2 s, while the TD remain constant at 192 bytes for every window size.
In terms of computational feasibility, none of the features required enough compute, theoretically or practically, to be disqualified from use on an MCU. Regarding memory, the largest requirement is 125 kB, and most MCUs today have 128 kB or more of Static Random Access Memory (SRAM), so it would not be difficult to find an MCU with sufficient memory for the FD calculations, model inference, and additional control systems.
Performance: Only the three best-performing (according to validation metrics) window-step combinations (0.3-0.1, 0.55-0.01, 0.8-0.01), and the six features confirmed feasible in § 3.4, are used in this investigation. Testing all window-step combinations against every feature was not computationally feasible, so only the top three combinations are carried forward.
Figure 6 shows the validation performance for each of the feature and window-step combinations. The time domain features tend to perform better than the frequency domain features. When considering the standard error interval for each of the metrics, the time domain features tend to produce comparable results. The absolute ordering of features from best to worse are MAV, RMS, MNP, VAR, MDF, MNF; with the top 3 results obtained with MAV with 0.3-0.1 window-step size, MAV with a 0.8-0.01 window-step combination, and RMS with a 0.3-0.1 window-step combination. With the relatively large standard error, we do not consider the ordering statistically significant. The top three combinations outperforming MDF and MNF was statistically significant.

Figure 6. (a) Loss, lower is better. (b) RMSE, lower is better. (c) PCC, higher is better. (d) R2, higher is better. Validation performance of window-step size and feature combinations. For all graphs darker blue indicates better performance.
As with Figure 2, all four metrics agree on the relative ranking of feature and window-step combinations, for the same reasons discussed above. This agreement is notable here specifically because, unlike the window-step comparison (which varies only the amount and rate of data supplied to the same feature), the feature comparison varies the underlying signal representation itself; consistent agreement across metrics therefore gives stronger confidence that the observed performance differences reflect genuine differences in feature quality, rather than a metric-specific artefact. The two best performing features, MAV and RMS, are recorded in Table 6 as Phase 4 RMS and Phase 4 MAV, respectively.
Assessment of Subject Selection: Figure 3b summarises the validation loss of individual subjects over all 18 experiments. In the figure, subjects 6 and 40 remain within their designated group (positions 5–6) throughout, but subjects 17 and 20 occasionally swap positions, 17 (normally 1–2) appearing at position 4, and 20 (normally 3–4) at position 2, for a few experiments. Subjects 39 and 9 remain within their groups throughout, with 9 never leaving position 1. This is more mixing than seen in the window-step experiment, indicating the six subjects are not wholly representative of the 35 when it comes to selecting features.
Latency Figure 7 shows the time it took for feature extraction, model inference and the total time between the two for each feature and window-step combination. The combination with the fastest feature extraction time is var-0.3-0.1, and the slowest feature extraction time is rms-0.8-0.01, confirming the results seen in § 3.4.

Figure 7. Extraction and inference time for each of the six features, at each of the three window-step combinations. Blue indicates feature extraction time, green indicates inference time, and red indicates the total time (the sum of the two).
The quickest inference times are var-0.3-0.1 and mdf-0.3-0.1, despite differing computational complexity ( vs ) and domain. The slowest are mnf-0.3-0.1 and rms-0.55-0.01 ms, an FD feature at the smallest window and a TD feature at a middle window size, suggesting inference is also independent of window size. This variation may instead be attributable to implementation-specific or hardware-level factors not captured by the complexity analysis, which are not investigated further here.
The longest time it took to extract a feature and inference is 4.4 ms (rms-0.55-0.01) while the shortest time is 2.0 ms (var-0.3-0.1). At most, the total time represents about 4% of the total 125 ms controller delay constraint, effectively negligible.
Extended Evaluation
The results are now reviewed with six additional subjects (numbers 3, 18, 23, 32, 33, and 37, selected from the same ranking as the original six), using HP tuning protocol B. Table 6 shows the average performance of the MAV (Phase 5 MAV) and RMS (Phase 5 RMS) features using a 300-100 window-step combination. Although MAV yielded better mean performance than RMS across all validation metrics, the differences were small relative to the standard error, indicating no meaningful distinction between the two features. The models using both the MAV and RMS feature outperformed the baseline LSTM of Long et al. [24] across all metrics. These models also outperformed the LSTM-conv of Long et al. [24] (a more complex architecture newly developed in [24]) in terms of both and PCC, though not for RMSE. The comparison with the results of Long et al. [24] was statistically significant. However, as noted in § 2.3, direct comparison should be made with caution given differences in dataset composition and preprocessing.
Test set performance for both MAV and RMS was closely matched, within a standard error of each other, though both scored notably lower than on the validation set. This gap in performance is possibly due to the limited amount of data in the dataset, where the choices based on the validation set tailored the model to a very small and not wholly representative set of data. Finally, we compare the test set performance of the two model sets (MAV and RMS) to their equivalent 12 subject baseline models from Phase 1 Baseline. We isolate the 12 selected subjects from the 35 baseline models to obtain a comparable baseline. As can be seen in Table 6, both sets of models achieved significantly better performance. This performance improvement is seen over all four metrics, with clear improvement in and PCC and smaller improvement in loss and RMSE. These results suggest that optimizing the window size, step size, and feature type improves performance.
Conclusion
This work systematically analysed different feature extraction options for an LSTM on the Ninapro DB2 dataset. Of the combinations evaluated, a window size of 300 ms, a step size of 100 ms, and both the MAV and RMS features yielded the best validation performance. On an unseen test set, these features obtained an average PCC of and , respectively.
Overall, time domain features as well as MNP tended to produce comparable results, but MNF and MDF performed worse. Adjusted pre-processing and consistent HP tuning also demonstrated gains, underscoring the importance of systematic tuning over modifying architectural complexity alone. Final models outperformed both the baseline LSTM and the LSTM-conv of Long et al. [24].
A small, carefully selected subset of subjects was used to represent a much larger subject pool for analysis. Evaluation during window and step size selection indicated that the pool remained representative of trends, though this representativeness weakened somewhat when evaluating different features. Note that window size, step size, and feature choices were optimised specifically for this dataset and task; should the downstream task or data characteristics change, these parameters, and potentially the feature itself, should be recalibrated rather than assumed to transfer directly. Feasibility testing showed that all window size, step size, and feature combinations could be deployed on an embedded system without exceeding the controller delay constraint of a smart prosthesis, with the best-performing combination contributing no more than a few milliseconds.
Future work could include more extensive HP tuning across all feature and window-step combinations, as well as investigating the use of combining features. Further investigation into the effect of smaller window sizes would also be valuable, since the general pattern (where the smallest step size performed best for a given window size) was reversed at the smallest window size (300 ms), where the largest step size performed best instead. This work could also be extended to multi-subject models, training on data from many subjects to create a generic finger-angle regressor, building on the direction taken by Long et al. [24], whose LSTA-conv model similarly aimed to generalise from multiple subjects to an individual user.
Finally, these results have proven useful in a sister project, in which a prosthetic hand is being constructed with an actuation delay of approximately of 10 ms, the time the physical actuation system itself takes to move the prosthesis. Adding the total feature extraction and inference time determined in this work (approximately 3 ms) gives a combined delay of approximately 13 ms from signal to actuation, well within the controller delay constraint established earlier, allowing much flexibility in selecting window and step sizes.
Acknowledgments
Acknowledgments. This work is based on research supported in part by the National Research Foundation of South Africa (Grant Reference Number: RDL240215206999) and SENTECH SOC Ltd. Opinions expressed and conclusions arrived at are those of the authors.
Disclosure of Interests
Disclosure of Interests. The authors have no competing interests to declare that are relevant to the content of this article.
Equations
Performance metrics
For a set of samples, let denote the target value and the model prediction for sample , with and their respective means.
The coefficient of determination is
the Pearson Correlation Coefficient is
and the Root Mean Square Error is
Features
For the time-domain features, let () be the sEMG samples in a window of samples, with mean :
For the frequency-domain features, let be the power spectrum value at frequency , for frequency bins (computed with the periodogram, § 3.4):
Training performance
| Work | S - HPP | Loss | PCC | RMSE | |
| Training | |||||
| Phase 1 Replication | 35 - | 11.526 ± 11.531 | 0.962 ± 0.043 | 0.982 ± 0.021 | 2.935 ± 1.530 |
| Phase 1 Baseline | 35 - B | 9.395 ± 7.535 | 0.973 ± 0.021 | 0.989 ± 0.008 | 2.735 ± 1.150 |
| Phase 2 Baseline | 6 - A | 9.434 ± 6.471 | 0.975 ± 0.018 | 0.990 ± 0.008 | 2.764 ± 1.180 |
| Phase 4 MAV | 6 - A | 13.380 ± 3.319 | 0.960 ± 0.015 | 0.983 ± 0.007 | 3.548 ± 0.428 |
| Phase 4 RMS | 6 - A | 12.286 ± 6.529 | 0.967 ± 0.011 | 0.985 ± 0.005 | 3.339 ± 0.847 |
| Phase 5 MAV | 12 - B | 11.066 ± 5.198 | 0.968 ± 0.019 | 0.986 ± 0.009 | 3.137 ± 0.723 |
| Phase 5 RMS | 12 - B | 10.242 ± 5.945 | 0.973 ± 0.007 | 0.988 ± 0.007 | 2.973 ± 0.940 |
Table 7. Model training performance in the same format as Table 6.
Min-max normalisation
We were unable to find a rationale for the normalisation used by Long et al. [24] in related literature. To verify how the reported normalisation compares with a simpler approach, an HP sweep using Protocol B was performed on the dataset of subject 20 (an average-performing subject, § 3.2). The best model found for each method is reported in Table 8. The -normalised model with -law scaling removed outperformed all models on all validation metrics. As this is a single-subject comparison, it is indicative rather than conclusive; -normalisation was nevertheless adopted instead of min-max normalisation, and -law scaling was removed for all subsequent experiments.
| Experiment | Loss | R2 | PCC | RMSE | Inference time | Epoch |
| Validation | ||||||
| Tuned Long et al. | 116.280 | 0.543 | 0.744 | 10.229 | 0.003 | 94 |
| + -norm | 91.499 | 0.642 | 0.806 | 9.104 | 0.002 | 25 |
| + -law removed | 80.466 | 0.689 | 0.840 | 8.514 | 0.002 | 126 |
| Training | ||||||
| Tuned Long et al. | 51.548 | 0.793 | 0.914 | 6.840 | 0.017 | 94 |
| + -norm | 43.906 | 0.792 | 0.894 | 6.457 | 0.016 | 25 |
| + -law removed | 3.378 | 0.985 | 0.993 | 1.765 | 0.015 | 126 |
Table 8. Performance when HP tuning the three pre-processing approaches: pre-processing method of Long et al. vs replacing min-max normalisation with -norm vs also removing -law scaling; result for subject 20, using protocol B.
References
- [1]Ambrosini, E., Gasperini, G., Zajc, J., Immick, N., Augsten, A., Rossini, M., Ballarati, R., Russold, M., Ferrante, S., Ferrigno, G., et al.: A robotic system with emg-triggered functional electrical stimulation for restoring arm functions in stroke survivors. Neurorehabilitation and Neural Repair 35(4), 334–345 (2021)
- [2]Anam, K., Avian, C., Swasono, D.I., Muttaqin, A.Z., Ismail, H.: Estimation of finger joint movement based on electromyography signal using long short-term memory. In: 2020 International Conference on Computer Engineering, Network, and Intelligent Multimedia (CENIM). pp. 86–90. IEEE (2020)DOI
- [3]Atzori, M., Gijsberts, A., Castellini, C., Caputo, B., Hager, A.G.M., Elsig, S., Giatsidis, G., Bassettо, F., Müller, H.: Electromyography data for non-invasive naturally-controlled robotic hand and prostheses. Scientific Data 1(1), 1–13 (2014)
- [4]Avian, C., Prakosa, S.W., Faisal, M., Leu, J.S.: Estimating finger joint angles on surface emg using manifold learning and long short-term memory with attention mechanism. Biomedical Signal Processing and Control 71, 103099 (2022)DOI
- [5]Bi, L., Guan, C., et al.: A review on emg-based motor intention prediction of continuous human upper limb motion for human-robot collaboration. Biomedical Signal Processing and Control 51, 113–127 (2019)DOI
- [6]Biewald, L.: Experiment tracking with weights and biases. https://www.wandb.com/ (2020), software available from wandb.com
- [7]Catacora, V.A., Guerrero, F.N., Spinelli, E.M.: Three-electrode double-differential biopotential amplifier for surface emg measurements. IEEE Transactions on Instrumentation and Measurement 72, 1–8 (2023)DOI
- [8]Chen, C., Guo, W., Ma, C., Yang, Y., Wang, Z., Lin, C.: semg-based continuous estimation of finger kinematics via large-scale temporal convolutional network. Applied Sciences 11(10), 4678 (2021)DOI
- [9]Criswell, E.: Cram’s Introduction to Surface Electromyography. Jones & Bartlett Publishers, Burlington, MA, 2 edn. (2010)
- [10]Farrell, T.R., Weir, R.F.: The optimal controller delay for myoelectric prostheses. IEEE Transactions on Neural Systems and Rehabilitation Engineering 15(1), 111–118 (2007)pubmed.ncbi.nlm.nih.gov/17436883
- [11]Gao, Z., Tang, R., Huang, Q., He, J.: A multi-dof prosthetic hand finger joint controller for wearable semg sensors by nonlinear autoregressive exogenous model. Sensors 21(8), 2576 (2021)DOI
- [12]Geng, Y., Yu, Z., Long, Y., Qin, L., Chen, Z., Li, Y., Guo, X., Li, G.: A cnn-attention network for continuous estimation of finger kinematics from surface electromyography. IEEE Robotics and Automation Letters 7(3), 6297–6304 (2022)DOI
- [13]Godbole, V., Dahl, G.E., Gilmer, J., Shallue, C.J., Nado, Z.: Deep learning tuning playbook (2023), version 1
- [14]Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning. MIT Press (2016)
- [15]Guerrero, F.N., Spinelli, E.M., Haberman, M.A.: Analysis and simple circuit design of double differential emg active electrode. IEEE Transactions on Biomedical Circuits and Systems 10(3), 787–795 (2015)DOI
- [16]Guo, W., Wang, C., Lin, C., Wang, C.: Long short term memory model based continuous estimation of human finger joint angles. In: 2019 IEEE International Conference on Real-time Computing and Robotics (RCAR). pp. 288–292. IEEE (2019)DOI
- [17]Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Computation 9(8), 1735–1780 (1997). https://doi.org/10.1162/neco.1997.9.8.1735
- [18]Hudgins, B., Parker, P., Scott, R.N.: A new strategy for multifunction myoelectric control. IEEE Transactions on Biomedical Engineering 40(1), 82–94 (1993)pubmed.ncbi.nlm.nih.gov/8468080
- [19]Ilyas, Z., Anam, K., Avian, C., Muttaqin, A., Ramadhan, M.E., et al.: Evaluation of gated-recurrent unit for estimating finger-joint angle using surface electromyography signal. In: 2022 9th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI). pp. 25–28. IEEE (2022)DOI
- [20]Koch, P., Dreier, M., Larsen, A., Parbs, T.J., Maass, M., Phan, H., Mertins, A.: Regression of hand movements from semg data with recurrent neural networks. In: 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC). pp. 3783–3787. IEEE (2020)DOI
- [21]Kundu, A.S., Mazumder, O., Lenka, P.K., Bhaumik, S.: Hand gesture recognition based omnidirectional wheelchair control using imu and emg sensors. Journal of Intelligent & Robotic Systems 91, 529–541 (2018)DOI
- [22]Lee, K.: Emg-triggered pedaling training on muscle activation, gait, and motor function for stroke patients. Brain Sciences 12(1), 76 (2022)DOI
- [23]Li, X., Fu, J., Xiong, L., Shi, Y., Daoodai, R., Li, Y.: Identification of finger force and motion from forearm surface electromyography. In: 2015 IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI). pp. 316–321. IEEE (2015)DOI
- [24]Long, Y., Geng, Y., Dai, C., Li, G.: A transfer learning based cross-subject generic model for continuous estimation of finger joint angles from a new user. IEEE Journal of Biomedical and Health Informatics 27(4), 1914–1925 (2023)DOI
- [25]Ngeo, J.G., Tamei, T., Shibata, T.: Continuous and simultaneous estimation of finger kinematics using inputs from an emg-to-muscle activation model. Journal of Neuroengineering and Rehabilitation 11, 1–14 (2014)
- [26]Ninapro Team: Ninapro: Non-invasive adaptive prosthetics database (2025), https://ninapro.hevs.ch/index.html, accessed 5 June 2025
- [27]Ozdemir, M.A., Kisa, D.H., Guren, O., Akan, A.: Hand gesture classification using time–frequency images and transfer learning based on cnn. Biomedical Signal Processing and Control 77, 103787 (2022)DOI
- [28]Putro, N.A.S., Avian, C., Prakosa, S.W., Mahali, M.I., Leu, J.S.: Estimating finger joint angles by surface emg signal using feature extraction and transformer-based deep learning model. Biomedical Signal Processing and Control 87(Part B), 105447 (2024)DOI
- [29]Sawangjai, P., Trakulruangroj, M., Boonnag, C., Piriyajitakonkiј, M., Tripathy, R.K., Sudhawiyangkul, T., Wilaiprasitporn, T.: Eganet: Removal of ocular artifacts from the eeg signal using generative adversarial networks. IEEE Journal of Biomedical and Health Informatics 26(10), 4913–4924 (2021)DOI
- [30]Sid’El Moctar, S.M., Rida, I., Boudaoud, S.: Comprehensive review of feature extraction techniques for semg signal classification: From hand-crafted features to deep learning approaches. IRBM 45(6), 100866 (2024). https://doi.org/10.1016/j.irbm.2024.100866
- [31]The Editors of Encyclopaedia Britannica: Coefficient of determination (2025), https://www.britannica.com/science/coefficient-of-determination, accessed 4 July 2025
- [32]Theunissen, M., Rabe, R., Davel, M.: Knowit: Deep time series modeling and interpretation. arXiv preprint arXiv:2507.06009 (2025)arxiv.org/abs/2507.06009
- [33]Vujaklija, I., Farina, D., Aszmann, O.C.: New developments in prosthetic arm systems. Orthopedic Research and Reviews pp. 31–39 (2016)DOI