Help Tetraplegic People by Means of a Computational Neuronal Control System

—In the present document we present an Interface called Brain M ouse where its main task is to help people with motor disabilities specially tetraplegic or quadriplegic people that they can move the mouse of the computer by means of blinking or any neural response. The Interface uses the data obtained from a neuronal system which is responsible for taking reliable readings of the electrical signals generated in the human brain, through non-intrusive neuronal interfaces. The recorded data is used by the Brain M ouse Interface so that the mouse can perform functions such as an up, down, left lateral, right lateral, left click, right click and double click. Thus, this interface has all the options that a conventional mouse would have.


I. INTRODUCTION
As time goes by, the engineering companies along with medical studies carry out different solutions to help people with disabilities where this has led to the development of different artificial neural interfaces.In the project that was developed, non-intrusive neuronal interfaces were used, where specialized electrodes are required to take reliable readings, followed by a process and decoding of the complex signals derived from the activity of multiple individual neurons.With this base the BrainMouse interface was developed that can help people with motor disabilities to control the mouse of a computer.
To make an effective design of the application, we first identified the users that would use the application, which in this case are quadriplegic people or those with some motor disability.Therefore, to see if this idea was profitable, we investigated how many people in Mexico suffer from a motor disability [1], [2], [3], [4].According to the International Classification of Functioning, Disability and Health, presented in 2001, people with disabilities are those who have one or more physical, mental, intellectual or sensory deficiencies and who interact with different environments in the environment can prevent their full and effective participation on equal terms with others.In the year 2010, people who have some type of disability are 5.7 million people, which represents 5.1% of the total population.Quadriplegia or tetraplegia falls into the category of a motor disability, it is the paralysis of the arms, hands, trunk, legs and pelvic organs.Quadriplegia is caused by damage to your spinal cord.When the spinal cord is damaged, sensation and movement are lost.
Figures 1 and 2 show a general overview on the subject tackled within this paper.

II. RELATED WORK
At present, some projects have been developed that help people with motor disabilities to carry out some activities, which will be mentioned below: • In 2011, at the University of Wisconsin Madison, a system was developed, which has two components: a cap and sensors that connect to the brain.With the cap the data are captured by an electroencephalograph, sent to a computer; where with a software waves are processed, interpreted and a person can write a tweet using his mind.
• The team of José Luis Contreras Vidal, director of the non-invasive brain-machine interface laboratory at the University of Houston, and Marcia O'Malley, director of the Mechatronics and Interfaces Laboratory at Rice University, managed to be the first to imitate, with success, movements such as: walking, and movements with the hands; from brain signals recorded with an electroencephalogram, during the year 2012.While at Rice University they seek to develop an exoskeleton, and thus connect it to the neuronal interface of the University of Houston.
• In 2012, at the University of Minnesota, United States, a research project managed to control by means of the mind, a drone.
• Stanford University investigates that, with brain waves, a control is developed that performs movement in a wheelchair.
• At the University of Keio (Japan), they developed a system capable of interpreting brain waves, which help to quantify the degree of interest, level of concentration, stress or fatigue.
• For the year 2014, an international team of researchers, used electroencephalography (EEG) identifying the words Hello and Good Bye, in the form of brain waves, translating them into binary code.
Some Companies such as MindWave Mobile is a system based on an encephalogram, to be able to read the electrical signals generated in the human brain, then it interpret and send these signals with a bluetooth connection, not only to a computer but also a IoT (Internet of Things) system or Smartphone, in order to control these kind of devices with the mind.Several projects have been developed, among which the following stand out: • Fatigue and sleep detectors, through a car seat with EGG sensors to detect, in the driver, the mental state of drowsiness, symptoms of fatigue.Alerting the driver, suggesting that he rest and avoid an accident.
• Brain Wave TV, is an application developed for smartTVs, allows to change the channel on a smart TV simply through brain activity.
• The BCI (Brain Computer Interface), which uses NeuroSky Brainwave Mobile brain diaphragm encephalography, is upgraded with an Arduino module with Bluetooth BlueSMiRF-Silver, which establishes a wireless connection.With a medium filter the detection of the blinks of a person is made, whether voluntary or involuntary, the involuntary ones are despised, obtaining the blinks that the user made.The detection accuracy is approximately 90%.
Figures 1 and 2 show a general overview on the subject tackled within this paper.

