You are on page 1of 69

NOISE REDUCTION IN AUDIO SIGNAL 2014/15

DECLARATION

WE, the undersigned Students, declare that this BSE thesis document is our work by referring
different sources related worked projects used while compiling this thesis get fully
acknowledged.

Name of students: Signature:

Tesfalem Zeru ______________

Tomas Ayalew______________

Sultan Fitwi ______________

Advisor Name: Signature

YirgaAlemu(MSC) __________

Place: Hawassauniversity, Ethiopia

Date of submission: June,11, 2015

1
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

LIST OF AVREVATION

ANC active noise control

ANR Active noise reduction

GUI Graphical user interphase

ADC Analog digital converter

DAC Digital analog converter

SNR Signal to noise ratio

SQNR Signal quantization to noise ratio

IIR Infinite impulse response

FIR Finite impulse response

Fo cut off frequency

Q Quality factor

2
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

ACKNOWLEDGMENT

We avail this opportunity to extend our hearty indebtedness to our guide instructor YIRGA.A
for hisvaluable guidance, constant encouragement and kindly help at different stages for
theexecution of this BSC thesis.

3
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

ABSTRUCT
In thisproject of noise reduction in audio signal our aim was to decrease noise from the audio
signal and we use the best parameter different types of filters. The filter is used to remove
unwanted parts of the signal such as random noise that is also undesirable. To remove noise from
the audio signal transmission or to extract useful parts of the signal such as the components lying
within a certain frequency range. Filters are broadly used in signal processing and
communication systems in applications such as channel equalization, noise reduction, radar,
audio processing, speech signal processing, video processing, biomedical signal processing that
is noisy ECG, EEG, EMG signal filtering, electrical circuit analysis and analysis of economic
and financial data. But In our thesis we specify noise reduction only in audio signal. In our thesis
there are three types of infinite impulse response filter i.e. Butterworth, Chebyshev type I and
Elliptical filter have been discussed theoretically and experimentally. Butterworth, Chebyshev
type I and elliptic low pass, high pass, band pass and band stop filter have been designed in this
paper using MATLAB Software. The impulse responses, magnitude responses, phase responses
of Butterworth, Chebyshev type I and Elliptical filter for filtering the audio signal have been
observed in our thesis. Analyzing the audio signal, its sampling rate and spectrum response have
also been found.
Keywords
Impulse response, Magnitude response, Phase response, Butterworth filter, Chebyshev-I filter,
Elliptical filter.

4
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

TABLE OF CONTENT
LIST OF AVREVATION ............................................................................................................................. 2
ABSTRUCT ..................................................................................................................................................... 4
LIST OF TABLE .......................................................................................................................................... 7
LIST OF APPENDICES ............................................................................................................................... 7
CHAPTER ONE ........................................................................................................................................... 8
1 INTRODUCTION .......................................................................................................................................... 8
1.1 Background ......................................................................................................................................... 8
1.2Statement of the problem ....................................................................................................................... 9
1.3 Objectives.......................................................................................................................................... 11
1.3.1 General objective ....................................................................................................................... 11
1.3.2 Specific objectives ...................................................................................................................... 11
1.5 Methodologies .................................................................................................................................. 13
CHAPTER TWO ........................................................................................................................................ 14
2 Body part of the project ........................................................................................................................... 14
2.1 Audio signals ..................................................................................................................................... 14
2.2 Basic noise theory ............................................................................................................................. 15
2.2.1TYPES OF NOISES ......................................................................................................................... 15
2.3 Signal to noise ratio........................................................................................................................... 16
2.4 Graphical Interface using GUIDE ....................................................................................................... 17
2.4.1COMPONENTS OF GUI ................................................................................................................ 17
2.4.2 HOW DOES GUI WORKS ............................................................................................................. 17
2.4.3 Laying out a GUI: ........................................................................................................................ 18
2.4.4 PROGRAMMING THE GUI: ................................................................................................... 19
2.5 FILTER ................................................................................................................................................ 19
2.5.1 IIR FILTER .................................................................................................................................... 20
2.5.2DIFFERENCE BETWEEN FIR & IIR ....................................................................................... 20
2.5.3BASIC LINEAR DESIGN ................................................................................................................. 21
2.6 SPECTROGRAM ................................................................................................................................. 33
2.7 Sound spectra ................................................................................................................................... 34
2.8Audio file format ................................................................................................................................ 36

5
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.8.1Types of formats ......................................................................................................................... 36
2.9 Spectral density................................................................................................................................. 36
2.9.1 Power spectral density ............................................................................................................... 37
2.10 Frequency response ........................................................................................................................ 38
2.11 Transient response.......................................................................................................................... 38
2.12 Damping .......................................................................................................................................... 39
2.13 System Poles and Zeros .................................................................................................................. 39
2.14 Impulse response ............................................................................................................................ 39
2.14.1 Practical applications ............................................................................................................... 40
2.14.2 Loudspeakers ........................................................................................................................... 40
2.15 Step response.................................................................................................................................. 40
CHAPTER THREE .................................................................................................................................... 41
3 Design and simulation .............................................................................................................................. 41
3.1Designing of filter ............................................................................................................................... 41
3.2 WORKING STEPS ............................................................................................................................... 42
CHAPTER FOUR....................................................................................................................................... 44
4 RESULT AND DESICCATION ...................................................................................................................... 44
4.1 RESULT .............................................................................................................................................. 44
4.2 DESICCATION BASED ON THE SIMULATION ...................................................................................... 49
CHAPTER FIVE ........................................................................................................................................ 50
5 CONCLUSION AND RECOMMENDATION.................................................................................................. 50
5.1 conclusions .................................................................................................................................... 50
5.2 Recommendation.............................................................................................................................. 50
5.2.1 Recommendation for the school: .............................................................................................. 50
6. REFERENCES ............................................................................................................................................ 51
7. APPENDIX ............................................................................................................................................. 52

6
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

LISTOF TABLE
Table 1: Frequency specification of filter design ........................................................................................ 42

LIST OF FIGURES
Figure 1: Block diagram ............................................................................................................................. 13
Figure 2: important steps in digital audio processing. ................................................................................ 14
Figure 3: An efficient realization of an IIR ................................................................................................. 20
Figure 4: TYPES OF FILTERS .................................................................................................................. 22
Figure 5:Low-Pass Filter Peaking vs. Q ..................................................................................................... 23
Figure 6:High- Pass Filter Peaking vs. Q .................................................................................................... 24
Figure 7:Band-Pass Filter Peaking vs. Q .................................................................................................... 26
Figure 8:Standard, Lowpass, and Highpass Notches .................................................................................. 27
Figure 9: Pole-zero, transfer function representation of various filters ...................................................... 28
Figure 10: PHASE RESPONSE ................................................................................................................. 29
Figure 11: Phase response of the various types of IIR filters ..................................................................... 31
Figure 12:SOUND SPECTRA OF MUSICAL INSTRUMENT ................................................................ 35
Figure 13: STEP RESPONSE ..................................................................................................................... 41
Figure 14:audio signal filtering ................................................................................................................... 42
Figure 15: specification of filters ................................................................................................................ 43
Figure 16:filtered graph .............................................................................................................................. 43
Figure 17: Low pass Butterworth filter ....................................................................................................... 45
Figure 18: High pass Butterworth filter ...................................................................................................... 46
Figure 19: Band pass Butterworth filter ...................................................................................................... 47
Figure 20: Band stop Butterworth filter ..................................................................................................... 48

LIST OF APPENDICES
Appendix 1: Code of first file ..................................................................................................................... 52
Appendix 2: Code of the second function.................................................................................................. 54
Appendix 3: The third function code .......................................................................................................... 64

7
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

CHAPTER ONE

1 INTRODUCTION
1.1 Background
Audio noise reduction system is the system that is used to remove the noise from the audio
signals. Audio noise reduction systems can be divided into two basic approaches. The first
approach is the complementary type which involves compressing the audio signal in some well-
defined manner before it is recorded (primarily on tape). On playback, the subsequent
complementary expansion of the audio signal which restores the original dynamic range, at the
same time has the effect of pushing the reproduced tape noise (added during recording) farther
below the peak signal level—and hopefully below the threshold of hearing. The second approach
is the single-ended or non-complementary type which utilizes techniques to reduce the noise
level already present in the source material—in essence a playback only noise reduction system.
This approach is used by the LM1894 integrated circuit, designed specifically for the reduction
of audible noise in virtually any audio source. Noise reduction is the process of removing noise
from a signal. All recording devices, either analog or digital, have traits which make them
susceptible to noise. Noise can be random or white noise with no coherence, or coherent noise
introduced by the device's mechanism or processing algorithms. Active Noise Control (ANC),
also known as noise cancellation, or Active Noise Reduction (ANR), is a method for reducing
unwanted and unprocessed sound by the addition of a second sound specifically designed to
cancel the first. Sound is a pressure wave or we can say sound is the analog signals that are
processed according to their frequency, which consists of a compression phase and a rarefaction
phase. A noise-cancellation speaker emits a sound wave with the same amplitude but with
inverted phase (also known as anti-phase) to the original sound. The waves combine to form a
new wave, in a process called interference, and effectively cancel each other out - an effect
which is called cancellation. Modern active noise control is generally achieved through the use
of analog circuits or digital signal processing. Adaptive algorithms are designed to analyze the
waveform of the background neural noise, then based on the specific algorithm generate a signal

