You are on page 1of 5

1

Design a system shown FIR Bandstop filter with


cutoff frequency, fc1 = 14Hzand fc2 = 36Hz with
IIR Lowpass filter with cutoff frequency, fc3= 25Hz
using MATLAB Simulink software.

Abstract A fundamental aspect of signal processing is


filtering. Filtering involves the manipulation of the spectrum
of a signal by passing or blocking certain portions of the
spectrum, depending on the frequency of those portions [3]. In
this project, we proposed a system for filter design using
MATLAB software. Filter design included for Finite Impulse
Response (FIR) filter and Infinite Impulse Response (IIR)
filter. There were many advantages by using filter design in
digital signal processing. Therefore, in this project we had
designed two filters for FIR Bandstop filters and IIR Lowpass
filter regarding cutoff frequency given. For further analysis
and result of this filters, Matlab Simulink was used has a filter
algorithm because it simple and easy to analyze of the output
signal [4].

I.
a.

b.

Project Understanding

In this project, we need to design for two filter using


MATLAB Simulink software. First, FIR Bandstop filter with
cutoff frequency given fc1 = 14 Hz and fc2 = 36 Hz and
second was IIR Lowpass filter with cutoff frequency fc3 = 25
Hz. Then, we need to find what our design filter and the cutoff
frequency. FIR filter was much better compared to IIR filter
as there was no feedback and non-recursive such it will
produced stable filter. Unlike IIR it had feedback and
recursive, so we need to check after design process whether
the filter was stable or not. Besides, FIR had linear phased
compared to IIR Filter that made the system much more
stable. Therefore, IIR Filter not preferable to use in digital
signal processing. Figure 1 showed a block diagram of two
filters.

INTRODUCTION

Project Background

Nowadays, digital filters widely being used in almost all areas


of digital signal processing [1]. Besides that, there were two
types of filter design used in this subject. Firstly, it is Finite
Impulse Response (FIR) and secondly Infinite Impulse
Response (IIR). Infinite impulse response (IIR) is a property
of signal processing systems. Systems with this property are
known as IIR systems or, when dealing with filter systems, as
IIR filters. IIR systems have an impulse response function that
is non-zero over an infinite length of time. This is in contrast
to finite impulse response (FIR) filters, which have fixedduration impulse responses. The simplest analogue IIR filter is
an RC filter made up of a single resistor (R) feeding into a
node shared with a single capacitor (C). This filter has an
exponential impulse response characterized by an RC is time
constant. Because the exponential function is asymptotic to a
limit, and thus never settles at a fixed value, the response is
considered infinite [3]
Furthermore, many advantages of this two filter. For examples
high noise immunity, high accuracy, easy modification of filter
characteristic, freedom from component variations, low and
constantly decreasing cost [1]. Instead of analog filters, now
the digital filter rapidly used in many applications that can be
used effectively.

Figure 1 Block diagrams of FIR and IIR filters [2]

c.

Objectives

d.

To design FIR Bandstop filter and IIR


Lowpass filter
To analyze the output produce for the each
design filter
To analyze the output that we combine that
both filters together.

Scope of Project
In our project, it was design for two filters with cutoff
frequency given. For FIR Bandstop filter were given fc1 =
14 Hz and fc2 = 36 Hz. Then, for IIR Lowpass filter with
cutoff frequency fc3 = 25 Hz. Beside this filter, a discrete

2
input signal also created that will as input signal that will
be analyze. The input signal will be filtered for each filter
and also combine of both filters. That means, there are
two designs of digital filter of this project and will be
using Matlab Simulink as design algorithm of this digital
filter.
II.
a.

f.

Spectrum Analyzer Block- To analyze a signal in


frequency domain (FFT)

g.

Scope Block- To show the input and output signal in


time domain.

SOFTWARE DESIGN AND


DESCRIPTION

Software Design

This part is to describe the whole process involved in order


to design, and simulate of Finite Impulse Response and
Infinite Impulse Response (IIR) also frequency impulse
respond. It begins with early research and theoretical study
to determine the most suitable methods that can be used to
design FIR and IIR. The project design is done using
MATLAB (SIMULINK) software. Figure 2 show that basic
sequences of our project process, it starts with making
background research about the FIR and IIR and its
parameters. Then, look for the suitable software that will be
familiar with the filter design. In this design, we have been
used the MATLAB Simulink to create the block diagram.
From Figure 2 also we find a suitable block at MATLAB
Simulink to fulfill the requirements. There are several Block
in MATLAB Simulink that will be used in this project for
design digital filter such as:
a.

Sin Wave Block To generate a discrete Sin Wave

b.

Random Number Block-To create a random signal


form

c.

Summing Block- To combine or adding a two signal


together

Discrete
Random
Input
Signal

Digital
Filter

Filtered
Output
Signal

Figure 2 Basic Sequence of Project Process

b.

Software Structure.

After the selecting the suitable block in the MATLAB


Simulink, a design of the digital filter block diagram was
created in MATLAB Simulink. The Figure 3 and Figure 4
show the block diagram at MATLAB Simulink that was
created and all the parameter of the digital filter
requirement was inserted at the block.

Figure 3: First Design of Digital Filter that analyze of each Digital Filter
Output

d.

Gain Block To Increase the amplitude of the signal


input.

e.

Digital Filter Block (FDATool) To design a Digital


Filter based the specification that given.
Figure 4: Second Design of Combination of Digital Filter (FIR Bandstop
Filter+ IIR Lowpass Filter)

3
Figures 5 and Figures 6 was show the parameter of the
FIR Bandstop filter and IIR Lowpass filter inserted at
FDATool Block.

Figure 6(b): Time Domain and Frequency Domain for FIR Digital Filter using
Hamming Windows

Figure 5 IIR Lowpass Parameters was inserted at FDATool Block

Figure 7: Design IIR Lowpass filter and the cut off frequency fixed at -3dB.
Figure 5 FIR Bandstop Parameters was inserted at FDATool Block.

III.
a)

RESULT ANALYSIS

Software Analysis

In this chapter will explain how the design of the digital filter
that have created working at the all the input and the output
signal was analyze to make sure the specification of the digital
filter same as the given . For the input signal, we were used a
sin wave block and the random block to create a discrete input
signal. The summing block is used to sum the two signals
together and become as input signal. A Digital Filter was
filtered the input signal either used FIR Bandstop filter and
IIR Lowpass filter. The Figure 6 and Figure 7 was show the
design specification for FIR Bandstop filter and IIR Lowpass
filter and it will compare to the output result.

b) Final Output Analysis


In this part will show the result of the each filter and also the
combination of the two filters based on the two designs that
have discuss at previous chapter. The digital filters was
analyze based of their amplitude, magnitude and phase. We set
the fpass1(f1)=14Hz, fpass2(f2)=36Hz, fstop1(3)=24Hz, and
fstop2(4) =26Hz. Then, the normalize frequency can get when
divided with the sample rate that set has 100Hz.

The below show the step and calculation to find the impulse
response of FIR Bandstop digital filter:

Figure 6 (a): Design specification of FIR Bandstop filter and the cut off
frequency was fixed at -6dB using window Hamming

Fo =0.5 ( F 2+ F 3 )=0.25
F c=0.5 ( F 3 + F 4 )F o =0.06
F p =0.5 ( F p 1 + F p 2 )=0. 11
F s=0.5 ( F s 1+ F s2 ) =0. 01
FT =FpFs=0. 10
N=

C
FpFs

The range is between -16.5 n 16.5 because N=34

hN[n] = 0.12 sinc(0.12n)


WN[n] = 0.54 + 0.46 (0.0606n)
hw[n] = hN[n] x WN[n]

h BS [ n ]= [ n ] [ 2 cos ( 0.5 n ) ] h w [n]


Then , we change the system into causal signal start at 0.
Figure 10: The signal before and after filter using IIR Lowpass filter at time
domain (Scope Output)

From the result at Figure 9 (a), the signal after filtered is more
smoothly compare before filtered.
Finally for the second design of the digital filter, we had
combine the both filter and the output result was show analyze
and show at Figure 11.

Figure 8: Impulse response of Digital FIR Bandstop Filter using Hamming


Windows

The Figure 9(a) and Figure 9(b) show the magnitude and the
phase of design digital filter

Figure 11: Combination of FIR Bandstop filter and IIR Lowpass filter.

From the Figure 11, the output signal was really smoothly
signal and almost same as sinusoidal form. The signal was
better than the previous result that just used a separately
digital filter. The ripple almost of this signal almost gone and
show that the noise is less.
IV.
Figure 9 (a): The magnitude and the phase of the Digital IIR Low Pass Filter
using Butterworth

CONCLUSION

In conclusion, this project was can be say successfully


complete because of the objective of this project was
achieved. We also have created a Digital Filter using FDATool
based on the specification. A MATLAB Simulink was created
for analyze the input signal before and after the Digital Filter.
The design of the two Digital Filter that is FIR Bandstop filter
and also IIR Lowpass filter was successfully created at it also
follow the requirement given. As a result we can create a
smooth signal by used both Digital Filters. The filter we can
use it for other purpose such as to eliminate noise of some
sensor and other application.
REFERENCES

Figure 9(b): The magnitude and the phase of the Digital FIR Bandstop Filter
using Hamming Windows

[1] Chapter 6 Digital Filter, (pp). Sharifah Saon (2013)


[2] 3.1Introduction, Mikroelektronika,
http://www.rfwireless-world.com/Terminology/FIR-filter-vsIIR-filter.html.
[3] Ashok Ambardar (Second Edition),Analog and Digital
Signal Processing.

5
http://www.gobookee.net/analog-and-digital-signalprocessing-ashok-ambardar/
[4] Samir V. Ginde & Joseph A.N. Noronha, DESIGN OF IIR
FILTERS.
http://www.mikroe.com/chapters/view/73/chapter-3-iir-filter
[5] FIR Filter Design
http://www.mathworks.com/help/signal/ug/fir-filterdesign.html?requestedDomain=www.mathworks.com

[6] Lowpass IIR Filter Design in Simulink


http://www.mathworks.com/help/dsp/ug/lowpass-iir-filterdesign-in-simulink.html

You might also like