Developing RPC-Net: Leveraging High-Density Electromyography and Machine Learning for Improved Hand Position Estimation

Objective: The purpose of this study was to develop and evaluate the performance of RPC-Net (Recursive Prosthetic Control Network), a novel method using simple neural network architectures to translate electromyographic activity into hand position with high accuracy and computational efficiency. Methods: RPC-Net uses a regression-based approach to convert forearm electromyographic signals into hand kinematics. We tested the adaptability of the algorithm to different conditions and compared its performance with that of solutions from the academic literature. Results: RPC-Net demonstrated a high degree of accuracy in predicting hand position from electromyographic activity, outperforming other solutions with the same computational cost. Including previous position data consistently improved results across subjects and conditions. RPC-Net showed robustness against a reduction in the number of electromyography electrodes used and shorter input signals, indicating potential for further reduction in computational cost. Conclusion: The results demonstrate that RPC-Net is capable of accurately translating forearm electromyographic activity into hand position, offering a practical and adaptable tool that may be accessible in clinical settings. Significance: The development of RPC-Net represents a significant advancement. In clinical settings, its application could enable prosthetic devices to be controlled in a way that feels more natural, improving the quality of life for individuals with limb loss.

of upper limb functionality has a major impact on quality of life, underscoring the pressing need for effective solutions [2].Great strides have been made in designing advanced upper limb prostheses and developing control strategies for these devices.Specifically, efforts have been directed towards creating prostheses that replicate the kinematic complexity of the human hand [3], [4], [5], [6], [7], [8].Many types of control solutions for these devices have been explored, with a primary focus on surface electromyography (EMG), currently the most viable option for prosthetic control [9], [10].
Despite the considerable advancements in technology, abandonment rates for prosthetic devices, a good indicator of user satisfaction, are consistently high, and are rarely below 30% [11], [12], [13].Factors contributing to abandonment include comfort, function, and appearance [12], and it appears that none of those are strongly predominant over the others [14].In general, users feel the prosthesis does not address their needs [15], often find them uncomfortable or painful and feel that control is not natural enough [16], [17].The definition of control naturalness varies in the literature, encompassing factors such as independent finger movement, force control capability, ease in performing daily tasks, and the inclusion of sensory feedback [11], [12].Overall, the fact that technical developments have not led to visible improvements in abandonment rates or consumer satisfaction suggests that current approaches do not meet patient needs [13].
An analysis of current control solutions may provide insight into the factors contributing to this trend.Machine Learning (ML) and its subset Deep Learning (DL) have been extensively employed in recent years to address prosthetic control.Applications of classification-based algorithms, a subset of ML, have been investigated [18], [19], [20], [21], [22].This type of algorithm predicts discrete or categorical output labels and maps input features to one of a finite number of classes or categories.For prosthetic control, this entails classifying electromyographic signals as one of several predefined movements, each of which is assumed to be consistent.Research has been focused on developing more complex solutions to improve accuracy in the classification of more and more classes [23], [24].Classification-based approaches, however, deviate significantly from how humans control their hands, and thus, may not be able to provide users with the natural-feeling control they desire [25].
In contrast to classification approaches, regression-based solutions offer a more natural control mechanism, taking steps towards human-like prosthetic control [26], [27], [28], [29], [30].This type of solution has been, in recent years, object of growing interest because of its potential [31], [18], [32], [33].Despite the clear improvement that regression-based approaches bring, some problems persist.First, most existing solutions do not control the complete kinematics of the hand, instead focusing solely on either the wrist or the fingers, even if control of many kinematic Degrees of Freedom (DoFs) independently was identified as an important attribute [9], [12].Second, some of these solutions require electromyogram signals acquired distally.However, this is incompatible with the needs of upper limb amputees; only 5% of hand amputees retain distal muscles in their forearms, whereas more than 30% of the same population retain proximal forearm muscles [16].Thirdly, most of these solutions employ computationally intensive algorithms with substantial computational cost, which may render them less suitable for embedding into devices or application in clinical settings, ultimately hindering their practical applicability [34], [35], [36], [37], [38].
We suggest that these limitations are contributing to the observed low satisfaction among prosthesis users.To address the shortcomings observed, and confident that accurate hand position estimation is crucial for improving prosthetic device control, we developed RPC-Net (Recursive Prosthetic Control Network).This novel, computationally efficient, deep network leverages regression principles to estimate hand position (as a high-DoF kinematic model) from electromyographic activity, and is intended to be implemented as control solution for articulated hand prostheses.Regression-based control and a high-DoF kinematic model address naturalness of control, a key factor in device abandonment [26], [27], [28], [29], [30].RPC-Net is recursive (making use of previous estimates to refine the current one) and uses 96 high-density surface EMG (HD-sEMG) channels from the proximal forearm as source signal, fewer than most control approaches and in accordance with the anatomical needs of amputees [19], [18].
We hypothesize that RPC-Net, designed to meet the needs of prosthesis users while being computationally efficient, can provide high-quality hand position estimates from the electromyogram and that its performance is superior to state-ofthe-art solutions.We further hypothesize that RPC-Net is robust against changes in input signal length and the number of electromyographic channels used, and that information about previous position can improve its performance.In this study, we introduce RPC-Net and validate it to demonstrate these experimental hypotheses.RPC-Net is tested offline and on healthy subjects, focusing on the accuracy of the estimate of the position from the EMG signal.For this purpose, we collected electromyographic and hand position data from twelve healthy subjects, and used RPC-Net to translate the electromyographic data into hand position.This first evaluation is a stepping stone towards the development of a prosthetic solution implementing RPC-Net that satisfies user needs, is efficient, and conducive to a more natural control experience.

A. Subjects and Experimental Protocol
1) Subjects: Our study included twelve healthy subjects, seven males and five females (aged 20-26, weighing 55-90 kg and 165-195 cm tall).Each participant provided written, informed consent before participation.All subjects were righthanded, had no surgical interventions on their dominant arm, and had a forearm circumference between 20 and 30 cm.The experimental procedures adhered to the Declaration of Helsinki and were approved by the local ethics committee (CER-Polito, Prot.No. 107460/2023).
2) Experimental Protocol: The acquisition protocol consisted of two phases.In Phase 1 (P1), a single participant (S0) was involved, whereas Phase 2 (P2) incorporated the remaining eleven participants (S1-S11).The acquisition procedures for both phases were identical, with the only difference being their duration.In P1, twelve trials were included: eleven for training and one for testing.In P2, six trials per subject were considered: five for training and one for testing.The trial to be used for testing was selected randomly.During the trials, high-density EMG and hand position data of the participants were acquired as they transitioned between a set of 16 hand poses.This set comprised 4 wrist poses (flexion; extension; adduction; abduction), 8 finger poses (index finger metacarpo-phalangeal flexion; index finger metacarpo-phalangeal extension; index finger proximal interphalangeal flexion; index finger proximal interphalangeal extension; flexion of the middle, ring, and little fingers; extension of the middle, ring, and little fingers; adduction of the index and middle fingers; abduction of the index and middle fingers), and 4 thumb poses (flexion; extension; adduction; abduction).Each trial included 48 poses (16 poses repeated 3 times each).Participants were seated with their dominant forearm positioned on a vertical support at shoulder height.Initially, participants were instructed to relax their hands and wrists.Subsequently, a monitor presented one of the 18 hand poses every 8 seconds, in random order to to prevent participants from anticipating the sequence.Participants were given 2 seconds to recognize the pose before transitioning their hand from the previous to the prompted pose and were not instructed to transition at a specific speed.At the end of the trial, the subject was instructed to relax their hands and wrists.Each trial was 400 seconds long.

B. Data Acquisition
All data have been made available for online access [39]. 1) High-Density Surface EMG Data: EMG was recorded on the surface of the dominant forearm using the MEACS system, the EMG amplifier developed at LISiN (Politecnico di Torino, Turin, Italy) [40], [41].The system is made up of multiple Sensor Units (SU), each measuring 34 mm × 30 mm × 15 mm and sampling 32 channels at f s = 2.048 kHz (192 V/V gain, 16 b resolution, 2.4 V dynamic range).Three SUs were used, each connected to an anisotropic electrode array (2 rows and 16 columns, with 10 mm and 15 mm inter-electrode distance respectively) for a total of N = 96 acquired monopolar electromyographic channels.The electrodes were arranged in 6 rows and 16 columns around the circumference of the forearm, covering approximately a third of its length (Fig. 1).The proximal row of electrodes (row 1) was positioned at 20 % of the distance between the medial epicondyle and the pisiform bone.The reference electrode was positioned on the lateral epicondyle.The electromyographic signal was used as input for RPC-Net during the phases of training and testing.
2) Hand Position Data: Hand position data were acquired using a motion capture system (VICON Motus; VICON Motion Systems, Centennial, Oxford, U.K.) sampling at 100 samples/s.The setup included 12 infrared cameras (Vero v2.2).A total of M h = 21 infrared reflective markers (diameter of 6 mm) were positioned on the dominant hand of the subject, embedded in a glove.Additionally, 12 markers were placed on the upper limb and trunk, resulting in M = 33 markers in total (Fig. 1).The hand position data, translated to joint angles using the Inverse Kinematic Algorithm (IKA) defined below, was used both as input and as target value for the training phase of RPC-Net.

