Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

FILTER DESIGN TO REMOVE NOISE

BSEE
FILTER DESIGN TO REMOVE NOISE

by

Farakh Ali
BEE173096

Syed Haseeb-ul-Hassan
BEE173082

A Project Report submitted to the


DEPARTMENT OF ELECTRICAL ENGINEERING
in partial fulfillment of the requirements for the degree of
BACHELORS OF SCIENCE IN ELECTRICAL ENGINEERING

Faculty of Engineering
Capital University of Science & Technology,
Islamabad
June, 2019
FILTER DESIGN TO REMOVE NOISE

by

Farakh Ali
BEE173096

Syed Haseeb-ul-Hassan
BEE173082

A Project Report submitted to the


DEPARTMENT OF ELECTRICAL ENGINEERING
in partial fulfillment of the requirements for the degree of
BACHELORS OF SCIENCE IN ELECTRICAL ENGINEERING

Faculty of Engineering
Capital University of Science & Technology,
Islamabad
June, 2019
Copyright © 2019 by CUST Student

All rights reserved. Reproduction in whole or in part in any form requires the prior
written permission of Farakh Ali or designated representative.

ii
The project is dedicated to ALLAH Almighty and my parents for giving
me the grace to successfully complete this project and the sense of
reasoning and strength to accomplish this project. I also wish to further
dedicate it to our respected lab engineers, lab assistant, friends and all
those who helped us during this entire project and with their support we
completed our project successfully.

iii
DECLARATION
It is declared that this is an original piece of my own work, except where
otherwise acknowledged in text and references. This work has not been submitted in
any form for another degree or diploma at any university or other institution for
tertiary education and shall not be submitted by me in future for obtaining any degree
from this or any other University or Institution.

Farakh Ali
BEE173096

Syed Haseeb-ul-Hassan
BEE173082

June, 2019

iv
CERTIFICATE OF APPROVAL

It is certified that the project titled “Filter Design to Remove Noise” carried out by
Farakh Ali, Reg. No,EE173096, Syed Haseeb ul Hassan, Reg. No.EE173082, under
the supervision of Nadir Mehmood, Capital University of Science & Technology,
Islamabad, is fully adequate, in scope and in quality, as a final 4th Semester project
for the degree of BS of Electrical Engineering.

Supervisor: -------------------------
Mr. Nadir Mehmood
Lab Engineer
Department of Electrical Engineering
Faculty of Engineering
Capital University of Science & Technology, Islamabad

HOD: ----------------------------
Dr. Noor Mohammad Khan
Professor
Department of Electrical Engineering
Faculty of Engineering
Capital University of Science & Technology, Islamabad

v
ACKNOWLEDGMENT

We wish to express our profound and deep sense of gratitude to Mr. Nadir Mehmood,
Project Supervisor, and Department of Electrical Engineering for sparing his valuable
time to extend help in every step of our project work. We whole heartedly express our
thanks to our Lab assistant for sparing time to go through every tiny detail and give
his valuable suggestions to make this project and report a success. Last but not the
least we would like to thank our friends for their help in every way for the success of
this project report.

vi
ABSTRACT

The filter function filters a data sequence using a digital filter which works for
both real and complex inputs. There was a lot of signal which are not clear and it is
hard to understand the message given in the voice signal this all because of the noise
in the signal due to which it is hard to understand and in order to understand the
message in the voice signal we need to design the filter to remove noise from the
signal and this filter designing done in matlab and it has a lot application in real life
problems and technique. This project is specially the designing of filter to add,
remove, and plotting of the voice signal in matlab.

vii
TABLE OF CONTENTS

DECLARATION ................................................................................. iv
CERTIFICATE OF APPROVAL ........................................................ v
ACKNOWLEDGMENT ..................................................................... vi
ABSTRACT ....................................................................................... vii
LIST OF FIGURES .............................................................................. x
LIST OF ACRONYMS/ABBREVIATIONS...................................... xi
Chapter 1 ............................................................................................... 1
INTRODUCTION ................................................................................ 1
1.1 Overview ...................................................................................................... 1
1.2 Project Idea .................................................................................................. 2
1.3 Purpose of the Project .................................................................................. 2
1.4 Applications of the Project........................................................................... 2
1.5 Project Plan .................................................................................................. 3
1.6 Report Organization ..................................................................................... 4
Chapter 2 ............................................................................................... 5
LITERATURE REVIEW ..................................................................... 5
2.1 Background Theory ..................................................................................... 5
2.2 Related Technologies ................................................................................... 5
2.2.1 Related Technology 1 ................................................................... 5
2.3 Related Projects ........................................................................................... 6
2.4 Limitations ................................................................................................... 6
2.5 Problem Statement ....................................................................................... 6
2.6 Summary ...................................................................................................... 6
Chapter 3 ............................................................................................... 7
PROJECT DESIGN AND IMPLEMENTATION ............................... 7
3.1 Proposed Design Methodology .................................................................... 7
3.2 Analysis Procedure ...................................................................................... 7
3.3 Implementation Procedure ........................................................................... 7
3.4 Details about Software/Algorithm ............................................................... 9
3.5 Details of Simulations .................................................................................. 9
3.6 Details of Final Working Prototype ........................................................... 10

viii
3.7 Summary .................................................................................................... 10
Chapter 4 ............................................................................................. 11
TOOLS AND TECHNIQUES............................................................ 11
4.1 Hardware Tools used ................................................................................. 11
4.2 Software(s), simulation tool(s) used .......................................................... 11
4.3 Summary .................................................................................................... 12
Chapter 5 ............................................................................................. 13
PROJECT RESULTS AND EVALUATION .................................... 13
5.1 Presentation of the findings ....................................................................... 13
5.1.1 Hardware Results ........................................................................ 13
5.1.2 Software Results ......................................................................... 13
5.2 certification of design functionalities......................................................... 15
5.3 Discussion on the findings ......................................................................... 15
5.4 Summary .................................................................................................... 15
Chapter 6 ............................................................................................. 16
CONCLUSION AND FUTURE WORK ........................................... 16
REFERENCES ................................................................................... 17

ix
LIST OF FIGURES
Figure 1 Clear and Noisy signal .................................................................................... 5
Figure 2 Main GUI Simulation ...................................................................................... 9
Figure 3 1st GUI .......................................................................................................... 14
Figure 4 3rd GUI ......................................................................................................... 14
Figure 5 2nd GUI......................................................................................................... 14

x
LIST OF ACRONYMS/ABBREVIATIONS

GUI Graphic User Interface

DSP Digital Signal Processing

xi
Chapter 1

INTRODUCTION

Sign Processing is such an expansive field, that it as a rule covers hardware. It very
well may be ordered in two primary classes, simple sign preparing and advanced sign
handling. The simple sign preparing is a trailblazer among these two sorts. Despite the
fact that there are a few disadvantages of the previous, still it appreciates the way that
all genuine sign are simple in nature, in this way there is no compelling reason to
change over sign from simple area to advanced space and bad habit a-versa. In any
case, in advanced sign handling, we need ADC and DAC as extra segments. ADC is
utilized to change over true simple sign into advanced with the goal that it tends to be
connected as contribution to DSP processor; and DAC is utilized to change over
prepared computerized sign to simple structure so as to present to genuine world.
Consequently in computerized sign handling, the info sign to DSP processor is one
succession of numbers, and it's yield is another arrangement of numbers. The DSP
processors process the information arrangement of numbers, without minding whether
the information is sound sign, video signal, a picture, interactive media or something
different. Along these lines advanced sign preparing is the numerical control of sign.
It can play out an assortment of activities on sign, for example, estimation, filtration,
enhancement, lessening, postponement, pressure, or sign age itself.

1.1 Overview
Any kind of simple sign, for example, discrete time, discrete recurrence, or other
discrete space sign can be helpfully spoken to as computerized flag as a grouping of
numbers to allow the advanced preparing. The computerized sign handling renders
computational intensity of microchips to flag preparing and hence exhibits numerous
points of interest over simple handling. Its applications are uncountable, and few of
them are blunder discovery and adjustment in information transmission, information
pressure, advanced sound impact age, sound video blending and so on. A low-pass
channel (lpf) is a channel that passes signal with a recurrence lower than a chose
cutoff recurrence and constricts signals with frequencies higher than the cutoff
recurrence. the accurate recurrence reaction of the channel relies upon the channel

1
structure. the channel is some of the time called a high-cut channel, or treble-cut
channel in sound applications. a low-pass channel is the supplement of a high-pass
channel. A band pass channel is an electronic gadget or circuit that enables flag
between two explicit frequencies to pass, however that victimizes signals at different
frequencies. Some band pass channels require an outer wellspring of intensity and
utilize dynamic segments, for example, transistors and coordinated circuits; these are
known as dynamic band pass channels.

1.2 Project Idea


The DSP processors have turned out to be exceptionally prevalent attributable to its
various points of interest like cost adequacy, speed, vitality productivity and so on.
The distinctive component of DSP over its simple partner is capacity of programming
control; for example keeping the equivalent advanced equipment yet extraordinary
programming program, changed applications are conceivable. Moreover DSP
processors are field programmable. The natural hindrance of DSP is quantization
mistake which is gone; in any case, this can be diminished to a more prominent
degree utilizing progressively number of bits per test, or in other as such by
diminishing quantization step measure.

1.3 Purpose of the Project


Some times in working environments we are not concerned with the overall working
conditions. We might not be needed to study the whole room but a small part, we
might not be studying the whole substance but a single particle. Similarly in dealing
with areas where we are to deal with a large amount of audio signals we come across
signals that hinder in our observation , such signals are considered as noisy signals
and must be removed for maximum results

1.4 Applications of the Project

• In images
Removal
1. Tradeoffs

2
2. Chroma and luminance noise separation
3. Linear smoothing filters
4. Anisotropic diffusion
Non-local means
1. Nonlinear filters
2. Wavelet transform
3. Statistical methods
4. Block-matching algorithms
5. Random field
• In seismic exploration
• In audio
1. Compander-based noise reduction systems
2. Dynamic noise limiter and dynamic noise reduction
3. Other approaches
4. Software programs

1.5 Project Plan


The plan of the project is well defined.

• The idea obtained from the daily life problems.

• The first thing that we done is the graphic user interface how its design and
how it will work or simply interconnection between different GUI’s.

• The second thing is the filter design for the processing and removing of the
noise for the signal.

• After the successful simulation result of the filter then it was tested on a
number of voice signals and removes the remaining errors.

• Finally system is tested and encountered error is omitted and the GUI’s
interface organize that it is easier for the user and user friendly.

3
1.6 Report Organization
This report is a documentary delivering the ideas generated, concepts applied, and
activities done it contain various chapters. The following is a description of
information in this report. Chapter 1 provides a general overview of the project and
the use and importance of matlab and filter design for removing noise in the daily life
problem. The objectives, scope of project, problem statement, literature review and
related technology are also described in chapter 2. Chapter 3 describes the hardware
development unit in this project but this project not includes the hardware so chapter 3
includes the code and its working. Chapter 4 contains the process explanation with
working algorithm, flowchart, software tools and sketch of the Matlab. Chapter 5
contains all the results obtained from the software experiments that include the
algorithm implemented in a program. Finally, chapter 6 will summarize our project.
The conclusion, suggestions or recommendations for improvements and future work
are discussed within this chapter.

4
Chapter 2

LITERATURE REVIEW

2.1 Background Theory


MATLAB consolidates a work area condition tuned for iterative investigation and
configuration forms with a programming language that communicates grid and exhibit
arithmetic straightforwardly. It incorporates the Live Editor for making contents that
consolidate code, yield, and designed content in an executable note pad. MATLAB
(framework research center) is a multi-worldview numerical processing condition and
language created by Math Works. MATLAB permits network controls, plotting of
capacities and information, usage of calculations, formation of UIs, and interfacing
with projects written in different dialects, including C, Fortran and Python. In spite of
the fact that MATLAB is planned basically for numerical processing, a discretionary
tool kit utilizes the MuPAD representative motor, enabling access to emblematic
registering capacities. An extra bundle, Simulink, includes graphical multi-area
recreation and model-based structure for dynamic and inserted frameworks.
MATLAB clients originate from different foundations of designing, science, and
financial matters.

2.2 Related Technologies


There was a lot of related technologies are working on the concept of filter designing
and GUI interface and human usability increasing day by day. One of such technology
is discussed here.

2.2.1 Related Technology 1

There was a lot of technology related to this


project not fully but helpful for us such as
the DSP and image processing also include
the matlab project and most commonly
used in our daily ;life.

Figure 1 Clear and Noisy signal

5
2.3 Related Projects
some of the my college also doing the same project of the removing of the noise from
audio signal and then identify the difference between noise removed and noisy signal
and then GUI for the user interface.

2.4 Limitations
Some of the limitations of MATLAB are
• Sample Time and Solver Restrictions
• Algebraic Loop
• Unsupported Simulink Tools and Features
• Restricted Simulink Tools
• Simulink Tools Not Compatible with Sims cape Blocks
• Code Generation.
• Slow processor and time requiring
2.5 Problem Statement
The main problem during this project is the process of the filter design. We have
designed two different types of filter one is low pass and second is band pass filter
after that the second problem the intra-connection between the GUI’s and then run it
completely with its full specification and proceduer.

2.6 Summary
This chapter includes the all the background theory, the technologies that are related
to this project and the some of the advantages and limitation of the project how this
project carried out by us and methodology of this project.

6
Chapter 3

PROJECT DESIGN AND IMPLEMENTATION

In this chapter we fully discuss about the design and implementation of our project
our project is line follower robot we are want to make line follower by using arduino
Uno and also using the register level coding the design of our project is very simple
we two wheel at back with dc gear motor and in the front we uses the fixed wheel and
the code is burn in the line follower is done arduino software and the full detail is
given below in this chapter

3.1 Proposed Design Methodology


We structured the GUI and channels. To plan GUI. To cause GUI first to compose
manage on an order window and afterward select Blank GUI. After that make a board
I which you need to make GUI by choosing board. At that point include static content,
alter content, drive catches as indicated by your prerequisite. By tapping on static
content or whatever you use in your GUI you can transform it properties, for example,
text dimension, textual style shading, position tag and so forth. Tag assumes a
significant job on the grounds that by utilizing label you can recognize your case in
code. To cause code of your GUI you to can spare it and after that open it in
supervisor. After that we configuration channel, that can channel the clamor from the
loud sign.

3.2 Analysis Procedure


We can break down our work by giving a sound and commotion signal on a
MATLAB. After that we join both commotion and sound sign to one another. Along
these lines we can add a commotion to a sound signal. After that the following
assignment is to expel the loud sign from the sound sign. For this reason, we structure
a channel that can expel clamor from the given boisterous sign.

3.3 Implementation Procedure


The system that we pursue is that, first we make distinctive GUI for expansion and
sifting of clamor from the given sign. After that we consolidate these GUI, s and
afterward we plan a channel for expelling commotion from an uproarious sign. We

7
build a band pass channel which returns a discrete time channel as shows in a given
code
• Low pass Filter
% All frequency values are in Hz.
Fs = 44100; % Sampling Frequency

N = 200; % Order
Fpass = 200; % Passband Frequency
Fstop = 2000; % Stopband Frequency
Wpass = 1; % Passband Weight
Wstop = 1; % Stopband Weight
dens = 20; % Density Factor

% Calculate the coefficients using the FIRPM


function.
b = firpm(N, [0 Fpass Fstop Fs/2]/(Fs/2), [1 1 0
0], [Wpass Wstop], ...
{dens});
Hd = dfilt.dffir(b);

% [EOF]

• Echo effect

[voice,Fs] = audioread('last.wav');
% sound(x,Fs);
% pause(10);
delay = 0.5; % 0.5s delay
alpha = 0.65; % echo strength
D = delay*Fs;
y = zeros(size(voice));
y(1:D) = voice(1:D);
for i=D+1:length(voice)
y(i) = voice(i) + alpha*voice(i-D);

8
end
sound(y,Fs);
dft_y=abs(fft(y)); %Fourier Trransform of Voice
Signal
plot(dft_y);%title('Voice Signal'); %Frequency
Spectrum ofvoice signal
title('FFT of echo Signal')

3.4 Details about Software/Algorithm

We utilize just a single programming in this undertaking which is MATLAB.


MATLAB is a multi- paradigm numerical computing environment and proprietary
programming language developed by Math Works. MATLAB
allows matrix manipulations, plotting of functions and information, usage
of algorithms, creation of user interfaces, and interfacing with program composed in
different dialects, for example, C, C++, C#, Java, Fortran and Python.

3.5 Details of Simulations


We simulate this project on MATLAB. For this we add two signals, one of them is
noise while other is clear audio signal, in this way we can add noise in an audio
signal. After that we use designed filter for removing noise from noisy signal. The
main interface of simulation is look like that

Figure 2 Main GUI Simulation

9
3.6 Details of Final Working Prototype

The final results of our work are according to the requirement of the project. It
contains GUI’s. It can add a noise in an audio signal and after adding noise it can also
remove the noise from the noisy signal.

3.7 Summary

In this chapter we will discussing about the design and implementation of the
project.In this chapter, we will explain the analysis procedure, how we simulate it. We
also discuss the detail procedure of the MATLAB software and the final working
prototype.

10
Chapter 4

TOOLS AND TECHNIQUES

The introduction of this chapter is that in which we discuss about the component or
any software we use in the project but our project is fully useful of software we
cannot use any hardware component we use only laptop for using the matlab. For
making the project we use the matlab software

4.1 Hardware Tools used


In this project we cannot use any hardware because our project is fully software based
in which we use only laptop or any pc for using the software.

4.2 Software(s), simulation tool(s) used


In this project we only uses the software we cannot use any hardware in this project
we only matlab software MATLAB is a high-performance language for technical
computing. It integrates computation, visualization, and programming in an easy-to-
use environment where problems and solutions are expressed in familiar mathematical
notation. MATLAB is an interactive system whose basic data element is an array that
does not require dimensioning. This allows you to solve many technical computing
problems, especially those with matrix and vector formulations, in a fraction of the
time it would take to write a program in a scalar no interactive language such as C or
FORTRAN The name MATLAB stands for matrix laboratory. MATLAB was
originally written to provide easy access to matrix software developed by the
LINPACK and EISPACK projects, which together represent the state-of-the-art in
software for matrix computation MATLAB has evolved over a period of years with
input from many users. In university environments, it is the standard instructional tool
for introductory and advanced courses in mathematics, engineering, and science. In
industry, MATLAB is the tool of choice for high-productivity research, development,
and analysis MATLAB is used by engineers and scientists in many fields such as
image and signal processing, communications, control systems for industry, smart

11
grid design, robotics as well as computational finance The MATLAB programming
language is simpler than most programming languages and easier to learn.

4.3 Summary
Summary of this project is that is that in this chapter we discuss about the interface of
the project and software that we use in the lab we cannot use any type of hardware in
this project but in this project we use only software in this project we uses the matlab
software to make our project our project is about to add the noise in the audio and
then remove the noise in this project by using different filters.

12
Chapter 5

PROJECT RESULTS AND EVALUATION

In this chapter, we discuss about the project result and the evaluation the data that we
evaluate from the project is that we learn how to add noise on the signal and then
remove the noise from the signal by using the matlab software matlab is a high-
performance language for technical computing. It integrates computation,
visualization, and programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation.

5.1 Presentation of the findings


The presentation finding of the project is that in which we make the report of the
project in which we add the screenshot of the matlab software and also we paste the
code of the project in this report

5.1.1 Hardware Results


In the hardware result is that we cannot use any hardware because our project is fully
software based in which we use only laptop or any pc for using the software. our
project is fully based on software

5.1.2 Software Results


In the software we use the software matlab in the project to make the project
MATLAB is an interactive system whose basic data element is an array that does not
require dimensioning. This allows you to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of the time it would
take to write a program in a scalar no interactive language such as C or FORTRAN
The name MATLAB stands for matrix laboratory the software result is that is very
good and first time we learn about the matlab software the performance of the project
is very good matlab is very useful software for solving the problems. The main GUI
has five options and one is a close button here is the interface of the main GUI ,GUI
to handle clear signal and noisy signal respectively.

13
Figure 3 1st GUI

Figure 5 2nd GUI

Figure 4 3rd GUI

14
5.2 certification of design functionalities
The design of the project is also we make in the matlab software we make the
template of the project in which we make many push button and also make the text
box in which we write the project name and design is slightly very simple we cannot
add any type of difficulties in it

5.3 Discussion on the findings


The discussion on the finding of the project we make the report of the project in
which we add the screenshot of the matlab software and also we paste the code of the
project in this report and the other finding is on the report

5.4 Summary
Summary of this project is that in which we discuss about the results and the
evaluation that we got from the project in this project the data that we evaluate from
the project is that we learn about how to add the noise in the project and than remove
the noise from the audio the design simulation and coding all done in matlab software

15
Chapter 6

CONCLUSION AND FUTURE WORK

The conclusion that we got from the matlab project is that the main objective of this
project is to teach us the main concept of the matlab and also make us able to
implement the matlab coding on the matlab our project is about to add a noise in
audio and then remove it by using the matlab coding and also use the code to add the
noise in the audio by using the matlab coding we also make graphs of different type
like band pass low pass and at the end we also implement our graphs on the time
domain that was slightly difficult one and the main objective behind this project is to
learn briefly about matlab

FUTURE WORK

Matlab is very useful software it combines visual, computations, and programming in


an easy-to-use environment where problems and solutions are given in well-known
mathematical expressions. By its such a huge level of usage and need in programming
aspects the image processing is the one of the main project that we are want to
implement because of the practical use and image processing also covered in final
year project. Because of its application we will continue our work on matlab and
modify our project on higher level and make it more better and more and more
generic.

16
REFERENCES

[1 https://www.mathworks.com
]
[2 https://www.researchgate.net/publication/228945801_Filter_design_using_MAT
] LAB

17

You might also like