CN113693605B - 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
CN113693605B
CN113693605B CN202111030359.XA CN202111030359A CN113693605B CN 113693605 B CN113693605 B CN 113693605B CN 202111030359 A CN202111030359 A CN 202111030359A CN 113693605 B CN113693605 B CN 113693605B
Authority
CN
China
Prior art keywords
artifact
stimulation
digital signal
interval
neural
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.)
Active
Application number
CN202111030359.XA
Other languages
Chinese (zh)
Other versions
CN113693605A (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, obtaining a first artifact interval where the current peak value is located, and predicting a second artifact interval where the next peak value is located and a non-artifact interval between the first artifact interval and the second artifact interval; s4, judging whether the current sampling time is in the non-artifact interval; 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 of the neural signal in real time 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 study of the mechanism of the disease. 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.
Currently existing artifact removal schemes can be divided into hardware and software.
The hardware solution utilizes the common-mode rejection characteristic of a differential amplifier and a filter combination to remove the stimulation artifact, and the method only aims at the condition that the stimulation frequency and the interested frequency band are not overlapped; it is also proposed to use a synchronous control Analog to Digital Converter (ADC) sampling time of a clock and a stimulation circuit to sample at a position without stimulation, but this method has a high requirement for hardware circuits, and the filter of the DBS stimulation device commonly used cannot achieve its accuracy.
In the aspect of software, frequency domain Hampel filtering is a direct method, artifact peaks are filtered after being detected in a frequency domain, the method may affect the phase of signals, and scattered 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; the later development is a method based on a weighted sliding window, 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 removal of the artifact to be unclean 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 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; 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 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 sampling time.
Further, in step S4, 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 to obtain the neural digital signal value of the current sampling point.
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 the 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 calculation by interpolation and other methods, 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 accordance with the present invention.
Figure 3 is a schematic diagram 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 and not restrictive on the broad application. It should be further noted that, for the convenience of description, only some of the structures associated with the present application are shown in the drawings, not all of them. 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 but may alternatively include other steps or elements not expressly 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 of the neural signal in real time, 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 a 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 direct current signal component, a baseline trend and a low frequency noise, which causes a change in amplitude, so that the original data obtained for the two recording contacts 11 from which the baseline drift is removed is filtered by a high pass filter to remove noise and a direct current 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 characteristics of the brain tissue and the unbalanced impedance of the two recording contacts 11, spike-like artifacts (i.e., artifact waveforms) of several tens of millivolts remain 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 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 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 entire neuro-digital signal is divided into a plurality of regions having the same time length, the plurality of regions forming a sequence of regions, in the present embodiment, the time length of the regions is set according to the period of the stimulation signal, i.e., 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 and the data of the T2 time period in fig. 2 are 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 before each peak time point and a time point after each peak time point and a time length after each peak time point are taken as a 'starting' point of the area, 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 when the stimulation artifact signals in the stimulation artifact waveform template 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 the signal in the stimulation artifact waveform template to return 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 may 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 signals obtained when the same or similar stimulation signals are applied, and the duration of the stimulation artifact can be directly called when the neural signals are acquired.
In step S3, the detection of the peak 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, and when the neural digital signal value reaches the preset threshold, the neural digital signal value is taken as the peak. 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. Then, 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 artifact interval T0 and the second artifact interval T1 are of the same temporal length as the duration of the stimulation artifact and that 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 a further preferred embodiment, it is also possible to use as starting point the 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 a 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 the artifact interval at which the current sampling time is located, which may be the first artifact interval T0, or the second artifact interval T1.
Because 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 in 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 in a non-artifact interval next 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 artefact periods vary with time, for example, with reference to figure 2, when the time is at time T0, the region corresponding to time T0 is the first artefact period and the region corresponding to time T1 is the second artefact period. 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 the 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 neural digital signals; the acquisition module 5 may also have a conversion function, for example, it may acquire an analog amount of neural signals generated during the 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 where 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 where 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 a stimulation artifact waveform template and duration of stimulation artifacts in the stimulation artifact waveform template;
s3, detecting a peak value of the neural digital signal, obtaining 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 a stimulation signal, predicting a second artifact interval in which a next peak value is located and a non-artifact interval positioned between the first artifact interval and the second artifact interval, wherein the time lengths of the first artifact interval and the second artifact interval are the same as the duration time of the stimulation artifact, and the peak value time points of the first artifact interval and the second artifact interval correspond to the positions of the peak value time points in the stimulation artifact waveform template;
s4, judging whether the current sampling time is in the non-artifact interval; 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, obtaining a stimulation artifact waveform template based on the neural digital signal in the plurality of regions, and determining the duration of the stimulation artifact.
3. The method for removing stimulation artifacts in real time according to neural signals of claim 2, wherein in step S2, the duration of the stimulation artifacts is determined according to the time when the stimulation artifact signals 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 the peak time point of the peak of the stimulation artifact waveform.
7. The method for removing stimulation artifacts according to any of claims 1 to 6, wherein the step of detecting peaks 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 according to any of claims 1 to 6, wherein the irregular sampling points are the first points deviated from the current artifact interval in step S4, or the irregular sampling points are the points deviated from the current artifact interval by 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 according to any of claims 1 to 6, further comprising the following steps before determining whether the current sampling time is within the non-artifact interval in step S4: 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:
and applying a stimulation signal with a preset frequency, recording a nerve signal in a stimulation process, and converting the nerve into a nerve digital signal.
13. An apparatus for removing stimulation artifacts from neural signals in real time, comprising:
the acquisition module is used for acquiring the neural digital signal;
the processing module is used for obtaining a stimulation artifact waveform template and the duration of a stimulation artifact in the stimulation artifact waveform template, detecting the peak value of the neural digital signal acquired by the acquisition module, obtaining a first artifact interval in which the current peak value is located according to the peak value time point of the peak value and the period of the stimulation signal, predicting a second artifact interval in which the next peak value is located and a non-artifact interval located between the first artifact interval and the second artifact interval, wherein the time lengths of the first artifact interval and the second artifact interval are the same as the duration of the stimulation artifact, and the peak value time points of the first artifact interval and the second artifact interval correspond to the positions of the peak value time points in the stimulation artifact waveform template;
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 for 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 CN113693605A (en) 2021-11-26
CN113693605B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114431879B (en) * 2021-12-24 2024-04-16 南京邮电大学 Method and system for judging blinking and biting teeth based on electroencephalogram
CN114795243A (en) * 2022-05-13 2022-07-29 诺竹科技(上海)有限公司 Portable brain machine device with multi-channel brain electricity collection and brain electricity stimulation functions

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
WO2020146864A1 (en) * 2019-01-11 2020-07-16 University Of Houston System Systems and method providing a unified framework for de-noising neural signals

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1985230A1 (en) * 2007-04-26 2008-10-29 INSERM (Institut National de la Santé et de la Recherche Medicale) Method for filtering out artefacts of deep brain stimulation
US9717428B2 (en) * 2014-02-07 2017-08-01 Medtronic, Inc. Devices and methods for sensing physiological signals during stimulation therapy
EP3595769A4 (en) * 2017-03-15 2021-05-26 The Regents of the University of California Removal of stimulation artifact in multi-channel neural recordings

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
WO2020146864A1 (en) * 2019-01-11 2020-07-16 University Of Houston System Systems and method providing a unified framework for de-noising neural signals

Also Published As

Publication number Publication date
CN113693605A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
US9247911B2 (en) Devices and methods for real-time denoising of electrocardiograms
CN113693605B (en) Method, device and medium for removing stimulation artifact of neural signal in real time
EP1802230B1 (en) Monitoring physiological activity using partial state space reconstruction
JP4792584B2 (en) Nonlinear Signal Separation Method by Nonlinear State Space Projection Method
CN107303177B (en) Method and system for detecting T wave and P wave of electrocardiogram
US6898460B2 (en) Method and apparatus for uterine contraction monitoring using linear predictive modeling of abdominal surface EMG signals
US11253204B2 (en) Method for assessing electrocardiogram signal quality
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
EP3398505B1 (en) Brain activity analysis apparatus
CN112244872B (en) Electroencephalogram signal artifact identification, removal and evaluation method and device and electronic equipment
JP2004283523A (en) Instrument for analyzing autonomic nervous rhythm
CN108567419B (en) Signal processing device and method based on respiratory heartbeat characteristic wave
Illanes-Manriquez et al. An algorithm for robust detection of QRS onset and offset in ECG signals
CN110179456B (en) Electrocardio noise recognition model training and electrocardio noise detection method and device
CN115969398B (en) Blink detection method and device
EP3110322B1 (en) Method and device for automatically checking the quality of an rr series obtained from a cardiac signal
Waddell et al. Deep brain stimulation artifact removal through under-sampling and cubic-spline interpolation
Tun et al. Analysis of heart rate variability based on quantitative approach
CN113786202A (en) Electrocardiogram characteristic starting point and end point detection method, system, device and medium
Cho et al. Adaptive noise canceling of electrocardiogram artifacts in single channel electroencephalogram
Haq et al. Extraction of Fetal ECG from Maternal Abdominal Record in the 3 rd Trimester of Gestation using RR Interval Windowing Technique
Debbabi et al. Algebraic approach for R-peak detection in the ElectroCardioGram (ECG) signal
Poliński et al. Estimation of blood pressure parameters using ex-Gaussian model
CN116369888B (en) Non-contact heart rate variability data acquisition method and 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