[go: up one dir, main page]

CN103584856A - Algorithm for identifying blinking force by processing brain waves - Google Patents

Algorithm for identifying blinking force by processing brain waves Download PDF

Info

Publication number
CN103584856A
CN103584856A CN201310632391.4A CN201310632391A CN103584856A CN 103584856 A CN103584856 A CN 103584856A CN 201310632391 A CN201310632391 A CN 201310632391A CN 103584856 A CN103584856 A CN 103584856A
Authority
CN
China
Prior art keywords
brain wave
amplitude
value
formula
var
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.)
Granted
Application number
CN201310632391.4A
Other languages
Chinese (zh)
Other versions
CN103584856B (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.)
Huainan Power Supply Co of State Grid Anhui Electric Power Co Ltd
Original Assignee
Huainan Power Supply Co of State Grid Anhui Electric Power Co Ltd
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 Huainan Power Supply Co of State Grid Anhui Electric Power Co Ltd filed Critical Huainan Power Supply Co of State Grid Anhui Electric Power Co Ltd
Priority to CN201310632391.4A priority Critical patent/CN103584856B/en
Publication of CN103584856A publication Critical patent/CN103584856A/en
Application granted granted Critical
Publication of CN103584856B publication Critical patent/CN103584856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

本发明的一种通过处理脑电波识别眨眼力度的算法,在每一工作周期内,先测量脑电波幅值x,通过迭代公式Yn=(1-k)Yn-1+kxn和Zn=(1-k)Zn-1+kxn 2计算得到近似的均值Y和均方值Z,按照公式Var(x)=E(x2)-[E(x)]2计算方差Var(x),再按照公式

Figure DDA0000426355520000011
或者公式
Figure DDA0000426355520000012
计算标准化后x的幅值S。并将幅值S与设定的正向阀值值和负向阀值相比较,判断事件A还是B。如果发生的为A事件,则认为发生了眨眼动作,此时眨眼力度为A事件发生时的幅值。本发明的一种通过处理脑电波识别眨眼力度的算法,具有能够识别快速连续眨眼及眨眼力度、计算量比较小、算法自适应性好等优点。

Figure 201310632391

In the present invention, an algorithm for recognizing the intensity of blinking by processing brain waves, first measures the amplitude x of brain waves in each working cycle, and uses the iterative formula Y n = (1-k) Y n-1 + kx n and Z n = (1-k) Z n-1 +kx n 2 Calculate the approximate mean Y and mean square Z, and calculate the variance Var according to the formula Var(x)=E(x 2 )-[E(x)] 2 (x), and then according to the formula

Figure DDA0000426355520000011
or the formula
Figure DDA0000426355520000012
Computes the normalized magnitude S of x. And compare the amplitude S with the set positive threshold value and negative threshold value to judge event A or B. If the A event occurs, it is considered that a blink action has occurred, and the blinking force at this time is the amplitude when the A event occurs. The algorithm for identifying blink force by processing brain waves of the present invention has the advantages of being able to identify rapid and continuous blinks and blink force, relatively small amount of calculation, good algorithm adaptability, and the like.

Figure 201310632391

Description

一种通过处理脑电波识别眨眼力度的算法An Algorithm to Identify Blink Strength by Processing Brainwaves

技术领域technical field

本发明涉及一种通过处理脑电波识别眨眼力度的算法。The invention relates to an algorithm for identifying blink strength by processing brain waves.

背景技术Background technique

通过观察脑电波的原始幅值图像,我们发现,对于任何人,当他的身体静止不动时,眨眼动作都会引发前额脑电波的波动,且波动大小和眨眼力度成正比。但是由于每个人的脑电波图像都有细微差别,如果通过设定阀值来处理脑电波,这将会导致设计出来的产品缺乏普适性。但是如果直接求均值与方差,将会导致巨大的计算量以及计算空间。By observing the original amplitude images of brain waves, we found that for any person, when his body is still, blinking will trigger fluctuations in frontal brain waves, and the magnitude of the fluctuations is proportional to the intensity of the blink. However, because each person's brain wave image has subtle differences, if the brain wave is processed by setting a threshold, this will lead to a lack of universality in the designed product. However, if the mean and variance are directly calculated, it will lead to a huge amount of calculation and calculation space.

现有技术中,使用NeuroSky公司的TGAM模块能够测到原始的脑电波数据和眨眼力度,但是该TGAM模块识别眨眼力度的反应速度很慢,而且无法识别连续的快速地眨眼。In the prior art, the TGAM module of NeuroSky Company can measure the original brain wave data and blink strength, but the TGAM module has a very slow response speed in recognizing the blink strength, and cannot recognize continuous rapid blinks.

发明内容Contents of the invention

本发明是为避免上述已有技术中存在的不足之处,提供一种运算量小且能识别快速连续眨眼通过处理脑电波识别眨眼力度的算法,以能够识别快速连续眨眼及眨眼力度。The present invention aims to avoid the shortcomings in the above-mentioned prior art, and provides an algorithm that has a small amount of calculation and can identify rapid and continuous blinking by processing brain waves to identify blinking force, so as to be able to identify rapid and continuous blinking and blinking force.

本发明为解决技术问题采用以下技术方案。The present invention adopts the following technical solutions to solve the technical problems.

一种通过处理脑电波识别眨眼力度的算法,其包括如下步骤:An algorithm for identifying blink strength by processing brain waves, which includes the following steps:

步骤1:以耳垂作为参考接地,测量脑门的电压,观察脑电波的波形图;Step 1: Use the earlobe as a reference ground, measure the voltage of the forehead, and observe the waveform of the brain wave;

步骤2:设定一个正向阀值值和一个负向阀值;把脑电波的幅值高于正向阀值称为事件A,把脑电波的幅值低于负向阀值称为事件B;Step 2: Set a positive threshold value and a negative threshold value; the brain wave amplitude higher than the positive threshold is called event A, and the brain wave amplitude lower than the negative threshold is called event B;

步骤3:在脑电波的波形图的每一工作周期内,先测量脑电波幅值x;Step 3: In each working cycle of the waveform diagram of the brain wave, measure the brain wave amplitude x;

步骤4:通过公式(1)进行迭代,求出脑电波幅值x的均值的近似值YnStep 4: Iterate through the formula (1) to find the approximate value Yn of the mean value of the brain wave amplitude x

迭代公式(1)为:Yn=(1-k)Yn-1+kxn          (1)The iteration formula (1) is: Y n = (1-k) Y n-1 + kx n (1)

公式(1)中,xn为第n时刻测到脑电波的幅值;Yn为第n次迭代时,幅值x的均值的近似值;k为常数,n为自然数;(如果k越小,Yn就越接近真正的x均值的近似值,但是自适应的速度就越慢。通常k取0.005。)In the formula (1), x n is the amplitude of the brain wave measured at the nth moment; Y n is the approximate value of the mean value of the amplitude x at the nth iteration; k is a constant, and n is a natural number; (if k is smaller , the closer Y n is to the approximate value of the real x mean, but the slower the adaptive speed. Usually k is 0.005.)

步骤5:通过公式(2)进行迭代,求出脑电波幅值x的均方值Zn的近似值;Step 5: Iterate through the formula (2) to find the approximate value of the mean square value Z n of the brain wave amplitude x;

迭代公式(2)为:Zn=(1-k)Zn-1+kxn 2         (2)The iteration formula (2) is: Z n = (1-k) Z n-1 + kx n 2 (2)

公式(2)中,xn为第n时刻测到脑电波的幅值;Zn为第n次迭代时,幅值x的均方值的近似值;k为常数,n为自然数;(如果k越小,Zn就越接近真正的x均方值的近似值,但是自适应的速度就越慢。通常k取0.005。)In the formula (2), x n is the amplitude of the brain wave measured at the nth moment; Z n is the approximate value of the mean square value of the amplitude x at the nth iteration; k is a constant, and n is a natural number; (if k The smaller the value, the closer Z n is to the approximate value of the real x-mean-square value, but the slower the adaptive speed. Usually k is 0.005.)

步骤6:通过公式(3)求取x的近似值的方差Var(x);Step 6: Calculate the variance Var(x) of the approximate value of x by formula (3);

Var(x)=E(x2)-[E(x)]2          (3);Var(x)=E(x 2 )-[E(x)] 2 (3);

公式(3),x为脑电波的幅值,E(x)为脑电波幅值的均值,E(x2)脑电波幅值的均方值,Var(x)为脑电波幅值的方差;Formula (3), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, E(x 2 ) is the mean square value of the brain wave amplitude, and Var(x) is the variance of the brain wave amplitude ;

步骤7:通过公式(4),对x进行标准化;Step 7: Standardize x by formula (4);

sthe s == xx -- EE. (( xx )) VarVar (( xx )) -- -- -- (( 44 ))

公式(4),x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值。Formula (4), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x.

本发明的一种通过处理脑电波识别眨眼力度的算法的特点也在于:A kind of algorithm of the present invention recognizes the blink strength by processing brain wave is also characterized in that:

所述步骤7中,采用公式(5),对x进行标准化;In the step 7, the formula (5) is used to standardize x;

sthe s 22 == sgnsgn (( xx )) [[ xx -- EE. (( xx )) ]] 22 VarVar (( xx )) -- -- -- (( 55 )) ;;

其中,x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值;函数sgn(x)表示:当x大于等于0时,其值为1;当x小于等于0时,其值为-1。Among them, x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x; the function sgn(x) expresses: when When x is greater than or equal to 0, its value is 1; when x is less than or equal to 0, its value is -1.

与已有技术相比,本发明有益效果体现在:Compared with the prior art, the beneficial effects of the present invention are reflected in:

本发明的一种通过处理脑电波识别眨眼力度的算法,在每一工作周期内,先测量脑电波幅值x,通过迭代公式(1)和(2)计算得到近似的均值Y和均方值Z,按照公式(3)计算方差,再按照公式(4)或者公式(5)计算标准化后x的幅值S。并将幅值S与设定的正向阀值值和负向阀值相比较,判断事件A还是B。如果发生的为A事件,且两事件发生时刻的时间差没有超过预设值,则认为发生了眨眼动作,取整个眨眼过程中S的最大值为眨眼力度。In the present invention, an algorithm for recognizing the intensity of blinking by processing brain waves, first measures the brain wave amplitude x in each working cycle, and calculates the approximate mean value Y and mean square value through iterative formulas (1) and (2) Z, calculate the variance according to formula (3), and then calculate the standardized amplitude S of x according to formula (4) or formula (5). And compare the amplitude S with the set positive threshold value and negative threshold value to judge event A or B. If the A event occurs, and the time difference between the occurrence moments of the two events does not exceed the preset value, it is considered that a blink has occurred, and the maximum value of S in the entire blink process is taken as the blink force.

本发明的一种通过处理脑电波识别眨眼力度的算法,具有能够识别快速连续眨眼及眨眼力度、计算量比较小、算法自适应性好等优点。The algorithm for identifying blink force by processing brain waves of the present invention has the advantages of being able to identify rapid and continuous blinks and blink force, relatively small amount of calculation, good algorithm adaptability, and the like.

附图说明Description of drawings

图1为本发明的一种通过处理脑电波识别眨眼力度的算法的流程图。FIG. 1 is a flow chart of an algorithm for identifying blink strength by processing brain waves according to the present invention.

图2为图1中参数i的取值范围标识图。FIG. 2 is an identification diagram of the value range of the parameter i in FIG. 1 .

图3为本发明的一种通过处理脑电波识别眨眼力度的算法的Matlab模拟结果图。Fig. 3 is a Matlab simulation result diagram of an algorithm for recognizing blink strength by processing brain waves according to the present invention.

以下通过具体实施方式,并结合附图对本发明作进一步说明。The present invention will be further described below through specific embodiments and in conjunction with the accompanying drawings.

具体实施方式Detailed ways

一种通过处理脑电波识别眨眼力度的算法,其特征是,包括如下步骤:An algorithm for identifying blinking strength by processing brain waves is characterized in that it includes the following steps:

步骤1:以耳垂作为参考接地,测量脑门的电压,观察脑电波的波形图;Step 1: Use the earlobe as a reference ground, measure the voltage of the forehead, and observe the waveform of the brain wave;

步骤2:设定一个正向阀值值和一个负向阀值;把脑电波的幅值高于正向阀值称为事件A,把脑电波的幅值低于负向阀值称为事件B;Step 2: Set a positive threshold value and a negative threshold value; the brain wave amplitude higher than the positive threshold is called event A, and the brain wave amplitude lower than the negative threshold is called event B;

步骤3:在脑电波的波形图的每一工作周期内,先测量脑电波幅值x;Step 3: In each working cycle of the waveform diagram of the brain wave, measure the brain wave amplitude x;

步骤4:通过公式(1)进行迭代,求出脑电波幅值x的均值的近似值YnStep 4: Iterate through the formula (1) to find the approximate value Yn of the mean value of the brain wave amplitude x

迭代公式(1)为:Yn=(1-k)Yn-1+kxn         (1)The iteration formula (1) is: Y n = (1-k) Y n-1 + kx n (1)

公式(1)中,xn为第n时刻测到脑电波的幅值;Yn为第n次迭代时,幅值x的均值的近似值;k为常数,n为自然数;(如果k越小,Yn就越接近真正的x均值的近似值,但是自适应的速度就越慢。通常k取0.005。)In the formula (1), x n is the amplitude of the brain wave measured at the nth moment; Y n is the approximate value of the mean value of the amplitude x at the nth iteration; k is a constant, and n is a natural number; (if k is smaller , the closer Y n is to the real x-mean approximation, but the slower the adaptive speed. Usually k is 0.005.)

步骤5:通过公式(2)进行迭代,求出脑电波幅值x的均方值Zn的近似值;Step 5: Iterate through the formula (2) to find the approximate value of the mean square value Z n of the brain wave amplitude x;

迭代公式(2)为:Zn=(1-k)Zn-1+kxn 2         (2)The iteration formula (2) is: Z n = (1-k) Z n-1 + kx n 2 (2)

公式(2)中,xn为第n时刻测到脑电波的幅值;Zn为第n次迭代时,幅值x的均方值的近似值;k为常数,n为自然数;(如果k越小,Zn就越接近真正的x均方值的近似值,但是自适应的速度就越慢。通常k取0.005。)In the formula (2), x n is the amplitude of the brain wave measured at the nth moment; Z n is the approximate value of the mean square value of the amplitude x at the nth iteration; k is a constant, and n is a natural number; (if k The smaller the value, the closer Z n is to the approximate value of the real x-mean-square value, but the slower the adaptive speed. Usually k is 0.005.)

步骤6:通过公式(3)求取x的近似值的方差Var(x);Step 6: Calculate the variance Var(x) of the approximate value of x by formula (3);

Var(x)=E(x2)-[E(x)]2            (3);Var(x)=E(x 2 )-[E(x)] 2 (3);

公式(3),x为脑电波的幅值,E(x)为脑电波幅值的均值,E(x2)脑电波幅值的均方值,Var(x)为脑电波幅值的方差;Formula (3), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, E(x 2 ) is the mean square value of the brain wave amplitude, and Var(x) is the variance of the brain wave amplitude ;

步骤7:通过公式(4),对x进行标准化;Step 7: Standardize x by formula (4);

sthe s == xx -- EE. (( xx )) VarVar (( xx )) -- -- -- (( 44 ))

公式(4),x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值。Formula (4), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x.

如图1为本发明的算法的一个具体实施例的流程图。初始化时,各参数的取值为:Y=0;Z=10000;k=0.005;maxI=100;i=maxI;maxS=0;其中:i为A、B两事件间隔周期个数;如前文,最大等待周期常量maxI为100。具体的算法计算过程参加图1。Figure 1 is a flowchart of a specific embodiment of the algorithm of the present invention. During initialization, the value of each parameter is: Y=0; Z=10000; k=0.005; maxI=100; i=maxI; maxS=0; where: i is the number of periods between events A and B; as mentioned above , the maximum waiting period constant maxI is 100. Refer to Figure 1 for the specific algorithm calculation process.

如图2,是图1中参数i的取值范围标识图。以图2中一个眨眼的脑电波波形为例,时间i不能过长,因为如果i过长,就形成不了一个连续的眨眼过程,故需要设置上限maxI。本方法经过测试,能在身体静止的情况下很好的识别眨眼及其力度。但是在人运动的过程中,肌肉电会干扰脑电波信号,导致计算失真,所以还应当采用滤波的算法,实现在运动的过程中,识别眨眼及其力度。As shown in Figure 2, it is a value range identification diagram of the parameter i in Figure 1. Taking the brain wave waveform of a blink in Figure 2 as an example, the time i cannot be too long, because if i is too long, a continuous blinking process cannot be formed, so an upper limit maxI needs to be set. This method has been tested and can identify eye blinks and their strength well when the body is still. However, in the process of human movement, muscle electricity will interfere with brain wave signals, resulting in calculation distortion, so filtering algorithms should also be used to recognize blinking and its strength during movement.

求得x的近似值的方差Var(x)后,通过x的近似值的方差Var(x),对x进行标准化。现有技术中,直接计算n次脑电波数据的均值和方差,计算n时刻的均值需要一共n+1次运算(加法和乘法),方差需要2n+3次运算。采用了本发明的算法后,计算均值和方差都只是需要3次计算即可,这大大的减少了整个计算过程的计算量,便于通过脑电波进行眨眼力度的识别。After obtaining the variance Var(x) of the approximate value of x, x is standardized by the variance Var(x) of the approximate value of x. In the prior art, the mean and variance of n times of EEG data are directly calculated, and the calculation of the mean at n times requires a total of n+1 operations (addition and multiplication), and the variance requires 2n+3 operations. After adopting the algorithm of the present invention, it only needs 3 calculations to calculate the mean value and variance, which greatly reduces the calculation amount of the whole calculation process, and facilitates the recognition of blink strength through brain waves.

实验发现,脑电波的幅值和眨眼力度是近似正比例关系的,所以可以通过脑电波的幅值来表示眨眼力度。但是由于每个人的脑电波的波度幅度和范围皆不同,所以需要算法能够自适应。而且这个算法的计算量必须小,以便于实现实时处理。本发明的算法,运算量小、且能识别快速连续眨眼。Experiments have found that the amplitude of brain waves and the intensity of blinking are approximately proportional, so the amplitude of brain waves can be used to represent the intensity of blinking. However, since the wave amplitude and range of each person's brain waves are different, the algorithm needs to be adaptive. Moreover, the calculation amount of this algorithm must be small in order to realize real-time processing. The algorithm of the invention has a small amount of computation and can identify quick and continuous blinks.

通过实验发现、可以眨眼动作分为两个阶段:闭眼、睁眼。以耳垂作为参考接地,测量脑门的电压,观察脑电波的波形图。当作闭眼动作的时候,会产生一个与波形图的图像纵轴正方向相同的脉冲,脉冲的最大幅度和和闭眼力度成近似正比例关系。当作睁眼动作的时候,会产生一个与波形图的图像纵轴正方向相反的脉冲,脉冲的最大幅度和和睁眼眼力度成近似正比例关系。Through experiments, it was found that the blinking action can be divided into two stages: closing eyes and opening eyes. Use the earlobe as a reference ground, measure the voltage of the forehead, and observe the waveform of the brain wave. When it is regarded as an eye-closing action, a pulse in the same positive direction as the vertical axis of the waveform image will be generated, and the maximum amplitude of the pulse is approximately proportional to the eye-closing force. When it is regarded as an eye-opening action, a pulse in the opposite direction to the positive direction of the vertical axis of the waveform image will be generated. The maximum amplitude of the pulse is approximately proportional to the eye-opening force.

设定一个正向阀值值和一个负向阀值,把脑电波的幅值高于正向阀值称为事件A,把脑电波的幅值低于负向阀值称为事件B。只有A事件后发生事件B,且两事件发生时刻的差小于预设值,才认为发生了眨眼动作。如果A事件后发生A事件或者B事件直接发生,都不认为产生了眨眼动作。Set a positive threshold value and a negative threshold value, call the brain wave amplitude higher than the positive threshold value event A, and call the brain wave amplitude lower than the negative threshold value event B. Only when event B occurs after event A, and the difference between the occurrence times of the two events is less than a preset value, is it considered that an eye blink has occurred. If the A event occurs after the A event or the B event occurs directly, it is not considered that an eye blink has occurred.

由于采用了对脑电波幅值进行标准化的方法,所以正向阀值和负向阀值都为常数。经过实验验证,正向阀值取3,负向阀值取-2。Since the method of standardizing the amplitude of brain waves is adopted, both the positive and negative thresholds are constant. After experimental verification, the positive threshold is 3, and the negative threshold is -2.

需要说明一点,由于人故意眨眼的时候几乎全是闭眼用力,睁眼不用力,所以应以闭眼时候的力度,作为眨眼力度。It needs to be explained that when people blink on purpose, they almost always close their eyes with force, and do not use force when they open their eyes, so the force when closing eyes should be used as the force of blinking.

所述步骤7中,采用公式(5),对x进行标准化;In the step 7, the formula (5) is used to standardize x;

sthe s 22 == sgnsgn (( xx )) [[ xx -- EE. (( xx )) ]] 22 VarVar (( xx )) -- -- -- (( 55 )) ;;

其中,x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值;函数sgn(x)表示:当x大于等于0时,其值为1;当x小于等于0时,其值为-1。Among them, x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x; the function sgn(x) expresses: when When x is greater than or equal to 0, its value is 1; when x is less than or equal to 0, its value is -1.

在公式(4)中,需要开根号。而由于开根号这个计算量很大,如果在计算能力不是很好的设备上使用该算法时,很容易影响计算速度。而采用公式(5),则没有开根号计算的过程,计算速度比较快。这样能大大减小计算量。在于幅值进行比较的时候,只需将S2与幅值x的平方进行比较即可。由于比较的是幅值的平方值,比较数值大小的时候,同时还需要注意的是幅值需要保留原有正负号。In formula (4), the square root sign is required. However, since the calculation of root sign is very heavy, if the algorithm is used on a device with poor computing power, it will easily affect the calculation speed. However, if formula (5) is used, there is no process of calculating the square root, and the calculation speed is relatively fast. This can greatly reduce the amount of computation. When comparing the magnitude, it is only necessary to compare S 2 with the square of the magnitude x. Since the comparison is the square value of the amplitude, when comparing the values, it should also be noted that the amplitude needs to retain the original sign.

通过matlab,对算法进行了模拟。模拟的结果如下图3(脑电波信号均通过TGAM模块采集),这里取值k取0.00015。图中的黑色带区表示脑电波图,脑电波图中间白色的点代表在此时刻识别到了眨眼动作。白色的点对应的直线及直线旁的数字,表示在该时刻测到的眨眼力度。The algorithm is simulated by matlab. The simulation results are shown in Figure 3 below (the brain wave signals are all collected by the TGAM module), where the value of k is 0.00015. The black band in the figure represents the EEG, and the white dot in the middle of the EEG represents the recognition of eye blinking at this moment. The straight line corresponding to the white dot and the number next to the straight line represent the blink force measured at that moment.

每一个工作周期内的算法的计算过程如下:在每一工作周期内,先测量脑电波幅值x,通过迭代公式(1)和(2)计算得到近似的均值Y和均方值Z,按照公式(3)计算方差,再按照公式(4)或者公式(5)计算标准化后x的幅值S。并将S与设定的正向阀值值和负向阀值相比较,判断事件A还是B。The calculation process of the algorithm in each working cycle is as follows: in each working cycle, first measure the brain wave amplitude x, and calculate the approximate mean value Y and mean square value Z through iterative formulas (1) and (2), according to Formula (3) calculates the variance, and then calculates the standardized amplitude S of x according to formula (4) or formula (5). And compare S with the set positive threshold value and negative threshold value to judge event A or B.

通过S判断发生了事件A还是B,如果发生了B时间,看上一次发生事件时,发生的什么事件,如果发生的为A事件,且两事件发生时刻的差小于预设值,则认为发生了眨眼动作,取整个眨眼过程中S的最大值为眨眼力度。Use S to judge whether event A or B has occurred. If B time has occurred, look at what event occurred when the event occurred last time. If it is A event that occurred, and the difference between the occurrence times of the two events is less than the preset value, it is considered to have occurred. Blinking action, take the maximum value of S in the whole blinking process as the blinking force.

本发明的算法,通过测量前额脑电波,来识别眨眼力度的算法。该算法进过测试,具有自适应性,且算法简单,便于实现。经过算法处理得到的眨眼力度,拥有足够的精度。The algorithm of the present invention is an algorithm for identifying blink strength by measuring forehead brain waves. The algorithm has been tested and is self-adaptive, and the algorithm is simple and easy to implement. The blink strength obtained through algorithmic processing has sufficient precision.

本发明的通过处理脑电波识别眨眼力度的算法,包括数字化脑电波幅值数据的标准化方法以及如何处理标准化后的数据,提供一种实时的运算量小、运算速度快的能识别连续眨眼及其眨眼力度的算法,能区分故意眨眼和无意识眨眼。The algorithm for identifying the intensity of blinking by processing brainwaves of the present invention includes a method for standardizing digitized brainwave amplitude data and how to process the standardized data, and provides a real-time algorithm that can identify continuous blinking and eye blinking with a small amount of calculation and a fast calculation speed. The algorithm of blinking strength can distinguish between intentional blinking and unconscious blinking.

本发明的算法经过测试,能在身体静止的情况下很好的识别眨眼及其力度。The algorithm of the invention has been tested and can well identify blinking and its strength when the body is still.

Claims (2)

1.一种通过处理脑电波识别眨眼力度的算法,其特征是,包括如下步骤:1. An algorithm for identifying blink strength by processing brain waves, is characterized in that it comprises the steps: 步骤1:以耳垂作为参考接地,测量脑门的电压,观察脑电波的波形图;Step 1: Use the earlobe as a reference ground, measure the voltage of the forehead, and observe the waveform of the brain wave; 步骤2:设定一个正向阀值值和一个负向阀值;把脑电波的幅值高于正向阀值称为事件A,把脑电波的幅值低于负向阀值称为事件B;Step 2: Set a positive threshold value and a negative threshold value; the brain wave amplitude higher than the positive threshold is called event A, and the brain wave amplitude lower than the negative threshold is called event B; 步骤3:在脑电波的波形图的每一工作周期内,先测量脑电波幅值x;Step 3: In each working cycle of the waveform diagram of the brain wave, measure the brain wave amplitude x; 步骤4:通过公式(1)进行迭代,求出脑电波幅值x的均值的近似值YnStep 4: Iterate through the formula (1) to find the approximate value Yn of the mean value of the brain wave amplitude x 迭代公式(1)为:Yn=(1-k)Yn-1+kxn      (1)The iteration formula (1) is: Y n = (1-k) Y n-1 + kx n (1) 公式(1)中,xn为第n时刻测到脑电波的幅值;Yn为第n次迭代时,幅值x的均值的近似值;k为常数,n为自然数;(如果k越小,Yn就越接近真正的x均值的近似值,但是自适应的速度就越慢。通常k取0.005。)In the formula (1), x n is the amplitude of the brain wave measured at the nth moment; Y n is the approximate value of the mean value of the amplitude x at the nth iteration; k is a constant, and n is a natural number; (if k is smaller , the closer Yn is to the real x-mean approximation, but the slower the adaptive speed. Usually k is 0.005.) 步骤5:通过公式(2)进行迭代,求出脑电波幅值x的均方值Zn的近似值;Step 5: Iterate through the formula (2) to find the approximate value of the mean square value Z n of the brain wave amplitude x; 迭代公式(2)为:Zn=(1-k)Zn-1+kxn 2        (2)The iteration formula (2) is: Z n = (1-k) Z n-1 + kx n 2 (2) 公式(2)中,xn为第n时刻测到脑电波的幅值;Zn为第n次迭代时,幅值x的均方值的近似值;k为常数,n为自然数。In the formula (2), x n is the amplitude of the brain wave measured at the nth moment; Z n is the approximate value of the mean square value of the amplitude x at the nth iteration; k is a constant, and n is a natural number. 步骤6:通过公式(3)求取x的近似值的方差Var(x);Step 6: Calculate the variance Var(x) of the approximate value of x by formula (3); Var(x)=E(x2)-[E(x)]2           (3);Var(x)=E(x 2 )-[E(x)] 2 (3); 公式(3),x为脑电波的幅值,E(x)为脑电波幅值的均值,E(x2)脑电波幅值的均方值,Var(x)为脑电波幅值的方差;Formula (3), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, E(x 2 ) is the mean square value of the brain wave amplitude, and Var(x) is the variance of the brain wave amplitude ; 步骤7:通过公式(4),对x进行标准化;Step 7: Standardize x by formula (4); sthe s == xx -- EE. (( xx )) VarVar (( xx )) -- -- -- (( 44 )) 公式(4),x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值。Formula (4), x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x. 2.根据权利要求1所述的一种通过处理脑电波识别眨眼力度的算法,其特征是,所述步骤7中,采用公式(5),对x进行标准化;2. An algorithm for identifying blink strength by processing brain waves according to claim 1, characterized in that, in step 7, formula (5) is used to standardize x; sthe s 22 == sgnsgn (( xx )) [[ xx -- EE. (( xx )) ]] 22 VarVar (( xx )) -- -- -- (( 55 )) .. 其中,x为脑电波的幅值,E(x)为脑电波幅值的均值,Var(x)为脑电波幅值的方差;S为x标准化后的值;函数sgn(x)表示:当x大于等于0时,其值为1;当x小于等于0时,其值为-1。Among them, x is the amplitude of the brain wave, E(x) is the mean value of the brain wave amplitude, Var(x) is the variance of the brain wave amplitude; S is the standardized value of x; the function sgn(x) expresses: when When x is greater than or equal to 0, its value is 1; when x is less than or equal to 0, its value is -1.
CN201310632391.4A 2013-11-29 2013-11-29 A kind of method by process brain wave identification dynamics nictation Active CN103584856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310632391.4A CN103584856B (en) 2013-11-29 2013-11-29 A kind of method by process brain wave identification dynamics nictation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310632391.4A CN103584856B (en) 2013-11-29 2013-11-29 A kind of method by process brain wave identification dynamics nictation

