[go: up one dir, main page]

CN1331080C - Virtual keyboard and robot control system by brain electric signal - Google Patents

Virtual keyboard and robot control system by brain electric signal Download PDF

Info

Publication number
CN1331080C
CN1331080C CNB2003101048758A CN200310104875A CN1331080C CN 1331080 C CN1331080 C CN 1331080C CN B2003101048758 A CNB2003101048758 A CN B2003101048758A CN 200310104875 A CN200310104875 A CN 200310104875A CN 1331080 C CN1331080 C CN 1331080C
Authority
CN
China
Prior art keywords
eeg
robot
control
signal
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2003101048758A
Other languages
Chinese (zh)
Other versions
CN1538340A (en
Inventor
王宏
王志宇
庞小飞
叶柠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CNB2003101048758A priority Critical patent/CN1331080C/en
Publication of CN1538340A publication Critical patent/CN1538340A/en
Application granted granted Critical
Publication of CN1331080C publication Critical patent/CN1331080C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrically Operated Instructional Devices (AREA)

Abstract

本装置涉及一种生物医学工程领域的虚拟键盘和机器人控制系统,其结构由特制的硬件平台及控制程序组成,硬件平台由一台PC机、脑-计算机接口控制器、机器人、周围电器组成,计算机通过串口与脑-计算机接口控制器联接,脑电信号通过计算机中央处理器实现对虚拟键盘和机器人的控制,其控制方式是通过计算机程序实现的,优点是:控制硬件系统性能稳定,适合于残疾人;软件系统识别率高,可实现虚拟键盘的功能,使不同的脑电信号可用文字表达出来,并在虚拟键盘输出文字时采用主动的方式,受试者的视觉系统不会受任何外界的刺激,使受试者更加自如,虚拟键盘不仅可输出英文、也可输出中文,该系统可以实现脑电信号对机器人的控制,根据发出的思维脑电信号使机器人为人们提供服务。

Figure 200310104875

This device relates to a virtual keyboard and robot control system in the field of biomedical engineering. Its structure is composed of a special hardware platform and a control program. The hardware platform is composed of a PC, a brain-computer interface controller, a robot, and peripheral electrical appliances. The computer is connected with the brain-computer interface controller through the serial port, and the EEG signal realizes the control of the virtual keyboard and the robot through the central processing unit of the computer. People with disabilities; the software system has a high recognition rate and can realize the function of a virtual keyboard, so that different EEG signals can be expressed in words, and an active way is adopted when the virtual keyboard outputs text, so that the visual system of the subject will not be affected by any external The stimulation makes the subjects more comfortable. The virtual keyboard can output not only English, but also Chinese. The system can realize the control of the robot by EEG signals, and make the robot provide services for people according to the EEG signals of thinking.

Figure 200310104875

Description

基于脑电信号的虚拟键盘机器人控制系统及方法EEG signal-based virtual keyboard robot control system and method

所属技术领域Technical field

本发明属于生物医学工程技术领域,涉及一种虚拟键盘和机器人控制系统,在全系统中将生物神经系统的电生理(脑电信号)与计算机和机器人相结合,具体涉及了脑电生理、数据库、机器人、数字信号分析和处理和控制方法等技术领域。The invention belongs to the technical field of biomedical engineering, and relates to a virtual keyboard and a robot control system, which combines the electrophysiology (electroencephalogram signal) of the biological nervous system with a computer and a robot in the whole system, and specifically relates to the electrophysiology of the brain, database , robotics, digital signal analysis and processing and control methods and other technical fields.

背景技术Background technique

目前国外一些学者在实验室内研究基于脑电的脑一计算机接口(Brain-ComputerInterface)技术,主要的目的是作为残疾人的障碍补助方式,其系统主要有利用慢波脑电位(Cz电位参考文献有IEEE Trans Rehab Eng 2000;8:190-192)、P300脑电位(参考文献有IEEETrans Rehab Eng 2000;8:174-179)、mu或beta波脑电位(参考文献有Trans Rehab Eng 2000;8:203-204)来控制计算机和周围的电子仪器;所采用的虚拟键盘输出文字的功能也是使用被动的方式,即必须有特定的光刺激受试者的视觉系统,并且只能输出英文。At present, some foreign scholars are researching the brain-computer interface (Brain-Computer Interface) technology based on EEG in the laboratory. The main purpose is to serve as a barrier subsidy for the disabled. There are IEEE Trans Rehab Eng 2000; 8:190-192), P300 brain potential (references are IEEE Trans Rehab Eng 2000; 8:174-179), mu or beta wave brain potentials (references are Trans Rehab Eng 2000; 8: 203-204) to control the computer and surrounding electronic equipment; the function of the virtual keyboard output text is also used in a passive way, that is, there must be specific light to stimulate the visual system of the subject, and only English can be output.

发明内容Contents of the invention

为了解决目前脑-计算机接口技术功能之不足,本发明的目的是提供一种基于脑电信号的虚拟键盘机器人控制系统及方法,建立了一套独特的系统,即是用大脑运动区的C3和C4处的诱发电位来实现对虚拟键盘和机器人进行控制,并且在虚拟键盘输出文字时采用的是主动的方式,它使受试者的视觉系统不需要受任何外界的刺激,这样使受试者更加自如,本发明可以实现下述目的:In order to solve the insufficiency of the current brain-computer interface technology, the purpose of the present invention is to provide a virtual keyboard robot control system and method based on EEG signals. A set of unique systems is established, which uses the C3 and the evoked potential at C4 to realize the control of the virtual keyboard and the robot, and when the virtual keyboard outputs text, it adopts an active method, which makes the visual system of the subject do not need to be stimulated by any external, so that the subject The tester is more freely, and the present invention can realize following purpose:

不仅可以用虚拟键盘输出英文,还可以输出中文;Not only can use the virtual keyboard to output English, but also can output Chinese;

用特定思维诱发的脑电信号实现对开关电路的控制,对屏幕上光标的控制,对语音系统的控制,使不能说话的残疾人能够将内心世界通过语言表达出来;Use the EEG signal induced by specific thinking to realize the control of the switching circuit, the control of the cursor on the screen, and the control of the voice system, so that the disabled who cannot speak can express their inner world through language;

用特定思维诱发的脑电信号实现对机器人行为的控制(让机器人定向移动,让机器人唱歌等);Use the EEG signal induced by specific thinking to control the behavior of the robot (make the robot move in a certain direction, let the robot sing, etc.);

利用特定思维诱发的脑电信号实现在计算机的显示器上输出中文文字和英文文字(虚拟键盘打字);Use the EEG signal induced by specific thinking to output Chinese text and English text on the computer display (virtual keyboard typing);

利用特定思维诱发的脑电信号实现对计算机显示器上的图像进行放大和缩小。The image on the computer monitor is enlarged and reduced by using the EEG signal induced by specific thinking.

总之,基于脑电信号的虚拟键盘和机器人控制系统是一种供残疾人(特别是瘫痪病人)使用的电子机械装置,即它可供思维正常但有运动功能障碍的人对外界表达内心世界,对外界环境进行交流和控制,如向外界表达想要吃饭、进行户外活动或听音乐等的想法,以及控制收音机和电扇等外界环境,实现一定程度上的生活自理。In short, the virtual keyboard and robot control system based on EEG signals is an electromechanical device for disabled people (especially paralyzed patients), that is, it can be used by people with normal thinking but motor dysfunction to express their inner world to the outside world. Communicate and control the external environment, such as expressing to the outside world the idea of eating, outdoor activities or listening to music, and controlling the external environment such as radios and electric fans, so as to achieve a certain degree of self-care in life.

它还可为健康的人们提供在特殊环境下控制外界的环境,如帮助人们在高辐射区外对该区内部设备的控制等,也可为人们提供一种新的服务方式,如通过脑电信号指挥机器人来帮助人们做事情等。It can also provide healthy people with an environment to control the outside world in a special environment, such as helping people to control the internal equipment in the area outside the high-radiation area, and it can also provide people with a new service method, such as through EEG. Signals command robots to help people do things, etc.

本发明的技术方案是这样实现的:Technical scheme of the present invention is realized like this:

它是一种基于特定思维诱发的脑电信号来表达内心世界和控制周围环境的装置,该装置通过特制的硬件平台和控制方法组成,硬件平台由一台PC机、脑-计算机接口控制器、机器人、电灯等周围电器四部分组成,其联接是PC机通过串行接口分别与机器人和脑-计算机接口控制器联接,此控制器输入端与脑传导电极联接,同时PC机与外部设备显示器联接,脑-计算机接口控制器与电灯及其它电器联接,脑传导电极与受试者联接(如图1所示)。It is a device that expresses the inner world and controls the surrounding environment based on the EEG signals induced by specific thinking. The device is composed of a special hardware platform and control method. The hardware platform consists of a PC, a brain-computer interface controller, Robots, electric lights and other peripheral electrical appliances are composed of four parts. The connection is that the PC is respectively connected with the robot and the brain-computer interface controller through the serial interface. The input end of the controller is connected with the brain conduction electrode, and the PC is connected with the external device display , the brain-computer interface controller is connected with lamps and other electrical appliances, and the brain conduction electrodes are connected with the subject (as shown in Figure 1).

脑电信号通过电极采集送入脑-计算机接口控制器,脑-计算机接口控制器对脑电信号进行滤波、放大等预处理,处理后的脑电数据,通过串行口实时传送到计算机当中,计算机接收到预处理的脑电数据后,实时对接收到的脑电数据进行分析,从中提取特征信号,用来判断大脑的思维活动,实现相应的控制动作,即通过显示器显示虚拟键盘输出的结果;可以通过声卡进行语音表达;还可以通过计算机的串行口发出控制指令,传送给机器人,使机器人按照指定的控制方法实现预定的一些动作和唱歌;还可以将指令传回给接口控制器,控制外围的电灯及周围电器等。The EEG signal is collected by the electrodes and sent to the brain-computer interface controller. The brain-computer interface controller performs preprocessing such as filtering and amplification on the EEG signal, and the processed EEG data is transmitted to the computer in real time through the serial port. After the computer receives the preprocessed EEG data, it analyzes the received EEG data in real time, extracts characteristic signals from it, and uses it to judge the thinking activities of the brain and realize corresponding control actions, that is, to display the output results of the virtual keyboard through the display ; Voice expression can be performed through the sound card; control instructions can also be sent to the robot through the serial port of the computer, so that the robot can realize some predetermined actions and singing according to the specified control method; the instructions can also be sent back to the interface controller, Control peripheral lights and surrounding electrical appliances, etc.

本系统硬件脑一计算机接口控制器:主要由五部分组成,分别为:输入保护部分,前级放大部分,信号隔离部分,后级信号放大滤波部分,以及微计算机Inter 80C196KC采集控制部分(如图2所示),各部分的结构与工作原理如下:The system hardware brain-computer interface controller: mainly consists of five parts, namely: input protection part, pre-amplification part, signal isolation part, post-stage signal amplification and filtering part, and microcomputer Inter 80C196KC acquisition control part (as shown in the figure) 2), the structure and working principle of each part are as follows:

输入保护部分:本部分主要由稳压二极管和输入保护电阻组成,另外在输入前置放大器INA128的输入端也有一定的保护作用;Input protection part: This part is mainly composed of a Zener diode and an input protection resistor, and also has a certain protection function at the input end of the input preamplifier INA128;

前级放大部分:本部分有两种功能模块,共三个部分,分别由INA128和LM324构成,前半部分的放大采用差动放大方法,以提高输入信号的共模抑制比,后半部放大使用的负反馈放大电路,为了有效的抑制工频干扰,在两极放大器中间,设有一个双T网络滤波器,以避免工频信号在放大过程中使信号溢出,其增益在80dB附近可调;Pre-amplification part: This part has two functional modules, a total of three parts, which are composed of INA128 and LM324 respectively. The amplification of the first half adopts the differential amplification method to improve the common mode rejection ratio of the input signal, and the second half is used for amplification. The negative feedback amplifier circuit, in order to effectively suppress the power frequency interference, is equipped with a double T network filter in the middle of the two-pole amplifier to avoid the signal overflow of the power frequency signal during the amplification process, and its gain is adjustable around 80dB;

信号隔离部分;隔离级由TLP521-2构成,通过设置其输入电流大小,实现信号1:1放大的隔离,由于隔离级的加入,使得前端的信号测量在电气上与后端完全隔离,来提高系统的安全性,同时也提高了信号的抗干扰性能;Signal isolation part; the isolation stage is composed of TLP521-2. By setting its input current size, the isolation of the signal 1:1 amplification is realized. Due to the addition of the isolation stage, the front-end signal measurement is electrically isolated from the back-end to improve System security, but also improve the anti-interference performance of the signal;

信号放大滤波部分:放大器采用了LM324和OP07,前部是一个四阶的低通滤波器,由LM324构成。后部接一个负反馈放大电路,最后是一个电平调整电路,其增益在20dB附近可调。Signal amplification and filtering part: the amplifier uses LM324 and OP07, and the front part is a fourth-order low-pass filter, which is composed of LM324. The rear is connected to a negative feedback amplifier circuit, and finally a level adjustment circuit, whose gain is adjustable around 20dB.

本系统(如图3所示)通过串口,将外部计算机提取过的脑电特征信号,送入中央处理器,中央处理器对输入的脑电特征信号,为想象眼球向上或向下运动诱发的脑电信号,进行判断,并负责控制方法的执行,实现对电机和喇叭的控制,电机驱动用来驱动直流电机,带动轮子,实现机器人的行走;音频放大器用来放大音频信号,提供给喇叭,实现机器人的发声,主程序及子程序都保留在外部存储器中。This system (as shown in Figure 3) sends the EEG characteristic signal extracted by the external computer to the central processing unit through the serial port, and the central processing unit uses the input EEG characteristic signal as an image induced by the upward or downward movement of the eyeball. The EEG signal is used to judge, and is responsible for the execution of the control method, to realize the control of the motor and the speaker. The motor drive is used to drive the DC motor, drive the wheels, and realize the walking of the robot; the audio amplifier is used to amplify the audio signal and provide it to the speaker. Realize the voice of the robot, the main program and subroutines are kept in the external memory.

脑电信号对机器人控制的方法是通过计算机控制方法来实现的:The method of EEG signal to robot control is realized by computer control method:

脑电信号对机器人控制的计算机控制方法包括以下步骤(控制方法流程图如图4所示):The computer control method of electroencephalogram signal to robot control comprises the following steps (control method flowchart as shown in Figure 4):

控制系统启动后,先检查单片机内部的串行通讯控制寄存器1(SCCR1)、串行通讯控制寄存器2(SCCR2)、波特率寄存器(BAUD)相应位的设置,并将其设置到控制系统需要的状态,实现单片机的初始化(4010);After the control system is started, first check the settings of the corresponding bits of the serial communication control register 1 (SCCR1), serial communication control register 2 (SCCR2), and baud rate register (BAUD) inside the microcontroller, and set them to the values required by the control system. state, realize the initialization of the single-chip microcomputer (4010);

接着检查串行通讯状态寄存器(SCSR)的状态,判断是否接收到特征脑电数据,如果收到数据(4020),将结果保存到Cmd变量中(4030),用于后面的判断,如果此时已有进程启动(4040),就先将原来的进程关掉(4050),然后判断Cdm变量的内容;Then check the state of the serial communication status register (SCSR) to judge whether the characteristic EEG data is received, if the data is received (4020), the result is saved in the Cmd variable (4030), for later judgment, if at this time Existing process start (4040), just earlier the original process is shut down (4050), then judge the content of Cdm variable;

对应不同的命令,启动不同的进程(4070,4090,4110),执行唱歌、转身和前进的动作,控制步骤循环返回,重新等待串口的输入。Corresponding to different commands, different processes (4070, 4090, 4110) are started, and the actions of singing, turning around and moving forward are performed, and the control steps are looped back to wait for the input of the serial port again.

对脑电信号进行识别的计算机控制方法由总体控制流程图构成,该控制方法包括以下几个部分(如图5所示):The computer control method for identifying EEG signals is composed of an overall control flow chart, and the control method includes the following parts (as shown in Figure 5):

该控制方法包括有:用户界面的设计装置、数据的输入装置、数据的存储装置、脑电数据的处理与显示、打印装置、英文和中文的显示装置、图像大小的控制和屏幕上小球移动的控制装置。The control method includes: user interface design device, data input device, data storage device, EEG data processing and display, printing device, English and Chinese display device, image size control and small ball movement on the screen control device.

控制方法包括以下步骤:The control method includes the following steps:

系统开始运行时,首先判断是在线分析还是离线分析(5020,5040),如果是在线分析,先初始化串口,然后接收数据,再对接受到的数据进行相应的处理,以得到相应的脑电数据(5030);When the system starts to run, it first judges whether it is online analysis or offline analysis (5020, 5040). If it is online analysis, first initialize the serial port, then receive data, and then process the received data accordingly to obtain corresponding EEG data ( 5030);

如果是离线分析,则先打开相应的数据文件,然后读取数据,再对得到的数据进行相应的处理,最后得到相应的脑电数据(5050);If it is an offline analysis, first open the corresponding data file, then read the data, then perform corresponding processing on the obtained data, and finally obtain the corresponding EEG data (5050);

接着对获得的脑电数据进行平滑化处理(5060),以除去脑电波形中的毛刺;再后对脑电数据进行滤波处理(5070),除去脑电信号中的高频干扰,以便下一步进行判断(5090);Then the obtained EEG data is smoothed (5060) to remove the burrs in the EEG waveform; then the EEG data is filtered (5070) to remove the high-frequency interference in the EEG signal for the next step Make a judgment (5090);

接着进行特征波形的采样(5080),此步骤可以进行多次,以得到最佳的判断结果(5090);Then carry out the sampling of the characteristic waveform (5080), this step can be carried out many times, to obtain the best judgment result (5090);

在采样完成后,根据采样得到的特征,进行相应判断(5090),接着对做出的判断进行校正(5100),对伪判断进行更正;After the sampling is completed, according to the characteristics obtained by sampling, make a corresponding judgment (5090), and then correct the judgment made (5100), and correct the false judgment;

以上步骤可以实现如下功能;The above steps can achieve the following functions;

1)对屏幕上小球的运动进行控制,可以使其向上或向下运动,并有相应的声音提示(5110);1) Control the movement of the ball on the screen to make it move up or down, and there will be a corresponding sound prompt (5110);

2)对屏幕上图像的大小进行控制,可以使其放大或缩小,并有相应的声音提示(5130)2) Control the size of the image on the screen, which can be enlarged or reduced, and there will be a corresponding sound prompt (5130)

3)对判断进行编码,当编码到达规定长度时,对编码进行检索,然后显示编码对应的英文或中文文字(5150,5160);3) Coding the judgment, when the code reaches the specified length, the code is retrieved, and then the English or Chinese characters corresponding to the code are displayed (5150, 5160);

4)对机器人的行为进行控制(5120);4) Controlling the behavior of the robot (5120);

5)对周围电器的开关进行控制(5140)。5) Control the switches of the surrounding electric appliances (5140).

在本控制方法中,对脑电信号的识别算法是这个系统的核心部分,在这部分中需要经过标准特征采样后根据得到的特征来判断两种特征波形,对误判进行校正,数据处理完输出。In this control method, the recognition algorithm for the EEG signal is the core part of the system. In this part, it is necessary to judge the two characteristic waveforms according to the obtained characteristics after standard characteristic sampling, correct the misjudgment, and complete the data processing. output.

脑电信号的识别算法控制方法包括以下步骤(控制方法流程如图6所示)。The recognition algorithm control method of the EEG signal includes the following steps (the flow chart of the control method is shown in FIG. 6 ).

首先进行标准特征波形的采样(6010),如果采样效果不佳,还可以进行重新采样(6020),使判断的效果达到最佳;First carry out sampling of the standard characteristic waveform (6010), if the sampling effect is not good, re-sampling (6020) can also be carried out, so that the effect of judgment can reach the best;

接着对进入判断区的脑电数据进行特征提取(6040),根据已得到的标准特征波形进行特征1和特征2的判断(6050,6080),接着对判断进行校正(6110),除去其中的误判和对正确的判断进行细微的调整;Then perform feature extraction (6040) on the EEG data entering the judgment area, and perform judgments on feature 1 and feature 2 according to the obtained standard characteristic waveforms (6050, 6080), and then correct the judgment (6110) to remove errors. judgments and minor adjustments to correct judgments;

如果数据处理结束(6120),可以退出核心判断,如果没有,控制步骤返回,重新采样(6020)。If the data processing ends (6120), the core judgment can be exited, if not, the control step returns and re-samples (6020).

脑电信号控制虚拟键盘中文汉字输出的控制方法是:The control method of the EEG signal controlling the output of Chinese characters on the virtual keyboard is:

首先选择数据库:建立名字为bciword.mdb的数据库,并在其中建立名字为bciword的表,表中建立bci字段,类型为text,建立word字段,类型为text。然后将中文文字输入word字段中,利用中文输入法,将对应的代码输入到bci字段中,此时要注意bci字段中的内容应该是唯一的,作为查询的标准,这样,就建立了一个特殊输入法的汉字库。First select the database: create a database named bciword.mdb, and create a table named bciword in it. In the table, create a bci field with a type of text, and a word field with a type of text. Then input the Chinese characters into the word field, and use the Chinese input method to input the corresponding code into the bci field. At this time, it should be noted that the content in the bci field should be unique, as the query standard, so that a special The Chinese character library of the input method.

其次组成数字代码:在系统中,对26个英文字母进行了二进制的编码,每个字母占五位,00001代表a,00010代表b等,此外,我们用00000代表R,表示开始执行查询,用11110代表B,表示删除一个中文文字。Secondly, the digital code is formed: In the system, 26 English letters are encoded in binary, and each letter occupies five digits. 00001 represents a, 00010 represents b, etc. In addition, we use 00000 to represent R to indicate the start of query execution. 11110 represents B, which means to delete a Chinese character.

本控制方法包括以下步骤(控制方法流程图如图7所示):This control method comprises the following steps (control method flowchart as shown in Figure 7):

在控制方法运行开始时,首先连接ODBC数据源,这里我们调用自定义的ConfigAccess()函数来自动连接,接下来就根据脑电信号来判断将要输出的汉字了。当脑电信号输入时(7010),首先判断这个信号是1还是0(7020),判断后把信号值添加在m_charindexstring变量尾部(7030或7040),当有连续5个信号输入就可以用自定义的GetStrFromIndex()函数查出其对应的值(7050,7060)。如果对应的值为小写字母则把值加到m_strchoose变量尾部(7080),当得到的值为“R”(7090),即连续输入的脑电信号为00000,则根据m_strchoose在数据库中查出对应的汉字(7120),并显示出来;当得到的值为“B”,即连续输入的脑电信号为11110,则删除上一个汉字;当得到的值为“D”,即连续输入的脑电信号为11011,则删除上一个小写字母,打出一个汉字或一个小写字母后,相应的变量初始化(7140),以便下一次查询。When the control method starts to run, first connect to the ODBC data source, here we call the custom ConfigAccess() function to automatically connect, and then judge the Chinese characters to be output according to the EEG signal. When the EEG signal is input (7010), first judge whether the signal is 1 or 0 (7020), and then add the signal value to the end of the m_charindexstring variable (7030 or 7040). When there are 5 consecutive signal inputs, you can use the custom The GetStrFromIndex() function finds out its corresponding value (7050, 7060). If the corresponding value is a lowercase letter, add the value to the end of the m_strchoose variable (7080). When the obtained value is "R" (7090), that is, the continuously input EEG signal is 00000, then find out the corresponding value in the database according to m_strchoose The Chinese character (7120) is displayed; when the obtained value is "B", that is, the continuously input EEG signal is 11110, then delete the last Chinese character; when the obtained value is "D", that is, the continuously input EEG signal Signal is 11011, then delete last lowercase letter, after typing a Chinese character or a lowercase letter, corresponding variable initialization (7140), so that query next time.

在我们的系统中的二进制编码如下所示:The binary encoding on our system looks like this:

a    00001    q    10001a 00001 q 10001

b    00010    r    10010b 00010 r 10010

c    00011    s    10011c 00011 s 10011

d    00100    t    10100d 00100 t 10100

e    00101    u    10101e 00101 u 10101

f    00110    v    10110f 00110 v 10110

g    00111    w               10111g 00111 w 10111

h    01000    x               11000h 01000 x 11000

i    01001    y               11001i 01001 y 11001

j    01010    z               11010j 01010 z 11010

k    01011    删除一个字母    11011k 01011 delete a letter 11011

l    01100    删除一个汉字    11110l 01100 delete a Chinese character 11110

m    01101    开始查询        00000m 01101 start query 00000

n    01110    空格            11111n 01110 Space 11111

o    01111o 01111

p    10000p 10000

本发明的优点:在脑电信号采集中,仅采用了两个导联(C3-A1,C4-A1)就可得到所需的信号;控制的硬件系统性能稳定,适合于残疾人;用PC机为平台的软件系统识别率高,该系统可以实现虚拟键盘的功能,使不同的脑电信号可以用文字表达出来,并且在虚拟键盘输出文字时采用的是主动的方式,它使受试者的视觉系统不需要受任何外界的刺激,这样使受试者更加自如,不仅可以用虚拟键盘输出英文,还可以输出中文;该系统可以实现脑电信号对机器人行为的控制,根据发出的思维脑电信号使机器人为人们提供一些服务。Advantages of the present invention: in EEG signal acquisition, only two leads (C3-A1, C4-A1) can be used to obtain the required signal; the controlled hardware system has stable performance and is suitable for disabled persons; The computer-based software system has a high recognition rate. The system can realize the function of a virtual keyboard, so that different EEG signals can be expressed in words, and the virtual keyboard uses an active way to output text, which makes the subjects The visual system does not need any external stimuli, which makes the subjects more comfortable, not only can use the virtual keyboard to output English, but also can output Chinese; Electric signals enable robots to provide some services to people.

附图说明Description of drawings

图1为本发明基于脑电信号的虚拟键盘和机器人控制系统硬件联接框图;Fig. 1 is the virtual keyboard based on electroencephalogram signal of the present invention and robot control system hardware connection block diagram;

图2为本发明脑-计算机接口控制器电原理图;Fig. 2 is the electrical schematic diagram of the brain-computer interface controller of the present invention;

图3为脑电信号控制的机器人硬件结构框图;Fig. 3 is the structural block diagram of the robot hardware of EEG signal control;

图4为机器人中脑电信号控制方法流程图;Fig. 4 is a flow chart of the method for controlling the EEG signal in the robot;

图5为本发明总体控制方法流程图;Fig. 5 is a flow chart of the overall control method of the present invention;

图6为本发明核心脑电信号的识别算法流程图;Fig. 6 is the identification algorithm flowchart of core EEG signal of the present invention;

图7为本发明脑电信号控制虚拟键盘中文汉字输出流程图。Fig. 7 is a flowchart of the output of Chinese characters on the virtual keyboard controlled by EEG signals according to the present invention.

具体实施方式Detailed ways

首先在受试者的头部安装脑传导电极,让受试者进行几分钟的训练后就可以正式运行了。受试者可以睁开眼睛,也可以闭上眼睛,这完全取决于受试者本人的意愿。受试者用思维去想眼球向上或向下而产生诱发脑电信号,来完成不同的功能,如果希望在计算机显示器上输出中文或英文文字,可以用脑电信号调出相应的代码(如00001输出“a”,00110 0001110101输出“去”)来完成不同文字的输出(如“Hello”,“我要吃饭”等)。Firstly, brain conduction electrodes are installed on the subject's head, and after a few minutes of training, the subject can be officially operated. Subjects can open eyes, eyes can also be closed, it all depends on the subject's own wishes. The subjects use their thinking to think about eyeballs up or down to generate EEG signals to complete different functions. If they want to output Chinese or English text on the computer monitor, they can use EEG signals to call out the corresponding codes (such as 00001 Output "a", 00110 0001110101 output "go") to complete the output of different text (such as "Hello", "I want to eat", etc.).

例如,“去”的输入法是fcu,在系统中对f的编码为00110,对c的编码为00011,对u的编码为10101,再加上00000表示开始查询。当连续输入脑电信号00110 00011 1010100000,就可以在屏幕上打出“去”字。For example, the input method of "go" is fcu, the code of f in the system is 00110, the code of c is 00011, the code of u is 10101, plus 00000 means start query. When the EEG signal 00110 00011 1010100000 is continuously input, the word "Go" can be typed on the screen.

相应的内容还可以用语音系统播放出;如果希望控制机器人的行为,可以用脑电信号调出相应的代码让机器人移动或唱歌等;如果希望让计算机显示器上的图像不断放大,可以用思维去想眼球多次向上;如果希望让计算机显示器上的图像不断缩小,可以用思维控制眼球多次向下。如果希望控制电器开关,可以用脑电信号调出相应的代码让电器开关开或关。总之,根据受试者的要求可以实现如下功能:在计算机显示器上虚拟键盘输出中、英文文字,控制机器人的行为,控制周围电器的开和关(如电灯、电视、空调和电扇等),放大或缩小计算机显示器上图像的大小,用语音系统表达内心想法等等。The corresponding content can also be played by the voice system; if you want to control the behavior of the robot, you can use the EEG signal to call up the corresponding code to make the robot move or sing; If you want your eyeballs to go up many times; if you want to make the image on the computer monitor shrink continuously, you can use your thinking to control your eyeballs to go down many times. If you want to control the electrical switch, you can use the EEG signal to call out the corresponding code to turn the electrical switch on or off. In short, according to the requirements of the subjects, the following functions can be realized: output Chinese and English text on the virtual keyboard on the computer monitor, control the behavior of the robot, control the opening and closing of surrounding electrical appliances (such as lights, TVs, air conditioners and electric fans, etc.), zoom in Or reduce the size of an image on a computer monitor, express your inner thoughts with a voice system, and more.

Claims (5)

1、一种基于脑电信号的虚拟键盘机器人控制系统,其特征在于该系统由一台PC机、脑-计算机接口控制器、机器人、电灯及周围电器四部分组成,其联接是PC机通过串行接口分别与机器人和脑一计算机接口控制器联接,此控制器输入端与脑传导电极联接,同时PC机与外部设备显示器联接,脑一计算机接口控制器与电灯及其它电器联接,脑传导电极与受试者联接,对机器人控制是通过计算机进行的,所述脑一计算机接口控制器包括有输入保护部分,前级放大部分,信号隔离部分,后级信号放大滤波部分,以及微计算机Inter 80C196KC采集控制部分,所述前级放大部分:有两种功能模块,共三个部分,分别由INA128和LM324构成,前半部分的放大采用差动放大,以提高输入信号的共模抑制比,后半部放大使用的负反馈放大电路,在两极放大器中间,设有一个双T网络滤波器,其增益在80dB附近可调;信号隔离部分:隔离级由TLP521-2构成,通过设置其输入电流,信号1∶1放大的隔离;放大器采用LM324和OP07,前部为四阶的低通滤波器,由LM324构成,后部接一个负反馈放大电路,最后是一个电平调整电路,其增益在20dB附近可调。1, a kind of virtual keyboard robot control system based on EEG signal, it is characterized in that this system is made up of four parts of a PC, brain-computer interface controller, robot, electric light and surrounding electrical equipment, and its connection is PC through serial The line interface is respectively connected with the robot and the brain-computer interface controller, and the input end of the controller is connected with the brain conduction electrode, and at the same time, the PC is connected with the external device display, and the brain-computer interface controller is connected with the lamp and other electrical appliances, and the brain conduction electrode Connect with the subject, and control the robot through a computer. The brain-computer interface controller includes an input protection part, a pre-amplification part, a signal isolation part, a post-stage signal amplification and filtering part, and a microcomputer Inter 80C196KC Acquisition control part, the pre-amplification part: there are two functional modules, a total of three parts, respectively composed of INA128 and LM324, the amplification of the first half adopts differential amplification to improve the common mode rejection ratio of the input signal, the second half The negative feedback amplifying circuit used for internal amplification, in the middle of the two-pole amplifier, is equipped with a double T network filter, whose gain is adjustable around 80dB; signal isolation part: the isolation stage is composed of TLP521-2, by setting its input current, the signal 1:1 amplification isolation; the amplifier uses LM324 and OP07, the front part is a fourth-order low-pass filter composed of LM324, the rear part is connected to a negative feedback amplifier circuit, and the last is a level adjustment circuit, its gain is around 20dB adjustable. 2、按权利要求1所述基于脑电信号的虚拟键盘机器人控制系统,其特征在于本发明测量的由想象眼球向上/向下运动诱发的脑电信号,采用C3-A1和C4-A1两路信号进行测量。2. According to the EEG signal-based virtual keyboard robot control system of claim 1, it is characterized in that the EEG signal induced by the imaginary eyeball upward/downward motion measured by the present invention adopts C3-A1 and C4-A1 two-way signal to measure. 3、一种脑电信号对机器人控制的方法,其特征在于机器人中脑电信号计算机控制方法包括以下步骤:3, a kind of EEG signal to the method for robot control, it is characterized in that the computer control method of EEG signal in the robot comprises the following steps: 控制系统启动后,先检查单片机内部的串行通讯控制寄存器1(SCCR1)、串行通讯控制寄存器2(SCCR2)、波特率寄存器(BAUD)相应位的设置,并将其设置到控制系统需要的状态,实现单片机的初始化(4010);After the control system is started, first check the settings of the corresponding bits of the serial communication control register 1 (SCCR1), serial communication control register 2 (SCCR2), and baud rate register (BAUD) inside the microcontroller, and set them to the values required by the control system. state, realize the initialization of the single-chip microcomputer (4010); 接着检查串行通讯状态寄存器(SCSR)的状态,判断是否接收到特征脑电数据,如果收到数据(4020),将结果保存到Cmd变量中(4030),用于后面的判断,如果此时已有进程启动(4040),就先将原来的进程关掉(4050),然后判断Cdm变量的内容;Then check the state of the serial communication status register (SCSR) to judge whether the characteristic EEG data is received, if the data is received (4020), the result is saved in the Cmd variable (4030), for later judgment, if at this time Existing process start (4040), just earlier the original process is shut down (4050), then judge the content of Cdm variable; 对应不同的命令,启动不同的进程(4070,4090,4110),执行唱歌、转身和前进的动作,控制步骤循环返回,重新等待串口的输入。Corresponding to different commands, different processes (4070, 4090, 4110) are started, and the actions of singing, turning around and moving forward are performed, and the control steps are looped back to wait for the input of the serial port again. 4、按权利要求3所述控制方法,其特征在于对脑电信号进行识别的计算机控制方法包括以下步骤:4. The control method according to claim 3, wherein the computer control method for identifying EEG signals comprises the following steps: 系统开始运行时,首先判断是在线分析还是离线分析(5020,5040),如果是在线分析,先初始化串口,然后接收数据,再对接受到的数据进行相应的处理,以得到相应的脑电数据(5030);When the system starts to run, it first judges whether it is online analysis or offline analysis (5020, 5040). If it is online analysis, first initialize the serial port, then receive data, and then process the received data accordingly to obtain corresponding EEG data ( 5030); 如果是离线分析,则先打开相应的数据文件,然后读取数据,再对得到的数据进行相应的处理,最后得到相应的脑电数据(5050);If it is an offline analysis, first open the corresponding data file, then read the data, then perform corresponding processing on the obtained data, and finally obtain the corresponding EEG data (5050); 接着对获得的脑电数据进行平滑化处理(5060),以除去脑电波形中的毛刺;再后对脑电数据进行滤波处理(5070),除去脑电信号中的高频干扰,以便下一步进行判断(5090);Then the obtained EEG data is smoothed (5060) to remove the burrs in the EEG waveform; then the EEG data is filtered (5070) to remove the high-frequency interference in the EEG signal for the next step Make a judgment (5090); 接着进行特征波形的采样(5080),此步骤可以进行多次,以得到最佳的判断结果(5090);Then carry out the sampling of the characteristic waveform (5080), this step can be carried out many times, to obtain the best judgment result (5090); 在采样完成后,根据采样得到的特征,进行相应判断(5090),接着对做出的判断进行校正(5100),对伪判断进行更正。After the sampling is completed, a corresponding judgment is made according to the characteristics obtained by the sampling (5090), and then the judgment made is corrected (5100) to correct the false judgment. 5、按权利要求3所述控制方法,其特征在于脑电信号识别控制方法包括以下步骤5. The control method according to claim 3, characterized in that the control method for EEG signal recognition comprises the following steps 首先进行标准特征波形的采样(6010),如果采样效果不佳,还可以进行重新采样(6020),使判断的效果达到最佳;First carry out sampling of the standard characteristic waveform (6010), if the sampling effect is not good, re-sampling (6020) can also be carried out, so that the effect of judgment can reach the best; 接着对进入判断区的脑电数据进行特征提取(6040),根据已得到的标准特征波形进行特征1和特征2的判断(6050,6080),接着对判断进行校正(6110),除去其中的误判和对正确的判断进行细微的调整;Then perform feature extraction (6040) on the EEG data entering the judgment area, and perform judgments on feature 1 and feature 2 according to the obtained standard characteristic waveforms (6050, 6080), and then correct the judgment (6110) to remove errors. judgments and minor adjustments to correct judgments; 如果数据处理结束(6120),可以退出核心判断,如果没有,控制步骤返回,重新采样(6020)。If the data processing ends (6120), the core judgment can be exited, if not, the control step returns and re-samples (6020).
CNB2003101048758A 2003-10-21 2003-10-21 Virtual keyboard and robot control system by brain electric signal Expired - Fee Related CN1331080C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101048758A CN1331080C (en) 2003-10-21 2003-10-21 Virtual keyboard and robot control system by brain electric signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101048758A CN1331080C (en) 2003-10-21 2003-10-21 Virtual keyboard and robot control system by brain electric signal

Publications (2)

Publication Number Publication Date
CN1538340A CN1538340A (en) 2004-10-20
CN1331080C true CN1331080C (en) 2007-08-08

Family

ID=34333545

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101048758A Expired - Fee Related CN1331080C (en) 2003-10-21 2003-10-21 Virtual keyboard and robot control system by brain electric signal

Country Status (1)

Country Link
CN (1) CN1331080C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009010001A1 (en) * 2007-07-19 2009-01-22 Zhiping Meng A method and system for encryption and personal idendification based on brain wave
CN101872242A (en) * 2010-06-02 2010-10-27 于潇洋 Method for communicating with other people by utilizing brain wave and device thereof
CN102096468A (en) * 2011-01-20 2011-06-15 中山大学 Brain-computer interface (BCI)-based home appliance remote control device and method
CN102198660A (en) * 2011-05-04 2011-09-28 上海海事大学 Robotic arm control system and action command control scheme based on brain-computer interface
CN103810780B (en) * 2014-03-18 2016-09-28 苏州大学 Coded lock based on brain machine switching technology and encrypting and decrypting method thereof
CN103845137B (en) * 2014-03-19 2016-03-02 北京工业大学 Based on the robot control method of stable state vision inducting brain-machine interface
CN104281264A (en) * 2014-09-26 2015-01-14 上海闻泰电子科技有限公司 Intelligent data transmission system and method
CN105078450B (en) * 2015-08-24 2018-02-27 华南理工大学 A kind of health service robot of achievable brain electro-detection
CN105549743A (en) * 2016-01-18 2016-05-04 中国医学科学院生物医学工程研究所 Robot system based on brain-computer interface and implementation method
CN105640550A (en) * 2016-03-28 2016-06-08 四川大学 A front-end design of EEG acquisition based on INA128
CN112130483A (en) * 2020-08-27 2020-12-25 深圳市优必选科技股份有限公司 A robot control method and robot

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6001065A (en) * 1995-08-02 1999-12-14 Ibva Technologies, Inc. Method and apparatus for measuring and analyzing physiological signals for active or passive control of physical and virtual spaces and the contents therein
CN1248426A (en) * 1999-10-29 2000-03-29 清华大学 Controller based on brain electricity steady-state induced response
CN2525600Y (en) * 2002-01-18 2002-12-11 东北大学 Environment controller for the disabled based on brain electric signal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6001065A (en) * 1995-08-02 1999-12-14 Ibva Technologies, Inc. Method and apparatus for measuring and analyzing physiological signals for active or passive control of physical and virtual spaces and the contents therein
CN1248426A (en) * 1999-10-29 2000-03-29 清华大学 Controller based on brain electricity steady-state induced response
CN2525600Y (en) * 2002-01-18 2002-12-11 东北大学 Environment controller for the disabled based on brain electric signal

Also Published As

Publication number Publication date
CN1538340A (en) 2004-10-20

Similar Documents

Publication Publication Date Title
CN1331080C (en) Virtual keyboard and robot control system by brain electric signal
US10878818B2 (en) Methods and apparatus for silent speech interface
CN101897640B (en) Novel movement imagery electroencephalogram control-based intelligent wheelchair system
CN109999314B (en) An intelligent sleep aid system based on brain wave monitoring and its sleep earphone
CN104360730B (en) Man-machine interaction method supported by multi-modal non-implanted brain-computer interface technology
Lv et al. Implementation of the EOG-based human computer interface system
CN103294199B (en) A kind of unvoiced information identifying system based on face's muscle signals
CN103412640A (en) Device and method for character or command input controlled by teeth
CN103349595A (en) Intelligent brain-computer interface wheelchair based on multi-mode hierarchical control
JP2017511501A (en) Training support apparatus and training support method
Vilic et al. DTU BCI speller: An SSVEP-based spelling system with dictionary support
CN108056865A (en) A kind of multi-modal wheelchair brain control system and method based on cloud platform
CN105302088A (en) Smart home system and control method based on brain-computer interface and Zigbee
CN110221684A (en) Apparatus control method, system, electronic device and computer readable storage medium
CN101301244A (en) Brain-computer interface-based intelligent wheelchair control system and its EEG signal processing method
CN105904459A (en) Robot control system based on eye electrical signal recognition and design method of system
CN202041916U (en) a voice-activated mouse
CN113359991B (en) Intelligent brain-controlled mechanical arm auxiliary feeding system and method for disabled people
Hasan et al. Implementation of speech recognition home control system using Arduino
CN2525600Y (en) Environment controller for the disabled based on brain electric signal
CN112578682A (en) Intelligent obstacle-assisting home system based on electro-oculogram control
CN111050262B (en) An intelligent voice-enhanced real-time cochlear implant debugging system
CN100353390C (en) Domestic electric-appliance telecontroller
CN118689315A (en) Indoor smart home interaction method and system based on brain wave signals
Kwak et al. Towards Personalized Brain-Computer Interface Application Based on Endogenous EEG Paradigms

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070808

Termination date: 20101021