teknos logo.png

Welcome to the website for Teknos, Thomas Jefferson's Science Journal, showcasing student articles, papers, and editorials. Enjoy!

Predicting Muscle Spindle Afferent Output

Predicting Muscle Spindle Afferent Output

Predicting Muscle Spindle Afferent Output in Human Forearm Muscles During Wrist Flexion/Extension and Radial/Ulnar Deviation

Stephanie Hachem

Thomas Jefferson High School for Science and Technology


Modern prosthetics lack proprioception, or the sense of self-movement and body position, which is essential for daily tasks. My team and I have created a system that predicts proprioception sense organ output (muscle spindle afferent (Ia, II) firing rates) given surface electromyographic (sEMG) data of forearm muscles during wrist flexion, extension, and ulnar or radial deviation for prosthetics that interface with the nervous system. sEMG was recorded, processed and input to a Forward Dynamics tool to predict muscle lengths, which were input to a model which predicts afferent output. We shortened simulation time through the parallelization and allocation of resources to six compute nodes of a cluster. Predicted afferent output was higher for muscles that antagonized the given movement, which makes physiological sense. Thus, this system is deemed to have predictive power and is the first system able to predict afferent output given sEMG data. However, because only one participant supplied sEMG data, the results are preliminary and cannot be generalized. Unlike measuring all the joint angles and torques of a human forearm, recording sEMG is simple and non-invasive. Therefore, compared to systems which predict afferent output given joint angles and torques, this system's input of sEMG can be used to validate the system’s predictions and components. Those system components may later be used in prosthetics that provide proprioception. 

Introduction & Background

Proprioception is the internal sense of the relative position of neighbouring parts of the body. This sense is mediated by proprioceptors: mechanosensory neurons that are located within muscles, tendons, and joints. Nerves communicate the sensation of proprioception, but because commercial prosthetics do not interface with the nervous system, they lack this sense. It is often difficult or impossible to perform hand-eye coordination tasks with commercial prosthetics, and thus upper limb prosthetics can become a nuisance that around 30% of amputees, depending on the type of prosthetic, do not use.3 A majority (50-80%4) of amputees experience phantom limb pain, or the occurrence of apparent pain in amputated limbs, which is often distressing.11 Neurologists theorize that defective peripheral or spinal mechanisms27, specifically defective proprioceptive neural input1, 28, cause phantom limb pain, and thus suitable proprioceptive neural input may ameliorate this pain.

Defense Advanced Research Projects Agency (DARPA), a United States government military research agency, is actively developing proprioceptive prosthetics, which may provide amputees with a number of medical benefits and a more fluid use of prosthetics.23 Many groups are currently working to create accurate programming models that predict the output of afferent nerves, nerves which send information to the central nervous system, from proprioceptors (proprioception sensory organs).

Applicability of System Which Predicts Afferent Output From sEMG 

