Real-Time Magnetoencephalography for Neurofeedback and Closed-Loop Experiments

  • Lauri ParkkonenEmail author


Magnetoencephalography (MEG) provides millisecond-scale temporal resolution and can thus track human cortical processes at the speed they occur. Compared to EEG, MEG offers considerably higher spatial resolution which enables better separation of simultaneously active neural sources. Both features make MEG an attractive technology for noninvasive brain–computer/machine interfaces (BCI/BMI). As in EEG, machine-learning algorithms play a central role in optimally applying MEG for BCI/BMI. Although MEG is expensive and non-portable, it could serve as a rapid development platform for eventual inexpensive EEG-based BCI systems that could be applied to patients. In addition, BCI-type approaches may also be used in basic neuroscientific research as they allow unique “closed-loop” experiments where subject’s brain activity influences the stimulus presented to the subject in real time. Such setups may open new windows to human brain function.

This chapter introduces the reader to MEG; signal genesis, instrumentation, data preprocessing, and modeling approaches are briefly discussed. Thereafter, real-time analysis of MEG signals is motivated with examples, and specific algorithmic and technical requirements for implementing such setups are covered and practical solutions referred to.


Brain–computer interface Magnetoencephalography Neurofeedback Real-time analysis 



The author thanks Mr. Mika Mäntykangas for software development for the real-time frequency tagging experiment and Mr. Mainak Jas for software contributions for real-time machine learning in “MNE python.”


  1. 1.
    Parkkonen L (2009) Expanding the applicability of magnetoencephalography (Ph.D. thesis) Helsinki University of Technology, Espoo, FinlandGoogle Scholar
  2. 2.
    Hämäläinen M, Hari R, Ilmoniemi RJ, Knuutila J, Lounasmaa OV (1993) Magnetoencephalography—theory, instrumentation, and applications to noninvasive studies of the working human brain. Rev Mod Phys 65:413–497CrossRefGoogle Scholar
  3. 3.
    Baillet S, Mosher JC, Leahy RM (2001) Electromagnetic brain mapping. Signal Process Mag IEEE 18:14–30. doi: 10.1109/79.962275 CrossRefGoogle Scholar
  4. 4.
    Hari R, Parkkonen L, Nangini C (2010) The brain in time: insights from neuromagnetic recordings. Ann N Y Acad Sci 1191:89–109. doi: 10.1111/j.1749-6632.2010.05438.x PubMedCrossRefGoogle Scholar
  5. 5.
    Hari R, Salmelin R (2012) Magnetoencephalography: from SQUIDs to neuroscience. Neuroimage 20th anniversary special edition. Neuroimage 61:386–396. doi: 10.1016/j.neuroimage.2011.11.074 PubMedCrossRefGoogle Scholar
  6. 6.
    Preissl H (2005) Magnetoencephalography. Academic Press, San DiegoGoogle Scholar
  7. 7.
    Hansen P, Kringelbach M, Salmelin R (2010) MEG: an introduction to methods. Oxford University Press, New YorkCrossRefGoogle Scholar
  8. 8.
    Supek S, Aine C (2014) Magnetoencephalography – from signals to dynamic cortical networks. Springer, BerlinGoogle Scholar
  9. 9.
    Murakami S, Okada Y (2006) Contributions of principal neocortical neurons to magnetoencephalography and electroencephalography signals. J Physiol 575:925–936. doi: 10.1113/jphysiol.2006.105379 PubMedCentralPubMedCrossRefGoogle Scholar
  10. 10.
    Parkkonen L, Fujiki N, Mäkelä JP (2009) Sources of auditory brainstem responses revisited: contribution by magnetoencephalography. Hum Brain Mapp 30:1772–1782. doi: 10.1002/hbm.20788 PubMedCrossRefGoogle Scholar
  11. 11.
    Öisjöen F, Schneiderman JF, Figueras GA, Chukharkin ML, Kalabukhov A, Hedström A, Elam M, Winkler D (2012) High-Tc superconducting quantum interference device recordings of spontaneous brain activity: towards high-Tc magnetoencephalography. Appl Phys Lett 100:132601. doi: 10.1063/1.3698152 CrossRefGoogle Scholar
  12. 12.
    Xia H, Ben-Amar Baranga A, Hoffman D, Romalis MV (2006) Magnetoencephalography with an atomic magnetometer. Appl Phys Lett 89:211104–211104–3. doi: 10.1063/1.2392722 CrossRefGoogle Scholar
  13. 13.
    Uusitalo M, Ilmoniemi R (1997) Signal-space projection method for separating MEG or EEG into components. Med Biol Eng Comput 35:135–140PubMedCrossRefGoogle Scholar
  14. 14.
    Parkkonen LT, Simola JT, Tuoriniemi JT, Ahonen AI (1999) An interference suppression system for multichannel magnetic field detector arrays. In: Yoshimoto T, Kotani M, Kuriki S, Karibe H, Nakasato N (eds) Recent advances in biomagnetism. Proceedings of the 11th international conference on biomagnetism. Tohoku University Press, Sendai, Japan, pp 13–16Google Scholar
  15. 15.
    Vigário R, Särelä J, Jousmäki V, Hämäläinen M, Oja E (2000) Independent component approach to the analysis of EEG and MEG recordings. IEEE Trans Biomed Eng 47:589–593. doi: 10.1109/10.841330 PubMedCrossRefGoogle Scholar
  16. 16.
    Mantini D, Franciotti R, Romani GL, Pizzella V (2008) Improving MEG source localizations: an automated method for complete artifact removal based on independent component analysis. Neuroimage 40:160–173. doi: 10.1016/j.neuroimage.2007.11.022 PubMedCrossRefGoogle Scholar
  17. 17.
    Taulu S, Kajola M (2005) Presentation of electromagnetic multichannel data: the signal space separation method. J Appl Phys 97:124905–124910. doi: 10.1063/1.1935742 CrossRefGoogle Scholar
  18. 18.
    Guo C, Li X, Taulu S, Wang W, Weber DJ (2010) Real-time robust signal space separation for magnetoencephalography. IEEE Trans Biomed Eng 57:1856–1866. doi: 10.1109/TBME.2010.2043358 PubMedCrossRefGoogle Scholar
  19. 19.
    Uutela K, Taulu S, Hämäläinen M (2001) Detecting and correcting for head movements in neuromagnetic measurements. Neuroimage 14:1424–1431PubMedCrossRefGoogle Scholar
  20. 20.
    Nenonen J, Nurminen J, Kičić D, Bikmullina R, Lioumis P, Jousmäki V, Taulu S, Parkkonen L, Putaala M, Kähkönen S (2012) Validation of head movement correction and spatiotemporal signal space separation in magnetoencephalography. Clin Neurophysiol 123:2180–2191. doi: 10.1016/j.clinph.2012.03.080 PubMedCrossRefGoogle Scholar
  21. 21.
    Farwell LA, Donchin E (1988) Talking off the top of your head: toward a mental prosthesis utilizing event-related brain potentials. Electroencephalogr Clin Neurophysiol 70:510–523PubMedCrossRefGoogle Scholar
  22. 22.
    Krusienski DJ, Sellers EW, McFarland DJ, Vaughan TM, Wolpaw JR (2008) Toward enhanced P300 speller performance. J Neurosci Methods 167:15–21. doi: 10.1016/j.jneumeth.2007.07.017 PubMedCentralPubMedCrossRefGoogle Scholar
  23. 23.
    Bianchi L, Sami S, Hillebrand A, Fawcett IP, Quitadamo LR, Seri S (2010) Which physiological components are more suitable for visual ERP based brain-computer interface? A preliminary MEG/EEG study. Brain Topogr 23:180–185. doi: 10.1007/s10548-010-0143-0 PubMedCrossRefGoogle Scholar
  24. 24.
    Tononi G, Srinivasan R, Russell DP, Edelman GM (1998) Investigating neural correlates of conscious perception by frequency-tagged neuromagnetic responses. Proc Natl Acad Sci U S A 95:3198–3203PubMedCentralPubMedCrossRefGoogle Scholar
  25. 25.
    Parkkonen L, Andersson J, Hämäläinen M, Hari R (2008) Early visual brain areas reflect the percept of an ambiguous scene. Proc Natl Acad Sci U S A 105:20500–20504. doi: 10.1073/pnas.0810966105 PubMedCentralPubMedCrossRefGoogle Scholar
  26. 26.
    Lamminmäki S, Parkkonen L, Hari R (2014) Human neuromagnetic steady-state responses to amplitude-modulated tones, speech, and music. Ear Hear 35:461–467. doi: 10.1097/AUD.0000000000000033 PubMedCentralPubMedCrossRefGoogle Scholar
  27. 27.
    Van Gerven M, Jensen O (2009) Attention modulations of posterior alpha as a control signal for two-dimensional brain-computer interfaces. J Neurosci Methods 179:78–84. doi: 10.1016/j.jneumeth.2009.01.016 PubMedCrossRefGoogle Scholar
  28. 28.
    Bahramisharif A, van Gerven M, Heskes T, Jensen O (2010) Covert attention allows for continuous control of brain–computer interfaces. Eur J Neurosci 31:1501–1508. doi: 10.1111/j.1460-9568.2010.07174.x PubMedCrossRefGoogle Scholar
  29. 29.
    Nolte G, Bai O, Wheaton L, Mari Z, Vorbach S, Hallett M (2004) Identifying true brain interaction from EEG data using the imaginary part of coherency. Clin Neurophysiol 115:2292–2307. doi: 10.1016/j.clinph.2004.04.029 PubMedCrossRefGoogle Scholar
  30. 30.
    Ora H, Takano K, Kawase T, Iwaki S, Parkkonen L, Kansaku K (2013) Implementation of a beamforming technique in real-time magnetoencephalography. J Integr Neurosci 12:331–341. doi: 10.1142/S0219635213500192 PubMedCrossRefGoogle Scholar
  31. 31.
    Schalk G, McFarland DJ, Hinterberger T, Birbaumer N, Wolpaw JR (2004) BCI2000: a general-purpose brain-computer interface (BCI) system. IEEE Trans Biomed Eng 51:1034–1043. doi: 10.1109/TBME.2004.827072 PubMedCrossRefGoogle Scholar
  32. 32.
    Sudre G, Parkkonen L, Bock E, Baillet S, Wang W, Weber DJ (2011) rtMEG: a real-time software interface for magnetoencephalography. Comput Intell Neurosci 2011:327953. doi:10.1155/2011/327953Google Scholar
  33. 33.
    Hartmann T, Schulz H, Weisz N (2011) Probing of brain states in real-time: introducing the ConSole environment. Front Psychol 2:36. doi: 10.3389/fpsyg.2011.00036 PubMedCentralPubMedCrossRefGoogle Scholar
  34. 34.
    Oostenveld R, Fries P, Maris E, Schoffelen J-M (2011) FieldTrip: open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Comput Intell Neurosci 2011:156869. doi: 10.1155/2011/156869 PubMedCentralPubMedGoogle Scholar
  35. 35.
    Gramfort A, Luessi M, Larson E, Engemann DA, Strohmeier D, Brodbeck C, Parkkonen L, Hämäläinen MS (2014) MNE software for processing MEG and EEG data. Neuroimage 86:446–460. doi: 10.1016/j.neuroimage.2013.10.027 PubMedCrossRefGoogle Scholar
  36. 36.
    Vrba J, Robinson SE (2001) Signal processing in magnetoencephalography. Methods 25:249–271PubMedCrossRefGoogle Scholar
  37. 37.
    Kleiner M, Brainard D, Pelli D, Ingling A, Murray R, Broussard C (2007) What’s new in Psychtoolbox-3. Perception 36:11–16Google Scholar
  38. 38.
    Florin E, Bock E, Baillet S (2013) Targeted reinforcement of neural oscillatory activity with real-time neuroimaging feedback. Neuroimage 88C:54–60. doi: 10.1016/j.neuroimage.2013.10.028 PubMedGoogle Scholar
  39. 39.
    Boe S, Gionfriddo A, Kraeutner S, Tremblay A, Little G, Bardouille T (2014) Laterality of brain activity during motor imagery is modulated by the provision of source level neurofeedback. Neuroimage. doi: 10.1016/j.neuroimage.2014.06.066 PubMedGoogle Scholar

Copyright information

© Springer Japan 2015

Authors and Affiliations

  1. 1.Department of Biomedical Engineering and Computational ScienceAalto UniversityAaltoFinland
  2. 2.Elekta OyHelsinkiFinland

Personalised recommendations