LMS-based arbitrary amplitude-frequency response FIR filter design method

文档序号:1864458 发布日期:2021-11-19 浏览:22次 中文

阅读说明:本技术 一种基于lms的任意幅频响应fir滤波器设计方法 (LMS-based arbitrary amplitude-frequency response FIR filter design method ) 是由 杨金金 邓耀辉 曹绍峰 郑立岗 周科吉 杨光红 于 2021-08-09 设计创作,主要内容包括:本发明提出一种基于LMS的任意幅频响应FIR滤波器的设计方法,其中FIR滤波器确定为线性相位的FIR滤波器,包括以下步骤:确定滤波器的系数长度为奇数或偶数,根据所述的系数长度选择不同的FIR滤波器幅频响应公式;依据确定的滤波器的系数长度确定LMS算法的迭代模型;将滤波器频带内的频点离散化,确定幅频曲线中频点和幅度对的序列;针对每个频点的输入值迭代一次,直至迭代函数收敛。本发明提供的设计方法实现简单、速度快,易于工程实现,可用于带通滤波器设计也可用于低通滤波器设计,具有线性相位,在不影响信号的相位信息的基础上补偿通道的不平坦度误差,以改善信号质量。(The invention provides a design method of an arbitrary amplitude-frequency response FIR filter based on LMS, wherein the FIR filter is determined as a linear phase FIR filter, comprising the following steps: determining the coefficient length of the filter to be an odd number or an even number, and selecting different FIR filter amplitude-frequency response formulas according to the coefficient length; determining an iterative model of the LMS algorithm according to the determined coefficient length of the filter; discretizing frequency points in a filter frequency band, and determining a sequence of frequency points and amplitude pairs in an amplitude-frequency curve; and iterating once for the input value of each frequency point until the iteration function is converged. The design method provided by the invention is simple to realize, high in speed and easy to realize in engineering, can be used for designing a band-pass filter and a low-pass filter, has linear phase, and compensates the unevenness error of a channel on the basis of not influencing the phase information of a signal so as to improve the signal quality.)

1. A design method of an arbitrary amplitude-frequency response FIR filter based on LMS, wherein the FIR filter is determined as a linear phase FIR filter, characterized in that the method comprises the following steps:

step 1, determining the coefficient length of a filter to be an odd number or an even number, and selecting different FIR filter amplitude-frequency response formulas according to the coefficient length; turning to the step 2;

step 2, determining an iterative model of the LMS algorithm according to the determined coefficient length of the filter; turning to step 3;

step 3, discretizing frequency points in a filter frequency band, and determining a sequence of frequency points and amplitude pairs in an amplitude-frequency curve;

(f0,A0),(f1,A1),(f2,A2),……,(fM-1,AM-1)

wherein f isiIs the frequency, AiIs the corresponding amplitude; turning to the step 4;

and 4, iterating once for the input value of each frequency point until the iteration function is converged.

2. The design method of claim 1, wherein when the coefficient length of the filter is odd, the FIR filter amplitude-frequency response formula:

wherein, |, means taking a complex modulus value, representing the power gain value of the current FIR filter to the frequency spectrum component at the frequency point ω; coefficient anAnd filter coefficient bnThe conversion relationship of (a) is as follows:

wherein: omega is a frequency point, and N is more than or equal to 1 and less than or equal to N.

3. The design method of claim 1, wherein when the filter coefficient length N is even, the FIR filter magnitude-frequency response formula:

coefficient anAnd filter coefficient bnThe relationship of (a) to (b) is as follows:

wherein: omega is a frequency point, and N is more than or equal to 1 and less than or equal to N.

4. A design method as claimed in any one of claims 2 or 3, wherein discretizing the bins within the filter band comprises: discretizing the frequency point omega to obtain:

ωk=2πfk,0≤k≤M-1,

wherein f iskAnd M is the frequency value normalized relative to the sampling rate, and the number of frequency points corresponding to the amplitude-frequency response curve to be fitted is M.

5. The design method of claim 4, wherein the input signals for each iteration are vectors:

and the weight vector is initialized to a 0-column vector, where T represents the transpose of the vector.

6. The design method of claim 5, wherein, at each iteration of the calculation, the weight vector w (i) is updated by:

W(k+1)=w(k)+μ·x(k)·е*(k)

desired signal d (i) estimate:

d(k+1)=wH(k+1)·x(k+1)

wherein H denotes the conjugate transpose of the vector, and the estimation error e (i):

e(k+1)=D(k+1)-d(k+1)

obtaining a weight coefficient a:

α=w*

wherein w*Is the updated weight coefficient, which refers to the complex conjugate.

Technical Field

The invention belongs to the technical field of filter design, and particularly relates to an arbitrary amplitude-frequency response FIR filter design method based on LMS.

Background

Amplitude flatness and phase linearity are important factors influencing the improvement of the performance of a receiver, for a receiving system, a spectrum analysis function is the most basic and widely applied function, and the amplitude flatness in a pass band influences the amplitude measurement precision. When the design of the receiving system is completed, under the condition of knowing the amplitude-frequency curve of the channel, how to design the compensation filter to control the flatness in the receiver channel band within the required tolerance range is a necessary and critical step.

The common FIR filter design method comprises a window function method, an optimal approximation method, an equal ripple approximation method and the like, and only requires the in-band amplitude flatness in the conventional design requirements. The amplitude-frequency characteristic of a hardware system is not flat, so the in-band amplitude of a filter to be designed is arbitrary. The algorithm of the current design method (such as an optimal approximation method and an equal ripple approximation method) is high in complexity and large in engineering application difficulty, and is not suitable for the current scene.

Adaptive filtering is an important content of modern signal processing, and how to adaptively update filter coefficients to filter out a desired signal is solved. The least mean square algorithm (LMS algorithm for short) is one of self-adaptive filtering methods, is based on wiener filtering, is developed by means of the steepest descent algorithm, and iteratively updates filter coefficients to enable the error between the output signal of the filter and the expected signal to be infinitely reduced. A block diagram of a conventional LMS adaptive filtering system implementation is shown in fig. 1.

Disclosure of Invention

In order to solve the above technical problem, the present invention provides a method for designing an arbitrary amplitude-frequency response FIR filter based on LMS, wherein the FIR filter is determined as a linear phase FIR filter, comprising the following steps:

step 1, determining the coefficient length of a filter to be an odd number or an even number, and selecting different FIR filter amplitude-frequency response formulas according to the coefficient length; turning to the step 2;

step 2, determining an iterative model of the LMS algorithm according to the determined coefficient length of the filter; turning to step 3;

step 3, discretizing frequency points in a filter frequency band, and determining a sequence of frequency points and amplitude pairs in an amplitude-frequency curve;

(f0,A0),(f1,A1),(f2,A2),……,(fM-1,AM-1)

wherein f isiIs the frequency, AiIs the corresponding amplitude; turning to the step 4;

and 4, iterating once for the input value of each frequency point until the iteration function is converged.

Preferably, when the coefficient length of the filter is odd, the FIR filter amplitude-frequency response formula:

wherein, |, means taking a complex modulus value, and representing the power gain value of the current FIR filter to the frequency spectrum component at the frequency point ω. Coefficient anAnd filter coefficient bnThe conversion relationship of (a) is as follows:

wherein: omega is a frequency point, and N is more than or equal to 1 and less than or equal to N.

Preferably, when the filter coefficient length N is an even number, the FIR filter amplitude-frequency response formula:

coefficient alphanAnd filter coefficient bnThe relationship of (a) to (b) is as follows:

wherein: omega is a frequency point, and N is more than or equal to 1 and less than or equal to N.

Preferably, the discretization of the frequency points in the filter frequency band includes: discretizing the frequency point omega to obtain:

ωk=2πfk,0≤k≤M-1,

wherein f iskAnd M is the frequency value normalized relative to the sampling rate, and the number of frequency points corresponding to the amplitude-frequency response curve to be fitted is M.

Further, the input signal for each iteration is a vector:

and the weight vector is initialized to a 0-column vector, where T represents the transpose of the vector.

Further, at each iteration of the calculation, the weight vector w (i) is updated:

W(k+1)=w(k)+μ·x(k)·е*(k)

wherein*Conjugate of finger complex number

Desired signal d (i) estimate:

d(k+1)=wH(k+1)·x(k+1)

where H refers to the conjugate transpose of the vector. Estimation error e (i):

e(k+1)=D(k+1)-d(k+1)

obtaining a weight coefficient α:

α=w*

wherein w*Is the updated weight coefficient of the weight of the image,*conjugation of a plurality of fingers; d (i) denotes A0…AM-1The constructed vector.

The design method provided by the invention is simple to realize, high in speed and easy to realize in engineering, can be used for designing a band-pass filter and a low-pass filter, has linear phase, and compensates the unevenness error of a channel on the basis of not influencing the phase information of a signal so as to improve the signal quality.

Drawings

FIG. 1 is a block diagram of LMS lateral adaptive filtering;

FIG. 2 is an iteration error curve;

FIG. 3a filter amplitude frequency response;

fig. 3b compensates for the front and back amplitude-frequency curves.

Detailed Description

The conventional LMS algorithm is used for carrying out self-adaptive filtering on signals, the design of any amplitude-frequency response filter is combined with the LMS algorithm, and stable filter coefficients are iterated by utilizing the LMS self-adaptive theory.

Unlike the conventional LMS algorithm flow, the input signal is not some stable random signal, but is a frequency factor in the filter transfer function, and the desired signal is the required filter amplitude-frequency response. Because the frequency factor is limited, namely the input length of the algorithm is limited, the invention finally obtains stable filter coefficients by adopting a loop iteration method, so that the amplitude-frequency response of the filter coefficients is infinitely close to the expected amplitude-frequency response.

The design method provided by the invention is simple to realize, high in speed and easy to realize in engineering, can be used for designing a band-pass filter and a low-pass filter, has linear phase, and compensates the unevenness error of a channel on the basis of not influencing the phase information of a signal so as to improve the signal quality.

The following detailed description of embodiments of the invention refers to the accompanying drawings.

A. Channel model

For a receiving system, which may be considered a Linear Time Invariant (LTI) system, the response of the system to an arbitrary input signal may be expressed in the form of a unit impulse response. Linear time-invariant systems can be divided into two types: systems with finite long impulse responses (FIR) and systems with infinite long impulse responses (IIR).

The receiver is regarded as an FIR system, the amplitude-frequency response of the filter to be compensated is obtained according to the measured amplitude-frequency response of the system, the FIR filter is designed, and the coefficient of the FIR filter is obtained.

The system function of a FIR filter of length N is:

wherein, bnAre the filter coefficients to be calculated.

Since the invention only designs the filter according to the amplitude-frequency response and does not relate to the phase-frequency response, the FIR filter to be designed is set as a linear-phase FIR filter. At this time, the FIR filter compensates the amplitude-frequency response of the system channel, and the phase information is not changed, but only the same delay is carried out on the in-band signal.

Since the impulse response of the linear phase FIR filter is symmetrical or anti-symmetrical, the invention is called an example by the filter coefficient pair, and can be obtained by the same way under the anti-symmetrical condition.

(1) The filter coefficient length N is odd

FIR filter amplitude-frequency response formula:

coefficient anAnd filter coefficient bnThe relationship of (a) to (b) is as follows:

(2) filter coefficient length N is even

FIR filter amplitude-frequency response formula:

coefficient anAnd filter coefficient bnThe relationship of (a) to (b) is as follows:

B. principle of algorithm

According to the formula of the linear phase FIR filter in A, the amplitude-frequency response of the filter is obtained as a sine function and is obtained by weighting and accumulating coefficients, so that under the requirement of the amplitude-frequency response of the current filter, the algorithm needs to obtain a coefficient anAnd further obtaining the filter coefficient b according to a conversion formulan

And (5) deriving an iterative model under the LMS algorithm by taking N as an odd number as an example.

Discretizing the frequency point omega of the formula to obtain:

ωk=2πfk,0≤k≤M-1,

wherein f iskAnd M is the frequency value normalized relative to the sampling rate, and the number of frequency points corresponding to the amplitude-frequency response curve to be fitted is M.

Since the amplitude-frequency response of the linear phase FIR filter is symmetrical relative to zero frequency, the amplitude-frequency curve to be fitted can be inIn the meantime. Assume that the sequence of frequency points/amplitude pairs of the amplitude-frequency curve is as follows:

(f0,A0),(f1,A1),(f2,A2),……,(fM-1,AM-1)

FIR filter LMS iterative model:

(1) an iteration mode: and iterating once for the input value of each frequency point until convergence.

(2) The input signals for each iteration are:

(3) the weight vector is initialized to a 0-column vector.

And (3) an iterative process:

and (3) updating the weight vector:

W(k+1)=w(k)+μ·x(k)·е*(k)

desired signal estimation:

d(k+1)=wH(k+1)·x(k+1)

estimation error e (i):

e(k+1)=D(k+1)-d(k+1)

obtaining a weight coefficient α:

α=w*

C. simulation (Emulation)

The iterative error curve of the algorithm is shown in fig. 2 under 40 loop iterations with a 128-order FIR filter, a sampling rate of 100MHz, a bandwidth of 20MHz, and a center frequency of 25 MHz.

From fig. 3(a), it can be seen that the designed amplitude-frequency response of the filter is basically close to the required amplitude-frequency curve, and after calculation and compensation, the amplitude-frequency curve fluctuation obtained by statistics from fig. 3(b) is reduced from 2.9dB to 0.124dB, thereby greatly improving the flatness in the system band.

Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention and not for limiting, and although the embodiments of the present invention are described in detail with reference to the above preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the embodiments of the present invention without departing from the spirit and scope of the technical solutions of the embodiments of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种抵消直流偏置的自适应滤波算法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!