Discrete-Target Prosthesis Control Using Uncertainty-Aware Classification for Smooth and Efficient Gross Arm Movement

Current control approaches for gross prosthetic arm movement mainly regulate movement over a continuous range of target poses. However, these methods suffer from output fluctuation caused by input signal variations during gross arm movements. Prosthesis control approaches with a finite number of discrete target poses can address this issue and reduce the complexity of the pose control process. However, it remains under-explored in the literature and suffers from the consequences of misclassifying the target poses. Here, we propose a novel Uncertainty-Aware Discrete-Target Prosthesis Control (UA-DPC) approach. This approach consists of (1) an uncertainty-aware classification scheme to reduce unintended pose switches caused by misclassifications, and (2) real-time trajectory planning that adjusts motion to be rapid or conservative based on low or high quantified uncertainty, respectively. By addressing the impact of misclassification, this approach facilitates more efficient and smooth movements. Human-in-the-loop experiments were conducted in a virtual reality environment with 12 non-disabled participants. The participants controlled a transhumeral prosthesis using three approaches: the proposed UA-DPC, a discrete-target approach based on a traditional off-the-shelf classifier, and a continuous-target approach. The results demonstrate the superior performance of UA-DPC, which provides more efficient task completion with fewer misclassification instances as well as smoother residual limb and prosthesis movement.


I. INTRODUCTION
P OWERED upper-limb prostheses are robotic devices that restore the arm function for individuals living with limb loss.These prostheses often incorporate multiple joints, like those for elbow and wrist movement, thereby enabling the user to perform movements such as reaching a target location and orientation in 3D space with the upper limb.These movements involve large muscle groups of the upper limb to drive the elbow and shoulder joints and are referred to as gross arm movements as opposed to fine movements of the upper limb such as in-hand object manipulation or hand/finger postures [1].Accurate estimation of the user-intended prosthetic movement is crucial to task completion.However, decoding the user-intended movement across multiple degrees of freedom (DoF) poses challenges due to the reduced biological signal sources available after limb loss, especially for high-level amputation, such as transhumeral (above-elbow) case [2].To this end, regression and classification techniques have been investigated in the literature synthesizing data from accessible sources, including but not limited to surface electromyography (sEMG) and joint kinematic signals [3].
The regression model constructs a continuous mapping between the input variables and the output prosthetic pose [4].Because of this, it has been used predominately in the control algorithms for gross arm movement where coordinated multi-DoF movement is desired [5], [6], [7], referred to as continuous-target prosthesis control (CPC).However, the high variance of the sEMG inputs is mapped to the output, causing fluctuation in the output prosthetic movements.In transhumeral prostheses, the fluctuation is magnified by the limb length resulting in substantial fluctuations in the position and orientation of the hand.This reduces the accuracy of the output movement and in turn, hinders task completion [3], [8].Moreover, the infinite possible outputs of CPC can require sustained visual attention from the user to control the prosthetic pose to the intended one, which increases the cognitive load [9].
The discrete-target prosthesis control (DPC) employing classifiers is relatively less investigated in gross arm movements.This paradigm can overcome the issue of fluctuation in prosthetic motion by providing a finite set of candidate target poses to converge to, for any admissible inputs within well-defined clusters [10].As such, the approach captures the variations in the input signal associated with each pose during day-to-day usage that are typical to the operation of the prosthesis.Therefore, it is capable of maintaining a key prosthetic pose for task completion under the effect of these variations.Moreover, the finite outputs of DPC can decrease the demand on visual attention thus leading to reduced cognitive load.Notably, the approaches that identify joint movement directions based on sEMG patterns, as in [11] and [12], are categorised as CPC, despite the use of classifiers.Because the possible output poses are continuous over the joint range of motion.
However, when misclassifications occur in DPC, it can lead to switching movement between discrete target prosthetic poses.This results in non-smooth movement fluctuation worse than observed in the continuous-target approach, impeding task completion, as observed with an off-theshelf classifier [13].Misclassification is unavoidable for two main reasons: (1) due to system (aleatoric) uncertainty arises because of the inherent complexity of data, such as cluster spread due to noise or overlapping clusters; (2) due to knowledge (epistemic) uncertainty arises when the model is given inputs in a region that is either sparsely covered by the training data or far from it, known as outof-distribution (OOD).This uncertainty is herein associated with the variability of the transient motion trajectory from one pose to another performed by the human user.The intended pose is to be estimated throughout the gross arm movements in real-time, containing uncertainties that may generally diminish as the motion approaches the final (intended) pose.To avoid unintended pose-switching due to misclassification and achieve smoother and more efficient gross arm movements, it is crucial to accurately quantify both uncertainties and utilise this quantification in pose estimation.
To this end, various techniques for post-processing classifier output to reduce misclassification occurrences have been proposed for the CPC approaches that identify sEMG patterns such as [11] and [12].One common approach is to check the consensus without the quantification of uncertainty, for example, (1) multiple classifiers consensus, i.e., synthesizing the classification results of multiple binary one-vs.-restor one-vs.-oneclassifier and rejecting decision unless consensus is reached [11]; (2) time consensus, i.e., by increasing velocity of the joint motion with accumulation of consistent decision and vice-versa [14].More recently, techniques that leverage the output probability of common probabilistic classifiers and real-time sEMG signals were proposed.The output probability is regarded as the quantification of system uncertainty.For instance, there are methods involving offline optimisation of the probability threshold for decisionmaking [15], [16], and methods leveraging the system uncertainty and additional patterns of the sEMG signals in adjacent time frames [17], [18].However, these methods do not quantify knowledge uncertainty.When dealing with OOD inputs common in gross arm movements, without quantifying knowledge uncertainty, the system uncertainty used by these methods is unreliable [19], [20].The techniques involving the Bayesian deep neural network are capable of quantifying both types of uncertainties [21].However, a substantial training dataset is typically required which can be costly and timeconsuming to collect in this application [21].In addition, repeating the network training is required to include new target poses, limiting its scalability.
In this work, we propose a novel uncertainty-aware discretetarget prosthesis control (UA-DPC) approach that addresses the misclassification issue in DPC, thereby producing smooth and efficient gross arm movements.This is achieved by mitigating both the occurrence and impact of pose-switching due to misclassification.To reduce the occurrence, we propose an uncertainty-aware classification scheme.This classifier evaluates the likelihood of misclassification and rejects the cases with high uncertainty based on the quantification of reliable system uncertainty and additional knowledge uncertainty.It is constructed using statistical models, thus requiring only a small amount of training data, and is scalable for including new target poses.To reduce the impact, we integrate an online trajectory planning that leverages the most recent uncertainty quantification to regulate average velocity toward the target pose, i.e., slower prosthetic movement for higher uncertainty.This motion regulation approach leverages the quantified uncertainties in contrast to the time consensus technique, producing timely movement.It also resolves the discontinuity introduced by the discrete target poses.We conducted a human-in-the-loop control assessment under a transhumeral prosthesis context to validate the practicality and efficacy of the proposed method through a comprehensive comparison with the approaches adopted in the literature.Finally, the respective strengths and weaknesses of DPC and CPC are discussed.The assessment was performed under the Refined Clothespin Relocation Test (RCRT) [22].

II. UNCERTAINTY-AWARE DISCRETE-TARGET PROSTHESIS CONTROL (UA-DPC)
The proposed UA-DPC is presented in this section, which starts with a problem formulation, followed by its two main components designed to reduce the occurrence and impact of pose-switching due to misclassification in human-in-theloop control, respectively.Notation: We use lowercase letters for scalars, boldface lowercase letters for column vectors, and boldface uppercase letters to denote matrices throughout this article.The key notations are summarised in Tab.I.The framework of UA-DPC is presented in Fig. 1 and the algorithm process is summarised in Algorithm 1.

A. Problem Formulation
Let Q = {Q 1 , Q 2 , . . ., Q C } denote a set comprising C candidate target prosthetic poses in joint space, e.g., three target prosthetic-elbow poses as displayed in Fig. 2(a).At current time instant k, an input vector x k is measured, which contains features processed from sensor readings of the human user to convey information of the target poses, such as kinematic information (of the residual limb) and sEMG signals.The objective of the proposed discrete-target control Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.1.The LDA is prone to misclassify for the OOD inputs but the proposed method does not, which gives a reliable system uncertainty (line) and additional knowledge uncertainty (shaded area).

TABLE I SUMMARY OF KEY NOTATIONS
is to estimate the target pose from the candidate set Q using current input x k at current time instant k.Subsequently, based on the estimated pose, the trajectory is planned from the current pose to reach this pose.This process reidentifies the target pose and plans the trajectory at every time instant as the prosthesis moves from the current pose to the estimated pose, comprising two components (1) classification and (2) trajectory planning.

