Incremental lofar and stft real-time spectrum processing method and device
By using incremental LOFAR and STFT real-time spectrum processing methods, the computational redundancy and real-time performance issues of spectrum analysis under high sampling rates and short refresh cycles are solved, achieving efficient spectrum monitoring.
Patent Information
- Application Number
- CN202611716654.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-11-02
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies suffer from problems such as excessive redundant calculations, high initialization overhead, low frequency domain calculation efficiency, and insufficient real-time performance under conditions of high sampling rate and short refresh cycle.
Incremental LOFAR and STFT real-time spectrum processing methods are adopted. By using timed incremental processing, real-to-complex fast Fourier transform, plan and window function reuse, and history pruning, redundant calculations are reduced and real-time performance is improved.
It significantly reduces computational complexity, improves processing efficiency, meets the real-time spectrum monitoring requirements of high-frequency uplink demodulation streams, reduces computational redundancy and storage overhead, and ensures spectrum continuity and real-time performance.
Smart Images

Figure CN123178758A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital signal processing and spectrum monitoring technology, specifically to an incremental LOFAR and STFT real-time spectrum processing method and apparatus. Background Technology
[0002] With the development of high-frequency communication, acoustic detection, and signal monitoring systems, real-time spectrum analysis plays a crucial role in signal detection, modulation identification, and anomaly detection. In existing technologies, Short-Time Fourier Transform (STFT) and LOFAR spectrum analysis typically employ a full re-computation mode, meaning that each time the spectrum is refreshed, all historical data within a certain time window is re-framed, windowed, and recalculated using the Fourier transform. However, under conditions of high sampling rates (e.g., MHz) and short refresh periods (e.g., milliseconds), this approach has the following significant drawbacks:
[0003] (1) Severe redundant calculation: STFT adopts an overlapping window structure, and there is a large amount of data overlap between adjacent frames. Full recalculation leads to the same data being used in FFT calculation multiple times, resulting in high computational redundancy.
[0004] (2) Repetitive initialization overhead: In some implementations, the window function and FFT computation plan are repeatedly generated for each processing, increasing the additional computational burden;
[0005] (3) Low frequency domain computation efficiency: The complex FFT full-frequency computation is still used for real-valued signals, which does not utilize the spectral conjugate symmetry characteristics, resulting in increased frequency point computation and storage overhead;
[0006] (4) Insufficient real-time performance: Under high data throughput conditions, the full calculation mode is difficult to meet the real-time refresh requirements, and the system response delay is large.
[0007] Therefore, there is an urgent need for a spectrum processing method that can reduce redundant calculations, lower computational complexity, and improve real-time performance. Summary of the Invention
[0008] The purpose of this invention is to provide an incremental LOFAR and STFT real-time spectrum processing method and apparatus, which reduces redundant calculations and improves real-time performance through timed incremental processing, real-to-complex Fast Fourier Transform (R2CFFT), plan and window function reuse, and history pruning.
[0009] The technical solution adopted to achieve the purpose of this invention is:
[0010] An incremental LOFAR and STFT real-time spectrum processing method includes the following steps: S1, constructing a real-time spectrum processing framework, setting a fixed scheduling period T, and establishing a circular buffer for storing input sampling data;
[0011] S2. Within each fixed scheduling period T, extract the newly added sampled data relative to the previous period according to the read / write pointer position of the circular buffer; S3. Perform frame segmentation processing on the newly added sampled data according to the preset window length N and step size H to generate a new time-domain frame; S4. Perform windowing processing on the new time-domain frame to obtain a windowed time-domain frame; wherein the window function coefficients are generated in the initialization phase and reused in subsequent scheduling periods;
[0012] S5. Using the Fast Fourier Transform (FFT) plan pre-created and reused during the initialization phase, perform a real-to-complex Fast Fourier Transform (R2CFFT) on the windowed time-domain frame to obtain a single-sided spectrum as a new spectrum frame; S6. Append the new spectrum frame to the spectrum history cache in chronological order, and perform sliding window clipping on the historical spectrum frame according to the preset observation duration D to obtain the clipped historical spectrum frame; S7. Concatenate the clipped historical spectrum frame with the current new spectrum frame in chronological order to form real-time LOFAR and STFT spectrum results; S8. Repeat steps S2 to S7 until the stopping condition is met.
[0013] Furthermore, the circular buffer enables continuous writing and reading of new sampled data through write pointers and read pointers; in step S2, the range of new sampled data is determined by comparing the positional relationship between the current write pointer and the read pointer of the previous cycle.
[0014] Furthermore, the framing process described in step S3 is only performed on the newly sampled data interval and does not repeat the framing calculation on historically processed data; the window function described in step S4 is any one of the Hanning window, Hamming window, or Blackman window.
[0015] Furthermore, in step S5, the R2CFFT only calculates and retains the spectral results of the positive frequency portion to reduce the computational load and storage overhead in the frequency domain; the FFT plan is created once during the system initialization phase and reused in subsequent scheduling cycles.
[0016] Furthermore, the scheduling period T is a fixed time interval; the spectrum history cache adopts a sliding window mechanism to maintain a fixed length spectrum frame sequence according to the observation duration D; the method avoids repeated calculation of historical overlapping data by performing frequency domain transformation only on newly sampled data, and is used in a real-time spectrum monitoring system for high-frequency uplink demodulation streams.
[0017] An incremental LOFAR and STFT real-time spectrum processing device for executing the method described above includes a circular buffer module for continuously storing input sampled data, having write and read pointers; a scheduling module for triggering the operation of each processing module at a fixed scheduling period T; a new data extraction module for extracting new sampled data relative to the previous period according to the read and write pointer positions of the circular buffer in each scheduling period; a framing module for framing the new sampled data according to a preset window length N and step size H to generate new time-domain frames; a windowing module for windowing the new time-domain frames and outputting the windowed time-domain frames; this module reuses the window function coefficients pre-generated in the initialization phase; and an R2CFFT transform module for using the Fast Fourier Transform (FFT) calculation plan pre-created and reused in the initialization phase. The plan involves performing a real-to-complex Fast Fourier Transform (R2CFFT) on the windowed time-domain frame, outputting a single-sided spectrum as a new spectrum frame. The spectrum history cache module appends the new spectrum frame to the spectrum history cache in chronological order and performs sliding window clipping on the historical spectrum frame according to a preset observation duration D, obtaining a clipped historical spectrum frame. The splicing output module splices the clipped historical spectrum frame with the currently new spectrum frame in chronological order to form real-time LOFAR and STFT spectrum results. The scheduling module is connected to the control terminals of the circular buffer module, the new data extraction module, the framing module, the windowing module, the R2CFFT transform module, the spectrum history cache module, and the splicing output module to periodically coordinate the incremental processing of each module.
[0018] Furthermore, the circular buffer module enables continuous writing and reading through write pointers and read pointers; the new data extraction module determines the new sampling data range by comparing the positional relationship between the current write pointer and the previous cycle read pointer.
[0019] Furthermore, the framing module only frames the newly added sampled data intervals and does not repeatedly frame historically processed data; the window function used by the windowing module is any one of the Hanning window, Hamming window, or Blackman window, and its coefficients are calculated and stored in memory during the device initialization phase for reuse in subsequent cycles.
[0020] Furthermore, the R2CFFT transform module only calculates and retains the spectral results of the positive frequency portion; the FFTplan is created once by the R2CFFT transform module during the device initialization phase and reused in all subsequent scheduling cycles to reduce the overhead of repeated initialization.
[0021] Furthermore, the scheduling period T is a fixed time interval; the spectrum history cache module adopts a sliding window mechanism to maintain a spectrum frame sequence of fixed length according to the observation duration D; the device avoids repeated calculation of historical overlapping data by performing frequency domain transformation only on newly sampled data, and is suitable for real-time spectrum monitoring systems of high-frequency uplink demodulation streams.
[0022] The present invention has the following advantages:
[0023] On the one hand, by replacing full recalculation with incremental calculation, the computational load of FFT window is significantly reduced (by about 95.03%); on the other hand, the number of frequency domain points is reduced by R2CFFT (by about 50%), and the overhead is further reduced by combining plan / window function reuse, thereby effectively improving the processing efficiency and system response capability of real-time spectrum monitoring. Attached Figure Description
[0024] Figure 1 This is a flowchart of an incremental LOFAR and STFT real-time spectrum processing method according to an embodiment of the present invention.
[0025] Figure 2 This is a schematic diagram of the scheduling cycle according to an embodiment of the present invention.
[0026] Figure 3 This is a schematic diagram comparing the number of FFT windows for full recalculation and incremental processing in an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] Please see Figure 1 This invention provides an incremental LOFAR and STFT real-time spectrum processing method. In this embodiment, the input is a high-frequency uplink demodulation stream real-value sampling sequence, and the real-time spectrum refresh period is set to 500ms. The method includes the following steps:
[0029] S1. Construct a real-time spectrum processing framework, which includes a circular buffer module, a scheduling module, a new data extraction module, a framing module, a windowing module, an R2CFFT transform module, a spectrum history cache module, and a splicing output module. The scheduling module triggers spectrum processing tasks according to a preset fixed scheduling period T (e.g., 500ms), which can be implemented by a system timer or thread scheduling mechanism. Simultaneously, a circular buffer is established to store input sampled data. This buffer uses a continuous storage structure and is configured with write and read pointers. The write pointer receives and sequentially writes real-time sampled data, while the read pointer identifies the position of the data to be processed and automatically wraps around at the end of the buffer to achieve cyclic writing. Within each scheduling period, the range of newly sampled data is determined by comparing the current write pointer with the previous period's read pointer, providing a data foundation for subsequent incremental framing processing. Figure 2 As shown, the change curve of the scheduling cycle in this embodiment of the invention remains stable at around 1.00, indicating that the system operates according to a fixed scheduling cycle, the refresh process is relatively stable, and the real-time processing rhythm does not fluctuate significantly.
[0030] S2. In each scheduling cycle, based on the positional relationship between the current circular buffer write pointer and the previous scheduling cycle read pointer, determine the corresponding newly added sampling data range, and extract only the newly added sampling data for subsequent processing.
[0031] S3. The newly sampled data is processed by framing according to the preset window length N and step size H to generate corresponding new time-domain frames. The framing process only applies to the new data interval and does not repeatedly framing the historically processed data, thereby ensuring that each time-domain frame is processed only once and avoiding redundant calculations.
[0032] S4. Windowing processing is performed on the newly added time-domain frames. Each time-domain frame is multiplied point by point with a preset window function to reduce spectral leakage. The window function coefficients are pre-calculated and stored in memory during the system initialization phase. They are directly called and reused in subsequent scheduling cycles and are no longer generated repeatedly, thereby reducing computational overhead and improving processing efficiency.
[0033] S5. Using the Fast Fourier Transform (FFT) plan pre-created and reused during the initialization phase, perform a real-to-complex Fast Fourier Transform (R2CFFT) on the windowed time-domain frame to convert the time-domain signal to the frequency domain, obtaining a single-sided spectrum as a new spectral frame. Taking advantage of the input signal being a real-valued sequence, only the positive frequency portion of the single-sided spectrum is calculated and retained to reduce frequency domain computation and storage overhead, while ensuring the integrity of the spectral information. Specifically, the Fast Fourier Transform (FFT) plan is pre-created during system initialization and reused in subsequent scheduling cycles to avoid rebuilding the calculation plan during each frequency domain transformation, thereby reducing initialization overhead and improving overall processing efficiency.
[0034] S6. The newly added spectrum frames are appended to the spectrum history cache in chronological order, and the historical spectrum frame sequence is pruned by a sliding window according to the preset observation duration D, and old spectrum frames that exceed the observation duration range are deleted, so as to maintain the stability of the length and time range of the historical cache and ensure the temporal continuity of the spectrum data.
[0035] S7. The clipped historical spectrum frames are spliced with the newly added spectrum frames in chronological order to construct a continuously updated time spectrum matrix, thereby forming real-time LOFAR and STFT spectrum results for subsequent display or analysis.
[0036] S8. During system operation, steps S2 to S7 are continuously executed in a loop according to the scheduling cycle to achieve incremental updates and real-time output of spectrum data until an external stop command is received or the preset stop conditions are met.
[0037] By adopting the above implementation method, the computational complexity can be significantly reduced while ensuring time-frequency continuity, thus meeting the requirements for real-time spectrum monitoring of high-frequency uplink demodulation streams.
[0038] This invention also provides an incremental LOFAR and STFT real-time spectrum processing device for executing the method described above, comprising: a circular buffer module for continuously storing input sampled data, having write pointers and read pointers; a scheduling module for triggering the operation of each processing module at a fixed scheduling period T; a new data extraction module for extracting new sampled data relative to the previous period according to the read and write pointer positions of the circular buffer in each scheduling period; a framing module for framing the new sampled data according to a preset window length N and step size H to generate new time-domain frames; a windowing module for windowing the new time-domain frames and outputting the windowed time-domain frames; this module reuses the window function coefficients pre-generated in the initialization phase; and an R2CFFT transform module for using the Fast Fourier Transform (FFT) calculation plan pre-created and reused in the initialization phase. The plan performs a real-to-complex Fast Fourier Transform (R2CFFT) on the windowed time-domain frame, outputting a single-sided spectrum as a new spectrum frame. The spectrum history cache module appends the new spectrum frame to the spectrum history cache in chronological order and performs sliding window clipping on the historical spectrum frame according to a preset observation duration D to obtain the clipped historical spectrum frame. The splicing output module splices the clipped historical spectrum frame with the current new spectrum frame in chronological order to form real-time LOFAR and STFT spectrum results.
[0039] The scheduling module is connected to the control terminals of the circular buffer module, the new data extraction module, the framing module, the windowing module, the R2CFFT transform module, the spectral history cache module, and the splicing output module, respectively, to periodically coordinate the incremental processing of each module.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] Significantly reduces computational redundancy: By extracting newly sampled data only within each scheduling cycle for frame segmentation and frequency domain transformation, replacing the traditional full recalculation mode, repeated FFT calculations of historical overlapping data are avoided, reducing the computational load of the FFT window by approximately 95.03% (e.g., Figure 3 As shown, the number of FFT windows for full recalculation is 100, while the number for incremental processing is 5. It can be clearly seen that the number of FFT windows for incremental processing is only 5% of that for full recalculation, which significantly improves processing efficiency.
[0042] Reduce frequency domain and initialization overhead: Employ real-to-complex Fast Fourier Transform (R2CFFT) and retain only the positive frequency single-sided spectrum, reducing the number of frequency domain computation points and storage requirements by approximately 50%; at the same time, pre-create window function coefficients and FFT computation plan and reuse them in each cycle to avoid repeated initialization, further reducing system overhead.
[0043] Ensuring spectrum continuity and real-time performance: By managing new data through a circular buffer and using a sliding window pruning and splicing mechanism for spectrum history cache, the system maintains the temporal continuity and integrity of the time spectrum while incrementally updating, meeting the real-time spectrum monitoring requirements of high sampling rate signals such as high-frequency uplink demodulation streams. The system has low response latency and stable refresh.
[0044] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An incremental LOFAR and STFT real-time spectral processing method, characterized in that, Includes the following steps: S1. Construct a real-time spectrum processing framework, set a fixed scheduling period T, and establish a circular buffer for storing input sampling data; S2. Within each fixed scheduling period T, extract the newly added sampled data relative to the previous period according to the read / write pointer position of the circular buffer. S3. Based on the preset window length N and step size H, the newly added sampled data is processed into frames to generate new time-domain frames; S4. Window the newly added time-domain frame to obtain the windowed time-domain frame. The window function coefficients are generated during the initialization phase and reused in subsequent scheduling cycles. S5. Using the Fast Fourier Transform (FFT) calculation plan pre-created and reused in the initialization phase, perform a real-to-complex Fast Fourier Transform (R2CFFT) on the windowed time-domain frame to obtain a single-sided spectrum as a new spectrum frame. S6. The newly added spectrum frames are appended to the spectrum history cache in chronological order, and the historical spectrum frames are clipped by a sliding window according to the preset observation duration D to obtain the clipped historical spectrum frames. S7. The cropped historical spectrum frame is spliced with the currently added spectrum frame in chronological order to form real-time LOFAR and STFT spectrum results; S8. Repeat steps S2 to S7 until the stopping condition is met.
2. The method according to claim 1, characterized in that: The circular buffer uses write pointers and read pointers to continuously write and read new sampled data; in step S2, the range of new sampled data is determined by comparing the position relationship between the current write pointer and the read pointer of the previous cycle.
3. The method according to claim 1, characterized in that: The framing process described in step S3 is only performed on the newly sampled data interval and does not repeat the framing calculation on historically processed data; the window function described in step S4 is any one of the Hanning window, Hamming window or Blackman window.
4. The method according to claim 1, characterized in that: In step S5, the R2CFFT only calculates and retains the spectrum results of the positive frequency portion to reduce the computational load and storage overhead in the frequency domain; the FFT plan is created once during the system initialization phase and reused in subsequent scheduling cycles.
5. The method according to claim 1, characterized in that: The scheduling period T is a fixed time interval; the spectrum history cache adopts a sliding window mechanism to maintain a fixed length spectrum frame sequence according to the observation duration D; the method avoids repeated calculation of historical overlapping data by performing frequency domain transformation only on newly sampled data, and is used in a real-time spectrum monitoring system for high-frequency uplink demodulation streams.
6. An incremental LOFAR and STFT real-time spectrum processing apparatus, used to execute the method according to any one of claims 1 to 5, characterized in that, include: The circular buffer module is used to continuously store input sampled data and has write and read pointers; The scheduling module is used to trigger the operation of each processing module at a fixed scheduling period T; A new data extraction module is added to extract new sampled data relative to the previous cycle based on the read / write pointer position of the circular buffer in each scheduling cycle. The framing module is used to framage the newly sampled data according to the preset window length N and step size H, and generate new time-domain frames. The windowing module is used to window the newly added time-domain frames and output the windowed time-domain frames. This module reuses the window function coefficients generated in advance during the initialization phase; The R2CFFT transform module is used to perform real-to-complex fast Fourier transform (R2CFFT) on the windowed time-domain frame using the fast Fourier transform (FFT) plan that is pre-created and reused in the initialization phase, and outputs a single-sided spectrum as a new spectrum frame. The spectrum history cache module appends the newly added spectrum frames to the spectrum history cache in chronological order, and performs sliding window clipping on the historical spectrum frames according to the preset observation duration D to obtain the clipped historical spectrum frames. The splicing output module is used to splice the cropped historical spectrum frame with the currently added spectrum frame in chronological order to form real-time LOFAR and STFT spectrum results. The scheduling module is connected to the control terminals of the circular buffer module, the new data extraction module, the framing module, the windowing module, the R2CFFT transform module, the spectral history cache module, and the splicing output module, respectively, to periodically coordinate the incremental processing of each module.
7. The apparatus according to claim 6, characterized in that: The circular buffer module enables continuous writing and reading through write pointers and read pointers; the new data extraction module determines the new sampling data range by comparing the positional relationship between the current write pointer and the previous cycle read pointer.
8. The apparatus according to claim 6, characterized in that: The framing module only frames newly sampled data intervals and does not repeatedly frame previously processed data; the windowing module uses any one of the Hanning window, Hamming window or Blackman window, and its coefficients are calculated and stored in memory during the device initialization phase for reuse in subsequent cycles.
9. The apparatus according to claim 6, characterized in that: The R2CFFT transform module only calculates and retains the spectral results of the positive frequency portion; the FFT plan is created once by the R2CFFT transform module during the device initialization phase and reused in all subsequent scheduling cycles to reduce the overhead of repeated initialization.
10. The apparatus according to claim 6, characterized in that: The scheduling period T is a fixed time interval; the spectrum history cache module adopts a sliding window mechanism to maintain a fixed length spectrum frame sequence according to the observation duration D; the device avoids repeated calculation of historical overlapping data by performing frequency domain transformation only on newly sampled data, and is suitable for real-time spectrum monitoring systems of high-frequency uplink demodulation streams.
