Pure Mathematics for Theoretical Computer Science

The Reading and Analyzing Of The Brain Electrical Signals To Execute a Control Command and Move an Automatic Arm

Barbara Charchekhandra
Volume 1, Issue 1, pp. 08-16 (2023)
DOI: https://doi.org/10.54216/PMTCS.010101
Online: https://www.americaspg.com/journal/40/article/2021

Abstract

In this research, brain computer interface was designed to record brain signals and connecting it to labview via Bluetooth technology. Brain signals were acquired for 10 persons according to a specific protocol designed for the purpose of study then analyze those signals in order to form statistical data and study the changes of frequency and amplitude depending on the opening and closing of the eye. Accordingly a signal processing algorithm was developed to obtain the frequency and amplitude of the brain signal and compare those values during the opening and closing of the eye and determine the discrimination values. After the analysis and the classification steps, the algorithm was developed to send the command data to the Arduino chip and linked to the signal processing algorithm. As a result, the brain signal was marked at the blink and processed to execute a control command to trigger a relay and move an automatic arm or perform any action.

 

Keywords: automatic arm; brain electrical signals; Adruino chip

The Reading and Analyzing Of The Brain Electrical Signals To

Execute a Control Command and Move an Automatic Arm

Barbara Charchekhandra

.Jadavpur University, Department Of Mathematics, Kolkata, India

Email: Charchekhandrabar32@yahoo.com

Abstract

In this research, brain computer interface was designed to record brain signals and connecting it to labview via Bluetooth technology. Brain signals were acquired for 10 persons according to a specific protocol designed for the purpose of study then analyze those signals in order to form statistical data and study the changes of frequency and amplitude depending on the opening and closing of the eye. Accordingly a signal processing algorithm was developed to obtain the frequency and amplitude of the brain signal and compare those values during the opening and closing of the eye and determine the discrimination values. After the analysis and the classification steps, the algorithm was developed to send the command data to the Arduino chip and linked to the signal processing algorithm. As a result, the brain signal was marked at the blink and processed to execute a control command to trigger a relay and move an automatic arm or perform any action. Keywords: automatic arm; brain electrical signals; Adruino chip

1. Introduction:

Brain-computer interfaces (BCI) technology is known as a technology that helps researchers build a communication channel between the human brain and the computer, where neuroscience has proven the existence of 100 billion neurons in the human brain, which is characterized by the electrochemical property, can be measured and described by six brain wave shapes (Delta - Theta - Alpha-Beta-Gamma-Mu). These waves describe various brain activities (movement -lethargy - thinking-sleep... For example, changes in the activity of alpha waves can be observed in terms of the maximum frequency and length of the wave, as well as the frequency range within which this wave acts as a response to the opening and closing of the eye [1] [2].

The communication channel between the brain and the computer gives the possibility of transmitting information to and from the brain in the form of electrical signals, where the general principle is based on reading electrical activities from the brain using electrodes placed on the surface of the skull (Non-Invasive BCI) or directly on the surface of the brain (Invasive BCI), and this helps in the possibility of obtaining useful information capable of clarifying the nature of the waves, classifying and analyzing them, and then investing them to obtain a control command that moves a robotic arm in order to launch an automated procedure start command or perform missing limbs [3].

Research in this field was launched in the seventies of the last century at the University of California - Los Angeles under a grant from the National Science Foundation, where two researchers (Arnaud Delorme, Scott Makeig, 2004) developed a toolbox and a graphical interface called (EEGLAB) built in the MATLAB environment in order to read and process brain signals coming from the electroencephalographic (EEG) device [4].

The team [Arnaud et al.] In 2011, it developed a set of tools (NFT, SIFT, BCILAB, ERICA). These tools facilitate the collection and processing of eeg signals and are built into the MATLAB environment [5].

A group of researchers [Lavanya et al.] In (2014) studied the possibility of developing a robot capable of helping disabled people perform their daily functions without the help of others, but did not touch on the formation of signal processing algorithms and the construction of a control command [7].

Therefore, this research was carried out based on the reading of brain signals by the Neurosky apparatus, analyzing these signals and studying the possibility of deriving a control command based on the recognition of these signals.

The research was conducted at the Faculty of Technical Engineering - University of Tartus during the period from 10\2\2016 to 10\7\2018.

1-the purpose and importance of the research:

The research aims to study the possibility of converting brain signals into a motor command, depending on the following subgoals:

1-recording the brain signal using one of the computer programs.

2-building a brain signal processing algorithm and collecting data.

3- generate a control command depending on a specific change in the form of a brain signal.

4-sending the control command to an external electronic circuit.

The importance of the research lies in the fact that it opens the door to neurotechnology techniques, recording and analyzing brain signals, which has recently become the focus of most research centers in the world, where it is hoped that the conversion of electrical signals into Kinetics will contribute to finding alternative prostheses that can perform the functions of living limbs themselves in order to compensate the injured for their lost limbs.

2-research materials and methods:

All stages of work for recording brain signals and designing a practical experiment have been characterized, where the stages of practical application consist of four main parts:

1-obtaining data.

2. signal processing.

3-extracting the features and classifying them.

4-controlling the machine

1-obtaining data:

In this research, The Neuro sky device was used to capture brain signals and then send them via Bluetooth to a computer.

The Neuro sky device has the following specifications : [11]

- Improves the correct signals from the human brain, removes the existing noise and converts these signals into digital values.

- Used in gaming, software and research applications.

- Poles: One EEG channel + Reference + Ground

- Advanced filtering to reduce noise.

- Raw EEG sample transmission rate at 512Hz

- The supply voltage is 2.97 to 3.63 volts. The Working current is 15 Ma.

- Frequency range: (3-100) Hz.

- Serial connection: 57600, 9600, 1200 8bits – No parity-baudrate - Weight: 130 mg.

- Dimensions: 0.25*1. 52*2.79 poison.

Figure 1. of the Neuro sky device
Figure 1. of the Neuro sky device

2. signal processing:

The signals generated from the previous stage consist of brain signals as well as interference signals (signals generated from sources other than the brain), and are produced either from vital sources such as eye and muscle movement or from sources outside the human body such as the movement of electrodes.

Interference is determined by filtering electrical signals with a frequency higher or lower than the frequency of normal brain signals, and brain signals are classified depending on the area in which they are active and the frequency range into a group of waves shown in Table (1) :

Table 1. comparison of different brain wave forms[1].
Table 1. comparison of different brain wave forms[1].

Beta Sides of the head 13-30 Hz Conscious perception – mental activity In this research, the Labview program was used to be able to connect directly with the hard hardware of the computer, which is based on the visual programming language.

The signal reading and noise isolation software is built within the LabVIEW environment as shown in Figure (4) :

Tools used in the construction of the program:

1-Read From spreadsheet file IV: this tool was used in order to read a specific number of rows from a digital text file and the readable text was converted into a two-dimensional array of integers and the graphic array can be adjusted depending on the desired target.

2-Index array: this tool was used to convert binary matrix to mono Matrix.

3-Butterworth filter: a filter that has been used to isolate noise signals and determine the frequency domain of each wave.

4-Graph chart: this tool was used to display brainwaves after filtering.

Figure 2. signal reading and noise isolation algorithm
Figure 2. signal reading and noise isolation algorithm
Figure 3. signal reading and noise isolation software
Figure 3. signal reading and noise isolation software

A Bandwidthtype filter was used to separate the brainwaves from each other by determining the frequency domain and the following figure shows the theta wave after using the filter.

Figure 4. theta wave
Figure 4. theta wave

In the second stage, the transition was made to study the signal Online based on the Neuro sky device and connecting it with the Labview program via Bluetooth technology, which requires downloading the Neuro sky library shown in the figure to the Labview program, which contains the following tools:

Figure 5. LabVIEW Neuro sky Driver
Figure 5. LabVIEW Neuro sky Driver

And then build a program for reading brain signals in the LabVIEW environment using Neuro sky tools. The program allows reading the brain signals received from the neuro sky device via Bluetooth technology by specifying the computer port associated with the Neuro sky device, in addition to having a display tool to find out the signal strength and check the quality of communication with the Neuro sky device.as a result, the data can be saved to a specific file, as in Figure (8) and move to the next stage, in which the sample collection time is determined, then the data is filtered and displayed on the Graph chart screen, as shown in Figure (9) .

Figure 6. brain signal reading algorithm
Figure 6. brain signal reading algorithm
Figure 7. brain signal reading software
Figure 7. brain signal reading software
Figure 8. sample identification program and signal display
Figure 8. sample identification program and signal display

4-extracting and classifying features:

In this step, the signals received at a certain time were converted into a certain number of features that are easy to classify by tasks.

Some experiments were conducted and we monitored the brain signal changes over time depending on specific administrative activities and we noticed the change in frequency and demands when winking as shown in Figure (10 ( .

Figure 9. The Shape of the brain signal when the eye is closed.
Figure 9. The Shape of the brain signal when the eye is closed.

To confirm the results, the experiment was repeated ten times on different people and studied the signal change during eye closure according to a specific protocol (5 seconds, then closing the eye – 5 seconds, then closing the eye twice in a row – 5 seconds rest with the eye open).

This was done by authenticating the export of the signal to the Excel file and conducting a statistical study of the signal changes during the wink as shown in Table (2), which represents the change of the wink with time for one of the recorded signals, as the first column represents the time and the second column represents the wink, and the colored lines represent the change of the wink at the moment of closing the eye according to the previously mentioned protocol.

Table 2. signal requirements over time.
Table 2. signal requirements over time.
Figure

The result shows an increase in demands during the wink of the eye, and accordingly, a data collection algorithm was developed where the Tone measurements tool was used to measure the frequency, demands and angle, then compare the demands with the limit values studied earlier and issue a control command to operate the Boolean tool, which represents the wink of the eye, when the demands increase above (81), as shown in Figure(11).

Figure

Form 10: data collection program.

4. machine control:

In this step, a control signal was sent from the computer to the machine to be controlled based on the features classified in the previous step.

The control program has been built and connected with the data acquisition program that was built earlier, and therefore, according to the comparison condition, a case structure type software loop is entered, the purpose of which is to send the character (b) via the computer port paired with the Arduino chip.

Figure 11. Control Program
Figure 11. Control Program

The Arduino chip was used to receive the control command built in the previous stage, and the CHIP program was written to run a relay connected to the controller Man No. 13, depending on the wink of the eye.

5. results and discussion:

It was done in this research:

1-recording brain signals by The Neuro sky device and connecting it with the Labview program

2-building an algorithm for reading the brain signal and collecting data from it

3-conducting experiments on different people in order to observe the change of brain signals depending on the wink of the eye

4. formation of a control command according to a specific change in the frequency and demands of the brain signal

5-Send the control command to the Arduino chip with the aim of running the relay depending on the wink of the eye.

While the studies reviewed did not adopt the same protocol used in reading the brain signal, and the amount of samples the same; but the result was to obtain greater reliability when analyzing statistical data and the formation of the appropriate control command to drive the robotic arm.

6. conclusions and recommendations:

The brain signals were analyzed and differentiated in specific conditions; to convert them into control signals that can be used to automate various actions: as moving a robotic arm, or a prosthesis for a disabled person; the study can be generalized to other activities, studying the response accordingly; thus obtaining a large number of control commands.

We recommend using sophisticated devices that are more accurate in capturing brain signals; for different control commands.

References

  1. HARMONY,T,S.2015,EEG Signal Processing. Malaysia,22.
  2. BAZANOVA,O,M;VERNON,D.2013,Interpreting EEG alpha activity. Holland,12. [3]PFURTSCHELLER,G; NEUPER,C; GUGER,C; HARKAM, W; AMOSER, H;SCHLOG L,A;OBERMAIER,B; PREGENZE,M. 2000, Current Trends in Graz Brain–Computer Interface (BCI) Research. Austria,4. [4]DELORME,A;MAKEIG,S.2004, EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. California San Diego,21.
  3. DELORME, A; MULLEN, T; KOTHE, C; ACAR, A, Z; SHAMLO, N, B; VANKOV,A; and MAKEIG,S.2011, EEGLAB, SIFT, NFT, BCILAB, and ERICA: New Tools for Advanced EEG Processing. California San Diego,12.
  4. KOTHE,A,C;MAKEIG,S.BCILAB: A platform for brain computer interface development. California San Diego,24.
  5. THUNUGUNTLA,L;MOHAN,R,V;MOUNIKA,P.2014,EEG Based Brain Controlled Robot.India,4.
  6. BHYRI,C; KALAPANA, V;HAMDE,S,T; WAGHMARE,L, M. 2009, Estimation of ECG features using Lab View.5.
  7. ONTON,J;DELORME,A; and MAKEIG,S.2005, Frontal midline EEG dynamics during working memory. California San Diego,16.
  8. 23Jun.2018. http://neurosky.com/
  9. 23Jun.2018. http://www.rassoft.net/article217
  10. 23Jun.2018. https://github.com/sccn/BCILAB
  11. 23Jun.2018. https://sccn.ucsd.edu/wiki/BCILAB