数字滤波器设计是一个非常大且成熟的主题,并且-正如您在问题中提到的那样-有很多可用的材料。我想在这里尝试的是让您入门,并使现有材料更易于访问。实际上,我应该讨论离散时间滤波器,而不是数字滤波器,因为在这里我不会考虑系数和信号量化。您已经了解FIR和IIR滤波器,并且还了解了一些滤波器结构,例如DF I和II。不过,让我从一些基础知识开始:
非递归线性时不变(LTI)滤波器可以通过以下差分方程来描述
y(n)=h0x(n)+h1x(n−1)+…+hN−1x(n−N+1)=∑k=0N−1hkx(n−k)(1)
y(n)x(n)nhkNhkx(n)=δ(n)y(n)=hnhk。FIR滤波器的一个重要优点是它们始终稳定,即对于有界输入序列,输出序列总是有界的。另一个优点是FIR滤波器始终可以实现完全线性的相位,即,除了纯延迟外,它们不会增加任何相位失真。此外,设计问题通常更容易解决,我们将在后面看到。
递归LTI滤波器由以下差分方程式描述:
ÿ(n )= b0x (n )+ b1个x (n − 1 )+ … + b中号x (n − M)-− a1个ÿ(n−1)−…−aNy(n−N)(2)
Equation (2) shows that the output is not only composed of weighted and delayed input samples, but also of weighted past output samples. In general, the impulse response of such a system is infinitely long, i.e. the corresponding system is an IIR system. However, there are special cases of recursive filters with a finite impulse response. Note that the impulse response is not anymore given by either the coefficients bk or ak as in the case of FIR filters. One advantage of IIR filters is that steep filters with high stopband attenuation can be realized with much fewer coefficients (and delays) than in the FIR case, i.e. they are computationally more efficient. However, one needs to be careful with the choice of the coefficients ak because IIR filter can be unstable, i.e. their output sequence can be unbounded, even with a bounded input sequence.
Filters can be designed according to specifications either in the time (sample) domain or in the frequency domain, or both. Since you've mentioned a cut-off frequency in your question, I assume you're more interested in specifications in the frequency domain. In this case you need to have a look at the frequency responses of FIR and IIR systems. The frequency response of a system is the Fourier transform of its impulse response, assuming that it exists (which is the case for stable systems). The frequency response of an FIR filter is
H(ejθ)=∑k=0N−1hke−jkθ(3)
where θ is the discrete-time frequency variable:
θ=2πffs
with the actual frequency f and the sampling frequency fs. From (3) you can see that approximating a desired frequency response by an FIR system is basically a problem of polynomial approximation. For recursive systems we have
H(ejθ)=∑Mk=0bke−jθ1+∑Nk=1ake−jθ(4)
and you get a rational approximation problem, which is usually much more difficult than the polynomial approximation problem in the case of FIR filters. From (3) and (4) you can see that the frequency response of an FIR filter is of course only a special case of the response of a recursive filter with coefficients ak=0, k=1,…,N.
Let's now take a quick look at filter design methods. For FIR filters you could take an inverse Fourier transform of the desired frequency response to get the impulse response of the filter, which directly corresponds to the filter coefficients. Since you approximate the desired response by a finite length impulse response you should apply a smooth window to the obtained impulse response to minimize oscillations in the actual frequency response due to Gibbs' phenomenon. This method is called frequency-sampling method.
For simple standard filters like ideal lowpass, highpass, bandpass or bandstop filters (and a few others), you could even analytically calculate the exact impulse response by taking the inverse Fourier transform of the ideal desired response:
hk=12π∫π−πH(ejθ)ejkθdθ
This integral is easy to evaluate for piecewise constant desired responses, as is the case for ideal frequency-selective filters. This will give you an infinitely long, non-causal impulse response, which needs to be windowed and shifted to make it finite and causal. This method is know as window-design.
There are of course many other FIR filter design methods. One important numerical method is the famous Parks-McClellan exchange algorithm which designs optimal filters with constant passband and stopband ripples. It is a numerical approximation method and there are many software implementations available, e.g. in Matlab and Octave.
The most common IIR design method for frequency selective filters is the bilinear transformation method. This method simply uses analytical formulas for the design of optimal analog filters (such as Butterworth, Chebyshev, Cauer/elliptic, and Bessel filters), and transforms them to the discrete-time domain by applying a bilinear transformation to the complex variable s (analog domain) which maps the (imaginary) frequency axis of the complex s-plane to the unit circle in the complex z-plane (discrete-time domain). Don't worry if you do not yet know much about complex transfer functions in the analog or discrete-time domain because there are good implementations available of the bilinear transform method, e.g. in Matlab or Octave.
There are of course many more interesting and useful methods, depending on the type of specifications you have, but I hope that this will get you started and will make any material you come across more understandable. A very good (and free) book covering some basic filter design methods (and a lot more) is Intoduction to Signal Processing by Orfanidis. You can find several design examples there. Another great classic book is Digital Filter Design by Parks and Burrus.