A system that can predict proprioceptor afferent output in real time when given joint angles and torques has already been created and validated with experimental data. However, it is difficult to validate for humans, unable to predict afferent output given sEMG input, and closed-source.29 In the case of an amputee, joint angles and torques of prosthetic limbs can be easily measured with sensors and input to that system to predict afferent output and restore an amputee's proprioception. That system was validated with other proprioceptor models and afferent output data measured with microneurography, the technique of inserting electrode-tipped needles into proprioceptor afferent nerves to measure afferent output.10 However, while taking many trials to record all joint angles and torques is required for biomechanical simulations with OpenSim, doing so non-invasively is not feasible in living humans. Therefore, while afferent output (the system's output) can be easily measured with microneurography, joint angles and torques (the system's input) are nearly impossible to measure, which makes validating that system for humans difficult. In comparison, a system with the input of sEMG and the same output of afferent output, as presented here, can easily and thoroughly be validated with human data. The system presented here cannot be directly applied to prosthetics, because sEMG cannot be recorded in the case of an amputee's amputated limb. Yet, with the input of joint angles and torques measured from prosthetics, and use of the OpenSim Inverse Kinematics tool, my system can be used for proprioceptive prosthetics. Additionally, proprioceptor simulation has other applications, including possibly providing proprioception in cases where the motor neurons can produce muscle excitations, but afferent output is incorrect or is not produced.

Received Experimental Data

A system able to predict afferent output must be validated with experimental data. Microneurography is currently the primary technique for recording afferent output in humans. Upon email request, de-identified data of muscle excitations and afferent output, recorded with sEMG (in the muscles ECR, EDC, FCR) and microneurography, respectively, in the human forearm as participants performed certain movements (wrist extension/flexion, wrist radial/ulnar deviation, or a combination) was received from an author of a study19; that study will be considered the “study of interest”. The muscles, along with other muscles listed in Fig. 2, and movements listed above are of interest for this paper. See Fig. 1 for the setup of the study of interest.

Background: Physiology

Creating a system able to predict afferent output requires an understanding of the physiology of proprioception. Muscle spindles are the most studied proprioceptor. Spindles are sacks of sensitive fibers attached to a number of separate, extrafusal muscle fibers (muscle fibers which contribute to muscle contraction, not proprioception) inside a muscle belly, allowing the spindles to be stretched in tandem with the muscle. Sensory information encoded by those fibers is transmitted as electrical signals by two main types of afferent nerves: Ia afferents, which encode muscle length (by firing more frequently in stretched muscles) and change of muscle length (by firing more frequently in quickly stretched muscles), and II afferents, which encode only muscle length. Thus, when a muscle is stationary, both Ia and II output encode the muscle's length, and when a muscle is stretching, Ia output increases drastically to indicate the speed of the stretch while II output increases proportionally to muscle length.

Background: Literature Review

The accumulation of afferent data following the invention of microneurography led to the creation of mathematical models of proprioceptor output, particularly that by Mileusnic, Brown, Lan, and Loeb.20 That model closely resembles the physiological elements of spindles, and was validated by its remarkable accuracy in reproducing experimentally-observed spindle characteristics and behavior under numerous conditions.24

Mathematical models describing biomechanics are required to translate movement data (motion capture, muscle excitations, etc.) recorded during microneurography experiments into muscle fiber lengths, which are the input of mathematical models of proprioceptor output.19 Delp et al. developed the open-source software OpenSim for the simulation and analysis of musculoskeletal movement. OpenSim predicts several states of a model, including possible lengths of a given model's muscles given sEMG.

Vannucci, Falotico, and Laschi programmed a spindle model implemented in Python and the Neural Simulation Tool.12, 24, 25 The spindle model’s algorithms are based on simplifications of algorithms presented by Mileusnic et al., which attempt to minimize the loss in prediction accuracy while realizing real-time computation speed. The spindle model was validated and applied in robotic and biological applications.

Experimental Design

The objective of this study is to create an open-source system which predicts afferent output and can be validated with non-invasive, easily measured experimental data. sEMG is a simple, non-invasive procedure fitting that need. Because the project aims to create a system, there is no independent and dependent variable, nor a hypothesis based on a relationship between those variables. However, paired t-tests (alpha = 0.05) between the system’s predicted and physiologically expected afferent output, as well as the same test between the system’s predicted and experimental afferent output from the “study of interest” will be run. The experimental hypothesis is that experimentally measured afferent output is correlated with the system’s predicted afferent output.

Methods & Materials

sEMG Recording Setup

sEMG was recorded by having the participant wash his or her forearms with soap and water, marking electrode sites on the participant’s skin with pen, rubbing electrode gel (Parker Laboratories; New Jersey, USA; Signagel Electrode Gel) in a 1.9 cm radius around each site, placing surface Ag/AgCl electrodes (ADInstruments; Colorado, USA; MLA1010 Disposable ECG Electrodes) at sites, and recording with the data acquisition software LabChart. One electrode was placed on the olecranon to ground sEMG recordings. Electrode sites are specified in Fig. 2. ECRB and FCR sEMG electrode placement were as recommended by literature13, and other placement based on figures.14, 21 Ag/AgCl electrodes2 and electrode gel were used to lower electrode-skin impedance and increase the signal-to-noise ratio. As per SENIAM recommendations, inter-electrode distances were 20 mm and electrodes were secured to the skin via tape as in Fig. 3.16

sEMG Recording

The participant was instructed to perform maximum voluntary contractions (MVCs), or the act of contracting muscles as much as one can. Because training for MVCs is recommended17, participants were instructed to practice MVCs with forearm muscles for ten seconds at a time. Both a video that captured only the participant's arm and a separate video capturing the sEMG values were taken for each trial. For each trial, the participant performed two MVCs for ten seconds, with a ten-second wait after each MVC; and each movement of interest ten times consecutively, with a ten-second wait after each set of ten repetitions. After trials, the participant washed the experimental forearm with soap and water to remove the electrode gel and pen marks.

Offline sEMG processing

In LabChart, each channel was checked at 0.2 mV magnification for any abnormal sections or sinusoidal signals at 60 Hz, 120 Hz, or other multiples of 60 Hz, noise which would have been from nearby machines. No sinusoidal signals were present due to the online passive RC lowpass filter (cutoff frequency of 50 Hz) on each channel, and abnormal sections were removed from the array of sEMG. sEMG was then passed through a 34th order Hamming-window highpass filter (0.10 cutoff frequency), rectified, smoothed with a root mean square (RMS) linear envelope (increment of 1 ms, a window size of 1000 s), and normalized to the maximum voltage that occurred during the two MVC phases of sEMG recording. That maximum voltage is different for each muscle and movement. See Fig. 4 for an example of sEMG processing in the FCU muscle during a set of ten ulnar deviations in trial 3.

All processed sEMG data was written to files, with each file containing ten seconds’ worth of data to minimize the number of files that needed to be written while keeping the increment small enough that Forward Dynamics simulation error would not accumulate too much. Files were written in the format of an OpenSim file containing controls (inputs of a musculoskeletal system, such as muscle excitations or torque generations). Using OpenSim's MATLAB interface, Forward Dynamics was performed (output precision of 20, to solve for equilibrium) with the Upper Extremity arm model of the right arm22 for each written controls file of ten seconds. In the arm model's file, model joint angles and translations were set to values which pose the arm model as close as possible to the participant's pose in the study of interest. That pose was described by the primary investigator of the study of interest, in correspondence. See the arm model's pose in joint angles in Fig. 5, and the arm model's pose, in OpenSim, in Fig. 6.

Forward Dynamics: Setup 

Forward Dynamics wrote lengths of each muscle at each timestep to the output file containing the model's states, which include joint angles, joint speeds, muscle activations, and muscle fiber lengths. The column of time at each timestep and the columns of lengths of muscles from which sEMG was recorded from in this study were written to separate text files, each containing one column, with the column header as the file's name. 

Spindle Model: Setup 

Timesteps in the states file are non-uniform because certain coordinates are less likely to occur given the constraints of the model. However, simulating afferent output in uniform timesteps requires less memory for storing files, so muscle lengths at uniform timesteps were obtained using the files for time and for each muscle. Muscle lengths were divided by each muscle's optimal fiber length, which was obtained by viewing the arm model in the OpenSim graphical user interface. The spindle model cannot simulate afferent output for generally unrealistic input (muscle lengths as a decimal of optimal fiber lengths), where the limits were deemed to be less than 0.7 or greater than 1.3.24 Therefore, if, over its ten-second interval, input was not once outside those limits, the spindle model was run with that input.

Spindle Model

A multimeter (parameters including "interval": 0.1, "withgid": True) wrote afferent output to a file, and a spike detector wrote data to another file to plot Ia and II afferent output over time on a raster plot (see Fig. 7 for an example graph and the graph produced in processing). One hundred spindles, each containing either an Ia afferent or an II afferent, is a reasonable number of spindles per human forearm muscle, because a study26 found muscles of interest to have, on average, 143 spindles: ECRB with 102 spindles (absolute number of muscle spindles); ECRL with 74; ECU with 157; EDC with 219; FCR with 129; and FCU with 175.

Cluster. Later profiling showed that the Forward Dynamics and spindle model simulations were the major bottlenecks of processing from sEMG to afferent output. As a result, spindle model simulation time was shortened by parallelization with the Message Passing Interface for Python5-7 and requesting jobs with SLURM30 to six compute nodes of a cluster (Linux shell). See Fig. 8 for spindle simulation time decrease per additional compute node used.

Results & Analysis

Data Analysis

Expected Results

Simulated afferent output was visually compared with the expected afferent output for a certain muscle during a particular movement. Afferent output expectations were based on physiology: both Ia and II afferent output increase as muscle length increases. Therefore, since the muscle contracts, or shortens, during extension and stretches during flexion, afferent output of the muscle is expected to increase during flexion. For each muscle and movement of interest, see Fig. 9 for the physiologically expected afferent output, and see Fig. 10 for the system's simulated average afferent output. 


While the study is preliminary and its results cannot be generalized, the system predicts afferent output fairly accurately for each muscle of interest, between movements of interest.


1. The study is preliminary, and thus results cannot be generalized to other humans. 2. As circled in Fig. 10, predicted afferent output for ECRB radial/ulnar deviation during trial 1, output for FCU radial/ulnar deviation during trial 2, and FCR extension/flexion and radial/ulnar deviation during trial 3 are incorrect. 

Further Plans

1. To generalize results to other participants, we plan to record sEMG data from at least thirty people, enough to assume a normal distribution in statistical tests. 2. To decrease simulation time, we plan to finish streaming all data, from sEMG recording to data analysis.


[1] Anderson-Barnes, V. C., McAuliffe, C., Swanberg, K. M., & Tsao, J. W. (2009). Phantom limb pain–a phenomenon of proprioceptive memory? Medical hypotheses, 73(4), 555-558. doi:10.1016/j.mehy.2009.05.038

[2] Albulbul, A. (2016). Evaluating major electrode types for idle biological signal measurements for modern medical technology. Bioengineering, 3(3), 20. doi:10.3390/bioengineering3030020

[3] Biddiss, E. A., & Chau, T. T. (2007). Upper limb prosthesis use and abandonment: a survey of the last 25 years. Prosthetics and orthotics international, 31(3), 236-257. doi: 10.1080/03093640600994581

[4] Birbaumer, N., Lutzenberger, W., Montoya, P., Larbig, W., Unertl, K., Töpfner, S., Grodd, W.,  Taub, E., & Flo, H. (1997). Effects of regional anesthesia on phantom limb pain are mirrored in changes in cortical reorganization. Journal of Neuroscience, 17(14), 5503-5508. doi:10.1523/JNEUROSCI.17-14-05503.1997

[5] Dalcin, L., Paz, R., Kler, A., & Cosimo, A. (2011). Parallel distributed computing using Python. Advances in Water Resources, 34(9), 1124-1139. doi:10.1016/j.advwatres.2011.04.013

[6] Dalcin, L., Paz, R., & Storti, M. (2005). MPI for Python. Journal of Parallel and Distributed Computing, 65(9), 1108-1115. doi:10.1016/j.jpdc.2005.03.010

[7] Dalcin, L., Paz, R., Storti, M., & D’Elıa, J. (2008). MPI for Python: Performance improvements and MPI-2 extensions. Journal of Parallel and Distributed Computing, 68(5), 655-662. doi:10.1016/j.jpdc.2007.09.005

[8] Delp, S. L., Anderson, F. C., Arnold, A. S., Loan, P., Habib, A., John, C. T., ... & Thelen, D. G. (2007). OpenSim: open-source software to create and analyze dynamic simulations of movement. IEEE transactions on biomedical engineering, 54(11), 1940-1950. doi:10.1109/TBME.2007.901024

[9] Desmond, D. M., & MacLachlan, M. (2010). Prevalence and characteristics of phantom limb pain and residual limb pain in the long term after upper limb amputation. International Journal of Rehabilitation Research, 33(3), 279-282. doi:10.1097/MRR.0b013e328336388d

[10] Edin, B. B., & Vallbo, A. B. (1990). Dynamic response of human muscle spindle afferents to stretch. Journal of Neurophysiology, 63(6), 1297-1306. doi:10.1152/jn.1990.63.6.1297

[11] Gallagher, P., Allen, D., & MacLachlan, M. (2001). Phantom limb pain and residual limb pain following lower limb amputation: a descriptive analysis. Disability and rehabilitation, 23(12), 522-530. doi:10.1080/09638280010029859

[12] Gewaltig, M. O., Morrison, A., & Plesser, H. E. (2012). NEST by example: an introduction to the neural simulation tool NEST. In Computational Systems Neurobiology (pp. 533-558). Springer, Dordrecht. doi:10.1007/978-94-007-3858-4_18

[13] Ghapanchizadeh, H., Ahmad, S. A., & Ishak, A. J. (2015, November). Recommended surface EMG electrode position for wrist extension and flexion. In Biomedical Engineering & Sciences (ISSBES), 2015 IEEE Student Symposium in (pp. 108-112). IEEE. doi:10.1109/ISSBES.2015.7435877

[14] Gray, H., & Carter, H. (1918). Anatomy of the Human Body (20th ed.). Retrieved from https://www.bartleby.com/107/125.html

[15] Hagbarth, K. E., & Vallbo, Å. B. (1968). Discharge characteristics of human muscle afferents during muscle stretch and contraction. Experimental Neurology, 22(4), 674-694. doi:10.1016/0014-4886(68)90156-8

[16] Hermens, H. J., Freriks, B., Disselhorst-Klug, C., & Rau, G. (2002). The SENIAM project: Surface electromyography for non-invasive assessment of muscle. In ISEK Congress (pp. 22-25).

[17] Konrad, P. (2005). The abc of emg. A practical introduction to kinesiological electromyography, 1, 30-35.

[18] Jensen, T. S., Krebs, B., Nielsen, J., & Rasmussen, P. (1983). Phantom limb, phantom pain and stump pain in amputees during the first 6 months following limb amputation. Pain, 17(3), 243-256. doi:10.1016/0304-3959(83)90097-0

[19] Jones, K. E., Wessberg, J., & Vallbo, Å. B. (2001). Directional tuning of human forearm muscle afferents during voluntary wrist movements. The Journal of physiology, 536(2), 635-647. doi:10.1111/j.1469-7793.2001.0635c.xd

[20] Mileusnic, M. P., Brown, I. E., Lan, N., & Loeb, G. E. (2006). Mathematical models of proprioceptors. I. Control and transduction in the muscle spindle. Journal of neurophysiology, 96(4), 1772-1788. doi:10.1152/jn.00868.2005

[21] Morasky, I. A. [Sketch]. Retrieved from https://backyardbrains.com/experiments/RobotHand. 

[22] Saul, K. R., Hu, X., Goehler, C. M., Vidt, M. E., Daly, M., Velisar, A., & Murray, W. M. (2015). Benchmarking of dynamic simulation predictions in two software platforms using an upper limb musculoskeletal model. Computer methods in biomechanics and biomedical engineering, 18(13), 1445-1458. doi:10.1080/10255842.2014.916698

[23] Schiefer, M. A., Graczyk, E. L., Sidik, S. M., Tan, D. W., & Tyler, D. J. (2018). Artificial tactile and proprioceptive feedback improves performance and confidence on object identification tasks. PloS one, 13(12), e0207659. doi:10.1371/journal.pone.0207659

[24] Vannucci, L., Falotico, E., & Laschi, C. (2017). Proprioceptive Feedback through a Neuromorphic Muscle Spindle Model. Frontiers in neuroscience, 11, 341. doi:10.3389/fnins.2017.00341

[25] Vannucci, L., Falotico, E., & Laschi, C. (2018). NeuralModels. Retrieved from https://gitlab.com/sssa-humanoid-robotics/NeuralModels

[26] Voss, H. (1971). Tabulation of the absolute and relative muscular spindle numbers in human skeletal musculature. Anatomischer Anzeiger, 129(5), 562-572.

[27] Wall, P. D. (1981). On the origin of pain associated with amputation. In Phantom and stump pain (pp. 2-14). Springer, Berlin, Heidelberg. doi:10.1007/978-3-642-68264-3_1

[28] Weeks, S. R., Anderson-Barnes, V. C., & Tsao, J. W. (2010). Phantom limb pain: theories and therapies. The neurologist, 16(5), 277-286. doi:10.1097/NRL.0b013e3181edf128

[29] Williams, I., & Constandinou, T. G. (2014). Computationally efficient modeling of proprioceptive signals in the upper limb for prostheses: a simulation study. Frontiers in neuroscience, 8, 181. doi:10.3389/fnins.2014.00181

[30] Yoo, A. B., Jette, M. A., & Grondona, M. (2003, June). Slurm: Simple linux utility for resource management. In Workshop on Job Scheduling Strategies for Parallel Processing (pp. 44-60). Springer, Berlin, Heidelberg. doi:10.1007/10968987_3


Figure 1

Figure 1

Figure 2

Figure 2

Figure 3

Figure 3

Figure 4

Figure 4

Figure 5

Figure 5

Figure 6

Figure 6

Figure 7

Figure 7

Figure 8

Figure 8

Figure 9

Figure 9

Figure 10

Figure 10

Modeling Aquaporin Targets Against Tumor Growth

Modeling Aquaporin Targets Against Tumor Growth