The algorithm proceeds by minimizing the maximum error in passband and

stopband of the transfer function.

Linearity of the phase is achieved by designing an impulse response,

which is either symmetric or antisymmetric.

We end up with four types of filters according to whether the impulse response

is even length or odd length and symmetric or antisymmetric.

Type I filters, probably the most common, have an odd length impulse response, and

they are symmetric around the center tap.

Type III filters have an odd number of taps, they're antisymmetric around

the center tap, which imposes, of course, the center type is zero.

Type II and Type IV filters are symmetric and antisymmetric filters,

respectively, both of which have an even number of taps.

That means that the center of symmetry of these filters fall in between samples.

And so they both introduce a non integer linear phase factor, of one half sample.

Let's look in more detail at the phase properties of a Type I FIR filter.

A Type I filter is an odd length symmetric FIR,

so it will look maybe like this.

Where the taps are symmetric around an index, capital C.

The symmetry relationship can be simplified if we shift the filter so

that the center tap falls in zero.

So we define an auxiliary filter, h1[n],

which is simply h[n + C] and this filter now,

will be centered in 0 and symmetric around 0.

We can express that by saying that h prime of n is equal to h prime of minus n.

The relationship between h prime and

h in the z domain is simply multiplication by z to the minus capital C.

If we will now compute the Z-transform of the H prime of n, we have the sum for

n that goes from minus capital M to M of each prime of n times z to the minus n.

Because of the symmetry, we can isolate the center tap, h prime of 0 and

then, write the rest of the summation by collecting equal terms.

And so we have the sum for n that goes from 1 to capital M of

h prime of n that multiplies z to the n plus z to the minus n.

If we now replace z with e to the j omega, we get the Fourier transform of H prime.

Which is simply h prime of 0 plus this sum for

n that goes from 1 to capital M of h prime of n,

then multiplies e to the j omega n plus e to the minus j omega n.

But we know that this is simply twice the cosine of omega n,

and so we obtain that the Fourier transform of h prime of n is purely real.

And this means that the Fourier transform of h prime of n is zero-phase.

We can get the Fourier transform of h of n as simply the zero

phase before you transform times a linear phase factor e to the minus j omega C.

So we have proven that type one filters doing it possessed linear phase.

A similar proof can be carried out for the other three types of linear phase FIRs.

Let us now look at the Parks-McClellan design algorithm

also known as the Minimax filter design algorithm.

The magnitude response of the filters designed by this algorithm is equally for

both in the passband and the stopband.