8
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
that will either phase shift or invert the polarity of the original signal. This anti phase is then
amplified and a transducer signal. This anti phase is then amplified and a transducer creates a
sound wave directly proportional to the amplitude of the original waveform, creating destructive
interference. This effectively reduces the volume of the perceivable noise. The transducer
emitting the noise cancellation signal may be located at the location where sound attenuation is
wanted (e.g. the user's ear/any music/headphone sound). This requires a much lower power level
for cancellation but is effective only for a single user.

9
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

1.2Statement of the problem


Review The basic idea behind the project is to estimate the uncorrupted audio from the distorted
or noisy audio signal and sine signal, and is also referred to as audio ―de-noising‖. There are
various methods to help restore audio from noisy distortions. Selecting the appropriate method
plays a very important role in getting the desired audio. The de-noising methods tend to be
problem specific. For example, a method that is used to de-noise esophageal speech may not be
suitable for de-noising Emd. A sine signal and audio signal is taken and white Gaussian noise is
added to it. This would be given as an input to the de-noising algorithm, which produces an
audio signal close to the original high quality audio signal. Selecting a wavelet that has compact
support in both time and frequency in addition to significant number of vanishing moments is
essential for an algorithm. Several criteria can be used in selecting an optimal wavelet function.
The objective is to minimize reconstructed error variance and maximize signal to noise ratio
(SNR). Optimum wavelets can be selected based on the energy conservation properties in the
approximation part of the coefficients. Wavelets with more vanishing moments should be
selected as it provides better reconstruction quality and introduce less distortion into processed
audio and concentrate more signal energy in few coefficients. Computational complexity of
DWT increases with the number of vanishing moments and hence for real time applications it
cannot be suggested with high number of vanishing moments.

Currently the technology produces so many sophisticated software’s and hardware’s to solve
complicated human problem. One of the many challenges that face human being in day to day
activity is the problem of noise in different applications like telecommunication; it must have to
be reduced to a smaller quantity to get a better result in accuracy and efficiency. To solve this
problem sophisticated software must have to be designed to filter the noise from the audio signal.

10
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
1.3 Objectives
1.3.1 General objective
 Removes noise from the audio signal.

1.3.2 Specific objectives


The following are the main objectives of our project:-

 To design and develop a system which will remove a noise from any audio signal

 To design and implement a user friendly application which is very comfortable to use

 To solve a problem of noise disturbance in audio signal in different aspects of


applications

11
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
1.4 Literature review

So far in the development of our project we were able to review some projects, journals, articles
and books which are related to the title of our project.

We believe that all the reviewed materials have been a good asset for the overall design and
development of the project we are planning on doing. In this section some of the related projects.

Noise Reduction with Microphone Arrays for Speaker Identification: The presence of
acoustic noise in audio recordings is an ongoing issue that plagues many applications. This
ambient background noise is difficult to reduce due to its unpredictable nature. Many single
channel noise reduction techniques exist but are limited in that they may distort the desired
speech signal due to overlapping spectral content of the speech and noise. It is therefore of
interest to investigate the use of multichannel noise reduction algorithms to further attenuating
noise while attempting to preserve the speech signal of interest:

Speech Signal Noise Reduction by Wavelets: Speech plays an important role in multimedia
system. Speech enhancement is to remove noise from speech for multimedia systems. Noise act
as a disturbance in any form of communication which degrades the quality of the
information signal. Generally transmission and receiving signals are often corrupted by noise
which can cause severe problems for downstream processing and user perception.

And also we refer different books which help us to develop our project.

12
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

1.5 Methodologies
We will follow the following sequence in developing our project-

Collecting any
kinds of
information that is Designing filter Analyzing the
information’s
important for our
project

Writing the program

Designing the GUI

Implementing

Figure 1: Block diagram

13
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

CHAPTER TWO

2 Body part of the project


2.1 Audio signals
Audio signals are complex waveforms composed of combinations of different musical notes
(different fundamental frequencies) with unique harmonic content determined by the particular
instruments or voices creating the notes.

The harmonic content of a signal is nearly impossible to discern from the time domain
waveform. Taking the Fourier transform of the signal and looking at the power spectral density
reveals the frequency components that make up the signal.

Audio signals, which represent longitudinal variations of pressure in a medium, are converted
into electrical signals by piezoelectric transducers. Transducers convert the energy of a
mechanical displacement into an electrical signal, either voltage or current. The main advantage
of converting an audio signal into an electrical signal is that the signal can now be processed. An
example is an analog signal obtained from the transducer that can be converted into an encoded
digital data stream by using an analog-digital converter (ADC) and constitutes digital processing
of analog signals. Alternatively, if a digital-analog converter (DAC) is applied to a digital data
stream, the audio signal transmits through an amplifier and a speaker. The process is show
schematically in Figure 1, which identifies the

Figure 2: important steps in digital audio processing.


Shows the process of digital processing of three types of audio signal. Part (a) represents a
complete digital audio processing comprising (from left to right) a microphone, amplifier, ADC,

14
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
digital processing material, DAC, amplifying section and speaker; an audio recognition system in
(b), and a set of audio synthesis (c)

2.2 Basic noise theory


Noise is defined as an unwanted signal that interferes with the communication or measurement
of another signal. A noise itself is an information-bearing signal that conveys information
regarding the sources of the noise and the environment in which it propagates.

2.2.1TYPES OF NOISES
There are many types and sources of noise or distortions and they include:

1. Electronic noise such as thermal noise and shot noise.

2. Acoustic noise emanating from moving, vibrating or colliding sources such as revolving
machines, moving vehicles, keyboard clicks, wind and rain.

3. Electromagnetic noise that can interfere with the transmission and reception of voice, image
and data over the radio-frequency spectrum.

4. Electrostatic noise generated by the presence of a voltage.

5. Communication channel distortion and fading.

6. Quantization noise and lost data packets due to network congestion.

Signal distortion is the term often used to describe a systematic undesirable change in a signal
and refers to changes in a signal from the non-ideal characteristics of the communication
channel, signal fading reverberations, echo, and multipath reflections and missing samples
Depending on its frequency, spectrum or time characteristics, a noise process is further classified
into several categories:

A.White noise: purely random noise has an impulse autocorrelation function and a flat power
spectrum. White noise theoretically contains all frequencies in equal power.

B. Band-limited white noise: Similar to white noise, this is a noise with a flat power spectrum
and a limited bandwidth that usually covers the limited spectrum of the device or the signal of
interest. The autocorrelation of this noise is sink-shaped.

15
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
C. Narrowband noise: It is a noise process with a narrow bandwidth such as 50/60 Hz from the
electricity supply.

Colored noise: It is non-white noise or any wideband noise whose spectrum has a non-flat shape.
Examples are pink noise, brown noise and autoregressive noise.

D. Impulsive noise: Consists of short-duration pulses of random amplitude, time of occurrence


and duration.

Transient noise pulses: Consist of relatively long duration noise pulses such as clicks, burst noise
etc.

2.3 Signal to noise ratio


The signal-to-noise ratio (SNR ) is commonly used to assess the effect of noise on a signal. This
measurement is based on an additivenoise model, where the quantized signal xq[n] is a
superposition of the unquantized, undistorted signal x[n] and the additive quantization error. The
ratio between the signal powers of x[n] and e [n] defines the SNR . To capture the wide range
of potential SNR values and to consider the logarithmic perception of loudness in humans, SNR
generally given in a logarithmic scale, in decibels (dB).

Where, σ2x and σ2e are the powers of x[n], and e [n], respectively. Specifically for the
assessment of quantization noise, SNR is often labeled as the signal to quantization-noise ratio
(SQNR).

16
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

2.4 Graphical Interface using GUIDE


For better understanding of the content of this chapter, we have developed a graphical interface,
only in the case of a sine wave. We used GUIDE of MATLAB to build this interface, you need
pop-up menu, slider, edit text, four push button and four graphics (axes), after all that is placed in
your figure you need to program each item.MatLab provides Graphical User Interface
Development Environment (GUIDE)

A MatLab tool used to create GUI’s.Decide between using GUIDE or writing the code from
scratch GUI’s give the user a simplified experience running a program. Associates a
―function(s)‖ with components of the GUI.GUI should be consistent and easily understood.
Provide the user with the ability to use a program without having to worry about commands to
run the actual program.

2.4.1 COMPONENTS OF GUI


1. Push button. 6. Pop-up-menu. 10. Button group.
2. Edit text. 7. Radio button. 11. ActiveX control.
3. Static text. 8. Panel. 12. Toggle button.
4. Slider. 9. List box. 13. List box.
5. Checkbox.
A graphical user interface (GUI) is a graphical display that contains devices, or components, that
enable a user to perform interactive tasks. To perform these tasks, the user of the GUI does not
have to create a script or type commands at the command line. Often the user does not have to
know the details of the task at hand.

The GUI components can be menus, toolbars, push buttons, radio buttons, list boxes, and sliders-
just to name a few. In MATLAB, a GUI can also display data in tabular form or as plots, and can
group related components.

2.4.2 HOW DOES GUI WORKS


Each component, and the GUI itself, is associated with one or more user-written routines known
as callbacks. The execution of each callback is triggered by a particular user action such as a

17
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
button push, mouse click, selection of a menu item, or the cursor passing over a component.
You, as the creator of the GUI, provide these callbacks.

In the GUI described in ―What Is a GUI?‖ on page , the user selects a data set from the pop-up
menu, then clicks one of the plot type buttons. Clicking the button triggers the execution of a
callback that plots the selected data in the axes.

This kind of programming is often referred to as event-driven programming. The event in the
example is a button click. In event-driven programming, callback execution is asynchronous,
controlled by events external to the software. In the case of MATLAB GUIs, these events
usually take the form of user interactions with the GUI.

The writer of a call back has no control over the sequence of events that leads to its execution or,
when the callback does execute, what other callbacks might be running simultaneously.

First you have to design your GUI. You have to decide what you want it to do, how you want the
user to interact with it, and what components you need.

Next, you must decide what technique you want to use to create your GUI. MATLAB enables
you to create GUIs programmatically or with GUIDE, an interactive GUI builder. It also
provides functions that simplify the creation of standard dialog boxes. The technique you choose
depends on your experience, your preferences, and the kind of GUI you want to create. This
table outlines some possibilities.

2.4.3 Laying out a GUI:


The GUIDE Layout Editor enables you to populate a GUI by clicking and dragging GUI
components — such as buttons, text fields, sliders, axes, and so on — into the layout area. It also
enables you to create menus and context menus for the GUI.
Other tools, which are accessible from the Layout Editor, enable you to size the GUI, modify
component look and feel, align components, set tab order, view a hierarchical list of the
component objects, and set GUI options.
The following topic, ―Laying out a Simple GUI‖ uses some of these tools to show you the basics
of laying out a GUI. ―GUIDE Tools Summary‖ describes the tools.

18
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.4.4 PROGRAMMING THE GUI:
When you save your GUI layout, GUIDE automatically generates an M-file that you can use to
control how the GUI works. This M-file provides code to initialize the GUI and contains a
framework for the GUI callbacks — the routines that execute in response to user-generated
events such as a mouse click. Using the M-file editor, you can add code to the callbacks to
perform the functions you want them to. ―Programming the GUI‖ shows you what code to add to
the example M-file to make the GUI work.

2.5 FILTER
Filters are networks that process signals in a frequency-dependent manner. The basic concept of
a filter can be explained by examining the frequency dependent nature of the impedance of
capacitors and inductors. Consider a voltage divider where the shunt leg is reactive impedance.
As the frequency is changed, the value of the reactive impedance changes and the voltage divider
ratio changes. This mechanism yields the frequency dependent change in the input/output
transfer function that is defined as the frequency response. Filters have many practical
applications. A simple, single-pole, low-pass filter (the integrator) is often used to stabilize
amplifiers by rolling off the gain at higher frequencies where excessive phase shift may cause
oscillations. A simple, single-pole, high-pass filter can be used to block dc offset in high gain
amplifiers or single supply circuits. Filters can be used to separate signals, passing those of
interest, and attenuating the unwanted frequencies.Filters can be analog or digital depend on its
function.
Digital filters can be classified into two categories: FIR filter and IIR filter. Analog electronic
filters consisted of resistors, capacitors and inductors are normally IIR filters. On the other hand,
discrete-time filters (usually digital filters) based on a tapped delay line that employs no
feedback are essentially FIR filters. The capacitors (or inductors) in the analog filter have a
"memory" and their internal state never completely relaxes following an impulse. But after an
impulse response has reached the end of the tapped delay line, the system has no further memory
of that impulse. As a result, it has returned to its initial state. Its impulse response beyond that
point is exactly zero. IIR filter has certain properties such as width of the pass-band, stop-band,
maximum allowable ripple at pass-band and maximum allowable ripple at stop-band. A desired
design of IIR filter can be done with the help of those properties. The design of IIR digital filters
with Butterworth, Elliptical filter responses, using MATLAB functions are based on the theories

19
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
of bilinear transformation and analog filters. So they are commonly used to approximate the
piecewise constant magnitude characteristic of ideal HP, LP, BP and BS filters.

2.5.1 IIR FILTER


IIR filters can be usually implemented using structures having feedback (recursive structures).
The present and the past input samples can be described by the following equation,

Figure 3: An efficient realization of an IIR


2.5.2DIFFERENCE BETWEEN FIR & IIR
The main difference between IIR filters and FIR filters is that an IIR filter is more compact in
that it can habitually achieve a prescribed frequency response with a smaller number of
coefficients than an FIR filter. An IIR filter can become unstable, whereas an FIR filter is always
stable.
IIR filters have many advantages as follows:-
i. Less number of arithmetic operations are requires in IIR filter.
ii. There are shorter time delays in these filters.

20
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
iii.IIR Filters have similarities with the analog filters.
iv. Lesser number of side lobes in the stop band.
v. They are more susceptible to noises.

2.5.3BASIC LINEAR DESIGN


Low Pass filter passes the frequency from zero up to some designated frequency, called as cut-
off frequency. After cut-off frequency; it will not allow any signal to pass through it. The low
frequencies are in the pass-band and the high frequencies in the stop-band. Figure shows the
idealized low pass filter. The functional complement to the low-pass filter is the high-pass filter.
Here, the low frequencies are in the stop-band, and the high frequencies are in the pass band.
Figure shows the idealized high-pass filter. If a high-pass filter and a low-pass filter are
cascaded, a band pass filter is created. The band pass filter passes a band of frequencies between
a lower cutoff frequency, f l, and an upper cutoff frequency, f h. Frequencies below f l and above
f h are in the stop band. An idealized band pass filter is shown in figure. A complement to the
band pass filter is the band-reject, or notch filter. The idealized filters defined above,
unfortunately, cannot be easily built. The transition from pass band to stopband will not be
instantaneous, but instead there will be a transition region. Stop band attenuation will not be
infinite.

21
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 4: TYPES OF FILTERS


2.5.3.1Fo and Q
Fo is the cutoff frequency of the filter. This is defined, in general, as the frequency where the
response is down 3 dB from the pass band. It can sometimes be defined as the frequency at
which it will fall out of the pass band. For example, a 0.1 dB Chebyshev filter can have its Fo at
the frequency at which the response is down > 0.1 dB.
The shape of the attenuation curve (as well as the phase and delay curves, which define the time
domain response of the filter) will be the same if the ratio of the actual frequency to the cutoff
frequency is examined, rather than just the actual frequency itself. Normalizing the filter to 1
rad/s, a simple system for designing and comparing filters can be developed. The filter is then
scaled by the cutoff frequency to determine the component values for the actual filter.
Q is the ―quality factor‖ of the filter. It is also sometimes given as α where:

This is commonly known as the damping ratio. ξ is sometimes used where:

22
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

If Q is > 0.707, there will be some peaking in the filter response. If the Q is < 0.707, roll off at
F0 will be greater; it will have a more gentle slope and will begin sooner. The amount of peaking
for a 2 pole low-pass filter vs. Q is shown in Figure 4.

Figure 5:Low-Pass Filter Peaking vs. Q


Rewriting the transfer function H(s) in terms of ωo and Q:

where Ho is the pass-band gain and ωo = 2πFo.


This is now the low-pass prototype that will be used to design the filters.

23
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.5.3.2 High-Pass Filter
Changing the numerator of the transfer equation, H(s), of the low-pass prototype to H0s2
transforms the low-pass filter into a high-pass filter. The response of the high-pass filter
is similar in shape to a low-pass, just inverted in frequency.
The transfer function of a high-pass filter is then:

The response of a 2-pole high-pass filter is illustrated in Figure 5.

Figure 6:High- Pass Filter Peaking vs. Q


2.5.3.3 Band-Pass Filter
Changing the numerator of the lowpass prototype to Hoωo2 will convert the filter to aband-pass
function.
The transfer function of a band-pass filter is then:

24
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Q has a particular meaning for the band-pass response. It is the selectivity of the filter. It is
defined as:

Where FL and FH are the frequencies where the response is –3 dB from the maximum.

25
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 7:Band-Pass Filter Peaking vs. Q

2.5.3.4 Band-Reject (Notch) Filter


By changing the numerator to s2 + ωz2, we convert the filter to a band-reject or notch filter. As
in the bandpass case, if the corner frequencies of the band-reject filter are separated by more than
an octave (the wideband case), it can be built out of separate low pass and high-pass sections.
We will adopt the following convention: A narrow-band band-reject filter will be referred to as a
notch filter and the wideband band-reject filter will be referred to as band-reject filter.

A notch (or band-reject) transfer function is:

26
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 8: Standard, Lowpass, and Highpass Notches

2.5.3.5All-pass Filter

There is another type of filter that leaves the amplitude of the signal intact but introduces phase
shift. This type of filter is called an all-pass. The purpose of this filter is to add phase shift
(delay) to the response of the circuit. The amplitude of an all-pass is unity for all frequencies.
The phase response, however, changes from 0° to 360° as the frequency is swept from 0 to
infinity. The purpose of an all-pass filter is to provide phase equalization, typically in pulse
circuits. It also has application in single side band, suppressed carrier (SSB-SC) modulation
circuits.
The transfer function of an all-pass filter is:

27
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 9: Pole-zero, transfer function representation of various filters

2.5.4 Phase Response


As mentioned earlier, a filter will change the phase of the signal as well as the amplitude. Fourier
analysis indicates a square wave is made up of a fundamental frequency and odd order
harmonics. The magnitude and phase responses, of the various harmonics, are precisely defined.
If the magnitude or phase relationships are changed, then the summation of the harmonics
will not add back together properly to give a square wave. It will instead be distorted.
typically showing overshoot and ringing or a slow rise time. This would also hold for any

28
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
complex waveform.
Each pole of a filter will add 45 of phase shift at the corner frequency. The phase will vary from
0 (well below the corner frequency) to 90 (well beyond the corner frequency). The
start of the change can be more than a decade away. In multipole filters, each of the poles will
add phase shift, so that the total phase shift will be multiplied by the number of poles (180 total
shift for a two pole system, 270 for a three pole system, etc.

Figure 10: PHASE RESPONSE

2.5.5TYPES OF IIR FILTERS


2.5.5.1BUTTERWORTH FILTER
The Butterworth filter has a maximally flat response that is, no passband ripple and roll-off of
minus 20db per pole. It is ―flat maximally magnitude‖ filters at the frequency of jω= 0, as the
first 2N - 1 derivatives of the transfer function when jω = 0 are equal to zero. The phase response
of the Butterworth filter becomes more nonlinear with increasing N. This filter is completely
defined mathematically by two parameters; they are cut off frequency and number of poles.
The magnitude squared response of low pass Butterworth filter is given by,

Filter Selectivity,

29
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Attenuation,

The frequency response of the Butterworth filter is maximally flat in the passband and rolls off
towards zero in the stopband. When observed on a logarithmic bode plot the response slopes off
linearly towards negative infinity. A first-order filter's response rolls off at −6 dB per octave
(−20 dB per decade). A second-order filter’s response rolls off at −12 dB per octave and a third-
order at −18 dB. Butterworth filters have a monotonically varying magnitude function with ω,
unlike other filter types that have non-monotonic ripple in the passband and the stopband.
Compared with a Chebyshev Type I filter or an Elliptic filter, the Butterworth filter has a slower
roll-off and therefore will require a higher order to implement a particular stopband specification.
Butterworth filters have a more linear phase response in the pass-band than Chebyshev Type I
and Elliptic filters.
The Butterworth filter rolls off more slowly around the cut off frequency than the Chebyshev
Type I and Elliptic filters without ripple. All of these filters are in fifth order.

30
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 11: Phase response of the various types of IIR filters

2.5.5.2CHEBYSHEV TYPE -I FILTER


The absolute difference between the ideal and actual frequency response over the entire passband
is minimized by Chebyshev Type I filter by incorporating equal ripple in the passband. Stopband
response is maximally flat. The transition from passband to stopband is more rapid than for the
Butterworth filter. The magnitude squared Chebyshev type I response is:

31
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

The magnitude squared response peaks occur in the pass band

2.5.5.3ELLIPTICAL FILTER
Elliptical filter can also be called as Cauer filters. Elliptic filters are equiripple in both the
passband and stopband. They generally meet filter necessities with the lowest order of any
supported filter type. For a given filter order, elliptic filters minimize transition width of the
passband ripple and stopband ripple.

The magnitude response of a low pass elliptic filter as a function of angular frequency ω is given
by,

32
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
Where,

Rk is the nth order elliptic rational function.

ω0 is the cut off frequency.

ε is the ripple factor.

ξ is the selectivity factor.

The value of the ripple factor specifies the passband ripple while the combination of the ripple
factor and the selectivity factor specify the stopband ripple.

In the pass band, the elliptic rational function varies between zero and unity. The gain of the
passband therefore will vary between

In the stopband, the elliptic rational function varies between infinity and the discrimination factor
Lk.

2.6 SPECTROGRAM
A spectrogram is a time-varying spectral representation (forming an image) that shows how the
spectral density of a signal varies with time. Also known as spectral waterfalls, sonograms,
voiceprints, or voice grams, spectrograms are used to identify phonetic sounds, to analyze the
cries of animals; they were also used in many other fields including music, sonar/radar,
processing, seismology, etc. The instrument that generates a spectrogram is called a spectrograph
and is equivalent to a son graph.
The most common format is a graph with two geometric dimensions: the horizontal axis
represents time, the vertical axis is frequency; a third dimension indicating the amplitude of a

33
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
particular frequency at a particular time is represented by the intensity or colour of each point in
the image.
There are many variations of format: sometimes the vertical and horizontal axes are switched, so
time runs up and down; sometimes the amplitude is represented as the height of a 3D surface
instead of color or intensity. The frequency and amplitude axes can be either linear or
logarithmic, depending on what the graph is being used for. Audio would usually be represented
with a logarithmic amplitude axis (probably in decibels, or dB), and frequency would be linear to
emphasize harmonic relationships, or logarithmic to emphasize musical, tonal relationships.

2.7 Sound spectra


Most sounds are made up of a complicated mixture of vibrations. (There is an introduction to
sound and vibrations in the document "How woodwind instruments work".) If you are reading
this on the web, you can probably hear the sound of the fan in your computer, perhaps the sound
of the wind outside, the rumble of traffic - or perhaps you have some music playing in the
background, in which case there is a mixture of high notes and low notes, and some sounds (such
as drum beats and cymbal crashes) which have no clear pitch.
A sound spectrum is a representation of a sound – usually a short sample of a sound – in terms of
the amount of vibration at each individual frequency. It is usually presented as a graph of either
power or pressure as a function of frequency. The power or pressure is usually measured in
decibels and the frequency is measured in vibrations per second (or hertz, abbreviation Hz) or
thousands of vibrations per second (kilohertz, abbreviation kHz). You can think of the sound
spectrum as a sound recipe: take this amount of that frequency, add this amount of that frequency
etc. until you have put together the whole, complicated sound.

Today, sound spectra (the plural of spectrum is spectra) are usually measured using

 a microphone which measures the sound pressure over a certain time interval,
 an analogue-digital converter which converts this to a series of numbers (representing the
microphone voltage) as a function of time, and
 a computer which performs a calculation upon these numbers.

34
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
Your computer probably has the hardware to do this already (a sound card). Many software
packages for sound analysis or sound editing have the software that can take a short sample of a
sound recording, perform the calculation to obtain a spectrum (a digital Fourier transform or
DFT) and display it in 'real time' (i.e. after a brief delay). If how have these, you can learn a lot
about spectra by singing sustained notes (or playing notes on a musical instrument) into the
microphone and looking at their spectra. If you change the loudness, the size (or amplitude) of
the spectral components gets bigger. If you change the pitch, the frequency of all of the
components increases. If you change a sound without changing its loudness or its pitch then you
are, by definition, changing its timbre. (Timbre has a negative definition - it is the sum of all the
qualities that are different in two different sounds which have the same pitch and the same
loudness.) One of the things that determine the timbre is the relative size of the different spectral
components. If you sing "ah" and "ee" at the same pitch and loudness, you will notice that there
is a big difference between the spectra.

Figure 12:SOUND SPECTRA OF MUSICAL INSTRUMENT

In this figure, the two upper figures are spectra, taken over the first and last 0.3 seconds of the
sound file. The spectrogram (lower figure) shows time on the x axis, frequency on the vertical
axis, and sound level (on a decibel scale) in false colour (blue is weak, red is strong). In the
spectra, observe the harmonics, which appear as equally spaced components (vertical lines). In
the spectrogram, the harmonics appear as horizontal lines. In this example, the pitch doesn't
change, so the frequencies of the spectral lines are constant. However the power of every
harmonic increases with time, so the sound becomes louder. The higher harmonics increase more
than do the lower, which makes the timbre 'brassier' or brighter, and also makes it louder.

35
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.8Audio file format
An audio file format is a file format for storing digital audio data on a computer system. This
data can be stored uncompressed, or compressed to reduce the file size. It can be a raw bit
stream, but it is usually a container format or an audio data format with defined storage layer.

2.8.1Types of formats
It is important to distinguish between a file format and an audio codec. A codec performs the
encoding and decoding of the raw audio data while the data itself is stored in a file with a
specific audio file format. Although most audio file formats support only one type of audio data
(created with an audio coder), a multimedia container format (as Matroska or AVI) may support
multiple types of audio and video data.

There are three major groups of audio file formats:

 Uncompressed audio formats, such as WAV, AIFF, AU or raw header-less PCM;


 Formats with lossless compression, such as FLAC, Monkey's Audio (filename extension
APE), WavPack (filename extension WV), TTA, ATRAC Advanced Lossless, Apple
Lossless (filename extension m4a), MPEG-4 SLS, MPEG-4 ALS, MPEG-4 DST,
Windows Media Audio Lossless (WMA Lossless), and Shorten (SHN).
 Formats with lossy compression, such as MP3, Vorbis, Musepack, AAC, ATRAC and
Windows Media Audio Lossy (WMA lossy)

2.9 Spectral density


In statistical signal processing and physics, the spectral density, power spectral density (PSD), or
energy spectral density (ESD), is a positive real function of a frequency variable associated with
a stationarystochastic process, or a deterministic function of time, which has dimensions of
power per hertz (Hz), or energy per hertz. It is often called simply the spectrum of the signal.
Intuitively, the spectral density measures the frequency content of a stochastic process and helps
identify periodicities.

36
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.9.1Power spectral density

The above definitions of energy spectral density require that the Fourier transforms of the signals
exist, that is, that the signals are integrable/summable or square-integrable/square-summable.
(Note: The integral definition of the Fourier transform is only well-defined when the function is
integrable. It is not sufficient for a function to be simply square-integrable. In this case one
would need to use the Plancherel theorem.) An often more useful alternative is the power
spectral density (PSD), which describes how the power of a signal or time series is distributed
with frequency. Here power can be the actual physical power, or more often, for convenience
with abstract signals, can be defined as the squared value of the signal, that is, as the actual
power dissipated in a purely resistive load if the signal were a voltage applied across it.

2.9.1.1 Properties of the power spectral density

1. spectrum of a real valued process is symmetric:


2. continuous and differentiable on [-1/2, +1/2]
3. derivative is zero at f = 0
4. auto-covariance can be reconstructed by using the Inverse Fourier transform
5. Describes the distribution of variance across time scales. In particular
6. is a linear function of the auto-covariance function

The concept and use of the power spectrum of a signal is fundamental in electrical engineering,
especially in communication systems, including radio communications, radars, and related
systems, plus passive [remote sensing] technology. Much effort has been expended and millions
of dollars spent on developing and producing electronic instruments called "spectrum analyzers"
for aiding electrical engineers and technicians in observing and measuring the power spectra of
signals. The cost of a spectrum analyzer varies depending on its frequency range, its bandwidth
(signal processing), and its accuracy. The higher the frequency range (S-band, C-band, X-band,
Ku-band, K-band, Ka-band, etc.), the more difficult the components are to make, and the more
expensive the spectrum analyzer is. Also, the wider the bandwidth that a spectrum analyzer
possesses, the more costly that it is, and the capability for more accurate measurements increases
costs as well.

37
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
The spectrum analyzer measures the magnitude of the short-time Fourier transform (STFT) of an
input signal. If the signal being analyzed can be considered a stationary process, the STFT is a
good smoothed estimate of its power spectral density.

2.10 Frequency response

Is the quantitative measure of the output spectrum of a system or device in response to a


stimulus, and is used to characterize the dynamics of the system. It is a measure of magnitude
and phase of the output as a function of frequency, in comparison to the input. In simplest terms,
if a sine wave is injected into a system at a given frequency, a linear system will respond at that
same frequency with a certain magnitude and a certain phase angle relative to the input. Also for
a linear system, doubling the amplitude of the input will double the amplitude of the output. In
addition, if the system is time-invariant, then the frequency response also will not vary with time.

Two applications of frequency response analysis are related but have different objectives. For an
audio system, the objective may be to reproduce the input signal with no distortion. That would
require a uniform (flat) magnitude of response up to the bandwidth limitation of the system, with
the signal delayed by precisely the same amount of time at all frequencies. That amount of time
could be seconds, or weeks or months in the case of recorded media. In contrast, for a feedback
apparatus used to control a dynamical system, the objective is to give the closed-loop system
improved response as compared to the uncompensated system. The feedback generally needs to
respond to system dynamics within a very small number of cycles of oscillation (usually less
than one full cycle), and with a definite phase angle relative to the commanded control input. For
feedback of sufficient amplification, getting the phase angle wrong can lead to instability for an
open-loop stable system, or failure to stabilize a system that is open-loop unstable. Digital filters
may be used for both audio systems and feedback control systems, but since the objectives are
different, generally the phase characteristics of the filters will be significantly different for the
two applications.

2.11 Transient response


In electrical engineering and mechanical engineering, a transientresponse or natural response is
the response of a system to a change from equilibrium. The transient response is not necessarily
tied to "on/off" events but to any event that affects the equilibrium of the system. The impulse

38
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
response and step response are transient responses to a specific input (an impulse and a step,
respectively).

2.12 Damping
The response can be classified as one of three types of damping that describes the output in
relation to the steady-state response.

An under damped response is one that oscillates within a decaying envelope. The more under
damped the system, the more oscillations and longer it takes to reach steady-state. Here damping
ratio is always <1.

A critically damped response is the response that reaches the steady-state values the fastest
without being under damped. It is related to critical points in the sense that it straddles the
boundary of under damped and over damped responses. Here, damping ratio is always equal to
one. There should be no oscillation about the steady state value in the ideal case.

An over damped response is the response that does not oscillate about the steady-state value but
takes longer to reach than the critically damped case. Here damping ratio is >1

2.13 System Poles and Zeros


The transfer function provides a basis for determining important system response characteristics
Without solving the complete differential equation. As defined, the transfer function is a rational
Function in the complex variable s = σ + jω,
It is often convenient to factor the polynomials in the numerator and denominator, and to write
the transfer function in terms of those factors.

2.14 Impulse response


In signal processing, the impulse response, or impulse response function (IRF), of a dynamic
system is its output when presented with a brief input signal, called an impulse. More generally,
an impulse response refers to the reaction of any dynamic system in response to some external
change. In both cases, the impulse response describes the reaction of the system as a function of
time (or possibly as a function of some other independent variable that parameterizes the
dynamic behavior of the system).

39
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
2.14.1 Practical applications

In practical systems, it is not possible to produce a perfect impulse to serve as input for testing;
therefore, a brief pulse is sometimes used as an approximation of an impulse. Provided that the
pulse is short enough compared to the impulse response, the result will be close to the true,
theoretical, impulse response. In many systems, however, driving with a very short strong pulse
may drive the system into a nonlinear regime, so instead the system is driven with a pseudo-
random sequence, and the impulse response is computed from the input and output signals.

2.14.2 Loudspeakers

An application that demonstrates this idea was the development of impulse response loudspeaker
testing in the 1970s. Loudspeakers suffer from phase inaccuracy, a defect unlike other measured
properties such as frequency response. Phase inaccuracy is caused by (slightly) delayed
frequencies/octaves that are mainly the result of passive cross overs (especially higher order
filters) but are also caused by resonance, energy storage in the cone, the internal volume, or the
enclosure panels vibrating. Measuring the impulse response, which is a direct plot of this "time-
smearing," provided a tool for use in reducing resonances by the use of improved materials for
cones and enclosures, as well as changes to the speaker crossover. The need to limit input
amplitude to maintain the linearity of the system led to the use of inputs such as pseudo-random
maximum length sequences, and to the use of computer processing to derive the impulse
response.

2.15 Step response


The step response of a system in a given initial state consists of the time evolution of its outputs
when its control inputs are Heaviside step functions. In electronic engineering and control
theory, step response is the time behavior of the outputs of a general system when its inputs
change from zero to one in a very short time. The concept can be extended to the abstract
mathematical notion of a dynamical system using an evolution parameter.

From a practical standpoint, knowing how the system responds to a sudden input is important
because large and possibly fast deviations from the long term steady state may have extreme
effects on the component itself and on other portions of the overall system dependent on this
component. In addition, the overall system cannot act until the component's output settles down

40
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
to some vicinity of its final state, delaying the overall system response. Formally, knowing the
step response of a dynamical system gives information on the stability of such a system, and on
its ability to reach one stationary state when starting from another.

Figure 13: STEP RESPONSE

CHAPTER THREE

3 Design and simulation


3.1Designing of filter:
1) On analyzing the spectrogram of audio signal the noise and message signal can be
distinguished in terms of frequency.
2) Now the less intensive part of the audio signal is clipped off by using filters of particular
frequency band.
It is necessary to choose a suitable frequency range in order to design basic types of filters like
low pass, High pass, band pass and stop band filters. Table 1 indicates the frequency
specification for designing various types of IIR filter.

41
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
Table 1: Frequency specification of filter design

3.2 WORKING STEPS


1)There are basically three files named first, filter file, filtered sound. Each of them consists
of m-file and figure file.
2) Now open these files in the matlab individually in the order as given above.
3) Now run the first file. A graphical window will open as shown below.
4) Upload the sound in the format .wav in the given window
5) Listen the sound which will appear to be noisy.
6) Study three graphs of the noisy sound namely spectrogram power, spectral density and
amplitude vs time. Analyze these graphs carefully to remove the noise.

Figure 14:audio signal filtering

7) Click on the filter sound button then a new window will open named filter sound.
8) Now choose the desired filter for de noising and enter its various parameters namely type,
order, passband frequency, stopband frequency, passband ripple and stopband ripple.
9) Now click on ok than a new window filtered sound will open.

42
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 15: specification of filters

10) This window shows filtered sound along with the graphs and various details about the
filters like transfer function,step,impulse and frequency response.

Figure 16:filtered graph

After this we get different results depends on the different IIR filters. Which are
Butterworth, chebyshev and elliptical filters.

43
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

CHAPTER FOUR

4 RESULT AND DESICCATION


4.1 RESULT
As we have seen in chapter three the steps design and simulation by taking the specified
frequencies we have got a filtered sound and output graphs of: Pole zero plot, step response,
frequency response and impulse response, Now we will see these graphs below.

Fig.16, 17, 18 and 19 shows the impulse response, magnitude response, phase response, pole
zero plots and the output spectrum of the Butterworth low pass, high pass, band pass and band
stop filter respectively. The pass band and stop band ripple are 2 and 35 respectively.

44
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 17:Lowpass Butterworth filter

45
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 18:High pass Butterworth filter

46
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 19: Band pass Butterworth filter

47
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

Figure 20: Band stop Butterworth filter

48
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
4.2 DESICCATION BASED ON THE SIMULATION
Low Pass filter has pure poles. All other filters have complementary zeros. But, Butterworth LPF
has complex poles. An important property of the Butterworth filter is the gain flatness in the
passband. It has a realistically good phase response. Butterworth filter has a poor roll-off rate.

On the other hand Chebyshev has a better (steeper) roll-off rate because the ripple increases.
Chebyshev filters have a poor phase response. The transfer function of a Chebyshev filter is
characterized by a number of ripples in the passband .It has a smaller transition region than the
same order Butterworth filter, at the expense of ripples in its pass band. Chebyshev type I filter
minimizes the height of the maximum ripple. For the same filter order, the stopband attenuation
is higher for the Chebyshev filter.

Compared to a Butterworth filter, a Chebyshev-I filter can achieve a sharper transition between
the passband and the stopband with a lower order filter. The sharp transition between the
passband and the stopband of a Chebyshev filter produces smaller absolute errors as well as
faster execution speeds than a Butterworth filter. But it does not a good performance for speech
signal analysis.

The phase response is very non-linear. Elliptic filters offer steepest roll-off characteristics than
Butterworth or Chebyshev I filter, but are equiripple in both the pass- and stopband. Elliptic filter
has a shorter transition region than the Chebyshev type I filter .The main reason is that it allows
ripple in both the stop band and pass band. It is the addition of zeros in the stop band that causes
ripples in the stop band.

From this thesis we have understand elliptical and Butterworth band stop filter have better
performance for speech signal analysis i.e. voice signal can be smoothly listened.

49
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

CHAPTER FIVE

5 CONCLUSION AND RECOMMENDATION


5.1 conclusions:

The different filters with different frequencies are used to remove noise.It can be concluded that
for different center frequencies, order of the filter always remains same. By changing its center
frequencies filters are being tuned to different frequencies. We have designed Butterworth filter,
Chebyshev filter type-1 and Elliptic filter to remove the noise.

Beside the mathematical comparison among Butterworth Chebyshev type 1 and elliptic filter, in
this project, these filters have also been encountered with the designed low pass, high pass, band
pass and band stop infinite impulse response filter with a view to comparing their responses for
different parameters like impulse response, magnitude response, phase response and pole zero
characteristics all done using MATLAB simulation. The filter order, passband and stopband
ripple are considered for the design of the IIR filter. It has been found that the Butterworth filter
is the best compromise between attenuation and phase response. It has no ripple in the pass band
or the stop band. The speech signals have also been encountered using MATLAB simulation,
which was the special consideration, and compared the input and output spectrum of the signal.

5.2 Recommendation:

5.2.1 Recommendation for the school:


We will like to recommend our school in different ways:

1. We have no enough time to complete the thesis.


2. We have not get materials to do this thesis.

So, the school must think over this because to get more knowledge about our tittle we must refer
different websites, books and some related works so to do this two month is not enough. If
possible the title must be given in first semester in order to take deep study over it.

And the second one cost, the school must help the students in print and copy. If cannot we must
submit only the original one. It is difficult to add two copies for three students.

50
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

6. REFERENCES

[1] Roshahliza M. Ramli, Ali O. Abid Noor, and Salina Abdul Samad ―A Review of Adaptive
Line Enhancers for Noise Cancellation‖ Australian Journal of Basic and Applied Sciences, 6(6):
337-352, 2012 ISSN 1991-8178.
[2] Anju , MamtaKatiyar ―Design of Butterworth and Chebyshev1 Lowpass Filter for
Equalized Group Delay‖ International Journal of Advanced Research in Computer Science and
Software Engineering, Volume 2, Issue 5, ISSN: 2277 128X, May 2012.
[3] ChakrabortySubhadeep, etl. ―Design of IIR Digital Highpass Butterworth Filter using
Analog to Digital Mapping Technique‖ International Journal of Computer Applications (0975 –
8887) Volume 52 – No. 7, August 2012.
[4] PrabhakarSujata, etl. ―Characteristics of Tunable Digital Filters‖ International Journal of
Advanced Research in Computer Science and Software Engineering, Volume 3, ISSN: 2277
128X, Issue 8, August 2013.
[5] Eric Martin ―Audio denoising algorithm with block thresholding‖ Published in Image
Processing on Line, ISSN 2105-1232, July 2012.
[6] Samarjeet Singh and Uma Sharma, ―Matlab based Digital IIR filter design‖, International
Journal of Electronics and Computer Science Engineering, Vol. 01, No. 01,ISSN 2277-1956,
pp.74-83.

[7] Proakis, J. G. and Manolakis, D. G. 2007. Digital Signal Processing: Principles, Algorithms,
and Applications. Pearson Education Ltd.

[8] Amar Palacherla, Microchip Technology Inc, ―Implementing IIR Digital Filters‖, Microchip
Technology Inc.

[9] Yasunori Sugita and Toshinori Yoshikawa, ―Design of Stable IIR Digital Filters with
Specified Group Delay Errors‖, International Journal of Information and Communication
Engineering 6:1 2010

[10] R.A.Barapate, J.S.Katre ―Digital Signal Processing‖, Tech-Max January 2008 (Second
revised edition).

51
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

7. APPENDIX
Appendix 1: Code of first file

Function varargout = first(varargin)


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @first_OpeningFcn, ...
'gui_OutputFcn', @first_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
ifnargin&&ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

ifnargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before first is made visible.


functionfirst_OpeningFcn(hObject, eventdata, handles, varargin)
handles.fileLoaded = 0;
handles.SelectedFilter = 0;
handles.output = hObject;

% Update handles structure

52
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
guidata(hObject, handles);

% UIWAIT makes first wait for user response (see UIRESUME)


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
functionvarargout = first_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;

% --- Executes on button press in load.


functionload_Callback(hObject, eventdata, handles)

[FileName,PathName] = uigetfile({'*.wav'},'Load Wav File');


[x,Fs] = wavread([PathName '/' FileName]);
handles.x=x;
handles.Fs = Fs;
assignin('base','x',x);
assignin('base','Fs',Fs);
axes(handles.signaltime);
plot(handles.x);
xlabel('Time'); ylabel('Amplitude');
axes(handles.signalpsd);
Pxx = periodogram(handles.x);
Hpsd = dspdata.psd(Pxx,'Fs',handles.Fs); % Create PSD data object
plot(Hpsd);
ylabel('db/Hz');
axes(handles.signalspec);
specgram(handles.x, 1024, handles.Fs);
title('Signal Spectrogram');

53
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
handles.fileLoaded = 1;
guidata(hObject, handles);
% --- Executes on button press in filterselect.
functionfilterselect_Callback(hObject, eventdata, handles)

filterfile(handles);

% --- Executes on button press in playsignal.


functionplaysignal_Callback(hObject, eventdata, handles)

if (handles.fileLoaded==1)
sound(handles.x, handles.Fs);
end
Appendix 2: Code of the second function
functionvarargout = filterfile(varargin)

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @filterfile_OpeningFcn, ...
'gui_OutputFcn', @filterfile_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
ifnargin&&ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

ifnargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

54
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before filterfile is made visible.


functionfilterfile_OpeningFcn(hObject, eventdata, handles, varargin)

% Choose default command line output for filterfile

handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% --- Outputs from this function are returned to the command line.
functionvarargout = filterfile_OutputFcn(hObject, eventdata, handles)

% Get default command line output from handles structure


varargout{1} = handles.output;

% --- Executes on selection change in algotype.


functionalgotype_Callback(hObject, eventdata, handles)

% Hints: contents = get(hObject,'String') returns algotype contents as cell array


% contents{get(hObject,'Value')} returns selected item from algotype

55
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
s=1;
s = get(hObject,'Value');
assignin('base','s',s);
handles.s=s;
switch(s)
case(1)
set(handles.pass,'Enable','off');
set(handles.pr,'Enable','off');
set(handles.stop,'Enable','off');
set(handles.sr,'Enable','off');
case(2)
set(handles.pass,'Enable','on');
set(handles.pr,'Enable','on');
set(handles.stop,'Enable','off');
set(handles.sr,'Enable','off');
otherwise
set(handles.pass,'Enable','on');
set(handles.pr,'Enable','on');
set(handles.stop,'Enable','on');
set(handles.sr,'Enable','on');
end
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
functionalgotype_CreateFcn(hObject, eventdata, handles)

% Hint: popupmenu controls usually have a white background on Windows.

ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

56
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
% --- Executes on selection change in filtertype.
functionfiltertype_Callback(hObject, eventdata, handles)

% Hints: contents = get(hObject,'String') returns filtertype contents as cell array