B. Uncertainty-Aware Classification
Common off-the-shelf probabilistic classifiers can be employed to determine the likelihood of the current measurement x k belonging to the c th candidate pose by estimating . The pose estimation is made by finding the c that gives the highest pc k , and assigning the candidate pose associated with c to the estimated pose denoted as qk , i,e, qk = Q c .However, the pk solely reflects the system uncertainty based on current knowledge at the k th time instant, thus it is prone to misclassification when it comes to OOD inputs.In this work, uncertainty-aware classification is proposed to solve this problem.It also infers the distribution P k over pk , i.e., pk ∼P, which additionally quantifies the uncertainty of pk regarding the current knowledge domain, i.e., knowledge uncertainty.
Example 1: To illustrate the problem, the example in Fig. 2 is presented for a transient motion shown in Block 1 Fig. 1 with target pose 1-3 consecutively increasing in their numeric values, see Fig. 2(a).This trajectory compromises the OOD instances that approach the unintended pose 1 (in blue), rather than directly moving towards the true intention pose 2 (in red).The commonly used probabilistic classifier (Linear Discriminant Analysis) would confidently select the incorrect pose 1 around step k = 8 (red-dotted line) with low system uncertainty p1 k quantified, see Fig. 2(b).As such the estimated pose will switch from pose 3 to 1 before settling at pose 2, leading to an "undershoot" of the prosthetic pose.This illustrates the problem with the current methods which do not consider the knowledge uncertainty.The proposed approach, see Fig. 2(c), additionally quantifies the knowledge uncertainty as the variation of the system uncertainty (shaded area).It will refrain from making the incorrect decision due to the high knowledge uncertainty, even though pose 1 still has the highest probability indicated by the system uncertainty (line).
The proposed uncertainty-aware classification consists of four steps (Blocks 1−4 in Fig. 1) to reduce the occurrence of incorrect pose-switching caused by OOD inputs during transient motion.
• Step 1: Modelling the distribution of clusters associated with each candidate target pose Q c .
• Step 2: Recursive Bayesian uncertainty inference using the inputs at k th and outputs at (k − 1) th time instant.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
• Step 3: Uncertainty quantification at k th time instant.
• Step 4: Decide the pose estimation qk .Each of these steps is presented below.1) Cluster Distribution Model: Modelling the distribution of clusters in a high-dimensional space is challenging due to the curse of dimensionality, where increasing dimensionality leads to data sparsity.This often results in failures when using measures based on Euclidean distance [23].It is noted that in our problem setting, the dimension of features x is usually high d ≫ 1, as pointed out in [24].Therefore, the feature vector x is first projected to an m-dimensional latent space through a projection z = g(x), where m≪d and the mapping satisfies g : R d → R m .There are different ways to design this mapping.In this work, this mapping is designed to maximise the distances between the clusters relative to their spreads, i.e., to enhance separability, as discussed in [25].
Remark 1: The widely adopted dimensionality reduction techniques, Principal Component Analysis (PCA) and autoencoders are not applicable here, where the latent space is obtained only to capture the most variance in the overall data.As a result, the clusters associated with each target pose in the obtained latent space may not be well separated, reducing the achievable classification performance.
To accurately capture the inherent ambiguity and knowledge limitation of the training data, we adopt a method that involves modelling the distribution of each cluster associated with Q c .Specifically, we assume that the training data within each cluster originate from a mixture of a finite number, L, of skewnormal distributions, as outlined in [26].The parameter L serves as a design choice, and we will discuss strategies for its selection in the implementation section.This approach offers several advantages.Firstly, by leveraging skew-normal distributions, we can effectively account for the skewness inherent in the clusters, thus providing a more accurate representation of their underlying distribution compared to traditional Gaussian mixture models.Moreover, this method can balance between complexity and generalisation, mitigating the risk of overfitting often associated with deep learning approaches such as normalising-flow-based methods [27].
To obtain the ℓ th skew-normal distribution component, the skew-shape parameters λ ℓ ∈ R m , the mean µ ℓ ∈ R m , the covariance ℓ ∈ R m×m , and the weight parameter ω ℓ that satisfies L ℓ=1 ω ℓ = 1 are estimated based on the training data of each pose.Given these estimations, the probability density of the ℓ th component evaluated at the latent-space point z ∈ R m associated with pose Q c can be represented as where the covariance satisfies Remark 2: The proposed modelling method is scalable for adding new target poses.The corresponding cluster distribution models can be independently constructed using the associated data and integrated into the current latent space without affecting the existing cluster models.However, the separability of the clusters after adding a new pose requires careful assessment to ensure that classification performance is not significantly reduced.
2) Bayesian Uncertainty Inference: After observing the input z k and utilising modelled cluster distribution, we are interested in inferring a distribution P k over pk from which both the system and knowledge uncertainty can be quantified.The Dirichlet distribution, denoted as Dir (a k ), offers a one-step pathway for the desired inference [28].It is a C−dimensional distribution characterised by a k ∈ R C .It serves as a conjugate prior distribution to the categorical distribution parameterised by the pk , i.e., pk is distributed as a Dirichlet.The expected value of each dimension gives the system uncertainty pk .Besides, the distribution embeds the knowledge uncertainty where a high a k at a subset of dimensions means low knowledge uncertainty, i.e., the new input is likely to be covered by the training set.On the other hand, an evenly distributed low a k means high knowledge uncertainty.
To infer the posterior Dirichlet distribution, we use the pseudo-count method as in [20] but in a recursive way.The pseudo-count represents the "number of observations" that we have already seen at z k .Assume a 1 = 1 C leading to a flat equiprobable prior when observing no pseudo-count.The inferred a k after observing z k takes the recursive form where the γ ∈ [0, 1] is the forgetting factor which leverages the momentum from the previous step estimation whose entries are evaluated using the modeled cluster density function f c ℓ (•) as defined in (2) and the number of training samples belonging to the c th pose denoted as N c : 3) Uncertainty Quantification: The system uncertainty pk of each pose is calculated by leveraging the inferred Dirichlet distribution where a c k is the c th element of the vector a k .The knowledge uncertainty is embedded in P k = Dir (a k ) as discussed previously.To obtain quantified values necessary for decision-making, the credible interval (CI) of pc k is inferred from P k .The CI serves as a Bayesian analog to the confidence interval, representing the interval within which the estimated pc k falls with a particular probability.It indicates the uncertainty of pc k considering the current knowledge, i.e., knowledge uncertainty.We employ the Monte Carlo method for the inference [29], achieved through random sampling from the inferred Dirichlet distribution P k .Suppose N r random samples are drawn, and the sampled row vectors are concatenated into a matrix, with the c th column vector denoted as ψ c , representing the samples associated with pc k .
Consequently, the estimation of 100 • (1 − α)% credible interval of pc k uses the following calculation: where the subscript of ψ c denotes the sampling quantile.4) Decision Making: Leveraging the uncertainties quantification result from the former step, the decision-making is conducted in a null hypothesis test manner.The obtained system uncertainty pk is used to decide the hypothetical pose.Suppose the c th 1 entry in pk has the highest value and Q c 1 ̸ = qk−1 , the hypothesis formulation is given by H 0 : maintain the previous decision, i.e., qk = qk−1 The rejection rule is formulated using the knowledge uncertainty.Given the random samples ψ c to obtain the credible interval are paired, let us define where c 2 denotes the category that has the second highest value in pk .The H 0 is rejected if the lower bound of the credible interval drawn from ψ is strictly greater than zero, i.e., ψα/2 > 0.
C. Trajectory Planning Using Uncertainty-Based Velocity Regulation After deciding on the target pose, this subsection would elaborate on the velocity regulation and trajectory generation blocks, i.e., Blocks 5−6 in Fig. 1, which utilises the decisionmaking and uncertainty quantification results in Section II-B.The lower ψα/2 in the rejection rule (9) is, the higher the chance of misclassification.Therefore, to mitigate the impact of pose switching due to misclassification, the average velocity toward the estimated pose is proportional to the positive ψα/2 , which is then used for smooth trajectory generation.
1) Velocity Regulation: The average velocity toward the estimated pose is adjusted proportionally to positive ψα/2 by where v max denotes the upper bound of the average velocity.
2) Trajectory Generation: The movement jerk, i.e., the change of acceleration, has been used widely as the cost function for the modelling of human arm movement [30], [31].Thus, we adopt the minimum-jerk principle to generate 5 th -order polynomial trajectories.The generated trajectory is then sampled in motion control.The sampler holds the latest available trajectory sample for one sample interval and preserves the most recent value in the absence of further samples.Denote the trajectory generation function as (•, •, •, •, •), the generated continuous-time trajectory θ k (t) at time step k is given by: where represents the latest sample of the trajectory θ k−1 (t).The latest sample and its first and second derivatives are used as the initial conditions to ensure minimum-jerk and the continuity of the generated trajectory.The final value condition is set to achieve complete rest.The period of the trajectory is calculated based on the average velocity using 2 while tr ue do 3 Calculate pseudo-count b k based on x k using (4); Infer P k using the update rule from (3); Quantify system uncertainties pc k using (5); Quantify the knowledge uncertainty by ( 6) and (8); Formulate the hypotheses on qk using (7); Generate the trajectory θ k (t) using ( 12) and (11);

III. HUMAN-IN-THE-LOOP EXPERIMENT
To validate the efficacy of the proposed UA-DPC, a series of human-in-the-loop (real-time) prosthetic control experiments were conducted.The capability of dealing with OOD inputs can also be evaluated, as the transient movements are not used for training, and human participants can produce diverse transient movements, especially when they receive real-time visual feedback from the prosthesis movement.The participants were asked to control a powered 3-DoF transhumeral prosthesis to grasp and relocate clothespins in a dedicated virtual reality environment (VRE).The performance of UA-DPC is compared to a discrete-target approach using a traditional classifier without quantifying knowledge uncertainty and a continuous-target approach using a regression model, referred to as TD-DPC and CPC, respectively.This section presents the methods for human experiments and performance comparisons.

A. Implementation of Prosthesis Control Approaches
The UA-DPC, TD-DPC and CPC were implemented independently on the elbow flexion/extension (E fe ) and wrist Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
pronation/supination (W ps ).All the approaches update at 10 H z. The implementation details are explained as follows.
1) Uncertainty-Aware Discrete-Target Control (UA-DPC): For the UA-DPC, the latent space dimension were empirically set to m = 2 for E fe and m = 1 for W ps .The projection was obtained using the publicly available implementation 1 of [25].The skew-normal mixture model was fitted using the mixsmsn package in R, which employs an Expectation-Miximization algorithm [32].Then the Monte Carlo random sampling was performed using the gamma variable generation method proposed in [29], leveraging the fact that the Dirichlet distribution is constructed from the gamma function.The following parameters were chosen based on convention and experience.The number of random samples was set N r = 1000.The number of mixture model components L was chosen for each participant by the number with the smallest Akaike information criterion (AIC).The significance level was chosen as α = 0.05, following the convention.The forgetting factor was set γ = 0.2 where a high value would result in a faster response but can be more prone to make mistakes.The v max for elbow and wrist were empirically set at 30 deg • s −1 and 90 deg • s −1 .The generated trajectory was sampled at 90 H z.
2) Discrete-Target Control Using Traditional Classifier (TD-DPC): To demonstrate the significance of quantifying knowledge uncertainty, the proposed UA-DPC is compared to a traditional off-the-shelf classifier.The widely used Linear Discriminant Analysis (LDA) is chosen [3].It has shown comparable human-in-the-loop prosthesis control performance and robustness compared to multi-layer-perceptron-based method using training data with a few samples of each target pose [33], [34].For a fair comparison, we implemented the post-processing technique used in [15] to improve the LDA's robustness against signal noise.In this technique, the decisions are rejected unless the class-specific probabilities pc exceed the pre-defined thresholds.The thresholds were determined through the receiver operating characteristic (ROC) curve and the method used in [15].
3) Continuous-Target Control (CPC): The Locally Weighted Projection Regression (LWPR) was used for continuous-target control, which has been previously used in [24] to predict continuous target elbow and wrist poses using above-elbow biological signals.We used the MATLAB ® implementation of the LWPR library (version 1.2.4) from [35] and adopted the parameter settings as in [24].Moreover, to minimise the joint motion fluctuation at the target pose, we implemented the method in [36].The approach automatically switches to hand control and keeps the latest regression output.By doing so, the wrist and elbow joints can remain rest during grasping.

B. Integration of Hand Pinch/Open Control
Two types of hand pinch/open control were implemented.First, to show the practicality of UA-DPC in daily usage, the hand was controlled by the user-volitional co-contraction of the biceps and triceps, which utilises the temporal sequence of hand movements occurring after gross arm movements [36].
1 https://doi.org/10.26188/25591932 The use of muscle co-contraction has been long established to switch between different prosthetic DoFs [37].Specifically, a hysteresis toggle was implemented to improve the robustness against signal ripple and noise, where the rising edge of the co-contraction signal is used to toggle the hand function.Notably, during the co-contraction, the wrist and elbow control is deactivated for TD-DPC and CPC due to the movement fluctuation.No additional changes or efforts were made to UA-DPC.
Secondly, for the comparison of approaches, the hand was operated by a button pressed by the non-dominant hand.The button is chosen because we would like to isolate the learning effect of co-contraction control for a fair comparison.