Publications (2)

Publication Number Publication Date
CN103584856A true CN103584856A (en) 2014-02-19
CN103584856B CN103584856B (en) 2015-09-30

Family

ID=50075334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310632391.4A Active CN103584856B (en) 2013-11-29 2013-11-29 A kind of method by process brain wave identification dynamics nictation

Country Status (1)

Country Link
CN (1) CN103584856B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105011951A (en) * 2014-04-24 2015-11-04 闽南师范大学 Device for extracting eye blinking times by brain waves and method
CN105988569A (en) * 2015-02-13 2016-10-05 北京智谷睿拓技术服务有限公司 Method and device for determining control information
CN107440714A (en) * 2017-09-07 2017-12-08 哈尔滨理工大学 A kind of focus and blink action extraction element and method
CN107582051A (en) * 2017-10-12 2018-01-16 公安部南昌警犬基地 A kind of animal mood brain electricity analytical equipment
CN107714038A (en) * 2017-10-12 2018-02-23 北京翼石科技有限公司 The feature extracting method and device of a kind of EEG signals
CN108245154A (en) * 2018-01-24 2018-07-06 福州大学 The method that blink section in brain electricity or eye electricity is accurately determined using rejecting outliers
CN113080971A (en) * 2021-04-12 2021-07-09 北京交通大学 Method and system for judging fatigue state by detecting blink signals
CN114288520A (en) * 2021-12-31 2022-04-08 广州酷狗计算机科技有限公司 Sleep assisting method, device, equipment and storage medium based on brain waves
CN114631808A (en) * 2022-03-16 2022-06-17 苏州科医世凯半导体技术有限责任公司 Object monitoring method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5649061A (en) * 1995-05-11 1997-07-15 The United States Of America As Represented By The Secretary Of The Army Device and method for estimating a mental decision
JPH10155759A (en) * 1996-11-28 1998-06-16 Kanazawa Kogyo Univ Magnetism measuring apparatus and cryogenic container
JP2011133548A (en) * 2009-12-22 2011-07-07 Toyota Motor Corp Visual field-specifying device and display position-adjusting device
CN102133099A (en) * 2011-01-27 2011-07-27 中国医学科学院生物医学工程研究所 Device and method for estimating discomfort in watching 3D images by bioelectricity
WO2011105000A1 (en) * 2010-02-25 2011-09-01 パナソニック株式会社 Brain wave interface system, brain wave interface provision device, execution method of brain wave interface, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5649061A (en) * 1995-05-11 1997-07-15 The United States Of America As Represented By The Secretary Of The Army Device and method for estimating a mental decision
JPH10155759A (en) * 1996-11-28 1998-06-16 Kanazawa Kogyo Univ Magnetism measuring apparatus and cryogenic container
JP2011133548A (en) * 2009-12-22 2011-07-07 Toyota Motor Corp Visual field-specifying device and display position-adjusting device
WO2011105000A1 (en) * 2010-02-25 2011-09-01 パナソニック株式会社 Brain wave interface system, brain wave interface provision device, execution method of brain wave interface, and program
CN102133099A (en) * 2011-01-27 2011-07-27 中国医学科学院生物医学工程研究所 Device and method for estimating discomfort in watching 3D images by bioelectricity

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范郑丽: "《眨眼条件反射过程中PFC事件相关电位变化即860MHz电磁辐射对其影响》", 《第三军医大学硕士学位论文》, 31 December 2010 (2010-12-31), pages 29 - 50 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105011951A (en) * 2014-04-24 2015-11-04 闽南师范大学 Device for extracting eye blinking times by brain waves and method
CN105988569A (en) * 2015-02-13 2016-10-05 北京智谷睿拓技术服务有限公司 Method and device for determining control information
CN107440714A (en) * 2017-09-07 2017-12-08 哈尔滨理工大学 A kind of focus and blink action extraction element and method
CN107582051A (en) * 2017-10-12 2018-01-16 公安部南昌警犬基地 A kind of animal mood brain electricity analytical equipment
CN107714038A (en) * 2017-10-12 2018-02-23 北京翼石科技有限公司 The feature extracting method and device of a kind of EEG signals
CN108245154A (en) * 2018-01-24 2018-07-06 福州大学 The method that blink section in brain electricity or eye electricity is accurately determined using rejecting outliers
CN108245154B (en) * 2018-01-24 2020-10-09 福州大学 A method to accurately determine the blink interval in EEG or OOG using outlier detection
CN113080971A (en) * 2021-04-12 2021-07-09 北京交通大学 Method and system for judging fatigue state by detecting blink signals
CN114288520A (en) * 2021-12-31 2022-04-08 广州酷狗计算机科技有限公司 Sleep assisting method, device, equipment and storage medium based on brain waves
CN114631808A (en) * 2022-03-16 2022-06-17 苏州科医世凯半导体技术有限责任公司 Object monitoring method and device, electronic equipment and storage medium
CN114631808B (en) * 2022-03-16 2025-06-13 苏州科医世凯半导体技术有限责任公司 Object monitoring method, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN103584856B (en) 2015-09-30

