450 likes | 485 Views
Audio Filter Project. Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah. CO NC EPT U AL TOOLS. Goal: Build filter to pass low or high frequencies in audio signal Equivalent to bass/treble controls on MP3 player. Overview.
E N D
Audio Filter Project Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah
CONCEPTUAL TOOLS • Goal: • Build filter to pass low or high frequencies in audio signal • Equivalent to bass/treble controls on MP3 player Overview http://www.guardian.co.uk/music/blog/2009/dec/21/jazz-purist-found-wynton-marsalis http://www.thatcable.com/category/ 6-35mm-(1-4inch)-Plug-to-Plug/sub http://salestores.com/gegsdu153w60.html http://www.ebay.com/bhp/f3-cellphone-watch http://news-releases.theurbanmusicscene.com/2009/01/27/pedro-giraudo-jazz-orchestra--el-viaje.aspx
CONCEPTUAL TOOLS • Goal: • Build filter to pass low or high frequencies in audio signal • Equivalent to bass/treble controls on MP3 player • Each group of students will design/build low-pass filter (more bass) or high-pass filter (more treble) Overview
CONCEPTUAL TOOLS • Goal: • Build filter to pass low or high frequencies in audio signal • Equivalent to bass/treble controls on MP3 player • Each group of students will design/build low-pass filter (more bass) or high-pass filter (more treble) • Theory first: • Sound waves = sums of sinusoids (Fourier theory) • Complex numbers can represent sinusoids (Phasors) • Electronic components alter sinusoids— resistors, inductors, capacitors • Filter design = sinusoid analysis (circuit theory) Overview
Sound and Sinusoids Neil E. Cotter ECE Department UNIVERSITYOFUTAH necotter@ece.utah.edu
CONCEPTUAL TOOLS Resonances [1]
CONCEPTUAL TOOLS Vocal Tract [2] • Pipe organ • Driven by puffs of air
CONCEPTUAL TOOLS Formants [3] • Frequency response • Vowel = musical chord
CONCEPTUAL TOOLS Glottal Pulses [4] • Rate = voice pitch • Shape varies slightly
CONCEPTUAL TOOLS Speech Waveform [5] [7] • Vowel repetitive • Plosive explosive [6] • Fricatives noisy
CONCEPTUAL TOOLS [1] http://www.nmha.org/go/bell [2] http://www.vocalclinic.net/ [3] http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2011/wd65_yz526/wd65 and yz526/highlevel.html [4] http://www.jr.ietejournals.org/article.asp?issn=0377-2063;year=2011;volume=57;issue=4;spage=363;epage=371;aulast=Raj [5] http://web.science.mq.edu.au/~cassidy/comp449/html/comp449.html [6] http://folk.uio.no/ristoh/aspiration/analysis.html [7] http://www.phon.ucl.ac.uk/home/johnm/siphtra/plostut2/plostut2-5.htm References Neil E. Cotter necotter@ece.utah.edu
Fourier Theory Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah
CONCEPTUAL TOOLS Fourier Theory Any function of time = sum of sinusoids
CONCEPTUAL TOOLS • Example: create a square wave • Use a graphing calculator to plot ƒ(t): • Replace t with x. Use x range of -0.5 to 1.5 • Use y range of -2 to +2. Plot the first term (sinusoid), • then two terms, and then three terms. • Observe how waveform becomes more square Fourier Theory
CONCEPTUAL TOOLS • Function of time = sum of sinusoids • Application: • Sound = air pressure changes versus time • Sound = function of time • Sound = sum of sinusoids Fourier Theory
CONCEPTUAL TOOLS • Filter = change sinusoids, depending on frequency • Result = change in waveform • Example: remove low frequency from square wave • Waveform now has sharp edges (more high frequencies) • Application: emphasize or attenuate notes in music • Equalizer = set of filters • Treble and bass controls = filters Fourier Theory
Phasors Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah
CONCEPTUAL TOOLS • Consider one frequency at a time in circuit • Sum of sinusoids of same frequency is single sinusoid • Use complex numbers to represent sinusoids • Capture magnitude • Capture phase shift • Use j for √-1 (because i was used for current) • Use phasor transform: • P[Acos(2πft +Φ)] = Aejø = a + jb =aAcosΦ +jAsinΦ Phasors
CONCEPTUAL TOOLS • Treat complex numbers as vectors • Sum like vectors (a+jb)+(c+jd) = a+c + j(b+d) • Use polar or rectangular form • Rectangular form: a+jb • Polar form: Aejø • Use right triangle trigonometry to covert forms: • Rectangular from polar: a = AcosΦ and b = AsinΦ • Polar from rectangular: A = √a2 + b2and Φtan-1(b/a) Phasors
CONCEPTUAL TOOLS • Sum of sinusoids becomes sum of complex numbers • Example: • express v(t) in form Phasors
Electronics Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah
CONCEPTUAL TOOLS Voltage
CONCEPTUAL TOOLS Current
CONCEPTUAL TOOLS Resistor
CONCEPTUAL TOOLS Resistor Resistor reduces current flow Water analogy: flow less for winding river
CONCEPTUAL TOOLS Ohm’s Law Current in resistor = voltage / resistance (Ohm's law) Water analogy: flow = altitude drop / length of river
CONCEPTUAL TOOLS Capacitor
CONCEPTUAL TOOLS Capacitor Current flow = tank area times rate of height change i = C dv/dt
CONCEPTUAL TOOLS Inductor http://www.magnariders.com/html/Rides/rally/2005_Rally.html
CONCEPTUAL TOOLS Inductor http://www.magnariders.com/html/Rides/rally/2005_Rally.html Pressure on paddles = moment of wheel times rate of flow change v = L di/dt
CONCEPTUAL TOOLS LED http://www.furuier.com/english/product/index0.htm http://www.xmission.com/~m3lody/junk/xmas2002/lit_waterfall1.jpg
CONCEPTUAL TOOLS Op-Amp
RLC Filter Neil E. Cotter Associate Professor (Lecturer) ECE Department University of Utah
CONCEPTUAL TOOLS RLC Filter Circuit
CONCEPTUAL TOOLS • Vo = IR = voltage across R Ohm’s Law
CONCEPTUAL TOOLS • Gain is size of output relative to input • Gain = |Vo|/|Vi| where |a + jb| = √a2+b2 = A for polar form Gain or or
CONCEPTUAL TOOLS • Gain is max at “center frequency” denoted by ωo • Gain is max/√2 at “cutoff frequencies” denoted by ωC1 and ωC2 Gain versus Frequency
CONCEPTUAL TOOLS • Center frequency, ωo, where gain is max • Occurs where gain = 1 • Solve for ωo using following equation: Center Frequency
CONCEPTUAL TOOLS • Cutoff frequencies, ωC1 and ωC2, where gain is max/√2 • Occurs where gain = 1/√2 • Solve for cutoff frequencies using following equation: Cutoff Frequencies • Bandwidth = β = ωC2 – ωC1 • Bandwidth is roughly frequency range that gets through filter
CONCEPTUAL TOOLS • Find R and C value for assigned filter: • Low-pass filter: • ωo= 2π·500 r/s • β = 2π·1600 r/s • High-pass filter: • ωo= 2π·16,000 r/s • β = 2π·1600 r/s Filter Design