audio signal processing using matlab

Upload: -

Post on 26-Feb-2018

261 views

Category:

Documents


2 download

TRANSCRIPT

  • 7/25/2019 Audio signal processing using MATLAB

    1/30

    WINTER TRAINING

    Project Report

    STUDY OF COMMUNICATION SYSTEM

    OF ONGC

    Submitted by

    RAJATSUBHRA KAR

    WINTER TRAINEE

    Under the guidance of:

    Mr. Sukesh Debbarma

    Chie E!"i!eer E#T

    ONGC Trip$r% A&&et

    Dep%rt'e!t o E(ectro!ic& # Co''$!ic%tio! E!"i!eeri!"

    N%tio!%( I!&tit$te o Tech!o(o")* A"%rt%(%

    Trip$r%+,--./0

    RAJATSUBHRA KAR

  • 7/25/2019 Audio signal processing using MATLAB

    2/30

    WINTER TRAINING

    Ac1!o2(e3"e'e!t

    I would like to express my deep sense o !r"titude "nd sin#ere t$"nks to

    my pro%e#t !uide &r' Anir("nB$"tt"#$er%ee or $is #ontinuous support "nd

    en#our"!ement t$rou!$out t$is period' His meti#ulous "ppro"#$ in

    de"lin! wit$ #omplex pro(lem "nd #riti#"l #omments "t e"#$ st"!e $elped

    me to m"ke t$is pro%e#t " re"l su##ess' Espe#i"lly sir)s !uid"n#e "t e"#$

    step m"de me eel "s i t$is period w"s %ust " #"ke w"lk' He w"s re"llyin*ol*ed wit$ t$is pro%e#t "nd !"*e $is input "t "ll rele*"nt situ"tions' He

    "llowed me to inno*"ti*e wit$ my ide"s "s $e ne*er tried to impose $is

    ide"s on me or#i(ly' I would "lso like to #on*ey my $e"rtelt t$"nks or

    o+erin! me t$is opportunity to undert"ke t$is pro%e#t' Wit$out $im it

    would not $"*e (een possi(le or me to undert"ke t$is pro%e#t' I would like

    to (estow " sin#ere round o !r"titude to $im' T$e $e"rty support o t$e

    institute, N"tion"l institute o Te#$nolo!y- A!"rt"l" is $i!$ly soli#ited'

    T$e (lessin!s o my lo*in! p"rents rem"ined wit$ me t$rou!$out t$is

    period' T$eir #ontinuous en#our"!ement m"de me eel #omort"(le e*ery

    time I r"n into " (it o dis"rr"y' I s$"ll #"rry t$e "+e#tion "nd (lessin!s o

    &r' Anir("nB$"tt"#$"r%ee t$rou!$out my lie' He $"s re"lly (een "n

    epitome o $"rd work- dedi#"tion "nd moti*"tion' His in*ol*ement $"s

    re"lly s$own me t$e w"y to su##eed'T$e list is re"lly unendin! "nd t$ere

    "re m"ny ot$ers w$o $elped me t$rou!$ e"#$ "nd e*ery w"lk o t$is

    pro%e#t "nd en"(led me to #omplete it in " soot$in! "nd #omortin! w"y'

    T$is period $"s re"lly (een .uite entert"inin! "nd en%oy"(le' /"st (ut not

    le"st I would like to t$"nk t$e Almi!$ty or "lw"ys s$owerin! $is (lessin!s

    on me w$i#$ en"(led me to #omplete t$is pro%e#t'

    RAJATSUBHRA KAR

  • 7/25/2019 Audio signal processing using MATLAB

    3/30

    WINTER TRAINING

    ABSTRACT

    Audio signal processing is an engineering field that focuses on the computational

    methods for intentionally altering sounds, methods that are used in many musical

    applications.

    Here is an overview where everyone can play with audio signals while going deep

    into several signal processing topics. We focus on the spectral processing

    techniques of relevance for the description and transformation of sounds, developing

    the basic theoretical and practical knowledge with which to analyze, synthesize,

    transform and describe audio signals in the context of music applications.

    The course is based on open software and content. The demonstrations and

    programming exercises are done using Matlab, which is a property of mathworks and

    the references and materials for the course come from open online repositories and

    some digital signal processing books.

    RAJATSUBHRA KAR

  • 7/25/2019 Audio signal processing using MATLAB

    4/30

    WINTER TRAINING

    CONTENTS

    Goal

    Objective

    Signals

    o Introduction

    o Audio Signalso Signal Processing

    o Noise

    o Additive White Gaussian Noise

    o igital !iltering

    o "utter#orth !ilter

    o Wiener !ilter

    o Audio Signal noise removal using Wiener !ilter

    o Simulation $esult

    %onclusion and !uture Wor&s

    $eference

    RAJATSUBHRA KAR

  • 7/25/2019 Audio signal processing using MATLAB

    5/30

    WINTER TRAINING

    Go%(

    'he goal of this thesis is to study the nature of audio signals( Analy)ing the audio signal in

    fre*uency domain( Study its distinct characteristics and study its behavior under the

    a++lication of different digital filters(

    O4jecti5e

    ,ere our objective is to add an Additive White Gaussian Noise to an audio signal and then

    reconstruct the signal using Wiener !ilter(

    Si"!%(&

    A &i"!%(as referred to in communication systems- signal +rocessing- and electrical

    engineering .is a function that conveys information about the behavior or attributes

    of some +henomenon.( In the +hysical #orld- any *uantity e/hibiting variation in

    time or variation in s+ace 0such as an image1 is +otentially a signal that might

    +rovide information on the status of a +hysical system- or convey a message

    bet#een observers- among other +ossibilities( 'heIEEE Transactions on Signal

    Processingstates that the term .signal. includes audio- video- s+eech- image-communication- geo+hysical- sonar- radar- medical and musical signals(

    Other e/am+les of signals are the out+ut of a thermocou+le- #hich conveys

    tem+erature information- and the out+ut of a +, meter #hich conveys acidity

    information( 'y+ically- signals are often +rovided by a sensor- and often the

    original form of a signal is converted to another form of energy using a transducer(

    !or e/am+le- a micro+hone converts an acoustic signal to a voltage #aveform- and

    a s+ea&er does the reverse(

    0

  • 7/25/2019 Audio signal processing using MATLAB

    6/30

    WINTER TRAINING

    Analog and digital signals

    '#o main ty+es of signals encountered in +ractice are analogand digital( 'he

    figure sho#s a digital signal that results from a++ro/imating an analog signal by its

    values at +articular time instants( igital signals are discreteand quantized- #hile

    analog signals +ossess neither +ro+erty(

    igital signals often arise via sam+ling of analog signals- for e/am+le- a

    continually fluctuating voltage on a line that can be digiti)ed by an analog2to2

    digital converter circuit- #herein the circuit #ill read the voltage level on the line-

    say- every 34 microseconds and em+loying a fi/ed number of bits( 'he resulting

    stream of numbers is stored as digital data on a discrete2time and *uanti)ed2am+litude signal( %om+uters and other digital devices are restricted to discrete

    time(

    Time discretizationOne of the fundamental distinctions bet#een different ty+es of signals is

    bet#een continuous and discrete time( In the mathematical abstraction- the domain

    of a continuous2time 0%'1 signal is the set of real numbers 0or some interval

    thereof1- #hereas the domain of a discrete2time 0'1 signal is the setof integers0or some interval1( What these integers re+resent de+ends on the nature

    of the signal5 most often it is time(

    1

    https://en.wikipedia.org/wiki/Integerhttps://en.wikipedia.org/wiki/Integer
  • 7/25/2019 Audio signal processing using MATLAB

    7/30

    WINTER TRAINING

    2is#rete3time si!n"l #re"ted rom " #ontinuous si!n"l (y s"mplin!

    2i!it"l si!n"l resultin! rom "pproxim"tion to "n "n"lo! si!n"l-

    w$i#$ is " #ontinuous un#tion o time

    If for a signal- the *uantities are defined only on a discrete set of times- #e call it

    a discrete2time signal( A sim+le source for a discrete time signal is the sam+lingof

    a continuous signal- a++ro/imating the signal by a se*uence of its values at

    +articular time instants(

    A discrete2time real 0or com+le/1 signal can be seen as a function from 0a subset

    of1 the set of integers 0the inde/ labeling time instants1 to the set

    of real0or com+le/1 numbers 0the function values at those instants1(

    A continuous2time real 0or com+le/1 signal is any real2valued 0or com+le/2

    valued1 function#hich is defined at every time tin an interval- most commonly an

    infinite interval(

    Amplitude quantizationIf a signal is to be re+resented as a se*uence of numbers- it is im+ossible to

    maintain arbitrarily high +recision 2 each number in the se*uence must have a

    finite number of digits( As a result- the values of such a signal are restricted to

    belong to a finite set5 in other #ords- it is *uanti)ed( 6uanti)ation is the +rocess of

    converting a continuous analog audio signal to a digital signal #ith discrete

    numerical values(

    Examples of signalsSignals in nature can be converted to electronic signals by various sensors( Some

    e/am+les are:

    4

    https://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Discrete-time_signalhttps://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Real_numbershttps://en.wikipedia.org/wiki/Complex_numbershttps://en.wikipedia.org/wiki/Mathematical_functionhttps://en.wikipedia.org/wiki/Finite_sethttps://en.wikipedia.org/wiki/Quantization_(signal_processing)https://en.wikipedia.org/wiki/Sensorhttps://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Discrete-time_signalhttps://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Real_numbershttps://en.wikipedia.org/wiki/Complex_numbershttps://en.wikipedia.org/wiki/Mathematical_functionhttps://en.wikipedia.org/wiki/Finite_sethttps://en.wikipedia.org/wiki/Quantization_(signal_processing)https://en.wikipedia.org/wiki/Sensor
  • 7/25/2019 Audio signal processing using MATLAB

    8/30

    WINTER TRAINING

    Motion, T$e motion o "n o(%e#t #"n (e #onsidered to (e "

    si!n"l- "nd #"n (e monitored (y *"rious sensors to pro*ideele#tri#"l si!n"ls' 5or ex"mple- r"d"r#"n pro*ide "nele#trom"!neti# si!n"l or ollowin! "ir#r"t motion' A

    motion si!n"l is one3dimension"l 6time7- "nd t$e r"n!e is!ener"lly t$ree3dimension"l' 8osition is t$us " 43*e#torsi!n"l9 position "nd orient"tion o " ri!id (ody is " :3*e#torsi!n"l' ;rient"tion si!n"ls #"n (e !ener"ted usin!" !yros#ope'

    Sound, Sin#e " sound is " *i(r"tiono " medium 6su#$ "s

    "ir7- " sound si!n"l "sso#i"tes " pressure*"lue to e*ery*"lue o time "nd t$ree sp"#e #oordin"tes' A sound si!n"l is#on*erted to "n ele#tri#"l si!n"l (y " mi#rop$one-!ener"tin! " *olt"!esi!n"l "s "n "n"lo! o t$e sound si!n"l-m"kin! t$e sound si!n"l "*"il"(le or urt$er si!n"lpro#essin!' Sound si!n"ls #"n (e s"mpled"t " dis#rete seto time points9 or ex"mple- #omp"#t dis#s6

  • 7/25/2019 Audio signal processing using MATLAB

    9/30

    WINTER TRAINING

    Biolo!i#"l membrane potentials, T$e *"lue o t$e si!n"l is

    "n ele#tri# potenti"l6C*olt"!eC7' T$e dom"in is more diD#ultto est"(lis$' Some #ellsor or!"nelles$"*e t$e s"memem(r"ne potenti"l t$rou!$out9 neurons!ener"lly $"*e

    di+erent potenti"ls "t di+erent points' T$ese si!n"ls $"*e*ery low ener!ies- (ut "re enou!$ to m"ke ner*ous systemswork9 t$ey #"n (e me"sured in "!!re!"te (y t$e te#$ni.ueso ele#trop$ysiolo!y'

    A$3io Si"!%(&

    An %$3io &i"!%(is a re+resentation of sound- ty+ically as an electrical voltage(

    Audio signals have fre*uencies in the audio fre*uencyrange of roughly 74 to

    74-444 ,) 0the limits of human hearing1( Audio signals may

    be synthesi)eddirectly- or may originate at a transducersuch as

    a micro+hone- musical instrument +ic&u+-+honogra+hcartridge- or ta+e

    head( 8ouds+ea&ersor head+honesconvert an electrical audio signal into sound(

    igital re+resentations of audio signals e/ist in a variety of formats(

    An %$3io ch%!!e(or %$3io tr%c1is an audio signal communications channelin

    a storage device- used in o+erations such as multi2trac& recordingand sound

    reinforcement(

    Digital equivalentAs much of the older analogaudio e*ui+ment has been emulatedin digitalform-

    usually through the develo+ment of audio +lug2insfor digital audio

    #or&station0AW1 soft#are- the +ath of digital information through the AW 0i(e(from an audio trac& through a +lug2in and out a hard#are out+ut1 is also called

    an audio signalorsignal flow(

    A digital audio signal being sent through #ire can use several formats

    including o+tical0AA'- 'I!1- coa/ial0S9PI!1- 8$0A;S9;"U1-

    and ;thernet(

    https://en.wikipedia.org/wiki/Membrane_potentialhttps://en.wikipedia.org/wiki/Electric_potentialhttps://en.wikipedia.org/wiki/Cell_(biology)https://en.wikipedia.org/wiki/Organellehttps://en.wikipedia.org/wiki/Neuronhttps://en.wikipedia.org/wiki/Electrophysiologyhttps://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Voltagehttps://en.wikipedia.org/wiki/Audio_frequencyhttps://en.wikipedia.org/wiki/Human_hearing_rangehttps://en.wikipedia.org/wiki/Synthesizerhttps://en.wikipedia.org/wiki/Transducerhttps://en.wikipedia.org/wiki/Microphonehttps://en.wikipedia.org/wiki/Pickup_(music_technology)https://en.wikipedia.org/wiki/Phonographhttps://en.wikipedia.org/wiki/Phonographhttps://en.wikipedia.org/wiki/Tape_headhttps://en.wikipedia.org/wiki/Tape_headhttps://en.wikipedia.org/wiki/Loudspeakerhttps://en.wikipedia.org/wiki/Headphoneshttps://en.wikipedia.org/wiki/Channel_(communications)https://en.wikipedia.org/wiki/Data_storage_devicehttps://en.wikipedia.org/wiki/Multi-track_recordinghttps://en.wikipedia.org/wiki/Sound_reinforcementhttps://en.wikipedia.org/wiki/Sound_reinforcementhttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Software_emulatorhttps://en.wikipedia.org/wiki/Digital_audiohttps://en.wikipedia.org/wiki/Audio_plug-inhttps://en.wikipedia.org/wiki/Digital_audio_workstationhttps://en.wikipedia.org/wiki/Digital_audio_workstationhttps://en.wikipedia.org/wiki/Opticalhttps://en.wikipedia.org/wiki/ADAThttps://en.wikipedia.org/wiki/TDIFhttps://en.wikipedia.org/wiki/Coaxialhttps://en.wikipedia.org/wiki/S/PDIFhttps://en.wikipedia.org/wiki/XLR_connectorhttps://en.wikipedia.org/wiki/AES/EBUhttps://en.wikipedia.org/wiki/Audio_over_Ethernethttps://en.wikipedia.org/wiki/Membrane_potentialhttps://en.wikipedia.org/wiki/Electric_potentialhttps://en.wikipedia.org/wiki/Cell_(biology)https://en.wikipedia.org/wiki/Organellehttps://en.wikipedia.org/wiki/Neuronhttps://en.wikipedia.org/wiki/Electrophysiologyhttps://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Voltagehttps://en.wikipedia.org/wiki/Audio_frequencyhttps://en.wikipedia.org/wiki/Human_hearing_rangehttps://en.wikipedia.org/wiki/Synthesizerhttps://en.wikipedia.org/wiki/Transducerhttps://en.wikipedia.org/wiki/Microphonehttps://en.wikipedia.org/wiki/Pickup_(music_technology)https://en.wikipedia.org/wiki/Phonographhttps://en.wikipedia.org/wiki/Tape_headhttps://en.wikipedia.org/wiki/Tape_headhttps://en.wikipedia.org/wiki/Loudspeakerhttps://en.wikipedia.org/wiki/Headphoneshttps://en.wikipedia.org/wiki/Channel_(communications)https://en.wikipedia.org/wiki/Data_storage_devicehttps://en.wikipedia.org/wiki/Multi-track_recordinghttps://en.wikipedia.org/wiki/Sound_reinforcementhttps://en.wikipedia.org/wiki/Sound_reinforcementhttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Software_emulatorhttps://en.wikipedia.org/wiki/Digital_audiohttps://en.wikipedia.org/wiki/Audio_plug-inhttps://en.wikipedia.org/wiki/Digital_audio_workstationhttps://en.wikipedia.org/wiki/Digital_audio_workstationhttps://en.wikipedia.org/wiki/Opticalhttps://en.wikipedia.org/wiki/ADAThttps://en.wikipedia.org/wiki/TDIFhttps://en.wikipedia.org/wiki/Coaxialhttps://en.wikipedia.org/wiki/S/PDIFhttps://en.wikipedia.org/wiki/XLR_connectorhttps://en.wikipedia.org/wiki/AES/EBUhttps://en.wikipedia.org/wiki/Audio_over_Ethernet
  • 7/25/2019 Audio signal processing using MATLAB

    10/30

    WINTER TRAINING

    A$3io Si"!%( Proce&&i!"

    A$3io &i"!%( proce&&i!"- sometimes referred to as %$3io proce&&i!"- is the

    intentional alteration of auditorysignals- or sound- often through an %$3io

    eector effects unit( As audio signals may be electronically re+resented in

    either digitalor analogformat- signal +rocessingmay occur in either domain(

    Analog +rocessors o+erate directly on the electrical signal- #hile digital +rocessors

    o+erate mathematically on the digital re+resentation of that signal(

    Audio un+rocessed by reverb and delay is meta+horically referred to as .dry.-

    #hile +rocessed audio is referred to as .#et.(

    echo3 to simul"te t$e e+e#t o re*er(er"tion in " l"r!e $"ll

    or #"*ern- one or se*er"l del"yed si!n"ls "re "dded to t$eori!in"l si!n"l' To (e per#ei*ed "s e#$o- t$e del"y $"s to (eo order 4 millise#onds or "(o*e' S$ort o "#tu"lly pl"yin! "sound in t$e desired en*ironment- t$e e+e#t o e#$o #"n (eimplemented usin! eit$er di!it"lor "n"lo!met$ods' An"lo!e#$o e+e#ts "re implemented usin! t"pedel"ys"ndFor sprin! re*er(s' W$en l"r!e num(ers odel"yed si!n"ls "re mixed o*er se*er"l se#onds- t$eresultin! sound $"s t$e e+e#t o (ein! presented in " l"r!eroom- "nd it is more #ommonly#"lled re*er(er"tionor re*er(or s$ort'

    fanger3 to #re"te "n unusu"l sound- " del"yed si!n"l is

    "dded to t$e ori!in"l si!n"l wit$ " #ontinuously *"ri"(ledel"y 6usu"lly sm"ller t$"n 0> ms7' T$is e+e#t is now doneele#troni#"lly usin! 2S8- (ut ori!in"lly t$e e+e#t w"s

    #re"ted (y pl"yin! t$e s"me re#ordin! on two syn#$roniedt"pe pl"yers- "nd t$en mixin! t$e si!n"ls to!et$er' As lon!"s t$e m"#$ines were syn#$ronied- t$e mix would soundmore3or3less norm"l- (ut i t$e oper"tor pl"#ed $is n!er ont$e @"n!e o one o t$e pl"yers 6$en#e C@"n!erC7- t$"tm"#$ine would slow down "nd its si!n"l would "ll out3o3p$"se wit$ its p"rtner- produ#in! " p$"sin! e+e#t' ;n#e t$eoper"tor took $is n!er o+- t$e pl"yer would speed up untilits t"#$ometerw"s ("#k in p$"se wit$ t$e m"ster- "nd "s

    t$is $"ppened- t$e p$"sin! e+e#t would "ppe"r to slide up

    :

    https://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Signal_(information_theory)https://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Effects_unithttps://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Echo_(phenomenon)https://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/Analog_(signal)https://en.wikipedia.org/wiki/Delay_(audio_effect)https://en.wikipedia.org/wiki/Delay_(audio_effect)https://en.wikipedia.org/wiki/Spring_reverbhttps://en.wikipedia.org/wiki/Reverberationhttps://en.wikipedia.org/wiki/Reverberationhttps://en.wikipedia.org/wiki/Flanginghttps://en.wikipedia.org/wiki/Digital_signal_processinghttps://en.wikipedia.org/wiki/Tachometerhttps://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Signal_(information_theory)https://en.wikipedia.org/wiki/Soundhttps://en.wikipedia.org/wiki/Effects_unithttps://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Echo_(phenomenon)https://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/Analog_(signal)https://en.wikipedia.org/wiki/Delay_(audio_effect)https://en.wikipedia.org/wiki/Delay_(audio_effect)https://en.wikipedia.org/wiki/Spring_reverbhttps://en.wikipedia.org/wiki/Reverberationhttps://en.wikipedia.org/wiki/Reverberationhttps://en.wikipedia.org/wiki/Flanginghttps://en.wikipedia.org/wiki/Digital_signal_processinghttps://en.wikipedia.org/wiki/Tachometer
  • 7/25/2019 Audio signal processing using MATLAB

    11/30

    WINTER TRAINING

    t$e re.uen#y spe#trum' T$is p$"sin! up3"nd3down t$ere!ister #"n (e perormed r$yt$mi#"lly'

    phaser3 "not$er w"y o #re"tin! "n unusu"l sound9 t$e

    si!n"l is split- " portion is lteredwit$ "n "ll3p"ss ltertoprodu#e " p$"se3s$it- "nd t$en t$e unltered "nd lteredsi!n"ls "re mixed' T$e p$"ser e+e#t w"s ori!in"lly " simplerimplement"tion o t$e @"n!er e+e#t sin#e del"ys werediD#ult to implement wit$ "n"lo! e.uipment' 8$"sers "reoten used to !i*e " Csynt$esiedC or ele#troni# e+e#t ton"tur"l sounds- su#$ "s $um"n spee#$' T$e *oi#e o

  • 7/25/2019 Audio signal processing using MATLAB

    12/30

    WINTER TRAINING

    pitch shit3 t$is e+e#t s$its " si!n"l up or down in pit#$' 5or

    ex"mple- " si!n"l m"y (e s$ited "n o#t"*e up or down' T$isis usu"lly "pplied to t$e entire si!n"l- "nd not to e"#$ notesep"r"tely' Blendin! t$e ori!in"l si!n"l wit$ s$ited

    dupli#"te6s7 #"n #re"te $"rmonies rom one *oi#e' Anot$er"ppli#"tion o pit#$ s$itin! is pit#$ #orre#tion' Here "musi#"l si!n"l is tuned to t$e #orre#t pit#$ usin! di!it"lsi!n"l pro#essin! te#$ni.ues' T$is e+e#t is u(i.uitous ink"r"oke m"#$ines "nd is oten used to "ssist pop sin!ersw$o sin! out o tune' It is "lso used intention"lly or"est$eti# e+e#t in su#$ pop son!s"s

  • 7/25/2019 Audio signal processing using MATLAB

    13/30

    WINTER TRAINING

    e#$os "re $e"rd (eore t$e e+e#ted sound #re"tin! " rus$like swell pre#edin! "nd durin! pl"y("#k'Jimmy 8"!eo /edeppelinused t$is e+e#t in t$e (rid!e o CW$ole /ott" /o*eC'

    active noise control3 " met$od or redu#in! unw"nted sound

    $ave eld s!nthesis3 " sp"ti"l "udio renderin! te#$ni.ue or

    t$e #re"tion o *irtu"l "#ousti# en*ironments

    Noi&e

    In electronics- !oi&eis a random fluctuation in an electrical signal- a characteristicof all electroniccircuits(Noise generated by electronic devices varies greatly- as it

    can be +roduced by several different effects( 'hermal noiseis unavoidable at non2

    )ero tem+erature 0see fluctuation2dissi+ation theorem1- #hile other ty+es de+end

    mostly on device ty+e 0such as shot noise- #hich needs stee+ +otential barrier1 or

    manufacturing *uality and semiconductordefects- such as conductance

    fluctuations- including

  • 7/25/2019 Audio signal processing using MATLAB

    14/30

    WINTER TRAINING

    Analog dis+lay of random fluctuations in

    voltage: e(g(-+in& noise(

    ADDITI6E WHITE

    GAUSSIAN NOISE

    A33iti5e 2hite G%$&&i%! !oi&e0AWGN1 is a basic noise model used

    in Information theoryto mimic the effect of many random +rocesses that occur in

    nature( 'he modifiers denote s+ecific characteristics:

    Additive(e#"use it is "dded to "ny noise t$"t mi!$t (e

    intrinsi# to t$e inorm"tion system'

    Whitereers to t$e ide" t$"t it $"s uniorm power "#ross

    t$e re.uen#y ("nd or t$e inorm"tion system' It is "n"n"lo!y to t$e #olor w$ite w$i#$ $"s uniorm emissions "t "llre.uen#ies in t$e *isi(le spe#trum'

    Gaussian(e#"use it $"s " norm"l distri(utionin t$e time

    dom"in wit$ "n "*er"!e time dom"in *"lue o ero'

    Wideband noise comes from many natural sources- such as the thermal vibrations

    of atoms in conductors 0referred to as thermal noiseor =ohnson2Ny*uist

    noise1- shot noise-blac& body radiationfrom the earth and other #arm objects- and

    from celestial sourcessuch as the Sun( 'he central limit theoremof+robability

    theoryindicates that the summation of many random +rocesses #ill tend to have

    distribution called Gaussian or Normal(

    AWGN is often used as a channel modelin #hich the only im+airment to

    communication is a linear addition of #idebandor #hite noise#ith a

    constant s+ectral density0e/+ressed as #atts+er hert)ofband#idth1 and

    a Gaussian distributionof am+litude( 'he model does not account

    for fading- fre*uencyselectivity- interference- nonlinearityor dis+ersion(,o#ever-

    it +roduces sim+le and tractable mathematical models #hich are useful for gaining

    insight into the underlying behavior of a system before these other +henomena are

    considered(

    0>

    https://en.wikipedia.org/wiki/Pink_noisehttps://en.wikipedia.org/wiki/Information_theoryhttps://en.wikipedia.org/wiki/Information_theoryhttps://en.wikipedia.org/wiki/Visible_spectrumhttps://en.wikipedia.org/wiki/Normal_distributionhttps://en.wikipedia.org/wiki/Thermal_noisehttps://en.wikipedia.org/wiki/Johnson-Nyquist_noisehttps://en.wikipedia.org/wiki/Johnson-Nyquist_noisehttps://en.wikipedia.org/wiki/Shot_noisehttps://en.wikipedia.org/wiki/Black_bodyhttps://en.wikipedia.org/w/index.php?title=Celestial_source&action=edit&redlink=1https://en.wikipedia.org/wiki/Sunhttps://en.wikipedia.org/wiki/Central_limit_theoremhttps://en.wikipedia.org/wiki/Probability_theoryhttps://en.wikipedia.org/wiki/Probability_theoryhttps://en.wikipedia.org/wiki/Channel_(communications)https://en.wikipedia.org/wiki/Widebandhttps://en.wikipedia.org/wiki/White_noisehttps://en.wikipedia.org/wiki/Spectral_densityhttps://en.wikipedia.org/wiki/Watthttps://en.wikipedia.org/wiki/Hertzhttps://en.wikipedia.org/wiki/Bandwidth_(signal_processing)https://en.wikipedia.org/wiki/Gaussian_distributionhttps://en.wikipedia.org/wiki/Fadinghttps://en.wikipedia.org/wiki/Frequencyhttps://en.wikipedia.org/wiki/Interference_(communication)https://en.wikipedia.org/wiki/Nonlinearityhttps://en.wikipedia.org/wiki/Dispersion_(optics)https://en.wikipedia.org/wiki/Dispersion_(optics)https://en.wikipedia.org/wiki/Pink_noisehttps://en.wikipedia.org/wiki/Information_theoryhttps://en.wikipedia.org/wiki/Visible_spectrumhttps://en.wikipedia.org/wiki/Normal_distributionhttps://en.wikipedia.org/wiki/Thermal_noisehttps://en.wikipedia.org/wiki/Johnson-Nyquist_noisehttps://en.wikipedia.org/wiki/Johnson-Nyquist_noisehttps://en.wikipedia.org/wiki/Shot_noisehttps://en.wikipedia.org/wiki/Black_bodyhttps://en.wikipedia.org/w/index.php?title=Celestial_source&action=edit&redlink=1https://en.wikipedia.org/wiki/Sunhttps://en.wikipedia.org/wiki/Central_limit_theoremhttps://en.wikipedia.org/wiki/Probability_theoryhttps://en.wikipedia.org/wiki/Probability_theoryhttps://en.wikipedia.org/wiki/Channel_(communications)https://en.wikipedia.org/wiki/Widebandhttps://en.wikipedia.org/wiki/White_noisehttps://en.wikipedia.org/wiki/Spectral_densityhttps://en.wikipedia.org/wiki/Watthttps://en.wikipedia.org/wiki/Hertzhttps://en.wikipedia.org/wiki/Bandwidth_(signal_processing)https://en.wikipedia.org/wiki/Gaussian_distributionhttps://en.wikipedia.org/wiki/Fadinghttps://en.wikipedia.org/wiki/Frequencyhttps://en.wikipedia.org/wiki/Interference_(communication)https://en.wikipedia.org/wiki/Nonlinearityhttps://en.wikipedia.org/wiki/Dispersion_(optics)
  • 7/25/2019 Audio signal processing using MATLAB

    15/30

    WINTER TRAINING

    'he AWGN channel is a good model for many satelliteand dee+ s+ace

    communication lin&s( It is not a good model for most terrestrial lin&s because of

    multi+ath- terrain bloc&ing- interference- etc( ,o#ever- for terrestrial +ath

    modeling- AWGN is commonly used to simulate bac&ground noise of the channel

    under study- in addition to multi+ath- terrain bloc&ing- interference- ground clutter

    and self2interference that modern radio systems encounter in terrestrial o+eration(

    Di"it%( Fi(teri!"

    00

    https://en.wikipedia.org/wiki/Satellitehttps://en.wikipedia.org/wiki/Satellite
  • 7/25/2019 Audio signal processing using MATLAB

    16/30

    WINTER TRAINING

    In signal +rocessing- a 3i"it%( i(teris a system that +erforms mathematical

    o+erations on a sam+led- discrete2timesignalto reduce or enhance certain as+ects

    of that signal( 'his is in contrast to the other major ty+e of electronic filter-

    the analog filter- #hich is an electronic circuito+erating on continuous2timeanalogsignals(

    A digital filter system usually consists of an analog2to2digital converterto sam+le

    the in+ut signal- follo#ed by a micro+rocessor and some +eri+heral com+onents

    such as memory to store data and filter coefficients etc( !inally a digital2to2analog

    converterto com+lete the out+ut stage( Program Instructions 0soft#are1 running on

    the micro+rocessor im+lement the digital filter by +erforming the necessary

    mathematical o+erations on the numbers received from the A%( In some high

    +erformance a++lications- an !PGAor ASI%is used instead of a general +ur+ose

    micro+rocessor- or a s+eciali)ed SP #ith s+ecific +aralleled architecture for

    e/+editing o+erations such as filtering(

    igital filters may be more e/+ensive than an e*uivalent analog filter due to their

    increased com+le/ity- but they ma&e +ractical many designs that are im+ractical or

    im+ossible as analog filters( When used in the conte/t of real2time analog systems-

    digital filters sometimes have +roblematic latency 0the difference in time bet#een

    the in+ut and the res+onse1 due to the associated analog2to2digitaland digital2to2analogconversions and anti2aliasing filters- or due to other delays in their

    im+lementation(

    igital filters are common+lace and an essential element of everyday electronics

    such as radios- cell+hones- and A> receivers(

    A digital filter is characteri)ed by its transfer function-or e*uivalently-

    its difference e*uation( ?athematical analysis of the transfer function can describe

    ho# it #ill res+ond to any in+ut( As such- designing a filter consists of develo+ing

    01

    https://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Discrete-timehttps://en.wikipedia.org/wiki/Signal_(electrical_engineering)https://en.wikipedia.org/wiki/Electronic_filterhttps://en.wikipedia.org/wiki/Analog_filterhttps://en.wikipedia.org/wiki/Electronic_circuithttps://en.wikipedia.org/wiki/Electronic_circuithttps://en.wikipedia.org/wiki/Continuous-timehttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Analog-to-digital_converterhttps://en.wikipedia.org/wiki/Digital-to-analog_converterhttps://en.wikipedia.org/wiki/Digital-to-analog_converterhttps://en.wikipedia.org/wiki/Field-programmable_gate_arrayhttps://en.wikipedia.org/wiki/Field-programmable_gate_arrayhttps://en.wikipedia.org/wiki/Application-specific_integrated_circuithttps://en.wikipedia.org/wiki/Analog-to-digitalhttps://en.wikipedia.org/wiki/Digital-to-analoghttps://en.wikipedia.org/wiki/Digital-to-analoghttps://en.wikipedia.org/wiki/Anti-aliasing_filterhttps://en.wikipedia.org/wiki/Radiohttps://en.wikipedia.org/wiki/Cellphonehttps://en.wikipedia.org/wiki/AV_receivershttps://en.wikipedia.org/wiki/Transfer_functionhttps://en.wikipedia.org/wiki/Transfer_functionhttps://en.wikipedia.org/wiki/Difference_equationhttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Sampling_(signal_processing)https://en.wikipedia.org/wiki/Discrete-timehttps://en.wikipedia.org/wiki/Signal_(electrical_engineering)https://en.wikipedia.org/wiki/Electronic_filterhttps://en.wikipedia.org/wiki/Analog_filterhttps://en.wikipedia.org/wiki/Electronic_circuithttps://en.wikipedia.org/wiki/Continuous-timehttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Analog_signalhttps://en.wikipedia.org/wiki/Analog-to-digital_converterhttps://en.wikipedia.org/wiki/Digital-to-analog_converterhttps://en.wikipedia.org/wiki/Digital-to-analog_converterhttps://en.wikipedia.org/wiki/Field-programmable_gate_arrayhttps://en.wikipedia.org/wiki/Application-specific_integrated_circuithttps://en.wikipedia.org/wiki/Analog-to-digitalhttps://en.wikipedia.org/wiki/Digital-to-analoghttps://en.wikipedia.org/wiki/Digital-to-analoghttps://en.wikipedia.org/wiki/Anti-aliasing_filterhttps://en.wikipedia.org/wiki/Radiohttps://en.wikipedia.org/wiki/Cellphonehttps://en.wikipedia.org/wiki/AV_receivershttps://en.wikipedia.org/wiki/Transfer_functionhttps://en.wikipedia.org/wiki/Difference_equation
  • 7/25/2019 Audio signal processing using MATLAB

    17/30

    WINTER TRAINING

    s+ecifications a++ro+riate to the +roblem 0for e/am+le- a second2order lo# +ass

    filter #ith a s+ecific cut2off fre*uency1- and then +roducing a transfer function

    #hich meets the s+ecifications(

    'he transfer functionfor a linear- time2invariant- digital filter can be e/+ressed as atransfer function in theZ2domain5 if it is causal- then it has the form:

    Where- the order of the filter is the greater ofNorM(

    B$tter2orth Fi(ter

    T$e re.uen#y response plot rom Butterwort$?s 04> p"per'

    'he B$tter2orth i(teris a ty+e of signal +rocessing filterdesigned to have as flat

    a fre*uency res+onseas +ossible in the+assband( It is also referred to asa '%7i'%(() (%t '%"!it$3e i(ter( It #as first described in

  • 7/25/2019 Audio signal processing using MATLAB

    18/30

    WINTER TRAINING

    "ritish engineerand+hysicistSte+hen "utter#orthin his +a+er entitled .On the

    'heory of !ilter Am+lifiers.

    M%t(%4 co3e o $&i!" B$tter2orth i(ter i! 4%!3p%&&'o3e

    Fs=16384;Order=2;Sampling_freq=16384;[B,A]=!""er#Order,[$%&,$%'](;

    freq)#B,A,*$$$,Sampling_freq(;[Fl!"e,Fs]=+aread#-Fl!"e.i/0ing"one%+a-(;=fil"er#B,A,Fl!"e(;so!nds#,Fs(=ff"#,4$'6(;=%5on#(74$'6;f_al=3e474$'65#$2$48(;plo"#f_al,#12$4'((

    Original Singal (amplitude vs frequency)

    0=

    https://en.wikipedia.org/wiki/Engineerhttps://en.wikipedia.org/wiki/Physicisthttps://en.wikipedia.org/wiki/Stephen_Butterworthhttps://en.wikipedia.org/wiki/Engineerhttps://en.wikipedia.org/wiki/Physicisthttps://en.wikipedia.org/wiki/Stephen_Butterworth
  • 7/25/2019 Audio signal processing using MATLAB

    19/30

    WINTER TRAINING

    Fi(ter 8B$tter2orth B%!3p%&&9

    0

  • 7/25/2019 Audio signal processing using MATLAB

    20/30

    WINTER TRAINING

    Fi(tere3 Si"!%(8A'p(it$3e 5& Fre:$e!c)9

    0:

  • 7/25/2019 Audio signal processing using MATLAB

    21/30

    WINTER TRAINING

    NOISE REMO6A;

    Noi&e re3$ctio!is the +rocess of removing noisefrom a signal(

    All recording devices- both analogor digital- have traits #hich ma&e themsusce+tible to noise( Noise can be random or #hite noise#ith no coherence- or

    coherent noise introduced by the deviceBs mechanism or +rocessing algorithms(

    In electronicrecording devices- a major form of noise is hisscaused by

    random electronsthat- heavily influenced by heat- stray from their designated +ath(

    'hese stray electrons influence the voltageof the out+ut signal and thus create

    detectable noise(

    0

    https://en.wikipedia.org/wiki/Noisehttps://en.wikipedia.org/wiki/Signal_(information_theory)https://en.wikipedia.org/wiki/Analog_electronicshttps://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/White_noisehttps://en.wikipedia.org/wiki/Algorithmhttps://en.wikipedia.org/wiki/Electronic_circuithttps://en.wikipedia.org/wiki/Electronhttps://en.wikipedia.org/wiki/Voltagehttps://en.wikipedia.org/wiki/Noisehttps://en.wikipedia.org/wiki/Signal_(information_theory)https://en.wikipedia.org/wiki/Analog_electronicshttps://en.wikipedia.org/wiki/Digital_datahttps://en.wikipedia.org/wiki/White_noisehttps://en.wikipedia.org/wiki/Algorithmhttps://en.wikipedia.org/wiki/Electronic_circuithttps://en.wikipedia.org/wiki/Electronhttps://en.wikipedia.org/wiki/Voltage
  • 7/25/2019 Audio signal processing using MATLAB

    22/30

    WINTER TRAINING

    In the case of+hotogra+hic filmand magnetic ta+e- noise 0both visible and

    audible1 is introduced due to the grain structure of the medium( In +hotogra+hic

    film- the si)e of the grains in the film determines the filmBs sensitivity- more

    sensitive film having larger si)ed grains( In magnetic ta+e- the larger the grains of

    the magnetic +articles 0usually ferric o/ideor magnetite1- the more +rone the

    medium is to noise(

    'o com+ensate for this- larger areas of film or magnetic ta+e may be used to lo#er

    the noise to an acce+table level(

    In selecting a noise reduction algorithm- one must #eigh several factors:

    the available com+uter +o#er and time available: a digital camera must

    a++ly noise reduction in a fraction of a second using a tiny onboard %PU-#hile a des&to+ com+uter has much more +o#er and time

    #hether sacrificing some real detail is acce+table if it allo#s more noise to

    be removed 0ho# aggressively to decide #hether variations in the image arenoise or not1

    the characteristics of the noise and the detail in the image- to better ma&e

    those decisions

    Wie!er Fi(ter

    In signal +rocessing- the Wie!er i(teris a filterused to +roduce an estimate of

    a desired or target random +rocess by linear time2invariant 08'I1 filtering of an

    observed noisy +rocess- assuming &no#n stationarysignal and noise s+ectra-

    and additive noise( 'he Wiener filter minimi)es the mean s*uare error bet#een

    the estimated random +rocess and the desired +rocess(

    0

    https://en.wikipedia.org/wiki/Photographic_filmhttps://en.wikipedia.org/wiki/Magnetic_tapehttps://en.wikipedia.org/wiki/Ferric_oxidehttps://en.wikipedia.org/wiki/Magnetitehttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Filter_(signal_processing)https://en.wikipedia.org/wiki/Linear_filterhttps://en.wikipedia.org/wiki/Stationary_processhttps://en.wikipedia.org/wiki/Photographic_filmhttps://en.wikipedia.org/wiki/Magnetic_tapehttps://en.wikipedia.org/wiki/Ferric_oxidehttps://en.wikipedia.org/wiki/Magnetitehttps://en.wikipedia.org/wiki/Signal_processinghttps://en.wikipedia.org/wiki/Filter_(signal_processing)https://en.wikipedia.org/wiki/Linear_filterhttps://en.wikipedia.org/wiki/Stationary_process
  • 7/25/2019 Audio signal processing using MATLAB

    23/30

    WINTER TRAINING

    'he goal of the Wiener filter is to com+ute a statistical estimateof an un&no#n

    signal using a related signal as an in+ut and filtering that &no#n signal to +roduce

    the estimate as an out+ut( !or e/am+le- the &no#n signal might consist of an

    un&no#n signal of interest that has been corru+ted by additive noise('he Wiener

    filter can be used to filter out the noise from the corru+ted signal to +rovide an

    estimate of the underlying signal of interest( 'he Wiener filter is based on

    a statisticala++roach- and a more statistical account of the theory is given in

    the minimum mean2s*uare error0??S;1 article(

    'y+ical deterministic filters are designed for a desired fre*uency res+onse(

    ,o#ever- the design of the Wiener filter ta&es a different a++roach( One is

    assumed to have &no#ledge of the s+ectral +ro+erties of the original signal and the

    noise- and one see&s the linear time2invariantfilter #hose out+ut #ould come asclose to the original signal as +ossible( Wiener filters are characteri)ed by the

    follo#ing:C

  • 7/25/2019 Audio signal processing using MATLAB

    24/30

    WINTER TRAINING

    degradation at a time allo#s us to develo+ a restoration algorithm for each

    ty+e of degradation and sim+ly combine them( 'he Wiener filtering e/ecutes

    an o+timal tradeoff bet#een inverse filtering and noise smoothing( It

    removes the additive noise and inverts the blurring simultaneously(

    'he Wiener filtering is o+timal in terms of the mean s*uare error( In other

    #ords- it minimi)es the overall mean s*uare error in the +rocess of inverse

    filtering and noise smoothing( 'he Wiener filtering is a linear estimation of

    the original image( 'he a++roach is based on a stochastic frame#or&( 'he

    orthogonality +rinci+le im+lies that the Wiener filter in !ourier domain can

    be e/+ressed as follo#s:

    w$ere "re respe#ti*ely power spe#tr" o t$e

    ori!in"l im"!e "nd t$e "dditi*e noise- "nd H60-17 is t$e

    (lurrin! lter' It is e"sy to see t$"t t$e Wiener lter $"s two

    sep"r"te p"rt- "n in*erse lterin! p"rt "nd " noise

    smoot$in! p"rt' It not only perorms t$e de#on*olution (y

    in*erse lterin! 6$i!$p"ss lterin!7 (ut "lso remo*es t$e

    noise wit$ " #ompression oper"tion 6lowp"ss lterin!7'

    Implementation

    To implement t$e Wiener lter in pr"#ti#e we $"*e to

    estim"te t$e power spe#tr" o t$e ori!in"l im"!e "nd t$e

    "dditi*e noise' 5or w$ite "dditi*e noise t$e power spe#trum

    is e.u"l to t$e *"ri"n#e o t$e noise' To estim"te t$e power

    spe#trum o t$e ori!in"l im"!e m"ny met$ods #"n (e used'

    A dire#t estim"te is t$e periodo!r"m estim"te o t$e power

    spe#trum #omputed rom t$e o(ser*"tion,

    1>

  • 7/25/2019 Audio signal processing using MATLAB

    25/30

    WINTER TRAINING

    w$ereY(k,l)is t$e 25T o t$e o(ser*"tion' T$e "d*"nt"!e o

    t$e estim"te is t$"t it #"n (e implemented *ery e"sily

    wit$out worryin! "(out t$e sin!ul"rity o t$e in*erse

    lterin!' Anot$er estim"te w$i#$ le"ds to " #"s#"de

    implement"tion o t$e in*erse lterin! "nd t$e noisesmoot$in! is

    w$i#$ is " str"i!$torw"rd result o t$e "#t, T$e

    power spe#trum Syy#"n (e estim"ted dire#tly rom t$e

    o(ser*"tion usin! t$e periodo!r"m estim"te' T$is estim"te

    results in " #"s#"de implement"tion o in*erse lterin! "nd

    noise smoot$in!,

    T$e dis"d*"nt"!e o t$is implement"tion is t$"t w$en t$e

    in*erse lter is sin!ul"r- we $"*e to use t$e !ener"lied

    in*erse lterin!' 8eople "lso su!!est t$e power spe#trum o

    t$e ori!in"l im"!e #"n (e estim"ted ("sed on " model su#$

    "s t$e model'

    iener !ilter function creation in

    "AT#A$

    f!n"ione/ = +ienerFil"er#,:,sigma,gamma,alp:a( = si)e#,1(;2;

    sf = f%5#as#f(?$(@17gamma5#as#f(==$(;if = 1%7sf;

    10

  • 7/25/2019 Audio signal processing using MATLAB

    26/30

    WINTER TRAINING

    if =if%5#as#f(5gamma?1(@gamma5as#sf(%5if%5#as#sf(5gamma=1(;f = f%5#f?sigma>2(@sigma>25#f=sigma>2(;f = if%5#fCsigma>2(%7#fC#1Calp:a(5sigma>2(;

    eDf = f%5

  • 7/25/2019 Audio signal processing using MATLAB

    27/30

    WINTER TRAINING

    so!nds#e+/,Fs(H=ff"#,4$'6(;=as#H(%>2;dBs=1$5log1$#(;.a=ma/#dBs( E.eas!ring ma/ima of ois Signal

    I=ff"#e+/,4$'6(;)=as#I(%>2;dBS=1$5log1$#)(;.aa=ma/#dBS( E.eas!ring ma/ima of reons"r!"ed signalfig!re#2(,plo"#e+/,-r-(,/lael#-freq!en-(lael#-ampli"!de-(legend#-0eons"r!"ed Signal-(;

    Si'$(%tio! Re&$(t&