Similar Documents

Publication Publication Date Title
CN103584856B (en) A kind of method by process brain wave identification dynamics nictation
WO2021143353A1 (en) Gesture information processing method and apparatus, electronic device, and storage medium
CN111407315B (en) A quality assessment method for ultrasound Doppler fetal heart signal
CN106963369B (en) Electroencephalogram relaxation degree identification method and device based on neural network model
CN105022486B (en) EEG signals discrimination method based on the driving of different expressions
CN110123314A (en) Judge that brain is absorbed in the method for relaxation state based on EEG signals
US11971319B2 (en) Surface electromyography signal-torque matching method based on multi-segmentation parallel CNN model
CN114861835B (en) Noise hearing loss prediction system based on asymmetric convolution
CN101987017A (en) Electroencephalo-graph (EEG) signal identification and detection method for measuring alertness of driver
CN106128032A (en) A kind of fatigue state monitoring and method for early warning and system thereof
CN104706349A (en) Electrocardiosignal construction method based on pulse wave signals
CN108680245A (en) Whale globefish class Click classes are called and traditional Sonar Signal sorting technique and device
CN106108893A (en) Based on eye electricity, the Mental imagery training Design of man-machine Conversation method of brain electricity
CN105303771B (en) A kind of Fatigue Evaluating System and method
CN103617421A (en) Fatigue detecting method and system based on comprehensive video feature analysis
CN102982347B (en) Method for electric energy quality disturbance classification based on KL distance
CN106923824B (en) Electroencephalogram relaxation degree identification method and device based on multi-space signal characteristics
CN107007290B (en) EEG relaxation recognition method and device based on time domain and phase space
CN107518896B (en) A kind of myoelectricity armlet wearing position prediction technique and system
CN109875583A (en) A system and method for fatigue driving detection based on AR technology
CN104545906A (en) Facial paralysis patient acupuncture treatment effect detection visual system and method based on surface myoelectricity
CN106491129A (en) A kind of Human bodys' response system and method based on EOG
CN107392153A (en) Human-body fatigue degree decision method
Donovan et al. Simple space-domain features for low-resolution sEMG pattern recognition
CN105982643A (en) Sleep event detection method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant