CN113693605A - Method, device and medium for removing stimulation artifact of neural signal in real time - Google Patents

Method, device and medium for removing stimulation artifact of neural signal in real time Download PDF

Info

Publication number
CN113693605A
CN113693605A CN202111030359.XA CN202111030359A CN113693605A CN 113693605 A CN113693605 A CN 113693605A CN 202111030359 A CN202111030359 A CN 202111030359A CN 113693605 A CN113693605 A CN 113693605A
Authority
CN
China
Prior art keywords
artifact
stimulation
neural
digital signal
interval
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
CN202111030359.XA
Other languages
Chinese (zh)
Other versions
CN113693605B (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.)
Fudan University
Original Assignee
Fudan University
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 Fudan University filed Critical Fudan University
Priority to CN202111030359.XA priority Critical patent/CN113693605B/en
Publication of CN113693605A publication Critical patent/CN113693605A/en
Application granted granted Critical
Publication of CN113693605B publication Critical patent/CN113693605B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N1/00Electrotherapy; Circuits therefor
    • A61N1/18Applying electric currents by contact electrodes
    • A61N1/32Applying electric currents by contact electrodes alternating or intermittent currents
    • A61N1/36Applying electric currents by contact electrodes alternating or intermittent currents for stimulation
    • A61N1/3605Implantable neurostimulators for stimulating central or peripheral nerve system

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Veterinary Medicine (AREA)
  • Public Health (AREA)
  • General Health & Medical Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Surgery (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Pathology (AREA)
  • Biophysics (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Psychiatry (AREA)
  • Neurology (AREA)
  • Neurosurgery (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Psychology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Electrotherapy Devices (AREA)

Abstract

The invention discloses a method, a device and a medium for removing stimulation artifacts in real time by neural signals, wherein the method comprises the following steps: s1, acquiring a neural digital signal; s2, obtaining the duration of the stimulation artifact; s3, detecting a peak value of the neural digital signal to obtain a first artifact interval where a current peak value is located, and predicting a second artifact interval where a next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval; s4, judging whether the current sampling time is in the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the current artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point. The method for removing the stimulation artifact in real time of the neural signal can remove the stimulation artifact in real time and obtain a more accurate neural signal.

Description

Method, device and medium for removing stimulation artifact of neural signal in real time
Technical Field
The invention relates to the technical field of electrical stimulation, in particular to a method for removing stimulation artifacts in real time by neural signals, a device for removing the stimulation artifacts in real time by the neural signals and a computer-readable storage medium.
Background
Deep Brain Stimulation (DBS), also known as Deep Brain Stimulation, has been clinically applied to surgical treatment of a variety of diseases and has shown its effectiveness in long-term follow-up records. During deep brain stimulation, neural signals recorded by various sensors provide important research data for the research of the mechanism of diseases. The neural signal may be, for example, a field potential signal, an electroencephalogram signal, a single neuron signal, or a dopamine concentration signal, and since the stimulation signal has a large amplitude, stimulation artifacts are easily generated in the neural signal recorded by the sensor.
Taking a field Potential signal (LFP) as an example, the field Potential signal recorded by the DBS electrode is essentially a very weak Potential change caused by Local neural activity, and the amplitude thereof is usually below 50 μ V, while the DBS uses square wave pulse stimulation with the amplitude between 1 to 5V, and the stimulation amplitude is much larger than the amplitude of the Local field Potential, so in the research related to DBS, the processing of stimulation artifact has been a key and challenging task, especially in the closed loop DBS research which has attracted much attention in recent years, the stimulation artifact is required to be removed in real time in the field Potential signal recorded simultaneously with stimulation.
The existing artifact removal schemes can be divided into hardware and software.
In the hardware solution, the common-mode rejection characteristic of a differential amplifier and a filter combination are utilized to remove stimulation artifacts, and the method only aims at the condition that the stimulation frequency and the interesting frequency band are not overlapped; it is also proposed to use the sampling time of an Analog to Digital Converter (ADC) for synchronous control of a clock and a stimulation circuit to sample at a location without stimulation, but this method has a high requirement for hardware circuitry, and the filter of a commonly used DBS stimulation device cannot achieve its accuracy.
The method of detecting and filtering the artifact peak value in the frequency domain is a direct method in the aspect of software, and may affect the phase of a signal, and dispersed components near the stimulation frequency cannot be well removed. It is difficult to apply in real-time processing. Firstly, averaging all artifact sections to obtain a uniform artifact template and then removing the artifact template; and then, a method based on a weighted sliding window is developed, and the artifact template is estimated aiming at each artifact segment so as to adapt to the change of the artifact. When a signal containing stimulation artifacts is observed, a periodic change of an artifact peak value is found, particularly when the sampling frequency is low, and aiming at the problem, the method also comprises an artifact template reconstruction method, namely, the artifact template is obtained by carrying out overlapping average on data with high sampling rate, and then the artifact template is subjected to down-sampling. The core factor of the template subtraction algorithm is the correct estimation of the artifact template, and the estimation deviation of the template can cause the unclean artifact removal or even introduce new noise. Therefore, although the template subtraction (template subtraction) method has potential for use in real-time processing, it is less robust to noise due to inaccuracies in the reconstructed signal.
Accordingly, there is a need for improvements in the art that overcome the deficiencies in the prior art.
Disclosure of Invention
The invention aims to provide a method for removing stimulation artifacts in real time by using neural signals, a device for removing the stimulation artifacts in real time by using the neural signals and a computer-readable storage medium, which can remove the stimulation artifacts in real time and obtain more accurate neural signals.
In order to achieve the above object, in a first aspect, the present invention provides a method for removing stimulation artifacts in real time by neural signals, including the following steps:
s1, acquiring a neural digital signal;
s2, obtaining the duration of the stimulation artifact;
s3, detecting a peak value of the neural digital signal, obtaining a first artifact interval where a current peak value is located according to a peak value time point of the peak value and a period of a stimulation signal, and predicting a second artifact interval where a next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval;
s4, judging whether the current sampling time is in the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the current artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
Further, the step S2 includes the following steps: dividing the neural digital signal into a plurality of regions according to a preset period, wherein each region covers at least one stimulation artifact waveform, and determining the duration of the stimulation artifact based on the neural digital signal in the plurality of regions.
Further, in step S2, a stimulation artifact waveform template is obtained based on the neural digital signals in the plurality of regions, and then the duration of the stimulation artifact is determined according to the time when the stimulation artifact signals in the stimulation artifact waveform template return to the artifact-free signal range.
Further, each of the regions includes a plurality of neural digital signal values arranged in order, and the stimulation artifact waveform template is obtained by sequentially averaging the neural digital signal values in the plurality of regions.
Further, the preset period is a stimulation signal period, and each region covers one stimulation artifact waveform.
Further, the start point and the end point of the region are set before and after a peak time point of a peak of the stimulation artifact waveform, respectively.
Further, in step S3, the step of detecting the peak value of the neural digital signal includes the steps of: and comparing the obtained neural digital signal value with a preset threshold value, and taking the neural digital signal value as a peak value when the neural digital signal value reaches the preset threshold value.
Further, in step S4, the irregular sampling point is a first point departing from the current artifact interval, or the irregular sampling point is a point departing from the current artifact interval for a preset time.
Further, in step S4, the neural digital signal value of the sampling point before the current artifact interval is the neural digital signal value of the last sampling point in the current artifact interval.
Further, in step S4, before determining whether the current sampling time is within the non-artifact interval, the method further includes the following steps: judging whether the current time is sampling time, if so, judging whether the current sampling time is in the non-artifact interval; if not, waiting for the time to reach the sampling time.
Further, in step S4, the neural digital signal value of the current sampling point is obtained by interpolating according to the neural digital signal values of the sampling points before the current artifact interval and the neural digital signal values of the irregular sampling points.
Further, the step S1 includes the following steps:
applying a stimulation signal with a preset frequency, recording a nerve signal in the stimulation process, and converting the nerve into a nerve digital signal.
In a second aspect, the present invention provides an apparatus for removing stimulation artifacts in real time by neural signals, including:
the acquisition module is used for acquiring the neural digital signal;
the processing module is used for obtaining the duration of the stimulation artifact, detecting the peak value of the neural digital signal acquired by the acquisition module, obtaining a first artifact interval where the current peak value is located according to the peak value time point of the peak value and the period of the stimulation signal, and predicting a second artifact interval where the next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval;
the processing module is further used for judging whether the current sampling time is within the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the first artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
In a third aspect, the present invention provides a computer-readable storage medium for storing computer-executable instructions, which when loaded and executed by a computer, implement a method for removing stimulation artifacts in real time by neural signals as described in any one of the above.
Compared with the prior art, the invention has the following beneficial effects:
1. the method obtains the artifact interval and the non-artifact interval according to the duration of the stimulation artifact, so that the position of a sampling point can be judged, the sampling is carried out in the non-artifact interval in a normal mode, the neural digital signal value of the sampling point is obtained in the artifact interval through methods such as interpolation, the stimulation artifact signal is removed in real time, the collected data is more accurate, the distortion degree is small, the method only needs to obtain the duration of the stimulation artifact, the artifact waveform does not need to be estimated, and the inaccuracy of estimation of the artifact waveform is avoided; in addition, the signal acquisition method can realize irregular sampling on software, and can be used for a real-time acquisition and processing system to remove electrical stimulation artifacts, so that more accurate neural signals such as field potential signals and the like are obtained.
2. The three-channel microelectrode can record the field potential signal while applying the stimulation signal, solves the problem of real-time signal sampling in a closed-loop deep brain stimulation system, and has more accurate recording result.
3. The method can remove the stimulation artifact generated by the stimulation signal aiming at the transformation parameters, is not limited by the shape and frequency of the stimulation signal, has high robustness on the stimulation waveform and the stimulation frequency, is suitable for different experimental individuals and the change of the stimulation strategy, and is more suitable for general conditions.
Drawings
FIG. 1 is a schematic view of the structure of a three-channel microelectrode according to the present invention.
FIG. 2 is a schematic diagram of a sample of a neural digital signal in the present invention.
Figure 3 is a schematic representation of the waveform of the stimulation artifact of the present invention.
FIG. 4 is a block diagram of an apparatus for removing stimulation artifacts in real time from neural signals in the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "comprising" and "having," as well as any variations thereof, in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The method for removing the stimulation artifact in real time of the neural signal, which corresponds to a preferred embodiment of the invention, comprises the following steps:
s1, acquiring a neural digital signal;
s2, obtaining the duration of the stimulation artifact;
s3, detecting the peak value of the neural digital signal, obtaining a first artifact interval T0 where the current peak value is located according to the peak value time point of the peak value and the period T of the stimulation signal, predicting a second artifact interval T1 where the next peak value is located and a non-artifact interval T2 located between the first artifact interval T0 and the second artifact interval T1;
s4, judging whether the current sampling point is in a non-artifact interval T2, if so, sampling the neural digital signal according to a preset sampling frequency; and if not, sampling the neural digital signal value of the irregular sampling point after the current artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
The neural signal may be, for example, a field potential signal, an electroencephalogram signal, a single neuron signal, a dopamine concentration signal, and the like, and in this embodiment, the present invention is described by taking the neural signal as the field potential signal, and it should be understood that the neural signal is not limited to the field potential signal.
As a preferred embodiment, step S1 includes the following steps: applying a stimulation signal with a preset frequency, recording a nerve signal in a stimulation process, and converting the nerve signal into a nerve digital signal. When the collected signal is a field potential signal, the neural signal is a local field potential signal (LFP), and the neural digital signal is a field potential digital signal.
It can be understood that the method for removing stimulation artifacts in real time by neural signals can be realized by deep brain stimulation hardware equipment, the preset frequency of the stimulation signals is calculated by a strategy set by an equipment system and is transmitted to a processor as a known parameter, and then the processor gives a stimulation instruction according to the frequency.
Neural signals can be collected by adopting various sensors, and the types of the sensors are different for different types of neural signals. The field potential signal can be collected by using DBS electrode or micro electrode. As a preferred embodiment, the present invention applies a stimulation signal using a three-channel microelectrode 1 as shown in FIG. 1, and records a local field potential signal during stimulation, the three-channel microelectrode 1 comprising a signal application contact 10 in the middle and two recording contacts 11 on either side of the signal application contact 10. Wherein the signal-applying contacts 10 are used for applying a stimulating signal, a stimulating current is transmitted through the intermediate signal-applying contacts 10 and returns from a silver wire fixed to the skull bone 12, and a local field potential signal is recorded by the two recording contacts 11. Preferably, the two recording contacts 11 are spaced the same distance from the signal applying contact 10 to record data simultaneously.
In a preferred embodiment, the two recording contacts 11 record the field potential signals during stimulation differentially to improve signal accuracy, remove common error interference, and eliminate the influence of the intermediate stimulation signals.
It is understood that the field potential signal recorded by the recording contacts 11 is an analog signal which needs to be converted into a digital signal for transmission and processing, and the signal recorded by the recording contacts 11 has a large amount of noise including a dc signal component, a baseline trend and a low frequency noise, which causes a change in amplitude, so that the raw data obtained for the two recording contacts 11 from which the baseline drift is removed is first filtered by a high pass filter for noise and a dc component to obtain a filtered signal, and then the filtered signal is amplified by a two-stage amplifier, and then the field potential signal is converted into a field potential digital signal by an a/D converter.
Although, in theory, both recording contacts 11 will sense approximately the same signal, this can be suppressed by common mode rejection of the front-end amplifier. However, due to the complex electrical properties of the brain tissue and the unbalanced impedance of the two recording contacts 11, there are still spike-like artifacts (i.e. artifact waveforms) of several tens of millivolts in the recording of the local field potential signals. These sharp jagged artifacts contain very high frequency components, requiring a high sampling rate to capture, and insufficient sampling rate will result in aliasing effects.
As a preferred embodiment, in step S2, the step of obtaining the duration of the stimulation artifact comprises the steps of: dividing the neural digital signal into a plurality of regions according to a preset period, wherein each region covers at least one stimulation artifact waveform, and then determining the duration of the stimulation artifact based on the neural digital signal in the plurality of regions.
Preferably, in this embodiment, the preset period is a stimulation signal period T (the stimulation signal period T can be obtained by a stimulation signal frequency), that is, the neural digital signal is divided into a plurality of regions according to the stimulation signal period T, and each of the regions covers one stimulation artifact waveform.
Specifically, when the data value of the neural digital signal exceeds a preset threshold value, the neural digital signal value is taken as a peak, the time point is marked as a peak time point, and since the occurrence period of the artifact signal coincides with the stimulation signal, the time interval between two adjacent peak time points substantially coincides with the period of the stimulation signal. The threshold value may be, for example, a certain proportion of the highest value of the obtained neural digital signal, preferably, 75% of the highest value of the neural digital signal is used as a preset threshold value, the highest value of the neural digital signal may be the highest value of the neural digital signal obtained after the start of acquisition, or the highest value of the neural digital signal obtained within a period of time, and for some points with higher distortion, the points may be eliminated by an algorithm; of course, the threshold is not limited to a certain proportion of the highest value of the neural digital signal, for example, the threshold may also be a certain proportion of the average value of the highest points of the acquired plurality of stimulation artifact waveforms. All peak time points are recorded within one set of peak time points. The data of the whole neural digital signal is divided into a plurality of regions having the same time length, and the plurality of regions form a sequence of regions, in the embodiment, the time length of the regions is set according to the period of the stimulation signal, that is, the time length of the regions is the same as the period of the stimulation signal, for example, the data of the T0 time period is one region in fig. 2, and the data of the T2 time period is also one region. In other embodiments, the temporal length of the regions may be greater or less than the period of the stimulation signal, but preferably each encompasses a stimulation signal waveform in order to calculate the duration of the stimulation artifact.
As shown in fig. 3, the waveform of the stimulation artifact consists of two pulses connected together, namely a positive pulse and a negative pulse. Preferably, the pulse detection process is performed for the first pulse (positive pulse). In order to enable each area to cover the artifact waveform more completely, a time point which is before each peak time point and is a first time length away from each peak time point is taken as a 'starting' point of the area, and a time point which is after each peak time point and is a second time length away from each peak time point is taken as an 'ending' point, so that the stimulation artifact waveform can be covered in the area, and the starting point of the stimulation artifact waveform is closer to the starting point of the artifact waveform. The sum of the first time length and the second time length is the same as the period T of the stimulation signal, and the first time length and the second time length can be set as appropriate, and as a preferred embodiment, the first time length is 5% of the period T, and the second time length is 95% of the period T.
Further preferably, in step S2, a stimulation artifact waveform template is obtained based on the neural digital signals in the plurality of regions, and then the duration of the stimulation artifact is determined according to the time for the stimulation artifact signals in the stimulation artifact waveform template to return to the artifact-free signal range.
It can be understood that the neural digital signal in each region is composed of N data (N is more than or equal to 1), the data refers to the corresponding neural digital signal value, the number of the data is related to the sampling density when the analog signal is converted into the digital signal, and the N data are arranged in sequence according to the acquisition time. Assuming that the number of regions is M, the collection of region data can be transformed into an M x N matrix (M ≧ 1). Since each region is determined by the peak position and the same period, the data sequences are aligned by default. The stimulation artifact waveform template is obtained by averaging the matrix in columns, that is, data of a specific rank in the stimulation artifact waveform template is obtained by averaging data of the same rank in M regions, that is, the stimulation artifact waveform template is obtained by sequentially averaging the neural digital signal values in a plurality of regions. The stimulation artifact has a general waveform, so that the average duration of the stimulation artifact can be determined according to the time for restoring the signal in the stimulation artifact waveform template to the artifact-free signal range, and the average duration can be used as the duration of the stimulation artifact.
As a preferred embodiment, it can be determined whether the stimulation artifact signal returns to an artifact-free signal range by: acquiring a section of neural digital signals without applied stimulation signals, calculating the mean value and the variance of the section of neural digital signals according to the data of the section of neural digital signals, then taking the upper limit value of a 95% confidence interval according to the mean value and the variance, and when the neural digital signal value of the stimulation artifact signals is lower than the upper limit value of the 95% confidence interval, considering that the stimulation artifact signals are restored to the artifact-free signal range.
It is understood that, in step S2, the duration of the stimulation artifact may be obtained when the neural signal is acquired, for example, after a certain period of neural signal is acquired, the duration of the stimulation artifact may be obtained according to the neural signal, and then the neural digital signal may be sampled according to the duration of the stimulation artifact; the duration of the stimulation artifact can also be obtained according to the neural signal obtained when the same or similar stimulation signal is applied, and the duration of the stimulation artifact can be directly called when the neural signal is acquired.
In step S3, the detection of the peak value is consistent with the method described above, and is also performed by a threshold method, that is, the obtained neural digital signal value is compared with a preset threshold value, and when the neural digital signal value reaches the preset threshold value, the neural digital signal value is taken as the peak value. The preset threshold value is, for example, 75% of the highest value of the neural digital signal.
In a real-time system, a data sequence enters the system in a stream data format, and when the data value at the current time point reaches a threshold value, the current time point is marked as a peak time point. Thereafter, a first artifact interval T0 in which the current peak value is located may be obtained according to the duration of the stimulation artifact obtained in step S2, and a next peak time point and a second artifact interval T1 corresponding to the next peak value may be obtained according to the time period T of the stimulation signal, and a non-artifact interval T2 located therebetween may be obtained according to the first artifact interval T0 and the second artifact interval T1. It will be appreciated that the first and second artifact intervals T0, T1 are of the same temporal length as the duration of the stimulation artifact and their peak time points correspond to the position of the peak time points within the stimulation artifact waveform template, so that the duration of the stimulation artifact is more accurate.
The starting point of the first artifact interval T0 is preferably in an artifact-free signal range, so that the first artifact interval T0 can reliably cover the stimulation artifact waveform, and the accuracy of sampling points outside the stimulation artifact waveform is ensured. In a preferred embodiment, the starting point of the first artifact interval T0 is the same as the starting point of the area in which the artifact interval is located; in another preferred embodiment, it is also possible to use as a starting point a point in time which is a third time length before the peak point in time of the first artifact interval T0, which third time length can optionally be set, for example, to a proportion of the time length of the first artifact interval T0, which proportion can optionally be set.
It is understood that, in step S3, after the new peak value is detected, the first artifact interval T0, the second artifact interval T1 and the non-artifact interval T2 may be updated.
In step S4, the current artifact interval refers to an artifact interval at which the current sampling time is located, which may be the first artifact interval T0 or the second artifact interval T1.
Since the sampling frequency of the neural digital signal is preset, the sampling time of the next sampling point can be deduced according to the sampling time of the previous sampling point. Therefore, when the system receives data, whether the current time is the sampling time can be judged firstly, if so, whether the current sampling time is in the non-artifact interval is further judged, otherwise, the system continues to receive the data until the time reaches the sampling time.
As a preferred embodiment, the sampling frequency is fixed, i.e. the sampling points are arranged at equal intervals, and in fig. 2, the equally spaced sampling points are shown as circles.
According to the time of the current sampling point and the first artifact interval T0, the second artifact interval T1 and the non-artifact interval T2 obtained in step S3, it can be determined within which time range the current sampling point is located. If the sampling time is in the non-artifact interval T2, the sampling can be performed directly at the normal sampling frequency because no artifact signal exists in the time range. On the contrary, if the sampling time is within the artifact interval (the first artifact interval T0 or the second artifact interval T1), the sampling cannot be performed at the normal sampling frequency, otherwise the artifact signal is introduced. Therefore, as shown in fig. 2, an irregular sampling point 4 is set after the current artifact interval, the neural digital signal value of the current sampling point 3 is calculated through the neural digital signal value of the irregular sampling point 4 and the neural digital signal value of the last sampling point 2, the current sampling point 3 is an interpolation point, and preferably, the neural digital signal value of the current sampling point 3 is calculated through an interpolation method. The interpolation method may be, for example, cubic spline interpolation or linear interpolation.
As a preferred embodiment, the irregular sampling point is the first point to deviate from the current artifact interval. Of course, the irregular sampling point is not limited to this, and may be, for example, a point after a preset time is left from the current artifact interval, and even a normal sampling point located next in the non-artifact interval may be used as the irregular sampling point, and preferably, the irregular sampling point is collected before the first normal sampling point left from the current artifact interval (the normal sampling point refers to a sampling point collected at a predetermined collection frequency).
It will be appreciated that the first and second artifact intervals vary with time, for example, with reference to fig. 2, when the time is at time T0, the region corresponding to time T0 is the first artifact interval and the region corresponding to time T1 is the second artifact interval. As time progresses to the T1 period, the first and second artifact intervals are updated as new neural digital signal peaks are detected, the original second artifact interval transitioning to the first artifact interval. Further, the current artifact interval described in step S4 is typically the first artifact interval.
The invention also provides a device for removing stimulation artifacts in real time by using neural signals, and as shown in fig. 4, the acquisition device comprises an acquisition module 5 and a processing module 50 in communication connection with the acquisition module 5.
The acquisition module 5 is used for acquiring a neural digital signal; the acquisition module 5 may also have a conversion function, for example, it may acquire an analog amount of neural signals generated during stimulation and then convert the neural signals into neural digital signals.
The processing module 50 is configured to obtain a duration of the stimulation artifact, detect a peak value of the neural digital signal acquired by the acquisition module 5, obtain a first artifact interval in which a current peak value is located according to a peak value time point of the peak value and a period of the stimulation signal, and predict a second artifact interval in which a next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval.
The processing module 50 is further configured to determine whether the current sampling time is within the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the first artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
Preferably, the processing module 50 interpolates the neural digital signal values obtained from the last sampling point of the first artifact interval and the neural digital signal values of the irregular sampling points to obtain the neural digital signal value of the current sampling point.
The present invention also provides a computer-readable storage medium for storing computer-executable instructions (e.g., a computer program) which, when loaded and executed by a processor of a computer, implement the method for removing stimulation artifacts in real time by neural signals described above.
The invention has the following advantages:
1. the method obtains the artifact interval and the non-artifact interval according to the duration of the stimulation artifact, so that the position of a sampling point can be judged, the sampling is carried out in the non-artifact interval in a normal mode, the neural digital signal value of the sampling point is obtained in the artifact interval through methods such as interpolation, the stimulation artifact signal is removed in real time, the collected data is more accurate, the distortion degree is small, the method only needs to obtain the duration of the stimulation artifact, the artifact waveform does not need to be estimated, and the inaccuracy of estimation of the artifact waveform is avoided; in addition, the signal acquisition method can realize irregular sampling on software, and can be used for a real-time acquisition and processing system to remove electrical stimulation artifacts, so that more accurate neural signals such as field potential signals and the like are obtained.
2. The three-channel microelectrode can record the field potential signal while applying the stimulation signal, solves the problem of real-time signal sampling in a closed-loop deep brain stimulation system, and has more accurate recording result.
3. The method can remove the stimulation artifact generated by the stimulation signal aiming at the transformation parameters, is not limited by the shape and frequency of the stimulation signal, has high robustness on the stimulation waveform and the stimulation frequency, is suitable for different experimental individuals and the change of the stimulation strategy, and is more suitable for general conditions.
The above is only one embodiment of the present invention, and any other modifications based on the concept of the present invention are considered as the protection scope of the present invention.

Claims (14)

1. A method for removing stimulation artifacts in real time by neural signals is characterized by comprising the following steps:
s1, acquiring a neural digital signal;
s2, obtaining the duration of the stimulation artifact;
s3, detecting a peak value of the neural digital signal, obtaining a first artifact interval where a current peak value is located according to a peak value time point of the peak value and a period of a stimulation signal, and predicting a second artifact interval where a next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval;
s4, judging whether the current sampling time is in the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the current artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
2. The method for removing stimulation artifacts in real time according to claim 1, wherein the step S2 includes the steps of: dividing the neural digital signal into a plurality of regions according to a preset period, wherein each region covers at least one stimulation artifact waveform, and determining the duration of the stimulation artifact based on the neural digital signal in the plurality of regions.
3. The method for removing stimulation artifacts in real time according to neural signals of claim 2, wherein in step S2, a stimulation artifact waveform template is obtained based on neural digital signals in a plurality of regions, and then the duration of the stimulation artifacts is determined according to the time when the stimulation artifacts in the stimulation artifact waveform template are restored to an artifact-free signal range.
4. The method for removing stimulation artifacts in real time according to claim 3, wherein each of the regions comprises a plurality of neural digital signal values arranged in a sequence, and the stimulation artifact waveform template is obtained by sequentially averaging the neural digital signal values in the plurality of regions.
5. The method for removing stimulation artifacts in real time according to claim 2, wherein the predetermined period is a stimulation signal period, and each of the regions covers a stimulation artifact waveform.
6. The method for removing stimulation artifacts in real time according to claim 5, wherein the start point and the end point of the region are respectively set before and after a peak time point of a peak of the stimulation artifact waveform.
7. The method for removing stimulation artifacts in real time according to neural signals of any one of claims 1 to 6, wherein the step of detecting the peak of the neural digital signal in step S3 comprises the steps of: and comparing the obtained neural digital signal value with a preset threshold value, and taking the neural digital signal value as a peak value when the neural digital signal value reaches the preset threshold value.
8. The method for removing stimulation artifacts in real time according to any of claims 1 to 6, wherein the irregular sampling point is the first point departing from the current artifact interval in step S4, or the irregular sampling point is the point departing from the current artifact interval after a preset time.
9. The method for removing stimulation artifacts according to any of claims 1 to 6, wherein in step S4, the neural digital signal values of the sampling points before the current artifact interval are the neural digital signal values of the sampling points last to the current artifact interval.
10. The method for removing stimulation artifacts in real time according to neural signals of any one of claims 1 to 6, wherein before determining whether the current sampling time is within the non-artifact interval in step S4, the method further comprises the following steps: judging whether the current time is sampling time, if so, judging whether the current sampling time is in the non-artifact interval; if not, waiting for the time to reach the sampling time.
11. The method for removing stimulation artifacts according to any one of claims 1 to 6, wherein in step S4, the neural digital signal values at the current sampling point are interpolated according to the neural digital signal values at the sampling points before the current artifact interval and the neural digital signal values at the irregular sampling points.
12. The method for removing stimulation artifacts in real time according to neural signals of any one of claims 1 to 6, wherein the step S1 includes the steps of:
applying a stimulation signal with a preset frequency, recording a nerve signal in the stimulation process, and converting the nerve into a nerve digital signal.
13. An apparatus for removing stimulation artifacts in real time from neural signals, comprising:
the acquisition module is used for acquiring the neural digital signal;
the processing module is used for obtaining the duration of the stimulation artifact, detecting the peak value of the neural digital signal acquired by the acquisition module, obtaining a first artifact interval where the current peak value is located according to the peak value time point of the peak value and the period of the stimulation signal, and predicting a second artifact interval where the next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval;
the processing module is further used for judging whether the current sampling time is within the non-artifact interval; and if not, acquiring the neural digital signal value of the irregular sampling point after the first artifact interval, and calculating the neural digital signal value of the current sampling point according to the neural digital signal value of the sampling point before the current artifact interval and the neural digital signal value of the irregular sampling point.
14. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a computer, implement a method for removing stimulation artifacts in real time from neural signals as claimed in any one of claims 1 to 12.
CN202111030359.XA 2021-09-03 2021-09-03 Method, device and medium for removing stimulation artifact of neural signal in real time Active CN113693605B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111030359.XA CN113693605B (en) 2021-09-03 2021-09-03 Method, device and medium for removing stimulation artifact of neural signal in real time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111030359.XA CN113693605B (en) 2021-09-03 2021-09-03 Method, device and medium for removing stimulation artifact of neural signal in real time

Publications (2)

Publication Number Publication Date
CN113693605A true CN113693605A (en) 2021-11-26
CN113693605B CN113693605B (en) 2022-07-26

Family

ID=78658998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111030359.XA Active CN113693605B (en) 2021-09-03 2021-09-03 Method, device and medium for removing stimulation artifact of neural signal in real time

Country Status (1)

Country Link
CN (1) CN113693605B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116263A1 (en) * 2021-12-24 2023-06-29 南京邮电大学 Blinking and gnashing determination method and system based on electroencephalography

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100185257A1 (en) * 2007-04-26 2010-07-22 Intstitut National De La Sante Et De La Recherche Medical (Inserm) Method for filtering out artefacts of deep brain stimulation
CN101862189A (en) * 2010-06-13 2010-10-20 天津大学 Myoelectricity functional electric stimulation interference filtering method
CN102164537A (en) * 2008-09-17 2011-08-24 Med-El电气医疗器械有限公司 Stimulus artifact removal for neuronal recordings
US20150223710A1 (en) * 2014-02-07 2015-08-13 Medtronic, Inc. Devices and Methods for Sensing Physiological Signals During Stimulation Therapy
US20200129766A1 (en) * 2017-03-15 2020-04-30 The Regents Of The University Of California Removal of Stimulation Artifact in Multi-Channel Neural Recordings
WO2020146864A1 (en) * 2019-01-11 2020-07-16 University Of Houston System Systems and method providing a unified framework for de-noising neural signals

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100185257A1 (en) * 2007-04-26 2010-07-22 Intstitut National De La Sante Et De La Recherche Medical (Inserm) Method for filtering out artefacts of deep brain stimulation
CN102164537A (en) * 2008-09-17 2011-08-24 Med-El电气医疗器械有限公司 Stimulus artifact removal for neuronal recordings
CN101862189A (en) * 2010-06-13 2010-10-20 天津大学 Myoelectricity functional electric stimulation interference filtering method
US20150223710A1 (en) * 2014-02-07 2015-08-13 Medtronic, Inc. Devices and Methods for Sensing Physiological Signals During Stimulation Therapy
US20200129766A1 (en) * 2017-03-15 2020-04-30 The Regents Of The University Of California Removal of Stimulation Artifact in Multi-Channel Neural Recordings
WO2020146864A1 (en) * 2019-01-11 2020-07-16 University Of Houston System Systems and method providing a unified framework for de-noising neural signals

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116263A1 (en) * 2021-12-24 2023-06-29 南京邮电大学 Blinking and gnashing determination method and system based on electroencephalography

Also Published As

Publication number Publication date
CN113693605B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US9681814B2 (en) Devices and methods for real-time denoising of electrocardiograms
CN107303177B (en) Method and system for detecting T wave and P wave of electrocardiogram
US10849509B2 (en) Patient signal filtering
Goutas et al. Digital fractional order differentiation-based algorithm for P and T-waves detection and delineation
CN103405227A (en) Double-layer morphological filter based electrocardiosignal preprocessing method
CA2657833A1 (en) Method for processing cardioelectric signals and corresponding device
Waser et al. Removing cardiac interference from the electroencephalogram using a modified Pan-Tompkins algorithm and linear regression
CN112839584B (en) System and method for maternal uterine activity detection
Dora et al. Robust ECG artifact removal from EEG using continuous wavelet transformation and linear regression
CN113693605B (en) Method, device and medium for removing stimulation artifact of neural signal in real time
JP6243254B2 (en) Heart rate detection method and heart rate detection device
CN112244872B (en) Electroencephalogram signal artifact identification, removal and evaluation method and device and electronic equipment
Zhang et al. An improved real-time R-wave detection efficient algorithm in exercise ECG signal analysis
CN115969398B (en) Blink detection method and device
CN110179456B (en) Electrocardio noise recognition model training and electrocardio noise detection method and device
Waddell et al. Deep brain stimulation artifact removal through under-sampling and cubic-spline interpolation
Tomas et al. Application of the R-peak detection algorithm for locating noise in ECG signals
Tun et al. Analysis of heart rate variability based on quantitative approach
JPH10262941A (en) Electroencephalogram processor
Cho et al. Adaptive noise canceling of electrocardiogram artifacts in single channel electroencephalogram
JPWO2020227234A5 (en)
Debbabi et al. Algebraic approach for R-peak detection in the ElectroCardioGram (ECG) signal
Patro et al. An efficient signal processing algorithm for accurate detection of characteristic points in abnormal ECG signals
CN111772617B (en) ECG display filtering method, device and storage medium
TWI742844B (en) Ecg noise filtering device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant