Signal Processing Toolbox    

Design a FIR Gaussian digital filter



Gaussian filters are important in many signal processing, image processing, and communication applications. These filters are characterized by narrow bandwidths, sharp cutoffs, and low overshoots. A key feature of Gaussian filters is that the Fourier transform of a Gaussian is also a Gaussian, so the filter has the same response shape in both the time and frequency domains.

b = firgauss(k,n) returns an FIR filter whose impulse response approximates an ideal zero-mean Gaussian. Filters with this type of impulse response act as lowpass filters. The implementation of this filter is a cascade of k boxcar (uniform-coefficient) filters of integer length n. Increasing the number of cascades, k, or the length of each boxcar, n, produces a closer approximation to an ideal Gaussian. The filter is returned in vector b.

A 1-D Gaussian or Normal density function is defined as

where , is the standard deviation, and µ is the mean.

A measure of how well a lowpass filter rejects frequencies outside its passband is the ratio of the highest sidelobe level (HSSL) to the DC response . For firgauss, the HSSL is approximately -13.3 dB * k, where k is the number of cascaded filters, so for a cascade of four boxcars, the HSSL is -53 dB.

[b,n] = firgauss(k,'minorder',v) returns a Gaussian filter with variance, v. The variance is the sum of the variances of the convolutions of the individual boxcar filters. The required 'minorder' flag causes firgauss to use the minimum length, n, to achieve the overall variance. When k >= 4, firgauss uses an optimization to determine the minimum length for each of the boxcar filters. This optimization produces an approximation to the ideal Gaussian impulse response that is minimal in the root mean square (rms) sense.


Example 1

Create an FIR Gaussian filter that is a cascade of 4 boxcar filters, each of length 32 and display the result in fvtool:

Example 2

Create another FIR Gaussian filter that is a cascade of eight filters, each of length 32 and view both this filter and the filter from Example 1 in fvtool and display the impulse responses:


The implementation of firgauss uses the Central Limit Theorem (CLT). This theorem states that under general conditions, if X is the sum of N independent random variables with mean µ and variance , increasing N causes the distribution of X to tend to a normal (Gaussian) with the same mean and variance. In terms of convolutions, the CLT states that the convolution of a large number of positive functions is apporximately a normal (Gaussian) function. firgauss convolves boxcar filters, which are positive functions with uniform coefficients.

See Also

dfilt, dfilt.cascade, gausswin, gauspuls, gmonopuls


[1] Wells, W.M., "Efficient Synthesis of Gaussian Filters by Cascaded Uniform Filters," IEEE Transactions on Pattern Analysis and Machine Intelligence, IEEE. Vol. PAMI-8, No. 2 (March 1986).

[2] Rau,R and J.H.McClellan, "Efficient Approximation of Gaussian Filters," Transactions on Signal Processing, Vol. 45, No. 2 (February 1997).

[3] Papoulis, A, Probability, Random Variables and Stochastic Processes, McGraw-Hill, 1991, pp. 214-215.

  fircls1 firls