A. Obtaining Data by Brain Signals
In order to understand the functioning of the brain control or how the data are obtained by means of brain signals obtained with non-intrusive technology, different concepts had to be investigated [1], [5], [6].
Thus, a biosignal refers to the measurement of the electrical potential generated by large cell groups, which in turn is used in diagnosis or medical research.The origin of this signal can be caused by different physiological systems of the organism.
It is important to highlight that there are so-called excitable cells, which have the capacity to produce potentials from the electrochemical activity of their membranes.Since each type has a characteristic electrical activity, the measurement of this activity provides information on its operation.Almost all the physiological signals are of bioelectrical type, these have been classified as Electrocardiogram (Cardiac electrical activity), Electroencephalogram (Brain electrical activity), or Electrogastrogram (Gastric electrical activity), for instance.
The neuronal action potential is an electric shock wave that travels along the cell membrane, caused by the biochemical activity of adjacent cells, is generated by an ion exchange through the neuron's membrane.They are used in the body to carry information between tissues, they can be generated by several cells, but the most active are the cells of the nervous system to send messages between nerve cells, or from nerve cells to body tissues, they are the fundamental way of transmission, caused by an exchange of ions through the membrane of the neuron, Figure 3 [7], [8], [2], [9], [10].The conditions for a difference of action potential to occur is the ionic polarization between the internal and external part of the cell.When the cell is intact it is kept in negative values compared to the external environment, and when it is active its values are positive, during this change specific channels of sodium and potassium are opened and closed.These two elements undergo changes during the conduction of the electrical impulse, that is, they are necessary for the existence of the biosignal, Figure 4 [11].
In order to read this information it is necessary an Electroencephalography, which is a technique that records the electrical activity of neurons in a region called the brain, consisting of the brain, cerebellum and brainstem, and the spinal cord, which makes up the central nervous system, Figure 5 [3], [12], [13], [14], [4].
There are 3 types of neural captures: • Deep capture (The most aggressive) • When the electrodes are located on the surface: • Electrocorticogram • Non-invasive (EEG): By nature EEG records show aperiodic signals, so they do not present well-defined patterns in general and consequently, it hinders their mathematical modeling in the space of time.However, its spectrum varies considerably with physical states and behavior, so that the study in the domain of frequency, has been the most used in neurological diagnoses The digitalization of bioelectric signals must be done through several channels, considering the demands of the action potentials to filter noise and interpret the neuronal activity in an appropriate action instruction.
One of the key elements in the interface is the electrode, which is responsible for capturing bioelectric activity or for applying electric currents to living tissues.In these cases only the sensing electrodes are used to measure the neuronal electrical potential.The neuronal interfaces are considered as bidirectional transduction systems, which allow to establish a direct contact between the technical device and the neurolog-ical structure, whose objective is to measure the bioelectrical signals of the body and the artificial excitation of the muscles and nerves.The neural interface comprises the electrodes or sensors, the internal connections (cables), the connections to the external processor, the circuits for the acquisition of the data and the controlling unit of the actuator system.Figure 6 shows an example of the anatomy of a EEG [15], [16], [17], [18].The electrodes are made of metal plates used as a conductor, which is responsible for the transport of electrical current.The electrodes can be classified into the following types, but in the case of biomedical applications there are two main categories : In the market there are different options that allow EEG portable reading and at low cost, compared to other more sophisticated medical options, among which the EEG diadems stand out [19].It is possible to completely characterize the MindWave Mobile headset signals, as developers this information is very useful, and it gives a broad overview of the engineering applications that can be given for different projects, Figure 7 show the basics elements of this device [20], [21].

B. Neuronal Patterns
Measurements were made prior to the development of the application, these measurements allow to characterize in a general way, the neuronal patterns present in a person, under conditions of concentration, meditation and detection of flicker, by means of the MindWave Visualizer software.We use the Volunteer Profile showed in Table I.In this way, after having done the tests with the interactive software, it was obtained that, for high levels of concentration, the frequencies with greater brain activity are of the order of 28-70 Hz, plotting greater brain activity in the frequency bands of the Beta and Gamma regions.From Figure 8, for the state of meditation, the frequencies with greater intensity are of the order of 3-16 Hz, plotting greater brain activity in the frequency bands of the Delta, Theta and Alpha regions.For the samples obtained by performing the action of a simple blink, this produces a disturbance in the graph, where a considerable amplitude is seen in the maximum and a minimum, with amplitude less than 80% of the positive half cycle.The biosensors acquired by the biosensor are represented in RAW (primary) data that take value within the range of: -32768 to 32767.These values are digital representations of the voltage sensed by the real-time frontal electrode.The manufacturer's SDK documentation has a relationship between the potential difference and the two RAW types interpreted by the Neurosky headset.Equation 1shows the RAW-Volts data relation.
Because the sampling frequency defines the speed at which RAW data is generated, this exceeds the attention span of the human eye.

C. Average Estimation of Simple Blinking
To collect RAW data and measure primary data, 100 volunteers were gathered and asked to perform a natural blink with a pause of 5 seconds between each repetition until the 30 readings are taken, averaging arrives at 141 samples to be able to characterize simple blinking or Sb; remembering that the sampling rate is 512Hz and that the period is the inverse of the frequency, the average time of flashing duration can be calculated, multiplying the number of samples needed for the period of the sampling rate.Equation 2 shows the Average duration of simple blinking, Figure 9. Figure 9 show the measurements t in the domain of negative values there is a large and noticeable difference between the data a certain volunteer, so for the purposes of precise control if we analyze the negative half cycle, the recorded data show a tendency to take values from -204 to -79, on the average.

D. Average Estimation of Double Blinking
Then, the same procedure was done, but instead of the user making a simple blink, this time he was asked to do two blinks or double blinking (Db) in a row and pause for 8 seconds between each repetition of the blinks.On this occasion an average of 392 samples were obtained, which represent the characteristic pattern of two contiguous blinks.Equation 3shows the Average duration of double blinking, Figure 10.
The maximum amplitude parameter reached by each individual varies depending on the intensity of the effort and speed applied to the blinking.However, it is possible to characterize an average duration of the disturbance present in the measurement, with this type of analysis.

E. Average Estimation of Natural or Involuntary Blinking
Then a second test was performed on the volunteer under free conditions of external stimuli, and he is made to think that the readings of the protocol have ended, with the diadema still on, a talk is kept outside the current context with the applicator of the tests, of this In this way a distractor was induced and a second applicator discreetly takes note of the number of flashes that the volunteer performed, after 3 minutes the counting and measurement stops.A short disturbance of the average values could be observed in each person, there is a trend between the collated data, which describes a rapid increase of values to be more positive and at a lower speed to be negative, later returning to its mid range, these they are the natural blinking patterns, that is, involuntary, which produce a disturbance with a time of 26 samples on average, Figure 11.

F. Discussion of Blinking Estimation
It was concluded in this activity that the very small number of samples in this type of blink, is attributed to the fact that concentration levels during readings were very low, and meditation predominated.The value in the samples read in the positive domain resembles the case of simple and voluntary blinking values, but because it does not have enough negative samples required, to have a high correlation with the characteristic pattern of a control potential , does not cause interference or the action of a click when it is not desired.Although the previously described ranges are very useful, it was considered to take into account more input variables for the control method, which are necessary for the development of the proposed application, and, therefore, can improve the efficiency of the application.performance, to be able to discriminate the data that represent the action potential for the desired click.It follows that energy levels fall when you have the opportunity to rest, and, therefore, the average levels are kept in a very low biopotential range, and that allows the brain to save energy.The existence of variations in the potential caused by the action of a blink, within the parameters of electrical measurement.
Figure 12 shows two disturbances are observed, which correspond to two simple blinks with an inactivity interval of 4 seconds, it can be verified that the minima in the recovery zone are characteristic, according to the level of blink intensity , being an intense blinking, it would be seen with a more negative recovery potential, Figure 13, there are 4 blinks given in pairs, each time they are made in a short time between each event, its influence makes the second event have a minimum of more positive recovery, and its transition period will be shortened.

IV. BLINKING MODELING
The values reported by the action of a blink interpreted by RAW values, show a considerable variation, this makes necessary a better individualization by individual, for which the characterization was proposed by means of the use of eSense readings for its detection, Figure 14.This detection mode normalizes the RAW values in a range of 0 to 255, which represent the degree of effort applied when performing a blink.The sampling space considered for the analysis is 200 samples per person.And this gave the following result: Each type of blink is executed separately, a break of 2 to 3 seconds is taken in simple occurrences, and a rest of 3 to 5 seconds in double occurrences.For double occurrences, it is necessary that they be carried out in less than a second time.
• Simple Blinking: It could be seen through the readings that the average intensities are: 83.9, 63.From the statistical point of view, the calculation is made considering as a minimum criterion the 80% probability for the event, the results show that characteristic ranges of each group can be defined, based on the normal distribution, Figure 15.There are some special cases.Then, the control with the headband could not be adequately done, a special case was included to characterize the special blinks.In particular, five cases of people with some type of sleep disorder were detected, or they presented drowsiness indices.These conditions affect the detection of blinking, since sometimes no reading was obtained, and of which the few that were detected were of a low intensity, Figure 18.
So in these cases it was concluded that this caused the involuntary closing of the eyelids and their subsequent abrupt opening, and this caused that the levels of concentration were null and marginally low meditation, so it was very unlikely that it could be characterized the application with this type of features described above.

V. BrainMouse INTERFACE
The application that was made is called BrainMouse and it depends on the NeuroSky EEG diadem model MindWave Mobile for an interaction between the computer and the user, where the Microsoft Windows operating system is supported.Figure 19 shows the UML diagram of the software and see more clearly the interaction between the user and the team where the software is running.
In order to have a better management of the program, www.ijacsa.thesai.orgseveral classes were used, the important ones being: • The Resources class was used for the subprocesses that were required for the management of hardware resources.
• The Position class was planned with the mouse control methods.
• The NumBlink class represents process-oriented auxiliary methods and variables for the detection and calculation of the value of the blink intensity.
• The NeuroSky class includes methods of connection and manipulation of primary data, belonging to the manufacturer's libraries.
The next step was to integrate the libraries provided by the SDK of the manufacturer of the headset, it was also necessary to include in the project directory, the following folders and files: 1) libs/: • ThinkGear.dll(library) 2) TG-HelloEEG.exe(a compilation reference of the project shows) 3) HelloEEG Sample Project (source code) After having integrated the libraries and project directories, a project was created in the Visual Studio Suite.
1) After creating a project in Visual Studio, a base code is created.2) Once the import is done, the event handlers are initialized and the object that will help in the connection that was made with a method called ConnectScan, this allows us to validate and assign an available COM port for the connection.
3) The operating system then assigns two ports exclusively for communication, to send and receive information during communication.4) When blink detection is required, it must be activated manually.5) Through the bluetooth module, the program looks for the NeuroSky EEG headband.6) When the program detects a device, the function is called, to establish the temporary connection and start the data reading.7) When the connection fails, it displays a message to the user.8) If everything is executed without error, the information is received and stored in a data vector, then an object is created that will allow access to the raw information and time variables, as well as the data sent by the eSense detection modes, meditation and concentration.9) The connection quality between the EEG device and the computer, are monitored every second by the PoorSignal data, where a value of zero represents the maximum quality of stability of the link, and the value of 200 is reported when the connection has been lost.

A. Mouse Control by Means of Blink Discrimination
Based on the previous studies, we have a reference of intensity ranges by blinking, which plays an important role in making the difference between a voluntary or involuntary blink.
1) Voluntary flashes are discriminated by a threshold, in the scale of intensities, well, simple blinks have a direct relationship with low intensity indices.2) A blink with greater force and speed produces a greater intensity than in the previous case, however, in some cases it was identified that, given the characteristic group, not all of them rose in the same proportion of intensity over average.Because of that, the mental state of concentration was combined with the intensity of blinking, to result in a much higher elevation of blinking intensity and easier to discriminate.
3) The double and consecutive flashes, by means of their detection form the base to effect the action of double left click.
Since double blinks also cover the same range of low intensities as in the first case, the consideration of a second variable to differentiate them becomes evident.This is where the time variable comes into play, as is shown in Figure 20, a pair of consecutive flashes in a time interval relative to one second, produce a disturbance of combined intensity greater than the average, therefore, with the criterion of number of blinks equal to two, within a range of less than one second and of the intensity range between the average and the high threshold, the click count can be performed to make a reliable discrimination of the type of blinking, and its corresponding control action.Although the ranges that can be used in the differentiation between blinks are varied, they can be limited with the use of arithmetic and statistical tools.The use of the arithmetic mean of all the data obtained in the measurements to volunteers was carried out, including the extension of data capture to extra volunteers, to obtain the normal non-cumulated distribution of ranges of intensities present in the measurements.Equation 4shows the Definition of the arithmetic average.
As a first criterion of limitation, it was established, as a minimum, to take into account only the recorded intensities that exceed the 80% probability of repetition, of event of the detected samples.Establishing two borders, which later were the reference to take into account, in establishing the lower and upper limits of the detection range.
Obtaining the average, we reached the general range of 50-106 in the intensity scale, but this range does not adapt to the three characteristic groups found, so it was necessary to make an arbitrary classification of the readings to be averaged, and separate them with the data that were similar, after repeating the calculations, 3 new ranges were obtained, after the new calculation with two adjustments of 15% and 40% extra in the lower and upper limits, to extend the detection probability index, according Table II.Subsequently, the extension of the upper limits with a second threshold, to complement and better limit the intensities.Resulting in the depicted in Table III.These ranges are required in the discrimination detected by blink intensity, assigning the lower range for each group to the actions of left click and double left click, there is no conflict between them, despite being within the same range, since it is used of reference the time of a second, as a limit to make a difference between the simple and double events.The upper ranges are designed for the detection of intense blinking, in conjunction with the reference variable of marginally high concentration, a minimum criterion of 60% is established by the mental state of concentration, which must be present at the time of detection , when these conditions are fulfilled, the action of the right click is carried out.With those ranges and taking into account the 3 characteristic groups, the calculation of an initial average was carried out, so that the application fits the normal flicker ranges of each person, that is the reason why the flow diagram incorporates the calculation is called adaptive.This process must be the first to run in the application, before allowing the control of the cursor, thereby ensuring that the user has a range more consistent with their profile of average blinking intensity.

B. BrainMouse Methodology
Then, the blink adaptive flow diagram is shown where the EEG variable refers to the intensity and as a final result of the process the thresholds that delimit the valid detection ranges are adjusted.And along with this is the control of blinking clicks that depend on the adaptive control, and allows to calibrate the thresholds characteristic of the user at the time of use.
In order to describe the methodology of BrainMouse Interface in three subprocess: The double-click control action is achieved in the same range as the simple events, although it seems that it is not contemplated in the flow diagram, it is not necessary to create a routine or conditional case, since the action time in simple detection it is immediate, which allows the conditions so that the clock of the machine and the operating system itself, are in charge of recognizing based on the proximity time.In the diagram only two possible cases are contemplated, depending on the intensity of blink, which is within thresholds one and two, if it exceeds the first threshold the simple click events are generated as a result.On the other hand, if the threshold 2 is exceeded, it is determined that the control click corresponds to the right click event, and when the threshold 3 is exceeded the activation by commands of the movement mode will be obtained as a result.It is necessary that the person performs a simple and very intense flicker, which must exceed the border value calibrated in threshold 3 (U3), when exceeding the range the blinking activates the movement mode of the cursor, allowing the blinks of intensity with value between the calibrated thresholds one and two, perform the count of simple blinks.The proposed control method of movement by blinking, follows a trend very similar to the control of the click, in order to achieve an effective and general, the control of the movement by cursor on the screen, rules of action were established.The rules were proposed and analyzed during the design process, but their implementation was formalized, shortly after having achieved control by means of single and double blinks.Although the proposed and adapted thresholds are involved in the detection by intensity of the event, they were the basis of the control over the click, these ranges were also used when defining rules, which allow the control of movement in the mouse.The rules contemplated with cursor movement are:

VI. EXPERIMENTAL RESULTS AND EVALUATION
The system will support a large number of users types, not only quadriplegics, but also users without any motor disability permanent or temporary.The system is able to respond with a 97.5% degree of reliability in the desired control of the cursor, once the user calibrates his profile and adapts with less difficulty to the flicker sensitivity scale.
The system will support a large number of users, not only quadriplegics, but also users without any motor disability.We can consider a lightweight interface since user only needs to have 20 MB of free disk space and 32 MB of free RAM.Since this application lacks graphical interface, it does not include package diagram or analysis of effectiveness in menu or window navigation.The application runs as a sub-process in the operating system, and does not prevent 100% display of the rest of the applications and windows displayed on the desktop.Likewise with these results, it can be concluded that the rules of both flicker for the control of click and movement, work correctly.We use a HP Pavillion 23, Figure 21.The tests were developed within the parameters considered normal: free of distractors, conditions of extreme fatigue, intense drowsiness or external physical stimuli that could alter the volunteer, during the execution of the tests.The usability test was carried out on 100 people who were considered common users for this proposal, we contact them in October 1st Hospital of the Mexican Health System, which was their first time interacting with the application in several different stages with different purposes such as office programs like Libre Office Writer or Impress or Web Browsers such as Opera, Chrome or Mozilla Firefox.So we collect approximately 475 opinion scores.So, these users describe our interface as friendly, which refers to the ease of interaction of the application with the user, without having to consult a manual or online help.Figure 22 shows that 95.08% of users who evaluated how easy to interact for mouse control were reported.4.92% considered a moderate learning difficulty, to understand the operation of the application.

VII. CONCLUSIONS
In the present document we presented an Interface called BrainMouse, which helped a 100 peoples motor disabilities specially tetraplegic or quadriplegic people that they can move the mouse of the computer by means of blinking or any neural response.We got the 95.08% of acceptance and the Interface uses the data obtained from a neuronal system using MindWave Mobile which is responsible for taking reliable readings of the electrical signals generated in the human brain, through non-intrusive neuronal interfaces.The recorded data were used by the BrainMouse Interface so that the mouse performed functions such as an up, down, left lateral, right lateral, left click, right click and double click.Thus, this interface has all the options that a conventional mouse would have, we obtained 97.5% degree of reliability in the desired control of the cursor.As future work will be extended features that control your wheelchair as well as other common functions on a desktop computer, such as turn on, turn off, print, or open any kind of program.

Fig. 9 .
Fig. 9. Scatter plot of the values acquired from a simple blink.

Fig. 11 .
Fig. 11.Scatter plot with RAW data of natural or involuntary blinks.

Fig. 13 .
Fig. 13.Difference of potential of a double blink.

Fig. 14 .
Fig. 14.Simple Blinking samples and their different intensities that were obtained.

Fig. 15 .
Fig. 15.Normal distribution in the case of a simple blink. .

Fig. 20 .
Fig. 20.Clock time of the proposed System.

• 2 : 6 if click=false then 7 if counter< 5 then 8 if 9 counter = counter + 1 10Algorithm 3 :
Blink Strenght: Start or stop motion control • One Blink: Move to the right • Two Blinks: Movement to the left • Three Blinks: Upward movement • Four Blinks: Moving down Complementing the description of the operation of the application, the description of action by movement includes the Algorithm 1. Finally, the operation of BrainMouse can be summarized Algorithm Mouse movement diagram.Input: EEG 1 X=Contains the position of the abscissa 2 Y=Contains the position of the ordinates 3 pix=Contains the values of X and Y 4 γ=Distance in pixels that the pointer moves 5 if C> 10 then EEG > U 1yEEG < U 2 then the flow diagram, with Algorithm 3. Diagram BrainMouse. 1 ϑ=Port value assigned for communication 2 if MindWave Mobile not paired then 3 Verify the port assignment COM (ϑ) y COM (ϑ + 1) 4 Assign ports COM (ϑ) y COM (ϑ + 1)

Fig. 22 .
Fig. 22. Evaluation of friendly aspect for the user.

ACKNOWLEDGMENT
This article is supported by National Polytechnic Institute (Instituto Poliécnico Nacional) of Mexico by means of Project No. 20190046 granted by Secretariat of Graduate and Research, National Council of Science and Technology of Mexico (CONACyT).The research described in this work was carried out at the Superior School of Mechanical and Electrical Engeniering (Escuela Superior de Ingeniería Mecánica y Eléctrica), Campus Zacatenco.It should be noted that the results of this work were carried out by Bachelor Degree students Dario Rodríguez Hernández, Isabel Meraz Galeazzi and Alexis Armando Rivera García.Also, M.en C. Roberto Galicia Galicia is thanked for the support and logical and methodological support.

TABLE II .
PRELIMINARY THRESHOLDS

TABLE III .
FINAL THRESHOLDS