Invasive closed-loop feedback electrical stimulation device based on FPGA
By real-time stimulation artifact elimination on FPGA chip, the problem of artifact interference in closed-loop feedback electrical stimulation equipment is solved, the reliability of neural signals and the accuracy of closed-loop control are improved, and it is suitable for multi-channel high-precision neuroscience research and Preclinical research.
Patent Information
- Application Number
- CN202410982960.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
The existing closed-loop feedback electrical stimulation equipment is disturbed by stimulation artifacts, resulting in low recording signal distortion and closed-loop feedback control accuracy, which cannot effectively eliminate stimulation artifacts, affecting the authenticity and detection rate of neural signals.
The invasive closed-loop feedback electrical stimulation device based on FPGA is adopted to process real-time and eliminate stimulation artifacts through the FPGA chip, and eliminate artifacts by double-threshold detection and linear interpolation method to improve the accuracy and authenticity of the recording signal.
The synchronous acquisition and closed-loop control of multi-channel neural signals are realized, which improves the stability and accuracy of stimulus output, reduces the false detection rate, and enhances the detection rate and detection delay of neural signal marks.
Smart Images

Figure CN118925060A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of invasive closed-loop feedback electrical stimulation, and in particular relates to an invasive closed-loop feedback electrical stimulation device based on FPGA. Background Art
[0002] With the in-depth development of brain neural interface technology, brain neural electrical stimulation has become an emerging neuroregulatory method and is widely used in the treatment of neurological diseases. Among them, invasive closed-loop feedback electrical stimulation implants electrodes in specific neural nuclei in the brain to collect neural signals and release electrical stimulation. It has the advantages of high signal-to-noise ratio, rich information, and accurate stimulation positioning. It has shown great potential in the treatment of Parkinson's disease, depression, epilepsy and other neurodegenerative diseases.
[0003] Among them, closed-loop electrical stimulation therapy has shown great potential in the treatment of neurological diseases. Compared with open-loop continuous electrical stimulation therapy, closed-loop feedback electrical stimulation devices transmit and adjust therapeutic electrical stimulation parameters when detecting the characteristics of an impending or ongoing attack to respond to the patient's neural state, minimizing the side effects of electrical stimulation and are widely used in neuroscience research and clinical treatment.
[0004] In current closed-loop electrical stimulation studies, the number of recording and stimulating electrodes used is generally small. Various neurological disease studies have shown that the onset and spread of neurological diseases are related to numerous neural circuit nodes. A system that uses multi-channel sampling and recording can synchronously collect neural signals from multiple parts of the brain, which helps to more accurately locate abnormal areas of neural activity. Some studies have pointed out that multi-site regulation has a positive effect on the desynchronization of neural networks and disease treatment. Multi-site electrical stimulation can determine which neural sites need to be stimulated and how to adjust the stimulation parameters based on real-time collected data, which can more effectively intervene in abnormal neural network activity. At the same time, in response to different types and stages of clinical experimental studies and neurological diseases, it is necessary to flexibly adjust according to the purpose of the research and changes in individual conditions, so as to improve the accuracy and efficiency of the research.
[0005] Most of the existing closed-loop feedback electrical stimulation devices are affected by stimulation artifacts, resulting in adverse effects such as distortion of recorded signals and low precision of closed-loop feedback control. Electrical stimulation generates a large voltage transient, accompanied by the delivery of stimulation current to neural tissue and nearby electrodes. The direct artifacts generated by the stimulation current may be many orders of magnitude larger than the underlying neural signal. After the stimulation output is completed, the mismatch between the stimulation phase and the electrode characteristics produces voltage attenuation, i.e., indirect artifacts. As a result, data loss will occur during and for many milliseconds after the stimulation pulse, affecting the judgment of biomarker characteristics. Closed-loop feedback electrical stimulation requires real-time delivery of electrical stimulation therapy after the onset characteristics are detected, so the elimination of stimulation artifacts requires high real-time performance.
[0006] Existing methods for eliminating stimulation artifacts include template elimination, filtering, and source separation algorithms. Both template elimination and source separation algorithms rely on fixed stimulation signal sampling waveforms. Since electrical stimulation has multiple channels with different stimulation parameter outputs, stimulation artifacts vary, and the shape of stimulation artifacts changes over time, making it difficult to match standard stimulation artifact templates. The filtering method uses high-pass filtering circuits and low-pass filtering circuits, and the frequency band of neural signals overlaps with the stimulation pulse frequency band. Stimulation artifact elimination is incomplete and some effective information in neural signals is filtered out. Therefore, for invasive closed-loop feedback electrical stimulation systems, a method is needed to achieve real-time elimination of stimulation artifacts, thereby restoring the real neural signal data of the experimental subject, while obtaining a higher detection rate of neural signal markers and a lower detection delay. Summary of the invention
[0007] In view of the above, the purpose of the present invention is to provide an invasive closed-loop feedback electrical stimulation device based on FPGA, through which closed-loop recording and stimulation can be performed simultaneously on multiple channels, and the on-board real-time processing and elimination of stimulation artifacts can be used to improve the accuracy and authenticity of the recorded signals and greatly reduce the false detection rate. At the same time, the device also needs to support flexible data transmission and storage solutions, including real-time and offline data processing, to adapt to different application scenarios and meet the needs of neuroscience discovery and preclinical research.
[0008] To achieve the above-mentioned purpose of the invention, an invasive closed-loop feedback electrical stimulation device based on FPGA is provided in the embodiment, comprising a front-end acquisition subsystem, a closed-loop feedback control subsystem, an electrical stimulation subsystem, and a PC;
[0009] The front-end acquisition subsystem includes multiple neural signal acquisition modules, which simultaneously samples multi-channel neural signals and completes analog-to-digital conversion, is connected to the closed-loop feedback control subsystem through a data line, receives sampling control commands from the closed-loop feedback control subsystem, and sends sampling data to the closed-loop feedback control subsystem;
[0010] The closed-loop feedback control subsystem includes an FPGA chip, which sends a sampling command to the front-end acquisition subsystem based on the FPGA chip, receives the sampling data sent by the front-end acquisition subsystem, detects the neural signal mark after eliminating the stimulation artifacts of the data, and adjusts the electrical stimulation parameters configured for output, and packages the data after eliminating the stimulation artifacts according to a specified format and sends it to a PC or stores it;
[0011] The electrical stimulation subsystem is connected to the closed-loop feedback control subsystem in a one-to-one manner through a connector, receives and analyzes stimulation commands from the closed-loop feedback control subsystem, controls the corresponding channel to output stimulation pulses, adjusts corresponding stimulation parameters and stimulation output channels, generates required stimulation pulses, controls the corresponding channel to output stimulation pulses, and acts on the target neural area of the experimental subject through stimulation electrodes;
[0012] The PC is installed with dedicated client software, which sends control commands to the closed-loop feedback control subsystem, receives neural signal data and command responses sent by the closed-loop feedback control subsystem, and displays neural signal waveforms in real time based on the uploaded data.
[0013] Preferably, the multiple neural signal acquisition modules included in the front-end acquisition subsystem are independent of each other, work independently, and do not communicate with each other. Each neural signal acquisition module supports up to 64 channels of sampling, and the sampling rate can reach up to 30kSa / s.
[0014] Preferably, the closed-loop feedback control subsystem reserves multiple neural signal acquisition module interfaces, and the number of neural signal acquisition modules actually used is configured by the user;
[0015] The closed-loop feedback control subsystem also includes a WiFi module, an Ethernet module and an SD card module, wherein the WiFi module and the Ethernet module are respectively used to send the packaged data to the PC via WiFi or Ethernet, and send the PC's commands to the FPGA chip for parsing; the SD card module is used to store the data offline locally in a specified format.
[0016] Preferably, the closed-loop feedback control subsystem and the PC communicate using a custom protocol, which includes system initialization commands and responses, sampling control commands and responses, data upload commands and responses, and stimulation parameter setting commands and responses; all downlink and response commands of the custom protocol include command codes, which are used to mark command types.
[0017] Preferably, the system initialization commands of the custom protocol include but are not limited to obtaining FPGA status and code version number, time synchronization commands; sampling control commands include but are not limited to sampling channel selection, sampling rate setting, sampling delay, sampling module filter frequency setting commands; data upload commands include but are not limited to start / stop sending data packet commands; stimulation parameter setting commands include but are not limited to pulse amplitude, pulse width, and pulse frequency setting commands for corresponding channels.
[0018] Preferably, the electrical stimulation subsystem can provide multi-channel time-sharing electrical stimulation, and the electrical stimulation parameters are configurable, including high / low level amplitude, frequency, and pulse width.
[0019] Preferably, the closed-loop feedback control subsystem and the electrical stimulation subsystem can be used independently or in combination. The closed-loop feedback control subsystem is combined with the front-end acquisition subsystem to complete neural signal acquisition and processing, and complete data storage and communication; the electrical stimulation subsystem completes the open-loop electrical stimulation function, configures electrical stimulation parameters offline, and selects channel output.
[0020] Preferably, the FPGA chip performs stimulus artifact elimination on the data, comprising:
[0021] After the closed-loop control algorithm is completed for the sampled data, when the electrical stimulation subsystem is controlled to output the first stimulation pulse, stimulation artifact detection begins;
[0022] The uploaded sampling data is subjected to stimulation artifact detection using a double threshold method. When both the positive and negative amplitudes of the sampling data exceed the threshold, it is determined that a stimulation artifact is detected and marked as the first artifact sample. The maximum number of samples that may be affected by the stimulation artifact is marked according to the phase width and interphase interval of the stimulation pulse, and the artifact-affected sample length is calculated by rounding up. The sampling data corresponding to the artifact-affected sample length is extracted as the detected stimulation artifact.
[0023] Performing linear interpolation on the detected stimulation artifacts to eliminate the influence of the stimulation artifacts on the sampled data in real time;
[0024] The cached data after stimulation artifact removal were used to detect neural signal markers.
[0025] Preferably, the FPGA chip detects the neural signal marker, including:
[0026] After the stimulation artifacts are eliminated, the neural signal data are classified by channel number and sent to the preliminary inspection module to preliminarily calculate the simple features of the neural signals of each channel, and set the threshold to determine whether the electrical stimulation output needs are preliminarily met based on the simple features, where the simple features include but are not limited to line length and amplitude;
[0027] The simple features that initially meet the needs of electrical stimulation output are sent to the re-examination module to calculate the complex features of the neural signals of each channel, and the threshold is set to determine whether the needs of electrical stimulation output are finally met based on the complex features, where the complex features include but are not limited to root mean square, maximum slope, local maximum and minimum values, specific frequency band energy, the sum of the five maximum values of power spectrum density, and the sum of the maximum and second largest frequencies of power spectrum density;
[0028] It is determined that the channels that have passed the initial inspection and re-inspection have neural signal markers, that is, the output electrical stimulation parameters are configured to control the output of the corresponding channel of the electrical stimulation subsystem.
[0029] Preferably, the FPGA chip packages the data after eliminating the stimulation artifacts according to a specified format, wherein the specified format includes a header, a command code, a channel sequence number 1-K, a data segment 1-K and a tail;
[0030] The header is used to indicate the beginning of a data packet;
[0031] The command code is used to indicate the type of data packet;
[0032] The channel numbers 1-K are used to indicate the sampling channel numbers corresponding to the next data segment;
[0033] The data segments 1-K are used to represent the sampling data of each channel after being processed by the closed-loop feedback control subsystem and the detection results of the corresponding neural signal markers;
[0034] The tail is used to indicate the end of the data packet.
[0035] Preferably, after the FPGA chip completes signal processing and data packaging of the sampled data, the SD card module will automatically write the data packet into the SD card through the four-wire SDIO mode.
[0036] Preferably, after the FPGA chip completes signal processing and data packaging of the sampled data, the WiFi module and Ethernet module upload data packets according to the PC command, wherein the WiFi module provides a transmission bandwidth of up to 300Mbps and the Ethernet module provides a transmission bandwidth of up to 1000Mbps.
[0037] Preferably, the PC integrates the sampling data of the same channel according to the channel serial number identification before the data segment and displays the waveform, and each sampling channel corresponds to a unique channel number that is different from each other.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The system and method provided by the present invention can synchronously collect multi-channel invasive neural signals of experimental subjects, control the stimulation output in real time through closed-loop control logic, adjust the electrical stimulation parameters according to the immediate state of the neural signal, and realize precise treatment. At the same time, the stimulation artifacts in the sampled data are eliminated by interpolation, which greatly improves the reliability of the sampled neural data and the stability of the closed-loop control electrical stimulation output. The closed-loop feedback electrical stimulation system realizes synchronous interaction with the PC, and can upload neural signal sampling data and closed-loop control results in real time, which is convenient for subsequent processing and analysis. The present device realizes a high degree of integration of acquisition, processing, stimulation, storage and communication. Users can configure the number of neural signal acquisition modules according to their needs, and it has certain engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 It is a schematic diagram of the structure of an invasive closed-loop feedback-controlled electrical stimulation device based on FPGA provided in an embodiment of the present invention;
[0042] Figure 2 It is a hardware schematic diagram of an invasive closed-loop feedback-controlled electrical stimulation device based on FPGA provided in an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of the format of a sampled data packet for communication between a PC and a closed-loop feedback-controlled electrical stimulation system provided by an embodiment of the present invention;
[0044] Figure 4 It is a schematic diagram of the command data packet format of a PC and a closed-loop feedback control electrical stimulation system provided by an embodiment of the present invention;
[0045] Figure 5 Schematic diagram of the workflow of eliminating stimulation artifacts in a closed-loop feedback control subsystem provided by an embodiment of the present invention;
[0046] Figure 6 It is a schematic diagram of the working process of the closed-loop feedback control module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0048] The inventive concept of the present invention is: in view of the problems of low channel number, lack of algorithm flexibility and distortion of recorded signals by stimulation artifacts in existing closed-loop neuromodulation systems, the embodiment of the present invention provides an invasive closed-loop feedback electrical stimulation device based on FPGA. The device can realize high-throughput data flow, low-latency biological signal processing, and simultaneous sensing and stimulation, and realize long-term recording of neural signals and real-time elimination of stimulation artifacts in closed-loop mode. The device improves the accuracy and flexibility of closed-loop feedback control of brain-computer interface devices and can be applied to various types of neuroscience discoveries and preclinical research.
[0049] like Figure 1 and Figure 2As shown, the device provided in the embodiment includes a front-end acquisition subsystem, a closed-loop feedback control subsystem, an electrical stimulation subsystem, and a PC, wherein the front-end acquisition subsystem is connected to the closed-loop feedback control subsystem via a data cable, and the closed-loop feedback control subsystem is connected to the electrical stimulation subsystem via a connector. Specifically, the PC (personal computer) is installed in a position convenient for the closed-loop feedback control subsystem to communicate via Ethernet or WiFi; the closed-loop feedback control subsystem is installed in a position convenient for connecting to the front-end acquisition subsystem; the front-end acquisition subsystem is installed in a suitable position convenient for collecting neural signals of the experimental subject; the electrical stimulation subsystem is installed in a position convenient for communicating with the closed-loop feedback control subsystem, and the stimulation electrode is connected to the corresponding neural pathway of the experimental subject.
[0050] Specifically, the PC is installed with client software dedicated to the brain-computer interface, through which system initialization commands, sampling control commands, data upload commands and stimulation parameter setting commands are issued, and command responses are received. The PC is also installed with a wireless network card and / or a wired network card to support the closed-loop feedback control subsystem to communicate with the PC via a wireless / wired network.
[0051] Specifically, the front-end acquisition subsystem includes multiple neural signal acquisition modules, in which the modules work independently of each other. Each neural signal acquisition module supports up to 64 channels of neural signal data acquisition. Each channel can be connected to a neural pathway of the experimental subject. The channels do not interfere with each other and complete data sampling independently, supporting a sampling rate of up to 30kSa / s. The closed-loop feedback control subsystem can receive and parse the PC's commands to the sampling channel, and start / stop sampling for a channel of the corresponding front-end acquisition subsystem.
[0052] Specifically, the closed-loop feedback control subsystem includes 1 WiFi module, 1 Ethernet module, 1 FPGA chip and 1 SD card module. Among them, the FPGA chip is used as the main control chip of the WiFi module, Ethernet module and SD card module to realize the processing and communication of neural signal data. The WiFi module and Ethernet module are used to support the closed-loop feedback control subsystem to communicate with the PC via WiFi or wired network. The SD card module continuously writes data according to the data format after sampling starts.
[0053] When used, the neural signal acquisition module fixes the acquisition electrodes to the animal's head through cables; the PC is placed in a position where it can communicate with the above-mentioned subsystems at the same time. The sampling data packaging format of the PC with the client software installed to communicate with the closed-loop feedback control subsystem is as follows: Figure 3As shown, it includes: header, command code, channel sequence number 1-K, data segment 1-K and tail. Among them, the header is used to identify some basic information of the data packet; the command code is used to identify the type of the data packet; the channel sequence number is used to identify the channel represented by the next data segment; the data segment is the sampling data of each channel and the corresponding detection result; the tail is used to identify the end of the data packet.
[0054] The command data format for the PC with the client software installed to communicate with the closed-loop feedback control subsystem is as follows: Figure 4 As shown in the figure, it includes: header, command code, data segment and tail. Among them, the header is used to identify some basic information of the data packet; the command code is used to identify the type of the command; the data segment is used to configure / respond specific parameter information; the tail is used to mark the end of the data packet.
[0055] The process of closed-loop feedback electrical stimulation using the above invasive closed-loop feedback electrical stimulation device is as follows: the number of neural signal acquisition modules is 2, and the number of sampling channels is 128. After all devices are powered on, Figure 5 As shown, perform the following steps:
[0056] S1, sending the initialization command and sampling start command through the PC client software, the closed-loop feedback control subsystem controls the front-end acquisition subsystem to start sampling.
[0057] S2, the front-end acquisition subsystem samples the intracranial nerve signals of the corresponding channel, completes the analog-to-digital conversion and uploads it to the closed-loop feedback control subsystem.
[0058] S3, after receiving the sampled data, the FPGA chip performs signal preprocessing and uses the interpolation method to eliminate the stimulation artifacts.
[0059] In an embodiment, the stimulation artifact elimination process includes:
[0060] Step 1, after the FPGA completes the closed-loop control algorithm for the sampled data, when the electrical stimulation module of the electrical stimulation subsystem outputs the first stimulation pulse, stimulation artifact detection begins;
[0061] Specifically, after the FPGA receives the sampling command and starts to control the front-end sampling module to upload the sampling data of 128 recording channels, the sampling data is processed by signal processing and closed-loop control algorithm, and the first neural signal mark of a certain channel is detected and the electrical stimulation command is issued. At this time, stimulation artifact detection begins. After receiving the command, the electrical stimulation subsystem sets the stimulation parameters of the corresponding channel and outputs electrical stimulation. This delay is greater than the delay of starting stimulation artifact detection, which ensures the reliability of stimulation artifact detection.
[0062] Step 2, FPGA uses a double threshold method to detect stimulation artifacts on the uploaded sample data;
[0063] Specifically, the FPGA reads the parameter settings of the current stimulation pulse, and detects artifacts based on the amplitude, pulse width and frequency information of the positive and negative phases of the stimulation pulse. The threshold setting for stimulation artifact detection is adaptively adjusted according to the amplitude parameters of the current stimulation pulse. Previously, the stimulation pulse was a positive and negative biphasic pulse. When the positive and negative amplitudes of the sampled data exceeded the threshold, it was determined that the stimulation artifact was detected and marked as the first artifact sample. The length of the entire pulse is calculated based on the phase width and interphase interval of the stimulation pulse to determine the direct artifact length. After the direct artifact is the indirect artifact generated by the discharge of the charge in the neural tissue. The total duration of the stimulation artifact is the sum of the direct artifact and the indirect artifact. Therefore, the maximum number of samples that may be affected by the stimulation artifact is marked, and it is rounded up to calculate the artifact-affected sample length, and the sampling data of this segment is extracted. At the same time, the timestamp when the stimulation artifact is detected is recorded, and the detected stimulation artifact time phase is calibrated according to the current acquisition pulse frequency.
[0064] Step 3, FPGA performs linear interpolation on the detected stimulation artifacts to eliminate the influence of the stimulation artifacts on the sampled data in real time;
[0065] Specifically, since the artifact lasts for a very short time, the linear interpolation method can be used to eliminate the stimulation artifact. Typically, when the pulse is propagated at a frequency of 100 Hz and a pulse width of 100 μs, and the original signal sampling rate is 10 kSa / s, the acquired artifact lasts for one to two samples. This method does not depend on the actual value of the artifact, nor is it affected by changes in the artifact morphology. When the artifact is detected to last for two samples, the start time of the artifact is t, and the artifact exists for t and t+1. According to the sampling point amplitudes y0 and y1 at t-1 and t+2, the amplitudes at t and t+1 are calculated. When the artifact is detected to last for one sample, the amplitude at t can be calculated by the same logic.
[0066] Step 4: cache the data after stimulus artifact elimination and interact with the closed-loop feedback control module.
[0067] Specifically, the data after the interpolation calculation is replaced with the sampling points detected as stimulation artifacts, and the processed neural signal data is cached in the RAM according to the channel number. At the same time, the flag signal of artifact elimination completion is pulled high, waiting for the closed-loop feedback control module to obtain data and proceed to the next step.
[0068] In summary, the stimulation artifact elimination method of the closed-loop feedback electrical stimulation device based on FPGA starts stimulation artifact detection when the first stimulation pulse is output. The dual threshold method is used to detect stimulation artifacts, the maximum number of samples that may be affected by stimulation artifacts is marked, and the sampling data of this segment is extracted. The stimulation artifacts are removed by linear interpolation according to the number of continuous samples of the artifact. The problem of stimulation artifacts covering up the real sampling data is solved, and the problem of closed-loop feedback control misdetection caused by stimulation artifacts is also solved. The device and method provided by the embodiment of the present invention are applied to invasive brain-computer interfaces for closed-loop feedback control experiments and preclinical research, which can improve the control accuracy of closed-loop feedback control systems, can adapt to a variety of research scenarios, and meet the experimental requirements of multi-channel, high-precision, and flexible operation.
[0069] S4, the FPGA chip extracts features from the data and controls the electrical stimulation subsystem to output stimulation pulses according to the electrical stimulation command under the closed-loop control logic;
[0070] In the embodiment, the closed-loop feedback control module in the FPGA chip extracts features from the data, including an initial inspection module and a re-inspection module. The closed-loop control logic checks the channels that meet the initial inspection and re-inspection features, determines that the electrical stimulation output requirements are met, issues electrical stimulation commands for the corresponding channels, and controls the electrical stimulation module in the electrical stimulation subsystem to output stimulation pulses.
[0071] Specifically, Figure 6 As shown in the figure, when the original data completes the elimination of stimulation artifacts and pulls up the data valid signal, the closed-loop feedback control module in the FPGA chip starts to receive data. The closed-loop feedback control module classifies the neural signal data by channel number and sends them to 8 initial inspection modules respectively. It calculates the line length and amplitude in the time domain characteristics of the neural signal of each channel in parallel, sets the threshold to determine whether it initially meets the needs of electrical stimulation output, and sends the data that meets the characteristics to the re-inspection module; the re-inspection module calculates the root mean square, maximum slope, local maximum and minimum values, and specific frequency band energy, sets the threshold to determine whether it ultimately meets the needs of electrical stimulation output, and controls the corresponding channel output of the electrical stimulation subsystem for the neural signal data that meets the threshold characteristics.
[0072] In the embodiment, a pulsed constant current electrical stimulation method is used, where the negative phase pulse activates the neurons, followed by a positive phase pulse to neutralize the charge released by the stimulation. The stimulation frequency is set to 130 Hz, the positive and negative phase pulse widths are 100 μs, and the pulse amplitude is dynamically adjusted according to the experimental performance.
[0073] S5, the FPGA chip integrates the neural signal data and closed-loop control results into a data packet and stores it in the SD card, which can also be sent to the PC via the WiFi module or Ethernet module;
[0074] S6, the PC extracts the neural signal data in the data packet, displays the corresponding waveform on the graphical display interface of the client software according to the channel number, and performs real-time analysis and processing.
[0075] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An invasive closed-loop feedback electrical stimulation device based on FPGA, characterized in that: It includes front-end acquisition subsystem, closed-loop feedback control subsystem, electrical stimulation subsystem, and PC; The front-end acquisition subsystem includes multiple neural signal acquisition modules, which simultaneously samples multi-channel neural signals and completes analog-to-digital conversion, is connected to the closed-loop feedback control subsystem through a data line, receives sampling control commands from the closed-loop feedback control subsystem, and sends sampling data to the closed-loop feedback control subsystem; The closed-loop feedback control subsystem includes an FPGA chip, which sends a sampling command to the front-end acquisition subsystem based on the FPGA chip, receives the sampling data sent by the front-end acquisition subsystem, detects the neural signal mark after eliminating the stimulation artifacts of the data, and adjusts the electrical stimulation parameters configured for output, and packages the data after eliminating the stimulation artifacts according to a specified format and sends it to a PC or stores it; The electrical stimulation subsystem is connected to the closed-loop feedback control subsystem via a connector, receives and analyzes stimulation commands from the closed-loop feedback control subsystem, and controls the corresponding channel to output stimulation pulses; The PC is installed with dedicated client software, which sends control commands to the closed-loop feedback control subsystem, receives neural signal data and command responses sent by the closed-loop feedback control subsystem, and displays neural signal waveforms in real time based on the uploaded data.
2. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The multiple neural signal acquisition modules included in the front-end acquisition subsystem are independent of each other and work independently. Each neural signal acquisition module supports up to 64 channels of sampling, and the sampling rate can reach up to 30kSa / s.
3. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The closed-loop feedback control subsystem reserves multiple neural signal acquisition module interfaces, and the number of neural signal acquisition modules actually used is configured by the user; The closed-loop feedback control subsystem also includes a WiFi module, an Ethernet module and an SD card module, wherein the WiFi module and the Ethernet module are respectively used to send the packaged data to the PC via WiFi or Ethernet, and send the PC's commands to the FPGA chip for parsing; the SD card module is used to store the data offline locally in a specified format.
4. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The electrical stimulation subsystem can provide multi-channel time-sharing electrical stimulation, and the electrical stimulation parameters are configurable, including high / low level amplitude, frequency, and pulse width.
5. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The closed-loop feedback control subsystem and the electrical stimulation subsystem can be used independently or in combination. The closed-loop feedback control subsystem is combined with the front-end acquisition subsystem to complete neural signal acquisition and processing, and complete data storage and communication; the electrical stimulation subsystem completes the open-loop electrical stimulation function, configures electrical stimulation parameters offline, and selects channel output.
6. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The FPGA chip performs stimulation artifact elimination on the data, including: After the closed-loop control algorithm is completed for the sampled data, when the electrical stimulation subsystem is controlled to output the first stimulation pulse, stimulation artifact detection begins; The uploaded sampling data is subjected to stimulation artifact detection using a double threshold method. When both the positive and negative amplitudes of the sampling data exceed the threshold, it is determined that a stimulation artifact is detected and marked as the first artifact sample. The maximum number of samples that may be affected by the stimulation artifact is marked according to the phase width and interphase interval of the stimulation pulse, and the artifact-affected sample length is calculated by rounding up. The sampling data corresponding to the artifact-affected sample length is extracted as the detected stimulation artifact. Performing linear interpolation on the detected stimulation artifacts to eliminate the influence of the stimulation artifacts on the sampled data in real time; The cached data after stimulation artifact removal were used to detect neural signal markers.
7. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The FPGA chip detects a neural signal marker, including: After the stimulation artifacts are eliminated, the neural signal data are classified by channel number and sent to the preliminary inspection module to preliminarily calculate the simple features of the neural signals of each channel, and set the threshold to determine whether the electrical stimulation output needs are preliminarily met based on the simple features, where the simple features include line length and amplitude; The simple features that initially meet the needs of electrical stimulation output are sent to the re-examination module to calculate the complex features of the neural signals of each channel, and the threshold is set based on the complex features to determine whether the needs of electrical stimulation output are finally met. The complex features include root mean square, maximum slope, local maximum and minimum values, specific frequency band energy, the sum of the five maximum values of power spectrum density, and the sum of the maximum and second largest frequencies of power spectrum density; It is determined that the channels that have passed the initial inspection and re-inspection have neural signal markers, that is, the output electrical stimulation parameters are configured to control the output of the corresponding channel of the electrical stimulation subsystem.
8. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 1, characterized in that: The FPGA chip packages the data after eliminating the stimulation artifacts according to a specified format, wherein the specified format includes a header, a command code, a channel sequence number 1-K, a data segment 1-K and a tail; The header is used to indicate the beginning of a data packet; The command code is used to indicate the type of data packet; The channel numbers 1-K are used to indicate the sampling channel numbers corresponding to the next data segment; The data segments 1-K are used to represent the sampling data of each channel after being processed by the closed-loop feedback control subsystem and the detection results of the corresponding neural signal markers; The tail is used to indicate the end of the data packet.
9. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 3, characterized in that: After the FPGA chip completes signal processing and data packaging of the sampled data, the SD card module will automatically write the data packet into the SD card through the four-wire SDIO mode.
10. The FPGA-based invasive closed-loop feedback electrical stimulation device according to claim 8, characterized in that: The PC integrates the sampling data of the same channel according to the channel serial number identification before the data segment and displays the waveform. Each sampling channel corresponds to a unique channel number that is different from each other.
Citation Information
Patent Citations
Multi-channel wireless closed loop deep brain neural sensing and control system
CN104874102A
DSP+FPGA based local field potential real time detection analysis platform eliminating DBS artifacts
CN107510888A
Method and device for removing stimulation artifacts of neural signals in real time and medium
CN113693605A
Devices, systems, and methods for monitoring symptoms of neurological conditions
CN117042678A
Cited By
Peripheral nerve electrical stimulation closed-loop regulation and control device and system
CN120571156A
