Toward Impedance Control in Human-Machine Interfaces for Upper-Limb Prostheses

— Objectives: Adaptation of upper-limb impedance (stiffness, damping, inertia) is crucial for humans to physically interact with the external environment during grasping and manipulation tasks. We present a novel framework for Adaptive Impedance Control of Upper-limb Prosthesis (AIC-UP) based on surface electromyography (sEMG) signals. Methods: AIC-UP uses muscle-tendon models driven by sEMG signals from agonist-antagonist muscle groups to estimate human motor intent as joint kinematics, stiffness, and damping. These estimates are used to implement a variable impedance controller on a simulated robot. Designed for use by amputees, joint torque or stiffness measurements are not used for model calibration. AIC-UP was evaluated with eight able-bodied subjects and a transradial amputee performing target-reaching tasks in simulation through wrist flexion-extension. The control performance was tested in free space and in the presence of unexpected perturbations. Results: AIC-UP outperformed a neural network that regresses the desired kinematics from sEMG signals, in terms of robustness to muscle coactivations needed to complete the task. These results were in agreement with the qualitative feedback from participants. Additionally, AIC-UP enabled the user to adapt the stiffness and damping to the tasks at hand.


I. INTRODUCTION
H UMANS use coactivation of agonist-antagonist muscles to modulate the limb impedance in a time-and taskdependent manner, independently from the limb kinematics [1].Estimation of the motor intent in terms of joint kinematics and impedance would therefore be relevant when substituting missing limbs with artificial ones.However, enabling a user to voluntarily control the impedance of even just a single Many methods have been developed to learn a mapping from sEMG signals to target kinematics (i.e., joint kinematics or motion classes).These include pattern-recognition methods [2], [3], regression-based [4]- [6], and unsupervised ones [6]- [8].In recent times, deep learning methods are increasingly being used to extract sEMG features and learn complex non-linear mapping between sEMG signals and target kinematics [4], [9]- [14].However, the robustness of these methods has not been tested during control tasks that require substantial changes in the coactivation of muscles (i.e., limb impedance), making it unclear whether the control performance of the algorithms deteriorates in these tasks.In addition to data-driven approaches, progresses in musculoskeletal modelling have provided physiologically accurate kinematics and motion dynamics predictions.Muscle-tendon models (MTUs) are used to estimate muscle-tendon forces, and predict the body kinematics and dynamics of motion given the input sEMG signals.The complexity of such simulations, determined by the number of MTUs and the approach used to model MTUs, is a trade-off between physiological accuracy in the predictions [15]- [17] and computational cost [18]- [20].This is crucial in applications that have real-time constraints, such as prosthesis control.Moreover, the inability to measure physiological parameters (e.g., moment arms) needed for model identification, makes complex MTUs-based simulations impractical when muscles may be (partly) missing.Lumped muscle-tendon models have been introduced to limit the modelling complexity by reducing the number of MTUs and thus the number of sEMG recordings sites [21]- [23].In these methods, muscles with the same functionality (e.g., agonist muscles) are modelled as a single MTU.As a result, the actuation of a DoF can be simplified to only two MTUs.In addition to evaluating these methods in simple motions in free space, recent studies have explored the robustness of lumped MTUs to different arm loadings [24] and postures [25] for able-bodied subjects.Preliminary results on the offline prediction of kinematics during 3-DoF motion have also been presented in [26] for an able-bodied subject.While promising for prosthesis control applications, these methods do not compute and use information about the muscle and joint impedance available from MTUs models.
Our approach makes use of lumped muscle-tendon models.However, in a departure from existing work, we define an optimization framework for training such models to estimate the user motor intent in terms of joint kinematics, stiffness, and damping without using a reference joint torque or stiffness.

B. Impedance control of upper-limb prostheses
Given the association between cocontraction of agonist/antagonist muscles and joint impedance [1], a signal defining the level of coactivation of agonist and antagonist muscles is typically used in control schemes that attempt to adapt the stiffness of the prosthesis.The coactivation index, also defined as stiffness index, is computed as the weighted sum of the amplitude of processed sEMG signals of agonist and antagonist muscles [27].Difficulties in discriminating changes in sEMG signals associated with changes in joint position or joint stiffness were avoided by using sEMG signals from different muscle groups (chest and upper-limb) [28].In [29], a cocontraction index and a task-specific threshold on muscle coactivation were used to limit the sensitivity of velocity-based proportional control to variations in muscles coactivation and enable an amputee to simultaneously control the velocity and stiffness of one DoF by only using a pair of sEMG sensors.Moreover, it was shown that the amputee preferred variable stiffness control to a fixed-gain high-stiffness controller.Other methods used reference joint torques and kinematics to learn a model of joint stiffness and damping (polynomial function of sEMG signals) [30], [31].While these models have been used to implement an admittance filter to estimate the DoF kinematics from joint torque [31], the estimated stiffness and damping were not employed to implement a variable impedance controller on the robot.
Methods that use MTUs, do not estimate the joint stiffness from the muscle-tendon model's state and contraction dynamics; typically, the joint stiffness is either computed as a weighted sum of the amplitude of sEMG signals from agonist-antagonist muscles, or as the weighted sum of the joint torque generated by each muscle-tendon unit [32].In [32], the stiffness index was linearly mapped by calibration to the desired stiffness range (i.e., joint stiffness) according to the subject's requirements, the type of task, and the robotic system.Joint damping was set to vary proportionally to the joint stiffness.The control performance provided by the framework was evaluated with an able-bodied subject on a knee exoskeleton.In the context of upper-limb exoskeletons, a similar approach to stiffness estimation was described in [33].In [34], the joint stiffness and position of a single DoF were estimated from a pair of sEMG signals using two hyperbolic tangent models driven by the sum and the difference of the amplitude of processed sEMG signals, respectively.
Finally, there has been a limited evaluation of the control performance provided by previous methods in relation to the modulation of stiffness [28], [30]- [32], [34].

C. Contributions of this work
We make the following contributions: • We describe AIC-UP, an sEMG-based framework, that enables the user to voluntarily adapt the kinematics, stiffness and damping of one DoF of a simulated robot through wrist flexion-extension.AIC-UP comprises a "Detection of human motor intent" component (Figure 1-A) that incorporates lumped muscle-tendon models, and the "Prosthesis control" component to execute the estimated motor intent through a simulated robotic system based on a position-based variable impedance controller.• The framework's design is constrained by the application domain.Unlike prior work (Section I-B), we assume the impossibility of measuring joint torque and stiffness trajectories to optimise the muscle-tendon models.This problem is tackled by enriching the dataset used to train muscle-tendon models, designing a novel optimization framework, and by imposing constraints on the parameter space of muscle-tendon models.
We evaluated AIC-UP with eight able-bodied subjects performing reaching tasks in free space and in the presence of unexpected external perturbations.A case study was also carried out with a transradial amputee.AIC-UP was compared with a baseline comprising a neural network trained to learn a mapping from sEMG to joint kinematics without explicitly learning and estimating the joint stiffness or damping.

II. METHODOLOGY
We first describe the two components of AIC-UP, highlighted in Figure 1-A in pink and blue.Then, Section II-C provides a solution to the ill-posed problem of estimating the value of the parameters of MTUs in the absence of a reference joint torque and stiffness.As an example of a controlled robotic system, we simulate the model of the Puma 560 robot because its characteristics are well-understood; we consider the chain from link 0 to link 2 and control joint 2. The simulation is implemented using CoppeliaSim [35] and MATLAB [36].For simplicity, the time dependence of variables is dropped in the description below.

A. Detection of human motor intent
The first component of AIC-UP maps the preprocessed sEMG signals of the agonist and antagonist muscles (ch 1 , ch 2 ) to an estimate of the user's motion intent as joint kinematics, stiffness and damping (s r , K, D) in two phases detailed below.1) Phase 1 -Muscle-tendon contraction dynamics: Two lumped MTUs were used to model the macroscopic properties of agonist and antagonist muscles, based on the Hill's muscle-tendon model [37].Specifically, we adopted the model structure discussed in [38], where it was shown how the serial damping element (DE) enabled the suppression of highfrequency oscillations within the model.Each M T U i of length l i M T U is composed of a muscle of length l i ce in series to a tendon of length l i se .The muscle is modeled by a contractile element (CE) and a parallel elastic element (PE).The tendon comprises an elastic element (SE) in parallel to DE, both added in series to the muscle (Figure 1-C).Given ch i , CE generates a force F i CE as a function of l i ce and contraction velocity li ce .The contraction dynamics of both MTUs predicts the muscletendon forces (F 1 , F 2 ).The state of the MTUs (l ce , lce ) at the next time step is obtained at the end of phase 2 of the framework component, since it also depends on the predicted joint position q r of the "Simulated robot model".
2) Phase 1 -Muscle-tendon stiffness and damping: Among the approaches detailed in Section I-B, in AIC-UP the stiffness K i and damping D i of each M T U i is estimated from the M T U i state and then mapped to the simulated robot's joint space.K i is modeled as the muscle stiffness K i m in series with the tendon stiffness K i t , computed as . D i is modelled as the muscle damping in series with the tendon damping and computed in the same way.We compute K i m as the directional derivative of F m with respect to unit vector of l i ce [39]: This formulation, differently from the stiffness index (Section I-B), takes into account the state of the muscle (l i ce , li ce , ch i ) and it removes the contribution to stiffness due to changes in muscle force due to changes in li ce and ch i .Similarly, K i t is computed as the directional derivative of F i t = F i se +F i de with respect to unit vector of l i se = l i M T C −l i ce .While muscle damping D i m was not computed in [39], we obtained it as directional derivatives of F i m with respect to li ce unit vector as follows: The tendon damping D i t was computed as directional derivative of F i t with respect to the tendon extension velocity li se = li M T U − li ce unit vector.
3) Phase 1 -Geometric arrangement of MTUs on robot's link: ) to a fixed base (l i a ).The length l i M T U is dependent on q r .Given the parameters α i and the initial joint position q r = 0, we can compute l i a as l i M T U sin α i .The values of l i a and l i b are constant and identified based on the position of CoM and the initial length of the MTUs.The MTUs length l i M T U (q r ) and moment arm r i (q r ) vary as function of q r : Next, the muscle-tendon forces, stiffness, and damping are mapped to joint space quantities using the Jacobian matrix ] T containing the moment arms r i of the two MTUs: 4) Phase 1 -Mapping from muscle space to joint space: The net torque generated by applying the MTUs forces F 1 and Considering the definition of τ r and the dependency of R on q r [40], we compute K as follows: (5) Where the derivatives ∂Fi ∂qr is the stiffness of M T U i .The joint damping is computed as D = 2 i=1 (D i (r i ) 2 ).5) Phase 2 -Forward dynamics: At this stage, the human motor intent is represented by the joint torque τ r , joint stiffness K, and damping D. The torque τ r is applied at the robot's joint using its forward dynamic model, to obtain the reference motion s r = (q r , qr , qr ) needed to implement the positionbased impedance controller discussed below.

B. Prosthesis control
A position-based variable impedance controller is used to track s r with K and D. The dynamic model for a robot with one rotational joint is: where M is the link's joint space inertia, g is the gravity compensation torque, and τ ext is the external perturbation on the robot joint.We build on the impedance control method used in the absence of force-torque readings [41] to define the control law as follows: This definition uses the robot's link inertia since only low accelerations are reached during control.We design the MTUs' length and contraction velocity to be a function of s r so that any external perturbation τ ext only affects s f = (q f , qf , qf ), while s r and the MTUs remain unaffected and represent the user motor intent based on the input sEMG signal.This enables the implementation of the user's "corrective action" in the impedance controller.In the absence of external perturbations (τ ext = 0), q r matches q f .If τ ext is non-zero, depending on K and D, q f will start diverging from q r .Therefore, q f serves as visual feedback for the user, who can perform runtime adaptation of the simulated robot's state and gains (K, D) by modulating the muscles' coactivation to reduce the error between q r and q f and achieve the desired performance.

C. Muscle-tendon models training
While the MTUs structure is defined based on [38], suitable values for the parameters of each M T U i have to be defined.Table IV lists the parameters p i ∈ R m of M T U i to be optimized.Related work uses a reference joint torque or joint stiffness (Section I-B) to optimise the MTUs models.As explained in Section I, our chosen domain of application is upper-limb prosthesis, meaning that we do not have access to any reference joint torque or stiffness.Solutions to this issue are described in the following.
1) Structural assumptions on MTU: Muscle-tendon systems characterised by a tendon longer than the muscle enhance control and impedance modulation [42], [43].The hypothesis on the functional properties enabled by this MTU's structure has been investigated in [44].We thus define MTUs with a long tendon compared to the muscle, by setting the tendon slack length to 2  3 l i M T U .The muscle and tendon length ratio matches that of the muscle-tendon complex investigated in [44].

2) Simplification of MTU parameters:
Model reparametrization is detailed in Table IV.Sensitivity studies led to two model simplifications: (i) the pennation angle is set to be zero; (ii) The optimal length l i opt is modelled as a constant parameter to be estimated, and not as function of the input activation [45].
3) Optimization signal: We collected sEMG signals and the corresponding reference trajectory q train f to optimise the MTUs within AIC-UP.We used the final joint position q f , which depends on the dynamics defined by the gains (K, D), as the optimisation signal and collected examples of sEMG signals and reference trajectory performed at different levels of muscle coactivation (Section III-C.1).This important change enabled us to train the MTUs such that the stiffness and damping estimated from the MTUs' state can be incorporated directly into the position-based variable impedance controller without further tuning.Including the impedance controller in the optimization framework avoids a mismatch between the dynamics of the MTUs and the robot's one.Exemplary experimental results in support of the argument are provided in Appendix I and shown in Figure 6.The prediction function f : R 2m+2 → R acts on the input defined by [ch 1 (t), ch 2 (t)] ∈ R 2 and the parameters of the MTUs p = [p 1 , p 2 ] ∈ R 2m to produce the final joint position q f (t) ∈ R.Then, the constrained optimization problem is: where q train f (t) ∈ R is the measured wrist flexion-extension angular position; lb, ub ∈ R 2m are the lower and upper bounds of p in Table IV, and T is the trajectory length.The following constraints are added to the optimization problem to prevent numerical instability, aid in convergence, and impose assumptions discussed in the section above: where l i ceInit is l i ce when q r = 0, such that CE operates in the muscle-length range.W des and W asc are the width of the descending and ascending branches of the isometric curve, as indicated in [38].
• if l i ce < 0.001l i opt or l i ce > 0.95(l i M T U − l i see0 ) set li ce = 0 such that l i M T U = l i ce + l i see0 and tendon cannot be compressed.l opt is the length at which the maximum isometric force is reached, l see0 is the tendon slack length.

III. EXPERIMENTAL EVALUATION
The experimental setup and protocol are illustrated in Figure 2. First, the data (E, q train f ) were collected as needed to train AIC-UP and BL.Then, the trained model was used for an online control experiment where the subject was given realtime control of the (simulated) robot plant and had to perform target-reaching tasks in the free space and in the presence of unexpected perturbations.

A. Participants
Eight able-bodied volunteers (five females, three males, age: 27.87 ± 3.64, right-handed) without neuromuscular disorders and prior experience in myocontrol, and a transradial amputee (female, age 65) took part in the study approved by the ethics committee of the University of Birmingham (ERN  and Imperial College London (18IC4685).The amputee participant was not a prosthesis user.The sEMG from all the channels of the Myoband were used for the baseline.The wrist position q train f was tracked with a Qualysis motion capture system for the able-bodied subject.For the amputee, q train f was the trajectory of the visual cue the participant had to follow during data acquisition experiment.

C. Experimental protocol
For each participant, experiments were conducted in three sessions.In the first session, we collected data to train AIC-UP and baseline (BL); the online control performance provided by AIC-UP and BL was then tested on two separate days to avoid muscle fatigue and involuntary bias due to the order in which frameworks were evaluated.
1) Data acquisition for muscle-tendon model training: During each trial, a visual cue moved along one of the axes and the subject had to move their wrist to proportionally match this cue.Each DoF motion was repeated 15 times while the subject was instructed to perform the wrist motion while modulating the muscle coactivation to achieve different levels of wrist impedance (Figure 2-A).We ensured that the subjects understood the concept of limb impedance by explaining to them that muscle cocontraction allows modulating limb rigidity, which affects the interaction with the external environment.Although we focus on the control of a single DoF (flexionextension), we asked the subjects, during data collection only, to also perform repetitions of ulnar-radial deviation so that we could observe the "unintentional" flexion-extension motion and include these in the training dataset.The sEMG signals E and wrist position q train f from 15 trials of flexion-extension motion and the 15 indirect flexion-extension motions were collected.A 60-40 split of this data was used for training and validating the muscle-tendon models, with optimization based on Simulated Annealing [46] (500 iterations, 5000 function evaluations, initial value of temperature 300, annealing interval 50) since the cost function has discontinuous derivatives.The same overall process was followed for the amputee participant, except the trajectory of the visual cue (the black circle in Figure 2-A) was used as q train f .
2) Online testing.Target-reaching task: As shown in Figure 2-B, in each trial a participant had visual feedback of their predicted wrist position q f (green circle) and was asked to perform wrist flexion-extension to accurately reach a target position T i (purple circle).Once at the target, the subject had to maintain the position for three seconds.Every time the subject could not maintain the position for the set time the 3-second dwelling time was reset.The ratio between the radius of the circle for q f and for the target T i was 3  4 , requiring precise control.Experimental trials for each subject were divided into three blocks (Figure 2-B): familiarisation with the control interface; reaching tasks in the free space; and reaching tasks in the presence of a perturbation field τ ext that pushed q f away from the target.At the beginning of each session, the subject was told that different motor control strategies could be explored, (e.g., relaxed movement, changing muscle coactivation), but the subject had no prior knowledge of the method being tested.The subject was told that some force would perturb q f , but no information about the force field (type, magnitude, location) was provided to avoid biasing their control strategy.This choice allowed us to investigate the user's (visual) perception of the external force field depending on the control method being used (Section III-D.2).A uniform force field was activated when the distance from the centers of the cursor q f and the target was 15 [deg] (d in the equation of Figure 2) and pushed the cursor away from the target.The magnitude of the perturbation was defined as a percentage of the maximum torque τ max f = K max q r generated by the subject during training for AIC-UP by considering the maximum stiffness K max across trials.The contribution of damping to τ max f was not considered due to its high dependence on joint velocity which could lead to values of τ max f unfeasible to counter during online control when the joint velocity is likely to be low due to the resistance opposed by the force field.The impact of different magnitudes of force field was investigated in preliminary studies, concluding that 10% of τ max f was adequate to provide visual feedback perceived by the subject as a perturbation of q f to then trigger a change in control strategy, and to avoid muscle tiredness.

D. Data-driven baseline
The baseline used for comparison was a two-layer neuralnetwork (NN) that learned a mapping from sEMG signals to q train f [6] and predicted q r .The same training data were used for training AIC-UP and NN.The NN was trained to match the performance reported in [6].To ensure accurate motion tracking and perturbation rejection, a high-stiffness (K B = 100[N/rad]) proportional-derivative controller was added in cascade to the NN to track the predicted joint position q r and obtain q f .The damping was set assuming a critically damped system (D B = K B /4[N s/rad]) [47].Notice that the definition of τ max f is suitable in relation to the proportional and derivative gains of the high-stiffness controller.
1) Performance measures: The design of target-reaching tasks to evaluate the online control of human-machine interfaces is common in the literature and it is based on Fitt's studies [48].We selected six widely used performance measures [49] to quantify the task performance for four targets illustrated in Figure 2-B: (i) Success Rate (SR) [%]: proportion of successful trials, with a trial successful if the target is reached within 30 s and the target position held for 3 s; (ii) Near Miss (NM) [#]: number of times the subject entered the target circle, but did not maintain the position for 3 s; (iii) Time to Reach (TR) [s]: time to complete the trial, with 30 s as the maximum allowed time.All the measures are affected by distance to the target, which may impact the difficulty of the task and are thus weighted by an index of difficulty [49] considering the target circle radius and the distance form the origin to allow comparison across the four targets.To further characterise the impact of enabling joint stiffness and damping modulation for AIC-UP, to smooth out the oscillation imposed by the force field, we considered two additional performance measures: (iv) Coactivation (CA) was computed as ch 1 + ch 2 , where ch i is the normalised amplitude of the preprocessed EMG signal averaged across a trial.The same channels of the Myoband are used for AIC-UP and BL to obtain ch i .(v) Smoothness (SPARC) of q f is computed using the SPARC measure [50]; we expected to observe a higher value of SPARC if the subject successfully countered the external perturbations and modulated the joint impedance to smooth out the oscillation faster.While BL has constant high stiffness and damping, AIC-UP required the user to modulate such values via muscle cocontraction; (iv) The Mutual Information (MI) between τ f and q r is used to quantify the predictability of q r given τ f ; MI has been used in literature for dynamic system analysis (e.g., [51]).Since q r is the unperturbed reference trajectory and τ f is the torque that results in q f , we expect MI to increase when q r matches q f , thus when the subject quickly counters the perturbation.
2) Survey of user's perception of controllability: We explored the user's perceived controllability provided by AIC-UP and BL, in terms of control intuitiveness, effectiveness and robustness asking the subjects to answer six questions about the control methods at the end of each experimental session (Questionnaire in Figure 2-D).We investigated if the subjects modulated joint impedance as a strategy to accomplish the task and asked them to describe the force field properties they understood while using the control methods and interacting with the perturbations.Users had to choose one of the following answers to the first three questions: good (A1), fair (A2), and poor (A3).We have resolved to use a 3-level Likert scale since we found that participants tended to avoid extreme-category responses or could not decide between categories 1-2 and 4-5, for a 5-levels scale.The remaining questions allowed freeform answers.The participants were unaware of the control method being evaluated when completing the questionnaire.

E. Independent stiffness control
To assess whether stiffness could be controlled independently from kinematics, we analysed the correlation between joint kinematics, muscle coactivation and joint stiffness and damping during the three phases of the reaching-target task performed in the presence of perturbations: phase 1) movement from the origin towards the target, before entering the force field; phase 2) moving in the force field, towards the target; phase 3) maintaining the target position for 3 seconds while countering the force field perturbations.We defined the following measures: i) M I(q r , K), the correlation between the joint position and joint stiffness computed as mutual information between the two variables; ii) M I( qr , D), the mutual information between joint velocity and joint damping; iii) M I(K, ch 1 + ch 2 ), mutual information between coactivation of muscles and joint stiffness; iv) the integral of joint stiffness K and of vi) damping D.

IV. RESULTS
All participants completed the online reaching-task experiment with AIC-UP and BL, and the questionnaire.The Wilcoxon signed-rank test was used to measure the statistical significance (p-values < 0.05) between the distributions of performance measures for AIC-UP and BL.These were not normally distributed based to the Kolmogorov-Smirnov test.

A. Offline tracking results
In able-bodied subjects, the average root mean square error (RMSE) between the predicted and reference joint position obtained during offline testing was RM SE AIC−U P = 0.2291 ± 0.0457 [rad] and RM SE BL = 0.1763 ± 0.0435 [rad], for AIC-UP and BL respectively.BL achieved higher prediction accuracy than AIC-UP.For the amputee, the tracking errors were RM SE AIC−U P = 0.4014 [rad] and RM SE BL = 0.5817 [rad].The substantially higher average RMS values for the amputee than the able-bodied subjects are mainly due to lack of reference wrist trajectory for the amputee.I and Table II of Appendix II.Note that in B) the success rate is a single value for each group, no statistical analysis is considered.Fig. 4. Reaching-target tasks in the presence of perturbation are considered.For each measure, the distribution of average values across ablebodied participants (A), and across trials for the amputee (B), is computed in three distinct phases of the task, indicated in red, blue and black: (1) moving up to the force field, (2) crossing the force field to reach the target, (3) matching the target position for 3 seconds against perturbations.Statistically significant differences (p-value < 0.05) between median values of the task phases are indicated with an asterisk.Numerical values on statistically significant differences are in Table III of the appendix.
with a red asterisk at the top of the plot for the corresponding measure.In particular, the performance measures are compared for BL and AIC-UP when performing the task in the same condition (i.e., perturbation off, and on).The SR, NM and TR matrices are first considered to evaluate the task completion.Unlike BL, AIC-UP consistently enabled successful task completion with or without perturbation: the average SR metric was 95% and 82.19% for AIC-UP and BL (respectively) without perturbation, and 93.75% and 76.87% with perturbation.AIC-UP had a significantly lower number of NM during tasks in the presence of perturbations meaning that the subjects using AIC-UP were able to more precisely maintain the target position.The distributions of NM are in agreement with the task success rate.While the time to reach (TR) the target was not significantly lower for AIC-UP than BL, it can be observed that BL had a larger interquartile range, which is explained by the higher number of NM.The flexor-extensor coactivation was significantly higher when the subjects used AIC-UP instead of BL, indicating the active modulation of coactivation to achieve the task.While CA has a degree of correlation to joint stiffness, it is subject to variability due to the different strategies the subjects may adopt and depending on the control method being used.SPARC was greater with AIC-UP than with BL indicating that participants were able to smooth out the oscillations imposed by perturbations when using AIC-UP through modulation of the muscle coactivation.For BL, oscillations are bound to the accuracy of the estimates provided by the NN (see Figure S3 in the Supplementary Information).Finally, we observed that AIC-UP provided a significantly higher MI between τ f and q r compared with BL, Able-bodied participants and amputee's responses to Q1-3 of the questionnaire, completed at the end of the session with or without external perturbations (highlighted in yellow).For able-bodies, each category shows the fraction of subjects who provided a certain answer.For the amputee, the same question is asked every 10 trials, and the 4 answers are shown.The participants could choose among good (A1); fair (instances of low controllability) (A2); poor (A3).
with or without perturbation, suggesting that the participants using AIC-UP were able to modulate the joint stiffness and damping, used in the control law to obtain τ f , to successfully complete the task and address the perturbations if needed.Overall, these results indicate that AIC-UP outperformed BL and effectively enabled joint stiffness and damping modulation through coactivation of agonist and antagonist muscles.
We investigated the perceived controllability of AIC-UP and BL among subjects; results for Q1-Q3 are summarized in Figure 5. Subjects indicated that AIC-UP provided a better match between motor intent and cursor motion, resulting in a more timely execution of motor commands, and more precise control than BL; these differences between the two controllers were more pronounced with perturbations.For Q4, six out of eight subjects gave a correct description of the perturbation field when using AIC-UP while two subjects were unsure; with BL, five out of eight subjects could not correctly describe the location of the force field and the others were unsure.For Q5, all the subjects had the same control strategy with BL: adopt low muscle cocontraction and move the wrist until the joint limit is reached.With AIC-UP, two subjects did not significantly increase muscle cocontraction, but the other six adapted joint impedance to counter perturbations.For Q6, all subjects agreed impedance modulation did not improve performance with BL; two subjects stated that it resulted in the worst perceived controllability.With AIC-UP, on the other hand, six out of eight subjects indicated that impedance adaptation helped counter perturbations; two subjects were unsure.These results support and correspond to the quantitative results in Figure 3-A.C. Online control.Results for the amputee.
The values of performance measures obtained over the 40 trials per session by the amputee participant are reported in Figure 3-B.We observed that AIC-UP provided a higher SR than BL, with or without perturbation: average values were 87.50% and 65% for AIC-UP and BL without perturbations, and 80% and 55% with perturbations.NM was significantly higher with BL than with AIC-UP in the presence and absence of perturbations, which is in accordance to the relative SR.While there was no significant difference in TR for the ablebodied participants, for the amputee AIC-UP provided a significantly shorter TR than BL in the presence of perturbations.When the amputee used AIC-UP, there was a significant increase in coactivation.Moroever, SPARC and MI between τ f and q r were significantly greater with AIC-UP than with BL, with or without perturbation.
Finally, in Figure 5 the amputee's responses to Q1-Q3 are shown; we asked the subject to answer questions four times per session in an attempt to obtain more reliable answers.Similar to the responses from able-bodied participants, the amputee indicated that AIC-UP provided better controllability than BL, and correctly described the force field (Q4) with AIC-UP.For Q5, the amputee's control strategy when using BL changed from tensing up the muscles to trying to minimally co-activate the muscles "or the cursor would jump too far"; this was an example of the baseline incorrectly assigning an increase in activation to a change in position.When using AIC-UP, the amputee focused on cocontracting the muscles of the forearm when needed.For Q6, the subject was unsure if impedance modulation by muscle coactivation improved the performance with BL since the cursor would sometimes oscillate unexpectedly; with AIC-UP, however, she indicated three times that stiffening the muscles helped to counter the perturbations, and mentioned that it once led to some overshoot.Overall, these results support and match the quantitative results.

D. Modulation of joint kinematics and impedance
For able-bodied participants (Figure 4-A), there was a statistically significant decrease in correlation between joint position q r and stiffness K between phase 2 and 3, and also between joint velocity and joint damping.In fact, in phase 3 the subject has to maintain the position while modulating K. Notably, the correlation between K and coactivation is significantly higher in phase 2 and phase 3 than in phase 1 where no perturbation is applied.Finally, the median value of K in phase 3, was significantly higher than in the other phases.This is in agreement with experimental studies showing that static stiffness is higher than the stiffness reached during dynamic movements [52].The same can be observed for D, higher in phase 3 than in phases 1 and 2; in phase 3 the muscle-tendon models operate mostly in isometric conditions and the muscle has low contraction velocities.Overall, these results indicate that the participants modulated the values of K and D by changing the muscles' coactivation in a time and task-dependent manner.The same can be observed for the amputee, with statistically significant differences between all three phases for also the measures MI(q r , K), and K.The higher correlation between coactivation and stiffness in all phases than for able-bodies subjects can be explained by considering that the amputee's flexors and extensors operate in isometric conditions.However, K and D were higher in phase 2 than in phases 1 and 2 indicating that the amputee might have coactivated the muscles throughout phase 1 and phase 2. Consider that phase 2 and phase 3 have different durations, which impact K and D.

V. DISCUSSION AND CONCLUSION
We described AIC-UP, a novel sEMG-based interface to voluntarily control the kinematics and the joint impedance (stiffness and damping) of a DoF of a simulated robot.Unlike prior work, two lumped muscle-tendon units were used to decode the motor intent in terms of joint kinematics, stiffness and damping.This required a reparametrization and structural assumption of the muscle-tendon units, and the design of an optimization framework to train the muscle-tendon models that included the impedance controller (Section II-C).In contrast to previous work, our framework does not require the measurement of joint torque or stiffness to train the models and it is therefore suitable for application in upper-limb prosthesis control.Note that we do not claim to learn stiffness and damping values that match the biological ones.Instead, our AIC-UP provides a coherent representation of the dynamics of the MTUs and that of the robot, leading to improved controllability.We showed that AIC-UP resulted in a significantly higher performance compared to the control BL, and allowed the able-bodied participants to exploit joint stiffness and damping adaptation as a means to modulate the physical interaction between the robot's plant and the environment.We further demonstrated that correlation between joint kinematics and stiffness or damping is substantially different during task execution, suggesting that AIC-UP enables time and task dependent modulation of stiffness and damping regardless of the joint position.While the methods were tested with a single amputee, the obtained results were coherent with those of the able-bodied participants.
In this work, we focused on a single DoF to isolate confounding factors.The insight we obtained will be used to expand AIC-UP to multi-DoF control.While lack of evaluation on a real prosthesis may be considered a limitation, we believe that the framework design and testing in a simulated environment, in the absence of physical constraints imposed by the hardware, is a necessary step towards improving methods for estimation of motor intent from sEMG signals.Observations from experimental results in simulation may be used as a performance baseline for when the framework is used to control a real robotic system.Moreover, because the chosen application domain is prosthesis control, we do not use a model of the biological limb, but we optimize the muscle-tendon models to implement the desired motor intent on a given robotic system; AIC-UP can be thus applied to any other robotic system with know kinematic and dynamic properties.In conclusion, our framework makes a step towards enabling impedance adaptation of prosthesis.While upper-limb prostheses was the chosen application domain, the approach may also be relevant in other rehabilitation device applications, or in human-robotinteraction scenarios, such as teleoperation.

APPENDIX OVERVIEW
In Appendix I we provide exemplary results in support of including the impedance controller in the optimization framework for estimating MTUs' parameters values.Appendix II provides numerical values and statistics to support the experimental results in Section III.In the Supplementary Information, we show the time evolution of values of MTUs' and joint variables during task trials.As discussed in Section II-C, our optimization method uses q f as an optimization signal, which is affected by the use of K and D as gains of the position-based impedance controller.Existing methods(Section I-B) instead use the joint torque τ r and q r as optimization signal.A reference joint stiffness may also be used.In this example, we trained the MTUs using q r as optimization signal (60% of collected data), i.e., the impedance controller and the robot's plant were not included in this training process.We then evaluated the trained MTUs on the entire dataset (for completeness) as part of the entire framework that includes the impedance controller and the robot's plant (Figure 6, third plot).We showed that K and D cannot be used directly as gains in the impedance controller

Fig. 1 .
Fig. 1. (A) Overview of our framework AIC-UP.It comprises a Detection of Human Motor Intent block which includes muscle-tendon models and a Prosthesis Control block.The framework outputs the predicted joint position q f , the joint stiffness K and damping D. The joint position q f is used as an optimisation signal for training the muscle-tendon units parameters and it is the visual feedback provided to the subject during online control.(B) Arrangement of the M T U s on the link of the "simulated robot model".The "Robot plant" has the same structure and dynamics of the "simulated robot".(C) Forces generated by the M T U 's muscle (CE, PE) and tendon components (DE, SEE) respectively.

Figure 1 -
Figure 1-B shows the geometric arrangement of the MTUs on the simulated robot link.Each M T U i is virtually attached to the link from the Center of Mass (CoM) (l i b) to a fixed base (l i a ).The length l i M T U is dependent on q r .Given the parameters α i and the initial joint position q r = 0, we can compute l i a as l i M T U sin α i .The values of l i a and l i b are constant and identified based on the position of CoM and the initial length of the MTUs.The MTUs length l i M T U (q r ) and moment arm r i (q r ) vary as function of q r :

Fig. 2 .
Fig. 2. A) Protocol for data collection (E, q train f ) described in III-C.1.B) Online control experiment described in III-C.2.Note that the subject had no visual feedback on the force field, the force field in grey is represented here only for explanation.C) Position of EMG sensors on the subject's forearm.D) Questionnaire of perceived controllability.
B. Online control.Results for able-bodied subjects.

Figure 3 -
Figure3-A shows the distribution of the average (acrosstrials) performance of the eight able-bodied participants.Statistically significant differences in distributions of average performance measures between AIC-UP and BL are indicated

Fig. 3 .
Fig. 3. Values of performance measures for the able-bodied subjects A) and the amputee B) in the absence and presence (highlighted in shaded yellow) of perturbations.A) Each group contains the average (across 40 trials) performance of the eight subjects; B) Each group contains the performance measure value of all trials.A statistically significant (p-value < 0.05) difference of the median are highlighted with an asterisk.Quantitative results describing the plots and the p-values are in TableIand TableIIof Appendix II.Note that in B) the success rate is a single value for each group, no statistical analysis is considered.

Fig. 5 .
Fig. 5.Able-bodied participants and amputee's responses to Q1-3 of the questionnaire, completed at the end of the session with or without external perturbations (highlighted in yellow).For able-bodies, each category shows the fraction of subjects who provided a certain answer.For the amputee, the same question is asked every 10 trials, and the 4 answers are shown.The participants could choose among good (A1); fair (instances of low controllability) (A2); poor (A3).

Fig. 6 .
Fig. 6.Trajectory tracking during offline evaluation of AIC-UP.The black dotted line is the ground truth position.The blue line is the predicted trajectory under the following conditions: (top) framework optimization and evaluation included the impedance controller; (center) framework training and testing did not include the impedance controller; and (bottom) the optimization framework did not include the impedance controller, but the evaluation framework included the impedance controller.

TABLE I DATA
IN SUPPORT OF RESULTS FOR ABLE-BODIED PARTICIPANTS SHOWN IN FIGURE3-A.WILCOXON SIGNED-RANK TEST IS USED TO ASSESS STATISTICALLY SIGNIFICANT DIFFERENCES (P-VALUE < 0.05) BETWEEN AIC-UP AND BL.

TABLE II TABLE
[53]ARAMETERS p i OF M T U i ESTIMATED DURING MODEL OPTIMIZATION; SEE[38]FOR DETAILS.THE COLUMN "VARIABLE" DETAILS OUR RE-PARAMETRIZATION.THE LOWER AND UPPER BOUNDS ARE SET EXPERIMENTALLY AND BASED ON PRIOR WORK[53].