<< Chapter < Page | Chapter >> Page > |
If the desired interpolation points are not uniformly spaced between $0$ and $\pi $ then we can not use the DFT. We must take a different approach. Recall that for a Type I FIRfilter, $$A()=h(M)+2\sum_{n=0}^{M-1} h(n)\cos ((M-n))$$ For convenience, it is common to write this as $$A()=\sum_{n=0}^{M} a(n)\cos (n)$$ where $h(M)=a(0)$ and $\forall n, 1\le n\le N-1\colon h(n)=\frac{a(M-n)}{2}$ . Note that there are $M+1$ parameters. Suppose it is desired that $A()$ interpolates a set of specified values: $$\forall k, 0\le k\le M\colon A({}_{k})={A}_{k}$$ To obtain a Type I FIR filter satisfying these interpolation equations, one can set up a linear system of equations. $$\forall k, 0\le k\le M\colon \sum_{n=0}^{M} a(n)\cos (n{}_{k})={A}_{k}$$ In matrix form, we have $$\begin{pmatrix}1 & \cos {}_{0} & \cos (2{}_{0}) & & \cos (M{}_{0})\\ 1 & \cos {}_{1} & \cos (2{}_{1}) & & \cos (M{}_{1})\\ \\ 1 & \cos {}_{M} & \cos (2{}_{M}) & & \cos (M{}_{M})\\ \end{pmatrix}\left(\begin{array}{c}a(0)\\ a(1)\\ \\ a(M)\end{array}\right)=\left(\begin{array}{c}A(0)\\ A(1)\\ \\ A(M)\end{array}\right)$$ Once $a(n)$ is found, the filter $h(n)$ is formed as $$\{h(n)\}=1/2\{a(M), a(M-1), , a(1), 2a(0), a(1), , a(M-1), a(M)\}$$
In the following example, we design a length 19 Type I FIR. Then $M=9$ and we have 10 parameters. We can therefore have 10 interpolation equations. We choose:
C = cos(wk*[0:M]);
where
wk
is a column vector containing
the frequency points. To solve the linear system ofequations, we can use the Matlab backslash command.
N = 19;
M = (N-1)/2;wk = [0 .1 .2 .3 .5 .6 .7 .8 .9 1]'*pi;Ak = [1 1 1 1 0 0 0 0 0 0]';C = cos(wk*[0:M]);a = C/Ak;
h = (1/2)*[a([M:-1:1]+1); 2*a([0]+1); a(1:M]+1)];[A,w] = firamp(h,1);plot(w/pi,A,wk/pi,Ak,'o')
title('A(\omega)')xlabel('\omega/\pi')
The general interpolation problem is much more flexible than the uniform interpolation problem that the DFT solves. Forexample, by leaving a gap between the pass-band and stop-band as in this example, the ripple near the band edge is reduced(but the transition between the pass- and stop-bands is not as sharp). The general interpolation problem also arises as asubproblem in the design of optimal minimax (or Chebyshev) FIR filters.
FIR digital filters have several desirable properties.
Notification Switch
Would you like to follow the 'Intro to digital signal processing' conversation and receive update notifications?