Summary of the invention
Technical problem to be solved by this invention is that a kind of neural discharge signal peak shape recognition methods that can realize the correct identification of positive negative peak pulse, posivtive spike pulse and negative peak pulse three class neuron discharge pulse peak shapes is provided.
The technical solution adopted in the present invention is: a kind of positive and negative peak shape recognition methods of neural discharge signal, comprised as the next stage:
(1) to actual observation to neural discharge signal x adopt following formula to carry out adaptive threshold detection computations:
In formula, T is threshold value, and e is error, and N is number of data points, is Var(e) variance of error,
x is the neural discharge signal that actual observation is arrived, comprises real neuron discharge signal s and measures noise w, and x=s+w,
it is the neuron discharge signal that adaptive threshold detection algorithm detects.
(2) detect the neuron discharge pulse in neural discharge signal sequence, comprise the steps:
1) by the neuron discharge pulse optimal threshold T obtaining, be set as respectively positive and negative two threshold value T
1and T
2, that is, and T
1=T, T
2=-T;
2) according to neuron discharge pulse feature, the rectangle time window that window width is 2.8ms is set;
3) calculate the positive maximum x of signal in window
1with negative minima x
2, i.e. positive peak value x
1with negative peak value x
2;
4) judge whether positive and negative peak value reaches the positive and negative threshold value of neuron discharge pulse, determine positive negative peak pulse, posivtive spike pulse and negative peak pulse three class neuron discharge pulses;
5) record time point corresponding to three class neuron discharge pulse peak values in neural discharge signal sequence,
For positive negative peak pulse, pulse positive peak and time point corresponding to negative peak are all recorded, for posivtive spike pulse, only time point corresponding to pulse positive peak need be recorded, for negative peak pulse, time point corresponding to pulse negative peak need be recorded.
(3) extract the neuron discharge pulse in neural discharge signal sequence, comprise the steps:
1) time point that the positive peak that basis is recorded and negative peak are corresponding and the feature of neuron discharge pulse peak shape are determined three concrete rectangle time window sequences;
2) use three rectangle time window sequences obtained above, respectively original neural discharge signal sequence is searched for, can extract positive negative peak pulse, posivtive spike pulse and negative peak pulse three class neuron discharge pulses, realize the identification of three class neuron discharge pulse peak shapes.
Adaptive threshold detection computations described in stage (1) comprises: by actual observation to the neural discharge signal x stack regarding true neuron discharge signal s as and measure noise w, i.e. x=s+w; Calculate the neural discharge signal x that actual observation arrives and average and the variance of measuring noise w, i.e. E (x)=E (s)=S, Var (x)=σ
2, E (w)=0, Var (w)=σ
0 2; According to the variances sigma of noise
0estimate threshold value T ', as initial threshold; According to this initial threshold T ', detect initial neuron discharge signal
the error of the neural discharge signal that the neuron discharge signal that calculating detects and actual observation are arrived,
utilize formula
according to signal errors e, automatically adjust threshold value T, constantly cycle detection obtains neuron discharge signal
make the neuron discharge signal detecting
approaching to reality neuron discharge signal s successively.
Described in stage (2) according to neuron discharge pulse feature, window width to be set be that the rectangle time window of 2.8ms comprises: in order to detect and extract complete neuron Discharge pulse waveform, the present invention adopts rectangle time window to extract neuron discharge pulse, designed rectangle time window should all be included in a complete neuron discharge pulse in time window, guarantees again the alignment of neuron Discharge pulse waveform.By analysis, find, people's an about 2ms of complete neural discharge cycle, in order to guarantee integrity and the alignment of neuron discharge pulse, the present invention has designed the rectangle time window that window width is 2.8ms, and (sample rate of take is that the neural discharge signal data of 25000Hz is example, the window width of rectangle time window is 70 data points), for realizing detection and the extraction of neuron discharge pulse complete waveform.
The positive and negative threshold value whether positive and negative peak value reaches neuron discharge pulse that judges described in stage (2) comprises: if x
1>T
1and x
2<T
2, the positive and negative peak value of this discharge pulse reaches respectively positive and negative threshold value, is positive negative peak pulse; If x
1>T
1and x
2>T
2, this discharge pulse only positive peak reach positive threshold value, be posivtive spike pulse; If x
1<T
1and x
2<T
2, this discharge pulse only negative peak reach negative threshold value, be negative peak pulse; If x
1<T
1and x
1>T
2, the positive negative peak of this signal does not reach respectively positive and negative threshold value, does not count neuron discharge pulse.
Time point corresponding to three class neuron discharge pulse peak values in neural discharge signal sequence of recording described in stage (2) comprises:
For positive negative peak pulse, pulse positive peak and time point corresponding to negative peak all need be recorded, be designated as P
1,
P
1(2n-1)=t
1(2n-1), wherein
n=1,2 ... N
1
P
1(2n)=t
1(2n), wherein
n=1,2 ... N
1;
For posivtive spike pulse, time point corresponding to pulse positive peak need be recorded, be designated as P
2,
P
2(n)=t
2(n), wherein
n=1,2 ... N
2;
For negative peak pulse, time point corresponding to pulse negative peak need be recorded, be designated as P
3
P
3(n)=t
3(n), wherein
n=1,2 ... N
3.
The concrete rectangle time window sequence of described in stage (3) three is:
For positive negative peak pulse, at P
1in matrix, find out the time point t that positive peak value is corresponding
1(2n-1), n=1 wherein, 2 ... N
1, take this time point as datum mark, expand 18 points left, expand 51 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, positive negative peak pulse rectangle time window sequence, is designated as q
1(n); For posivtive spike pulse, at P
2in matrix, find out the time point t that positive peak value is corresponding
2(n), n=1 wherein, 2 ... N
2, take this time point as datum mark, expand 20 points left, expand 49 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, i.e. posivtive spike pulse rectangle time window sequence, is designated as q
2(n); For negative peak pulse, at P
3in matrix, find out the time point t that negative peak value is corresponding
3(n), n=1 wherein, 2 ... N
3, take this time point as datum mark, expand 40 points left, expand 29 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, i.e. negative peak pulse rectangle time window sequence, is designated as q
3(n).
The positive and negative peak shape recognition methods of neural discharge signal of the present invention, new neural discharge signal pulse peak shape recognition methods is provided, can realize from actual observation to neural discharge signal detect and extract positive negative peak pulse, posivtive spike pulse and negative peak pulse three class neuron discharge pulses, method is simple, classification effectively; The three class neuron discharge pulses that extract all have larger meaning in the research of neural discharge signal characteristic under analyzing autonomous state and the neural discharge signal intensity that caused by environmental stimuli, can add up respectively discharge frequency and the electric discharge peak to peak separation of different peak shape neuron discharge pulses, analyze respectively the discharge scenario of different peak shape neuron discharge pulses; Can obtain considerable Social benefit and economic benefit.
The specific embodiment
Below in conjunction with embodiment and accompanying drawing, the positive and negative peak shape recognition methods of neural discharge signal of the present invention is described in detail.
Purport of the present invention is to propose a kind of new neural discharge signal pulse peak shape recognition methods, by adaptive threshold detection algorithm, calculate the threshold value of neuron discharge pulse, and according to the situation whether positive and negative peak value of neural discharge signal reaches the positive and negative threshold value of neuron discharge pulse, realize the detection of neuron discharge pulse, the rectangle time window that certain window width is set extracts complete neuron discharge pulse.The present invention has realized the detection and Identification of different neuron discharge pulse peak shapes, the analysis of the neural discharge signal intensity that can be used for neural discharge signal characteristic under autonomous state and caused by environmental stimuli all has important meaning in scientific research and actual clinical.Optimum implementation intends adopting patent transfer, technological cooperation or product development.
The present invention is divided three classes according to the feature of neuron discharge pulse peak shape: positive negative peak pulse, posivtive spike pulse and negative peak pulse, method is simple, classification is accurate, is a kind of brand-new neural discharge signal pulse peak shape recognition methods.
As shown in Figure 1, the positive and negative peak shape recognition methods of neural discharge signal of the present invention, first adopts adaptive threshold detection algorithm to calculate the threshold value T of neuron discharge pulse; Then positive and negative two threshold value T are set respectively
1and T
2, that is, and T
1=T, T
2=-T, and the rectangle time window that window width is 2.8ms is set, calculates the positive maximum of the neural discharge signal in window and negative minima, i.e. positive and negative peak value, and the situation that whether reaches positive and negative threshold value according to positive and negative peak value detects neuron discharge pulse; Finally, according to neuron discharge pulse peak shape feature, three rectangle time window sequences are set, detected neuron discharge pulse is extracted, obtain complete neuron Discharge pulse waveform.Specifically comprise as the next stage:
(1) to actual observation to neural discharge signal adopt following formula to carry out adaptive threshold detection computations:
In formula, T is threshold value, and e is error, and N is number of data points, is Var(e) variance of error,
x is the neural discharge signal that actual observation is arrived, comprises real neuron discharge signal s and measures noise w, and x=s+w,
it is the neuron discharge signal that adaptive threshold detection algorithm detects.
Described adaptive threshold detection computations flow process is: by actual observation to the neural discharge signal x stack regarding true neuron discharge signal s as and measure noise w, i.e. x=s+w; Calculate the neural discharge signal x that actual observation arrives and average and the variance of measuring noise w, i.e. E (x)=E (s)=S, Var (x)=σ
2, E (w)=0, Var (w)=σ
0 2; According to the variances sigma of noise
0estimate threshold value T ', as initial threshold,
according to this initial threshold T ', detect initial neuron discharge signal
the error of the neural discharge signal that the neuron discharge signal that calculating detects and actual observation are arrived,
utilize formula
according to signal errors e, automatically adjust threshold value T, constantly cycle detection obtains neuron discharge signal
make the neuron discharge signal detecting
the neuron discharge signal s of approaching to reality successively.
When adaptive algorithm constantly converts threshold test discharge pulse, must there is a cost function as detection criteria, for judging when the threshold value obtaining is optimal threshold.In the situation that there is no actual noise statistics knowledge, adopt the rate of change of error variance, be that Var (e) rate of change is as the interpretational criteria of optimal threshold, when detecting to a certain degree, Var (e) changes very little or constant, therefore when Var (e) variation is less than a certain numerical value, stops detecting.When circulation is ended, just obtained optimal threshold T.
The derivation process of above-mentioned formula (7) is as follows:
By actual observation to neural discharge signal be designated as x, wherein real neuron discharge signal is s, measurement noise is w, the model of signal is:
x[t]=s[t]+w[t]t=1,2…,N (1)
Actual observation to neural discharge signal x and characteristic mean and the variance of measuring noise w be respectively:
E(x)=E(s)=S Var(x)=σ
2 (2)
E(w)=0Var(w)=σ
0 2 (3)
Wherein, σ ≠ σ
0, the mean square deviation of signal is different with the mean square deviation of noise.In signal, pulse is more sparse, and the two is more approaching, in order to detect as far as possible exactly discharge pulse, according to the variance definite threshold T ' of noise.For the neural discharge signal that has N data point, noise is that white noise and standard variance are σ
0time, conventionally adopt following formula calculated threshold T ', that is:
Without any signal and noise priori in the situation that, in order to isolate neuron discharge pulse without supervising the neural discharge signal from record, the present invention adopts the adaptive algorithm based on signal errors to calculate the threshold value of neuron discharge pulse, and concrete threshold detection algorithm as shown in Figure 2.
Using T ' as initial threshold, detect neuron discharge signal
The error of the neural discharge signal that the neuron discharge signal that calculating detects and actual observation are arrived:
According to signal errors, automatically adjust threshold value T, constantly cycle detection obtains neuron discharge signal
make
successively approach neuron discharge signal s.The algorithm that adaptive threshold adopts is:
(2) detect the neuron discharge pulse in neural discharge signal sequence, comprise the steps:
1) by the neuron discharge pulse optimal threshold T obtaining, be set as respectively positive and negative two threshold value T
1and T
2, that is, and T
1=T, T
2=-T;
2) the rectangle time window of certain window width is set according to neuron discharge pulse feature, in order to detect and extract complete neuron Discharge pulse waveform, the present invention adopts rectangle time window to extract neuron discharge pulse, designed rectangle time window should all be included in a complete neuron discharge pulse in time window, guarantees again the alignment of neuron Discharge pulse waveform.By analysis, find, people's an about 2ms of complete neural discharge cycle, in order to guarantee integrity and the alignment of neuron discharge pulse, the present invention has designed the rectangle time window that window width is 2.8ms, and (sample rate of take is that the neural discharge signal data of 25000Hz is example, the window width of rectangle time window is 70 data points), for realizing detection and the extraction of neuron discharge pulse complete waveform;
3) calculate the positive maximum x of neural discharge signal in window
1with negative minima x
2, i.e. positive peak value x
1with negative peak value x
2;
4) judge whether positive and negative peak value reaches the positive and negative threshold value of neuron discharge pulse, determine three class neuron discharge pulses, if x
1>T
1and x
2<T
2, the positive and negative peak value of this discharge pulse reaches respectively positive and negative threshold value, is positive negative peak pulse; If x
1>T
1and x
2>T
2, this discharge pulse only positive peak reach positive threshold value, be posivtive spike pulse; If x
1<T
1and x
2<T
2, this discharge pulse only negative peak reach negative threshold value, be negative peak pulse; If x
1<T
1and x
2>T
2, the positive negative peak of this signal does not reach respectively positive and negative threshold value, does not count neuron discharge pulse,
Pulse detection flow chart as shown in Figure 3;
5) in the process detecting at neuron discharge pulse, need to record the corresponding time point of peak value of pulse, for positive negative peak pulse, need record positive peak value and negative time point corresponding to peak value, for posivtive spike pulse, need record the time point that positive peak value is corresponding, for negative peak pulse, need record the time point that negative peak value is corresponding.
If have N in a neural discharge signal sequence
1individual positive negative peak impulse waveform, the time point that the positive and negative peak value of pulse is corresponding is kept at matrix P
1in:
P
1(2n-1)=t
1(2n-1), wherein
n=1,2 ... N
1(8)
P
1(2n)=t
1(2n), wherein
n=1,2 ... N
1(9)
If have N in a neural discharge signal sequence
2individual posivtive spike impulse waveform, the time point that pulse positive peak is corresponding is kept at matrix P
2in:
P
2(n)=t
2(n), wherein
n=1,2 ... N
2(10)
If have N in a neural discharge signal sequence
3individual negative peak impulse waveform, the time point that pulse negative peak is corresponding is kept at matrix P
3in:
P
3(n)=t
3(n), wherein
n=1,2 ... N
3(11)
(3) extract the neuron discharge pulse in neural discharge signal, comprise the steps:
1) time point that the positive peak that basis is recorded and negative peak are corresponding and the feature of neuron discharge pulse peak shape are determined three concrete rectangle time window sequences,
When neural discharge signal sequence being carried out to the extraction of neuron discharge pulse, should, by time point alignment corresponding to same class neuron discharge pulse peak value, guarantee the alignment of impulse waveform integral body.For positive negative peak pulse, due to time point corresponding to posivtive spike and time point interval corresponding to negative peak more stable, so with the corresponding time point alignment waveform of positive peak value and little with the corresponding time point alignment of the peak value waveform effect difference of bearing, all can be used as the datum mark of waveform alignment, the present invention adopts time point that positive peak value is corresponding as the datum mark of neuron Discharge pulse waveform alignment; For posivtive spike pulse, the corresponding time point of the peak value of Zhi Xudui Strategy Software Systems Co., Ltd (SSS); For negative peak pulse, need the corresponding time point of peak value of aligned negative.
About determining of rectangle time window, determining of rectangle time window window width is identical with rectangle time window window method for determining width in the stage (2), after having determined the window width of rectangle time window, should determine concrete rectangle time window according to the feature of neuron discharge pulse peak shape.For positive negative peak pulse, at P
1in matrix, find out the time point t that positive peak value is corresponding
1(2n-1), n=1 wherein, 2 ... N
1, take this time point as datum mark, expand 18 points left, expand 51 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, positive negative peak pulse rectangle time window sequence, is designated as q
1(n); For posivtive spike pulse, at P
2in matrix, find out the time point t that positive peak value is corresponding
2(n), n=1 wherein, 2 ... N
2, take this time point as datum mark, expand 20 points left, expand 49 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, i.e. posivtive spike pulse rectangle time window sequence, is designated as q
2(n); For negative peak pulse, at P
3in matrix, find out the time point t that negative peak value is corresponding
3(n), n=1 wherein, 2 ... N
3, take this time point as datum mark, expand 40 points left, expand 29 points to the right, obtain the rectangle time window sequence that a window length is 70 data points, i.e. negative peak pulse rectangle time window sequence, is designated as q
3(n).
2) concrete DISCHARGE PULSES EXTRACTION process is: use three rectangle time window sequences obtained above, respectively original neural discharge signal sequence is searched for, can obtain positive negative peak pulse, posivtive spike pulse and negative peak pulse three class discharge pulses, realize the identification of three class neuron discharge pulse peak shapes.
The rat neck vagal discharge signal of take is example, the signal that intercepting time span is 1s, use the neuron discharge pulse peak shape that the present invention proposes to detect and recognition methods, extract positive negative peak pulse, posivtive spike pulse and negative peak pulse three class neuron Discharge pulse waveforms in neural discharge signal sequence, as shown in Figure 4.