% contents{get(hObject,'Value')} returns selected item from filtertype
s1=1;
s1 = get(hObject,'Value');
handles.s1=s1;
switch(s1)
case(1)
set(handles.low,'Enable','on');
set(handles.lf,'Enable','on');
set(handles.high,'Enable','off');
set(handles.hf,'Enable','off');
case(2)
set(handles.high,'Enable','on');
set(handles.hf,'Enable','on');
set(handles.low,'Enable','off');
set(handles.lf,'Enable','off');
otherwise
set(handles.high,'Enable','on');
set(handles.hf,'Enable','on');
set(handles.low,'Enable','on');
set(handles.lf,'Enable','on');
end
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
functionfiltertype_CreateFcn(hObject, eventdata, handles)

% Hint: popupmenu controls usually have a white background on Windows.

57
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on selection change in order.


functionorder_Callback(hObject, eventdata, handles)

% Hints: contents = get(hObject,'String') returns order contents as cell array


% contents{get(hObject,'Value')} returns selected item from order

ord = get(hObject,'Value');
handles.ord=ord;

guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
functionorder_CreateFcn(hObject, eventdata, handles)

% Hint: popupmenu controls usually have a white background on Windows.

ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in okbutton.


functionokbutton_Callback(hObject, eventdata, handles)

final=(handles.s*10)+handles.s1;

58
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
handles.final=final;
Fs = evalin('base', 'Fs');
handles.Fs=Fs;
switch(final)
case(11)
fpass = str2num(get(handles.lf,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=butter(n,wn,'low');

case(12)
fpass = str2num(get(handles.hf,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=butter(n,wn,'high');
case(13)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;
[b,a]=butter(n,[wpws],'bandpass');

case(14)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;
[b,a]=butter(n,[wpws],'stop');
case(21)

59
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
fpass = str2num(get(handles.lf,'String'));
r=str2num(get(handles.pass,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=cheby1(n,r,wn,'low');

case(22)
fpass = str2num(get(handles.hf,'String'));
r=str2num(get(handles.pass,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=cheby1(n,r,wn,'high');
case(23)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
r=str2num(get(handles.pass,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;
[b,a]=cheby1(n,r,[wpws],'bandpass');

case(24)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
r=str2num(get(handles.pass,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;
[b,a]=cheby1(n,r,[wpws],'stop');
case(31)
fpass = str2num(get(handles.lf,'String'));

60
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
rp=str2num(get(handles.pass,'String'));
rs=str2num(get(handles.stop,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=ellip(n,rp,rs,wn,'low');

case(32)
fpass = str2num(get(handles.hf,'String'));
rp=str2num(get(handles.pass,'String'));
rs=str2num(get(handles.stop,'String'));
n=handles.ord +1;
wn=fpass*2/handles.Fs;
[b,a]=ellip(n,rp,rs,wn,'high');
case(33)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
rp=str2num(get(handles.pass,'String'));
rs=str2num(get(handles.stop,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;
[b,a]=ellip(n,rp,rs,[wpws],'bandpass');

case(34)
fpass = str2num(get(handles.lf,'String'));
fstop = str2num(get(handles.hf,'String'));
rp=str2num(get(handles.pass,'String'));
rs=str2num(get(handles.stop,'String'));
n=handles.ord +1;
wp=fpass*2/handles.Fs;
ws=fstop*2/handles.Fs;

61
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
[b,a]=ellip(n,rp,rs,[wpws],'stop');
end
x = evalin('base', 'x');
handles.x=x;
x1=filter(b,a,handles.x);
assignin('base','x1',x1);
assignin('base','b',b);
assignin('base','a',a);
guidata(hObject, handles);
filterdsound(handles);
functionlf_Callback(hObject, eventdata, handles)

% Hints: get(hObject,'String') returns contents of lf as text


% str2double(get(hObject,'String')) returns contents of lf as a double

% --- Executes during object creation, after setting all properties.


functionlf_CreateFcn(hObject, eventdata, handles)

% Hint: edit controls usually have a white background on Windows.

ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

functionhf_Callback(hObject, eventdata, handles)

% Hints: get(hObject,'String') returns contents of hf as text

62
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
% str2double(get(hObject,'String')) returns contents of hf as a double

% --- Executes during object creation, after setting all properties.


functionhf_CreateFcn(hObject, eventdata, handles)

% Hint: edit controls usually have a white background on Windows.

ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

functionpass_Callback(hObject, eventdata, handles)

% Hints: get(hObject,'String') returns contents of pass as text


% str2double(get(hObject,'String')) returns contents of pass as a double

% --- Executes during object creation, after setting all properties.


functionpass_CreateFcn(hObject, eventdata, handles)

% Hint: edit controls usually have a white background on Windows.

ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

63
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
functionstop_Callback(hObject, eventdata, handles)

% Hints: get(hObject,'String') returns contents of stop as text


% str2double(get(hObject,'String')) returns contents of stop as a double
% --- Executes during object creation, after setting all properties.
functionstop_CreateFcn(hObject, eventdata, handles)

% Hint: edit controls usually have a white background on Windows.

Ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
Appendix 3:The third function code

Functionvarargout = filter sound (varargin)

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @filterdsound_OpeningFcn, ...
'gui_OutputFcn', @filterdsound_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
ifnargin&&ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

ifnargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});

64
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
end
% End initialization code - DO NOT EDIT

% --- Executes just before filterdsound is made visible.


functionfilterdsound_OpeningFcn(hObject, eventdata, handles, varargin)

% Choose default command line output for filterdsound


handles.output = hObject;

x1 = evalin('base', 'x1');
handles.x1=x1;
Fs = evalin('base', 'Fs');
handles.Fs=Fs;
b=evalin('base', 'b');
handles.b=b;
a=evalin('base', 'a');
handles.a=a;
s=evalin('base', 's');

axes(handles.soundpsd);
Pxx = periodogram(handles.x1);
Hpsd = dspdata.psd(Pxx,'Fs',handles.Fs); % Create PSD data object
plot(Hpsd);

axes(handles.soundtime);
plot(handles.x1);
xlabel('Time'); ylabel('Amplitude');

65
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
axes(handles.soundspec);
specgram(handles.x1, 1024, handles.Fs);
title('Signal Spectrogram');

switch(s)
case(1)
set(handles.chebydis,'Visible','off');
set(handles.cheby,'Visible','off');
set(handles.ellipticdis,'Visible','off');
set(handles.elliptic,'Visible','off');
case(2)
set(handles.butterdis,'Visible','off');
set(handles.butter,'Visible','off');
set(handles.ellipticdis,'Visible','off');
set(handles.elliptic,'Visible','off');
case(3)
set(handles.chebydis,'Visible','off');
set(handles.cheby,'Visible','off');
set(handles.butterdis,'Visible','off');
set(handles.butter,'Visible','off');
end

% Update handles structure


guidata(hObject, handles);

% --- Outputs from this function are returned to the command line.
functionvarargout = filterdsound_OutputFcn(hObject, eventdata, handles)

% Get default command line output from handles structure

66
NOISE REDUCTION IN AUDIO SIGNAL 2014/15
varargout{1} = handles.output;

% --- Executes on button press in FILTEREED SOUND.


functionnoisysound_Callback(hObject, eventdata, handles)

sound(handles.x1,handles.Fs);

% --- Executes on button press in impulseresponse.


functionimpulseresponse_Callback(hObject, eventdata, handles)
figure(1);
impz(handles.b,handles.a);
xlim([0 200]);

% --- Executes on button press in pzplot.


functionpzplot_Callback(hObject, eventdata, handles)
figure(2);
zplane(handles.b,handles.a);

% --- Executes on button press in freqresponse.


functionfreqresponse_Callback(hObject, eventdata, handles)
figure(3);
freqz(handles.b,handles.a,128,handles.Fs);

% --- Executes on button press in stepresponse.


functionstepresponse_Callback(hObject, eventdata, handles)

figure(4);
stepz(handles.b,handles.a);

67
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

68
NOISE REDUCTION IN AUDIO SIGNAL 2014/15

69

You might also like