35
Fourier Transform
Due to their completely smooth curve, Butterworth filters are also referred to as
m aximally flat. The mathematical formulation of a Butterworth filter can be written
as follows:
B f
( ) b j
( )
f
n
+ b ( )
jf
n−1
+.+ b
H f
( ) =
=
1
2
n+1
A f
( ) a j
( )
f
n
n
(2
1
+ a ( )
jf
1
.31)
−
+.+ a a
2
n+1
where j is the imaginary number and the parameters a i and b i are the parameters
of the filter. The order n identifies both the shape and the complexity of the filter,
i.e., the larger n gets, the sharper filter is achieved; however, the sharper filter will
be more complex. The field of filter design by itself requires a separate textbook.
But describing the details of the filter design process may not provide a meaningful
insight to the reader who cares mainly about filter design applications. Here, instead
of describing the details of the long and tedious process of filter design, we will
simply investigate the filtering process using MATLAB.
In MATLAB, in order to design a Butterworth filter with the order of n, one can
use the following command:
[b,a] = butter (n,Wn,‘s’)
In this command, n is the order of the low-pass Butterworth filter, Wn is the cutoff
frequency of the filter, and s determines whether the filter is high pass or low pass.
The option “high” corresponds to high-pass filter and “low” gives a low-pass filter.
Example 2.7
In this example, we use MATLAB to design a low-pass Butterworth filter. We are
to design a low-pass Butterworth filter of order 10 with the cutoff frequency of
300 Hz. For these specifications, we code the following line in MATLAB and it will
provide us the resulting polynomials: a and b.
[b,a] = butter (10,300/500,‘low’);
Next, in order to better visualize the designed filter, we use the command
“freqz” to draw the frequency response of the aforementioned low-pass
Butterworth filter, i.e.,
freqz(b,a,128,1000);
where 128 is the number of points in which the frequency response is evaluated
and 1000 is the sampling frequency. Figure 2.19 shows the frequency response of
this low-pass Butterworth filter.
Every concept on filtering of the 1-D signals can be extended to the 2-D case. Just
like 1-D signals, images often contain frequencies that need to be filtered out. Twodimensional low-pass filters, high-pass filters, and band-pass filters are designed to
process the images and extract the desired frequency information. Just as in 1-D
case, the ideal filters are not very practical, and, as a result, approximations such as
Butterworth filters are used for practical applications.
Fourier Transform
Due to their completely smooth curve, Butterworth filters are also referred to as
m aximally flat. The mathematical formulation of a Butterworth filter can be written
as follows:
B f
( ) b j
( )
f
n
+ b ( )
jf
n−1
+.+ b
H f
( ) =
=
1
2
n+1
A f
( ) a j
( )
f
n
n
(2
1
+ a ( )
jf
1
.31)
−
+.+ a a
2
n+1
where j is the imaginary number and the parameters a i and b i are the parameters
of the filter. The order n identifies both the shape and the complexity of the filter,
i.e., the larger n gets, the sharper filter is achieved; however, the sharper filter will
be more complex. The field of filter design by itself requires a separate textbook.
But describing the details of the filter design process may not provide a meaningful
insight to the reader who cares mainly about filter design applications. Here, instead
of describing the details of the long and tedious process of filter design, we will
simply investigate the filtering process using MATLAB.
In MATLAB, in order to design a Butterworth filter with the order of n, one can
use the following command:
[b,a] = butter (n,Wn,‘s’)
In this command, n is the order of the low-pass Butterworth filter, Wn is the cutoff
frequency of the filter, and s determines whether the filter is high pass or low pass.
The option “high” corresponds to high-pass filter and “low” gives a low-pass filter.
Example 2.7
In this example, we use MATLAB to design a low-pass Butterworth filter. We are
to design a low-pass Butterworth filter of order 10 with the cutoff frequency of
300 Hz. For these specifications, we code the following line in MATLAB and it will
provide us the resulting polynomials: a and b.
[b,a] = butter (10,300/500,‘low’);
Next, in order to better visualize the designed filter, we use the command
“freqz” to draw the frequency response of the aforementioned low-pass
Butterworth filter, i.e.,
freqz(b,a,128,1000);
where 128 is the number of points in which the frequency response is evaluated
and 1000 is the sampling frequency. Figure 2.19 shows the frequency response of
this low-pass Butterworth filter.
Every concept on filtering of the 1-D signals can be extended to the 2-D case. Just
like 1-D signals, images often contain frequencies that need to be filtered out. Twodimensional low-pass filters, high-pass filters, and band-pass filters are designed to
process the images and extract the desired frequency information. Just as in 1-D
case, the ideal filters are not very practical, and, as a result, approximations such as
Butterworth filters are used for practical applications.