C. Inverse Kinematic Algorithm
We developed an Inverse Kinematic Algorithm (IKA) to translate 3D marker positions, as captured by the motion capture system, into hand joint angles, the selection of which is informed by a 24-DoF kinematic model (Fig. 2) proposed by Lee et al. [42].Although the original model defines 27 kinematic DoFs, we excluded the three associated with spatial origin positioning, as the position of the wrist was fixed in our protocol.The core of the IKA is the optimization process designed to identify the 24 joint angles (one per kinematic DoF) that best approximate the marker positions.The process is executed for each frame captured by the VICON system.The algorithm comprises three phases: 1) wrist angles estimation (3 angles), 2) finger angles estimation (4 angles per finger) and 3) thumb angles estimation (5 angles).In phase 1, the three angles represent the rotations of the hand palm (defined by 6 markers), around the x, y, and z axes, starting from the reference position, where the K plane (defined in Fig. 1) is aligned parallel to the W plane and the lines G and Q are parallel.As for phase 2, each finger in the model can perform flexion-extension and adduction-abduction at the metacarpo-phalangeal (MP) level, and flexion-extension at the interphalangeal (IP, ID) level.The four angles that best represent the spatial position of the three finger markers are derived using a sequential quadratic programming algorithm (MATLAB implementation; Maximal Function Evaluations = 500; Finite Difference Type = "forward"; function tolerance = 10 −1 ; optimality = 10 −6 ; step tolerances=10 −6 ; maximum iterations = 1000; constraint tolerance = 10 −6 ) [43].The algorithm is initialized with the anatomical rest angles of the hand [44].All joint angles are equal to zero when the three finger markers lie on the K plane, on a line perpendicular to the Q line (Fig. 1).Positive angles indicate joint extensions and radial deviations.In phase 3, the thumb has the flexibility for flexion-extension and adduction-abduction at both the metacarpo-phalangeal and proximal interphalangeal (MP, IP) levels, with only flexion-extension at the distal interphalangeal (ID) level.The optimization algorithm, identical to the one in phase 2, computes the angles that best represent the position of the three thumb markers.All angles are equal to zero when those markers lie on the T plane, on a line perpendicular to the H line (Fig. 1).Joint extensions and radial deviations are indicated by positive angles.The angles for each finger and the thumb are calculated using separate optimization processes for enhanced computational efficiency.Phase 1 introduces no approximation errors, while phases 2 and 3 present a degree of discrepancy between estimated and actual positions.An average approximation error (distance between actual and estimated positions of the markers) of under 3 mm across all subjects was observed (mean: 2.35 mm, std: 1.69 mm computed over 1987466 frames).The IKA effectively performs a projection operation from a 3D space to a J-dimensional space, where J is the number of DoFs in the kinematic model (J = 24).This model plays a crucial role as our neural network architecture, RPC-Net, was designed to take as input and return as output the joint angles of the hand rather than the 3D positions of the markers.This choice is motivated by the fact that muscle activation is proportional to joint angles rather than to finger endpoint position.A Forward Kinematic Algorithm (FKA) to translate angles to marker position, based on the same kinematic model, was developed as well.

D. Data Post Processing
The electromyographic and position data were post-processed using MATLAB (Release 2022b, The MathWorks, Inc., Natick, Massachusetts, USA) and VICON Nexus (VICON Nexus v2.11, Oxford Metrics plc, Oxford, U.K.).Additional code was written in Python using libraries that rely on BSD licenses.The objective of the post-processing procedure is to transform the data acquired into suitable inputs for RPC-Net.The post-processing procedure of the electromyographic signal consists of: 1) conversion of acquired signal from bit to volt, 2) removal of offset from signal, 3) rectification (computation of absolute value), 4) normalization (division by 5 mV) so that the signal is included between 0 and 1, 5) computation of the RMS of each channel over w l = 200 samples (97.7 ms) with a sliding window of w s = 25 samples.Given an electromyographic signal that is L seconds long and N -dimensional, the output of the postprocessing procedure is l = f loor( L * f s −w l w s ) + 1 samples long and N -dimensional.This procedure effectively sub-samples the signal from f s = 2.048 kHz to f s w s = 81.92Hz through the computation of RMS.The post-processing procedure for the marker position data consists of: 1) moving average filtering (order 20), 2) projection of the positions of markers in 3D to a 24-dimensional joint-angle space through the IKA, 3) subtraction of rest angles, 4) normalization (addition of 150 • and division by 240 • ) so that the signal is included between 0 and 1, 5) linear interpolation to match the sampling rate of the post-processed electromyographic signal ( f s w s ).Given a Lsecond long signal, the output of the post-processing procedure is l = f loor( L * f s −w l w s ) + 1 samples long and J-dimensional.

E. Rpc-Net
We devised RPC-Net, a neural network intended to convert multi-modal input into sample-wise predictions of the 24 hand joint angles.The architecture includes 24 individual subnetworks, each assigned to one joint.All sub-networks share the same input for each iteration and generate outputs that collectively represent the complete kinematic state of the hand.Each sub-network consists of a two-branched neural network, where one branch processes the electromyogram (EMG branch), and the other analyzes past joint angles (angle branch).These two branches converge into a root that returns an estimate for a single joint angle.The outputs from the 24 sub-networks are combined to create a full set of 24 joint angles, which also serve as input for the subsequent estimates, creating a recursive loop.Both input signals consist of multiple time points.The EMG input consists of a 0.78 s segment of the electromyographic signal preceding the instant at which the joint angle estimate is calculated.Of the 64 samples in this segment (given a sampling frequency of 81.92 Hz), only every fourth sample is processed for efficiency.This action effectively reduces the sampling frequency to 20.48 Hz.Consequently, the EMG branch input size becomes I E = 16 (samples) × 96 (channels) or 1536 inputs.The joint angle input incorporates the kinematic state for the 0.78 s interval leading up to the time point of the predicted position.Every eighth sample is chosen (diminishing the sampling rate to 10.24 Hz), and the signal encompasses J = 24 channels.This results in an input size of I A = 8 (samples) × 24 (joints) or 192 inputs for the angle branch input.The output of the network is the sample-wise approximation of the 24 joint angles of the hand, determined at a frequency of 81.92 Hz.For myoelectrical control systems, delay is defined as the time difference between motion intention and output.While the input signal covers a 0.78 s window, this doesn't introduce any delay in the prediction process in addition to the inference time of the network.This is because RPC-Net performs the estimate of the sample immediately following the most recent EMG reading, corresponding to the onset of motor intention; earlier EMG values within the 0.78 s window improve prediction by providing previous context.The initial 0.78 s of a session may not be used for training or testing of the network due to the absence of sufficient earlier data.During the testing phase, joint angles produced by the RPC-Net undergo processing via a fourth-order low-pass Butterworth filter (with a cutoff frequency f c = 1 Hz) to eliminate high-frequency fluctuations and are subsequently mapped back into 3D space using the FKA.The structure of each branch is detailed in Fig. 3.The network was trained with the Adam optimizer (in its PyTorch implementation), learning rate = 10 −5 ; ε = 10 −3 ; β 1 = 0.9; β 2 = 0.99; batch size = 10; loss criterion=MSELoss.The model was trained for 3 epochs.During the training of RPC-Net, the joint angle input data were from the recording, and the recursion loop was not used.

