Electromyography Control of a Computer Model of the Arm

Human arm movements may be adversely affected in the event of stroke or spinal cord injuries, eventually causing the patient to lose control of arm movements. Electromyography (EMG) is considered the most effective technique for the restoration of arm movement in such cases. The rehabilitation period for such patients is usually long. Moreover, complex treatment techniques may demoralize them. Therefore, this study, attempts to contribute to the development of a relaxing rehabilitation environment through electromyography control of a computer model of the arm. The model is created using MATLAB® and Data LINK software and other requisite components for training the targeted participants to control their arm movements. Six male participants with no history of injury to the arms or back were selected using the set protocol. The results and data collected are analysed using three performance measures i.e. the number of target hits, average time to target, and path efficiency for each target. Then, the main results in terms of the obtained performance measures are discussed and compared with those of previous studies.


Introduction
Electromyography (EMG) control of a computer model of the arm is expected to be a valuable development in the field of biomedical engineering, where it can be used to display the entire process of recovery and rehabilitation to patient [1].
At present, EMG is widely used as a safe and non-invasive technique used for the measurement of the muscle response, by recording and evaluating electrical activity due to nerve stimulation of muscle.During this process, muscle fibers produce small electrical currents preceding the creation of muscle force.These electrical currents are produced by the exchanging ions across muscle fiber membranes [2].
The significance and effectiveness of the technique has been proven for the detection of medical abnormalities, activation level, and recruitment order.The most well-known use of EMG is in analysing the biomechanics of human or animal movement.Electromyography signals are mainly used to control prosthetic limbs [3].EMG has been widely adopted for detecting different muscular activities where no movement is generated.There are numerous distinctive applications of EMG that demonstrate its use in clinical studies of neurological and neuromuscular issues.These studies show that gait laboratories as well as clinicians use EMG for obtaining biofeedback and conducting ergonomic evaluation [4].Similarly, the technique has great significance for many research laboratories specializing in biomechanics, movement disorders, postural control, and other neuromuscular and physical therapies.Thus, EMG is useful in both medical and engineering fields [1].However, when using EMG techniques in any scientific field, the complexity of EMG signals cannot be understated, as they are strongly influenced by the numerous physiological and anatomical properties of the subject.Therefore, EMG is characterised by considerable individual variation [5].

Aims of Study
The aim of this research project is to assess the feasibility of controlling the velocity of a virtual arm model through the muscle activity of healthy individuals.To this end, the performance of the participants in controlling the virtual arm model is evaluated.The following questions help in successfully achieving this aim and in drawing a definitive conclusion.
• Were the participants able to control the movement of the virtual arm and hit the targets?• How many targets did each participant hit? • How much time did each participant take to hit the targets?
• What was the value of the path efficiency?
Surface electromyography (SEMG) data was collected for four muscles (teres major, posterior deltoid, middle deltoid and pectoralis major).The data was interfaced with a PC by means of a data acquisition system.MATLAB ® software was used to detect and enhance the EMG signals within the collected data, and to detect the presence of events in these signals.Further, these signals were used to control a virtual arm with two movements, i.e. shoulder flexion-extension and elbow flexion-extension.Thus, a kinetic model of the virtual arm was derived on the basis of the net muscle moment established from the recorded EMG signals.This arm is a mathematical and three-dimensional (3D) graphical representation of the human arm.

Data LINK DLK900 System
The main reason for using the Data LINK (Model DLK900, Biometrics Ltd, Gwent, UK) system shown in Figure 1 is that it is aprogrammable data acquisition system allowed the user to gather both analogue and digital information through intensive electrodes.These electrodes are connected to a small and lightweight subject unit with programmable instrumentation amplifiers and individual power supplies for energising the electrodes, sampling the inputs, and transforming them into electrical signals [6].Further, data is transmitted from the subject unit to the Base Unit through anRS422 data transfer cable.A USB cable connects the Base Unit to the host PC, where the data is readily stored on disk in ASCII or passed in real time to other applications such as Microsoft Excel or Microsoft Visual Basic [6].

Bipolar Surface EMG Electrodes
The bipolar surface EMG Electrodes (model SX230, Biometrics Ltd, Gwent, UK) shown in Figure 2 is an advanced technology, and was used for the electromyography display along with data capture systems, allowing complete portability and real time exhibitions [7].

Biometrics Analysis Software v8.51
Biometrics Analysis Software v8.51 is used for the calibration and analysis of EMG signals.It is also used for data filtering average, RMS, velocity, offset, scale, median frequency, and mean frequency [8].

MATLAB ® Software R2013a
EMG data can be analysed using MATLAB ® .All trial data was collected as analogue data using the MATLAB ® Data Acquisition Toolbox™.

3D Model of the Human Arm
This is a pre-designed model created using MATLAB ® software, and it is also referred to as the virtual arm model.This model helped in the estimation of tension or activity that created by individual muscles on the basis of recorded EMG signals.Refer to Figure 3.

Human Subjects
The selected research subjects or participants were in the age range of 18 -40 years.Only male subjects with no history of injury to the arms or back were included in the study in order to minimize variation.In addition, the duration of the experiment, including the measurement set up, was no more than two hours for each participant.Three participants were invited for the research experiment in one day.The first EMG electrode was placed on the pectoralis major muscle, the second, on the middle deltoid muscle, the third, on the teres major muscle, and the fourth, on the posterior deltoid muscle.However, the third electrode was placed on the teres major muscle and the forth finally on posterior deltoid muscle.It was discovered that it   was difficult to determine the area as well as the depth of the tissue through the electrodes.The locations of the electrodes were established carefully, as the targeted muscle and superficial muscle can be altered significantly via manipulation [3].It is preferable to place the electrodes on the tendon of the muscle.In one particular case, EMG signals of low amplitude were observed, reflecting no muscle activity.Further, muscles and tendons were differentiated by palpation [3].

Location and Placement of Electrodes
In addition, it is necessary that the direction of all the electrodes must be effectively aligned with that of the muscle fibers.The ideal situation is one in which a signal whole motor unit action potential (MUAP) is significantly estimated by the electrodes [3].However, it is not necessary that the muscle fibers should always be in the relative muscle direction; but in situations when muscle fibers were diagonally directed, attaining sufficient space to join bipolar electrodes was difficult.Similarly, it is essential that the reference electrode should be joined up in order to remove noise elements like hum.It is necessary that the reference electrode must be placed on an electrically neutral tissue such as a bony prominence [3]. Figure 6 shows a photograph of a participant during the experiment.

Signal Processing
Here, signal processing involves three main steps using MATLAB ® :

Rectification
Rectification of EMG signals is a crucial signal processing stage in order to obtain the form of a "linear envelope" for the magnitude values of EMG signals of equivalent magnitude.It is noted that a full wave rectification process needs to take place for obtaining the absolute value of the signal, i.e. conversion of all negative amplitudes to positive amplitudes [3].

Digital Filtering
The butter functionin MATLAB ® is capable of constructing a second-order low-pass Butterworth filter with a cut-off frequency of 10 Hz, which is normalized by the Nyquist frequency.A Butterworth filter is a type of filter that is designed to have a flat frequency response [3].The purpose of the "filt filt" function is to enable the execution of "zero phase digital filtering" via effective processing of the input signal in both the reverse direction and the forward direction [3].A Butterworth filter is used in this study during the calibration data collection process.The calibration of EMG signals is carried out during the offline phase, i.e. before using the EMG signals to control the movement of the arm model in real-time.

Smoothing
The exponential moving average filter is a type of weighted moving average filter.It is easy to construct and does not require a large window size [3].An exponentially weighted moving average filter with an alpha parameter in the range 0 -1 has been used in this study.A higher alpha value generates a signal with less smoothing [3].In this experiment, the moving average filter was used in the real-time phase with an alpha value of 0.75.

Performance Measures for Reviewing Data
Based on the significance of the chosen three performance measures in previous studies used for measuring the performance of the arm model, the following parameters were selected [9].

Target Hits
The number of target hits can be measured by identifying the numeral count of the total number of targets hits by the participants for the three trials.The duration of each trial is one minute.For effective target hits, the position of the target should be is set according to the relevant orientation [10].A target hit can be measured in three different target conditions: fixed orientation, predictably perturbed orientation and randomly perturbed orientation.For fixed target orientation, the hand begins to rotate to the requisite orientation from the start of the reach [10].Under predictably perturbed orientation, the arm rotates first to the original target orientation, and later, it sets its position exactly for the last target orientation.The number of target hits in this condition becomes quite easy.Likewise, random perturbed orientation also works accordingly without any clear changes [10].As in most other studies, it was found that using a 90˚ vertical initial target orientation worked best for attaining the desired results with fixed orientation [10].

Time-to-Target
This is the time taken for the virtual arm movement from the starting point to the target [11].Researchers have shown that the timing and intensity of lymphatic muscle activation is associated with the distance of reaching movements of the human arm [11].The speed range adopted by the participants when reaching towards the desired target contributes vitally in the improvement of performance.The extent to which subjects can move faster to distant targets is also useful in identifying the association between the EMG time base and target distance as EMG intensity is closely related to the movement time [11].The average target time in terms of seconds per hit was measured by dividing 60 by the number of hits in a minute (See Equations ( 1) and ( 2)).Thus, this parameter was used to measure the performance of participants: Number of hits=Number of targets 1

Path Efficiency
Like the other two performance measures, path efficiency was also found to be effective in estimating the level of improvement in arm movement.The movement was quantified by the measurement of the path efficiency, which was calculated by dividing the shortest possible straight-line distance by the actual distance travelled, Figure 7 shows the two distances.This was further expressed as a percentage [9] (see Equation ( 3)): The total (actual) distance travelled to the target for each target hit i.e. the total (actual) distance calculated by the sum of the distances of all steps (see Equation ( 5  ."H" is the hand endpoint, "θs" is the elbow angle, "θe" is the shoulder angle, "Lf" is the length of the forearm = (78 cm), "La" is the length of the arm = (58 cm).
Path efficiency feedback is crucial for the arm movement [12].Based on the straightness of the virtual arm fingertip towards the target, it becomes easy for the researcher to understand the extent to which the participants can control the movement.The data about path efficiency further helped in determining the improvement needs in enhancing the pitch velocity.Therefore, this measure was used to decide the attributes of the arm movements in terms of smoothness, and single peaks of acceleration and deceleration along with the characteristics of the frequency in each trial repetition.It should be noted that a direct path towards the target is an indication of a good reach by the participant.However, other studies, such as Thelen [13] also specified that the usage of the obstacles, causing up turns and down turn in the path of the participant, can slow the reach process but could become and extraordinary activity in the training process.
The velocity of the arm model movement affects the performance measurement.It depends on three factors: the arm model calibration before taking readings, the number and type of muscles measured by EMG, and the gain (see Equation ( 6)): where: A: Arm model calibration before using EMG signals to control the movement of the arm model in real time.
V: Velocity of the arm model movement (horizontal and vertical velocity).

Results and Discussion
The "Mean Average Time to Target", "Standard Deviation Time to Target", "Mean Average Path efficiency", and "Standard Deviation Path efficiency" were computed.In addition, the "Number of Targets Acquired", "Number of Training Rounds" and "gain" for all the participants were recorded and tabulated as shown in Table 1.

Comparison of Mean Average Time-to-Target and Standard Deviation Time-to-Target
The results show that among all the subjects, "Subject 2" performed quite well, as he required fewer training rounds (3) and achieved a high gain (30).Moreover, he took less time (average, 4.43 seconds) for a greater number of target acquisitions (38).Not much variation was observed in his results.In comparison, the performance of "Subject 1" was quite unsatisfactory.He acquired fewer targets (20) and took more time (average, 8.27 seconds).Further, the variation in results was greater than that of the other participants.In contrast, the performance of "Subject 3" was quite satisfactory, i.e. 31 targets acquired with a small average time to target (5.34 seconds), less variation in results (standard deviation of 2.79 seconds), fewer training rounds, and reasonable gain."Subject 4" required a large number of training rounds (8) and acquired 25 targets with an average time to target of 6.18 seconds (ranked third in descending order after "Subject 1" and "Subject 5").The variation in the time taken and the gain are also high."Subject 5" achieved a mean average time to target of 6.99 seconds (relatively long time for target acquisition) and with a standard deviation time to target of 4.16 seconds (too much variation in the time taken).He required a large number of training rounds (8) and acquired a small number of targets (23).Thus, his performance was not satisfactory.In contrast, "Subject 6" performed well, with a small average time to target (4.5 seconds) and not much variation in the results (2.01 seconds).The performance-oriented results indicate the effectiveness of the virtual arm in controlling the movements towards the targets.Hence, only less time taken by the subject cannot be deemed as a relative measure of his performance, as the variation in results, number of targets acquired, number of training rounds, and gain also contribute to the performance.In addition, the velocity of the virtual arm model movement and the EMG signals of the four muscles of each of the subjects (i.e.muscles activity) strongly influenced their time to target.Further, muscle fatigue cannot be avoided as the non-stationary characteristics also affect the time taken by the subject for completion of the target task.Moreover, it should be noted that a greater mean with greater variation (standard variation) adversely affects the average mean with low variation (standard variation) [14].

Comparison of Mean Average Path Efficiency and Standard Deviation Path Efficiency
The average path efficiency of the subjects can be compared simultaneously after considering the mean average path efficiency and standard deviation path efficiency.It is shown that the gain and the velocity of the virtual arm movements are responsible for increasing the path efficiency of the model."Subject 2" exhibits the best performance in terms of path efficiency.The standard deviation path efficiency and the mean average path efficiency were 7.10% and 90.58% respectively.With an average gain of 30, he acquired 38 targets.EMG signals from the muscles of this participant were sufficiently effective for serving as commands for operating the virtual arm model.On the other hand, "Subject 1" achieved a gain of 25 with a mean average path efficiency of 57.36% and too much variation (26.52%).For using the EMG signals of his muscles, he was trained 8 times.After such efforts, he was able to acquire 20 targets.In contrast, "Subject 3" showed significantly high path efficiency as compared to the other subjects.With 4 training rounds and a gain of 30, he was able to acquire 31 targets with an average path efficiency at 73.53% and standard deviation of 20.94%.The results of "Subject 4" show the impact of velocity of arm movement and EMG signals of the four muscles on the overall results.Despite having a gain of 30 (like Subjects 2 and 3), "Subject 4" was trained 8 times and acquired 25 targets with an average path efficiency of 58.83% and standard deviation of 27.3%.Similarly, the EMG signals from the muscles and the gain have a strong impact on the average path efficiency of "Subject 5" and "Subject 6".With an extremely high gain, the results were favorably changed.When "Subject 5" was trained 8 times with a gain of 20, fewer targets were acquired (23) with an average path efficiency of 48.1% and standard deviation of 27.18%.In contrast, at a gain of 40, the path efficiency of "Subject 6" was increased, i.e. 63.15% with a standard deviation of 18.8%.Further, "Subject 6" acquired a greater number of targets with less variation in the results.Thus, besides "Subject 1" and "Subject 5", nearly all the participants performed efficiently and obtained predicted average results.Therefore, there is a need to make modifications in the computer-modelled arm in order to improve it.

Comparison of Study Results with Previous Studies
The results of previous studies must be analysed to determine the effectiveness of the model in providing an effective solution for controlling the motor unit system and training individuals to control the velocity of stimulated arm movements.

Mean Average Time to Target and Standard Deviation Time to Target
The Mean Average Time to Target= (5.95 seconds) and Standard Deviation Time-to-target = (3.57seconds) recorded this study were compared with the results of Williams and Kirsch [9], who investigated the performance of a three-user interface with the aim of restoring control in individuals with tetraplegia.One of these interfaces, involved EMG from the face and the neck muscles.The results showed EMG reaction time as "the time between the start of the trial and the initiation of cursor movement" [9] in this study was 1.02 ± 0.25 seconds.The results of the present study for Mean Average Time to Target and Standard Deviation Time to Target do not lie in or near the range of the EMG reaction times recorded by Williams and Kirsch [9].From the results, it is clear that EMG signals can be used effectively with low Target to Time as command inputs for controlling the arm movements of the participants, as revealed from the use of head orientation and neck muscle EMG signals as command inputs to a human-computer interface for individuals with high tetraplegia.Further, the satisfactory results in comparison to those of Williams and Kirsch [9] indicate the low efficiency of the participants selected in the study.The results of each of the subjects are much higher than the EMG reaction time of 1.02 ± 0.25 seconds, reflecting modifications made to enhance the efficiency of the arm model.
The Time to Target results can also be compared with those of Corbett et al. [15], who investigated two different sets of surface EMG for the real-time evaluation of a non-invasive neuroprosthetic interface in order to control reach.The results showed that the velocities forecasted by the decoders were sent as kinematic control signals to the robot at a rate of 60 Hz, ultimately showing that less time is required for the completion of movement [15].Similarly, Simon et al. [16] obtained the average completion rate to show the time taken by the cursor to reach the target and complete the task.They set completion time as "the time from trial start to the successful achievement of the target posture, not including the 2 seconds dwell" [16].The completion time outcomes for the three conditions in the study were 2.9 ± 1.0 seconds, 5.6 ± 0.9 seconds, and 20.1 ± 4.0 seconds.The results for a one-motion target can be better analysed to correlate with the results of this study.The outcomes were lower, i.e. the average completion time was 2.9 seconds with a standard deviation of 3.57 seconds, as compared to the results of the virtual arm model, i.e. 5.95 seconds and 3.57 seconds, respectively [16].

Mean Average Path Efficiency and Standard Deviation Path Efficiency
Similarly, the results for Mean Average Path efficiency = (65.26%)and Standard Deviation Path Efficiency = (21.31%)were compared with the results of Williams and Kirsch [9].The results of their study showed that EMG guided cursor motion achieved a path efficiency of 61% ± 10%.The EMG guided motion in this study showed a much higher speed for restoration of the arm movement.By comparing these results with those of the present study, it is found that the path efficiency of the virtual arm model (65.26%) is much higher than that in the previous study.This means that all the subjects selected for the present study showed great performance in terms of straightness of the fingertip of the virtual arm path to the target.Besides "Subject 5" who had an average path efficiency of 48.1%, all the subjects all the subjects had a path efficiency that was close to or greater than that achieved in previous studies.Thus, there is a need to set the acceptable path efficiency of the virtual arm movement before selection.The path efficiency achieved in this study can be compared with that achieved by Corbett et al. [15], who identified that ideal straight-line reach path were statically similar at p > 0.9.As far as this ideal paths efficiency is considered, the authors proposed further improvement based on their results [15].
Simon et al. [16] tested the performance metrics of completion time, completion rate and path efficiency in order to assess the Target Achievement Control Test designed for evaluating real-time myoelectric pattern-recognition control of multifunctional upper-limb prostheses.In their study, trials conducted with a reference path efficiency of 100% revealed extraordinary performance results for the subject in moving the virtual prosthesis directly into the target posture and stopping within adequate forbearance.The results showed that for three of the conditions set in the study (one-motion to three-motion postures), path efficiencies of 92.8 ± 3.9, 81.1 ± 5.0 and 54.7 ± 11.1 were achieved [16].In relation to the results of this study, the results of the present study are quite unsatisfactory and require further improvement, as a low average path efficiency and high variation indicate that the model can perform better in order to accomplish the desired aim [16].
The comparison results did not show appropriate outcomes as the previous studies revealed more than satisfactory and above average ideal outcomes for both the average time to target and path efficiency.

Conclusion
The results of this study are expected to be particularly beneficial for patients suffering from stroke or spinal cord injuries.Such injuries can interrupt the neural pathways for controlling the muscles of the arm, ultimately leading to complete or partial paralysis.The model is a valuable development in the field of biomedical engineering where clinicians face much difficulty in restoring muscle control of patients.Although they know about the use of virtual trajectories using EMG signals as command signals to control the movements, sufficiently developed virtual interfaces for this purpose are not available.Electromyography control of the virtual arm model was found effective in accomplishing the aim of study, i.e. to train six subjects in controlling their arm movements.The model proved to be an efficient method for using EMG signals as command signals to train the subjects through the virtual arm model.The model showed extraordinary potential.It helped the individuals to achieve perfection in myoelectric control over repeated trials (3 trails).This study shows a clear relationship among the average time to target, path efficiency, and number of targets acquired in relation to the training given, gain selected, velocity of the virtual arm movement, and EMG response from signals.After identifying the specific relationship among these variables for patients suffering from stroke or spinal cord injuries, clinicians in the future would be able to develop a relaxing environment for their rehabilitation, thereby facilitating restoration of their arm movements.

Figure 4 and
Figure4 and Figure5show how the electrodes were attached.The first EMG electrode was placed on the pectoralis major muscle, the second, on the middle deltoid muscle, the third, on the teres major muscle, and the fourth, on the posterior deltoid muscle.However, the third electrode was placed on the teres major muscle and the forth finally on posterior deltoid muscle.It was discovered that it

Figure 3 .
Figure 3. 3D model of the human arm with target designed by MATLAB ® software.

Figure 4 .
Figure 4. Participant with electrodes attached tothe pectoralis major and middle deltoid muscles.

Figure 5 .
Figure 5. Participant with electrodes attached to the posterior deltoid and teres major muscles.

Figure 8
Figure8shows the fingertip of the arm model endpoint and distance travelled.The fingertip endpoint depends on the shoulder angle and elbow angle of the arm model (see Equation (4)):

Figure 7 .
Figure 7.The black Line (1) is the straight-line distance and the blue Line (2) is the actual distance.

Figure 8 .
Figure 8. Schematic showing fingertip of arm model endpoint and distance travelled."H" is the hand endpoint, "θs" is the elbow angle, "θe" is the shoulder angle, "Lf" is the length of the forearm = (78 cm), "La" is the length of the arm = (58 cm).

Table 1 .
Performance measures for six participants.
a each trial = 60 seconds.