Iowa Hills Software Digital and Analog Filters
Adjustable Gauss Polynomial Algorithm Home Adjustable Gauss Filters Page
This page defines the algorithm for the Adjustable Gauss Polynomial. A new polynomial for transitional filter design.
The Gauss polynomial is defined as:
This algorithm modifies these coefficients by taking them to the power of gamma, -2 <= gamma <= 1 as shown here:
There are three interesting Gamma settings worth noting. Gamma = 0.7 gives a response very close to the Bessel and Gamma = -2.0 gives a response very close to the Butterworth. With Gamma = 0.0, G(s) reduces to the following, which places the poles on the unit circle.
This shows how the poles move across the s plane as gamma varies.
Gamma is limited to the range of 1.0 to -2.0. The limit is set at -2.0, which approaches the Butterworth response, because the factorial squared coefficients become quite large which causes problems calculating the roots. It also makes sense to simply use the Butterworth beyond that point. Gamma can be set greater than 1, but this creates a response even more relaxed than the Gauss, and it is hard to imagine a need for that.
This code snippet is used to calculate the polynomial coefficients in Iowa Hills software. Note that the software changes the sign and scale of Gamma from that entered by the user. See the note below for an explanation.
int j, N, RootsCount;
N = NumPoles;
if(Gamma > 0.0)Gamma *= 2.0;
GaussCoeff = 1.0;
GaussCoeff = 0.0;
for(j=2; j<=2*N; j+=2)
GaussCoeff[j] = pow(Factorial(j/2), Gamma);
GaussCoeff[j+1] = 0.0;
if( (j/2) % 2 == 1)GaussCoeff[j] *= -1.0;
From here, the GaussCoeff array is sent to a root solver. Upon return, we scale the imaginary part of the roots by a factor of 1.1 as shown below. It should be noted that the root solver also finds the roots in the right hand plane, which we eventually discard, so at this point in the code, we have twice as many roots as desired filter poles.
We scale the root's imaginary part to help flatten the pass band somewhat when Gamma = -2 (1.0 to the user). After frequency correction, this scaling has the affect of moving the poles toward the imaginary axis.
for(j=0; j<N*2; j++)Roots[j] = ComplexD( Roots[j].real(), Roots[j].imag() * 1.10 );
It should be noted here that there was little effort made to get this polynomial to replicate a Butterworth, Gauss, or Bessel, nor is it necessary. Its purpose is to provide a means to transition between these various responses in a smooth way. If a true Gaussian response is needed, then the Gauss polynomial should be used. Likewise for the Butterworth and Bessel.
Regarding Gamma in Iowa Hills software.
In Iowa Hills software, the user can vary Gamma from -1 to 1, but the actual Gamma used in the calculations is varying from 1 to -2. We changed the scale and the sign of Gamma in the user interface for the following reasons.
For the sake of simplicity, it seemed cleaner to keep Gamma between 1 and -1, hence the scaling. We changed the sign because it seemed better to use 1, rather than -1, for a flat pass band response.
The range of Gamma is scaled for simplicity, but it also helps linearize the user interface. The degree to which actual Gamma affects the roots for values < -1 diminishes greatly because of the factorial term, so as shown in the code snippet, we multiply the input Gamma by 2 if it is < 0.
Copyright 2013 Iowa Hills Software