Theoretical physicist Michio Kaku once said that with a 100 billion neurons, each neuron connecting to 10,000 other neurons, the human brain is the most complex object in the known universe. While the brain has baffled us for many centuries, we are now finally beginning to understand how it works, but more importantly, how we can fundamentally extract signals and find patterns to fix neurodegenerative anomalies and enable advanced physiological capabilities. Now, with advances in machine intelligence, deep learning, and electrode hardware, we can isolate and analyze brain signals, allowing scientists and researchers to understand thoughts and perceptions at the base level which opens up the possibility of neuromodulation using computers.This series is an attempt to allow a person with no expertise in the brain-computer interface (BCI) area to understand what they are and how we can use machine learning to analyze brainwaves in unique ways. The project explored in this series is in collaboration with Dr. Chris Crawford of the Human Technology Interaction Lab (HTIL) at the University of Alabama. This also goes to demonstrate that amateur scientists can use basic electroencephalogram (EEG) devices to extract and analyze brainwaves, and in turn can deploy large-scale open source platforms so the general public can experiment with their own brain data.What is this series about?

This series aims to provide a comprehensive guide to brain computer interfaces through the project described below. There will be four parts to this series: the first is an introduction to Muse and data storage, the second establishes the machine learning necessary for experimentation, the third talks about sophisticated machine learning algorithms used to increase accuracy, and the fourth is a general assessment of the field with commentary on the future of BCI.

What is the project?

The project developed at HTIL is an EEG analysis platform that uses a Muse consumer-grade EEG headset and a web-based application to run simple and fast motor imagery and emotional classification experiments. It contains real-time data streaming, powerful integrated machine learning algorithms that provide high accuracy classifications, and interactive visualizations in a user-friendly interface.

Here, we will cover the basics behind the project and this series starting with:

  1. Introduction to BCI: We’llgo over what brain computer interfaces are, the importance of electrode placement, and the different frequencies of electrical signals.
  2. Muse, Bluetooth, and Architecture: The Muse EEG is a very useful device that is used to collect brain signals through electrodes. We’ll cover how it works and how it can connect to a React web app and Chrome’s Web Bluetooth system.
  3. Data Management: Managing data across many channels and trials is difficult, so we’ll explore how to do this using React state and Contexts.

In order to implement the section of the project described in this article, you will need the following:

  • A working understanding of JavaScript/React and how to create a component tree using React components. Here is the React documentation.
  • A Chrome browser and knowledge of and access to the Web Bluetooth API, as well as a Muse EEG Version 2.

What Are Brain Computer Interfaces?

Brain Computer Interfaces (BCI) are devices that interface directly with brain-activity, measured by a device capable of reading brain activity known as an electroencephalogram (EEG). EEG devices record electrical activity through invasive or noninvasive electrode placement. Invasive BCI usually requires surgery which comes with the risk of infection or brain damage; however, the signals collected are much stronger. Noninvasive BCI are less intrusive and allow for a wider range of brain activity, but the signals collected are noisy and patterns aren’t as easy to find. While intrusive BCI devices are the subject of many interesting research papers and groundbreaking technologies, the focus of this series will be on noninvasive BCI devices, since its much more practical for amateur researchers and the public to experiment with.As mentioned earlier, electrode placement is important in getting uninterrupted, clean signals from certain regions in the brain. Lots of research has been conducted internationally to determine a universal system of electrode placement, which ultimately resulted in the International 10–20 system. The 10–20 system is an internationally recognized scalp electrode placement system used in the context of EEG data collection.

Figure 1: International 10–20 System (Wikipedia)

The “10” and “20” refer to the actual distances between adjacent electrodes, which are either 10% or 20% of the longitudinal and latitudinal skull distance relative to the nasion and inion (the front and back of the head respectively). Many noninvasive BCI devices employ this electrode placement system to collect streams of brain data. For example, the Muse, designed by the InteraXon company in 2014, is a consumer-grade wearable EEG headband designed to collect brainwave data for meditation purposes. Researchers have looked into re-purposing the Muse device for other use cases as findings have shown that the placement of its electrodes provides motor imagery and emotional classification capabilities. For example, Munawar Riyadi et al. developed a motor imagery classification model using Support Vector Machine (SVM) algorithms with the Muse device that reached a 86.6% training accuracy and a 100% test accuracy in identifying motor states. Furthermore, Zhen Li, Jianjun Xu, and Tingshao Zhu et al. developed a motor imagery classification model using Common spatial pattern (CSP) and SVM algorithms with the Muse device that reached a 95.1% accuracy. These kinds of advances allow researchers to use brainwave data from the Muse in motor imagery without direct or invasive motor cortex interaction.

Figure 2: InteraXon Muse EEG

While BCI devices use electrodes to collect data, exactly what type of data is being collected? When people perform any cognitive functions, physical or mental, the brain produces electrical signals (data) which are detected by electrodes. Brainwaves are not the source or cause of these brain states, rather they are observable reflections of these complex processes. Brainwaves are classified based on their amplitude and frequency. For example, low activity brainwaves have a low frequency and high amplitude whereas high activity brainwaves have a high frequency and low amplitude. Within these two, researchers have identified five different frequency ranges of these electrical signals based on their specific cognitive correlation: _delta, theta, alpha, beta, _and _gamma _as shown below.

Figure 3: Brain Wave Classification

Cognitive functions related to motor imagery and emotional classification are detected through _alpha _and _beta _waves, and are best expressed through a phenomena known as event-related desynchronization (ERD) and synchronization (ERS). We can use devices such as the Muse to detect such sensorimotor activity.

#brain-computer-interface #brain #react #machine-learning #cortex #programming

Connecting Your Thoughts
1.40 GEEK