Self-adaptive arbitrary resampling method and device
By designing and adjusting the parameters of an adaptive arbitrary group delay filter, the problem of low signal sampling accuracy and efficiency in existing technologies is solved, achieving high-precision and high-efficiency signal resampling, which is suitable for various signal bandwidth scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing arbitrary resampling methods suffer from limitations in accuracy and computational complexity when preserving the time and frequency domain characteristics of signals. They are particularly inefficient when processing signals with relatively wide bandwidths, and their accuracy is greatly affected by the window length and window type.
An adaptive arbitrary group delay filter is designed. The basic filter is optimized by a window function interpolation algorithm, the resampling parameters are adaptively adjusted, the resampling periodicity is determined by an error threshold, and a real-time coefficient calculation, storage and reuse mode is adopted to realize convolution filtering and gain correction.
It improves signal sampling accuracy and computational efficiency, adapts to sampling rate changes in different scenarios, reduces computational resource requirements, and maintains high signal accuracy and low sidelobe suppression capability.
Smart Images

Figure CN121664159A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital signal processing technology, and in particular to an adaptive arbitrary resampling method and apparatus. Background Technology
[0002] In the field of digital signal processing, signal rate transformation is a common processing technique, which is divided into integer multiple interpolation / decimation and arbitrary rate transformation. The requirement of resampling is to preserve the time and frequency domain characteristics of the original signal as much as possible while achieving rate transformation. Currently, arbitrary resampling techniques mainly include polynomial interpolation, FFT-based resampling, windowed sinc function interpolation, and Farrow structure-based resampling.
[0003] Among common arbitrary resampling methods, the accuracy of resampling methods based on polynomial interpolation and Farrow structure is affected by the order of the polynomial and the order of the Farrow, and they are not suitable for signals with relatively large bandwidths. Resampling methods based on FFT require FFT of the input signal, which has a huge computational load when the amount of input signal data is large, affecting the resampling efficiency. Resampling methods based on windowed sinc function interpolation are relatively accurate, but they are greatly affected by the window length and window type.
[0004] Therefore, there is an urgent need for an arbitrary resampling method that can achieve signal rate transformation, preserve the time-domain / frequency-domain characteristics of the original signal, save computational resources and improve computational efficiency while ensuring accuracy, and whose accuracy is less affected by window length and window type. Summary of the Invention
[0005] In view of this, this application provides an adaptive arbitrary resampling method to address the shortcomings of the existing technology.
[0006] The first aspect of this application provides an adaptive arbitrary resampling method, comprising: Based on windowing The function interpolation algorithm is used to design a basic filter and optimize it for arbitrary group delay, resulting in an arbitrary group delay filter and its corresponding filter coefficients. The resampling parameters of the arbitrary group delay filter are adaptively adjusted based on the input signal sampling rate and the output signal sampling rate. Obtain the length of the input signal and combine it with the adjusted resampling parameters to obtain the length of the output signal; Calculate the number of resampling cycle points, determine the resampling periodicity by using the error threshold and the length of the output signal, and determine the storage flag; Traverse all output sampling points, and based on the number of cycle points and the storage flag, obtain the filter coefficients by calling three modes: real-time coefficient calculation, real-time coefficient calculation and storage, and coefficient reuse. Then, use the adaptively adjusted arbitrary group delay filter to perform convolution filtering and gain correction on the input signal, and output the target sampling rate signal.
[0007] In one possible implementation of the first aspect, the design of the fundamental filter includes: Set the filter length to The normalized 6dB cutoff frequency is , It is an odd number; calculate The functions include: for function, , , For discrete time domain indexing; Calculating the Blackman window function includes: For Blackman window functions; The calculation of the filter coefficients of the basic filter includes: These are the filter coefficients of the basic filter.
[0008] In one possible implementation of the first aspect, performing arbitrary group delay optimization on the fundamental filter includes: The normalized 6dB cutoff frequency Set to 1 and set the delay parameter. And satisfy the constraints. ; Reconfiguration delay The functions include: The calculation of the optimized filter coefficients includes: These are the filter coefficients of an arbitrary group delay filter.
[0009] In one possible implementation of the first aspect, adaptively adjusting the resampling parameters of the arbitrary group delay filter based on the input signal sampling rate and the output signal sampling rate includes: Based on the input signal sampling rate and the output signal sampling rate, the resampling factor is calculated, including: For resampling factor, The input signal sampling rate, The sampling rate of the output signal; when When, the resampling method is extraction; when At that time, the resampling method is interpolation; Set the resampling signal width to Then the relative bandwidth of the input signal and the relative bandwidth of the output signal are respectively: The relative bandwidth of the input signal. The relative bandwidth of the output signal; Based on the relative bandwidth of the input signal and the relative bandwidth of the output signal, the decimation resampling method and the interpolation resampling method are analyzed, and the analysis results are obtained. Based on the analysis results, the filter length of the arbitrary group delay filter is dynamically matched; The normalized 6dB cutoff frequency The value of 1 and the type of the window function remain unchanged.
[0010] In one possible implementation of the first aspect, the length of the output signal is obtained by: The length of the input signal is obtained, and the length of the output signal is calculated using the following formula: The length of the input signal. This is the length of the filter after dynamic matching. The value is rounded down. The length of the output signal.
[0011] In one possible implementation of the first aspect, calculating the number of resampling cycle points, determining the resampling periodicity through an error threshold and the length of the output signal, and determining the storage flag include: S1. Initialize the number of loop cycle points, store the flags, and set the error threshold; S2. Set the time step of the input signal to 1, increment the number of cycle points, and calculate the periodic error; S3. Determine whether the periodic error is less than the error threshold. If yes, determine that the periodicity is satisfied and proceed to step S4. If no, determine that the periodicity is not satisfied and proceed to step S5. S4. Calculate the number of cycle points as the current iteration number. It then determines whether the number of cycle points is greater than the length of the output signal. If so, it determines that the corresponding number of cycle points cannot be reused and keeps the storage flag set. If not, determine if the corresponding cycle points can be reused and output the current cycle points. and keep the storage flag as ; S5. Determine if the number of iterations for the loop period exceeds the maximum storage capacity of the filter coefficients. If so, terminate the loop and keep the storage flag set. If not, return to step S2 and continue to increment the cycle points.
[0012] In one possible implementation of the first aspect, calculating the periodic error includes: Based on the time step of the input signal, the resampling time step is calculated as follows: The time step for resampling; Based on the time step of resampling, the periodic error is calculated as follows: It is a periodic error. The number of iterations represents the periodicity of the loop. This represents the value rounded down.
[0013] In one possible implementation of the first aspect, resampling the signal includes: For each output sampling point The following steps are performed until the termination condition is met, with the range of the output sampling points increasing from 0 to... The following steps are: M1. Based on the storage flag, the current output sampling point, and the number of cycle points, select three filter coefficient acquisition modes; M2. The corresponding filter coefficients are obtained through different filter coefficient acquisition modes, and the input signal is convolutionally filtered and the gain is corrected based on the adaptively adjusted arbitrary group delay filter. M3. Simultaneously verify two conditions: condition 1 is that the value of the current output sampling point is greater than or equal to the length of the output signal, and condition 2 is that the number of input points required when the current output sampling point performs convolution filtering is greater than the length of the input signal. If either condition 1 or condition 2 is met, proceed to step M4; if neither condition 1 nor condition 2 is met, increment the current output sampling point and return to step M1. M4. If the termination condition is met, output the target rate signal for resampling.
[0014] In one possible implementation of the first aspect, the three filter coefficient acquisition modes include: When storage flag At that time, based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated each time; When storage flag And output sampling points Based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated and stored. When storage flag And output sampling points , retrieve the stored filter coefficients.
[0015] A second aspect of this application provides an electronic device, comprising: a processor and a memory, the processor and the memory being connected via a communication bus; wherein the processor is configured to call and execute a program stored in the memory; and the memory is configured to store the program, the program being configured to implement the aforementioned adaptive arbitrary resampling method.
[0016] Its beneficial effects are as follows: This invention provides an adaptive arbitrary resampling method and apparatus, including: based on windowing A function interpolation algorithm is used to design a basic filter and optimize it into an arbitrary group delay filter. The resampling factor is calculated using the input and output signal sampling rates, and the filter's resampling parameters are adaptively adjusted. The output signal length is calculated based on the input signal length, and the resampling periodicity is determined using an error threshold to determine the number of cycle points and storage flags. Finally, the output sampling points are traversed, and filter coefficients are obtained using three modes: real-time coefficient calculation, calculation and storage, and retrieval. After convolution filtering and gain correction, the target sampling rate signal is output. This invention solves the problems of limited accuracy and high computational load in existing arbitrary resampling methods, while simultaneously considering sampling accuracy and efficiency. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of an adaptive arbitrary resampling method provided in an embodiment of this application; Figure 2 These are waveforms of the amplitude-frequency response of the basic filter at different cutoff frequencies in the embodiments of this application; Figure 3These are waveforms of the filter amplitude-frequency response under different delay parameters in the embodiments of this application; Figure 4 These are the filter delay response waveforms under different delay parameters in the embodiments of this application; Figure 5 These are waveforms of the amplitude-frequency and group delay response of filters of different lengths in the embodiments of this application; Figure 6 This is a waveform diagram of the amplitude-frequency and group delay response of a filter with a length of 7 in this embodiment of the application. Figure 7 This is a waveform diagram of the amplitude-frequency and group delay response of a filter with a length of 15 in this embodiment of the application. Figure 8 This is a waveform diagram of the amplitude-frequency and group delay response of a 25-length filter in the embodiment of this application; Figure 9 These are time-domain waveforms of the multi-tone signal before and after resampling in the embodiments of this application; Figure 10 This is a schematic diagram of the multi-tone signal spectrum before and after resampling in an embodiment of this application; Figure 11 This is a schematic diagram of the time-domain waveforms of the QPSK signal before and after resampling in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0021] Example 1 Among common arbitrary resampling methods, the accuracy of resampling methods based on polynomial interpolation and Farrow structure is affected by the order of the polynomial and the order of the Farrow, and they are not suitable for signals with relatively large bandwidths. Resampling methods based on FFT require FFT of the input signal, which has a huge computational load when the amount of input signal data is large, affecting the resampling efficiency. Resampling methods based on windowed sinc function interpolation are relatively accurate, but they are greatly affected by the window length and window type.
[0022] Therefore, this application provides an adaptive arbitrary resampling method, such as Figure 1 As shown, it includes: Based on windowing The function interpolation algorithm is used to design a basic filter and optimize it for arbitrary group delay, resulting in an arbitrary group delay filter and its corresponding filter coefficients. The resampling parameters of the arbitrary group delay filter are adaptively adjusted based on the input signal sampling rate and the output signal sampling rate. Obtain the length of the input signal and combine it with the adjusted resampling parameters to obtain the length of the output signal; Calculate the number of resampling cycle points, determine the resampling periodicity by using the error threshold and the length of the output signal, and determine the storage flag; Traverse all output sampling points, and based on the number of cycle points and the storage flag, obtain the filter coefficients by calling three modes: real-time coefficient calculation, real-time coefficient calculation and storage, and coefficient reuse. Then, use the adaptively adjusted arbitrary group delay filter to perform convolution filtering and gain correction on the input signal, and output the target sampling rate signal.
[0023] This embodiment provides an adaptive arbitrary resampling method. The core process includes filter design and optimization, adaptive parameter adjustment, periodicity determination, and resampling execution. The specific steps are as follows: Step 1: Based on windowing Design a fundamental filter using function interpolation and perform arbitrary group delay optimization. The goal of this step is to generate an arbitrary group delay filter that supports custom group delay and low sidelobe leakage, providing a high-precision filtering foundation for subsequent resampling.
[0024] 1.1. Design of the basic filter The basic filter is a linear-phase FIR filter, which is applied by windowing. The function interpolation is implemented as follows: Set the core parameters, and set the filter length to... , For odd numbers, denote them as follows: Discrete-time index The range of values is Normalized 6dB cutoff frequency The initial value is set to 0~1 (and uniformly set to 1 during subsequent optimization) to control the passband range of the filter; calculate function, The function is the time-domain response of an ideal low-pass filter, which can effectively filter out noise exceeding the cutoff frequency. The formula is: when When the denominator is 0, (Derivation of the limit value) ensures the continuity of the time-domain response; Calculate the Blackman window function to suppress To reduce sidelobe leakage of the function (and avoid distortion of the signal spectrum after filtering), the Blackman window function is introduced, with the following formula: Among them, the amplitude of the window function decays smoothly from the center to the edge, effectively reducing the sidelobe energy; Calculate the fundamental filter coefficients, and The function is multiplied point-by-point by the Blackman window function to obtain the fundamental filter coefficients, as shown in the formula: The coefficient exhibits a symmetrical distribution, corresponding to linear phase characteristics, with a fixed group delay. This ensures that the signal is free from phase distortion after passing through the filter for optimization.
[0025] Figure 2 for ,different The obtained filter amplitude frequency can be seen At a cutoff frequency of 6dB, the designed filter is a linear FIR filter with a fixed group delay. .
[0026] 1.2 Arbitrary group delay optimization of the basic filter The group delay of the basic filter is fixed (depending on the filter length). This implementation cannot adapt to the timing alignment requirements of different scenarios. Therefore, this embodiment achieves custom adjustment of group delay through the following optimizations: Parameter adjustment to normalize the 6dB cutoff frequency Set to 1 to maximize the filter passband bandwidth, ensuring adaptability to scenarios with arbitrary sampling rate changes; introduce a delay parameter. Satisfying the constraints The group delay used for fine-tuning filters. The value can be set according to the actual timing requirements (e.g.) (Corresponding to an increase of 0.3 sampling periods in group delay). Reconfiguration delay Function, by Indexes in functions Replace with To achieve time-domain translation and reconstructed delay The function formula is: when hour, This avoids the problem of the denominator being 0; Calculate the coefficients of the arbitrary group delay filter, using the Blackman window function of the basic filter (ensuring that the sidelobe suppression capability remains unchanged), and then adjust the delay... Multiplying the function by the window function yields the optimized coefficients: The group delay of the optimized filter is Achieve basic group delay + fine-tuning It is customizable and maintains linear phase characteristics, with no phase distortion in the signal.
[0027] Taking a Blackman window function with a filter length of 25 as an example, simulations are performed respectively. The amplitude-frequency response and group delay response at 0.8 times the bandwidth, such as Figure 3 and Figure 4 As shown in the figure, the designed arbitrary group delay filter exhibits good amplitude flatness within the passband, and the group delay is... One-to-one correspondence.
[0028] Step 2: Adaptively adjust resampling parameters based on input / output sampling rates In different scenarios, the sampling rate of the input signal and the sampling rate of the output signal differ greatly. This embodiment uses the following steps to dynamically match the resampling parameters and balance accuracy and efficiency.
[0029] 2.1 Calculate the resampling factor Resampling factor Defined as the ratio of the output sampling rate to the input sampling rate, the formula is: according to The value of determines the resampling type: when When the value is less than 1, the resampling method is extraction (reducing the sampling rate), and samples with a value higher than 1 need to be filtered out. / 2 frequency components (avoid aliasing); when When the value is greater than 1, the resampling method is interpolation (increasing the sampling rate), and additional sampling points are needed to restore the time-domain details of the signal.
[0030] 2.2 Analysis of relative signal bandwidth Set the effective bandwidth of the resampled signal to be Then the relative bandwidth of the input signal and the relative bandwidth of the output signal are respectively: The relative bandwidth reflects the proportion of the effective frequency of the signal to the sampling rate, and is the core basis for adjusting the filter length. In the extraction scenario, if If the size is smaller, a shorter filter length is required; if If the size is large, a longer filter length is required; In interpolation scenarios, if If the size is smaller, a longer filter length is required; if Larger filter sizes require shorter filter lengths.
[0031] 2.3 Dynamic Matched Filter Length Based on the above analysis, the resampling factor... The smaller the value, the lower the required passband cutoff frequency of the resampling filter. A comparison of passband frequency responses for different filter lengths is provided. Figure 5 As shown, the settings are as follows: function , Figure 5 The above figure shows the amplitude-frequency response waveforms when the filter lengths are 7, 15, and 25. Figure 5 The following figure shows the group delay response waveforms for filter lengths of 5, 15, and 25; assuming the relative bandwidth of the output signal is 0.8. Figure 6 , Figure 7 and Figure 8 Simulations were performed for relative bandwidths of... , and The frequency response is shown below, specifically for resampling factors of 0.35, 0.75, and 1. Simulations show that the smaller the resampling factor, the smaller the required filter length. The following is a filter length selection rule provided in this example. The correspondence between density, length, and resampling factor can also be adjusted appropriately based on simulation results. This implementation does not impose specific limitations: It should be noted that the normalized 6dB cutoff frequency in this embodiment is... The parameters are kept constant at 1 and the window function is a Blackman window. Only the filter length is adjusted to avoid increasing complexity due to too many parameters.
[0032] Step 3: Calculate the output signal length The length of the output signal needs to be calculated based on the length of the input signal, the adjusted filter length, and the resampling factor to ensure that the output signal can completely cover the effective information of the input signal without redundancy or omission.
[0033] When performing convolution filtering, it is necessary to extract continuous... Each input sampling point is used as a processing segment. The edge portions of the input signal cannot be used as the starting point of a complete segment (this would cause out-of-bounds errors). Therefore, this invalid length needs to be discarded, and only the valid input length in the middle is resampled. The calculation formula is as follows: The length of the input signal. This is the length of the filter after dynamic matching. The value is rounded down. The length of the output signal.
[0034] Step 4: Calculate the number of resampling cycle points, determine the periodicity, and identify the storage flag. In traditional resampling methods, the filter coefficients need to be recalculated for each output sampling point, resulting in a huge amount of computation. This embodiment analyzes the periodicity of resampling, determines the minimum number of cycle points, and realizes coefficient reuse, which greatly reduces the amount of computation.
[0035] 4.1 Core Principles Resampling time step Defined as the time-domain step of the input signal corresponding to the output sampling point, the formula is: If there exists a positive integer (i.e.) ), making If it is approximately an integer, then it means that each time... Each output sampling point repeats the relative offset between the output and input times, and the filter coefficients also repeat synchronously. This allows for storage. The coefficients can be reused directly in subsequent output points without needing to be recalculated.
[0036] 4.2 Specific Process S1. Initialize variables: Candidate values of cycle period points (Incrementing from 1); Store flag (Coefficients are not stored by default; they must be enabled after verification); Error threshold Maximum storage capacity (System default, to avoid) Excessive size leads to storage redundancy); S2. Iterative calculation of periodic error: Increasing , (Start from 1 and try each one); calculate the periodic error, which reflects... The deviation between the total time-domain offset and the integer offset of each output point is expressed by the following formula: ; S3. Periodicity determination: like (If periodicity is satisfied), proceed to step S4; if (If the periodicity is not satisfied), proceed to step S5; S4. Verify the reasonableness of the period points: judge Is it greater than the output signal length? If so, then Too large, no reuse value (e.g.) , (Reused only once) Keep ;if not, It is reasonable and can be reused multiple times, output ,set up ; S5. Storage Capacity Determination: judge Does it exceed If so, the storage cost is too high, terminate the loop, and maintain... If not, return to step S2 and continue incrementing. .
[0037] Step 5: Traverse the output sampling points, perform resampling, and output the target signal. This step is the resampling execution phase, based on the determination in step 4. and The filter coefficients are obtained through three modes, and convolution filtering and gain correction are performed on the input signal to finally output the target sampling rate signal.
[0038] Initialize variables and output sampling point indices. Processing starts from the first output sampling point, with a range of 0~ Coefficient storage array Capacity = Only when Enabled at any time, used for filter coefficients within a cache cycle.
[0039] Iterate through the output sampling points, for each All of the following steps are performed: M1. Select the filter coefficient acquisition mode: When storage flag At that time, based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated each time; When storage flag And output sampling points Based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated and stored. When storage flag And output sampling points , retrieve the stored filter coefficients; M2. Convolutional Filtering and Gain Correction: The purpose of convolution filtering is to filter out aliasing frequencies and retain effective signals while generating new sampling points. During the convolution process, the superposition of energy of the filter coefficients will cause the output signal amplitude to shift. In order to ensure that the input / output signal amplitudes are consistent, a gain factor is introduced for gain correction. M3. Termination condition verification: Condition 1, (All output points have been processed); Condition 2, (The input segment required for the current output point exceeds the length of the input signal; there is insufficient data); if any condition is met, proceed to step M4; otherwise, Return to step M1.
[0040] M4. Output target signal: If the termination condition is met, output the target rate signal for resampling.
[0041] This embodiment also verifies the advantages of this method through simulation of multi-tone signals and QPSK signals. Please refer to [link / reference]. Figure 9 , Figure 10 and Figure 11 Specifically: Simulation of multi-tone signals: Signal parameters: Multi-tone signal with a sampling rate of 200kHz, frequency start: -50kHz, frequency end: 50kHz, frequency step: 5kHz; Resampling parameters: window length is 15, output sampling rate is 140kHz.
[0042] Figure 9 This is a time-domain waveform diagram of the multi-tone signal before and after resampling, verifying that the time-domain characteristics are not distorted. The horizontal axis represents time. The vertical axis represents the signal amplitude (V). In the upper graph (before resampling), the multi-tone signal is composed of multiple superimposed sine waves of different frequencies. The waveform is dense, with regular alternation of peaks and valleys, and no glitches or abrupt amplitude changes. In the lower graph (after resampling), the waveform is relatively sparse, but the peak values, amplitude, and waveform period are completely aligned with the original signal. After resampling using the method in this embodiment, the time-domain trend is completely preserved, the amplitude accuracy is extremely high, and the rate transformation is precise and controllable.
[0043] Figure 10The images show the spectrum of the multi-tone signal before and after resampling, verifying the absence of aliasing and degradation in the frequency domain. The horizontal axis (w) represents frequency, and the vertical axis represents signal power. In the upper image (before resampling), the effective frequency components are concentrated within the preset bandwidth, corresponding to multiple discrete spectral lines. Sidelobe power is low, and there is no obvious clutter. In the lower image (after resampling), the spectral line positions are completely consistent with the original signal (all frequency components are retained), the sidelobe power deviates from the original signal by ≤1dB, and frequency components higher than outFs / 2 completely disappear (no aliasing). After resampling using the method in this embodiment, the effective spectrum is completely preserved, the aliasing suppression effect is significant, and the sidelobe suppression capability is stable.
[0044] Combination Figure 9 and Figure 10 It can be seen that the resampling method in this embodiment has little impact on the signal amplitude, and the number of resampling cycle points is low. In other words, this embodiment only requires calculating and storing 7 sets of resampling filter coefficients to realize the entire resampling process, which greatly improves the computational efficiency and saves computational resources.
[0045] Simulation of QPSK signals: Signal parameters: QPSK signal with a symbol rate of 50kHz and a sampling rate of 200kHz; Resampling parameters: window length 25, output sampling rate 300kHz.
[0046] Figure 11 This is a time-domain waveform diagram of the QPSK signal before and after resampling, verifying the high fidelity of the communication-specific signal. The horizontal axis represents time. The vertical axis represents amplitude (V). The waveform in the upper graph (before resampling) exhibits constant envelope characteristics, with clear symbol boundaries and smooth transitions. Although the waveform in the lower graph (after resampling) is sparse, its constant envelope characteristics, symbol boundary positions, and phase transition patterns are highly consistent with the original signal. After resampling using the method in this embodiment, the demodulated EVM of the input signal is 0.35%, and the demodulated EVM of the output signal is 0.351%. This demonstrates that a resampling filter with a length of 25 can achieve signal resampling without degrading signal quality. At this point, the number of resampling cycle points... In other words, this embodiment only requires calculating and storing 3 sets of resampling filter coefficients to realize the entire resampling process, which greatly improves the computational efficiency and saves computational resources.
[0047] Compared with existing technologies, the adaptive arbitrary resampling method in this embodiment has at least the following advantages: High-precision signal retention: Based on windowing Function interpolation provides strong sidelobe suppression, avoiding aliasing distortion; arbitrary group delay optimization maintains linear phase characteristics, ensuring no phase distortion of the signal; gain correction ensures consistent input / output signal amplitude.
[0048] High computational efficiency: By periodically determining and reusing coefficients, the computational load is significantly reduced; the filter length is adaptively adjusted to avoid redundant computation caused by excessively long filters.
[0049] Strong scene adaptability: It supports arbitrary sampling rate transformation (decimation / interpolation) without redesigning the core filter structure; it dynamically matches the filter length to adapt to signals with different relative widths; and it allows arbitrary group delay adjustment to meet timing alignment requirements.
[0050] Low implementation complexity: The core parameter only requires adjusting the filter length, while other parameters remain fixed, reducing design complexity; the coefficient acquisition mode logic is simple and easy to implement.
[0051] In some embodiments, designing a basic filter includes: Set the filter length to The normalized 6dB cutoff frequency is , It is an odd number; calculate The functions include: for function, , , For discrete time domain indexing; Calculating the Blackman window function includes: For Blackman window functions; The calculation of the filter coefficients of the basic filter includes: These are the filter coefficients of the basic filter.
[0052] In some embodiments, performing arbitrary group delay optimization on the basic filter includes: The normalized 6dB cutoff frequency Set to 1 and set the delay parameter. And satisfy the constraints. ; Reconfiguration delay The functions include: The calculation of the optimized filter coefficients includes: These are the filter coefficients of an arbitrary group delay filter.
[0053] In some embodiments, adaptively adjusting the resampling parameters of the arbitrary group delay filter based on the input signal sampling rate and the output signal sampling rate includes: Based on the input signal sampling rate and the output signal sampling rate, the resampling factor is calculated, including: For resampling factor, The input signal sampling rate, The sampling rate of the output signal; when When, the resampling method is extraction; when At that time, the resampling method is interpolation; Set the resampling signal width to Then the relative bandwidth of the input signal and the relative bandwidth of the output signal are respectively: The relative bandwidth of the input signal. The relative bandwidth of the output signal; Based on the relative bandwidth of the input signal and the relative bandwidth of the output signal, the decimation resampling method and the interpolation resampling method are analyzed, and the analysis results are obtained. Based on the analysis results, the filter length of the arbitrary group delay filter is dynamically matched; The normalized 6dB cutoff frequency The value of 1 and the type of the window function remain unchanged.
[0054] In some embodiments, obtaining the output signal length includes: The length of the input signal is obtained, and the length of the output signal is calculated using the following formula: The length of the input signal. This is the length of the filter after dynamic matching. The value is rounded down. The length of the output signal.
[0055] In some embodiments, calculating the number of resampling cycle points, determining the resampling periodicity based on an error threshold and the length of the output signal, and determining the storage flag include: S1. Initialize the number of loop cycle points, store the flags, and set the error threshold; S2. Set the time step of the input signal to 1, increment the number of cycle points, and calculate the periodic error; S3. Determine whether the periodic error is less than the error threshold. If yes, determine that the periodicity is satisfied and proceed to step S4. If no, determine that the periodicity is not satisfied and proceed to step S5. S4. Calculate the number of cycle points as the current iteration number. It then determines whether the number of cycle points is greater than the length of the output signal. If so, it determines that the corresponding number of cycle points cannot be reused and keeps the storage flag set. If not, determine if the corresponding cycle points can be reused and output the current cycle points. and keep the storage flag as ; S5. Determine if the number of iterations for the loop period exceeds the maximum storage capacity of the filter coefficients. If so, terminate the loop and keep the storage flag set. If not, return to step S2 and continue to increment the cycle points.
[0056] In some embodiments, calculating periodic errors includes: Based on the time step of the input signal, the resampling time step is calculated as follows: The time step for resampling; Based on the time step of resampling, the periodic error is calculated as follows: It is a periodic error. The number of iterations represents the periodicity of the loop. This represents the value rounded down.
[0057] In some embodiments, resampling the signal includes: For each output sampling point The following steps are performed until the termination condition is met, with the range of the output sampling points increasing from 0 to... The following steps are: M1. Based on the storage flag, the current output sampling point, and the number of cycle points, select three filter coefficient acquisition modes; M2. The corresponding filter coefficients are obtained through different filter coefficient acquisition modes, and the input signal is convolutionally filtered and the gain is corrected based on the adaptively adjusted arbitrary group delay filter. M3. Simultaneously verify two conditions: condition 1 is that the value of the current output sampling point is greater than or equal to the length of the output signal, and condition 2 is that the number of input points required when the current output sampling point performs convolution filtering is greater than the length of the input signal. If either condition 1 or condition 2 is met, proceed to step M4; if neither condition 1 nor condition 2 is met, increment the current output sampling point and return to step M1. M4. If the termination condition is met, output the target rate signal for resampling.
[0058] In some embodiments, selecting three filter coefficient acquisition modes includes: When storage flag At that time, based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated each time; When storage flag And output sampling points Based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated and stored. When storage flag And output sampling points , retrieve the stored filter coefficients.
[0059] Example 2 Embodiment 2 of this application provides an electronic device, including: a processor and a memory, the processor and the memory being connected via a communication bus; wherein, the processor is used to call and execute a program stored in the memory; the memory is used to store the program, the program being used to implement an adaptive arbitrary resampling method as provided in Embodiment 1 of this application.
[0060] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computing software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0061] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0062] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An adaptive arbitrary resampling method, characterized in that, include: Based on windowing The function interpolation algorithm is used to design a basic filter and optimize it for arbitrary group delay, resulting in an arbitrary group delay filter and its corresponding filter coefficients. The resampling parameters of the arbitrary group delay filter are adaptively adjusted based on the input signal sampling rate and the output signal sampling rate. Obtain the length of the input signal and combine it with the adjusted resampling parameters to obtain the length of the output signal; Calculate the number of resampling cycle points, determine the resampling periodicity by using the error threshold and the length of the output signal, and determine the storage flag; Traverse all output sampling points, and based on the number of cycle points and the storage flag, obtain the filter coefficients by calling three modes: real-time coefficient calculation, real-time coefficient calculation and storage, and coefficient reuse. Then, use the adaptively adjusted arbitrary group delay filter to perform convolution filtering and gain correction on the input signal, and output the target sampling rate signal.
2. The adaptive arbitrary resampling method according to claim 1, characterized in that, The design of the basic filter includes: Set the filter length to The normalized 6dB cutoff frequency is , It is an odd number; calculate The functions include: for function, , , For discrete time domain indexing; Calculating the Blackman window function includes: For Blackman window functions; The calculation of the filter coefficients of the basic filter includes: These are the filter coefficients of the basic filter.
3. The adaptive arbitrary resampling method according to claim 2, characterized in that, Arbitrary group delay optimization of the fundamental filter includes: The normalized 6dB cutoff frequency Set to 1 and set the delay parameter. And satisfy the constraints. ; Reconfiguration delay The functions include: The calculation of the optimized filter coefficients includes: These are the filter coefficients of an arbitrary group delay filter.
4. The adaptive arbitrary resampling method according to claim 3, characterized in that, The resampling parameters of the arbitrary group delay filter are adaptively adjusted based on the input signal sampling rate and the output signal sampling rate, including: Based on the input signal sampling rate and the output signal sampling rate, the resampling factor is calculated, including: For resampling factor, The input signal sampling rate, The sampling rate of the output signal; when When, the resampling method is extraction; when At that time, the resampling method is interpolation; Set the resampling signal width to Then the relative bandwidth of the input signal and the relative bandwidth of the output signal are respectively: The relative bandwidth of the input signal. The relative bandwidth of the output signal; Based on the relative bandwidth of the input signal and the relative bandwidth of the output signal, the decimation resampling method and the interpolation resampling method are analyzed, and the analysis results are obtained. Based on the analysis results, the filter length of the arbitrary group delay filter is dynamically matched; The normalized 6dB cutoff frequency The value of 1 and the type of the window function remain unchanged.
5. The adaptive arbitrary resampling method according to claim 4, characterized in that, The length of the output signal is obtained including: The length of the input signal is obtained, and the length of the output signal is calculated using the following formula: The length of the input signal. This is the length of the filter after dynamic matching. The value is rounded down. The length of the output signal.
6. The adaptive arbitrary resampling method according to claim 5, characterized in that, The calculation of the number of resampling cycle points, the determination of resampling periodicity based on the error threshold and the length of the output signal, and the determination of the storage flag include: S1. Initialize the number of loop cycle points, store the flags, and set the error threshold; S2. Set the time step of the input signal to 1, increment the number of cycle points, and calculate the periodic error; S3. Determine whether the periodic error is less than the error threshold. If yes, determine that the periodicity is satisfied and proceed to step S4. If no, determine that the periodicity is not satisfied and proceed to step S5. S4. Calculate the number of cycle points as the current iteration number. It then determines whether the number of cycle points is greater than the length of the output signal. If so, it determines that the corresponding number of cycle points cannot be reused and keeps the storage flag set. If not, determine if the corresponding cycle points can be reused and output the current cycle points. and keep the storage flag as ; S5. Determine if the number of iterations for the loop period exceeds the maximum storage capacity of the filter coefficients. If so, terminate the loop and keep the storage flag set. If not, return to step S2 and continue to increment the cycle points.
7. The adaptive arbitrary resampling method according to claim 6, characterized in that, The calculation of periodic error includes: Based on the time step of the input signal, the resampling time step is calculated as follows: The time step for resampling; Based on the time step of resampling, the periodic error is calculated as follows: It is a periodic error. The number of iterations represents the periodicity of the loop. This represents the value rounded down.
8. The adaptive arbitrary resampling method according to claim 6, characterized in that, Resampling a signal includes: For each output sampling point The following steps are performed until the termination condition is met, with the range of the output sampling points increasing from 0 to... The following steps are: M1. Based on the storage flag, the current output sampling point, and the number of cycle points, select three filter coefficient acquisition modes; M2. The corresponding filter coefficients are obtained through different filter coefficient acquisition modes, and the input signal is convolutionally filtered and the gain is corrected based on the adaptively adjusted arbitrary group delay filter. M3. Simultaneously verify two conditions: condition 1 is that the value of the current output sampling point is greater than or equal to the length of the output signal, and condition 2 is that the number of input points required when the current output sampling point performs convolution filtering is greater than the length of the input signal. If either condition 1 or condition 2 is met, proceed to step M4; if neither condition 1 nor condition 2 is met, increment the current output sampling point and return to step M1. M4. If the termination condition is met, output the target rate signal for resampling.
9. An adaptive arbitrary resampling method according to claim 8, characterized in that, Three filter coefficient acquisition modes are available: When storage flag At that time, based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated each time; When storage flag And output sampling points Based on the generation logic of the arbitrary group delay filter, the corresponding filter coefficients are calculated and stored. When storage flag And output sampling points , retrieve the stored filter coefficients.
10. An electronic device, characterized in that, include: A processor and a memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program for implementing an adaptive arbitrary resampling method as described in any one of claims 1-9.
Citation Information
Patent Citations
Method for designing coefficients of digital reconstruction filter with random sampling rate conversion
CN103873016A
Self-adaptive resampling method based on window function design
CN111327297A
Arbitrary rate decimator and timing error corrector for an FSK receiver
US10862505B1
Sampling rate converter and method
US20020046227A1