Sie sind auf Seite 1von 4

Design and Realization of FIR Digital Filters

Based on MATLAB
Chonghua Li
College of Mechanical and Electrical Engineering
Guizhou Normal University
Guiyang ,China
1001lch@sina.com

Abstract—Digital filtering occupies an extremely important and the amount of calculation becomes very large. With the
position in the digital signal processing. This paper introduces development of the computer technology and large scale
the definition and basic principles of FIR digital filters, and the integrated circuit (LSI), digital filters have been realized with
design methods based on MATLAB. After the description of the MATLAB software. Not only make the design of digital filter
process of design and simulation of a FIR band-pass filter by by computer-aided become possible, but also make the design
means of window function method, the results prove that various reach optimization.
performance of the designed FIR filter reach the appointed
requirement, the designed method is simple, the design process is
handy and efficient. II. FIR DIGITAL FILTERS

Keywords- FIR digital filter; window function; MATLAB; A Design Principle of FIR Filter
design; Simulatio If the unit-sample response is finite sequence limited h (n),

I. INTRODUCTION n0˘n˘Ğwill be called IIR system, But if the unit-sample


response is infinite sequence limited h (n), n1İn˘n2 will be
Digital filter is the basis of digital signal processing, used to called FIR system.
signal filtration, detection and parametric estimation etc. With
the development of the technology of information, the According to the method of realization and structure, digital
technology of digital signal processing in the fields such as filter was divided into recursive type or non-recursive type.
communication, voice, image, automatic control, radar, The basic structure of FIR filters can be considered as a
military, aviation, spaceflight etc has been widely used. delay line of articulator, totting-up the output-weighting of
Because of digital signal of the communicated system often each articulator to obtain the output of filter. For impulse
mixed with all kinds of complicated composition, digital filters response h (n) of FIR filter is limited, the difference equation
perform a virtual role in signal processing and reduction. of an N order of the recursive digital filters (FIR filter) can be
This function of digital filters is to carry out operational expressed as:
handling for input the digital code of dispersed signal, in order N −1 N −1
to reach the purpose that changes signal frequency spectra.
Digital filters have multiple classifications. According to the
y (n) = ¦ h( k ) x( n − x ) = ¦ bk x( n − k )
k =0 K =0
frequency characteristics can be divided into: high-pass, low-
pass, band-pass, band-stop. According to the time domain of Where, x(n) is the input sampling sequence, H (n) is the
digital filter impulse response characteristics can be divided filter coefficients, K is the order of filters, Y(n) is filter output
into: finite impulse response-FIR, infinite impulse response- sequence.
IIR. Impulse response h(n) of FIR filter is finite sequence
limited, while impulse response h(n) of IIR filter is infinite Also express the connection of output sequence about Y (n)
subsequence.Compared with IIR filter, the realization of FIR and X(n), h(n) with convolution:
is non-recursive. It has good stability and high precision, easy Y(n) =x(n)* h(n )
to obtain the strict linear phase characteristic, and be designed
more band pass (or more band stop) filter. The latter two are The system function is:
difficult to realize for the IIR system. Therefore, it is used Y(n) = x(0)* h(n ) + x(1)* h(n-1 ) + x(2)* h(n-2) + …
widely at signal processing with high fidelity, such as digital
audio, image processing, data transmission and bio-medical + x(n)* h(0 )
fields. But the FIR system wants to obtain better attenuation Figure 1 is function diagram for of K order FIR digital
characteristics, the general requirement the order for H(z) is filters.
higher, in other words, M required greater. To meet the
demands, the process of traditional design becomes complex

The work was supported by the mutual fund project of Guizhou


(NO: J-LKS[2009]33)
_____________________________________
978-1-4244-6734-1/10/$26.00 ©2010 IEEE

101
1) Obtaining a unit impulse response hd(n) of the ideal
The coefficient of differential equation equals filter by the Inverse Fourier Transform.
successive value h(n) of unit-sample response, the system
function H(z) can be expressed as the following form:

2) Determining the window function W(n) and the window


length N by performance index.
3) Determine unit impulse response h(n) of the actual filter,
h(n) is vector b(n) of FIR filters which is designed.

h( x) = hd (n) ⋅ W (n)
4) Examining the performance of filter.

III. DESIGN OF FIR DIGITAL FILTERS BASED ON


MATLAB
Toolbox of MATLAB signal processing provides various
Figure 1. Function Diagram of K Order FIR Digital Filters. window functions, designing functions of filter and realizable
functions of filter. The method of Window function is the most
commonly used method which design FIR digital filter. It has
very important function in the design of FIR digital filters ,
H(z) is polynomial of , so it's poles only at the origin on properly choose window function, can improve the
Z-plane. performance of design of the digital filter, or under meeting
the require of design circumstances reducing the order of FIR
B The Basic Steps of Design of Digital Filter digital filters.
The designed traditionally process of digital filter can be
Commonly, there are the five types of used window
divided into three steps˖ functions in engineering that is boxcar, Hanning, Hamming,
1) According to the actual needs, determines performance Blackman, and Kaiser.
and requirements of the filter. Performance comparison of all sorts of window functions
2) Use a system function (namely transfer function), which can be seen in Table 1. During the design process of FIR
cause and effect is stable, to approach the performance filters, it can choose window function of suitable by the
requirements. This function can be divided into two categories: requirements.
namely IIR transfer function and FIR transfer function.
TABLE 1 PERFORMANCE COMPARISON OF ALL SORTS OF WINDOW
3) With a finite precision operation to achieve the transfer FUNCTIONS
function.
Window Attenuation of the Wide of Attenuation of
The substance of FIR filters designed is to determine functions first side lobe main lobe stop band
constants of the transfers sequence or impulse response which relative to major minimum /dB
lobe /dB
can meet requirements. Design methods are main window boxcar –13 4ʌ/N 21
function method, frequency sampling method and the Henning –31 8ʌ/N 44
Chebyshev approximation method, etc. Hamming –41 8ʌ/N 53
Blackman –57 12ʌ/N 74
At present, FIR filter design of formula designed not closed.
Kaiser Adjustable Adjustable Adjustable
Although formula can be given on the window function by the
window function, but the calculation of band-pass and band- 
stop attenuation no formula. FIR filter design only follows the
requirements on the calculation of the higher instrument, not A. Interface Design based on FDATool
computer programming in general difficult to achieve. FDATool (Filter Design & Analysis Tool) is a tool of filter
design and analysis that was used only by MATLAB Signal
C Window Function Design Method of FIR Processing Toolbox .Its operation was very simple and flexible.
Design method of Window function is to change infinite FDATool can design almost all the conventional filters. In
noncausality sequence into finite impulse response sequence by command window of MATLAB after inputting "FDATool ",
truncating and weighting. FDATool interface will pop up after beating "enter".
The basic principle of Window function design is to use FDATool interface has two large parts; the first half is
window function of certain width to intercept infinite impulse used to display various characteristics of filter. The latter half,
response sequence for obtaining finite impulse response there are options of Filter types and setting of parameter filter.
sequence ,main design steps is: When we elected the design of window function, in option 0f

102
"Window Specifications” can be definition and choice of saved for paper "kaiser1.fda" after the completion of the design.
Window functions. Filter characteristics and the filtering effect are shown in Figure
2.
Now we assumed that there is a group of signal of 15Hz
sinusoidal in signals .Now a band-pass digital filter is asked to During the design process, comparing the characteristics of
be designed , using it to track and analyze this signal, and amplitude frequency and phase frequency characteristics of
smoothing power frequency and other harmonic in order to filter and design require, we can adjust the parameters and filter
isolate the signal from the complex signal. types at any time in order to obtain the best effect.
Parameters requirements: filter order number N = 38, beta
= 3.4. Sampling frequency fs=100Hz,bandpass lower cut-off B. Simulation based on Simulink
frequency fc1=10 Hz, bandpass cap cut-off frequency fc2=20 In the Simulink environment, the filter paper "kaiser1.fda"
Hz, transition bandwidth 6Hz, Pass and stop band was imported into the module "Digital Filter Design ", when
fluctuations=0.01 ,design by Kaiser window. the signal "s (t) = sin (10ʌt) + sin (30ʌt) + sin (60ʌt) "was
inputted, simulation diagram and filtering effect as shown in
figure 3. As can be seen from Figure 3, 15Hz frequency sine
wave signal can pass the band-pass filter "filt1", but 5Hz or
30Hz frequency sine wave signal will be damped greatly. The
simulation results show that various performance index of the
design of FIR filters have reached specified requirements and
the process of design was simple and easy to do.

Figure 2. Filter characteristics and the effect of filtering

The first choose "Bandpass" in option of "Filter Type",


choose "FIR Window " in option of "Design Method" ˈ
choose " Kaiser " in option of "Window " ˈ set "Beta
"=3.4.Assign "Specify order"=38 in options of "Filter Order" ;
Sampling frequency Fs = 100Hz,Since use the method of
window function to design ,only provide band pass lower cut-
off frequency fc1=10Hz and band pass cap cut-off frequency
fc2=20Hz. After setting, click "Design Filter", will obtain the
FIR filter by design. Through the menu options "Analysis",
amplitude frequency response and phase frequency response,
zero-pole assignment, coefficient of filter and various
characteristics of filter can be showed up. The result will be

103
Figure 3. Simulink simulation diagram and filtering eff REFERENCE
˄1˅ Simulink simulation diagram [1] Zhengzhou Li., “ Processing and Application of MATLAB digital
signal ,”[M] Beijing China: Tsinghua university press. May 2008.
˄2˅ Discrete waveform before and after filtering [2] Ding Lei, Zhencun Pan, Wei Cong , “ Design and Simulation of the
Digital Filter Based on MATLAB Signal Processing Toolbox.” Relay,
vol.31(9) ,pp.49-51, 2003.
IV. 
CONCLUSION [3] Shuntian Lou, Bohan Li, “ Analysis and Design of System Based on the
FIR digital filter through the example of the design and MATLAB -Signal Processing .” [M] Xian China: Xidian University
Press, 1998.
analysis, in MATLAB environment, based on MATLAB [4] Haili Guo, Ziting Wang, “Design and Realization of FIR Digital Filters
Signal Processing Toolbox design of digital filters can be Based on Matlab/Simulink ,”The application of electrical,vol.27
convenient, fast and correctly designed to meet the strict linear (1) ,2008.
phase The FIR filter, saving a lot of programming time, [5] Changhong Dong etc, “ Processing and Application of MATLAB Signal,”
improving the efficiency of programming, and parameter Beijing China: Defense Industry Press, 2005.
[6] Ergong zheng Hanqiang Li, “ Design and Filter of FIR Filters Based on
changes is also very convenient. To signal transmission and the
the MATLAB, ” Computer and Information Technology, October ˈ
treatment has an extremely important role. Digital Filter
2005
designed using MATLAB in the digital communications [7] Dazhu Yang, “ Design and Simulation of FIR Filters in MATLAB
systems and signal processing of the computer field, have Environment, ” Electronic Technology Applicat .
broad application prospects.

104

Das könnte Ihnen auch gefallen