Switched Control of Motor Assistance and Functional Electrical Stimulation for Biceps Curls

Rehabilitation robotics is an emerging tool for motor recovery from various neurological impairments. However, balancing the human and robot contribution is an open problem. While the motor input can reduce fatigue, which is often a limiting factor of functional electrical stimulation (FES) exercises, too much assistance can slow progress. For a person with a neurological impairment, FES can assist by strategically contracting their muscle(s) to achieve a desired limb movement; however, feasibility can be limited due to factors such as subject comfort, muscle mass, unnatural muscle fiber recruitment, and stimulation saturation. Thus, motor assistance in addition to FES can be useful for prolonging exercise while still ensuring physical effort from the person. In this paper, FES is applied to the biceps brachii to perform biceps curls, and motor assistance is applied intermittently whenever the FES input reaches a pre-set comfort threshold. Exponential stability of the human–robot system is proven with a Lyapunov-like switched systems stability analysis. Experimental results from participants with neurological conditions demonstrate the feasibility and performance of the controller.


Introduction
Robot-assisted therapy has been shown to be beneficial for rehabilitation and neurological relearning for people with movement impairments. Specifically, in [1], robot-assisted therapy was used to aid in stroke recovery. More recently in [2], robot-assisted rehabilitation resulted in significant gains in motor impairment and functional recovery of the upper limb of acute stroke patients. The reviews in [3][4][5] compare various therapeutic robots that have been developed for the upper extremity. While exercises involving robotic assistance are advantageous for rehabilitation, intensive active involvement by the person (rather than only passive motion) is beneficial for motor recovery [6][7][8]. Balancing human and robot contributions often requires patient-specific adaptations of the controller [9]. Many methods have been used to facilitate maximal human contribution, such as challenge-based robots [10], assist-as-needed controllers [11,12], an adaptive algorithm based on lead/lag performance [13], and an algorithm for altering allowable error and decaying disturbance rejection [14].
Functional electrical stimulation (FES) is another rehabilitation tool that can be used alongside robot-assisted therapy. Used to elicit involuntary muscle contractions, FES is particularly useful for people with neurological disorders. For instance, FES has been found to increase strength in the biceps brachii [15] and motor function on the post-stroke paretic arm [16]; however, for people that have some sensory feedback intact, there is often discomfort at high levels of stimulation. Thus, stimulation often must be limited to levels below that necessary to perform certain exercises with muscle force alone. To compensate, it may be necessary to incorporate motor/robotic assistance. In [17], a combination of robotic assistance and FES resulted in arm mobility improvements in severely impaired stroke survivors. In this paper, we design an upper arm robot-assisted FES rehabilitiation device and protocol where the robot only assists when the necessary stimulation input reaches a saturation limit (e.g., due to a predefined comfort level by the participant).
This paper focuses on biceps curls since they are a common upper body exercise with a simple, one-degree-of-motion movement. Moreover, repetitive movements, such as biceps curls, are known to be beneficial for people with neurological conditions by improving coordination [3,18]. In [19], FES is used to induce biceps curls and motor assistance is provided intermittently whenever the stimulation reaches a pre-set comfort threshold; however, tracking performance may be further improved by extending bouts of motor assistance, during which stimulation is decreased (a byproduct of motor assistance decreasing the tracking errors), but the muscle is still activated and contracting. In this paper, and in [19,20], FES of the biceps brachii is used as the primary actuator for tracking a desired elbow angle trajectory that represents a biceps curl. Multiple electrodes (i.e., stimulation channels) are placed across the muscle, and the motor contributes when the stimulation threshold is reached; however, here, as in the preliminary works in [20], from which this paper builds upon, the motor will continue to contribute until the stimulation decays to a selected lower stimulation value, which prevents the FES control input from oscillating at the stimulation threshold and causing motor chatter. This novel approach eliminates the potential for motor chatter without the need to activate the motor throughout the entire biceps curl exercise, which may be too much assistance for the patient. Additionally, a strategy is developed to decrease the lower stimulation threshold throughout the biceps curl, such that the motor is active for longer as the person fatigues and/or performance decreases, yielding individualized adjustments. Switched sliding mode FES and motor controllers are developed and nonlinear control methods for switched systems are used to prove exponential stability by establishing a common Lyapunov function for all possible combinations of the actuators. Experiments on both arms of two participants with hemiparesis resulted in average root mean square (RMS) position errors of 4.55 degrees and 4.36 degrees for the impaired and unimpaired arms, respectively, which proves the feasibility of using the proposed combined FES-motor control system for biceps curls.

