Embedded platform high-performance FIR filtering method and system based on ffw3f

By adopting the high-performance FIR filtering method of embedded platform based on fftw3f on the ReWorks platform, using hard real-time and NEON instructions, fast Fourier transform and inverse transform are implemented, solving the problem of insufficient performance of traditional FIR filtering algorithms and significantly improving the signal processing rate.

CN119892015APending Publication Date: 2025-04-25ZHEJIANG YANGMING TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411935777.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

On the ReWorks (FT2000/4) platform, the performance of traditional FIR filtering algorithms is insufficient, resulting in a low signal processing rate in computing-intensive systems.

Method used

The high-performance FIR filtering method of embedded platform based on fftw3f is adopted, and the hard real-time performance of the ReWorks operating system and NEON instructions are used to achieve high-performance FIR filtering through fast Fourier transform and inverse transform. Specific steps include frequency domain transformation, multiplication and inverse transformation of signal and filter coefficients, combining memory pooling management and SIMD parallel computing technology.

Benefits of technology

It significantly improves the FIR filtering performance on the ReWorks platform, improves the signal processing rate, and solves the performance bottleneck problem of traditional FIR filtering algorithms under large data volumes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892015A_ABST
    Figure CN119892015A_ABST
Patent Text Reader

Abstract

The invention relates to an embedded platform high-performance FIR (Finite Impulse Response) filtering method and system based on ffw3f. The method comprises the following steps: inputting signal data to be filtered; inputting a coefficient for filtering the signal; performing fast Fourier forward transformation on the filtered signal, and transforming signal data of a time domain into a frequency domain; performing fast Fourier forward transformation on the filter coefficient, and transforming the filter coefficient of the time domain to the frequency domain; multiplying the converted frequency domain signal by a frequency domain coefficient; performing inverse fast Fourier transform on the multiplied frequency domain signal, and transforming the frequency domain signal into a time domain; carrying out normalization processing on the transformed time domain signal; and outputting the filtered signal. According to the method, the hard real-time performance of a ReWorks operating system and an NEON instruction are utilized, and forward Fourier transform and reverse Fourier transform are quickly realized by adopting an fftw3 library. According to the method, the problem that the filtering performance of a ReWorks (FT2000 / 4) platform is poor is solved, and the reconstructed FIR filtering algorithm is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of FIR filtering algorithms, and in particular relates to an embedded platform high-performance FIR filtering method and system based on fftw3f. Background Art

[0002] Digitalization, intelligence and networking are the major trends in the development of contemporary information technology, and digitalization is the basis of intelligence and networking. Signals in real life include radio and television signals, radar signals, navigation signals, radio astronomy signals, biomedical signals, meteorological signals, seismic exploration signals, and remote sensing and telemetry signals. Most of these signals are analog signals, and a small part is digital signals. Analog signals are continuous functions of independent variables, and the independent variables can be one-dimensional, two-dimensional or multi-dimensional. In most cases, the independent variable of a one-dimensional analog signal is time. After discretization in time (sampling) and discretization in amplitude (quantization), this type of analog signal becomes a one-dimensional digital signal. Therefore, digital signals are actually signals represented by digital sequences. Digital signal processing is to use numerical calculation methods to perform various processing on digital sequences and transform the signal into a form that meets the needs. For example, digital signals are often filtered to limit their frequency band or filter out noise and interference, or separate them from other signals; spectral analysis or power spectrum analysis is performed on the signal to understand the spectral composition of the signal and then identify the signal; some kind of transformation is performed on the signal to make it more suitable for transmission, storage and application; the signal is encoded to achieve the purpose of data compression. Whether it is signal acquisition, transmission, processing or exchange, filtering technology is indispensable. It is crucial for the safe, reliable, effective and flexible transmission of signals.

[0003] In the localized environment and embedded platform ReWorks (FT2000 / 4), the system ecology is relatively weak, and the high-performance library of the common operating system cannot be relied on. The traditional linear FIR algorithm uses the input signal of the filter and the coefficient of the filter to perform convolution operation to obtain the output signal of the filter. Figure 1 As shown, the time complexity of the traditional linear FIR filtering algorithm is O 2 ,If the amount of signal data in the ReWorks environment is relatively large, the filtering ,performance will be too poor, which is a major bottleneck for the ,computation-intensive system. Therefore, for the current FIR filtering algorithm, it is urgent to ,reconstruct a high-performance FIR filter algorithm for digital signal ,spectrum analysis and recognition, so as to improve the signal processing ,rate. Summary of the invention

[0004] The purpose of the present invention is to provide a high-performance FIR filtering method and system for an embedded platform based on fftw3f, to provide a high-performance FIR filtering algorithm for the shortcomings of the traditional FIR algorithm performance, and to further improve the FIR filtering performance by utilizing the hard real-time performance of the ReWorks operating system and NEON instructions.

[0005] The present invention provides an embedded platform high-performance FIR filtering method based on fftw3f, comprising the following steps:

[0006] Step 1, input the signal data to be filtered;

[0007] Step 2, input the coefficients for signal filtering;

[0008] Step 3, performing fast Fourier forward transform on the filtered signal to transform the signal data in the time domain into the frequency domain;

[0009] Step 4, performing fast Fourier forward transform on the filter coefficients to transform the filter coefficients in the time domain into the frequency domain;

[0010] Step 5, multiplying the transformed frequency domain signal and the frequency domain coefficient;

[0011] Step 6, performing inverse fast Fourier transform on the multiplied frequency domain signal to transform the frequency domain signal into the time domain;

[0012] Step 7, normalizing the transformed time domain signal;

[0013] Step 8, output the filtered signal;

[0014] Among them, step 3, step 4, and step 6 utilize the hard real-time performance and NEON instructions of the ReWorks operating system and use the fftw3 library to quickly implement forward Fourier transform and inverse Fourier transform, including:

[0015] 1) Use the SIMD data-level parallel computing technology NEON of the ReWorks operating system to parallelize the filter coefficient function;

[0016] 2) Port the fftw3f open source program to the ReWorks operating system;

[0017] 3) Implement memory pooling management of the fftw3f library.

[0018] Further, the step 3) comprises:

[0019] (1) Initialize the memory pool API using the fftwf_init_mem_pool method of the ReWorks environment system API;

[0020] (2) Use the fftwf_destroy_mem_pool method of the ReWorks environment system API to release the memory pool API;

[0021] (3) Use the memPartAlignedAlloc method of the ReWorks environment to return the memory to the memory pool;

[0022] (4) Use the memPartFree method of the ReWorks environment to release memory.

[0023] The present invention also provides an embedded platform high-performance FIR filtering system based on fftw3f, comprising a filtering module, and the filtering module executes the embedded platform high-performance FIR filtering method based on fftw3f.

[0024] The present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the embedded platform high-performance FIR filtering method based on fftw3f is implemented.

[0025] The present invention also provides an electronic device, comprising:

[0026] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the embedded platform high-performance FIR filtering method based on fftw3f by executing the computer instructions.

[0027] Through the above solution, through the embedded platform high-performance FIR filtering method and system based on fftw3f, the problem of poor filtering performance of the ReWorks (FT2000 / 4) platform was solved, and the reconstructed FIR filtering algorithm (bandpass filtering, band group filtering, high-pass filtering, low-pass filtering) was greatly improved.

[0028] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is the flow chart of the traditional linear FIR filtering algorithm;

[0030] Figure 2 It is a flow chart of the high-performance FIR filtering method for embedded platforms based on fftw3f of the present invention;

[0031] Figure 3This is the API flow chart of the memory pooling of the fftw3f library of the present invention;

[0032] Figure 4 The figure is a schematic diagram of an electronic device according to the present invention. DETAILED DESCRIPTION

[0033] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0034] Terminology explanation:

[0035] ReWorks embedded operating system is an embedded real-time operating system independently developed by the 32nd Institute of China Electronics Technology Group based on the technological achievements of the "Ninth Five-Year Plan" and "Tenth Five-Year Plan" and has all source codes. It is suitable for a variety of target hardware environments (arm, x86, mips). ReWorks operating system is developed using object-oriented and microkernel technology, has strong real-time performance, scalability and scalability, and provides a VxWorks compatibility layer.

[0036] The Feiteng series processors are general-purpose CPUs developed by Feiteng Information Technology Co., Ltd. The FT-2000 / 4 chip integrates four high-efficiency processor cores FTC663 independently developed by Feiteng. It is compatible with the 64-bit ARMv8 instruction set and supports both ARM64 and ARM32 execution modes. It supports single-precision and double-precision floating-point operation instructions and ASIMD processing instructions, supports hardware virtualization, and supports commercial and industrial grading.

[0037] Ginseng Figure 2 As shown, the frequency domain FIR filter, DFT is the normal Fourier transform, IDFT is the inverse Fourier transform, a high-performance FIR filtering method for embedded platforms based on fftw3f, includes the following steps:

[0038] Step 1, input the signal data to be filtered (can be any signal);

[0039] Step 2, input the coefficients for signal filtering (band-pass filtering, low-pass filtering, high-pass filtering, band-stop filtering);

[0040] Step 3, performing fast Fourier forward transform on the filtered signal to transform the signal data in the time domain into the frequency domain;

[0041] Step 4, performing fast Fourier forward transform on the filter coefficients to transform the filter coefficients in the time domain into the frequency domain;

[0042] Step 5, multiplying the transformed frequency domain signal and the frequency domain coefficient;

[0043] Step 6, performing inverse fast Fourier transform on the multiplied frequency domain signal to transform the frequency domain signal into the time domain;

[0044] Step 7, normalizing the transformed time domain signal;

[0045] Step 8, output the filtered signal;

[0046] Among them, steps 3, 4, and 6 utilize the hard real-time performance and NEON instructions of the ReWorks operating system and use the fftw3 library to quickly implement forward Fourier transform and inverse Fourier transform. The implementation method of FIR high-performance filtering under ReWorks includes:

[0047] 1) Using the SIMD data-level parallel computing technology NEON of the ReWorks operating system to parallelize the filter coefficient functions (band-stop filter, band-pass filter, high-pass filter, low-pass filter);

[0048] 2) Port the fftw3f open source program to the ReWorks operating system;

[0049] 3) Implement memory pooling management of the fftw3f library.

[0050] Ginseng Figure 3 As shown, the step 3) includes:

[0051] (1) Implement the initialization memory pool API (fftwf_init_mem_pool) method using the ReWorks environment system API (malloc, memPartCreate). int fftwf_init_mem_pool(size_tn); The memory pool must be initialized before using the fftw3 library; the initialization returns 0 if successful, otherwise it returns -1, and the parameter n is the size of the memory pool.

[0052] (2) Implement the API method for releasing the memory pool (fftwf_destroy_mem_pool) using the ReWorks environment system API (free). void*fftwf_get_mem_addr(size_t n); Get memory from the memory pool. Parameter n is the size of the memory to be obtained. If the memory is successfully obtained, the memory address is returned. If it fails, it returns null.

[0053] (3) Re-implement the fftwf_kernel_malloc method using the memPartAlignedAlloc method of the ReWorks environment. int fftwf_put_mem_addr(void*p); The parameter p of this method represents the memory to be released. It returns 1 if the release is successful, and -1 if the release fails.

[0054] (4) Re-implement the fftwf_kernel_free method using the memPartFree method of the ReWorks environment.

[0055] The present invention transfers the signal and filter coefficients to the frequency domain to realize filtering based on the FIR filter function of the ReWorks operating system. According to the Fourier transform, frequency domain multiplication is equal to time domain convolution. The DFT (forward Fourier transform) and IDFT (inverse Fourier transform) in the filtering algorithm are quickly implemented using the fftw3 library. The time complexity of the fftwf library for calculating one-dimensional data is Nlog N .

[0056] Through this fftw3f-based embedded platform high-performance FIR filtering method, the problem of poor filtering performance of the ReWorks (FT2000 / 4) platform is solved, and the reconstructed FIR filtering algorithms (bandpass filtering, band group filtering, high-pass filtering, and low-pass filtering) are greatly improved.

[0057] This embodiment also provides an embedded platform high-performance FIR filtering system based on fftw3f, including a filtering module, and the filtering module executes the embedded platform high-performance FIR filtering method based on fftw3f.

[0058] This embodiment also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the embedded platform high-performance FIR filtering method based on fftw3f is implemented.

[0059] Ginseng Figure 4 As shown, this embodiment also provides an electronic device, including:

[0060] A memory 201 and a processor 202, wherein the memory 201 and the processor 202 are communicatively connected to each other, the memory 201 stores computer instructions, and the processor 202 executes the computer instructions to execute the embedded platform high-performance FIR filtering method based on fftw3f.

[0061] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A high-performance FIR filtering method for embedded platforms based on fftw3f, characterized in that: The steps include: Step 1, input the signal data to be filtered; Step 2, input the coefficients for signal filtering; Step 3, performing fast Fourier forward transform on the filtered signal to transform the signal data in the time domain into the frequency domain; Step 4, performing fast Fourier forward transform on the filter coefficients to transform the filter coefficients in the time domain into the frequency domain; Step 5, multiplying the transformed frequency domain signal and the frequency domain coefficient; Step 6, performing inverse fast Fourier transform on the multiplied frequency domain signal to transform the frequency domain signal into the time domain; Step 7, normalizing the transformed time domain signal; Step 8, output the filtered signal; Among them, step 3, step 4, and step 6 utilize the hard real-time performance and NEON instructions of the ReWorks operating system and use the fftw3 library to quickly implement forward Fourier transform and inverse Fourier transform, including: 1) Use the SIMD data-level parallel computing technology NEON of the ReWorks operating system to parallelize the filter coefficient function; 2) Port the fftw3f open source program to the ReWorks operating system; 3) Implement memory pooling management of the fftw3f library.

2. The embedded platform high-performance FIR filtering method based on fftw3f according to claim 1 is characterized in that: The step 3) comprises: (1) Initialize the memory pool API using the fftwf_init_mem_pool method of the ReWorks environment system API; (2) Use the fftwf_destroy_mem_pool method of the ReWorks environment system API to release the memory pool API; (3) Use the memPartAlignedAlloc method of the ReWorks environment to return the memory to the memory pool; (4) Use the memPartFree method of the ReWorks environment to release memory.

3. A high-performance FIR filtering system based on embedded platform based on fftw3f, characterized in that: It includes a filtering module, which executes the embedded platform high-performance FIR filtering method based on fftw3f as described in claim 1 or 2.

4. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, they implement the embedded platform high-performance FIR filtering method based on fftw3f as described in any one of claims 1 or 2.

5. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the high-performance FIR filtering method for an embedded platform based on fftw3f as described in claim 1 or 2 by executing the computer instructions.