A method for separating brain magnetic signal rhythm based on genetic algorithm and wavelet transform

By combining genetic algorithms with wavelet transform, the optimal wavelet function is selected for magnetoencephalography (MEG) signal separation, which solves the problems of slow calculation speed and low accuracy in existing technologies and achieves a more efficient MEG signal separation effect.

CN116595321BActive Publication Date: 2025-12-23BEIHANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310641211.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2025-12-23
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

Existing methods for separating the rhythm of magnetoencephalogram (MEG) signals are slow, have low accuracy, and are not adaptable, making it difficult to meet diverse application needs.

Method used

A genetic algorithm is used to adaptively search for wavelet functions, and wavelet transform is combined with the separation of magnetoencephalogram (MEG) signals. The optimal wavelet function is selected by the genetic algorithm and wavelet decomposition and reconstruction are performed to improve the calculation speed and resolution.

Benefits of technology

It achieves faster computing speed and higher resolution, ensuring the accuracy and integrity of brain magnetic rhythm signals and adapting to diverse application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116595321B_ABST
    Figure CN116595321B_ABST
Patent Text Reader

Abstract

The application relates to a magnetoencephalography rhythm separation method based on a genetic algorithm and a wavelet transform, and comprises the following steps: obtaining an initial magnetoencephalography signal to perform noise reduction processing to obtain a basic magnetoencephalography signal; performing iterative search on a coded wavelet function by using a genetic algorithm to obtain an optimal wavelet function and determine a decomposition layer number; performing wavelet decomposition and wavelet coefficient reconstruction on the pretreated magnetoencephalography signal by using the wavelet function and the decomposition layer number; and performing frequency detection on the reconstructed sub-signal to determine an ideal magnetoencephalography rhythm signal. According to the characteristics that the genetic algorithm can adaptively find a global optimal solution, the wavelet function with higher information matching degree between different types of magnetoencephalography signals and the magnetoencephalography signal to be separated is found, the reliability of wavelet function selection is improved, the dependence of the wavelet decomposition algorithm on work experience is reduced, the magnetoencephalography rhythm signal is decomposed by using the wavelet transform, different frequency signals are accurately separated, and the time frequency resolution capability and characteristics of the rhythm signal are retained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of magnetoencephalography signal analysis and processing, and particularly relates to a magnetoencephalography signal rhythm separation method based on a genetic algorithm and wavelet transform. BACKGROUND

[0002] Magnetoencephalography signal is generated by neuron oscillation and the resulting change in the surrounding magnetic field. The rhythmic activity contained in the signal has been proven to play a significant role in brain function and cognitive research, clinical application of epilepsy, and research on neurological diseases. Therefore, how to accurately separate the rhythmic signal from the signal is the key to the application of magnetoencephalography system. The current traditional magnetoencephalography signal rhythm separation methods mainly include independent component analysis, cluster analysis, and short-time Fourier transform. These methods require certain prior knowledge and computing resources, have slow computing speed, and the parameter settings designed in the computing process have an important influence on the accuracy and reliability of the analysis results. The process of manually setting parameters is prone to subjective errors. The resolution is low, and only some frequency components of the signal can be extracted, making it difficult to extract rhythmic components in multiple frequency ranges at the same time, resulting in incomplete and inaccurate analysis results. These methods are only suitable for certain types of signal analysis tasks, and the application range is limited, making it difficult to meet the diversified application requirements. SUMMARY

[0003] In view of the deficiencies of the prior art, the present application provides a magnetoencephalography signal rhythm separation method based on a genetic algorithm and wavelet transform, which solves the problems of low precision, weak adaptability, and slow computing speed in traditional technologies. The method adaptively searches for a globally optimal wavelet function through a genetic algorithm, combines wavelet transform to more accurately separate magnetoencephalography signals, has faster computing speed and higher efficiency, and can obtain high-resolution magnetoencephalography rhythm signals.

[0004] To achieve the above-mentioned purpose, the present application provides a magnetoencephalography signal rhythm separation method based on a genetic algorithm and wavelet transform, comprising:

[0005] A magnetoencephalography signal rhythm separation method based on a genetic algorithm and wavelet transform, comprising the following steps:

[0006] S1, obtaining an initial magnetoencephalography signal for noise reduction processing to obtain a basic magnetoencephalography signal;

[0007] S2, iteratively searching the coded wavelet function using a genetic algorithm to obtain an optimal wavelet function and determine the number of decomposition layers;

[0008] S3, performing wavelet decomposition and wavelet coefficient reconstruction on the basic magnetoencephalography signal using the wavelet function and the number of decomposition layers, and performing frequency detection on the reconstructed sub-signal to determine an ideal magnetoencephalography rhythm signal.

[0009] Preferably, the S1 comprises:

[0010] The calculation formula of the basic magnetoencephalogram signal obtained by acquiring the initial magnetoencephalogram signal and performing noise reduction processing is as follows:

[0011]

[0012] Wherein, x(t) is the basic magnetoencephalogram signal, t is time, x k (t) is the kth component, N is the number of components, Am k (t) is the instantaneous amplitude of the kth component of x(t), is the instantaneous phase of the kth component of x(t), e is a constant, and j is an imaginary unit.

[0013] Preferably, the S2 comprises:

[0014] S2-1, initializing a population: randomly generating a set of wavelet functions, and encoding the wavelet functions to form chromosomes in the genetic algorithm;

[0015] S2-2, designing a fitness function based on a target function with the minimum entropy energy ratio as an index, and evaluating the advantages and disadvantages of each individual;

[0016] S2-3, iterating the population and judging the result, if the preset maximum iteration number is met, outputting the optimal wavelet function in the population as the optimal solution of the problem, otherwise executing S2-4;

[0017] S2-4, sorting the wavelet functions using the fitness function, and selecting better wavelet functions from the population;

[0018] S2-5, using the better wavelet functions as the parent population, performing adaptive crossover and mutation operations on the individuals to form a child population, and completing iterative evolution.

[0019] Preferably, the chromosome formation process in S2-1 is as follows:

[0020] Each randomly generated wavelet function has a set of fixed filter coefficients and support lengths that can represent its characteristics, the filter coefficients and support lengths of the wavelet function are binary coded, the binary codes of different wavelet functions are unified in length to ensure the smooth execution of the subsequent algorithm, and a set of binary strings can be determined as a chromosome.

[0021] Preferably, the S2-2 comprises:

[0022] The magnetoencephalogram signal energy is calculated using the basic magnetoencephalogram signal, and the calculation formula is as follows:

[0023]

[0024] wherein N is the number of components, x i is the signal value of the i th sample point of the basic magnetoencephalogram.

[0025] Preferably, the S2-3 comprises:

[0026] The Shannon entropy of the magnetoencephalogram is calculated using the basic magnetoencephalogram, and the calculation formula is as follows:

[0027]

[0028] wherein p i is the energy distribution probability of the basic magnetoencephalogram, and is defined as: and When p i = 0, p i · log2p i = 0; b i herein refers to each segment bin, and M represents the number of bins, and the calculation formula of M is as follows:

[0029] M = 1 + log2N

[0030] wherein N represents the number of sample points of the basic magnetoencephalogram.

[0031] Preferably, the S2-4 comprises:

[0032] The entropy-energy ratio of the magnetoencephalogram is calculated using the basic magnetoencephalogram, and the calculation formula is as follows:

[0033]

[0034] The fitness function is constructed using the objective function with the minimum entropy-energy ratio R min as the index, and the calculation formula is as follows:

[0035]

[0036] wherein R is the entropy-energy ratio of the basic magnetoencephalogram.

[0037] Preferably, the S2-5 comprises:

[0038] The crossover probability of the adaptive crossover is calculated using the genes of the individuals in the parent population, and the calculation formula is as follows:

[0039]

[0040] wherein P c is the crossover probability, a is the adaptive crossover probability, F mean is the average value of the fitness values of all individuals, and F std is the standard deviation of the fitness values of all individuals.

[0041] The mutation probability of the genetic calculation of the individual in the parent population is calculated as follows:

[0042] P m = β · (1 - P c )

[0043] Where P m is the mutation probability, and β is the adaptive mutation probability.

[0044] Preferably, the S3 comprises:

[0045] S3-1, the number of decomposition layers of the magnetoencephalogram signal is determined by the frequency resolution of the ideal rhythm signal, specifically as follows:

[0046]

[0047] Where L is the total number of decomposition layers of the magnetoencephalogram signal, f i is the frequency resolution of the ideal rhythm signal, and f s is the sampling frequency of the basic magnetoencephalogram signal.

[0048] Preferably, the S3 further comprises:

[0049] S3-2, the wavelet coefficients are obtained by wavelet decomposition of the preprocessed basic magnetoencephalogram signal using the optimal wavelet function, and the calculation formula is as follows:

[0050]

[0051]

[0052] Where A(t) is the wavelet approximation coefficient, D(t) is the wavelet detail coefficient, is the low-pass filter coefficient, ψ(t) is the high-pass filter coefficient, i is the ordinal number of the signal decomposition layer, and k represents the discrete time variable.

[0053] Preferably, the S3 further comprises:

[0054] S3-3, the ideal magnetoencephalogram rhythm signal is obtained by wavelet reconstruction using the wavelet coefficients, and the calculation formula is as follows:

[0055]

[0056] Where x'(t) is the rhythm signal reconstructed according to the selected approximation coefficient and detail coefficient, L is the total number of decomposition layers of the magnetoencephalogram signal, and ψ'(t) are parameters obtained by reversing the wavelet decomposition filter coefficients.

[0057] Preferably, the S3 further comprises:

[0058] S3-4, frequency detection is performed on the ideal brain magnetic rhythm signal to obtain a frequency range of the rhythm signal, comprising:

[0059] The frequency spectrum calculation formula of the rhythm signal is as follows:

[0060]

[0061] Wherein, X(f) is the frequency spectrum at frequency f, x'(t) is the time domain representation of the ideal rhythm signal, and j is an imaginary unit.

[0062] The present application has the following beneficial effects:

[0063] The genetic algorithm is used to select the wavelet function, thereby reducing the calculation amount of the wavelet function selection and improving the speed of the signal separation effect; the wavelet transform can determine the resolution of the rhythm signal according to the requirement, thereby ensuring the integrity and accuracy of the rhythm signal, and meanwhile, the time and frequency characteristics of the signal are retained, thereby providing convenience for the subsequent rhythm signal processing and analysis and meeting the diversified application requirement. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 is a whole flow chart of a brain magnetic signal rhythm separation method based on a genetic algorithm and wavelet transform provided by the present application;

[0065] Figure 2 is a flow chart of selecting an optimal wavelet function by a genetic algorithm provided by the present application;

[0066] Figure 3 is a wavelet decomposition flow chart provided by the present application;

[0067] Figure 4 is a wavelet reconstruction flow chart provided by the present application. DETAILED DESCRIPTION

[0068] In order to better explain the present application and facilitate understanding, the specific embodiments of the present application will be further described in detail below in combination with the accompanying drawings.

[0069] In order to better understand the above scheme, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a clearer, more thorough understanding of the present application and to enable the scope of the present application to be completely conveyed to those skilled in the art.

[0070] As Figure 1As shown, the embodiment provides a method for separating brain magnetic signal rhythm based on genetic algorithm and wavelet transform, including the following steps:

[0071] S1, obtaining initial brain magnetic signal for noise reduction processing to obtain basic brain magnetic signal;

[0072] S2, using genetic algorithm to iteratively search the coded wavelet function to obtain the optimal wavelet function and determine the decomposition layer number;

[0073] S3, using the wavelet function and the decomposition layer number to perform wavelet decomposition and wavelet coefficient reconstruction on the basic brain magnetic signal, and performing frequency detection on the reconstructed sub-signal to determine the ideal brain magnetic rhythm signal.

[0074] The S1 specifically includes:

[0075] S1-1, the calculation formula of the basic brain magnetic signal obtained by obtaining the initial brain magnetic signal for noise reduction processing is as follows:

[0076]

[0077] Wherein, x(t) is the basic brain magnetic signal, t is the time, x k (t) is the kth component, N is the component number, Am k (t) is the instantaneous amplitude of the kth component of x(t), is the instantaneous phase of the kth component of x(t), e is a constant, and j is the imaginary unit.

[0078] As Figure 2 shown, the S2 specifically includes:

[0079] S2-1, initialization population: randomly generate a group of wavelet functions, and code the wavelet functions to form chromosomes in genetic algorithm;

[0080] The chromosome formation process in S2-1 is specifically as follows:

[0081] The randomly generated wavelet functions each have a group of fixed filter coefficients and support length that can represent their characteristics, the filter coefficients and support length of the wavelet functions are binary coded, the binary coding of different wavelet functions is unified in length to ensure the smooth execution of the subsequent algorithm, and a group of binary strings can be determined as a chromosome.

[0082] S2-2, based on the objective function with minimum entropy energy ratio as the index, design the fitness function and evaluate the advantages and disadvantages of each individual;

[0083] The brain magnetic signal energy E is calculated using the basic brain magnetic signal, and the calculation formula is as follows:

[0084]

[0085] Wherein, N is the number of components, xi is the signal value of the i-th sampling point of the basic magnetoencephalogram signal.

[0086] Calculate the magnetoencephalogram signal Shannon entropy H of the magnetoencephalogram signal by using the basic magnetoencephalogram signal s , the calculation formula is as follows:

[0087]

[0088] Wherein, pi is the energy distribution probability of the basic magnetoencephalogram signal, defined as: And When pi = 0, pi·log2pi = 0; bi here refers to each segment bin, and M represents the number of bins, that is, the number of components, and the calculation formula of M is as follows:

[0089] M = 1 + log2N

[0090] Wherein, N represents the number of components.

[0091] Calculate the magnetoencephalogram signal entropy energy ratio R of the magnetoencephalogram signal by using the basic magnetoencephalogram signal, and the calculation formula is as follows:

[0092]

[0093] Use the target function with the minimum entropy energy ratio R min As an index to construct a fitness function F, and the calculation formula is as follows:

[0094]

[0095] S2-3, iterate the population and judge the result, if the limit of the preset maximum iteration number is met, output the optimal wavelet function in the population as the optimal solution of the problem, otherwise execute S2-4;

[0096] S2-4, sort each wavelet function by using the fitness function, and select a better wavelet function from the population;

[0097] S2-5, use the better wavelet function as the parent population, and perform adaptive crossover and mutation operations on the individuals to form a child population, and complete iterative evolution, specifically including:

[0098] The genes of the individuals in the parent population are adaptively crossed to obtain a crossover probability P c , and the calculation formula is as follows:

[0099]

[0100] Wherein, α is the adaptive crossover probability, F meanF is the average of all individual fitness values std The standard deviation of all individual fitness values.

[0101] The mutation probability of the gene of the individual in the parent population is calculated as follows:

[0102] P m = β·(1-P c )

[0103] Wherein, P m is the mutation probability, and β is the adaptive mutation probability.

[0104] S2-6, determine the decomposition layer number by using the sampling frequency of the basic magnetoencephalogram signal, comprising:

[0105] The number of magnetoencephalogram signal decomposition layers is determined by the frequency resolution of the ideal rhythm signal, and the specific formula is as follows:

[0106]

[0107] Wherein, L is the total decomposition layer number of the magnetoencephalogram signal, f i is the frequency resolution of the ideal rhythm signal, and f s is the sampling frequency of the basic magnetoencephalogram signal.

[0108] As shown in Figure 3 and Figure 4 In the S3, the specific steps of wavelet decomposition and reconstruction are as follows:

[0109] S3-1, using the optimal wavelet function to perform wavelet decomposition on the basic magnetoencephalogram signal to obtain wavelet coefficients, and the decomposition schematic diagram is as shown in Figure 3 The calculation formula is as follows:

[0110]

[0111]

[0112] Wherein, A(t) is the wavelet approximation coefficient, D(t) is the wavelet detail coefficient, is the low-pass filter coefficient, ψ(t) is the high-pass filter coefficient, i is the ordinal number of signal decomposition layer, and k represents the discrete time variable. Figure 3 In S, S is the signal to be decomposed, Hd is the high-pass filter coefficient, Ld is the low-pass filter coefficient, A is the approximation coefficient, D is the detail coefficient, and ↓2 is the down sampling.

[0113] S3-2, using the wavelet coefficient to perform wavelet reconstruction to obtain the ideal magnetoencephalogram rhythm signal, and the reconstruction schematic diagram is as shown in Figure 4 The calculation formula is as follows:

[0114]

[0115] wherein x'(t) is the rhythm signal reconstructed from the selected approximation coefficients and detail coefficients, L is the total number of decomposition levels, and ψ'(t) is obtained by reversing the wavelet decomposition filter coefficients. Figure 4 wherein A is the approximation coefficients, Lr is the low-pass filter coefficients obtained by reversing the wavelet decomposition filter coefficients, S' is the reconstructed signal obtained, and ↑2 is up-sampling.

[0116] S3-3, frequency detection is performed on the ideal brain magnetic rhythm signal to obtain a frequency range of the rhythm signal, comprising:

[0117] The spectrum of the rhythm signal is calculated as follows:

[0118]

[0119] wherein X(f) is the spectrum at frequency f, x'(t) is the time-domain representation of the ideal rhythm signal, and j is the imaginary unit.

[0120] The embodiment encodes the wavelet function by using the genetic algorithm, searches for the globally optimal wavelet function through adaptive crossover and mutation, combines wavelet decomposition and reconstruction, more accurately separates the brain magnetic signals, has faster calculation speed and higher efficiency, and can obtain the brain magnetic rhythm signal with higher time-frequency resolution.

[0121] Since the system described in the above embodiments of the present application is the system used for implementing the method of the above embodiments of the present application, the specific structure and modifications of the system can be understood by those skilled in the art based on the method described in the above embodiments of the present application, and thus will not be described here. Any system used by the method of the above embodiments of the present application belongs to the scope of the present application. Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it, although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that: the specific implementation of the present application can still be modified or replaced equivalently without departing from the spirit and scope of the present application, any modification or equivalent replacement thereof should be covered in the protection scope of the claims of the present application.

Claims

1. A method for separating brain magnetic signal rhythms based on genetic algorithm and wavelet transform, characterized in that, The method comprises the following steps: S1, obtaining an initial magnetoencephalogram signal to obtain a basic magnetoencephalogram signal after noise reduction processing; S2, performing iterative search on the coded wavelet function by using a genetic algorithm to obtain an optimal wavelet function and determine a decomposition layer number; S3, performing wavelet decomposition and wavelet coefficient reconstruction on the basic magnetoencephalogram signal by using the wavelet function and the decomposition layer number, and performing frequency detection on the reconstructed sub-signal to determine an ideal magnetoencephalogram rhythm signal, comprising: S3-1, determining the ideal rhythm signal frequency resolution by using the magnetoencephalogram signal decomposition layer number, and the specific formula is as follows: wherein L is the total decomposition level of the brain magnetic signal, f i is the frequency resolution of the ideal rhythm signal, f s is the sampling frequency of the base brain magnetic signal; S3-2, performing wavelet decomposition on the preprocessed basic magnetoencephalogram signal by using the optimal wavelet function to obtain wavelet coefficients, and the calculation formula is as follows: where A(t) is the wavelet approximation coefficient, D(t) is the wavelet detail coefficient, is the low-pass filter coefficient, is the high-pass filter coefficient, i is the ordinal number of the layer in the signal decomposition, and k represents the discrete time variable. S3-3, performing wavelet reconstruction by using the wavelet coefficients to obtain the ideal magnetoencephalogram rhythm signal, and the calculation formula is as follows: where x ’ (t) is the reconstructed rhythm signal from the selected approximation and detail coefficients, L is the total number of decomposition levels of the brain magnetic signal, and are parameters obtained by inverting the wavelet decomposition filter coefficients; S3-4, performing frequency detection on the ideal magnetoencephalogram rhythm signal to obtain a frequency range of the rhythm signal, comprising: The frequency spectrum calculation formula of the rhythm signal is as follows: where X(f) is the spectrum at frequency f, x ’ (t) is the ideal rhythm signal time-domain representation, and j is the imaginary unit.

2. The method for separating brain magnetic signal rhythms based on genetic algorithm and wavelet transform according to claim 1, wherein, The S1 comprises: The calculation formula of the basic magnetoencephalogram signal obtained by obtaining an initial magnetoencephalogram signal to perform noise reduction processing is as follows: ; where x(t) is the basic brain magnetic signal, t is time, x k (t) is the kth component of the composition, N is the number of components, Am k (t) is the kth component of the composition, N is the number of components, Am (t) is the kth component of the composition, N is the number of components, Am 3. The method of claim 1, wherein the genetic algorithm and wavelet transform-based MEG signal rhythm separation method is characterized by, The S2 comprises: S2-1, initializing a population: randomly generating a group of wavelet functions, and coding the wavelet functions to form chromosomes in the genetic algorithm; S2-2, designing a fitness function based on a target function taking the minimum entropy-energy ratio as an index, and evaluating the advantages and disadvantages of each individual; S2-3, iterating the population and judging the result, if the preset maximum iteration number is met, outputting the optimal wavelet function in the population as the optimal solution of the problem, otherwise, performing S2-4; S2-4, sorting the wavelet functions by using the fitness function, and selecting better wavelet functions from the population; S2-5, using the better wavelet functions as the parent population, performing adaptive crossover and mutation operations on the individuals to form a child population, and completing iterative evolution.

4. The method of claim 3, wherein the genetic algorithm and wavelet transform-based MEG signal rhythm separation method is characterized by, The chromosome formation process in S2-1 comprises: Each randomly generated wavelet function has a group of fixed filter coefficients and support lengths that can represent its characteristics, the filter coefficients and support lengths of the wavelet functions are binary coded, the binary coding of different wavelet functions is length-unified to ensure the smooth execution of the subsequent algorithm, and a group of binary strings is determined as a chromosome.

5. The method of claim 3, wherein the genetic algorithm and wavelet transform-based MEG rhythm separation method is characterized by, The S2-2 comprises: The magnetoencephalogram signal energy is calculated by using the basic magnetoencephalogram signal, and the calculation formula is as follows: where N is the number of components, x i is the signal value of the i-th sample point of the pre-processed base magnetoencephalography signal. The magnetoencephalogram signal Shannon entropy is calculated by using the basic magnetoencephalogram signal, and the calculation formula is as follows: where p i is the energy distribution probability of the underlying brain magnetic signal, defined as: , and ; when p i = 0, p i · log2p i = 0; b i denotes each segment bin, and M denotes the number of bins, which is calculated as follows: Wherein, N represents the number of basic magnetoencephalogram signal components; The magnetoencephalogram signal entropy-energy ratio is calculated by using the basic magnetoencephalogram signal, and the calculation formula is as follows: The minimum entropy energy ratio R min The fitness function constructed for the objective function of the index is as follows: 。 6. The method of claim 3, wherein the genetic algorithm and wavelet transform-based MEG rhythm separation method is characterized by, The S2-5 comprises: The crossover probability of adaptive crossover is calculated by using the genes of the individuals in the parent population, and the calculation formula is as follows: where P c is the crossover probability, a is the adaptive crossover probability, F mean is the average of all individual fitness values, F std is the standard deviation of all individual fitness values; The mutation probability of mutation is calculated by using the genes of the individuals in the parent population, and the calculation formula is as follows: where P m is the mutation probability, and β is the adaptive mutation probability.

Citation Information

Patent Citations

  • Intraoperative motor area function localization system based on cortex electroencephalogram mu rhythm wavelet analysis

    CN102512161A

  • Intraoperative motor area function localization system based on multi-mode electroencephalogram wavelet analysis

    CN102512162A

  • Wavelet threshold image denoising method based on F-type double-chain quantum genetic algorithm

    CN105069760A

  • Signal denoising method and device based on DE optimization wavelet parameters

    CN114417920A

  • Method for solving time-frequency distribution information of brain magnetic signals

    CN115844409A