C. Signal Acquisition
The joint kinematic signals and sEMG signals were acquired using wearable sensors as shown in Fig. 3(a).
1) Sensor Depolyment: The above-elbow joint kinematics are collected using three HTC VIVE ® Trackers (with motion capture sensors and an embedded IMU) placed on the participant's upper arm (UA), shoulder acromion (SA), and trunk (TR).They are used as inputs to the control approaches.The elbow and wrist kinematics are collected using the HA tracker, which is used as target pose labels for regression and classification model training.A brace is in addition strapped at the wrist to constrain wrist movement other than pronation and supination.The kinematic signals are sampled at 90 H z.
To acquire the upper-arm sEMG signals used as inputs, seven Delsys ® Trigno ™ wireless electrodes with a sampling rate of 1111 H z were attached to the dominant upper arm of the participants.Two of them were on the biceps long/short heads, two were on the triceps lateral/long heads, three were on the anterior, middle, and posterior of the deltoid.
2) Feature Extraction and Selection: The feature extraction was conducted under a transhumeral amputation scenario following the procedure introduced in [25].The time-domain sEMG features, muscle synergy features, shoulder and trunk rotational poses, and sternoclavicular translational pose were processed as input features.The wrist and elbow kinematics were processed as target pose labels reserved for model training.The kinematic and sEMG features were extracted using a moving window of 200ms with 100ms overlap.Hence, the feature extraction runs at 10 H z. The input features and corresponding sensors were selected following [25] such that the target-pose-specific data are as far as possible from each other with respect to their variance.

D. Virtual Environment and Avatar
The experiments were conducted in a dedicated VRE that is typical in prosthetic studies using non-disabled participants [4], [8], [38].We extend the VRE introduced in [39].The VRE facilitates the training data collection allowing the participants to complete tasks with their intact limbs.This is done by attaching a virtual hand following the movement of the HA tracker, see Fig. 3(b).The use of VRE also allows the emulation of transhumeral amputation for non-disabled participants as well as the evaluation of prosthesis control cases by fitting them with a virtual prosthesis, see Fig. 3(c).The virtual prosthetic joint behaves as a closed-loop 2 nd −order system tracking position reference.
E. Human-in-the-Loop Experimental Protocol 1) Participants: Twelve non-disabled participants (7 male, 5 female; all right-handed) participated in the study.The age range was [27,31] with a median of 28.The experimental protocol was approved by the University of Melbourne Human Research Ethics Committee, project ID 26442.Informed consents were obtained from all participants.
2) Task: For the assessment task, we chose the Refined Clothespin Relocation Task (RCRT) [22].It has been widely used in recent prosthesis control assessments [40], [41].The assessment was performed using a one-to-one scale virtual Roylan Pinch Grade Exerciser in VRE, see Fig. 3(d).The rack was adjusted to the hip height of the participants as stated in [22].The participants were asked to relocate two clothespins from the horizontal rod (position A and B) to the vertical rod (position C and D) and then return them to the horizontal rod, which is referred to as a complete cycle [40], as shown in the top part of Fig. 3(d).Furthermore, the color of the clothespin indicates its status, where blue means selected, yellow means in transit and light blue means having reached the target location and orientation.The clothespin is considered to have reached the target if the position error is within 2 cm in each direction and the orientation error is under 30 deg and is not physically contacting the rod.The angular error is calculated as the smallest amount of rotation needed to go from the current orientation to the desired one.
3) Model Training: To collect the data for the model training, the participants were asked to complete six complete cycles of the RCRT using their dominant-side upper limb in the first session, referred to as Baseline.Four random cycles out of the six were used for training while the rest were reserved for test.Upon releasing the clothespin at the target position, participants were instructed to hold the pose for one second.The quasi-static input features and labels during holding were used to train the classification model for UA-DPC and TD-DPC.The training of the regression model used the full trajectory of the features as conducted in [4] and [24].
Given the task setup in Fig. 3(d), we derived four discrete elbow flexion/extension (E fe ) target poses by averaging the quasi-static data at each location: A, B, C and D. Furthermore, two discrete wrist pronation/supination (W ps ) target poses were determined using data at location A and B and the other for location C and D.
4) Prosthesis Control Assessment: After obtaining the classification and regression models, three prosthesis control assessment sessions were conducted, in which each participant was assigned a random order of the three control approaches.The order was balanced among the 12 participants to mitigate its effect.Three complete cycles of RCRT were required in each session.A button was used to control the hand pinch/open to isolate the learning effect of co-contraction-based hand control for a fair comparison.

5) Asssessment of Integrating Co-Contraction-Based Hand
Control: The co-contraction-based hand pinch/open control was only applied to 3 participants conducted after the main assessment.This assessment was conducted as an additional test to demonstrate that the proposed UA-DPC can be integrated with a practical hand control method without additional changes or efforts, such as the need to deactivate the joint movement in TD-DPC and CPC.

F. Performance Metrics
Three categories of metrics were used to evaluate the performance of the Approaches: Baseline and three prosthesis control sessions, including (1) task performance; (2) movement quality and (3) cognitive load.
1) Task Performance: This category includes the metrics related to the RCRT performance.
a) Completion time per cycle: This metric counts the elapsed time per cycle of clothespin relocation.This is used to evaluate the overall performance of the Baseline and three prosthesis control approaches [40].
b) Incorrect pose switch instances per cycle: It identifies cases where the decisions regarding the pose are incorrect after evaluating the uncertainties in each cycle of clothespin Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
relocation.Instances of repeated misclassifications not causing pose change will not be counted.Thus the metric can effectively reflect the pose-switching in discrete-target control.This metric is adopted to compare the two discrete-target approaches, assessing the efficacy of UA-DPC in reducing the occurrence of incorrect pose-switching.It is worth noting that TD-DPC is also capable of rejecting high-uncertain decisions.
2) Movement Quaility: The metrics reflecting the movement quality during the task completion are also investigated.
a) Compensatory movement: This metric evaluates the additional effort of using the trunk and sternoclavicular movement to complete the task.This movement was observed when the output prosthetic movement was not effective for the task or as intended by the user [42].The trunk forward/backward (T fb ) and right/left (T rl ) bending angles, and the sternoclavicular elevation/depression (Sc ed ) and protraction/retraction (Sc pr ) displacements are calculated.They were obtained by combining TR and SA tracker's orientation readings.
b) Movement smoothness: This metric evaluates whether UA-DPC effectively reduces the impact of pose-switching on the movements of the human user and the prosthesis.We adopted the Modified Spectral Arc Length (SPARC) movement smoothness measure, introduced in [43].The SPARC measures the arc length of the curve generated by the velocity profile's Fourier magnitude spectrum [43].The metric is first applied to the 3-DoF shoulder (residual limb) rotational velocity profile during each relocation path.It was observed that the participants would adjust their shoulder movement when unintended prosthetic movement occurs [6], [13].This behaviour would result in more submovements of the shoulder joint during the operation, thus lowering the smoothness score.It is also applied to the two prosthetic joints during each relocation path to evaluate the amount of fluctuation due to either misclassification or input variance.
3) Cognitive Load: Moreover, the Raw NASA Task Load Index (TLX) questionnaire is adopted to measure the cognitive load and gain insights into the ease of use of the control approaches.The Raw TLX is a simple alternative to the more complex "traditional" TLX [44].
a) Task Load Index: The participants rate six sub-scales in completing the task, including, (mental, physical and temporal demands, frustration, effort, and performance).The final index is the average of the six sub-scales, the smaller the index, the less demanding the approach.The questionnaire was filled out by the participants after each session including the Baseline.

G. Statistical Analysis
First, we checked if the metrics fit a normal distribution using the Shapiro-Wilk test.For the metrics that fit a normal distribution, a Repeated Measure ANOVA was conducted where the with-in subject factor was the four Approaches, i.e., Baseline and three control approaches.For the metrics tend to be non-normally distributed, the Friedman test was used instead.In the case statistical significance was detected, the post-hoc multiple comparisons were performed using paired t-test and Conover test for Repeated Measure ANOVA and Friedman test, respectively.The p−values were adjusted using Holm-Bonferroni correction.Additionally, Cronbach's alpha ranged from 0 to 1 was calculated to assess the reliability of the NASA TLX questionnaire.The significance level was set to 0.05.The statistical tests were conducted using R.

IV. RESULTS AND DISCUSSION
In this section, the offline evaluation of the models is presented first to check the quality of the trained model.It is then followed by the human-in-the-loop prosthesis control performance which is the main focus and is crucial to evaluate the control approach.The dataset for the results presented herein is publicly available. 2

A. Trained Model Offline Evaluation
The trained models are first evaluated offline in terms of pose estimation performance to assess the training quality.This is then followed by an evaluation of the reliability of the class probability estimation.
1) Pose Estimation Performance: The offline incorrect pose switch instances and root-mean-square error (RMSE) per cycle assessed using the reserved test data are summarised in Tab.II.The instances are presented using the median (1 st quartile, 3 r d quartile).The RMSE results are listed using mean ± standard deviation.This format is used throughout Section IV.The UA-DPC and TD-DPC show fine quality with a low number of incorrect pose switches in offline evaluation.The UA-DPC performs equivalently as TD-DPC for W ps (χ 2 (1) = 0.2, p = 0.6), but worse for E fe (χ 2 (1) = 4.6, p = 0.03) using Friedman test.However, this does not indicate the UA-DPC is inferior since TD-DPC is fine-tuned using the test data while the parameters of the UA-DPC are set empirically.Besides this study focuses more on how well the offline performance can be transferred to the human-in-the-loop context.Moreover, the offline RMSE results of the regression model are comparable to the results reported in [24], which validates the quality of the trained model.
2) Probability Estimation Reliability: The reliability of the class probabilities predicted by the UA-DPC and TD-DPC are evaluated to assess the quality of the uncertainty quantification.The obtained probability calibration diagram is presented in Fig. 4a.In comparison to TD-DPC, the predicted probabilities of UA-DPC are closer to the observed fraction of being correct in the test data, i.e., closer to the perfect scenario represented by the dashed 1:1 line.To gain more insights, Fig. 4b shows the histogram of the maximum class probabilities when misclassification happens.In contrast to the overlyhigh confidence provided by TD-DPC, which leads to the notch in Fig. 4a around the predicted probability of 0.8, UA-DPC gives a more reasonable probability for incorrect instances.These results demonstrate the reliability of the system uncertainty produced by UA-DPC thanks to the use of knowledge uncertainty.

B. Prosthesis Control Assessment
To compare the performance of Approaches, three categories of performance metrics and their respective statistical analysis results are presented as follows.1) Task Performance: The completion time per relocation cycle grouped by the Approaches is shown in Fig. 5.A significant effect on time was found for the Approaches (χ 2 (3) = 77.2,p < 0.001).The Friedman test was used because the residual of data does not meet the assumption of normality (Shapiro-Wilk test for normality p < 0.05).The median completion time of UA-DPC is 32.8s (28.5, 38.9s), despite higher than the Baseline with 17.7s (16.2, 19.9s), still significantly faster than the other two approaches TD-DPC with 41.9s (35.4,57.5s), and CPC with 47.1s (37.2, 57.3s) and p < 0.001 for both comparisons.There is no significant difference found between TD-DPC and CPC, but the median of TD-DPC is around 5s faster than CPC.
Next, the incorrect pose switch instances per relocation cycle are demonstrated in Fig. 6.The Friedman tests were carried out for both DoFs (Shapiro-Wilk test p < 0.05).For the E fe in Fig. 6a, the UA-DPC results in a median instances of 4.5 (3,7) which is significantly lower than the TD-DPC, i.e., 10 (6, 13) with χ 2 (1) = 16.9 and p < 0.001.Regarding the W ps in Fig. 6b, the median instances of UA-DPC is 1 (0, 2).The result is also significantly lower than the TD-DPC, i.e., 2 (1, 5.5) with χ 2 (1) = 12.5 and p < 0.001.Based on the above observations, it can be drawn that the UA-DPC transfers the performance of offline classification to the human-in-theloop one far better than TD-DPC and facilitates efficient movement, thanks to the handling of uncertainty introduced by varying human-in-the-loop control inputs.
2) Movement Quality: In addition to the task performance, the movement quality during task completion is depicted in Fig. 7, including the compensatory movement and movement smoothness.For the compensatory movement shown in Fig. 7a and 7b, it is observed that using different Approaches does not significantly affect the compensation of T fb (χ 2 (3) = 4.6, p = 0.21, Shapiro-Wilk p < 0.05).But the T rl vary significantly across Approaches (χ 2 (3) = 18.2, p < 0.001, Shapiro-Wilk p < 0.05).The post-hoc test reveals that the difference exists between the Baseline and Approaches ( p < 0.05) rather than among the Approaches.It is worth noting that the UA-DPC has a much smaller IQR of T rl with 7.4 deg compared to TD-DPC's 19.8 deg and CPC's 18.4 deg, indicating a reduced variance among participants.Regarding the sternoclavicular compensation, all the control approaches result in a significant increase compared to Baseline ( p < 0.001).While the UA-DPC is shown to induce less median Sc ed compensation with about 1 cm than the other two approaches ( p < 0.001).
The movement smoothness of the residual limb and prosthetic joints are presented in Fig. 7c and 7d.It is observed that the participants using UA-DPC for prosthesis control produced a smoother 3-DoF residual limb movement than TD-DPC and CPC ( p < 0.05), see Fig. 7c.Additionally, this smoother movement is also observed in the 2-DoF prosthesis movement ( p < 0.001) as shown in Fig. 7d.Thus, the results show that the proposed UA-DPC offers a solution to overcome the smoothness problem by mitigating the misclassification impact through uncertainty-based velocity regulation.The TD-DPC yields similar median prosthetic movement smoothness as CPC(−25.6 vs. −20.6 for E fe with p = 0.20, and −19.2 vs. −21.9for W ps with p = 0.061).However, the large interquartile range (IQR) of TD-DPC implies that some participants might have encountered greater fluctuation than CPC due to misclassification.
3) Cognitive Load: The Raw NASA task load index questionnaire results are illustrated in Fig. 8.The Shapiro-Wilk test gives p = 0.73.Cronbach's alpha gives 0.93, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.which is close to 1, thus indicating that the questionnaire is relatively reliable, i.e., the scales are understood and rated consistently among the 12 participants.As expected, the results demonstrate that using a prosthesis is more mentally demanding than using the sound limb ( p < 0.01).However, the UA-DPC (33.9 ± 15.9) was rated to be significantly less demanding than TD-DPC (51.4 ± 22.7, p < 0.05) and CPC (56.0 ± 21.9, p < 0.001).Despite the average index of TD-DPC being lower than that of CPC, no significant difference was detected.
4) General Discussion: Based on all the metrics, it can be argued that the proposed UA-DPC results in improved human-in-the-loop performance compared to TD-DPC and CPC in prosthetic joint movement control.Compared to TD-DPC, the UA-DPC demonstrates robustness to OOD inputs introduced by varying human-in-the-loop control inputs, providing reliable prosthetic pose and smooth prosthetic movement.Furthermore, the proposed UA-DPC effectively drives the prosthesis to the user-intended prosthetic poses.This is substantiated by the efficient completion time, reduced amount of compensatory movement and smoother residual limb movement than TD-DPC and CPC, which suggests the participants were effectively controlling the device as intended.
Moreover, regarding the comparison between TD-DPC and CPC, despite the prosthetic movement smoothness issue due to misclassification with TD-DPC, it still marginally enhances the performance than CPC, considering completion time, residual limb movement smoothness and cognitive load.The participant appeared to more effectively master the discrete-target approach compared to the continuoustarget one, which is substantiated by the reduced cognitive load, despite only marginal reduction against CPC.While the prosthetic movement smoothness issue in the traditional approach (TD-DPC) could hinder the wider adoption of this simple DPC approach, thus demanding efforts in improvement such as the UA-DPC.

C. Assessment of Integrating Co-Contraction-Based Hand Control
In the additional sessions, three participants, namely S1-S3, were tasked with using muscle co-contraction-based hand open/pinch control.The completion time using button and muscle co-contraction for hand control is presented in Fig. 9.In terms of the increment of the time after the integration of hand control, S3 exhibited a relatively low increase compared to both S1 and S2.This might be attributed to the difference in proficiency with the control method.It suggests the potential for achieving relatively minor increments through adequate user training of the muscle co-contraction-based hand control.Furthermore, the UA-DPC prompts a much smaller increase than CPC for all participants.Additionally, the UA-DPC holds better consistency regarding the completion time when using muscle co-contraction-based hand control compared to TD-DPC.It is worth noting that even though the completion time of UA-DPC for S3 is comparable to that of TD-DPC, the UA-DPC results in a reduction in completion time compared to using a button, while TD-DPC shows a noticeable increase.Based on these observations, the UA-DPC demonstrates its compatibility with user-volitional muscle co-contraction-based hand control and practicality in activities of daily living.

D. Limitations and Future Work
Although this work has yielded valuable insights into the UA-DPC and the discrete-target paradigm, the limitations prompt the need for further research.First, the muscle cocontraction-based hand control was tested on three participants as a proof-of-concept for practicality.Although the results demonstrate the feasibility, it would be beneficial for future studies to investigate the performance with more participants.Second, including amputee subjects and hardware setups involving physical interaction would be beneficial to validate the UA-DPC in real-life usage for amputee users.Model adaptation can also be investigated to tailor the approach to amputee users.Moreover, the candidate target pose set is fixed for a specific set of tasks in this study.The proposed approach is designed to ensure reliability for these tasks.It is also scalable for covering additional tasks and/or increasing the pose control resolution by including new target poses, as discussed in Remark 2. Evaluating this potential for adaptation in future studies is important.Lastly, throughout the experiment of each participant, the sensors remained in place without the donning/doffing.Reinstalling the sensors can result in input signal shift and skew, particularly for sEMG [45], [46], thereby necessitating model adaptation.One possible approach can be applying transformations to the model in the latent space with minimal calibration data as proposed in [46].

V. CONCLUSION
The human-in-the-loop experimental results demonstrate the superior performance of the proposed UA-DPC when compared to both TD-DPC and CPC.It effectively reduces the occurrence and consequential impact of pose-switching due to misclassification and provides reliable movement.This, in turn, allows for efficient task completion, smoother movement and reduced cognitive load.Moreover, the UA-DPC exhibits practicality for integration with hand control approaches, e.g., the muscle co-contraction-based method presented here.The UA-DPC demonstrates the potential of the discrete-target control as an intuitive and robust prosthesis control approach.The results also encourage further research on this paradigm, not limited to the gross arm movement application scenario.

Fig. 1 .
Fig. 1.Block diagram of the proposed uncertainty-aware discrete-target prosthesis control (UA-DPC) with an example motion trajectory taken from pose cluster 3 in yellow to pose cluster 2 in red (see Block 1 Cluster Model), evaluated at time step k = 8.

Fig. 2 .
Fig. 2. Example: (a) three target prosthetic-elbow poses; classify the trajectory in Fig. 1 using (b) Linear Discriminant Analysis (LDA) and (c) the proposed method.The red dotted line denotes the circled point at time step k = 8 in Fig.1.The LDA is prone to misclassify for the OOD inputs but the proposed method does not, which gives a reliable system uncertainty (line) and additional knowledge uncertainty (shaded area).
f n (•) denotes the m-variate probability density function (pdf) of a standard normal distribution, and n (•) represents the cumulative distribution function (cdf) of a univariate normal distribution.

) Algorithm 1
UA-DPC Input at step k : L ℓ=1 f c l (•): Skew-normal mixture model of each pose category c; x k : Input at current time step; Q: Candidate target pose set; γ ; Forgetting factor; α: Significance level; N r : Number of random samples Output at step k: θ k (t): Generated prosthetic joint trajectory;

Fig. 3 .
Fig. 3. (a) Sensor placement, (b) Non-disabled avatar, (c) Avatar with transhumeral prosthesis emulating amputation, (d) Virtual RCRT setup, the top figure depicts a complete cycle of the RCRT consisting of four relocation paths, e.g., the path 1 involves picking up the clothespin at location A and relocating it to location C. The bottom two figures illustrate the non-disabled and the amputated avatar performing the task.

Fig. 4 .
Fig. 4. Plots for evaluating the quality of uncertainty quantification: (a) probability calibration diagram comparing UA-DPC with TD-DPC.A perfect uncertainty quantification is expected to align with the dashed 1:1 line.(b) the predicted maximum class probability for incorrect instances.

Fig. 5 .
Fig. 5.The violin plot of completion time per relocation cycle grouped by Approaches.The white dots depict the medians and the black bars inside the "violins" represent the interquartile range (IQR).The width of the "violins" represents the density of data points at different levels.The significance test results are shown as * denoting p < 0.05, ** denoting p < 0.01, and *** denoting p < 0.001, which is used for all figures.

Fig. 6 .
Fig. 6.The violin plot of incorrect pose-switching instances due to misclassification per relocation cycle of two discrete-target approach UA-DPC and TD-DPC for both DoFs: (a) elbow flexion/extension (E fe ) and (b) wrist pronation/supination (W ps ).

Fig. 7 .
Fig. 7.The box plots of movement quality metrics grouped by Approaches: (a) the 2-DoF trunk compensatory movement, including trunk forward/backward (T fb ) and right/left (T rl ) bending angle, where forward and right is the positive direction; (b) the 2-DoF sternoclavicular compensatory movement including sternoclavicular elevation/depression (Sc ed ) and protraction/retraction (Sc pr ) displacement, where the elevation and protraction is the positive direction; (c) the 3-DoF shoulder (residual limb) joint movement smoothness, including shoulder flexion/extension (S fe ), adduction/abduction (S aa ) and internal/external rotation (S r ); (d) the 2-DoF prosthetic joint smoothness, including elbow flexion/extension (E fe ) and wrist pronation/supination (W ps ).

Fig. 8 .
Fig. 8.The violin plot of the Raw NASA task load index questionnaire results grouped by Approaches.The statistical significance test results are presented in the same manner as Fig. 5.

Fig. 9 .
Fig.9.The completion time of 3 approaches for participants S1-S3.The suffix "btn" or "co" denotes the use of button pressing or biceps and triceps co-contraction for hand control.The error bar represents the maximum and minimum completion time of the three trials.