Methods, systems, and media for capturing neural signals based on fast gamma power
By using a Savitzky-Golay filter to perform polynomial fitting and threshold detection on fast gamma power signals within a short time window, the problem of insufficient acquisition speed and accuracy in the fast gamma band in existing technologies is solved, and real-time reliable event detection in high-noise environments is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CAPITAL UNIVERSITY OF MEDICAL SCIENCES
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies are insufficient in terms of capture speed and accuracy in fast gamma bands for event detection of EEG, cortical EEG, or deep electrophysiological signals. Especially in high noise and baseline drift environments, traditional methods are prone to false detection or missed detection of fast gamma-enhanced events, and the temporal resolution is insufficient to meet the requirements of brain-computer interfaces.
A neural signal capture method based on fast gamma power is adopted. The neural signal is fitted with a polynomial within a short time window using a Savitzky-Golay filter, and a threshold is determined by combining baseline statistics to detect events.
It improves the capture speed and accuracy of fast gamma band neural signals, reduces the false detection rate and false negative rate, meets the strict timing requirements of brain-computer interfaces, and achieves real-time reliable capture in high noise and baseline unstable environments.
Smart Images

Figure CN121533751B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of neural signal processing and brain-computer interface technology, and in particular to neural signal capture methods, systems and media based on fast gamma power. Background Technology
[0002] In existing technologies, the common practice for event detection of electroencephalogram (EEG), electrocorticography (ECoG), or deep electrophysiological signals is to first perform bandpass filtering on the channel of interest to extract frequency bands such as β, γ, or fast gamma, and then calculate short-time energy or power (e.g., by obtaining time-frequency energy through sliding window summation, Hilbert envelope, or short-time Fourier transform). Subsequently, a fixed threshold, statistical threshold, or simple moving average smoothing plus threshold determination is used to detect the occurrence of the event.
[0003] This type of scheme generally has the advantages of simple implementation and low computational load, but in real neural signal environments, it suffers from strong noise, significant baseline drift, and large differences in the amplitude and shape of power changes between different trials and different subjects. Fast gamma waves have relatively low amplitudes, making them difficult to detect with ordinary peak detection. Furthermore, fast gamma waves are discrete events, requiring start and stop times, thus necessitating high resolution. Traditional moving averages or low-order IIR / FIR (Infinite Impulse Response) smoothing methods often fall short in the following aspects when dealing with signals like fast gamma power, which have abrupt power changes superimposed on a slowly drifting background:
[0004] First, traditional moving averages or simple exponential smoothing only perform linear filtering on the signal, which cannot distinguish between "local trend changes" and "instantaneous noise spikes". This leads to a high false detection rate in high-noise scenarios, or requires setting very conservative thresholds, thus missing obvious fast gamma-enhanced events.
[0005] Second, some solutions use longer time windows to improve smoothness, but this directly sacrifices temporal resolution, resulting in significant delays in detected events, which is not conducive to the strict timing requirements of closed-loop brain-computer interfaces.
[0006] Therefore, it is evident that the capture speed and accuracy of neural signals in the fast gamma band need to be improved. Summary of the Invention
[0007] Therefore, it is necessary to provide a method, system, and medium for capturing neural signals based on fast gamma power to address the above problems.
[0008] To solve the above problems, the present disclosure adopts the following technical solution:
[0009] In a first aspect, this disclosure provides a method for capturing neural signals based on fast gamma power, comprising the following steps:
[0010] Step 1: Obtain neural signals and perform preprocessing;
[0011] Step 2: Filter the preprocessed neural signal to a preset fast gamma band to obtain a narrowband signal;
[0012] Step 3: Divide the narrowband signal into continuous or overlapping short time window segments, where the time corresponding to each short time window segment is greater than or equal to 5ms and less than or equal to 50ms. Calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time.
[0013] Step 4: Apply a Savitzky-Golay filter to the time-varying fast gamma power sequence and fit a polynomial in a sliding window to obtain a smoothed sequence.
[0014] Step 5: Determine a threshold for event filtering based on the smoothed sequence or based on baseline statistics, and detect events based on the threshold and the smoothed sequence.
[0015] In a preferred embodiment, the polynomial is a quadratic polynomial.
[0016] In a preferred embodiment, step 4 includes: using a length of A sliding window is used to perform Savitzky-Golay filtering on the time-varying fast gamma power sequence. , A positive integer; index in the smoothed sequence The data points at this location are The satisfy:
[0017]
[0018] in, The index of the center data point of the sliding window. The index of the data points within the sliding window. For the fast gamma power sequence that varies with time in the index Data points at that location, To and The corresponding weighting coefficients.
[0019] In a preferred embodiment, step 4 includes: constructing a column vector from the fast gamma power data points within a sliding window. The design matrix is constructed based on the relative time coordinate difference or relative position index difference of each fast gamma power data point within the sliding window relative to the center point of the sliding window. There is a matrix equation:
[0020]
[0021] in, For the coefficient vector, , for The constant term in for The matrix, the matrix The form is:
[0022]
[0023] in, This represents the total number of fast gamma power data points contained in a sliding window. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the time coordinates or location index of the fast gamma power data point located at the center of the sliding window;
[0024] The coefficient vector is obtained using the least squares method. Take the coefficient vector constant term in As the index of the current sliding window Data points at .
[0025] In a preferred embodiment, the threshold is a percentile threshold, an adaptive threshold, a multi-level threshold, or a threshold determined based on the mean and standard deviation of fast gamma power data during non-task periods.
[0026] In a preferred embodiment, the step of detecting the event based on the threshold specifically involves: when a sequence segment in the smoothed sequence is greater than the threshold for a given duration, determining the sequence segment and the envelope interval before and after it as an event; wherein, the starting point of the event is defined as the intersection of the signal before the sequence segment and the baseline reference value, and the ending point of the event is defined as the intersection of the signal after the sequence segment and the first return to the baseline reference value; the baseline reference value is obtained based on historical data statistics before the sequence segment is triggered.
[0027] Secondly, this disclosure provides a neural signal capture system based on fast gamma power, comprising:
[0028] The signal acquisition and preprocessing module is used to acquire neural signals and perform preprocessing.
[0029] The filtering module is used to filter the preprocessed neural signals to a preset fast gamma band to obtain a narrowband signal;
[0030] The power value calculation module is used to divide the narrowband signal into continuous or overlapping short time window segments, wherein the time corresponding to the short time window segment is greater than or equal to 5ms and less than or equal to 50ms, and calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time.
[0031] The smoothing module is used to fit a polynomial in a sliding window to the time-varying fast gamma power sequence using a Savitzky-Golay filter to obtain a smoothed sequence.
[0032] The threshold determination and filtering module is used to determine a threshold for event filtering based on the smoothed sequence or based on baseline statistics, and to detect events based on the threshold and the smoothed sequence.
[0033] In a preferred embodiment, the smoothing module is specifically used to employ a length of A sliding window is used to perform Savitzky-Golay filtering on the time-varying fast gamma power sequence. , It is a positive integer; in the smoothed sequence, the index is... The data points at this location are The satisfy:
[0034]
[0035] in, The index of the center data point of the sliding window. The index of the data points within the sliding window. For the fast gamma power sequence that varies with time in the index Data points at that location, To and The corresponding weighting coefficients;
[0036] The smoothing module is specifically used to construct a column vector from the power data points within a fast gamma sliding window. The coefficient vector is The design matrix is constructed based on the relative time coordinate difference or relative position index difference of each fast gamma power data point relative to the center point of the window within the sliding window. There is a matrix equation:
[0037]
[0038] in, For the coefficient vector, , for The constant term in for The matrix, the matrix The form is:
[0039]
[0040] in, This represents the total number of fast gamma power data points contained in a sliding window. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the time coordinates or location index of the fast gamma power data point located at the center of the sliding window;
[0041] The smoothing module is further configured to obtain the coefficient vector using the least squares method. Take the coefficient vector constant term in As the index of the current sliding window Data points at .
[0042] Thirdly, this disclosure provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the neural signal capture method based on fast gamma power described in the first aspect.
[0043] The aforementioned method, system, and medium for capturing neural signals based on fast gamma power organically combine the power sequence of the fast gamma band with the Savitzky-Golay local polynomial fitting method to form a trend enhancement and event capture strategy for neural signals. Specifically, based on short time window segments, for each sliding window, the fitting value of the window center point is output through polynomial local fitting, thereby obtaining a trend signal that is both smooth and retains the characteristics of fast gamma power surges. Then, a threshold is determined based on statistical properties or the smoothed sequence, and finally, events are filtered according to the threshold. This design improves the real-time performance and accuracy of capturing neural signals in the fast gamma band when faced with signals with abrupt changes in fast gamma power superimposed on a slowly drifting background. Attached Figure Description
[0044] Figure 1This is a flowchart illustrating a method in one embodiment of the present disclosure;
[0045] Figure 2 This is a schematic diagram of local quadratic polynomial fitting in the sliding window in step 4 of the method in one embodiment of this disclosure;
[0046] Figure 3 This is a schematic diagram of the threshold determination in step 5 of the method in one embodiment of the present disclosure;
[0047] Figure 4 This is a schematic diagram of the system structure in one embodiment of the present disclosure;
[0048] Figure 5 This is a comparison diagram showing the effect of smoothing processing in the capture method of this disclosure and the moving average capture method in one embodiment of this disclosure;
[0049] Figure 6 For based on Figure 5 A comparison chart of the number of events captured by the two methods;
[0050] Figure 7 For based on Figure 5 A diagram illustrating the time difference between the two methods used to detect the same event. Detailed Implementation
[0051] The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and preferred embodiments.
[0052] In neurophysiological environments characterized by potentially high noise and unstable baselines, a pressing issue is how to process the fast gamma band power sequence of the target channel to fully highlight the power variation trend and achieve real-time and reliable capture of events, especially fast gamma-enhanced events, while ensuring temporal resolution and real-time performance. To address this, this disclosure provides a neural signal capture method based on fast gamma power. This method utilizes high gamma band power variations and combines a Savitzky-Golay filter for trend fitting and threshold discrimination, making it applicable to scenarios such as brain-computer interface task-related event detection, neural state recognition, and closed-loop control of neural modulation.
[0053] It is understood that the frequency range of gamma signals / fast gamma signals has multiple definitions, such as the gamma signal range being 30–100Hz or 30–200Hz. This disclosure applies to any fast gamma signal frequency range. In this embodiment, the signal in the frequency range of 60–200 Hz is considered a fast gamma signal, and the β wave band is the frequency range of 13–30Hz.
[0054] See Figure 1This disclosure provides a method for capturing neural signals based on fast gamma power, including:
[0055] Step 1: Obtain neural signals and perform preprocessing;
[0056] Step 2: Filter the preprocessed neural signal to a preset fast gamma band to obtain a narrowband signal;
[0057] Step 3: Divide the narrowband signal into continuous or overlapping short time window segments, where the time corresponding to each short time window segment is greater than or equal to 5ms and less than or equal to 50ms. Calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time.
[0058] Step 4: Perform polynomial fitting on the time-varying fast gamma power sequence within a sliding window using a Savitzky-Golay filter to obtain a smoothed sequence.
[0059] Step 5: Determine the threshold for event filtering based on baseline statistics or the smoothed sequence, and detect events based on the threshold and the smoothed sequence.
[0060] The neural signal capture method is described in detail below. The method includes:
[0061] Step 1: Obtain the neural signal and perform conventional preprocessing on the neural signal, including DC removal, power frequency removal, and artifact removal. The preprocessing can be part or all of the DC removal, power frequency removal, and artifact removal operations.
[0062] The neural signal is at least one of electroencephalogram (EEG), electrocorticography (ECoG), or local field potential (LFP).
[0063] In one embodiment, step 1 specifically involves selecting a target channel from the multichannel neural recording system and obtaining the neural signal of the target channel. It is understood that the multichannel neural recording system is a specialized device used for the simultaneous acquisition, processing, and analysis of multichannel electrophysiological signals from a living organism.
[0064] In another embodiment, step 1 specifically refers to the brain nerve signal of the signal acquisition device; for example, if the signal acquisition device is an EEG cap, the obtained brain nerve signal is the electroencephalogram (EEG) acquired by the EEG cap; for example, if the signal acquisition device is a cortical EEG signal, the obtained brain nerve signal is the cortical EEG signal; for example, if the signal acquisition device is a microelectrode, the obtained brain nerve signal is the local field potential signal.
[0065] Step 2, perform fast gamma filtering: The preprocessed neural signal is filtered to a preset fast gamma frequency band using a bandpass filter to obtain a narrowband signal. The narrowband signal can also be called a fast gamma band-limited waveform or a fast gamma frequency band-limited signal.
[0066] Step 3, Power Calculation: Divide the narrowband signal into continuous or overlapping short time window segments. Calculate the power value of each short time window segment to obtain a fast gamma power sequence that varies over time, or calculate the power value of each sampling point within each short time window segment to obtain a fast gamma power sequence that varies over time. The power values are called fast gamma power data points.
[0067] Understandably, the adjacent short time window segments may be continuous or overlap. Typically, a fast gamma power sequence varying over time is constructed based on the power values of all short time window segments. The time corresponding to the short time window segment is 5ms to 50ms (inclusive), which can be preset / defined according to actual needs. For example, the preset short time window time is 30ms, and preferably, it is 5ms.
[0068] The power value can be calculated by point-to-point squaring followed by appropriate smoothing. This involves squaring the signal at each sampling point within a short time window segment. Essentially, this squares the amplitude of each sampling point, which is equivalent to calculating the instantaneous power. Smoothing is then applied to remove noise, yielding the power value. Alternatively, the power value can be calculated using the sum of squares or the average of squares within a given time window. This involves squaring the instantaneous voltage values of the signal within a given time window, summing the squares, and then dividing the sum by the number of sampling points within the time window to obtain the average power. The average power is then used as the power value. Another method is to use the square of the Hilbert envelope. Specifically, the signal envelope of a short time window segment is extracted using the Hilbert transform, and the square of this envelope signal is the instantaneous power, which is then used as the power value. The final power calculation results in a fast gamma power sequence that varies over time, denoted as the original power sequence. Each of these data points is called a fast gamma power data point. Preferably, the power value is represented as the square of the instantaneous voltage, with units of μV².
[0069] Step 4: Apply the Savitzky-Golay filter to the original power sequence. Perform quadratic polynomial fitting within the sliding window to obtain the smoothed sequence. .
[0070] Understandably, if step 3 calculates the power value of each short time window segment to obtain a fast gamma power sequence that changes over time, then step 4 performs corresponding smoothing processing on the power value of each short time window segment; if step 3 calculates the power value of each sampling point in each short time window to obtain a fast gamma power sequence that changes over time, then step 4 performs corresponding smoothing processing on the power value of each sampling point in each short time window segment.
[0071] The Savitzky-Golay filter is a method for performing local polynomial fitting on data points in the time domain. Here, the Savitzky-Golay filter is used to fit the original power sequence. Each data point is smoothed, and the Savitzky-Golay filter replaces the original power sequence with the corresponding points on the fitted curve by performing a local quadratic polynomial fitting on the data points. The data points are processed to obtain a smoothed sequence, which is called the smoothed sequence or the output sequence of the Savitzky-Golay filter. The Savitzky-Golay filter eliminates noise in the data while preserving the data trend. Based on this, it will neither misjudge short-term noise as valid events nor "smooth out" real, gradually rising events.
[0072] In the local fitting and smoothing stage, this disclosure introduces a Savitzky-Golay filter (often simply referred to as an SG filter) to transform the polynomial fitting process into a weighted average form, using a convolution formula to achieve smoothing. During fitting, a quadratic function is used, i.e., for the original power sequence... Perform quadratic polynomial fitting within a sliding window.
[0073] For a given time-varying fast gamma power sequence Set the sliding window size to , It is an odd number greater than 2, and , It is a positive integer, that is It is an odd number greater than 2. For index 2, ... The data points, the index range covered by the sliding window is [ , For example, each swipe displays 5 points. The output sequence is defined as follows: , Indicates the output sequence Medium data points (index is) (data points), i.e. To smooth the results, This represents the index of the center data point in each sliding window, and also represents the output sequence. The index of the data point (i.e., the output point). The calculation form is:
[0074]
[0075] in, The index of the center data point of the sliding window. The index of the data points within the sliding window. Represents a sliding window Half the size of a window Data points in a fast gamma power sequence that varies over time (index (corresponding data points) To and The corresponding weighting coefficients. For the output sequence The index of the output point, which is also the index of the data point in the fast gamma power sequence that changes over time, that is: This represents the center data point in the sliding window. The corresponding output point after processing by the Savitzky-Golay filter is , This represents the smoothed data points obtained through Savitzky-Golay filtering. ;
[0076] The above weighting coefficients The solution is obtained by fitting a local quadratic polynomial. Each fitting process is a local data fitting, assuming that the fast gamma power sequence varying with time can be approximated by a quadratic polynomial within the sliding window, for example:
[0077]
[0078] in, It is a quadratic polynomial function. This is the time offset relative to the center point of the window. Denotes the constant term of a quadratic polynomial. Denotes the coefficient of the linear term in a quadratic polynomial. This represents the coefficient of the quadratic term in a quadratic polynomial. To simplify implementation, this disclosure uses the difference in sample index between discrete points and the central data point. Constructing the design matrix as independent variables The fast gamma power data points within a sliding window form a column vector. (This is the target vector for fitting, composed of data from the fast gamma power sequence that changes over time within the window.) Let the coefficient vector be... , for The constant term in the equation is understandable. Let be the coefficient vector of the quadratic polynomial. for The coefficient of the first term in the equation, for The coefficients of the quadratic terms in the matrix give us the matrix equation:
[0079]
[0080] Among the design matrix The specific form is:
[0081]
[0082] in, This represents the total number of fast gamma power data points contained in a sliding window, that is, the total number of data points (i.e., power values) in a time-varying fast gamma power sequence contained in a sliding window. For the first in the sliding window The time coordinates (or location indexes) of each fast gamma power data point. For the first in the sliding window The time coordinates (or location indexes) of each fast gamma power data point. The time coordinate (or position index) of the fast gamma power data point located at the center of the sliding window, i.e. The corresponding time coordinates (or location indexes). express and The difference represents either the time difference or the location index difference; .
[0083] The coefficient vector can be obtained by using the least squares method (fitting all fast gamma power data points in the window with a quadratic polynomial to obtain a fitted curve, minimizing the sum of the squared distances from all fast gamma power data points to this fitted curve). This allows us to obtain the polynomial fitting value at the center point of the window. The value is equal to This is the output of the Savitzky-Golay filter. That is, taking the coefficient vector constant term in The smoothing result of the current sliding window center data point .
[0084] Understandable, according to , The expression can be expanded as described above. The formula for calculation, These are the weighting coefficients of the filter, which are obtained from the least squares solution. The decision, specifically involving solving a system of normal equations and matrix operations, is automatically calculated using the least squares method, depending on the window size and the order of the polynomial.
[0085] The convolution coefficients in the Savitzky-Golay filter are pre-calculated, meaning that step 3 does not require temporary calculation of the convolution coefficients. In practical implementation, the matrix operation described above can be pre-calculated offline to obtain fixed convolution coefficients. In real-time operation, only weighted summation is required to meet the real-time requirements.
[0086] In short, the Savitzky-Golay filter performs local quadratic polynomial fitting on the fast gamma power data points within each sliding window and uses the fitted value at the center of the window as the output, thereby effectively smoothing random noise while preserving the variation pattern of key high-frequency signals.
[0087] In this embodiment, the output sequence is not limited. The number of data points, and the sliding window step size are usually set to 1 by default, meaning that one data point is moved at a time for the sequence. The data from both the central and non-central ends were used as a center point for fitting to obtain the corresponding data. It can be any other sliding step size, preferably one that can cover the sequence across all fitting iterations. All the data in it.
[0088] Figure 2 This is a schematic diagram of local quadratic polynomial fitting within a sliding window, with the vertical axis representing fast gamma power (in μV). 2 In this graph, the hollow circles represent fast gamma power data points, the curves are fitted curves, and the black squares represent smoothed data. .
[0089] Step 5: Determine a threshold, and detect events based on the threshold and the smoothed sequence. In the art, these events are typically referred to as valid events or fast gamma events; that is, the existence of a valid event is determined based on the threshold and the smoothed sequence. It is understood that valid events include fast gamma events.
[0090] When a sequence segment in the smoothed sequence is greater than a threshold for the duration, the sequence segment and its preceding and following envelope are defined as an event. Specifically, the start point of the event is defined as the intersection of the signal before the sequence segment and the baseline reference value, and the end point of the event is defined as the intersection of the signal after the sequence segment and the first return to the baseline reference value. The baseline reference value is obtained based on historical data statistics prior to the triggering of the sequence segment. It is understood that the number of sequence segments that are greater than the threshold for the duration is unlimited, and each such sequence segment corresponds to one event.
[0091] In one embodiment, the threshold is determined based on baseline statistical characteristics, which can be automatically estimated based on the baseline statistical characteristics, such as the mean. and standard deviation Determine the threshold; specifically, collect a segment of fast gamma power data during non-task periods (e.g., pre-task rest periods) and calculate its mean. and standard deviation The threshold can be set to ,in This is an empirical coefficient.
[0092] In another embodiment, the threshold is adopted as one, two or more of percentile threshold, adaptive threshold or multi-level threshold strategies based on the smoothed sequence (or also based on the specific application).
[0093] when When the threshold is exceeded and the duration meets the preset conditions, the time period is determined as a fast gamma event and information such as event label, event start and end time, and peak amplitude is output.
[0094] Understandably, all valid events are retained for subsequent processing, such as brain-computer interface task-related event detection, neural state recognition, or neural modulation closed-loop control.
[0095] The task can be understood as: the follow-up task / processing of the neural signals obtained according to the method.
[0096] Step 5 also includes marking and outputting the detected events, including the event occurrence time, duration, and amplitude information, which can be further used by the brain-computer interface system or other host computer modules.
[0097] Figure 3 This is a schematic diagram of threshold-based event detection, which integrates the original power curve and the smoothed power curve. The horizontal dashed line in the diagram corresponds to the threshold, and the gray area in the diagram corresponds to the time period that is determined to be a fast gamma event.
[0098] In addition to the above-mentioned basic scheme, this application also includes several optional improvement methods, such as using different fast gamma frequency band ranges for different tasks or different brain regions, calculating fast gamma power simultaneously for multiple channels and performing spatial weighted fusion, adaptively adjusting the window length and polynomial order of the Savitzky-Golay filter, or combining other behavioral signals or task instruction information for joint decision-making when determining the threshold. These changes can all be implemented as different configurations of subordinate schemes or embodiments.
[0099] See Figure 4 This disclosure provides a neural signal capture system based on fast gamma power, comprising:
[0100] The signal acquisition and preprocessing module is used to acquire neural signals and perform preprocessing.
[0101] The filtering module is used to filter the preprocessed neural signals to a preset fast gamma band to obtain a narrowband signal;
[0102] The power value calculation module is used to divide the narrowband signal into continuous or overlapping short time window segments, wherein the time corresponding to the short time window segment is greater than or equal to 5ms and less than or equal to 50ms, and calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time.
[0103] The smoothing module is used to fit a quadratic polynomial to the time-varying fast gamma power sequence in a sliding window using a Savitzky-Golay filter to obtain a smoothed sequence.
[0104] The threshold determination and filtering module is used to determine a threshold for event filtering based on the smoothed sequence or based on baseline statistics, and to detect events based on the threshold and the smoothed sequence.
[0105] In this implementation, the smoothing module is specifically used to employ a length of A sliding window is used to perform Savitzky-Golay filtering on the time-varying fast gamma power sequence. , It is a positive integer; in the smoothed sequence, the index is... The data points at this location are , The index of the center data point of the sliding window, the satisfy:
[0106]
[0107] in, The index of the data points within the sliding window. For the fast gamma power sequence that varies with time in the index Data points at that location, To and The corresponding weighting coefficients.
[0108] In this implementation, the smoothing module is specifically used to construct a column vector from the fast gamma power data points within a sliding window. The coefficient vector is , for The constant term in the matrix has the following matrix equation:
[0109]
[0110] in, for The matrix, the matrix The form is:
[0111]
[0112] in, This represents the total number of fast gamma power data points contained in a sliding window. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the time coordinates or location index of the fast gamma power data point located at the center of the sliding window;
[0113] The smoothing module is further configured to obtain the coefficient vector using the least squares method. Take the coefficient vector constant term in The smoothed result of the current sliding window's center data point. .
[0114] In this embodiment, the power value is calculated as follows: the signal envelope is extracted by Hilbert transform, and then the instantaneous power is calculated by squaring it to obtain the power value; or the power value is calculated as follows: the instantaneous voltage value of the narrowband signal is squared and summed, and then the sum of squares is divided by the number of sample points in the window to obtain the average power value; or the power value is calculated as follows: the power value is obtained by squaring point by point and then smoothing to remove noise.
[0115] In this implementation, the threshold is a percentile threshold, an adaptive threshold, a multi-level threshold, or a threshold determined based on the mean and standard deviation of fast gamma power data during non-task periods.
[0116] In this implementation, the threshold determination and filtering module is specifically used to determine the sequence segment and the envelope interval before and after it as an event when the sequence segment in the smoothed sequence is greater than the threshold for a duration.
[0117] In specific implementation, the neural signal capture system based on fast gamma power can refer to the implementation of the neural signal capture method based on fast gamma power in any of the above embodiments, and the specific implementation steps will not be repeated.
[0118] This disclosure also provides a storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the neural signal capture method based on fast gamma power described in any of the above embodiments.
[0119] The technical solution disclosed herein can be implemented in various forms. The entire algorithm process can be implemented as a software program on a general-purpose processor, or the bandpass filter, power calculation, and Savitzky-Golay convolution kernel can be fixedly implemented in an FPGA, DSP, or dedicated ASIC to meet the requirements of high channel number and high sampling rate.
[0120] Figures 5 to 7 This is a comparison chart showing the performance of the capture method based on Moving Mean and the capture method based on Savitzky-Golay disclosed in this paper. Figure 5 The graph shows a comparison of the effects after smoothing. The integrator power on the vertical axis corresponds to the fast gamma power (μV²) of this technical solution (which can be the power output after integration / smoothing). Figure 5 The diagram shows the predefined baseline phase and the trigger point (capture trigger point) for each capture method. It can be seen that compared with the MovingMean capture method, the method disclosed in this paper is better able to preserve the trend signal of the fast gamma power surge characteristics. Figure 6 The graph shows a comparison of the number of events captured by the two methods. The diagonal lines represent the two points that indicate the number of events. Specifically, when the Moving Mean capture method detects a certain number of events, the capture method of this disclosure captures the corresponding number of events. It can be seen that this application captures more events. Figure 7 The time difference between the two methods detecting the same event is given, specifically the time difference between the present disclosure and the Moving Mean Capture Method. Each hollow circle represents a time difference data point. It can be seen that the method of the present disclosure can detect events more quickly and in real time, with higher sensitivity.
[0121] This disclosure discloses a method, system, and medium for capturing neural signals based on fast gamma power. It organically combines the power sequence of the fast gamma band with the Savitzky-Golay local polynomial fitting method to form a trend enhancement and event capture strategy for neural signals. Specifically, based on short time window segments, for each sliding window, polynomial local fitting is performed, and the fitted value of the window center point is output. This obtains a trend signal that is both smooth and retains the characteristics of fast gamma power surges. A threshold strategy is then determined based on statistical properties or the smoothed sequence, and finally, events are selected based on the threshold. This design significantly improves the capture speed and accuracy of neural signals in the fast gamma band when faced with signals containing abrupt changes in fast gamma power and a slowly drifting background. Even in potentially noisy and baseline-unstable neurophysiological environments, it enables real-time and reliable capture of events, especially fast gamma-enhanced events.
[0122] Compared with existing technologies, this disclosure offers several advantages. First, by introducing Savitzky-Golay filtering to achieve local quadratic polynomial fitting, it smooths random noise while preserving the local trend and shape of the fast gamma power curve. Compared to traditional moving averages or simple exponential smoothing, it offers better signal fidelity and trend sensitivity, reducing false positives and false negatives of fast gamma-enhanced events. Second, the short time window segments of this disclosure correspond to times greater than or equal to 5ms and less than or equal to 50ms. Employing a sliding window center output method, it balances temporal resolution and smoothing effect while maintaining controllable window length, preventing significant delays in detected events. This makes it suitable for brain-computer interfaces and closed-loop control tasks with high timing requirements. Third, by determining the threshold for event screening based on the smoothed sequence, or by statistically modeling the baseline power, it avoids relying entirely on human experience for threshold setting, enabling automatic or semi-automatic threshold setting. This enhances the robustness of event detection and reduces instability caused by human intervention. Savitzky-Golay filtering is typically implemented by pre-computing convolution coefficients. Its computational complexity in real-time systems is comparable to that of conventional finite impulse response filtering, thus meeting the real-time processing requirements of high sampling rates and multi-channel environments, and exhibiting good engineering feasibility. In summary, this disclosure outperforms existing solutions in terms of detection accuracy, real-time performance, and robustness.
[0123] The technical solution of this invention can be implemented in various forms. The entire algorithm process can be implemented as a software program on a general-purpose processor, or the bandpass filter, power calculation, and Savitzky-Golay convolution kernel can be fixedly implemented in an FPGA (Field-Programmable Gate Array), DSP (Digital Signal Processor), or dedicated ASIC (Application Specific Integrated Circuit) to meet the requirements of high channel number and high sampling rate.
[0124] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0125] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0126] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A method for neural signal capture based on fast gamma power, characterized by, Includes the following steps: Step 1: Obtain neural signals and perform preprocessing; Step 2: Filter the preprocessed neural signal to a preset fast gamma band to obtain a narrowband signal; Step 3: Divide the narrowband signal into continuous or overlapping short time window segments, where the time corresponding to each short time window segment is greater than or equal to 5ms and less than or equal to 50ms. Calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time. Step 4: Apply a Savitzky-Golay filter to the time-varying fast gamma power sequence and fit a polynomial in a sliding window to obtain a smoothed sequence. Step 5: Determine a threshold for event filtering based on the smoothed sequence or based on baseline statistics, and detect events based on the threshold and the smoothed sequence.
2. The neural signal capture method based on fast gamma power according to claim 1, characterized in that, The polynomial is a quadratic polynomial.
3. The neural signal capture method based on fast gamma power according to claim 2, characterized in that, Step 4 includes: using a length of A sliding window is used to perform Savitzky-Golay filtering on the time-varying fast gamma power sequence. , A positive integer; index in the smoothed sequence The data points at this location are The satisfy: in, The index of the center data point of the sliding window. The index of the data points within the sliding window. For the fast gamma power sequence that varies with time in the index Data points at that location, To and The corresponding weighting coefficients.
4. The neural signal capture method based on fast gamma power according to claim 3, characterized in that, Step 4 includes: constructing a column vector from the fast gamma power data points within a sliding window. The design matrix is constructed based on the relative time coordinate difference or relative position index difference of each fast gamma power data point within the sliding window relative to the center point of the sliding window. There is a matrix equation: in, For the coefficient vector, , for The constant term in for The matrix, the matrix The form is: in, This represents the total number of fast gamma power data points contained in a sliding window. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the time coordinates or location index of the fast gamma power data point located at the center of the sliding window; The coefficient vector is obtained using the least squares method. Take the coefficient vector constant term in As the index of the current sliding window Data points at .
5. The neural signal capture method based on fast gamma power according to claim 1, characterized in that, The threshold can be a percentile threshold, an adaptive threshold, a multi-level threshold, or a threshold determined based on the mean and standard deviation of fast gamma power data during non-task periods.
6. The neural signal capture method based on fast gamma power according to claim 1, characterized in that, The specific method of detecting events based on the threshold is as follows: when a sequence segment in the smoothed sequence is greater than the threshold for a given duration, the sequence segment and the envelope interval before and after it are determined as an event.
7. The neural signal capture method based on fast gamma power according to claim 6, characterized in that, The start point of the event is defined as the intersection of the signal before the sequence segment and the baseline reference value, and the end point of the event is defined as the intersection of the signal after the sequence segment and the baseline reference value for the first time; the baseline reference value is obtained based on historical data statistics before the sequence segment is triggered.
8. A neural signal capture system based on fast gamma power, characterized in that, include: The signal acquisition and preprocessing module is used to acquire neural signals and perform preprocessing. The filtering module is used to filter the preprocessed neural signals to a preset fast gamma band to obtain a narrowband signal; The power value calculation module is used to divide the narrowband signal into continuous or overlapping short time window segments, wherein the time corresponding to the short time window segment is greater than or equal to 5ms and less than or equal to 50ms, and calculate the power value of each short time window segment to obtain a fast gamma power sequence that changes with time. The smoothing module is used to fit a polynomial in a sliding window to the time-varying fast gamma power sequence using a Savitzky-Golay filter to obtain a smoothed sequence. The threshold determination and filtering module is used to determine a threshold for event filtering based on the smoothed sequence or based on baseline statistics, and to detect events based on the threshold and the smoothed sequence.
9. The neural signal capture system based on fast gamma power according to claim 8, characterized in that, The smoothing module is specifically used to employ a length of... A sliding window is used to perform Savitzky-Golay filtering on the time-varying fast gamma power sequence. , It is a positive integer; in the smoothed sequence, the index is... The data points at this location are The satisfy: in, The index of the center data point of the sliding window. The index of the data points within the sliding window. For the fast gamma power sequence that varies with time in the index Data points at that location, To and The corresponding weighting coefficients; The smoothing module is specifically used to construct a column vector from the power data points within a fast gamma sliding window. The design matrix is constructed based on the relative time coordinate difference or relative position index difference of each fast gamma power data point relative to the center point of the window within the sliding window. There is a matrix equation: in, For the coefficient vector, , for The constant term in for The matrix, the matrix The form is: in, This represents the total number of fast gamma power data points contained in a sliding window. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the first in the sliding window The time coordinates or location index of a fast gamma power data point. For the time coordinates or location index of the fast gamma power data point located at the center of the sliding window; The smoothing module is further configured to obtain the coefficient vector using the least squares method. Take the coefficient vector constant term in As the index of the current sliding window Data points at .
10. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the neural signal capture method based on fast gamma power as described in any one of claims 1-7.
Citation Information
Patent Citations
Method for positioning brain functions based on electrocorticogram under median nerve electrical stimulation
CN110742604A
Water quality index prediction method based on hybrid long-short-term memory neural network
CN110852515A