Cosine convolution acceleration method and device based on fast Fourier transform

By using fast Fourier transform (FFT) and inverse transform (iFFT) in cosine convolution operations, cosine convolution is converted from time domain to frequency domain multiplication operation, solving the problem of high complexity of traditional cosine convolution calculation and achieving efficient signal processing.

CN120030266APending Publication Date: 2025-05-23SHANDONG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411948481.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

Due to the high computational complexity of traditional cosine convolution operations, especially when processing long signals, the processing efficiency is low. There are no special methods and devices for accelerating cosine convolution operations using Fast Fourier Transform (FFT).

Method used

By introducing fast Fourier transform (FFT) and fast inverse Fourier transform (iFFT), the cosine convolution operation is implemented in the frequency domain by multiplication operations, thereby greatly reducing the computational complexity.

Benefits of technology

It significantly reduces the computational complexity of cosine convolution, improves processing efficiency, can meet the needs of real-time signal processing, and is suitable for audio signal processing and EEG signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030266A_ABST
    Figure CN120030266A_ABST
Patent Text Reader

Abstract

The invention relates to a cosine convolution acceleration method and device based on fast Fourier transform. The method comprises the following steps: collecting signals; information processing: performing cyclic displacement, fast Fourier transform, calculation of frequency domain response of a cosine convolution kernel, frequency domain convolution, inverse fast Fourier transform and real number taking operation on the acquired signals in sequence; and outputting a signal. According to the method, the calculation complexity is remarkably reduced, and high calculation efficiency can be kept in large-scale data processing. According to the invention, the response time can be obviously shortened, and the real-time signal processing requirement is met. The method is convenient to quickly transplant and deploy in a software and hardware system, and can be seamlessly integrated with an existing signal processing platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of signal processing, and in particular relates to a cosine convolution acceleration method and device based on fast Fourier transform. Background Art

[0002] In the field of signal processing, cosine convolution based on cosine convolution kernel has been applied to fields such as biomedical signal processing due to its good frequency selectivity and phase characteristics. However, the traditional cosine convolution operation involves complex time-domain convolution operations, and its computational complexity increases significantly with the increase of signal length and filter length. Especially when processing longer signals, the amount of calculation is huge and the processing efficiency is low. In the prior art, although some studies have tried to use fast Fourier transform (FFT) to filter and accelerate conventional convolution operations, there is no dedicated method and device for accelerating cosine convolution operations using FFT. Summary of the invention

[0003] In view of the deficiencies of the prior art, the present invention provides a cosine convolution acceleration method and device based on fast Fourier transform;

[0004] In order to overcome the computational bottleneck of traditional time-domain cosine convolution, the present invention introduces the fast Fourier transform (FFT) technique to accelerate the cosine convolution operation. By using the fast Fourier transform and the fast inverse Fourier transform, the cosine convolution operation can be implemented in the frequency domain through multiplication operations, thereby greatly reducing the computational complexity.

[0005] The present invention improves the processing efficiency and performance of cosine convolution by optimizing the frequency domain response calculation and convolution operation steps of the cosine convolution kernel, meets the needs of real-time signal processing, and is suitable for audio signal processing, electroencephalogram (EEG) signal processing, etc.

[0006] Glossary

[0007] 1. Fourier Transform (FT): A mathematical transformation that converts a signal from the time domain to the frequency domain.

[0008] 2. Fast Fourier Transform (FFT): An algorithm for efficiently calculating Fourier transform, reducing computational complexity.

[0009] 3. Inverse Fast Fourier Transform (iFFT): An algorithm for efficiently calculating the inverse Fourier transform, which is used to convert frequency domain signals back to time domain signals.

[0010] 4. Frequency response: A function that describes the amplification or attenuation characteristics of the convolution kernel for different frequency components.

[0011] 5. Convolution: A mathematical operation used for filtering operations in signal processing.

[0012] 6. Cosine convolution kernel: A convolution kernel modulated by a cosine function, used for signal analysis of a specific frequency. Its impulse response is in the form of a cosine function, which can effectively filter out signal components near a specific frequency.

[0013] 7. Sampling: The process of converting a continuous signal into a discrete signal.

[0014] 8. Normalized frequency: dimensionless frequency processing, with π as the unit.

[0015] 9. Normalized frequency of interest: In the cosine convolution kernel, the normalized frequency of interest ω c Represents the specific frequency that the cosine convolution kernel focuses on, used to analyze signal components near this frequency, in units of π.

[0016] The technical solution of the present invention is:

[0017] A cosine convolution acceleration method based on fast Fourier transform, comprising:

[0018] Signal acquisition;

[0019] Information processing: The collected signals are subjected to cyclic shift, fast Fourier transform, calculation of the frequency domain response of the cosine convolution kernel, frequency domain convolution, inverse fast Fourier transform and real number operation in sequence;

[0020] Signal output.

[0021] Preferably, according to the present invention, signal acquisition includes: acquiring an input signal x(n) to be processed, where n is a time series index, and converting the analog signal into a digital signal.

[0022] According to the preferred embodiment of the present invention, the cyclic displacement comprises:

[0023] Shift the input signal right by K' units to eliminate the complex exponential term associated with the cosine convolution kernel. Let K be the length of the cosine convolution kernel, then the circular shift operation is as follows:

[0024] x′(n)=x((n+K′)modL);

[0025] Among them, x'(n) represents the shifted signal, L represents the length of the signal, K'=(K-1) / 2, and mod represents the modulo operation, that is, the remainder after n+K' is divided by L to ensure that the index is cycled in the range of 0 to L-1.

[0026] Preferably, according to the present invention, the fast Fourier transform comprises:

[0027] Perform fast Fourier transform on the cyclically shifted signal x′(n) to obtain the frequency domain representation of the signal X(Ω):

[0028]

[0029] Where Ω is the frequency variable, which represents the angular frequency of the signal in the frequency domain, and j is a complex unit.

[0030] According to the preferred embodiment of the present invention, the frequency domain response of the cosine convolution kernel is calculated The specific formula is as follows:

[0031]

[0032] Among them, the coefficient α=(ω c -Ω) / 2,β=(ω c +Ω) / 2,A c is the amplitude of the frequency response, ω c is the normalized frequency of interest for the cosine convolution kernel.

[0033] In order to compare the performance of the cosine convolution kernel based on fast Fourier transform and the conventional time-domain cosine convolution kernel, the time-domain cosine filtering operation needs to be defined first.

[0034] Assume A c is the amplitude of the frequency response, ω c is the normalized frequency of interest of the cosine convolution kernel, K is the length of the cosine convolution kernel, then the time domain expression h(m) of the cosine convolution kernel with discrete time index m as the independent variable is:

[0035]

[0036] Its time domain cosine convolution filter operation is defined as follows:

[0037]

[0038] Among them, x(n) is the input signal, y(n) is the signal after cosine convolution filtering, and h(m) is the convolution kernel impulse response.

[0039] This time domain calculation method often requires huge computation when facing long signals and convolution kernels. To this end, the present invention combines the steps of fast Fourier transform (FFT) and cyclic shift to transfer the main operation of the above cosine convolution to the frequency domain to greatly reduce the complexity. According to the convolution theorem, the time domain convolution corresponds to the product of the signal in the frequency domain and the filter frequency response, that is,

[0040] Y(Ω)=X(Ω)·H(Ω),

[0041] Where X(Ω) and H(Ω) represent the Fourier transform of x(n) and h(m), respectively, and Y(Ω) is the Fourier transform of y(n). The corresponding time domain output y(n) can then be restored by inverse fast Fourier transform (iFFT). In order to further eliminate the terms related to complex exponentials in the cosine kernel, the present invention performs an appropriate cyclic shift (e.g., shifting K' sampling points to the right) before performing FFT on x(n), so that only the real-valued cosine convolution kernel response needs to be processed in the frequency domain, which greatly simplifies the calculation structure. The definition of H(Ω) is as follows:

[0042]

[0043] By expanding H(Ω) in exponential form, combining the properties of the periodic sinc function, and using the Euler formula transformation, H(Ω) can be simplified to

[0044]

[0045] In this way, cosine convolution can be completed through simple frequency domain multiplication, and the result of time domain cosine convolution can be restored using inverse fast Fourier transform.

[0046] Preferably, the frequency domain convolution according to the present invention comprises:

[0047] Frequency domain representation of the signal X(Ω) and the frequency domain response of the cosine convolution kernel The product of is the frequency domain convolution result Y(Ω):

[0048]

[0049] Preferably, according to the present invention, the inverse fast Fourier transform comprises:

[0050] Perform inverse fast Fourier transform on the frequency domain convolution result Y(Ω) to obtain the time domain convolution result y(n):

[0051]

[0052] Preferably, according to the present invention, the real number operation comprises:

[0053] Extract the real part from the time domain convolution result y(n), and perform necessary stage processing to obtain the signal y after cosine convolution filtering. real (n):

[0054] y real (n) = Re{y(n)};

[0055] Among them, Re{} is the real part function.

[0056] According to the preferred embodiment of the present invention, the signal output comprises:

[0057] The signal after the cosine convolution filtering is output to other devices or display terminals through the output interface.

[0058] A cosine convolution acceleration device based on fast Fourier transform, comprising:

[0059] The signal acquisition unit is configured to: perform signal acquisition; include a sensor and an analog-to-digital converter (ADC) for acquiring and converting signals. The sensor may be a microphone, an accelerometer, or an electrode for EEG signal acquisition, etc.

[0060] The information processing unit is configured to: sequentially perform cyclic shift, fast Fourier transform, calculate the frequency domain response of the cosine convolution kernel, frequency domain convolution, inverse fast Fourier transform and real number operation on the collected signal;

[0061] The output interface is configured to: output signals.

[0062] According to a preferred embodiment of the present invention, the information processing unit includes:

[0063] The cyclic shift submodule is configured to: perform cyclic shift processing on the input signal;

[0064] The fast Fourier transform submodule is configured to: perform fast Fourier transform on the cyclically shifted signal;

[0065] The cosine convolution kernel frequency domain response calculation submodule is configured to: calculate the frequency domain response function of the cosine convolution kernel;

[0066] The frequency domain product submodule is configured to calculate the product of the frequency domain representation of the signal and the frequency domain response of the cosine convolution kernel.

[0067] The inverse fast Fourier transform submodule is configured to perform an inverse fast Fourier transform on the frequency domain convolution result.

[0068] The real number extraction submodule is configured to extract the real number part from the time domain convolution result and perform necessary stage processing.

[0069] Preferably, according to the present invention, the cosine convolution acceleration device based on fast Fourier transform further includes a storage unit;

[0070] The storage unit is configured to store intermediate calculation results and convolution kernel parameters. Including the frequency response amplitude A c and the normalized frequency ω c . Memories such as RAM and ROM can read and write data quickly.

[0071] The beneficial effects of the present invention are:

[0072] 1. Use fast Fourier transform (FFT) and inverse transform (iFFT) to implement cosine convolution, converting the original complex convolution operation in the time domain into a simple multiplication operation in the frequency domain. Under the conditions of the same signal length and filter length, the computational complexity is significantly reduced, which helps to maintain high computational efficiency in large-scale data processing.

[0073] 2. By replacing a large number of addition and multiplication operations of time domain convolution with frequency domain multiplication, the overall processing flow is significantly accelerated. Especially in application scenarios with high real-time requirements such as audio signals and EEG signals, the present invention can significantly shorten the response time and meet the needs of real-time signal processing.

[0074] 3. By combining cyclic shift with frequency domain multiplication, the processing flow can be flexibly adjusted for cosine convolution kernels of different lengths and normalized frequencies. It has good versatility and scalability and is suitable for a variety of sampling rates, signal types and filter configurations.

[0075] 4. By layering and modularizing the functional steps (circular shift, FFT, cosine convolution kernel frequency domain response calculation, frequency domain multiplication, iFFT and real number operation), it is easy to quickly transplant and deploy in software and hardware systems, and can be seamlessly integrated with existing signal processing platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a structural block diagram of a cosine convolution acceleration device based on fast Fourier transform of the present invention;

[0077] Figure 2 It is a detailed structural schematic diagram of the cosine convolution acceleration device based on fast Fourier transform of the present invention;

[0078] Figure 3 Schematic diagram of the ratio of the time consumption of the cosine convolution kernel based on fast Fourier transform and the conventional time-domain cosine convolution kernel filtering process under different convolution kernel lengths and different input signal lengths. DETAILED DESCRIPTION

[0079] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.

[0080] Example 1

[0081] EEG signal processing, including:

[0082] 1. Frequency response amplitude A c : Select A c =0.8.

[0083] 2. Normalized frequency ω c :Set ω c =π / 2.

[0084] 3. Signal length L: select L=2048.

[0085] 4. Convolution kernel length K: set K=17.

[0086] The specific steps include:

[0087] Cosine convolution accelerator based on fast Fourier transform Figure 1 and Figure 2 As shown;

[0088] 1. Data acquisition unit: The signal acquisition unit collects EEG input signals x(n) with a length of 2048 and a sampling frequency of 250 Hz.

[0089] 2. Signal processing unit:

[0090] a) Circular shift submodule: Circularly shift the input signal x(n) right by 8 units (K′=8) to obtain the signal x′(n):

[0091] x′(n)=x((n+8)mod2048)

[0092] b) Fast Fourier Transform submodule: Perform fast Fourier transform on the shifted signal x′(n) to obtain X(Ω):

[0093]

[0094] c) Cosine convolution kernel frequency domain response calculation submodule: Calculate the frequency domain response function of the cosine convolution kernel

[0095]

[0096] d) Frequency domain product submodule: Calculate X(Ω) and The frequency domain convolution of , and the frequency domain convolution result Y(Ω) is obtained:

[0097]

[0098] e) Inverse Fast Fourier Transform submodule: Perform inverse fast Fourier transform on Y(Ω) to obtain the time domain convolution result y(n):

[0099]

[0100] f) Real number submodule: extract the real number part of y(n) and perform necessary stage processing to obtain the signal y after cosine convolution filtering real (n):

[0101] y real (n) = Re{y(n)}

[0102] 3. Storage unit: stores convolution kernel parameters A c =0.8 and ω c =π / 2, and intermediate calculation results.

[0103] 4. Output interface: Outputs EEG signal after cosine convolution filtering, which is suitable for artifact removal and signal enhancement in EEG signal analysis.

[0104] In this case, the time consumption ratio of the cosine convolution process based on fast Fourier transform to the conventional time domain cosine convolution process is 0.1226, as shown in Figure 3 shown. Figure 3 The values ​​in the figure represent the time consumption ratio of the two convolution kernels under different conditions. The horizontal axis represents the convolution kernel length, ranging from 5 to 33. The vertical axis represents the input signal length, ranging from 128 to 16384. The grayscale in the figure represents the size of the time consumption ratio. The darker the color, the larger the time consumption ratio. The value range is from 0.07822 to 0.7781.

[0105] Example 2

[0106] Audio signal processing, including:

[0107] 1. Frequency response amplitude A c : Select A c =1.

[0108] 2. Normalized frequency ω c :Set ω c =π / 4.

[0109] 3. Signal length L: select L=1024.

[0110] 4. Convolution kernel length K: set K=33.

[0111] The specific steps include:

[0112] 1. Data acquisition unit: The signal acquisition unit collects the audio input signal x(n) with a length of 1024 and a sampling frequency of 44.1kHz.

[0113] 2. Signal processing unit:

[0114] a) Circular shift submodule: Circularly shift the input signal x(n) right by 16 units (K′=16) to obtain the signal x′(n):

[0115] x′(n)=x((n+16)mod1024)

[0116] b) Fast Fourier Transform submodule: Perform fast Fourier transform on the shifted signal x′(n) to obtain X(Ω):

[0117]

[0118] c) Cosine convolution kernel frequency domain response calculation submodule: Calculate the frequency domain response function of the cosine convolution kernel

[0119]

[0120] d) Frequency domain product submodule: Calculate X(Ω) and The frequency domain convolution of , and the frequency domain convolution result Y(Ω) is obtained:

[0121]

[0122] e) Inverse Fast Fourier Transform submodule: Perform inverse fast Fourier transform on Y(Ω) to obtain the time domain convolution result y(n):

[0123]

[0124] f) Real number submodule: extract the real number part of y(n) and perform necessary stage processing to obtain the signal y after cosine convolution filtering real (n):

[0125] y real (n) = Re{y(n)}

[0126] 3. Storage unit: stores convolution kernel parameters A c =1 and ω c =π / 4, and intermediate calculation results.

[0127] 4. Output interface: Outputs the audio signal after cosine convolution filtering, suitable for audio noise reduction and enhancement applications.

[0128] In this case, the time consumption ratio of the cosine convolution filter based on fast Fourier transform to the conventional time domain cosine convolution filter is 0.09581, as shown in Figure 3 As shown. Figure 3 It can be seen intuitively that, under the same convolution kernel length, the longer the input signal, the more obvious the time-consuming advantage of the cosine convolution filter based on fast Fourier transform over the conventional time-domain cosine convolution filter.

Claims

1. A cosine convolution acceleration method based on fast Fourier transform, characterized in that: include: Signal acquisition; Information processing: The collected signals are subjected to cyclic shift, fast Fourier transform, calculation of the frequency domain response of the cosine convolution kernel, frequency domain convolution, inverse fast Fourier transform and real number operation in sequence; Signal output.

2. The cosine convolution acceleration method based on fast Fourier transform according to claim 1, characterized in that: Signal acquisition; including: acquiring the input signal x(n) to be processed, where n is the time series index, and converting the analog signal into a digital signal.

3. The cosine convolution acceleration method based on fast Fourier transform according to claim 2, characterized in that: Cyclic displacement; including: Shift the input signal right by K' units, assuming K is the length of the cosine convolution kernel, and perform the circular shift operation. The specific formula is as follows: x′(n)=x((n+K′)modL); Wherein, x′(n) represents the shifted signal, L represents the length of the signal, K′=(K-1) / 2, and mod represents the modulo operation.

4. The cosine convolution acceleration method based on fast Fourier transform according to claim 3, characterized in that: Fast Fourier Transform; includes: Perform fast Fourier transform on the cyclically shifted signal x′(n) to obtain the frequency domain representation of the signal X(Ω): Where Ω is the frequency variable, which represents the angular frequency of the signal in the frequency domain, and j is a complex unit.

5. The cosine convolution acceleration method based on fast Fourier transform according to claim 1, characterized in that: Compute the frequency domain response of the cosine convolution kernel The specific formula is as follows: Among them, the coefficient α=(ω c -Ω) / 2,β=(ω c +Ω) / 2,A c is the amplitude of the frequency response, ω c is the normalized frequency of interest for the cosine convolution kernel.

6. The cosine convolution acceleration method based on fast Fourier transform according to claim 1, characterized in that: Frequency domain convolution; including: Frequency domain representation of the signal X(Ω) and the frequency domain response of the cosine convolution kernel The product of is the frequency domain convolution result Y(Ω):

7. The cosine convolution acceleration method based on fast Fourier transform according to claim 1, characterized in that: Inverse Fast Fourier Transform; includes: Perform inverse fast Fourier transform on the frequency domain convolution result Y(Ω) to obtain the time domain convolution result y(n): Real number operations; including: Extract the real part from the time domain convolution result y(n) to get the signal y after cosine convolution filtering real (n): y real (n)=Re{y(n)}; Among them, Re{} is the real part function.

8. A cosine convolution acceleration method based on fast Fourier transform according to any one of claims 1 to 7, characterized in that: Signal output; including: The signal after the cosine convolution filtering is output to other devices or display terminals through the output interface.

9. A cosine convolution acceleration device based on fast Fourier transform, characterized in that: include: The signal acquisition unit is configured to: perform signal acquisition; The information processing unit is configured to: sequentially perform cyclic shift, fast Fourier transform, calculate the frequency domain response of the cosine convolution kernel, frequency domain convolution, inverse fast Fourier transform and real number operation on the collected signal; The output interface is configured to: output signals.

10. The cosine convolution acceleration device based on fast Fourier transform according to claim 9, characterized in that: The information processing unit includes: The cyclic shift submodule is configured to: perform cyclic shift processing on the input signal; The fast Fourier transform submodule is configured to: perform fast Fourier transform on the cyclically shifted signal; The cosine convolution kernel frequency domain response calculation submodule is configured to: calculate the frequency domain response function of the cosine convolution kernel; The frequency domain product submodule is configured to calculate the product of the frequency domain representation of the signal and the frequency domain response of the cosine convolution kernel. The inverse fast Fourier transform submodule is configured to perform an inverse fast Fourier transform on the frequency domain convolution result. The real number extraction submodule is configured to: extract the real number part from the time domain convolution result and perform stage processing; The cosine convolution acceleration device based on fast Fourier transform also includes a storage unit; The storage unit is configured to store intermediate calculation results and convolution kernel parameters.

Citation Information

Cited By

  • Vectorization calculation instruction set-based Ewald summation acceleration method and system

    CN121187805A

  • A method and system for accelerating Ewald summation based on a vectorized computation instruction set

    CN121187805B