FIR filters can be useful in making computer-aided design of the filters. Let us take an example and see how it works. Given below is a figure of desired filter.
While doing computer designing, we break the whole continuous graph figures into discrete values. Within certain limits, we break it into either 64, 256 or 512 andsoon number of parts having discrete magnitudes.
In the above example, we have taken limits between -π to +π. We have divided it into 256 parts. The points can be represented as H0, H1,….up to H256. Here, we apply IDFT algorithm and this will give us linear phase characteristics.
Sometimes, we may be interested in some particular order of filter. Let us say we want to realize the above given design through 9th order filter. So, we take filter values as h0, h1, h2….h9. Mathematically, it can be shown as below
H(ejω)=h0+h1e−jω+h2e−2jω+.....+h9e−9jωWhere there are large number of dislocations, we take maximum points.
For example, in the above figure, there is a sudden drop of slopping between the points B and C. So, we try to take more discrete values at this point, but there is a constant slope between point C and D. There we take less number of discrete values.
For designing the above filter, we go through minimization process as follows;
H(ejω1)=h0+h1e−jω1+h2e−2jω1+.....+h9e−9jω1
H(ejω2)=h0+h1e−jω2+h2e−2jω2+.....+h9e−9jω2
Similarly,
(ejω1000)=h0+h1eH−jω1000h2e−2jω1000+.....+h9+e−9jω1000
Representing the above equation in matrix form, we have −
[H(ejω1)..H(ejω1000)]=[e−jω1...e−j9ω1....e−jω1000...ej9ω1000][h0..h9]Let us take the 1000×1 matrix as B, 1000×9 matrix as A and 9×1 matrix as ˆh.
So, for solving the above matrix, we will write
ˆh=[ATA]−1ATB
=[A∗TA]−1A∗TB
where A* represents the complex conjugate of the matrix A.