SSVEP signal processing and screening method and device based on brain-computer interface
By introducing data preprocessing and spectrum data screening steps in SSVEP signal processing, the problems of complex environmental noise interference, individual differences neglect, low signal screening efficiency and insufficient data quality in the prior art are solved, and efficient SSVEP signal screening and data quality improvement are achieved.
Patent Information
- Application Number
- CN202411711516.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The existing SSVEP signal processing technology has defects in complex environmental noise interference, individual differences neglect, low signal screening efficiency and data quality constraints on subsequent tasks.
A SSVEP signal processing and screening method based on brain-computer interface is proposed. Through data preprocessing and spectrum data screening steps, including time-domain mean denoising, filtering processing and fast Fourier transform, combined with local maximum value screening and frequency screening, the frequency consistent with the set response frequency is quickly selected.
Effectively remove physiological artifacts and noise interference, improve SSVEP signal quality, reduce signal screening time, improve data set quality, and provide high-quality data support for subsequent tasks.
Smart Images

Figure CN119646612A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of brain-computer interface and signal processing technology, and specifically relates to a method and device for SSVEP signal processing and screening based on brain-computer interface. Background Art
[0002] Brain-computer interface (BCI) has become a hot research direction in the field of human-computer interaction and medical rehabilitation. Electroencephalogram (EEG)-based BCI has attracted much attention due to its convenience, low cost and non-invasiveness. Among the EEG paradigms, steady-state visual evoked potential (SSVEP) has become one of the popular paradigms due to its high signal-to-noise ratio and low training time.
[0003] In the BCI system based on SSVEP, the quality and feature extraction of SSVEP signal data are crucial. However, SSVEP signal acquisition is interfered by power frequency and physiological artifacts, and the signal processing methods are mainly divided into three categories: time domain, frequency domain, and time-frequency domain. Based on the characteristic that the SSVEP signal frequency is consistent with the response frequency, the existing technology mainly focuses on developing algorithms in the frequency domain, mainly extracting the signal features by analyzing the frequency characteristics of the SSVEP signal, and then performing tasks such as classification, target recognition, encoding and decoding, etc.
[0004] In the relevant existing technologies, power spectral density analysis (PSDA) calculates the power spectral density of the SSVEP signal to identify the main frequency components, uses FFT to transform the signal, senses the peak at the stimulation frequency and compares it with the threshold. The disadvantages are low classification accuracy when the noise is strong or the signal is unstable, and ignores the spatial dependency of multi-channel signals; canonical correlation analysis (CCA) identifies the SSVEP signal by finding the maximum correlation between the EEG signal and the reference signal, and uses multi-channel spatial information to enhance robustness, but does not consider the non-fundamental frequency components of the signal, and may miss important spectral information, resulting in decreased classification robustness; filter bank CCA (FBCCA) decomposes the SSVEP signal into sub-components of different frequency bands and performs the CCA algorithm to obtain the classification result by weighted average correlation coefficients. The generalization ability for different users needs to be further verified.
[0005] The above-mentioned existing technologies have common shortcomings, such as not considering power frequency interference and baseline offset, lack of flexibility, insufficient consideration of the quality of original signal data and mostly using manual screening.
[0006] In view of this, it is very meaningful to propose a method and device for SSVEP signal processing and screening based on brain-computer interface. Summary of the invention
[0007] In order to solve the problems existing in the existing SSVEP signal processing technology, such as complex environmental noise interference, neglect of individual differences, low signal screening efficiency and data quality restricting subsequent tasks, the present invention provides a method and device for SSVEP signal processing and screening based on brain-computer interface to solve the above-mentioned technical defects.
[0008] In a first aspect, the present invention proposes a method for SSVEP signal processing and screening based on a brain-computer interface, the method comprising the following steps:
[0009] Data import and parameter setting: import the acquired SSVEP signal data and set the response frequency, the window size of the local maximum value and the offset value of the response frequency;
[0010] Data denoising: time-domain mean calculation of SSVEP signals collected from multiple channels to remove physiological artifacts;
[0011] Circularly process each data block, including a data preprocessing step, performing baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; and also including a spectrum data screening step, extracting the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screening out the frequency that is consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and is within the allowable offset tolerance value;
[0012] The results show that the corresponding information is output according to the filtering conditions. If the filtering conditions are met, the qualified data blocks and their characteristic frequencies are output, and the spectrum diagram of all qualified databases is displayed; if not met, "no block found" is output.
[0013] Preferably, the spectrum data screening step includes local maximum screening:
[0014] For spectrum data, a fixed window size is set, and the local maximum value of the amplitude and its corresponding frequency are extracted in each window. Assuming the window size is N, in the window Wi, search for: Where A(f) is the spectrum amplitude, f max and A max are the frequency and amplitude of the local maximum amplitude, respectively.
[0015] Further preferably, frequency screening is also included:
[0016] For the extracted local maximum, the frequency consistent with the SSVEP signal characteristics is screened out, which means that the selected signal frequency should be consistent with the set response frequency fr and its second harmonic frequency 2fr and third harmonic frequency 3fr. The frequency selection conditions are as follows: |f max -f r|<Δf, where Δf is the allowable offset tolerance value. By comparing the maximum amplitudes at the response frequency and its harmonic frequencies, only frequencies that meet the conditions are retained.
[0017] Preferably, in the data preprocessing step, the baseline drift is removed by using a low-pass filter with a cutoff frequency of 3 Hz to filter out low-frequency interference to stabilize the baseline, and a Butterworth filter design is adopted, and the formula is expressed as follows: Among them, H LP (s) represents the transfer function of the low-pass filter; s represents a complex variable, which is used to describe the frequency characteristics of the system in Laplace transform; ω c Represents the cutoff frequency of the low-pass filter, cutoff frequency ω c =2π×3rad / s; N represents the order of the filter, N=1; a1,a1,…,a N Represents the coefficients of the filter.
[0018] Preferably, in the data preprocessing step, the notch filter uses a 4th-order notch filter with a center frequency of 50 Hz to remove power frequency interference and avoid interference from device noise of power supply electrical appliances. The formula is as follows: Among them, H notch (s) represents the transfer function of the notch filter; s is a complex variable used to describe the frequency characteristics of the system; ω n Represents the center frequency of the notch filter, center frequency ω n =2π×50; ζ represents the damping ratio of the filter.
[0019] Preferably, in the data preprocessing step, the bandpass filter is a 4th order bandpass filter with a frequency range from 4 Hz to 40 Hz, which filters out other noises except the fundamental wave and harmonics, thereby retaining the target frequency, and the formula is expressed as follows: Among them, H bandpass (s) represents the transfer function of the bandpass filter; s is a complex variable used to describe the frequency characteristics of the system; ω l represents the lower cutoff frequency of the bandpass filter, ω l =2π×4rad / s;ω h represents the high cutoff frequency of the bandpass filter, ω h =2π×40rad / s.
[0020] Preferably, in the data preprocessing step, the formula of the overall data preprocessing process is as follows:
[0021] y(n)=L -1 [L(x(n))·H Lp (S) H noth (S) H bandpass (S)]
[0022] Y(k)=FFT(y(n)),k=0,1,2……,N-1
[0023] Among them, x(n) is the original input signal sequence, n represents the discrete time point of the signal; y(n) is the signal sequence after a series of filtering processes; L(·) and L -1 (·) represent the linear transformation of signals between different domains and their inverse transformation respectively; FFT(·) represents the fast Fourier transform, which is used to convert the time domain signal y(n) into the frequency domain to obtain the frequency domain signal Y(k), where k represents the frequency index and N is the length of the input signal.
[0024] Preferably, the response frequency fr is set to [6.25, 7.75, 9.25, 10.75, 12.25].
[0025] In a third aspect, an embodiment of the present invention provides a device for processing and screening SSVEP signals based on a brain-computer interface, comprising:
[0026] A data import module configured to import acquired SSVEP signal data;
[0027] A parameter setting module configured to set a response frequency, a window size of a local maximum value, and an offset value of the response frequency;
[0028] A data denoising module, configured to perform time domain mean calculation on SSVEP signals collected from multiple channels to remove physiological artifacts;
[0029] A data block processing module is configured to cyclically process each data block, including: a data preprocessing submodule, configured to perform baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; a spectrum data screening submodule, configured to extract the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screen out the frequency that is consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and is within the allowable offset tolerance value;
[0030] The result display module is configured to output corresponding information according to the filtering conditions. If the filtering conditions are met, the qualified data blocks and their characteristic frequencies are output, and the frequency spectrum of all qualified databases is displayed; if not, "no block found" is output.
[0031] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0032] Compared with the prior art, the beneficial results of the present invention are:
[0033] The technical solution of the present invention is mainly divided into data preprocessing and frequency screening. The data preprocessing is carried out through time domain and frequency domain filter processing to simply and effectively remove the physiological artifacts of the SSVEP signal and the noise interference in the actual working environment, thereby improving the quality of the original SSVEP signal; the frequency screening step overcomes the shortcomings of previous manual screening that is time-consuming and labor-intensive. According to the characteristics of the SSVEP signal and the fundamental harmonic characteristics, the function parameters are adjusted according to individual differences, and the effective SSVEP signals are quickly screened and retained, thereby providing strong support for subsequent tasks such as high-quality data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and are used together with the description to explain the principles of the present invention. It will be easy to recognize other embodiments and many expected advantages of the embodiments because they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar parts.
[0035] Figure 1 Schematic diagram of the flow of a method for SSVEP signal processing and screening based on a brain-computer interface according to an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of a process of local maximum screening according to an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of a program flow of frequency screening according to an embodiment of the present invention;
[0038] Figure 4 It is a general scheme flow chart of a specific embodiment of the present invention;
[0039] Figure 5 A schematic diagram of the time domain and frequency domain of data preprocessing according to an embodiment of the present invention;
[0040] Figure 6 This is a diagram of a screening result of an experiment in an embodiment of the present invention;
[0041] Figure 7 A comparison diagram of the screening results before and after the embodiment of the present invention;
[0042] Figure 8 It is a schematic diagram of the architecture of a device for SSVEP signal processing and screening based on a brain-computer interface according to an embodiment of the present invention;
[0043] Fig. 9 It is a schematic diagram of the structure of a computer device suitable for implementing an electronic device of an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0045] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0046] The embodiments of the present invention are intended to solve several deficiencies in the existing SSVEP signal processing technology. The main problems include:
[0047] 1. Noise interference in complex environments: The performance of existing technologies in high-noise or complex interference environments is limited, and the signal recognition and classification capabilities are affected;
[0048] 2. Ignoring individual differences: Existing algorithms cannot adjust parameters well based on individual differences;
[0049] 3. Inefficient signal screening: Currently, there is a lack of signal screening in the data processing process, and experimenters often use time-consuming manual methods for screening;
[0050] 4. Constraints of data quality on subsequent tasks: High-quality datasets are crucial for classification and target recognition tasks that combine machine learning and deep learning, but existing technologies are often insufficient in this regard.
[0051] To address these issues, the embodiments of the present invention combine time domain and spectrum analysis techniques to suppress physiological artifacts, overcome noise interference in the experimental environment (such as low frequency and power frequency interference), and improve signal quality. By presetting adjustable parameters, the problem of individual differences is solved. By introducing the fundamental and harmonic characteristics of the signal, combined with the characteristics that the SSVEP signal frequency is consistent with the response frequency, the present invention achieves efficient screening of SSVEP signals, greatly reduces screening time, and improves the efficiency of signal analysis and the quality of the data set.
[0052] In general, the technical solution of the present invention aims to provide an improved SSVEP signal processing method and device, which can efficiently utilize multi-channel information in complex environments, adapt to individual differences, realize real-time and accurate signal processing and data screening, and can provide high-quality data sets according to subsequent needs in combination with deep learning algorithms to achieve tasks.
[0053] In a first aspect, an embodiment of the present invention discloses a method for processing and screening SSVEP signals based on a brain-computer interface, such as Figure 1 As shown, the method comprises the following steps:
[0054] S1. Data import and parameter setting: import the acquired SSVEP signal data, and set the response frequency, the window size of the local maximum value, and the offset value of the response frequency;
[0055] Specifically, in this embodiment, the response frequency fr is set to [6.25, 7.75, 9.25, 10.75, 12.25].
[0056] S2, data denoising, performing time domain mean calculation on the SSVEP signals collected from multiple channels to remove physiological artifacts;
[0057] S3, loop processing each data block, including a data preprocessing step, performing baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; also including a spectrum data screening step, extracting the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screening out the frequency that is consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and is within the allowable offset tolerance value;
[0058] Specifically, the spectrum data screening step includes local maximum screening: for the extracted local maximum, the frequency consistent with the SSVEP signal characteristics is screened out, which means that the selected signal frequency should be consistent with the set response frequency fr and its second harmonic frequency 2fr and third harmonic frequency 3fr. The frequency selection conditions are as follows: |f max -f r |<Δf, where Δf is the allowable offset tolerance value. By comparing the maximum amplitudes at the response frequency and its harmonic frequencies, only frequencies that meet the conditions are retained.
[0059] Figure 2 The flowchart for local maximum screening is as follows: Figure 2 As shown, the specific steps include:
[0060] 21-Set variables: input window size and frequency (x) range;
[0061] 22- Checks if the range is empty; if the range is empty, returns "false".
[0062] 23-Finding Maximum: Find the maximum value in a given frequency range.
[0063] 24- If no maximum value is found, return "false".
[0064] 25- Check if range is empty (check again): If range is empty, return "false".
[0065] 26-Save array: Save the frequency (x) and the corresponding maximum value (y) into an array.
[0066] 27-Return array: Returns an array that stores frequencies and maximum values.
[0067] Furthermore, it also includes frequency screening: for the extracted local maximum, the frequency consistent with the SSVEP signal characteristics is screened out, which means that the selected signal frequency should be consistent with the set response frequency fr and its second harmonic frequency 2fr and third harmonic frequency 3fr. The frequency selection conditions are as follows: |f max -f r |<Δf, where Δf is the allowable offset tolerance value. By comparing the maximum amplitudes at the response frequency and its harmonic frequencies, only frequencies that meet the conditions are retained.
[0068] Figure 3 The flowchart of the frequency screening process is as follows: Figure 3 As shown, the specific steps include:
[0069] 31- Set variables: Enter the response frequency (fre) and offset value.
[0070] 32-Find Amplitude Maximum: Find the maximum amplitude (y_max) within a given frequency range.
[0071] 33-Output corresponding frequency: Output the frequency corresponding to the maximum amplitude (x_max).
[0072] 34- Check frequency difference: Calculate the absolute value of the frequency difference (|x_max-fre|).
[0073] 35-If the frequency difference is less than the offset value, return "true".
[0074] 36-If the frequency difference is greater than or equal to the offset value, return "false".
[0075] S4. Results are displayed, and corresponding information is output according to the filtering conditions. If the filtering conditions are met, the qualified data blocks and their characteristic frequencies are output, and the spectrum diagrams of all qualified databases are displayed; if not, "no block found" is output.
[0076] SSVEP refers to the electroencephalogram generated in the visual cortex when a subject looks at a flickering visual stimulus modulated by a constant frequency. The frequency of SSVEP is the same as the response frequency of the received visual stimulus and its harmonics. With this characteristic of SSVEP, it is possible to design a BCI system based on SSVEP, such as an SSVEP-based speller, in which different targets are encoded by different stimulus frequencies. When the subject needs to select a command, they can look at the corresponding flickering target stimulus encoding the command on the interface. The generated SSVEP can be recognized by a specially designed decoder to obtain the subject's intention. SSVEP has significant advantages: high signal strength, easy detection and recognition, high information transmission rate, short user training time, etc.
[0077] Signal processing is a crucial technology in BCI systems, which involves how to extract effective information from raw EEG signals, namely EEG signal features. However, when the BCI system based on SSVEP collects data, it is mainly affected by two aspects. On the one hand, the stimulation frequency of SSVEP itself is in the low frequency band (4-50HZ), which is easily interfered by the power frequency. On the other hand, it is caused by physiological artifacts such as electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, body shaking, etc. caused by the wearer. Therefore, it is crucial to process the original SSVEP signal. At present, in BCI systems, the most widely used signal processing methods are mainly concentrated in the time domain, frequency domain, and time-frequency domain.
[0078] From the time domain perspective, signal processing techniques are used to quantify signal behavior by analyzing how data changes over time. This approach is particularly important in SSVEP signal processing because SSVEP signals usually need to be recorded and observed over long periods of time. In order to extract time domain features, windowing and segmentation techniques are usually used to divide the signal into multiple small segments. Local features within each window are extracted, allowing researchers to track changes in these features over different time periods. Since physiological signals usually have nonlinear and non-stationary characteristics, windowing and segmentation are particularly critical when processing such signals. Commonly used SSVEP time domain techniques include time domain superposition, autoregressive modeling (AR), and so on.
[0079] From the frequency domain point of view, frequency domain signal analysis focuses on observing the specific frequency components and distribution of SSVEP signals, which involves converting time domain signals to frequency domain for more in-depth analysis. In SSVEP signals, frequency domain analysis can reveal the frequency distribution of signals such as harmonic distribution and the contrast of specific frequencies such as response frequency. Commonly used frequency domain techniques include Fourier transform (FFT), power spectral density (PSD), filter banks, etc.
[0080] From the perspective of time-frequency domain, both time domain and frequency domain have their limitations. In order to fully reflect the dynamic changes of the signal, the time-frequency domain combines the spectral characteristics of the signal with the time domain characteristics for simultaneous analysis. Common EEG time-frequency feature extraction techniques include short-time Fourier transform, S-transform, matching pursuit, etc.
[0081] In the BCI system based on SSVEP, the quality and feature extraction of SSVEP signal data are crucial. Based on the characteristics that the SSVEP signal frequency is consistent with the response frequency, the existing technology mainly focuses on developing algorithms in the frequency domain, mainly extracting the signal features by analyzing the frequency characteristics of the SSVEP signal, and then performing tasks such as classification, target recognition, encoding and decoding, etc.
[0082] How Power Spectral Density Analysis (PSDA) works: This method identifies the main frequency components of the signal by calculating the power spectral density of the SSVEP signal. It uses FFT (Fast Fourier Transform) to convert the time domain signal into a frequency domain signal and induces a peak in the amplitude spectrum at the stimulation frequency of the SSVEP signal, which must be greater than the average amplitude of the lower and higher frequency bands. The specific process is to first search for the peak and determine the corresponding frequency, and then to avoid false positives caused by spontaneous EEG signals, ensure that the normalized signal amplitude of the determined frequency is above a predefined threshold.
[0083] The calculation formula of the normalized amplitude spectrum is: Wherein, X is the original signal data; FFT(X) means fast Fourier transform (Fast Fourier Transform) of the original signal; |FFT(X)| means the modulus (amplitude) of FFT(x); ∑|FFT(x)| means summing the amplitudes of all frequency components.
[0084] Main disadvantages and shortcomings: PSDA has low classification accuracy under conditions of strong noise interference or unstable signals. In addition, since this method only focuses on the power information of the single-channel signal itself, it ignores the spatial dependence between signals of different channels and cannot fully utilize the signal information of multiple channels.
[0085] Working principle of canonical correlation analysis (CCA): The CCA method identifies SSVEP signals by finding the maximum correlation between EEG signals and reference signals (such as sine waves and cosine waves). At the same time, it uses multi-channel spatial information to enhance the robustness of signal processing. The specific process of CCA: First, the representative comprehensive index of the two groups of signals is calculated, and then the correlation coefficient of the two indicators is used to reflect the overall correlation of the two groups of signals. Finally, the stimulation frequency of the SSVEP signal is determined according to the maximum correlation coefficient. The specific process is as follows, for the collected multi-channel EEG signal matrix X:
[0086]
[0087] Where M is the number of leads and N is the number of sampling points. The detailed steps of using CCA to classify EEG signals are as follows: First, use sine functions with different integer multiple frequencies to construct a template signal set Y:
[0088]
[0089] Among them, f k is the stimulation frequency, N h is the total number of harmonics, N is the number of sampling points, and Fs is the sampling frequency. The core principle of CCA is to find two suitable linear transformations Wx and Wy so that an indicator x = X T W x and another indicator y=Y T W y The correlation coefficient between is the largest. Therefore, an optimization problem can be constructed to obtain the maximum correlation coefficient:
[0090]
[0091] Among them, the maximum correlation coefficient between the collected multi-channel EEG signal X and the reference signal Y represents the corresponding stimulation frequency.
[0092] Disadvantages and shortcomings: The traditional CCA method does not consider the non-fundamental frequency components of the signal, which may miss some important spectral information, resulting in reduced classification robustness.
[0093] Working principle of filter bank CCA (FBCCA): The FBCCA algorithm decomposes the SSVEP signal into multiple sub-components of different frequency bands, that is, a bandpass filter bank is used to decompose the input EEG signal into N sub-band components, and then the CCA algorithm is performed on these N sub-components. Then, a weighted average is made on the correlation coefficients obtained on the N sub-bands, and an overall correlation coefficient value is obtained corresponding to each stimulation frequency fk, k = 1, 2, ..., S. Finally, the largest correlation coefficient value is selected from these S correlation coefficient values, and its corresponding frequency is used as the final classification result.
[0094] The specific process is as follows: First, we use a zero-phase type I Chebyshev filter (other filters can also be used) to decompose the original EEG signal into N sub-bands. Then, we apply the standard CCA algorithm to each sub-band component and obtain the correlation coefficient value between each sub-band component and the predefined reference signal (corresponding to all stimulation frequencies). Among them, the correlation coefficient value corresponding to the Kth reference signal is the vector p k It means that it contains the correlation coefficient values corresponding to N sub-bands, as shown in the expression:
[0095]
[0096] Then we perform a weighted square sum fusion on the N sub-band components, that is,
[0097]
[0098] Among them, the weighting function w(n) is defined as:
[0099] w(n)=n -a +b,n∈[1,N]
[0100] Among them, a and b are constants, and their values are determined when the classifier performance reaches the best case.
[0101] Finally, we obtain S weighted correlation coefficients corresponding to S stimulation frequencies, and take the stimulation frequency with the largest one, which is the target frequency we identify.
[0102] Main shortcomings and deficiencies: Although FBCCA improves recognition and classification efficiency by introducing harmonic components through filter groups, due to the large differences between different individuals, its generalization ability for different users needs further verification.
[0103] The common disadvantages of the above algorithms are:
[0104] 1. The noise interference caused by power frequency interference and baseline offset is not considered.
[0105] 2. Usually adopt an "end-to-end" approach and are designed for specific task scenarios, such as classification, target recognition, encoding and decoding, etc., which results in this type of method often lacking flexibility and being difficult to achieve general purposes.
[0106] 3. The quality of the original SSVEP signal data is not given enough consideration, and there are fewer preprocessing and screening steps. Usually, manual screening methods are used to form a data set for algorithm processing.
[0107] The embodiments of the present invention aim to solve several deficiencies in the existing SSVEP signal processing technology. The technical solution of the present invention aims at the technical problems in the existing SSVEP signal processing and proposes an efficient SSVEP signal processing and screening process to improve the accuracy and efficiency of signal recognition.
[0108] like Figure 4 The figure shows a general scheme flow chart of a specific embodiment of the present invention, and the specific scheme is as follows:
[0109] 1. Data import and parameter setting:
[0110] First, the system imports the SSVEP signal data and sets the key parameters of the function, including the response frequency, the window size of the local maximum value, and the offset value of the response frequency. r is [6.25,7.75,9.25,10.75,12.25].
[0111] 2. Data denoising and preprocessing:
[0112] The time domain mean value of the SSVEP signals collected from multiple channels is calculated to remove physiological artifacts and introduce noise suppression. This process aims to improve the purity of the signal and provide an optimized initial signal environment for the next step of data processing.
[0113] 3. Loop through each data block: The system loops through each data block to ensure its integrity and accuracy:
[0114] 3.1 Data preprocessing is as follows: baseline drift removal, notch filtering, bandpass filtering and FFT transformation are performed on each data block in turn;
[0115] Remove baseline drift: Use a 3HZ low-pass filter to filter out low-frequency interference to stabilize the baseline.
[0116] Using Butterworth filter design:
[0117]
[0118] Among them, H LP (s) represents the transfer function of the low-pass filter; s represents a complex variable, which is used to describe the frequency characteristics of the system in Laplace transform; ω c Represents the cutoff frequency of the low-pass filter, cutoff frequency ω c =2π×3rad / s; N represents the order of the filter, N=1; a1,a1,…,a N Represents the coefficients of the filter.
[0119] Notch filtering: A 50HZ 4th-order notch filter is used to remove power frequency interference and avoid interference from noise from power supplies, electrical appliances and other devices.
[0120]
[0121] Among them, H notch (s) represents the transfer function of the notch filter; s is a complex variable used to describe the frequency characteristics of the system; ω n Represents the center frequency of the notch filter, center frequency ω n =2π×50; ζ represents the damping ratio of the filter.
[0122] Bandpass filtering: 4th order bandpass filter, frequency range from 4Hz to 40Hz. Filter out the fundamental wave and other noises except harmonics, thus retaining the target frequency.
[0123]
[0124] Among them, H bandpass (s) represents the transfer function of the bandpass filter; s is a complex variable used to describe the frequency characteristics of the system; ω l represents the lower cutoff frequency of the bandpass filter, ω l =2π×4rad / s;ω h represents the high cutoff frequency of the bandpass filter, ω h =2π×40rad / s.
[0125] FFT transformation: Perform fast Fourier transform on the processed data to prepare for spectrum analysis. The formula for the overall data preprocessing process is as follows:
[0126] y(n)=L -1 [L(x(n))·H Lp (S) H noth (S) H bandpass (S)]
[0127] Y(k)=FFT(y(n)),k=0,1,2……,N-1
[0128] Among them, x(n) is the original input signal sequence, n represents the discrete time point of the signal; y(n) is the signal sequence after a series of filtering processes; L(·) and L -1 (·) represent the linear transformation of signals between different domains and their inverse transformation respectively; FFT(·) represents the fast Fourier transform, which is used to convert the time domain signal y(n) into the frequency domain to obtain the frequency domain signal Y(k), where k represents the frequency index and N is the length of the input signal.
[0129] like Figure 5 Shown are time domain and frequency domain schematics of data preprocessing.
[0130] 3.2 Spectrum data screening is as follows:
[0131] Local maximum screening: For spectrum data, we set a fixed window size and extract the local maximum of the amplitude and its corresponding frequency in each window. Assuming the window size is N, in the window Wi, we look for:
[0132]
[0133] Where A(f) is the spectrum amplitude, f max and A maxare the frequency and amplitude of the local maximum amplitude respectively. This method can effectively reduce the calculation time and enhance the reliability of local peak identification.
[0134] Frequency screening: For the extracted local maximum, we screen out the frequency that is consistent with the SSVEP signal characteristics. This means that the selected signal frequency should be consistent with the set response frequency f r and its second and third harmonic frequencies (2f r , 3f r ). The frequency selection conditions are as follows:
[0135] |f max -f r |<Δf
[0136] Where Δf is the allowed offset tolerance. By comparing the maximum amplitude at the response frequency and its harmonic frequencies, we only retain the frequencies that meet the conditions.
[0137] 4. Results display
[0138] Finally, the system outputs corresponding information based on the processing results. If the screening conditions are not met, the system outputs "no block found", which means that the results of all experimental times are not acceptable. If the conditions are met, the system outputs the data blocks that meet the conditions and their characteristic frequencies, and displays the spectrum of all data blocks that meet the conditions. Figure 6 Filter results for an experiment.
[0139] By implementing the above-mentioned SSVEP signal processing and screening scheme, not only the time required for data screening is greatly reduced, but also the signal quality is significantly improved, enabling experimenters to more effectively screen out high-quality SSVEP data. Figure 7 This is a before-and-after comparison of the screening results. This provides a reliable data set for subsequent machine learning and deep learning algorithms in tasks such as classification and target recognition. In addition, this solution can also be used to check whether there are errors in the basic operations during data acquisition, thereby helping beginners to better learn and observe the characteristics of SSVEP signals. Through these advantages, the system provides strong support for the processing and analysis of SSVEP signals.
[0140] The technical solution of the present invention is mainly divided into data preprocessing and frequency screening. The data preprocessing is carried out through time domain and frequency domain filter processing to simply and effectively remove the physiological artifacts of the SSVEP signal and the noise interference in the actual working environment, thereby improving the quality of the original SSVEP signal; the frequency screening step overcomes the shortcomings of previous manual screening that is time-consuming and labor-intensive. According to the characteristics of the SSVEP signal and the fundamental harmonic characteristics, the function parameters are adjusted according to individual differences, and the effective SSVEP signals are quickly screened and retained, thereby providing strong support for subsequent tasks such as high-quality data sets.
[0141] Further references Figure 8 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device, and the device embodiment is Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0142] In a second aspect, the embodiment of the present invention further discloses a device for processing and screening SSVEP signals based on a brain-computer interface, such as Figure 8 As shown, it includes: a data import module 81, a parameter setting module 82, a data denoising module 83, a data block processing module 84 and a result display module 85.
[0143] In a specific embodiment, the data import module 81 is configured to import the acquired SSVEP signal data; the parameter setting module 82 is configured to set the response frequency, the window size of the local maximum value and the offset value of the response frequency; the data denoising module 83 is configured to perform time domain mean calculation on the SSVEP signals collected from multiple channels to remove physiological artifacts.
[0144] The data block processing module 84 is configured to cyclically process each data block, including: a data preprocessing submodule 841, configured to perform baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; a spectrum data screening submodule 842, configured to extract the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screen out frequencies that are consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and are within the allowable offset tolerance value.
[0145] The result display module 85 is configured to output corresponding information according to the screening conditions. If the screening conditions are met, the qualified data blocks and their characteristic frequencies are output, and the frequency spectrum of all qualified databases is displayed; if not, "no block found" is output.
[0146] The functions of the above modules correspond to the methods and will not be repeated here.
[0147] The key innovations of the technical solution of the present invention are mainly divided into three aspects: filter group, frequency domain screening, and signal processing and screening pre-system construction.
[0148] 1. Filter group: By combining low-pass filter, notch filter and band-pass filter, the problems of baseline offset, power frequency interference and noise interference in SSVEP signal can be solved simply and effectively, and the denoising function of SSVEP signal data can be completed.
[0149] 2. Frequency screening: By combining the local maximum function and the frequency screening function, the effective data of the SSVEP signal in the experiment is further screened according to the characteristics of the SSVEP signal, avoiding the time-consuming and laborious manual screening of the data set. If the signal is simply denoised through a filter group, the following problems cannot be solved: the specific response frequency is inconsistent with the current SSVEP signal frequency due to factors such as the experimenter's lack of concentration and the shaking of the wearable device; similarly, if only frequency screening is performed, the environmental noise interference and baseline offset problems cannot be removed.
[0150] 3. Construction of signal processing and screening pre-system: Existing SSVEP signal processing technologies either do not perform signal screening or are designed for a specific task such as classification and target recognition, and it is difficult to share them between different tasks. The technical solution of the present invention completes the construction of a flexible and real-time SSVEP signal processing and screening system, thereby facilitating the integration of various task modules, such as providing high-quality data sets. It is a plug-and-play technical solution.
[0151] Reference below Fig. 9 , which shows a schematic structural diagram of a computer device 900 of an electronic device suitable for implementing an embodiment of the present invention. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0152] like Fig. 9 As shown, the computer device 900 includes a central processing unit (CPU) 901 and a graphics processing unit (GPU) 902, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 903 or a program loaded from a storage part 909 to a random access memory (RAM) 904. In the RAM 904, various programs and data required for the operation of the device 900 are also stored. The CPU 901, GPU 902, ROM 903 and RAM 904 are connected to each other through a bus 905. An input / output (I / O) interface 906 is also connected to the bus 905.
[0153] The following components are connected to the I / O interface 906: an input section 907 including a keyboard, a mouse, etc.; an output section 908 including a display such as a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 909 including a hard disk, etc.; and a communication section 910 including a network interface card such as a LAN card, a modem, etc. The communication section 910 performs communication processing via a network such as the Internet. A drive 911 can also be connected to the I / O interface 906 as needed. A removable medium 912, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 911 as needed, so that a computer program read therefrom is installed into the storage section 909 as needed.
[0154] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 910, and / or installed from the removable medium 912. When the computer program is executed by the central processing unit (CPU) 901 and the graphics processing unit (GPU) 902, the above-mentioned functions defined in the method of the present invention are executed.
[0155] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus or device, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution device, apparatus or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution device, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0156] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] The modules involved in the embodiments of the present invention may be implemented in software or hardware, and the modules described may also be arranged in a processor.
[0159] As another aspect, the present invention further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device: executes the method steps described in the first aspect.
[0160] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A method for SSVEP signal processing and screening based on brain-computer interface, characterized in that: The method comprises the following steps: Data import and parameter setting: import the acquired SSVEP signal data and set the response frequency, the window size of the local maximum value and the offset value of the response frequency; Data denoising: time-domain mean calculation of SSVEP signals collected from multiple channels to remove physiological artifacts; Circularly process each data block, including a data preprocessing step, performing baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; and also including a spectrum data screening step, extracting the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screening out the frequency that is consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and is within the allowable offset tolerance value; The results show that the corresponding information is output according to the filtering conditions. If the filtering conditions are met, the qualified data blocks and their characteristic frequencies are output, and the spectrum diagram of all qualified databases is displayed; if not met, "no block found" is output.
2. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: The spectrum data screening step includes local maximum screening: For spectrum data, a fixed window size is set, and the local maximum value of the amplitude and its corresponding frequency are extracted in each window. Assuming the window size is N, in the window Wi, search for: Where A(f) is the spectrum amplitude, f max and A max are the frequency and amplitude of the local maximum amplitude, respectively.
3. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 2, characterized in that: Also includes frequency filtering: For the extracted local maximum, the frequency consistent with the SSVEP signal characteristics is screened out, which means that the selected signal frequency should be consistent with the set response frequency fr and its second harmonic frequency 2fr and third harmonic frequency 3fr. The frequency selection conditions are as follows: |f max -f r |<Δf, where Δf is the allowable offset tolerance value. By comparing the maximum amplitudes at the response frequency and its harmonic frequencies, only the frequencies that meet the conditions are retained.
4. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: In the data preprocessing step, the baseline drift is removed by using a low-pass filter with a cutoff frequency of 3 Hz to filter out low-frequency interference to stabilize the baseline. The Butterworth filter design is used, and the formula is as follows: Among them, H LP (s) represents the transfer function of the low-pass filter; s represents a complex variable, which is used to describe the frequency characteristics of the system in Laplace transform; ω c Represents the cutoff frequency of the low-pass filter, cutoff frequency ω c =2π×3rad / s; N represents the order of the filter, N=1; a1,a1,…,a N Represents the coefficients of the filter.
5. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: In the data preprocessing step, the notch filter uses a 4th-order notch filter with a center frequency of 50HZ to remove power frequency interference and avoid interference from device noise of power supply electrical appliances. The formula is as follows: Among them, H notch (s) represents the transfer function of the notch filter; s is a complex variable used to describe the frequency characteristics of the system; ω n Represents the center frequency of the notch filter, center frequency ω n =2π×50; ζ represents the damping ratio of the filter.
6. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: In the data preprocessing step, the bandpass filter is a 4th-order bandpass filter with a frequency range from 4 Hz to 40 Hz, which filters out other noises except the fundamental wave and harmonics, thereby retaining the target frequency. The formula is as follows: Among them, H bandpass (s) represents the transfer function of the bandpass filter; s is a complex variable used to describe the frequency characteristics of the system; ω l represents the lower cutoff frequency of the bandpass filter, ω l =2π×4rad / s;ω h represents the high cutoff frequency of the bandpass filter, ω h =2π×40rad / s.
7. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: In the data preprocessing step, the formula of the overall data preprocessing process is as follows: y(n)=L -1 [L(x(n))·H Lp (S)·H noth (S)·H bandpass (S)] Y(k)=FFT(y(n)),k=0,1,2……,N-1 Among them, x(n) is the original input signal sequence, n represents the discrete time point of the signal; y(n) is the signal sequence after a series of filtering processes; L(·) and L -1 (·) represent the linear transformation of signals between different domains and their inverse transformation respectively; FFT(·) represents the fast Fourier transform, which is used to convert the time domain signal y(n) into the frequency domain to obtain the frequency domain signal Y(k), where k represents the frequency index and N is the length of the input signal.
8. The method for SSVEP signal processing and screening based on brain-computer interface according to claim 1, characterized in that: The response frequency fr is set to [6.25, 7.75, 9.25, 10.75, 12.25].
9. A device for processing and screening SSVEP signals based on a brain-computer interface, characterized in that: include: A data import module configured to import acquired SSVEP signal data; A parameter setting module configured to set a response frequency, a window size of a local maximum value, and an offset value of the response frequency; A data denoising module, configured to perform time domain mean calculation on SSVEP signals collected from multiple channels to remove physiological artifacts; A data block processing module, configured to cyclically process each data block, including: a data preprocessing submodule, configured to perform baseline drift removal, notch filtering, bandpass filtering and fast Fourier transform on each data block; A spectrum data screening submodule is configured to extract the local maximum value of the spectrum amplitude and its corresponding frequency within a set window, and screen out the frequency that is consistent with the set response frequency and its second harmonic frequency and third harmonic frequency and is within the allowable deviation tolerance value; The result display module is configured to output corresponding information according to the filtering conditions. If the filtering conditions are met, the qualified data blocks and their characteristic frequencies are output, and the frequency spectrum of all qualified databases is displayed; if not, "noblock found" is output.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Animal-emotion electroencephalogram analysis device
CN107582051A
Novel active hand full-finger rehabilitation equipment based on artificial intelligence technology
CN111513991A
Electroencephalogram signal processing method and training method and device of background electroencephalogram prediction model
CN114246594A
Electroencephalogram signal classification method and system, electronic equipment and storage medium
CN116999073A
Bearing health state monitoring method, device, equipment and medium
CN118626781A
Cited By
System and method for synchronously implementing time interference electrical stimulation and neuronal peak potential recording
CN120860466A