F. Performance Indicators
The performance of RPC-Net was assessed as its ability to estimate the position of the hand from the electromyogram.The performance was measured, independently for each subject, with to two indicators: Mean Pearson Correlation Coefficient (MPCC) and Mean Distance (MD), computed for the test trial only.MPCC is the mean of the individual Pearson Correlation Coefficients (PCC) obtained from comparing the actual and predicted joint angle value for each of the 24 DoFs considered, over the whole test trial.The median, first and second tertile of the PCCs were also computed along with the mean.MD is the mean, over the whole test trial, of the Weighted Fingertip Distance (WFD).For each time point estimated, WFD is defined as the average of: the distance between the position of the tip of the index finger (as recorded through VICON) and its estimate (computed by RPC-Net), the distance between the position of the tip of the middle finger and its estimate, and the distance between the position of the tip of the thumb and its estimate.The median, first tertile and second tertile of the WFD over time were computed.Computational efficiency was evaluated using Inference Time (IT).The operations in RPC-Net do not benefit from using a Graphics Processing Unit (GPU) during the prediction phase (forward passes), and the PyTorch library Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.does not improve performance in this context.Thus, although GPU usage can accelerate the training phase, we found that performing matrix operations with the numpy library, rather than PyTorch, on a CPU yielded the best performance during testing.We calculated Inference Time as the average time, over 10 5 iterations, required by the numpy implementation of the network to perform a forward pass.Computation was performed on an Intel(R) Xeon(R) Platinum 8268 CPU (2.90 GHz).

G. Comparison With Other Solutions
We tested other state-of-the-art solutions for hand position estimation using our data set and compared their performance with that of RPC-Net.For each solution, we implemented a modified version to have a similar inference time to RPC-Net (ensuring a more fair comparison), to fit our input (96-channel HD-sEMG, 16 samples) and to have the same output as RPC-Net (24 joint angles).The solutions (identified with a code) considered are: 1) the Convolutional Neural Network proposed in [45].The original implementation has 4 convolutional layers with 128, 64, 64, 64 output channels and 3 fully connected layers with 512, 512, 128 and 16 units respectively.Our modified version (CNN-Ols) has 4 convolutional layers with 128, 192, 192, 192 output channels and 3 fully connected layers with 1536, 1536, 384 and 24 units respectively.2) The recurrent neural network proposed in [46], originally with hidden size of 50 and 10 outputs, modified to have hidden size of 224 and 24 outputs (RNN-Qui).3) The transformer architecture introduced in [47].The original implementation has 1024 as dimension of model, 4 transformer layers and 22 outputs.Our modified implementation (TRF-Put) has 96 as dimension of model, 12 transformer layers and 24 outputs.In our implementation, we omitted the ReLU function after the last fully connected layer in the regression block.The EMG input for RNN-Qui and TRF-Put was reshaped to a 16 (samples) × 96 (EMG channels) 2D array.For CNN-Ols, it was reshaped to a 16 (samples) × 6 (EMG electrodes rows) × 16 (EMG electrodes columns) 3D array.To compare the performance of RPC-Net with these alternative solutions, we performed a one-sided paired t-test between the performance of RPC-Net and the performance of TRF-Put, RNN-Qui, and CNN-Ols, across all subjects, for both MD and MPCC.The choice of the paired t-test was justified by the fact that it exhibits higher statistical power, under the assumption of normally distributed data, if compared to nonparametric tests.This test is widely regarded as a robust method for assessing differences in two paired populations [48].We opted for the one-sided version because we are assessing the superiority of RPC-Net in relation to other models.The condition of normality was verified with a Shapiro-Wilk test.

H. Variations of RPC-Net
Additional simulations were run to assess the effect of computational-cost-related parameters on the performance of the network by means of different statistical tools.The effect of the inclusion of information about the previous joint state was assessed with one-sided paired t-tests (see II-H1), and so was the effect of using a single or multiple network for each joint (II-H5).The choice of this statistical tool is justified in II-G.The condition of normality was verified with a Shapiro-Wilk test.For selected experimental conditions (II-H2, II-H3 II-H5), we compared the results observed with RPC-Net and RPC-Net-B (defined in II-H1).Since, in this case, data distribution normality could not be guaranteed, we relied on the one-sided Wilcoxon signed-rank test, a nonparametric alternative to the paired ttest [48].We opted for the one-sided version because we are assessing the superior performance of RPC-Net in relation to RPC-Net-B.

Input to RPC-Net:
To evaluate if information about previous joint state could enhance performance, we compared the performance the original RPC-Net architecture with that of a Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE I INPUT ELECTRODES SUBSETS
similar architecture that does not make use of information about previous kinematic state: RPC-Net-B (i.e., RPC-Net without the angle branch).The comparison was performed by means of a one-sided paired t-test between the results observed for of RPC-Net and RPC-Net-B across all subjects, for both MD and MPCC.
2) Length of Input Signal: The length of the two signals given as input to RPC-Net was varied, keeping the sampling frequency unvaried, and thus modifying the number of samples in input.A different number of sampling points in input implied a change in network architecture, so that layer width was still a function of the number of input channels Ie and Ia, as shown in Fig. 3.The EMG and angle signal lengths were (rounded to the closest tenth of second) 0.8 s (original length), 0.7 s, 0.6 s, 0.5 s, 0.4 s, 0.3 s, 0.2 s, and 0.1 s.Linear regression analysis, effective in quantifying the strength and direction of a linear relationship, was used to analyze the effect on performance of the length of input signals.We tested the hypothesis that an increase in signal length correlates with an improvement in performance [48].The same assessment was performed on RPC-Net-B and the results compared through a Wilcoxon signed-rank test (96 coupled observations, 8 per subject, one each for RPC-Net and RPC-Net-B).
3) Width of Neural Network: The width of the neural layer of the EMG branch of RPC-Net was varied.Five widths were considered (in addition to the original one).The widths tested were: 512 (original width), 384 (E-1), 307 (E-2), 256 (E-3), 219 (E-4) and 192 (E-5) units, each identified by a code (E-n).The assessment was performed both on RPC-Net and RPC-Net-B and the results compared using a Wilcoxon signed-rank test (72 coupled observations, 6 per subject, one each for RPC-Net and RPC-Net-B).

4) Number of Electrodes Used as Input:
We assessed the performance of RPC-Net using a subset of EMG channels as input.Subsets were defined either on the proximo-distal axis or on the circumferential axis.This implied a change in network architecture so that the width of the layers was still a function of the number of input channels, as shown in Fig. 3.We tested the 12 combinations of row subsets and the 6 combinations of column subsets reported in Table I in addition to the original solution, which includes all rows and all columns.Column and row numbers are illustrated in Fig. 1.

5) Single Network for Multiple Joints or Separate Networks for Each Joint:
We developed two variations of RPC-Net (RPC-Net-W and RPC-Net-I) which, instead of 24 independent sub-networks (each corresponding to a joint angle), are made up of a single unit that takes the same inputs and returns 24 joint angles.In RPC-Net-I, the structure of the network is identical to that of a single branch in RPC-Net (see Fig. 3).RPC-Net-W is similar to RPC-Net-I, but the width of the layers was multiplied by a constant factor of 5 to match the inference time of RPC-Net, thus ensuring a more appropriate comparison in performance.The performance of these alternative architectures was assessed and compared with that of the original RPC-Net, by means of a one-sided paired t-test across all subjects, for both MD and MPCC.The assessment was performed both on RPC-Net and RPC-Net-B, for which analogous RPC-Net-I-B and RPC-Net-W-B were developed (i.e., RPC-Net-I-B is RPC-Net-I without joint angle input and RPC-Net-W-B is RPC-Net-W without joint angle input) and the results compared using a Wilcoxon signed-rank test (36 coupled observations, 3 per subject) with one observation each for RPC-Net (RPC-Net-W and RPC-Net-I) and RPC-Net-B (RPC-Net-W-B and RPC-Net-I-B).

A. Performance of RPC-Net
Fig. 4 shows the trend of WFD values over time, highlighting the discrepancy between RPC-Net estimates and actual data.We also show a similar measure, the Unweighted Marker Distance (UMD), computed with all the markers on the hand rather than with the index finger, middle finger and thumb alone.Table II reports the MPCC and MD for all subjects.Fig. 5 shows an overlap of the angles as estimated by RPC-Net and their actual values, with joint codes defined in Fig. 2. The results shown correspond to a one-minute interval from the test trial acquired for Subject S0.These results indicate that the estimate is consistently good across all joints.The best results in terms of PCC are observed for the flexion-extension of the wrist joint and the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE II PERFORMANCE INDICATORS FOR RPC-NET ACROSS THE TWELVE SUBJECTS
metacarpal-phalangeal joint of the four fingers.The inference time of RPC-Net is 6.20 ms, with a standard deviation of 0.01 ms.

B. Variations of RPC-Net and Comparison With Other Solutions
Figs. 6 to 10 show performance of RPC-Net if compared with other DL solutions and its own variants, measured by the previously defined indicators: MD, MPCC, and IT.Markers indicate actual indicators (i.e., the mean), intervals highlight the first and second tertiles, and a dot symbolizes the median.Statistics are included.For the one-sided paired t-test, we included the t statistic and the corresponding p-value in the caption.For regression analyses, the caption included β1 , SE, t, p, R 2 and adjusted R 2 .In Figs. 7, 8, and 10, the top and middle plot rows indicate architectures with or without information about previous position, respectively.The bottom row of plots compares the two conditions, using y-values from the top and middle rows to determine the position of a marker.Values on the y-axis in the top plot row are the x-axis in the bottom plot row, and values on the y-axis in the middle plot row are the y-axis in the bottom plot row.For the Wilcoxon signed-rank test we report the statistic W (sum of the ranks of positive differences), and the p-value in the caption.Fig. 6 compares the performance of RPC-Net, RPC-Net-B, TRF-Put, RNN-Qui, and CNN-Ols, referring to the experiments in Sections II-G and II-H1.Statistical tests confirm the superior performance of RPC-Net against the other solutions.Another analysis (second row of plots), studies the impact of angle branch input signal length, revealing no significant influence on performance.Fig. 7 depicts performance trends based on EMG branch input signal length for RPC-Net and RPC-Net-B, as detailed in Section II-H2.Longer signals predictably enhance performance.Fig. 8 examines the influence of the EMG branch layer width on performance for RPC-Net and RPC-Net-B, as defined in II-H3.Visually, wider layers improve performance, though computational cost escalates quicker.Fig. 9 evaluates RPC-Net variants using a subset of electrodes, defined in Section II-H4.Fewer electrodes predictably lower performance.However, computational cost decreases significantly with fewer electrodes.Lastly, Fig. 10 contrasts the performances of RPC-Net, RPC-Net-W, RPC-Net-I, and their RPC-Net-B counterparts, as described in II-H5.RPC-Net outperforms RPC-Net-I (with a considerable difference in computational cost), but not RPC-Net-W.The results, as seen in the bottom plot row of Figs. 7, 8, and 10, indicates that prior kinematic state information consistently improves performance.

IV. DISCUSSION
The most important consideration that can be inferred from the results is that RPC-Net is capable of translating electromyographic activity to hand position with good accuracy.This finding is of vital importance, as it demonstrates that a solution addressing user needs and allowing for natural-feeling control, while being computationally efficient, can achieve satisfying levels of performance; this opens new opportunities for the implementation of such solutions in a clinical setting.While other ML approaches yield results comparable to ours in EMG-based prosthetic control, these either control a limited number of DoFs [49], [28], rely on electrodes positioned too distally [27], or employ algorithms that demand substantial computational resources [50], [51].As for the second point, the use of electrodes positioned too distally (on the wrist or thumb) poses a challenge in applications, as many amputees lack these parts of the limbs [16].The results indicate that all the necessary information to determine the current kinematic state of the hand can be derived from the electromyographic activity in the proximal portion of the forearm, even for joints with distal or intrinsic actuators.Although the adequacy of forearm electromyogram for prosthetic control has been demonstrated [18], no study yet demonstrated the feasibility of all-DoF control using electromyographic activity acquired solely from the proximal forearm.On the computational front, algorithms that demand extensive resources necessitate advanced hardware like GPUs, which are impractical to embed into a prosthetic device, thereby limiting their applicability in clinical settings.In this regard, the results point towards another novel finding: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.high-quality regression can be achieved using simple fully connected neural architectures, rather than complex convolutional structures, a result demonstrated by the performance of RPC-Net if compared to our implementation of the solutions proposed by Quivira et al. [46], Olsson et al. [45], and Putro et al. [47].A simple architecture implies a reduced computational cost and makes RPC-Net potentially embeddable in a microprocessor of a prosthetic device.
Incorporating information about the previous kinematic state significantly contributes to the performance of our solution.The results show that the improvement in performance given by the inclusion of information about previous state is consistent across subjects and across conditions.In real-life situations, this feature could offer a stabilizing mechanism to counteract the stochastic nature of electromyographic signals.The results illustrate the resilience of RPC-Net against reductions in EMG electrode numbers, shorter input signals, and other conditions that could lower computational cost.The findings indicate that while additional input data typically enhances estimation quality, the improvement doesn't correspond proportionally to computational cost.For instance, reducing the number of electrodes from 96 to 32 only increased fingertip distance by 5 mm and reduced MPCC by 10%, yet resulted in a 75% reduction in computation time.Hence, a control solution based on RPC-Net could offer substantial flexibility and could be implemented with fewer electrodes or a shorter input signal, implying that the computational cost of the solution could be further minimized with minimal performance loss, making it highly adaptable to clinical settings.Previous studies have explored the adequacy of fewer electrodes for control [52], [53], but not for these many DoFs.
The experiments described in this work were conducted entirely offline and on healthy subjects.For RPC-Net to be properly validated for controlling upper limb prostheses, its performance must be demonstrated in conditions more closely resembling the actual target case.To achieve this, the next steps in our research include implementing RPC-Net in real-time, integrating it for the control of an existing, state-of-the-art prosthetic device, and applying it to amputees.Finally, once the solution is successfully applied to amputees, a subsequent study would be necessary to assess their satisfaction and to determine the potential positive impact of a prosthetic device controlled by RPC-Net.

V. CONCLUSION
In this study, we introduced and extensively evaluated RPC-Net, a method for translating electromyographic activity into hand position using a computationally efficient neural network architecture.The results of the study that RPC-Net can perform better than state-of-the-art methods with a similar computational cost and without requiring advanced computer resources.This signifies a crucial development, making the system more adaptable and potentially more accessible in clinical settings.A key feature that substantially contributes to the performance of the system was incorporating information about the previous kinematic state.Furthermore, solution demonstrated robustness against changes in signal length and the number of EMG channels used, reinforcing its flexibility and adaptability.The development and success of RPC-Net have significant implications for biomedical research and practical applications.It offers a new avenue for prosthetic control that feels more natural, is computationally efficient, and can be flexibly adapted to different clinical settings and patient needs.This progress has the potential to improve the quality of life for individuals with limb loss, pushing forward biomedical research and its applications.Our future research will focus on taking the necessary steps to implement RPC-Net as a control solution for prosthetic devices.

Fig. 1 .
Fig. 1.(a) Position of electrodes on the forearm of the subject.Ventral (L) and dorsal (R) view (A: Medial epicondyle, B: Lateral epicondyle, C: Pisiform bone).(b) Placement of 12 infrared markers on the body of the subject.Plane W is highlighted in blue.(c) Placement of 21 infrared markers on the hand (and 2 forearm markers, also depicted in (b)).Markers are placed proximally to each joint.Planes K and T highlighted in orange and green respectively.Q, H and G lines in black.

Fig. 2 .
Fig. 2. Kinematic model used for the Inverse Kinematic Algorithm.Each joint of the hand has 1 to 3 kinematic DoFs.Each DoF can be characterized as Flexion-Extension (F-E), Adduction-Abduction (A-A) or Pronation-Supination (P-S), as shown in legend (bottom left).Each joint is given a four letter code.The arrow represents the positioning of the axis of rotation.The circle at the origin represents a rotation axis orthogonal to the back of the hand (dorsal direction).

Fig. 3 .
Fig. 3. RPC-Net.The whole network made up by 24 individual sub-networks, each of them trained to regress one of the 24 hand joints.The arrow on the left highlights how the output of RPC-Net is used as input for the subsequent iteration.The detail of one of the 24 sub-networks is shown on the right-hand side of the figure.The two branches are visible."E" refers to the EMG branch and "A" refers to the angle branch.IE and IA represent the width of the EMG (1536 units) and angle (192 units) inputs respectively.IM=IE+IA is the width of the merged outputs of the two branches (536 units).The value on top of the green layers indicate the width of the corresponding layer as a function of Ix, the input size of that branch, expressed numerically beneath each layer.The top left part of the figure displays the filtering and conversion to 3D part that happen outside the network loop.

Fig. 4 .
Fig. 4. Estimation error.The two lines show the UMD and the WFD for the test trial of S0.For selected time points, the estimated position (right) and the actual one (left) are shown on the side.

Fig. 5 .
Fig. 5. Comparison between estimated joint angle and actual angle.The 24 joints considered are shown.At the top of each subplot the abbreviation of the corresponding joint and DoF, as defined in Fig. 2. Two measures of accuracy are also included: PCC between actual and estimated position and the Mean Angular Distance (MAD), in degrees, between the values over time.

Fig. 9 .
Fig. 9. Performance as a function of the subset of electrodes used, as described in Section II-H4.(a) Rows subsets.(b) Columns subsets.