Time delay filtering method and time delay filter based on least square method
Through the delay filtering method based on the least squares method, the Farrow filter coefficients are optimized by segmented curve fitting, which solves the problem of complex calculation of digital delay filter coefficients and insufficient real-time performance in the prior art, and realizes the optimization design of the delay filter coefficients and the reduction of hardware costs.
Patent Information
- Application Number
- CN202411875770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing digital delay filters cannot effectively realize the delay filtering requirements when the coefficient calculation process is complex and cannot meet the real-time requirements, especially when the delay parameters change rapidly.
The delay filtering method based on the least squares method is used to optimize the coefficients of the Farrow filter through segmented curve fitting, so that it can be more combined with the actual delay filtering requirements.
The optimized design of delay filter coefficients is realized, which reduces hardware cost and calculation complexity, and can better meet the engineering requirements in the field of laser vibration measurement.
Smart Images

Figure CN119813992A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital signal processing, and in particular to a time delay filtering method and a time delay filter based on the least square method. Background Art
[0002] The concept of fractional delay is generated with the discretization of signals. There is no need to distinguish between fractional delay and integer delay in continuous signal processing. In the A / D process, the signal is discretized through sampling. If two signals from the same signal source are not synchronized and the time difference is a non-integer multiple of the sampling interval, fractional delay will occur.
[0003] Common delay compensation methods include frequency domain compensation method, minimum mean square error criterion filtering method, Lagrange interpolation method, and polynomial-based fractional delay filter design method. Although the structure of ordinary digital delay filters is simple, the coefficient calculation process is complicated. When the delay parameters change rapidly, the coefficient update speed cannot meet the real-time requirements, which will be limited in engineering applications. Summary of the invention
[0004] Technical purpose: In view of the defects in the prior art, the present invention discloses a delay filtering method and a delay filter based on the least squares method, and optimizes the delay filter coefficients based on the Farrow filter by using the least squares method for piecewise curve fitting, so that it can be better combined with the actual delay filtering needs.
[0005] Technical solution: In order to achieve the above technical objectives, the present invention adopts the following technical solution.
[0006] A time delay filtering method based on least squares method, the method comprising:
[0007] Obtain the technical indicators required for the delay filter according to the delay filtering requirements;
[0008] Determine the order of the time delay filter according to the technical indicators, and then obtain the initialized time delay filter coefficients in combination with the selected window function;
[0009] The initialized delay filter coefficients are segmented to obtain segmented delay filter coefficients, and the segmented delay filter coefficients are fitted using a least square method to obtain fitted delay filter coefficients;
[0010] A Farrow filter is constructed according to the fitted delay filter coefficients. The Farrow filter meets the delay filtering requirements, and a digital delay result is obtained after receiving an input signal, thereby realizing a delay filtering method.
[0011] Furthermore, the technical indicators include passband frequency, cutoff frequency, amplitude-frequency response, and cutoff frequency fc It does not exceed half of the normalized sampling frequency and is in the range of (0,0.5].
[0012] Furthermore, determining the order of the time delay filter according to the technical indicators includes: obtaining an ideal amplitude-frequency characteristic curve according to the technical indicators, and then obtaining the order M of the time delay filter; the order M of the time delay filter is an even number.
[0013] Furthermore, the initialization delay filter coefficients are obtained by combining the selected window function, including:
[0014] The selected window function is the Blackman window function. According to the cutoff frequency f in the technical indicators c The delay filter coefficients are initialized by combining the Blackman window function with the order M of the delay filter. The structure of the delay filter coefficients is about the center symmetry;
[0015] The calculation formula for the initialized delay filter coefficient is:
[0016]
[0017] Among them, h i is the i-th initialized delay filter coefficient, i is the delay filter coefficient index, K is a constant, and satisfies
[0018] Furthermore, the calculation process of the fitted delay filter coefficient includes:
[0019] According to the symmetry of the initialized delay filter coefficients, the number of points required for fitting is determined as That is, the initial delay filter coefficients that need to be fitted are
[0020] The delay filter coefficients to be fitted are divided into Ns segments, where the value of Ns is a multiple of 2; the number of delay filter coefficients to be fitted in each segment is Nup, and satisfies: Nup is an integer;
[0021] The delay filter coefficient h that needs to be fitted for the nth segment n , where 1≤n≤Ns, and the polynomial fitting h is based on the least squares method n The continuous impulse response function h W ;
[0022] According to the fitting polynomial of each segment, the sum of squares of deviations of each delay filter coefficient to the fitting curve is calculated, and the solution is simplified according to the least square method to obtain the fitting result, that is, the fitted delay filter coefficient.
[0023] Furthermore, the delay filter coefficient h that needs to be fitted in the nth segment is n The calculation formula is:
[0024]
[0025] Where D is the order of the least squares polynomial, which cannot exceed 4; x is the delay, is the impulse response function corresponding to the Dth order.
[0026] Furthermore, the fitted delay filter coefficient H W The calculation formula of (:,:) is:
[0027]
[0028] Among them, H W (:,:) is the delay filter coefficient after fitting, 0≤d≤D, 1≤ns≤Ns, is the delay filter coefficient of the d-th order and ns-th segment, and D is the order of the least squares polynomial.
[0029] Furthermore, according to the fitted delay filter coefficient H W (:,:) Constructing a Farrow filter includes the following steps:
[0030] The fitted delay filter coefficient H W (:,:) is regarded as the weighted and weighted sum of the fractional delay u on the D sub-filters, and the Farrow filter is split into D groups of Ns-order FIR sub-filters and 2D fractional delay multipliers; where D is the order of the least squares polynomial, and Ns is the number of segments divided by the fitted delay filter coefficients;
[0031] The input signal flows into D groups of FIR sub-filters respectively, and each group of FIR sub-filters completes its own filtering process;
[0032] The two groups of actual delay amounts u and 1-u are divided into two paths to complete the multiplication and addition operations of each sub-filter group, and the two-path results are added to obtain the final digital delay result.
[0033] A time delay filter based on FPGA includes a processor, wherein the processor is used to receive a time delay filtering requirement and implement any of the above-mentioned time delay filtering methods based on the least square method, and obtain a digital delay result after receiving an input signal.
[0034] Beneficial effects:
[0035] 1. The present invention uses the least square method to perform piecewise curve fitting, optimizes the delay filter coefficient based on the Farrow filter, so that it can be better combined with the actual delay filtering requirements, and realizes the optimal design of the delay filter coefficient;
[0036] 2. The present invention can effectively reduce the hardware cost and computational complexity of implementing the fractional delay filter. At the same time, it can be applied in the field of laser vibrometer, meets the engineering requirements in the field of laser vibrometer, achieves a compromise between resource utilization and index requirements, and has certain reference significance for engineering practice. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of the method of the present invention;
[0038] Figure 2 A schematic diagram of the structure of a Farrow filter according to an embodiment of the present invention;
[0039] Figure 3 for Figure 2 Schematic diagram of the FIR sub-filter structure of the Farrow filter. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] As attached Figure 1 As shown, a time delay filtering method based on the least squares method of this embodiment includes the following steps:
[0042] Step 1: Obtain technical indicators required for the time delay filter according to the time delay filtering requirements, wherein the technical indicators include passband frequency, cutoff frequency, and amplitude-frequency response;
[0043] In this embodiment, an application scenario of a time delay filtering method based on the least squares method is a laser vibration measurement system. According to the engineering requirements of the laser vibration measurement system, the technical indicators of the required time delay filter are decomposed to obtain the following technical indicators: passband frequency, cutoff frequency, amplitude-frequency response;
[0044] According to the sampling rate conversion theoretical model, the effective signal in the original laser vibrometer system is converted from digital to analog, then passes through an analog low-pass filter and then undergoes analog-to-digital conversion. The low-pass filter used is an ideal analog low-pass filter ha(t), and the unit impulse response is an infinite-length sinc function. In engineering implementation, an approximate finite-length impulse response h(t) is required to replace the sinc function.
[0045] According to the effective signal in the original laser vibrometer system, the technical indicators are determined, including passband frequency, cutoff frequency and amplitude-frequency response, where the cutoff frequency f c does not exceed half of the normalized sampling frequency, so the cutoff frequency f c Must be a fraction in the range (0,0.5].
[0046] Step 2: Determine the order of the time delay filter according to the technical indicators, and then obtain the initialized time delay filter coefficients in combination with the selected window function;
[0047] Determining the order of the time delay filter according to the technical indicators includes: obtaining an ideal amplitude-frequency characteristic curve according to the technical indicators, and then obtaining the order M of the time delay filter; the order M of the time delay filter is an even number, and the roll-off is set according to the approximate value. The relationship between the bandwidth BW of the transition band of the time delay filter and the order M of the time delay filter is:
[0048] The order of the time delay filter obtained according to the amplitude-frequency characteristic curve can be obtained by dynamic simulation, that is, implemented by existing technology, which will not be elaborated here.
[0049] The initial delay filter coefficients are obtained by combining the selected window function, including:
[0050] The frequency response of an ideal low-pass filter is that frequencies below the cutoff frequency pass with unit amplitude, while frequencies above the cutoff frequency are blocked; the unit impulse response of an ideal low-pass filter is an infinitely long sinc function, which is not easy to implement in engineering. Here, a filter design method that improves the frequency response by truncation and window smoothing is used to design a Windowed Sinc filter.
[0051] In the present invention, a Blackman window is used, that is, the selected window function is a Blackman window function, and its expression is:
[0052]
[0053] Where, 1≤i≤M, M is the order of the delay filter;
[0054] According to the cut-off frequency f cThe order M of the time delay filter is combined with the Blackman window function to obtain the initialized time delay filter coefficient. The calculation formula of the initialized time delay filter coefficient is:
[0055]
[0056] Among them, h i is the i-th initialized delay filter coefficient, i is the delay filter coefficient index, K is a constant. In order to make the delay filter have unit gain at DC, the value of the constant K needs to make the sum of all delay filter coefficients equal to 1. All delay filter coefficients are normalized, that is, From this formula, we can see that the structure of the delay filter coefficients is about the center symmetry;
[0057] Step 3: Segment the initialized delay filter coefficients to obtain segmented delay filter coefficients, and fit the segmented delay filter coefficients using the least squares method to obtain fitted delay filter coefficients;
[0058] Polynomial curve fitting is realized based on the least squares method. The principle is: given m points, the curve is not required to pass through these points exactly, but the approximate curve y = φ (x) of the curve y = f (x). Given the coordinates of the data point (x p ,y p ), where 1≤p≤m. Find the approximate curve y=φ(x) and minimize the deviation between the approximate curve and y=f(x). The calculation formula is:
[0059]
[0060] In the present invention, in order to simplify the order of polynomial fitting and the problems of under-fitting and over-fitting, a segmented approach is used to perform curve fitting, and the process is as follows:
[0061] Step 31: According to the symmetry of the initialized time delay filter coefficients, determine the number of points to be fitted as That is, the initial delay filter coefficients that need to be fitted are
[0062] Step 32: Divide the delay filter coefficients to be fitted into Ns segments, where the value of Ns is a multiple of 2; the number of delay filter coefficients to be fitted in each segment is Nup, and satisfies: Nup is an integer.
[0063] Step 33: The delay filter coefficient h that needs to be fitted for the nth segment n , where 1≤n≤Ns, and the polynomial fitting h is based on the least squares method nThe continuous impulse response function h W , the calculation formula is:
[0064]
[0065] Where D is the order of the least squares polynomial, which cannot exceed 4; x is the delay, x∈[0,1], which is the matching h n The value of is the impulse response function corresponding to the Dth order;
[0066] Step 34: According to the fitting polynomial of each segment, the sum of the distances from each delay filter coefficient to this curve, i.e., the sum of squared deviations, is calculated, and the fitting result is obtained by simplifying and solving it according to the least squares method, i.e., the fitted delay filter coefficient H W (:,:); The delay filter coefficient after fitting H W The calculation formula of (:,:) is:
[0067]
[0068] Among them, H W (:,:) is the delay filter coefficient after fitting, 0≤d≤D, 1≤ns≤Ns, is the delay filter coefficient of the d-th order and ns-th segment;
[0069] The solution is simplified by the least square method to obtain the fitting result, which includes the following steps:
[0070] Step 341, calculate the sum of squared deviations, the calculation formula for the sum of squared deviations is:
[0071]
[0072] Step 342: In order to obtain polynomial coefficients that meet the conditions, according to the least squares principle, the impulse response function on the right side of the equation of the sum of squared deviations is derived to obtain the partial derivative formula as follows:
[0073]
[0074] Step 343, simplify the partial derivative formula to obtain the simplified formula as follows:
[0075]
[0076] Step 344: Change the simplified formula into a matrix form, and obtain the matrix simplified formula as follows:
[0077]
[0078] Step 345, perform Vandermonde matrix simplification on the matrix simplification formula to obtain the following Vandermonde matrix simplification formula:
[0079]
[0080] Step 346, the simplified formula of the Vandermonde matrix is expressed in matrix form, and the first matrix formula is obtained as follows:
[0081] XH W =H
[0082] in,
[0083] Step 347: Perform QR decomposition on X in the first matrix to obtain the following formula:
[0084] QRH W =H
[0085] RH W =Q T H
[0086] H W =R -1 Q T H
[0087] Step 348, the result of least squares curve fitting is:
[0088]
[0089] Step 4: According to the fitted delay filter coefficient H W (:,:) construct a Farrow filter, the Farrow filter meets the time delay filtering requirements, obtains a digital delay result after receiving an input signal, and implements a time delay filtering method. In the present invention, the Farrow filter is completed using FPGA to reduce resources.
[0090] According to the fitted delay filter coefficient H W (:,:) Constructing a Farrow filter includes the following steps:
[0091] Step 41: The fitted delay filter coefficient H W (:,:) is regarded as the weighted sum of the fractional delay u on the D sub-filters. Therefore, the Farrow filter is split into D groups of Ns-order FIR sub-filters and 2D fractional delay multipliers. The number of sub-filters D is also the order of the least squares polynomial.
[0092] Step 42: The input signals are piped into D groups of FIR sub-filters, and each group of FIR sub-filters completes its own filtering process. The input signals are piped into Ns order filters, and multiplication and addition operations are performed with the fitted delay filter coefficients. According to the symmetric structure of the coefficients, the multiplication results are delayed to reduce the multiplication operations.
[0093] Step 43, the two groups of actual delay amounts u and l-u are divided into two paths to complete the multiplication and addition operations of each sub-filter group, and the two-path results are added to obtain the final digital delay result.
[0094] As attached Figure 2 and attached Figure 3 As shown, attached Figure 2 In the figure, the input signal flows into D groups of FIR sub-filters, and each group of FIR sub-filters completes its own filtering process; in the figure, X(n) represents the input signal, C represents each filter group, that is, FIR sub-filter, u and 1-u represent fractional delays, and y(n) represents the output result. Figure 3 In the figure, the input signal flows into the Ns order FIR sub-filters respectively, and is multiplied and added with the fitted delay filter coefficients, and the multiplication results are delayed to reduce the multiplication operations. In the figure, x(n) represents the input signal, hw represents the fitted delay filter coefficients; f_u represents the first output result of the FIR sub-filter, which is subsequently multiplied with u; f_v represents the second output result of the FIR sub-filter, which is subsequently multiplied with (1-u).
[0095] The present invention utilizes the least square method to perform piecewise curve fitting, optimizes the time delay filter coefficient based on the Farrow filter, makes it more compatible with the actual time delay filtering requirements, and realizes the optimal design of the time delay filter coefficient.
[0096] This embodiment also discloses a FPGA-based delay filter, including a processor, the processor is used to receive a delay filtering requirement and implement the above-mentioned least squares-based delay filtering method to obtain a digital delay result after receiving an input signal.
[0097] The present invention can effectively reduce the hardware cost and computational complexity of implementing the fractional delay filter, and can be applied in the field of laser vibrometer, meeting the engineering requirements in the field of laser vibrometer, achieving a compromise between resource utilization and index requirements, and has certain reference significance for engineering practice.
[0098] The present invention can be applied in the field of laser vibration measurement, but it is not the only application field and is not limited here.
[0099] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
[0100] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A time delay filtering method based on the least squares method, characterized in that the method include: Obtain the technical indicators required for the delay filter according to the delay filtering requirements; Determine the order of the time delay filter according to the technical indicators, and then obtain the initialized time delay filter coefficients in combination with the selected window function; The initialized delay filter coefficients are segmented to obtain segmented delay filter coefficients, and the segmented delay filter coefficients are fitted using a least square method to obtain fitted delay filter coefficients; A Farrow filter is constructed according to the fitted delay filter coefficients. The Farrow filter meets the delay filtering requirements, and a digital delay result is obtained after receiving an input signal, thereby realizing a delay filtering method.
2. The time-delay filtering method based on the least squares method according to claim 1, characterized in that: The technical indicators include passband frequency, cutoff frequency, amplitude-frequency response, cutoff frequency f c It does not exceed half of the normalized sampling frequency and is in the range of (0,0.5].
3. The time-delay filtering method based on the least squares method according to claim 1, characterized in that: Determining the order of the time delay filter according to the technical indicators includes: obtaining an ideal amplitude-frequency characteristic curve according to the technical indicators, and then obtaining the order M of the time delay filter; the order M of the time delay filter is an even number.
4. The time-delay filtering method based on the least square method according to claim 1, characterized in that: The initial delay filter coefficients are obtained by combining the selected window function, including: The selected window function is the Blackman window function. According to the cutoff frequency f in the technical indicators c The delay filter coefficients are initialized by combining the Blackman window function with the order M of the delay filter. The structure of the delay filter coefficients is about the center symmetry; The calculation formula for the initialized delay filter coefficient is: Among them, h i is the i-th initialized delay filter coefficient, i is the delay filter coefficient index, K is a constant, and satisfies 5. The time-delay filtering method based on the least square method according to claim 1, characterized in that: The calculation process of the fitted delay filter coefficient includes: According to the symmetry of the initialized delay filter coefficients, the number of points required for fitting is determined as That is, the initial delay filter coefficient that needs to be fitted is h i , The delay filter coefficients to be fitted are divided into Ns segments, where the value of Ns is a multiple of 2; the number of delay filter coefficients to be fitted in each segment is Nup, and satisfies: Nup is an integer; The delay filter coefficient h that needs to be fitted for the nth segment n , where 1≤n≤Ns, and the polynomial fitting h is based on the least squares method n The continuous impulse response function h W ; According to the fitting polynomial of each segment, the sum of squares of deviations of each delay filter coefficient to the fitting curve is calculated, and the solution is simplified according to the least square method to obtain the fitting result, that is, the fitted delay filter coefficient.
6. The time-delay filtering method based on the least square method according to claim 5, characterized in that: The delay filter coefficient h that needs to be fitted in the nth segment n The calculation formula is: Where D is the order of the least squares polynomial; x is the delay, is the impulse response function corresponding to the Dth order.
7. The time-delay filtering method based on the least square method according to claim 5, characterized in that: The fitted delay filter coefficient H W The calculation formula of (:,:) is: Among them, H W (:,:) is the delay filter coefficient after fitting, 0≤d≤D, 1≤ns≤Ns, is the delay filter coefficient of the d-th order and ns-th segment, and D is the order of the least squares polynomial.
8. The time-delay filtering method based on the least square method according to claim 1, characterized in that: According to the fitted delay filter coefficient H W (:,:) Constructing a Farrow filter includes the following steps: The fitted delay filter coefficient H W (:,:) is regarded as the weighted and weighted sum of the fractional delay u on the D sub-filters, and the Farrow filter is split into D groups of Ns-order FIR sub-filters and 2D fractional delay multipliers; where D is the order of the least squares polynomial, and Ns is the number of segments divided by the fitted delay filter coefficients; The input signal flows into D groups of FIR sub-filters respectively, and each group of FIR sub-filters completes its own filtering process; The two groups of actual delay amounts u and 1-u are divided into two paths to complete the multiplication and addition operations of each sub-filter group, and the two-path results are added to obtain the final digital delay result.
9. A time delay filter based on FPGA, characterized in that: It includes a processor, which is used to receive a delay filtering requirement and implement a delay filtering method based on the least squares method as described in any one of claims 1-8, and obtain a digital delay result after receiving an input signal.
Citation Information
Patent Citations
Methods or structures for reconstruction of substantially uniform samples from substantially nonuniform samples
CN102414988A
Segmented-Hermite-interpolation-based measurement-and-control communication signal simulation method and device
CN106941381A
Coefficient fitting method of FARROW filter
CN110708039A
Self-adaptive resampling method based on window function design
CN111327297A
Time delay estimation method based on cross-spectrum phase fitting
CN111856401A