Developing a System for Real Time Prediction of Reach Trajectory using MEG

Skip secondary menu

This summer I have been working to implement a real-time system for collection of magnetoencephalograph (MEG) signals and subsequent statistical prediction of reach trajectory in healthy volunteers. Previous work by my mentor Claudia Bonin has yielded an offline method for extracting significant features from MEG signals in left and right reaching tasks. The offline signal analysis has three primary components: epoching of the MEG signals to yield half-second segments of data starting 2 seconds prior to movement onset, estimation of the signal power during the half-second epochs, and analysis of epochs prior to left and right reaches to determine statistical discrepancies between the two classes of reaching behavior. Once statistically significant discrepancies have been identified in a subset of sensors and frequency ranges, the left and right reach events can be modeled using partial least squares regression to predict a subject's intended reach trajectory in future trials.

The current implementation of the offline analysis is time-consuming and requires collaboration between multiple computers, software packages, and researchers to produce the final prediction of reach trajectories. Due to the long time lag between data collection and data analysis, it is impossible to provide the experimental subjects with feedback regarding their performance. The ultimate goal of the real-time system for MEG signal analysis is to allow researchers in brain-computer interface (BCI) to close the loop between the subject and the stimulus-allowing recorded neural signals to change the stimulus being presented. A closed-loop system would open the door to a variety of research questions, most notably about the nature of free will in the human brain. By sliding the epochs either closer to or further in advance of movement onset, it could be possible to make an accurate assessment of when the brain has decided to reach left or right and compare this time to the initial perception of reach intention by the subject. From a clinical perspective, the analysis and prediction of reach trajectories prior to movement onset would be a large step in the direction of seamlessly controlled upper-limb neuroprosthetic devices. Neuroprosthetic devices are already being implemented in patients with spinal cord injury and amputated limbs, but inability to decipher appropriate neural signals requires sometimes awkward control via other muscle groups (e.g. control of a hand grip orthosis using neck muscle contraction). An accurate prediction of reach trajectory from non-invasively recorded signals prior to movement would allow neuroprosthetic devices to function less like foreign robotic implants and more like functional human limbs.

I have been writing a Python script to accomplish the real-time MEG signal analysis, and the current version successfully epochs, performs power calculation of incoming MEG signals, and exports the results to a text file. The statistical analysis of signal features is subsequently performed in an R script written by Kory Johnson, which uses the text file generated in real-time to model the reach tasks. Although R is not currently installed on the computer performing the data collection, the software is free and open source and should be able to be loaded onto the computer in the near future. Future work on this project will involve augmenting the Python script to initiate the statistical modeling of the reach tasks. Once the model results have been exported, the data collection can begin again, but with the MEG signal features serving as input to the statistical model and yielding a prediction of left or right reaching prior to physical movement. For the future time point when this real-time model generation becomes possible, I have also been developing a basic stimulus presentation script that will allow .jpg and .bmp images to be displayed at user-specified time intervals. The creation of the stimulus script should enable a fairly simple connection between the data acquisition computer and the stimulus presentation computer for real-time performance feedback. I plan to continue developing these scripts so that other NIH MEG users with limited computer programming experience can implement their own real-time systems using a variety of experimental paradigms.

Last updated August 26, 2008