Dynamics
The dynamics of the human-robot system are where q : R >0 → Q denotes the elbow joint angle, and Q ⊆ [0, π) denotes the set of forearm angles. Full elbow extension is considered zero degrees and positive rotation is the direction in which the forearm is moving towards the biceps. The states q andq are assumed to be measurable and calculable, respectively. Inertial effects are denoted by M : Q → R >0 ; V : Q × R → R denotes centripetal and Coriolis effects; and G : Q → R denotes gravitational effects. Torques applied by passive viscoelastic tissue forces about the elbow joint are denoted by τ p : Q × R → R; τ b : R → R denotes torques due to viscous damping at the testbed's hinge; τ d : R ≥0 → R denotes unknown disturbances (e.g., muscle spasticity); τ m : Q × R × R ≥0 → R denotes torques applied by muscle contractions about the elbow joint; and τ e : Q × R × R ≥0 → R denotes torques applied by the electric motor about the elbow joint.

Switched Muscle Subsystem
As in [19][20][21], w ∈ N distinct electrode channels that are placed along the biceps brachii receive stimulation when the forearm angle is at predefined ranges of Q, where w is a predetermined constant and each combination of channels comprises a subsystem. Let i ∈ S denote the i th electrode channel and denote a finite indexed set of all channels. To predetermine regions of Q, an initial protocol is performed as in [22], where the normalized isometric torque produced by the i th channel, τ i ∈ R, is measured a priori every 10 degrees throughout a range of angles defining a biceps curl. The portion of the dynamic biceps curl trajectory over which a particular electrode channel is stimulated is denoted by Q i ⊂ Q, and defined as where ∪ i S Q i = Q and the threshold, ε ∈ [0, 1] , is a design constant. The torque due to muscle contractions in (1) is generated by applying an electric potential field across the biceps brachii muscle and is defined as where B i : Q × R → R >0 denotes an unknown, nonlinear, auxiliary function relating the stimulation intensity applied to the i th stimulation channel to the torque produced by the activated sensory-motor structures; u i : Q × R × R ≥0 → R denotes the control input and the electrical stimulation intensity applied to the i th electrode, defined as where σ i (q) ∈ {0, 1} is a piecewise switching signal for each channel such that where q d : R ≥0 → R is the desired elbow angle trajectory, designed so its first and second derivatives exist and are bounded. Since FES is used on the biceps brachii, the switching signals σ i ensure that FES is only applied during regions of desired elbow flexion (i.e., positive rotation). Note that σ i is based on desired velocity, rather than the actual velocity because it cannot be guaranteed that the actual velocity is positive throughout flexion and negative throughout extension (i.e., during flexion, we cannot guarantee that the forearm will not momentarily "fall back" in the negative direction due to gravity). A known function of the elbow angle, T i : Q → R >0 , is calculated a priori as in [19] and is based on the i th channel's effectiveness in producing torque at the given angle. The control input to the FES on the biceps brachii, denoted by u m : Q × R × R ≥0 → R, is distributed amongst all electrodes along the biceps brachii according to σ i and T i : Q → R. The torque produced by the motor is defined as τ e (q,q, t) B e u e (q,q, t), where the current input applied to the motor is denoted as u e : Q × R × R ≥0 → R and B e ∈ R >0 is the known electric motor control constant relating input current to output torque. Substituting Equations (3)-(5) into (1) yields where B σ : Q × R → R >0 is the combined switched control effectiveness for the entire biceps brachii, defined as The system model in (6) has the following properties [23][24][25], which become important in the stability analysis of the control system:

Control Development
The control objective of the biceps curls experiment is to track a desired forearm trajectory, quantified by the position tracking error, e 1 : R ≥0 → R, defined as To facilitate the subsequent development of the FES and motor controllers, an auxiliary tracking error e 2 : R ≥0 → R is defined as where α ∈ R >0 is a selectable constant gain. Taking the time derivative of (9), multiplying by M, adding and subtracting e 1 , and using Equations (6) and (8) yields where the auxiliary term χ : where c 1 , c 2 , c 3 ∈ R >0 are known constants, · denotes the Euclidean norm, and the error vector Based on Equations (10) and (11), and the subsequent stability analysis, the FES control input is designed as where {k i } i=1,...,4 ∈ R >0 , are selectable constant control gains, sat Γ (·) is defined as sat Γ (κ) κ for |κ| ≤ Γ and sat Γ (κ) sgn(κ)Γ for |κ| > Γ, where Γ ∈ R >0 is a selectable design constant and sgn (·) : R → [−1, 1] is the signum function.
If the FES control input u m is saturated, the motor begins assisting the muscle until u m decreases to the lower threshold denoted by γ j : R ≥0 → R ≥0 , which is initialized at γ 1 ∈ R >0 , such that γ 1 ≤ Γ. The threshold γ j resets to γ 1 at the beginning of each biceps curl and updates every time it is reached, according to γ j+1 = ργ j , where j ∈ N denotes the j th time during the n th biceps curl for which u m saturates at Γ and then decreases to γ j . The selected constant ρ ∈ (0, 1) was used to decrease the lower threshold after every time the comfort threshold was reached in a single biceps curl, which was motivated by the observation that, as the muscle fatigues, the FES control input rises quicker to the comfort threshold (i.e., saturation point Γ) after each successive bout of motor assistance. At the beginning of each biceps curl (i.e., whenq d changes from negative to positive), the motor is not activated unless u m reaches Γ, and is again deactivated the next time that u m ≤ γ j or when a new biceps curl starts. Let T ext, n , T f lex, n ∈ R >0 denote the initial times during the n th biceps curl for whicḣ q d ≤ 0 andq d > 0. A schematic of this control strategy is shown in Figure 1. Based on the subsequent stability analysis, the switched control input to the motor is designed as where k i, β i=5,...8 ∈ R >0 are constant control gains and the subscript β indicates which of two sets of control gains are implemented. Movements involving both FES and motor (i.e., desired flexion,q d > 0) are indicated by β = 1 and movements for which only the motor is activated (i.e., desired extension, where the superscripts {u, l} refer to the upper and lower saturation thresholds, such that T u n, j ∈ R >0 is the j th time during the n th biceps curl for which u m saturates at the upper threshold Γ, after either beginning the biceps curl (i.e., when j = 1) or after u m rises from γ j , and T l n, j ∈ R >0 is the j th time during the n th biceps curl for which u m falls from Γ to the lower threshold γ j . Note that u m may reach Γ multiple times before falling to γ j , and vice versa; however, T u n, j and T l n, j only refer to the first occurrence. Thus, within the n th biceps curl, the times occur in succession such that T u n, 1 , T l n, 1 , T u n, 2 , T l n, 2 , . . . , T u n, J , T l n, J . Substituting Equations (12) and (13) into (10) yields

Stability Analysis
The following analysis proves the stability of the FES and motor controllers designed in the previous subsection, such that they can be safely implemented during the biceps curls experiments described in the next subsection.
Let V L : R 2 → R be a continuously differentiable, positive definite, common Lyapunov function candidate defined as which satisfies the following inequalities: where λ A , λ B ∈ R >0 are known positive constants defined as λ A Theorem 1. When the desired trajectory indicates flexion (i.e.,q d > 0) and the motor is inactivated, δ = 0, B σ > 0, and the FES controller in (12) ensures exponential tracking such that ∀t ∈ [t 1 n, j , t 2 n, j ), where t 1 n, j , t 2 n, j ∈ R >0 are defined as t 1 n, j max T f lex, n , T l n, j and t 2 n, j min T ext, n , T u n, j+1 , respectively, and λ 2 ∈ R >0 is defined as provided the following gain conditions are satisfied: where c 1 , c 2 , c 3 are introduced in (11).
Proof. Because of the signum function in the closed-loop error system in (14), the time derivative of (15) exists almost everywhere (a.e.), andV L a.e.
∈˙Ṽ L , further upper bounding of the Lyapunov derivative, provided the gain conditions in (19) are satisfied, results inV L a.e.
After using (11) and Property 1, the Lyapunov derivative can be upper bounded aṡ assuming the gain conditions in (25) are satisfied, the first of which is formed noting that γ j ≤ Γ, ∀j, ∀n. Equations (16), (24), and (23) can be obtained.

Experiments
Biceps curls experiments were performed on two participants with neurological conditions that impaired their right arm. Both participants gave written informed consent under protocol number 201701089 approved by the University of Florida Institutional Review Board. The purpose of the experiments was to verify the feasibility, safety, and performance of the controllers in (12) and (13) for rehabilitation purposes. The first participant had post-polio syndrome that affected their right arm noticeably more than the left, and the second participant had both a spinal cord injury (SCI) and a right elbow joint that had been surgically removed and autografted with shoulder tissue, preventing any supination. Both participants reported that their left arms were fully functional for all daily activities. Both participants were also able to perform unassisted (i.e., fully volitional) biceps curls on the testbed, against the resistance of the motor and hinge, with their left, but not their right arms. While safety was not objectively measured, it was verified by ensuring the patient did not feel unsafe; they had no pain aside from mild soreness following the experiments; and both the FES and motor behaved as expected.

Test Setup
For the experiments, a customized testbed, seen in Figure 2, composed of two rectangular aluminum plates was used. The triceps side of the upper arm rested on a stationary plate and the forearm was fixed to the other plate with velcro straps and rotated about a hinge aligned with the elbow. The designed motor controller was applied to a 27 Watt, brushed, parallel-shaft 12 VDC electric gearmotor and the FES controller regulated the pulsewidth sent to six 0.6" × 2.75" Axelgaard electrodes on the biceps brachii via a Hasomed stimulator, as in [22]. The controllers were implemented using real-time control software (QUARC, MATLAB 2015b/Simulink, Windows 8). The placement of the electrodes, which can be seen in Figure 2, followed a strict procedure to ensure consistent biceps coverage and evenly spaced electrode placement. The first electrode was placed at 21% of the distance from the elbow crease to the acromion, the sixth electrode at 50% of this distance, and the other four biceps electrodes spaced evenly between the first and last. A seventh electrode (3" × 5") was placed on the shoulder as the reference electrode for all six biceps electrode channels. Based on comfort and necessary torque values, stimulation amplitude was fixed at a current of 30 mA with a frequency of 35 Hz for each channel, while the closed-loop FES controller modulated the pulse-width.

Protocol
After all seven electrodes were placed on the subject's upper arm, the subject was seated such that the upper arm and forearm could comfortably rest on their respective parts of the testbed. The desired angular position, q d , of the forearm was selected as q d (t) = 7π 18 where the period, T, or amount of time for the forearm to move from 20 to 90 degrees, was 5 s. The motor first brought the arm to 20 degrees, which was found to be the beginning of the region where the muscle could always produce sufficient torque, and, from there, 10 biceps curls were completed.
The control gains, {k i } i=1,..,4 , k i, β i=5,...8 , introduced in (12) and (13), were adjusted to yield acceptable tracking performance with values for both the right and left arms as follows: k 1 = 25, k 2 = k 3 = k 4 = 1, k 5, 0 = 15, k 5, 1 = 35, k 6, β = k 7, β = k 8, β = 1. A saturation limit for the muscle control input was established based on comfort, where the procedure for doing so involved slowly increasing the stimulation level (i.e., current) until the participant states they would like no higher stimulation. The decay constant for γ j was selected as ρ = 0.8. When the muscle control input was below saturation, electrical stimulation was used to control the forearm from 20 to 90 degrees, whereas both muscle stimulation and the DC motor were used at any point that the muscle controller reached the saturation limit. Only the DC motor brought the forearm from the highest forearm angle (90 degrees) to the starting position (20 degrees). The set of channels used to stimulate within the muscle control region (i.e., during flexion) varies with angular position as in [19], where ε = 0.22 was selected as the normalized torque threshold for all but the impaired right arm of the Subject 1, which was set to 0.10 due to no electrode locations producing sufficient isometric torque.

Results
Average RMS position and velocity errors, along with average FES and motor control inputs for the impaired and unimpaired arms of each participant are compared in Table 1. All statistics are averaged over times of desired flexion. No data from when the arm was in extension was used. Figure 3 shows both the position error and FES control input (stimulation pulsewidth) for the right (impaired) arm of Participant 2 during biceps curls 4-6. Table 1. Average position and velocity errors, FES control input, and motor control input for both arms (one impaired, one unimpaired) for both subjects. S1 and S2 denote Subjects 1 and 2; R and L denote the right and left arms.

Discussion
The results in Table 1 show that the average position and velocity errors of the impaired arm are similar to that of the unimpaired arm for both participants, despite each having movement disorders that significantly limit performing daily activities with their impaired arm. By design, the motor only contributes as needed and the FES activates the biceps throughout flexion. The goal of rehabilitation is generally to challenge the patient to build muscle and coordination, but not so much that they can only perform a limited number of repetitions. The assist-as-needed motor controller, in combination with the FES-controller, allows for this sort of rehabilitation goal and are a promising development for rehabilitation robotics.
Since the control system essentially replaces the broken neurological pathways in the participant and, since volitional effort was not encouraged, it may be expected that the experiments on the participant's impaired arms performed similar to their healthy arms; however, there are many factors that the control system must account for in a healthy vs. impaired limb. For instance, the impaired limb is likely not used much in daily activities, and, thus, has atrophied and requires more FES and motor assistance, for which the control system automatically adjusts. Moreover, the electrodes used in this study were surface electrodes placed on the skin, which may not penetrate deep enough to reach all muscle fibers, which may disproportionately affect the impaired arm that already takes more control input to move. Lastly, the first participant had physical damage in addition to neurological damage in his impaired right arm, which the designed control system was able to account for.
In [19], exponential tracking of the desired elbow angle trajectory is achieved and the motor assists when the stimulation comfort threshold Γ is reached; however, the motor only assists for an instant before the error drops, resulting in the FES control input to fall below the single threshold Γ. This method resulted in the motor being frequently activated and deactivated (i.e., chattering), in addition to the chattering that can result from sliding mode control. Not only does this fail to accurately mimic the relatively consistent and smooth muscle contractions achieved during voluntary exercise, it is also undesirable from a control and hardware perspective. Comparing the error and stimulation results in Figure 3 of this paper to Figures 3 and 4 of [19], it can be seen that both the stimulation and the error smoothly increase and decrease in the current experiments, but change very quickly around the threshold value in [19]. Since the motor control input is mathematically dependent on the FES control input, when the FES control input is chattering, so is the motor. Moreover, the reliance on the motor for longer bouts results in lower average position and velocity errors. The results from [19] motivated the control design in this paper, where the motor continues to assist the muscle until u m reaches the lower threshold γ j . Moreover, to prevent the motor from turning on and off more frequently as the biceps fatigues, the motor remains activated until the position and velocity errors are low enough to result in an FES control input of γ j . This does not guarantee that the motor is activated over a longer amount of time or range of elbow angles, which is typically the result because it takes more time for u m to rise back to Γ. However, if a physical therapist or other rehabilitation specialist desired, ρ = 1 would cause the lower threshold to remain constant throughout the protocol.
As seen in Figure 3, as an example of a typical portion of an experiment, changes in the stimulation pulsewidth mirror changes in the position error, but with a short lag time. This is not surprising given the design of the FES control input in (12); the lagged mirroring occurs because the FES control input is a function of the error and thus changes when the error changes. However, the relation is dependent on control gains. In this experiment, α = 40 was selected, meaning that the dependence of e 2 (and thus the FES control input) on the position error is 40 times greater than its dependence on the velocity error. Thus, the control input nearly mirrors the position error, which decreases during the bouts of continuous motor assistance. The control gain α was selected as such because any more dependence on the velocity error resulted in small but frequent changes in direction. This is because any undesired movement in the negative direction during flexion was amplified just as much as movement in the positive direction.
The control technique in this paper may depend on muscle delay even more so than other FES protocols [29]. Because the motor instantaneously switches off after the γ j condition is met, the muscle must react to the rapid increase in stimulation back to Γ that often occurred, as seen in Figure 3, which is likely a combination of fatigue, an insufficiently high comfort threshold, and/or muscle delay. Methods from recent studies on delay in FES cycling [30] could be applied to the FES protocol in this biceps curl study.

Conclusions
In this paper, an FES controller is used to track a desired elbow angle trajectory resembling a typical biceps curl on a customized arm testbed, and a motor controller is designed to assist when needed. It is critical for patient comfort to select an individualized threshold for the FES control input. Rather than allowing error growth and high stimulation, an electric motor temporarily assists with elbow flexion, resulting in a decrease in error and stimulation intensity. From a rehabilitation perspective, it is desired to work a patient's muscles sufficiently to build muscle and strength, but not so much that the patient fatigues too quickly to achieve other rehabilitative benefits such as improving range of motion and cardiovascular exercise. The method developed in this paper, which includes switched sliding mode controllers for both the FES and motor control input, is a promising development for rehabilitation robots and resulted in four successful sets of experimental data on two participants with asymmetrical impairments. Future long-term studies are necessary to measure improvements in rehabilitative outcomes.
Author Contributions: C.R. contributed to the project outlined in this manuscript with data curation, formal analysis, investigation, methodology, project administration, resources, visualization, and writing-original draft. W.D. contributed with conceptualization, funding acquisition, supervision, validation, and writing-review and editing. B.A. contributed with validation and writing-review and editing. All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: