In-ear vagus nerve stimulation control method, system and device based on scalp electroencephalogram
Through multimodal signal processing and LSTM prediction model, combined with dynamic parameter adjustment, the problem of delayed response and excessive stimulation of existing intraauricular vagus nerve stimulation devices in insomnia treatment is solved, and accurate recognition of sleep state and individualized treatment is achieved, improving the treatment effect and safety.
Patent Information
- Application Number
- CN202510815852.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-01
AI Technical Summary
The existing intraauricular vagus nerve stimulation treatment devices lack multimodal signal coordination analysis and dynamic parameter coupling mechanisms, resulting in excessive stimulation or insufficient efficacy. Especially in the rapid switching scenario of sleep stage, response delay leads to loss of effective treatment windows, and lacks real-time physiological feedback and electrode impedance monitoring.
Using a multimodal signal processing method based on scalp EEG, the scalp EEG, body movement and pulse signals are collected, and the sleep coupled fraction (SCS) is constructed for quantification of physiological states. Combined with the LSTM prediction model and biphasic square wave dynamic modulation, real-time identification of physiological states and individualized stimulation parameter adjustments are achieved, and electrode impedance changes are monitored in real time.
Accurate phased recognition of sleep state is achieved, reducing the sleep latency of insomnia patients, reducing the incidence of stimulation side effects, improving the real-time and safety of multimodal signal processing, and avoiding the risk of electrode shedding or tissue overload.
Smart Images

Figure CN120393283A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of biomedical engineering and neuroscience, and particularly to an in-ear vagus nerve stimulation control method, system and device based on scalp electroencephalogram. Background Art
[0002] Currently, in the field of in-ear vagus nerve stimulation for the treatment of insomnia, the mainstream technology still remains in the stage of single-parameter threshold control and open-loop stimulation. Clinical studies have shown that due to the lack of multi-modal signal collaborative analysis and dynamic parameter coupling mechanism in existing devices, 38% of patients experience over-stimulation or insufficient efficacy. Especially for scenarios with rapid sleep stage transitions (such as NREM-REM transitions), the response delay of traditional schemes results in the loss of 22% of the effective treatment window.
[0003] For in-ear vagus nerve stimulation for the treatment of insomnia, existing technologies have attempted to integrate electroencephalogram monitoring to achieve closed-loop control. Typical schemes trigger stimulation by detecting the α-wave power threshold, and some products introduce heart rate variability as an auxiliary parameter. Such devices usually adopt a CPU serial processing architecture, and the stimulation waveform is mainly single-phase pulses, and the parameter adjustment period is mostly in the order of minutes.
[0004] In addition, existing schemes rely on a single physiological signal (such as electroencephalogram or heart rate), and do not establish a multi-modal parameter coupling model. Moreover, the misjudgment rate of single-signal detection in the presence of body movement interference is relatively high, and it is unable to distinguish between light sleep and the transition state of wakefulness; the adjustment of stimulation parameters depends on offline data analysis, and the response delay exceeds 5 seconds, resulting in the loss of 32% of the effective treatment window. The open-loop control mode further causes 23% of patients to have over-sensitivity to stimulation; existing products lack dynamic monitoring of electrode impedance and have no module for quantitative evaluation of physiological responses after stimulation; under the traditional CPU architecture, the time-consuming for frequency domain separation accounts for 76% of the processing flow, which cannot meet the real-time processing requirements of multi-channel signals and restricts the improvement of the closed-loop control frequency. [[ID=!5]] Summary of the Invention
[0005] The purpose of the present invention is to provide an in-ear vagus nerve stimulation control method, system and device based on scalp electroencephalogram, which solves the problems of insufficient accuracy, poor separation effect of electrophysiological signals and unreasonable evaluation mechanism of existing in-ear closed-loop vagus nerve stimulators.
[0006] To achieve the above purpose, the present invention is realized through the following technical solutions: An in-ear vagus nerve stimulation control method based on scalp electroencephalogram, comprising the following steps: S1. Collect scalp electroencephalogram signals, body movement signals and pulse signals of the user to be measured; Capture the characteristics of central nervous activity through scalp electroencephalogram (EEG) signals (such as the association between alpha waves and sleep stages), body movement signals reflect the intensity of limb activities (distinguish sleep micro-awakenings from resting states), and pulse signals analyze heart rate variability (evaluate the balance of the autonomic nervous system). After the three types of signals are aligned by time stamps, they are input into the processing module to form a multi-dimensional physiological state representation, avoiding misjudgments caused by noise interference or scene limitations of a single signal.
[0007] S2. Preprocess and separate the scalp EEG signals, body movement signals, and pulse signals in the frequency domain to obtain alpha wave power, body movement amplitude, and heart rate variability parameters; The EEG signals are band-pass filtered to retain the energy in the 8 - 12 Hz frequency band, and the alpha wave activity is quantified through power integration (the power decreases during deep sleep and increases during the waking period); the body movement signals are integrated in the time domain to calculate the mean amplitude (the amplitude approaches zero in the resting state and jumps significantly during body movement); the pulse signals extract the RR interval sequence, and the increase in the root mean square difference represents the activation of the parasympathetic nerve). The characteristic parameters are used as inputs to the downstream evaluation module to achieve the quantitative calibration of the physiological state.
[0008] S3. Calculate the sleep coupling score based on the alpha wave power, body movement amplitude, and heart rate variability parameters, and divide the physiological state according to the sleep coupling score; Non-linearly couple the alpha wave power (degree of central nervous inhibition), HRV RMSSD with the body movement amplitude (intensity of body activities) to construct the SCS comprehensive score. A high SCS value represents the deep sleep state (low body movement, high HRV, low alpha waves), and a low SCS value indicates wakefulness or light sleep. Through dynamic threshold division (such as SCS > 40 for deep sleep, 20 < SCS ≤ 40 for light sleep, SCS ≤ 20 for wakefulness), real-time classification of the physiological state is achieved.
[0009] S4. Dynamically adjust the intensity and frequency of the auricular vagus nerve stimulation for the user according to the physiological state and generate feedback data; the stimulation intensity has a negative correlation control logic with the SCS value: during the deep sleep period (high SCS), the stimulation intensity is reduced to avoid nerve interference, during the light sleep period (medium SCS), it is moderately increased to maintain sleep continuity, and during the wakefulness period (low SCS), high-intensity stimulation is used to promote sleep. The stimulation frequency is sinusoidally modulated according to the SCS value to synchronize it with the inherent rhythm of the vagus nerve (15 - 25 Hz) and enhance the nerve response efficiency S5. Perform auricular vagus nerve stimulation and update the dynamic adjustment parameters of the auricular vagus nerve stimulation based on the feedback data.
[0010] Real-time monitor the impedance change at the electrode-tissue interface (cut off the output when the contact impedance is abnormal), synchronously track the physiological responses after stimulation (such as the change rate of α-wave power, the recovery speed of HRV), and predict the future state trend through a machine learning model. If the actual response deviates from the expectation (such as the SCS does not improve after stimulation), automatically correct the weights of the stimulation parameters to achieve individualized adaptation.
[0011] Preferably, in S1: The sampling frequency of the scalp electroencephalogram signal is 100 - 512 Hz, and the band-pass filtering range is 8 - 12 Hz, where the sampling frequency is preferably 256 Hz: Adopt a bipolar differential electrode configuration, synchronously measure the potential difference between two points on the scalp through the positive and negative input terminals, and suppress common-mode interference (such as 50z power frequency noise). The electrode spacing is set to 3 - 5 cm to optimize the spatial resolution of the cortical electric field. The sampling frequency ≥128 Hz ensures that the complete waveform of the α-wave (8 - 12 Hz) can be resolved, meeting the Nyquist sampling theorem. The original signal is input into the processing module after passing through a preamplifier (with a gain of 1000 times) and 0.5 - 100z band-pass filtering.
[0012] The body movement signal is collected by a three-axis gyroscope, the sampling frequency is 40 - 200 Hz, and the frequency band is 0.1 - 1 Hz, where the sampling frequency is preferably 100 Hz: Deploy MEMS accelerometers on the X / Y / Z axes to measure the acceleration vector of body movement. The frequency band is limited to 0.1 - 1 Hz to capture low-frequency body movement characteristics such as turning over and micro-movement (high-frequency vibration noise is filtered out). The acceleration signal is converted into a displacement quantity through time-domain integration, and the root mean square value is calculated as a quantization index of the body movement amplitude. The three-axis data fusion improves the detection sensitivity and avoids missed detection in a single axis direction.
[0013] The pulse signal is collected by a photoelectric sensor, the sampling frequency is 40 - 200 Hz, and the frequency band is 1 - 3 Hz, where the sampling frequency is preferably 100 Hz: Adopt a reflective photoelectric sensor (green light with a wavelength of 510 - 550 nm, where the preferred wavelength is 530 nm), and detect the change in subcutaneous blood flow through the photoplethysmography method. The sampling interval ≤10 ms (i.e., a sampling rate of 100 Hz) ensures accurate capture of the RR interval fluctuation (typical heart rate variability is at the millisecond level). After the original signal undergoes adaptive threshold denoising and waveform shaping, the peak time series of the R wave is extracted.
[0014] Preferably, S2 includes: Use a GPU parallel computing framework to perform fast Fourier transform on the collected scalp electroencephalogram signal, body movement signal, and pulse signal; Separate the α-wave, body movement signal, and pulse signal components through frequency-domain adaptive threshold.
[0015] Perform fast Fourier transform (FFT) on the electroencephalogram (EEG) signals through a parallel computing architecture to convert the time-domain signals into frequency-domain energy distributions. Perform power integration on the 8 - 12 Hz frequency band to quantify the energy intensity of the alpha waves. The power of the alpha waves reflects the inhibitory state of the cerebral cortex (the power decreases during deep sleep and increases during the waking period), and its dynamic changes are directly related to the transition of sleep stages. Parallel computing accelerates the frequency-domain separation process, ensuring that the real-time processing delay is less than 50 ms to meet the requirements of closed-loop control. Perform time-domain integration on the body movement signals in the 0.1 - 1 Hz frequency band, accumulate the change in acceleration amplitude over time, and convert it into a displacement quantity to characterize the body movement intensity. The integration calculation eliminates high-frequency noise interference (such as device vibration) and focuses on the low-frequency activity characteristics such as turning over and slight movement during sleep. The mean amplitude is used as a quantification index to distinguish the resting state (low amplitude) from the waking / body movement events (high amplitude). By detecting the R-wave peak time series, calculate the heart rate variability (HRV) of adjacent RR intervals RMSSD , which characterizes the balance state of the autonomic nervous system. HRV RMSSD An increase reflects enhanced parasympathetic nerve activity (deeper sleep), and a decrease indicates sympathetic nerve dominance (waking or stress). The analysis window covers at least 2 complete respiratory cycles (about 10 seconds) to ensure the integrity of the physiological rhythm.
[0016] Preferably, the calculation formula for the sleep coupling score is: where P α is the alpha wave power, HRV RMSSD is the root mean square difference of heart rate variability, A motion is the mean body movement amplitude, and ∈ is a constant to prevent division by zero.
[0017] Construct a sleep coupling score (SCS) through the three-dimensional feature fusion of central nervous activity (alpha wave power), autonomic nerve balance (HRV RMSSD ) and body movement intensity (body movement amplitude). A decrease in alpha wave power indicates cortical inhibition (deep sleep), an increase in HRV RMSSD reflects vagus nerve activation (parasympathetic dominance), and a decrease in body movement amplitude indicates a resting state. The non-linear coupling of the three eliminates the sensitivity of a single parameter (such as alpha wave distortion caused by body movement interference) and improves the robustness of sleep state discrimination. The constant ∈ to prevent division by zero: prevents calculation overflow when the body movement approaches zero and ensures the stability of the system.
[0018] Preferably, the formula for dynamically adjusting the stimulation intensity in S4 is: where I0 is the reference stimulation intensity; SCS(t) is the calculation function of the sleep coupling score.
[0019] Based on the inverse regulation logic of the sleep coupling score (SCS) and the stimulation intensity: High SCS scenario (deep sleep stage): An increase in the SCS value triggers a linear decrease in the stimulation intensity, down to a minimum of 0.5 mA, to avoid excessive interference with the autonomic nerve rhythm; Low SCS scenario (awake / light sleep): A decrease in the SCS value drives an increase in the intensity, up to a maximum of 1.5 mA, to promote sleep initiation by enhancing vagus nerve activation; Linear response design: The linear relationship between the intensity and SCS ensures a smooth adjustment process and prevents discomfort caused by parameter mutations.
[0020] Preferably, the S4 also includes correcting the stimulation intensity according to the individual's baseline heart rate variability: where I(t) represents the intensity of the user's intracranial vagus nerve stimulation; HRV baseline represents the user's baseline heart rate variability in the resting state; HRV current represents the currently measured real-time heart rate variability.
[0021] By collecting continuous heart rate variability (HRV) data (≥5 minutes) of the user in the resting state, calculate its root mean square difference (HRV RMSSD ) as the baseline reference value. The baseline HRV reflects the individual's vagus nerve tone level (higher HRV indicates stronger parasympathetic activity and lower stimulation sensitivity), and the calibration result is stored in the non-volatile memory as the reference anchor point for subsequent correction.
[0022] Preferably, when performing stimulation in the S5, the stimulation waveform is a biphasic square wave with a pulse width of 200 μs; the stimulation frequency is dynamically adjusted according to the following formula: where SCS(t) is the sleep coupling fraction calculation function for the user.
[0023] Based on the sine function modulation of the sleep coupling fraction (SCS), the stimulation frequency is adjusted to synchronize the vagus nerve stimulation with the physiological rhythm: Base frequency (20 Hz): Matches the optimal response frequency band of the vagus nerve C fibers (15 - 25 Hz) to ensure the effectiveness of the basic stimulation; Sine wave fluctuation (±5 Hz): Introduces a periodic frequency change related to the SCS value to simulate the natural oscillation rhythm of the autonomic nervous system (such as respiratory-related sinus arrhythmia) and enhance the resonance effect of neural electrical activity; Dynamic tuning: When the SCS value increases (deep sleep stage), the fluctuation amplitude is reduced to reduce nerve interference; when the SCS value decreases (awake stage), the fluctuation amplitude is increased to enhance the sleep-promoting effect.
[0024] Preferably, the S5 also includes: The future physiological state is predicted based on LSTM. The input of the LSTM includes historical SCS values, stimulation intensity and frequency. The output is the SCS prediction value for the next 3 minutes, and the stimulation parameters are adjusted in advance according to the prediction results.
[0025] A long-short-term memory (LSTM) network receives historical SCS sequences (time window ≥ 15 minutes) and stimulation intensity and frequency parameters to construct a multidimensional time series model. The SCS sequence reflects the evolution of physiological states, while the stimulation parameters record the history of interventions. Together, these two factors train the network to capture stimulus-response lags (e.g., SCS changes 5-10 minutes after stimulation). The model outputs a predicted SCS value for the next three minutes, integrating feedforward and feedback control.
[0026] The vagus nerve stimulation control system in the ear based on scalp EEG includes: Signal acquisition module, used to obtain the user's scalp EEG signal, body movement signal and pulse signal; A multi-source sensor array (EEG electrodes, accelerometers, and photoelectric pulse sensors) is deployed, and cross-modal data is time-aligned through hardware-level synchronization trigger circuitry. EEG signals are sampled at ≥128Hz to ensure alpha wave resolution. Body motion signals are band-pass filtered at 0.1-1Hz to extract effective motion features. Photoelectric sensors are sampled at 100Hz to capture millisecond-level RR interval fluctuations. Synchronization error is <1ms, ensuring temporal consistency for subsequent multimodal analysis.
[0027] The signal processing module is used to process and analyze the frequency-domain separated alpha wave power, body motion amplitude, and heart rate variability parameters; GPU parallel computing frameworks (such as CUDA) are used to accelerate the processing of pre-processed signals: EEG channel: Perform fast Fourier transform (FFT) in real time to separate the power of the 8-12 Hz frequency band; Body motion channel: Parallel calculation of the time domain integral and RMS value of the three-axis acceleration; Pulse channel: Multi-threaded R-wave detection and RR interval sequence generation. The processing pipeline design ensures a total latency of ≤50ms for multimodal feature extraction, meeting the real-time requirements of closed-loop control.
[0028] An evaluation module is used to calculate the sleep coupling score and classify the physiological state based on the alpha wave power, body movement amplitude and heart rate variability parameters output by the signal processing module; Constructing a three-dimensional state space based on the sleep coupling score (SCS): X-axis: α wave power (degree of central nervous system inhibition); Y-axis: HRV RMSSD (autonomic nervous system balance state); Z-axis: body movement amplitude (body activity intensity).
[0029] The SCS value is calibrated in real time in this space, and the threshold intervals for deep sleep, light sleep, and wakefulness states are dynamically divided in combination with historical data.
[0030] The dynamic adjustment module is used to dynamically adjust the intensity and frequency of auricular vagus nerve stimulation according to the user's physiological state; Intensity channel: reversely regulate the stimulation current (0.5 - 1.5 mA) according to the SCS value, and superimpose an individualized HRV correction factor; Frequency channel: based on the SCS sinusoidal modulation of the stimulation frequency (15 - 25 Hz), match the resonance characteristics of the vagus nerve. The control instructions are isolated and output through a dual DAC channel to avoid signal crosstalk.
[0031] The stimulation execution module is used to output auricular vagus nerve electrical stimulation signals and dynamically adjust their parameters.
[0032] Constant current source circuit: adopts the Howland current pump architecture, with an output accuracy of ±2%; Charge balance monitoring: calculate the difference in the charge amounts of positive and negative phase pulses in real time, and trigger waveform reset when the threshold is exceeded by more than 5%; Impedance protection: continuously monitor the electrode-skin contact impedance, and cut off the output and alarm when abnormal (when the impedance is greater than 10 kΩ).
[0033] The auricular vagus nerve stimulation control device based on scalp electroencephalogram includes: Embedded electrode array, used to collect scalp electroencephalogram signals; Three-axis gyroscope and optoelectronic sensor, respectively collect body movement and pulse signals; GPU processor, used to execute the signal frequency domain separation algorithm; Auricular multi-electrode stimulator, outputting vagus nerve electrical stimulation with adjustable frequency and intensity.
[0034] A high-density flexible electrode layout is adopted in the forehead area to cover key brain regions, and bipolar differential amplification is used to suppress electromyogram artifacts and power frequency interference. The electrode-skin contact impedance is monitored in real time, and when the impedance is abnormal, the self-wetting circuit is triggered to release electrolyte to improve conductivity. The original signal is input into the preprocessing module after being converted by a 16-bit ADC, and the frequency band of 8-12 Hz is reserved for alpha wave feature extraction; the MEMS gyroscope measures the angular velocity of the X / Y / Z axes, and combines the accelerometer data for fusion calculation of the body rotation angle. The angular velocity signal is filtered by a band-pass filter of 0.1-1 Hz to eliminate high-frequency noise, and the time-domain integration is converted into the body position change trajectory to quantify the sleep turning frequency and amplitude. The triaxial data fusion algorithm improves the sensitivity of micro motion detection to distinguish natural body movements from external interferences; a dual-wavelength optoelectronic sensor is adopted to synchronously detect the epidermal blood flow and blood oxygen saturation by the reflective photoplethysmography method. The green light channel extracts the pulse wave waveform, identifies the R wave peak by the adaptive threshold method, and calculates the RR interval sequence; the infrared channel monitors the blood oxygen change to assist in evaluating sleep breathing events. The dual-wavelength cross-validation eliminates motion artifacts and improves the robustness of HRV calculation; the embedded GPU performs parallel frequency-domain processing: the fast Fourier transform accelerated by CUDA separates the energy of the alpha wave frequency band and calculates the power spectral density; body motion signal: the time-domain integration and spectral entropy value of the angular velocity of the triaxial gyroscope are calculated in parallel to quantify the motion complexity; pulse signal: the continuous wavelet transform is executed in multiple threads to extract the morphological features of the pulse wave; the GPU parallel architecture enables the multi-modal signal processing delay ≤ 30 ms to meet the requirements of closed-loop real-time performance; the micro intra-aural electrode array fits the branches of the vagus nerve in the concha auris, and outputs a biphasic balanced square wave stimulation.
[0035] In summary, the present invention includes at least one of the following beneficial technical effects: 1. The present invention adopts the technical solution of parallel processing of multi-source signals of electroencephalogram, body motion, and pulse and dynamic modeling of sleep coupling score (SCS), achieving the effect of accurate identification of sleep stages in stages. Compared with the methods relying on single electroencephalogram features or static thresholds in the prior art, it solves the deficiencies of being easily interfered by noise and having a high misjudgment rate.
[0036] 2. Through the LSTM prediction model and the biphasic square wave dynamic modulation technical solution, the present invention realizes the coordinated optimization of stimulation intensity-frequency for the first time in the stimulation of the intra-aural vagus nerve. It overcomes the defects of fixed parameters and poor adaptability in traditional open-loop stimulation, can shorten the sleep latency of insomnia patients, and greatly reduces the incidence of stimulation side effects.
[0037] 3. The present invention creatively embeds four-wire impedance monitoring and alpha wave power feedback into the stimulation execution process to form a dual-loop of hardware-level safety protection and effect evaluation. Compared with the extensive stimulation lacking real-time physiological feedback in the prior art, it avoids the risks of electrode detachment or tissue overload, has a very accurate impedance abnormality detection rate, and a rapid response time for stimulation termination.
[0038] 4. Adopt a hardware solution that combines GPU-CUDA acceleration for frequency-domain separation and STM32 low-power control to break through the real-time bottleneck of multi-modal signal processing. Compared with traditional FPGA or pure CPU solutions, the computing power is greatly improved under the same power consumption, and the window data processing delay is also greatly reduced, meeting the requirements of clinical-level closed-loop control. Brief Description of the Drawings
[0039] Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 It is a schematic diagram of the system architecture of the present invention. Detailed Embodiment
[0040] The following further elaborates on the present invention in conjunction with the attached Figure 1 - attached Figure 2 , and makes a more detailed description of the present invention.
[0041] Refer to Figure 1 , the present invention provides a method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram, including: S1. Collect the scalp electroencephalogram signal, body movement signal and pulse signal of the user to be measured; In this embodiment, step S1 includes an electroencephalogram electrode array, a body movement sensor and a pulse sensor, and realizes synchronous acquisition of multi-modal signals through an embedded hardware system, including: Electroencephalogram electrode array: Adopt 4-channel Ag / AgCl electrodes (diameter 8mm), the electrodes are in contact with the scalp through conductive gel (impedance <5kΩ), and are fixed at the positions of O1, O2, P3, and P4 according to the international 10-20 system standard; the sampling frequency is 256Hz, and the band-pass filtering range is 8-12Hz.
[0042] Body movement sensor: Preferably select a three-axis MEMS gyroscope (MPU-6050, range ±4g), the sensor is embedded inside the head-mounted device, and is in contact with the side of the head through a silicone buffer layer (thickness 2mm), the sampling frequency is set to 100Hz, and the frequency band is 0.1-1Hz.
[0043] Pulse sensor: Further adopt a clip-on photoplethysmograph (MAX30102, red light wavelength 660nm, infrared light wavelength 880nm), the sensor is clamped on the earlobe, the light source intensity is set to 10mA, the sampling frequency is 100Hz, and the frequency band is 1-3Hz.
[0044] Preprocessing of scalp electroencephalogram signal: Adopt a fourth-order Butterworth analog filter, the cut-off frequencies are 8Hz (low-pass) and 12Hz (high-pass), and the transfer function is: Where s = σ + jω is the complex frequency variable in the Laplace transform domain; ω1 = 2π × 8 rad / s (high-pass cut-off frequency); ω2 = 2π × 12 rad / s (low-pass cut-off frequency); Q = 0.707 (quality factor).
[0045] Wavelet denoising: For the filtered signal S ′ EEG Perform discrete wavelet transform (DWT), use sym4 wavelet basis for 5-level decomposition, and the hard threshold function is defined as: Where: W j,k Is the wavelet coefficient at the j-th scale and k-th position; Median(|W j,k |) is the median of the absolute values of the wavelet coefficients at the j-th layer, used to estimate the noise standard deviation; N = 1280 (number of sampling points in a 5-second window, 256 Hz × 5 s); Body movement signal preprocessing: Use a digital IIR filter with a cut-off frequency of 1 Hz, and the difference equation is expressed as: y[n] = 0.8y[n - 1] + 0.2x[n]; Where x[n] is the original signal and y[n] is the filtered output.
[0046] Motion artifact detection: If the amplitude of the filtered signal exceeds the dynamic threshold, discard the current data window: A th = μ motion + 3σ motion ; Where: μ motion : Mean value of body movement signals within a 10-second window; σ motion : Standard deviation of the same window; Pulse signal preprocessing: Use a 1 - 3 Hz digital band-pass filter (FIR, order 64), and the transfer function is: Where the filter coefficients h[n] are designed by the Parks-McClellan algorithm, and the passband ripple < 0.1 dB.
[0047] R peak detection: For the filtered signal S ′ pulse Perform first-order difference and squaring processing to detect local maxima: The time intervals between adjacent R peaks form an RR interval sequence {RR1, RR2,..., RR M}}。
[0048] The multi-modal signals include scalp electroencephalogram (EEG) signals, body movement signals, and pulse signals, and strict synchronization is achieved through the following methods: Timestamp generation: The main control unit is built-in with a high-precision clock (error ±1 ppm), and a timestamp is generated every 1 ms, with the format of a 32-bit unsigned integer (millisecond level of Unix time).
[0049] Transmission protocol: Transmitted through the SPI bus in DMA mode. Each frame of data is 24 bytes in total, and the transmission rate is calculated as: It meets the actual requirements of 256 Hz × 4 channels + 100 Hz × 3 axes + 100 Hz × 2 wavelengths = 1.524 kbps.
[0050] In this embodiment, step S1 runs according to the following steps: Device wearing and initialization: The user wears the head-mounted device to ensure that the EEG electrodes are in close contact with the O1 / O2 / P3 / P4 positions (impedance detection value <5 kΩ); the earclip pulse sensor is fixed to the left earlobe, and the gyroscope is attached to the right temporal bone position.
[0051] Signal acquisition start: After the main control unit is powered on, the ADC and SPI peripherals are initialized, and the sampling parameters are set: EEG channels: 256 Hz, gain 2000 times; body movement sensor: 100 Hz, range ±4 g; pulse sensor: 100 Hz, alternating sampling of red light / infrared light.
[0052] Real-time preprocessing and data transmission: After the EEG signal passes through the hardware band-pass filter (8 - 12 Hz), the myoelectric interference is eliminated through the wavelet denoising algorithm; the body movement signal passes through the low-pass filter (0.1 - 1 Hz). If the detected amplitude exceeds A th = 0.5 g + 3 × 0.2 g = 1.1 g, the data of the current 5-second window is discarded; After the pulse signal passes through the band-pass filter (1 - 3 Hz), the R peak is detected and the RR interval sequence is generated to calculate the HRV RMSSD 。
[0053] Abnormal handling mechanism: If the impedance of the EEG electrode continuously >10 kΩ for more than 30 seconds, an audible and visual alarm is triggered and the acquisition is paused; if the CRC check fails for 3 consecutive data frames, it automatically switches to the backup SPI channel.
[0054] S2. Preprocess and perform frequency-domain separation on the scalp EEG signal, body movement signal, and pulse signal to obtain the α-wave power, body movement amplitude, and heart rate variability parameters; In this embodiment, step S2 is implemented through the GPU parallel computing framework.
[0055] Signal preprocessing, including a wavelet denoising module and a band-pass filtering module. The wavelet denoising module decomposes the EEG signal into 5 layers using the sym4 wavelet basis, and the hard threshold function is defined as: Where: W j,k : Wavelet coefficient at the j-th scale and k-th position (j = 1, 2,..., 5); N: Number of sampling points in a 5-second window (256 Hz × 5 s = 1280 points).
[0056] The denoised signal is processed by an 8 - 12 Hz digital band-pass filter (4th-order Butterworth), and the filter transfer function is: The coefficients are designed by the bilinear transformation method, and the cut-off frequency error is < 0.1 Hz.
[0057] GPU parallel Fourier transform, implemented based on the CUDA architecture of NVIDIA Jetson Nano.
[0058] Frequency-domain adaptive separation, including frequency band integration and heart rate variability calculation: Calculation of α-wave power: Where the frequency point index range: k low = 8 / 0.2 = 40, k high = 12 / 0.2 = 60, a total of 21 frequency points.
[0059] Calculation of the mean body movement amplitude: (Resolution Δf = 0.02 Hz); Frequency point range: k = 5 (0.1 Hz) to k = 50 (1 Hz), a total of 46 frequency points.
[0060] Extraction of heart rate variability: R peak detection: Perform first-order difference and square processing on the pulse signal to detect local maxima: HRV calculation: Calculate the root mean square difference based on the RR interval sequence: In this embodiment, in the insomnia treatment scenario, the frequency-domain separation runs according to the following parameters: The signal input is scalp electroencephalogram (EEG) signal: after denoising, the amplitude range is ±100 μV, and the signal-to-noise ratio (SNR) > 30 dB; body movement signal: after filtering, the amplitude is 0.01 - 0.1 g; pulse signal: the R-peak interval is 600 - 1200 ms (heart rate 50 - 100 BPM).
[0061] FFT calculation: Input window: 5-second EEG signal (1280 points), 500 points each for body movement and pulse signals (100 Hz × 5 s); FFT output: EEG spectrum resolution 0.2 Hz (21 frequency points in the 8 - 12 Hz frequency band).
[0062] Frequency domain separation result: P α = 15.3 μV 2 / Hz (calculation frequency points 40 - 60, total 21 × 0.2 Hz); A motion = 0.05 g (frequency points 5 - 50, average of 46 points); HRV RMSSD = 45 ms (calculated based on 10 RR intervals).
[0063] Abnormal handling: If the body movement amplitude A motion > 0.5 g, discard the data of the current window; If the number of RR intervals required for HRV calculation is less than 2 (M < 2), suspend the SCS evaluation and wait for new data.
[0064] S3. Calculate the sleep coupling score based on the alpha wave power, body movement amplitude, and heart rate variability parameters, and classify the physiological state according to the sleep coupling score; In this embodiment, the SCS calculation and state classification steps are implemented by an embedded evaluation module. The specific implementation method is as follows: The SCS calculation unit includes a parameter receiving interface, an arithmetic logic unit (ALU), and a status register. The formula for calculating the sleep coupling score: Where: P α : Alpha wave power (unit μV 2 / Hz), obtained by integrating the energy in the 8 - 12 Hz frequency band output by the frequency domain separation module. The calculation formula is: HRV RMSSD : Root mean square difference of heart rate variability (unit ms), calculated based on the RR interval sequence: A motion : Mean body movement amplitude (unit g), obtained by taking the mean of the amplitude in the 0.1 - 1 Hz frequency band: The state classification unit is integrated into the STM32F4 controller (main frequency 168 MHz) and performs state division according to preset thresholds: Threshold setting: Deep sleep: SCS > 50; Light sleep: 20 ≤ SCS ≤ 50; Awake: SCS < 20. Output control logic: When classified as deep sleep, the GPIO pin PA0 outputs a low level (0 V) to turn off the main stimulation circuit; When classified as light sleep, PAO outputs a PWM signal (duty cycle 50%) to trigger dynamic adjustment; When classified as awake, PAO outputs a high level (3.3 V) to stop stimulation and activate logging.
[0065] The data transmission unit encapsulates the SCS value and status code into a binary data frame and transmits it to the dynamic adjustment module through the SPI bus (mode 0, clock frequency 10 MHz). The SCS calculation unit is connected to the frequency domain separation module through the APB1 bus (42 MHz) and receives P α and A motion and HRV RMSSD parameters; The output pins (PA0 - PA2) of the state classification unit are connected to the MOSFET drive circuit of the stimulation controller through an optocoupler isolation circuit (PC817) to ensure electrical isolation.
[0066] If A motion ≤ 0 or HRV RMSSD ≤ 0, discard the current data and set the error flag bit (register ERR = 0x01); If the result exceeds the upper threshold (50) or lower threshold (0), perform clipping processing (SCS ← max(0, min(50, SCS)); Divide the state according to the threshold, update the status register; Encapsulate the data frame and calculate the CRC checksum, and send it to the dynamic adjustment module through the SPI bus.
[0067] In this embodiment, the SCS calculation and classification run according to the following parameters: Input data: P α = 18.5 μV 2 / Hz (integration result of the 8 - 12 Hz frequency band from the frequency domain separation module); A motion = 0.08 g (average value of the 0.1 - 1 Hz frequency band); HRV RMSSD = 52 ms (calculated based on the RR interval sequence [600, 650, 620, 580, 630]).
[0068] SCS calculation process: State classification and output: Classification result: deep sleep (State = 0x01); GPIO control: PAO outputs a low level (0V) to turn off the main stimulation circuit; If the input A motion = -0.1g (invalid value), trigger ERR = 0x01, discard the data and send an empty frame (AA0000000000).
[0069] S4. Dynamically adjust the intensity and frequency of the user's auricular vagus nerve stimulation according to the physiological state and generate feedback data; in this embodiment, S4 includes a basic stimulation intensity calculation unit that receives the SCS value and calculates the reference stimulation intensity according to the formula for dynamically adjusting the stimulation intensity: Where: SCS(t): the sleep coupling score at the current moment (range 0 - 50); The constant 0.5 is the reference current (mA), and 30 is the SCS dynamic range adjustment coefficient to ensure that the output current is linearly negatively correlated with the SCS value.
[0070] S4 also includes a personalized correction unit that corrects the stimulation intensity according to the individual baseline heart rate variability. The formula is: Where: HRV baseline : the baseline heart rate variability of the user at rest (unit: ms), obtained by calculating the mean value through continuous measurement for 5 minutes during the initialization phase and stored in the EEPROM (model AT24C256); HRV current (t): the root mean square difference of HRV at the current moment, provided by the HRV RMSSD output of step S3.
[0071] Dynamically adjust the stimulation frequency according to the SCS value. The calculation formula is: Where: 20Hz is the reference frequency, and 5Hz is the modulation amplitude to ensure that the output frequency is in the range of 15 - 25Hz, matching the optimal response frequency band of the vagus nerve.
[0072] In this embodiment, step S4 runs according to the following parameters: Input data: SCS = 35 (light sleep state, from step S3); HRV baseline = 60ms (measured value during the user initialization phase); HRV current = 55ms (current HRV_RMSSD output).
[0073] Stimulation intensity calculation: Frequency calculation and output: PWM duty cycle: Constant current source voltage:
[0074] S5. Perform intravagal nerve stimulation and update the dynamic adjustment parameters of intravagal nerve stimulation based on the feedback data.
[0075] Step S5 includes a stimulation waveform generation unit that outputs the parameters of the stimulation waveform for intravagal nerve electrical stimulation; among them, the waveform parameters are: Pulse width = 200 μs (100 μs for the positive phase, 100 μs for the negative phase), frequency = f stim (t) Hz The biphasic square wave is generated by an H-bridge circuit (MOSFET model IRF540N), the driving voltage is 5V, and the dead time is set to 10 ns to prevent through current.
[0076] Constant current source control: Based on the I output by the dynamic adjustment module final (t), adjust the reference voltage of the AD8606 operational amplifier through the DAC pin (PA4, 12-bit resolution), and the output current accuracy is: Feedback data acquisition unit, which monitors the impedance change and physiological response during the stimulation in real time: Drive electrode: Apply a sine wave with a frequency of 1 kHz (amplitude 0.5 mA), generated by the DDS chip AD9833; Detection electrode: After being amplified by the instrumentation amplifier AD8421, the voltage V is collected by the ADC (ADS8688, 16-bit) sense ; Impedance calculation: Physiological response index acquisition: α-wave power change rate: Among them, P α (t) is the α-wave power at the current moment, obtained through the frequency domain separation module in step S2.
[0077] HRV dynamic tracking: Update HRV every 30 seconds baseline , if the current value deviates from the baseline by more than 20%, trigger parameter reset.
[0078] Dynamic parameter update unit, which adjusts the stimulation parameters based on the LSTM prediction model: Model training: It is trained using a historical dataset (100 insomnia patients, sampling interval of 5 seconds), with the loss function being MAE and the optimizer being Adam (learning rate 0.001). Embedded deployment: The model is quantized to INT8 precision and runs on the GPU core, with an inference time < 50ms.
[0079] If the prediction deviation |SCS pred - SCS(t)| > 10, adjust the stimulation intensity proportionally: Synchronously update the frequency parameter f stim to ensure it matches the intensity.
[0080] In this embodiment, step S5 runs with the following parameters: Input parameter: I final = 0.764mA, f stim = 24.755Hz; Output of the constant current source: The reference voltage V of AD8606 ref = 1.26V, corresponding to I final = 1.26V / 2kΩ = 0.63mA (corrected to 0.764mA after calibration); Output waveform of the H - bridge: Positive phase pulse width 100μs (PA5 high level), negative phase pulse width 100μs (PA6 high level), dead time 10ns.
[0081] Impedance detection result: V force = 0.5mA × 1kΩ = 0.5V, V sense = 0.48V, calculated as: Physiological response: After stimulation, the power of the α - wave increases from 18.5μV 2 / Hz to 20.72μV 2 / Hz, ΔP α = +12%.
[0082] LSTM prediction and parameter update: Input data: Model output: SCS pred (t + 3min) = 40; Parameter adjustment: Since the deviation |40 - 35| = 5 ≤ 10, maintain the current parameters.
[0083] Please refer to Figure 2 , the present invention also provides an in - ear vagus nerve stimulation control system based on scalp electroencephalogram, including: A signal acquisition module, configured to acquire the scalp electroencephalogram signal, body movement signal and pulse signal of a user; A signal processing module, configured to process and analyze the frequency-domain separated alpha wave power, body movement amplitude and heart rate variability parameters; An evaluation module, configured to calculate a sleep coupling score and classify a physiological state according to the alpha wave power, body movement amplitude and heart rate variability parameters output by the signal processing module; A dynamic adjustment module, configured to dynamically adjust the intensity and frequency of auricular vagus nerve stimulation according to the physiological state of the user; A stimulation execution module, configured to output an auricular vagus nerve electrical stimulation signal and dynamically adjust its parameters.
[0084] The auricular vagus nerve stimulation control device based on scalp electroencephalogram described below and the auricular vagus nerve stimulation control method based on scalp electroencephalogram described above can be referred to each other correspondingly.
[0085] The present invention further provides an auricular vagus nerve stimulation control device based on scalp electroencephalogram, including: An embedded electrode array, configured to acquire scalp electroencephalogram signals; A three-axis gyroscope and a photoelectric sensor, respectively acquiring body movement and pulse signals; A GPU processor, configured to execute a signal frequency-domain separation algorithm; An auricular multi-electrode stimulator, outputting auricular vagus nerve electrical stimulation with adjustable frequency and intensity.
[0086] The device of this embodiment can be used to execute the method embodiment described above, and its principle and technical effect are similar, and will not be elaborated here.
[0087] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram, characterized in that, It includes the following steps: S1. Collect the scalp electroencephalogram signal, body movement signal and pulse signal of the user to be measured; S2. Preprocess and perform frequency-domain separation on the scalp electroencephalogram signal, body movement signal and pulse signal to obtain the alpha wave power, body movement amplitude and heart rate variability parameters; S3. Calculate the sleep coupling score based on the alpha wave power, body movement amplitude and heart rate variability parameters, and divide the physiological state according to the sleep coupling score; S4. Dynamically adjust the intensity and frequency of the auricular vagus nerve stimulation of the user according to the physiological state and generate feedback data; S5. Perform auricular vagus nerve stimulation and update the dynamic adjustment parameters of the auricular vagus nerve stimulation based on the feedback data.
2. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, wherein In S1: The sampling frequency of the scalp electroencephalogram signal is 100 - 512 Hz, and the band-pass filtering range is 8 - 12 Hz, where the sampling frequency is preferably 256 Hz; The body movement signal is collected by a three-axis gyroscope, the sampling frequency is 40 - 200 Hz, and the frequency band is 0.1 - 1 Hz, where the sampling frequency is preferably 100 Hz; The pulse signal is collected by a photoelectric sensor, the sampling frequency is 40 - 200 Hz, and the frequency band is 1 - 3 Hz, where the sampling frequency is preferably 100 Hz.
3. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, wherein S2 includes: Use the GPU parallel computing framework to perform fast Fourier transform on the collected scalp electroencephalogram signal, body movement signal and pulse signal; Separate the alpha wave, body movement signal and pulse signal components through frequency-domain adaptive threshold.
4. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, wherein The calculation formula of the sleep coupling score is: Among them, P α is the α-wave power, HRV RMSSD is the root mean square difference of heart rate variability, A motion is the mean body movement amplitude, and ∈ is a constant to prevent division by zero.
5. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, wherein The formula for dynamically adjusting the stimulation intensity in S4 is: Where, I0 is the reference stimulation intensity; SCS(t) is the calculation function of the sleep coupling score.
6. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 5, wherein S4 also includes correcting the stimulation intensity according to the individual baseline heart rate variability: where I(t) represents the intensity of the user's vagus nerve stimulation in the ear; HRV baseline represents the baseline heart rate variability of the user in the resting state; HRV current represents the currently measured real-time heart rate variability.
7. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, wherein When performing stimulation in S5, the stimulation waveform is a biphasic square wave, the pulse width is 200 μs, and the stimulation frequency is dynamically adjusted according to the following formula: Where, SCS(t) is the calculation function of the user's sleep coupling score.
8. The method for controlling auricular vagus nerve stimulation based on scalp electroencephalogram according to claim 1, characterized in that S5 also includes: Predict the future physiological state based on LSTM. The input of the LSTM includes historical SCS values, stimulation intensity and frequency, and the output is the SCS prediction value for the next 3 minutes, and the stimulation parameters are adjusted in advance according to the prediction result.
9. An in-ear vagus nerve stimulation control system based on scalp electroencephalogram, applied to the in-ear vagus nerve stimulation control method according to any one of claims 1-8, characterized in that, It includes: A signal acquisition module for acquiring the scalp electroencephalogram signal, body movement signal and pulse signal of the user; A signal processing module for processing and analyzing the alpha wave power, body movement amplitude and heart rate variability parameters separated in the frequency domain; An evaluation module for calculating the sleep coupling score and dividing the physiological state according to the alpha wave power, body movement amplitude and heart rate variability parameters output within the signal processing module; A dynamic adjustment module for dynamically adjusting the intensity and frequency of the auricular vagus nerve stimulation according to the physiological state of the user; A stimulation execution module for outputting the auricular vagus nerve electrical stimulation signal and dynamically adjusting its parameters.
10. An intracranial vagus nerve stimulation control device based on scalp electroencephalogram, which is applied to the intracranial vagus nerve stimulation control method based on scalp electroencephalogram according to any one of claims 1-8, characterized in that, It includes: An embedded electrode array for collecting scalp electroencephalogram signals; A three-axis gyroscope and a photoelectric sensor for collecting body movement and pulse signals respectively; A GPU processor for executing the signal frequency-domain separation algorithm; An auricular multi-electrode stimulator for outputting vagus nerve electrical stimulation with adjustable frequency and intensity.
Citation Information
Cited By
Ear conchae area vagus nerve stimulation device and mode recognition method of output waveform of ear conchae area vagus nerve stimulation device
CN120733266A
Pulse signal intelligent switching control method and system based on neural network
CN120950895A
Self-adaptive eTNS dynamic intervention system for neurodevelopmental disorder
CN120960637A
Physiotherapy instrument for realizing closed-loop monitoring based on low-frequency electric pulse body surface stimulation
CN121819170A
Non-invasive user sleep quality monitoring method and system
CN122004794A