Popular in Course
Popular in Electrical Engineering
This 22 page Class Notes was uploaded by Dorris Borer on Monday September 28, 2015. The Class Notes belongs to ESE250 at University of Pennsylvania taught by D.Koditschek in Fall. Since its upload, it has received 17 views. For similar materials see /class/215449/ese250-university-of-pennsylvania in Electrical Engineering at University of Pennsylvania.
Reviews for DIGAUDIOBASICS
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 09/28/15
Kl cnn ESE250 Digital Audio Basics Week 4 February 4 2009 TimeFrequency WEEKA rTimErFrEquncv i ESE 25D 7 Sarina U 5 Penn Course Map Numbers correspond to course weeks WEEKAETimErFrEquncv E E El urinu U Kl cnn Teaser Musical Representation 39 With this compact notation Could communicate a sound to pianist Much more compact than 44KHz timesample amplitudes fewer bits to represent Represent frequencies WEEK4 rTlmErFVEUUENEV 3 ESE Z isurinu U 5 Penn Week 4 TimeFrequency 39 There are other ways to represent Frequency representation particularly efficient Chord symbols 2 v 39Am rrsr It I tx Melodv w i kl pe di a httpenwikipediaorywikiFileLeadisheetpng quot W5 mm W Wl quot7 M me an ElC WeeklliTirnErFreuuencv 4 EE Eli urinu lDDEHun Kn a Penn Prelude Harmonic Analy5is Fourier Transform FT Fourier amp other 19 h Century Mathematicians discovered that real signals can always ifthey are smooth enough be expressed as the sum of harmonics jigab aftus Defn Harmonics Fourier Series collections of periodic signals eg cos sin signUf whose frequencies are related by integer Wm multiples camm arranged in order ofincreasing frequency A quotmix perspective summed in a linear combination whose coef cients provide an alternative representation My 5 Mnuiuhi W l bnn A Sampled Real Signal Sample Data Sampled Signal t v V7 4543 5 A A Penn Reconstructing the Sampled Signal Exact Reconstruction May be possible Underthe right assumptions 52 Cos1t52 Given the right model This example A harmonic signal 39 Sampled in time 52 39 Sin2t52 quotquotquotquotquot Can be reconstructed o exactly o fromthetimesampled values 0 given knowledge ofthe harmonics Cos0t Sin1t Cos1t Sin2t Cos2t Sin3t Cos3t i44n l Week 4 TimeFrecuencv 7 FSF 7 30 snrinn 10 DeHon amp K 3 Penn Reconstructing the Sampled Signal Exact Reconstruction May be possible Underthe right 7 assumptions 52 Coslt5 39Zl quot quot Given the right model This example A harmonicquot signal i Sampled in time x5239Sin2152 39 Can be reconstructed i o exactly o fromthetimesampled values 0 given knowledge ofthe harmonics C05it Su1lt C39oslr Sin2r Cos2t smpr Cos3t Week 4 TimeFrequencv 8 FsF 7m snrinn 10 DeHon amp K 7 5 Pm Sequence of Analysis Given Fundamental frequencyf 127 Sampling Rate nS 5 I Measured Data row5 ran5 non5 ran5 mic5 compute hm CosUtVS 0 u quot 1115tSlnlt5 2 0 baSIS functions hmzCo1zVwz 52 H quot L lnZIl5i 23 52 coeffICIents liZCtCos21 Vm 0 Reconstruct exact function rtCost Sin2t 0 1w from linear combination of 0 him 0 quotbasis elements known 52 like 0 coef cients x52 4150 computed 0 hum Week 4 TimeFrequency 9 ESE 250 Sprinq 10 DeHon amp Koditschek 35146111 Fourier AnalySIs TimeValues FrequencyAmolitudes t v S A a V 454 Cos0t 0 m Sint 0 p n cost J l e closed form Sinm J 1 454 Coslzq 0 Q DFT f A 3 3 computation Week 4 T39 E 10 ESE 250 Sprinq 10 DeHon amp Koditschek A Penn Reconstruction vs Approximation Previous Example received function was in the span of the harmonics reconstruction achieves exact match at all times More General Case received function is close to the span reconstruction achieves exact match only at the sampled times get successively better approximation at all times u by taking successively more samples n and using successively higher harmonics M r r it ESEZSEIrSmmn KPenn Another Sampled Real Signal Sample Data Sampled Signal V lli lml ml n72n51n 3 2 27r27rcnslA V m 0 zianpuzmspn n12sin 7 n4ncns 51n 39El 3 l cnn ApprOXImating the Sampled Signal Approximate Reconstruction N is always achievable and more relevant to our problem Example A roughly harmonic signal Sampled in time Can be approximated u arbitrarily closely u from the timesampled values m using any good set of harmonics Cos0 Sin1 3041 Sin7 Cos2l Sin3 Cos3 Week 4 r TimerFreduenw E E u unnu mnu im h Kltnn I ApprOXI mate Reconstruction Sum up the black harmonics us fg the green coefficients M0 dwakg xl 39 Thinner Sint Green Dashed Curves FIN7SnwlililIL J JIhsFusut I 9I HI 1 n Denote I 39 39 quotm Fewer Harmonic Sin2t Components 7 Cnsm HW HHui7HWMHFLzAVMen 7r Cus2t u u n x mm cizcmsn 7W HW HHymnHWMHFLzHWhHisl 7r Cus3t N N lit Chek More Harmonics are Better Samples 7 Harmonics 11 Samples 11 Harmonics mmUsually Computed Not Solved 7 Samples 7 Harmonics 11 Samples 11 Harmonics 15 Samples 15 Harmonics quotM m the spectrum is often plotted as a function of frequency E E Jred Data Yet Another Sampled t v Real Signal 4quot T T2 Sampled Signal if 0 0 0 1 H 2 T 04 V 5 z i I 21 i 02 0 T L f i 3 2 1 1 2 3 L T 5 z M T Ut2 Ln 1 3 z L 04 Y 39239 Fr o o o o o o al cnn I I I I J h Some Signals DlSllke g r l Some Harmonics 39 7 2 a van k 09 5 r39 s1 39 39 Approximate Reconstruction 15 Samplesnst Harmonics although always achievable may require a lot of samples to get good performance from poorly chosenquot s harmon c 39 Different bases match different data better or worse sometimes time is better than frequency WeekArTlmerFrecluenc 18 F F 07 wind4 lquot U 31 Samplesnst Harmonics l cnn I ChOIce of BaSIs What is a harmonic we could have used periodic pulse trains 0 previous signal would be reconstructed exactly 0 with one ortwo pulsetrain harmonics w but soundlike signals L 0 would typically require a very large number o of pulsetrain harmonics Fourier Theory and generalizations permits very broad choice of harmonics such choices amount to the selection ofa model Today s Lecture interprets the choice of harmonics o as a selection of coordinate reference frame 0 in the space of received sampledquantized data lends geometric insight to highdimensional phenomena introduces arsenal of linear algebraic computation encourages learning datadriven models Week 4 TimeFrequency 19 ESE 250 Sprinq 10 DeHon amp quotN Mckequot Henn Intuitive Concept Inventory 11 Samples 11 Harmonics l m Time Domain 7 3 u Frequency Domain 7 e d 39v 539 r received signal u I i mli il nlsi l miu p e w ill 5 I r K iii u u m we s mr u a m J um Week 4 TimeFrequencv 20 ESE 250 Sprinu 10 DeHon amp quotN Mckequot Pam Intuitive Concept Inventory 11 Samples 11 Harmonics Time Domain Frequency Domain r received signallgn U Samplingamp t3 1 f Quantization 2 03 E S 01 a k a C quot W66 S S 239 as q Q on c Idea 5 s 0 0 quotU H 0 ct c 1 01 2 S 1 01 c l m c 2 03 s 2 09 c 3 07 Perceptual coding Week 4 TimeFrequencv 21 ESE 250 Sprind 10 DeHon amp Koditschek Where Are We Heading After Today 39 Week 2 Received signal is o discretetimestamped Generlc D1g1tal Slgnal Processor 0 but rather Float ed 0 then linearly transformed 0 into frequency domain 39 Q DFTl q Side Info V o quan zed 39 q iPCM 739 rt 4gt Sample Igt Code Egt Trsgggg gt Decode gt Produce gt pt quantL SampleTSr 39 Week 3 Quantized Signal is Coded 39 C 00d6 1 Psychoa oustic Audio Coder 4 Q Params Sampled signal q r W 11253 V c 0 not coded directly 1mg 3 g fiil ds Bit Allocation X to Chan Analy51s Painter amp Spanias ProcIEEE 884451 512 2000 Week 4 TimeFrequency 22 ESE 250 Sprind 10 DeHon amp Koditschek 3 Pcnn Interlude Audio Communications Week 4 TimeFrequency 23 ESE 250 Sprinq 10 DeHon amp Koditschek 35146111 Technical Concept Inventory 39 Floating Point Quantization a symbolic representation admitting a mimic of continuous arithmetic 39 Vectors sampled signals are points in a high dimensional vector space 39 Linear Algebra the Swiss Army Knife of high dimensions provides a logical geometric and computational toolset for manipulating vectors 39 Change of Basis DFT is a high dimensional rotation in the vector space of timesampled signals Week 4 T39 E 24 ESE 250 Sprinq 10 DeHon amp Koditschek Kl cnn Technical Concept Inventory Floating Point Quantization a sym olic representation admitting a mimic of continuous arithmetic Weekzle39 rnerFreuuencv 25 ESE Z esunnu n u APEDU FloatQuantized Sym bolsrfgtct Real q pc1v1 m mommy SampleT rt q x eliminates continuoustlme depenJence Z discretizes continuous values a C nnot represent an uncountable collection of functions a With a countable ofcourse ln facts finitel set of symbols 39 Floating Point Representation and Computer Arithmetic x Choose Base 7 Precision p Magnitude E I a q b1 1 Wm H r E S e S E a o lt d lt b Nonuniform quantization en s a b dlffer t rnantlssa ap6r u SqrtModFlinl a Fl QtyFloatapx Archetypal Computation Inner product a X X X y V y a la Mum mi mm TIM399t KPcnn Technical Concept Inventory Vectors sampled signals are points in a high dimensional vector space Week4 TimeFrequech 27 F F 950 nrirm39 7 u u k 39l cnn r0 2 Time Functions q1 qz Sampled received signal 24 are Vectors 39V quot W3 V V 7 15 Is a discrete sequence of time stamped floats 4011 man 7 V Float rTuTs Mung rTDnSTS 7 V V of real ie Float ed values at each of the ns timestamps Think of each of the timestamps A as an axis of real float values 39 4 V Week4 TImeFrequencv 28 F F 950 nrirm3910 DeHon amp K 72 3 2 Pi nn 1 Time Functions t i x are Vectors ii 5quot V W 7 Think of each ofthe time u 39 V 31quot stamps as an axis of real mm M oat values Eg for three time stamps ns3 i we can record the values arrange each axis located perpendicular to the other two in space mark their values and interpret them as a vector Week4 TimeFrequency 29 F F75n nrirm39tD DeHon ampKoditschek Time Functions are Vectors V w i Thinkofeach ofthetime quot M i stamps as an axis of real 2 1 V oat values Eg for two time stamps ns 2 a we can draw both axes a on graph paper for a greater number of time stamps l a we can imagine arranging each 2 agtltis r a inamutually quot 39 s v14 direction i 3 I i a in space of appropriately high 5 i a v 2v W i 5i dimension f vi i 39 l r i ox 41 iu ixi Zn Week4 TimeFrequencv 30 F F7 n nrirm39toDeHc z 3 Technical Concept Inventory Linear Algebra the Swiss Army Knifequot ofhigh dimensions provides a logical geometric and computational toolset for manipulating vectors Weekzle39hmerFreuuencv I EE u urinu nu i w M enu Linear Algebra SWISS Army Knife We cannot see in highrt dimensions ty Linear Algebra enables us in high dimensions to rzs reason precisely ET b1 b2 19 10 think geometrically q q q 1 Z compute 08 09 Essential Ideas 08 41gt 09 3 08 b709b BaSIS expanSIon ltqb1gtb1 qbzgt bz Change of basis ql bi bz Ingredients where u Orthonormality 9 W W 1 03 1 09 0 08 rm 03 0 09 1 09 Weekzle39 merFreuuencv 32 ESE Z esurinu r t t u Inner Product KR u 11 Linear Algebra SWISS Army Knife Orthonormal Basis set of unit length Generally vectors r s Lengthv Lengtho Cos 4m geometric reinterpretation of computational definition l39 m w r r LengthrZ each perpendicular to q1ltL lv gtm C A 111 all the others 172 mg q l as q39 total number given h 401122 I by dimension ofthe space t628 39 b1 1 9 Inner Product 201121 scaled cosine of E relative angle scales unit length quotquotquot 12 5 qz My Le gmq C05 4017112 Week 4 TimeFrequency 33 ESE 250 Sprinq 10 Del on amp Koditschek Jenn Technical Concept Inventory 39 Change of Basis DFT is a high dimensional rotation in the vector space of timesampled signals Week 4 T39 E 34 ESE 250 Sprinq 10 DeHon amp Koditschek 3 Penn Week4 TimeFrecuencv 35 ESE 250 SDn39nci 10 DeHon amp Koditschek 1 Independence Hall 500 Chestnut St a Penn Efficiency data sets often lie along lowerdimensional subspaces Of high dimensional data space Decoupling receiver model may quotpreferquot a specific basis Week4 TimeFrecuencv 36 ESE 250 SDn39nci 10 DeHon amp Koditschek Why Change Basis S Pcnn Week 4 TimeFrequency 37 ESE 250 Sprinq 10 DeHon amp Koditschek Linear Algebra Change of Basis Goal Reexpress q lntermsofb HH1H2 laL 1 v2 lt w a I ivy3 Notation use new symbol Q denoting different computational LengthHlZ H1 representation lxzz391ZZ even though vector is geometrically V V unchange 2 2 Check good baSIS Lengmmz my I both Unit length 1 221 22 mutually perpendicular vectors v2 v2 Further geometric Interpretation 1 if old basis is orthonormal mm then new basis is also if and only if it is hummizng 1 221 22 0 u Away from the old M enn Goal ldea39 Linear Algebra Change of Basis 39 Reexpress t1 91 22 5 Q q39m u speci ed by coordinate lt 0 87 390 9 l xZ W1 representation 0 81 1 0911 a 716 u in terms ofthe old basis ET 39 AS Q Qb Q2 u Speci ed by coordinate represen at39on n In terms of rotate basis bH a Q q H o 8 o 9 w ii2 recall geometric meaning 0 8 3909105 390 39 01 tI 1412 u scale b1 by q bl q q qr 12 u scalebzbyqz baq qi bl Iz bZ u form the resultant vector ltqb1gtb1 ltqb2gt bZ 39 Compute Q Q Q using same geometric idea Q reveals how to obtain Q Q n scale H1 by Q qHl u scale Hi by Q q u form the resultant vector QPQJI ltQ H QJF ltqHlgtH WHIP Week 4 T39 E 38 ESE 250 Sprinq 10 DeHon amp Koditschek l cnn Generalize to nS h1t 2 int3 hza 21Fost3 H Float manz kw mm H 4M 3 Samples he Cos0t3 1 Float hush3 hnmwz humml Mail The 3sample DFT gttake inner products of sampled signal 4 with each harmonic H Hoaq hzozmz hzonwz h227I3 H w I a Penn Generalize to nS h0t Cos0t3 h1t 2 Sint3 hza 2 Cost3 WEI ESE Z isunnu r U 3 Samples 20 39mmGeneralize to Arbitrary Samples 11 Samples 11 Harmonics Frequency Domain Time Domain i 5 J quot5 l I r received signal Q DFTW Samplingamp v r f 3 0 i n H O 0 Quantlzatlon 2 03 a is 70 6 0 this r 39 2 01 3 k D R 8 8 1 04 6 wee 5 Q 00 0 1 quot2 Idea 9 s 70 0 0 quotU 39 o g c 704 1 01 E 2 4s 0 1 01 H LLi 4c 01 2 03 55 70 2 0y 5c 0 3 07 Week 4 TimeFre uenc 41 ESE 25o s rin 3910 DeHon amp Koditschek Perceptual COdmg 531901111 for more understanding Courses ESE 325 Math 240 gt Math 312 ll Reading Quantization B Widrow l Kollar and M C Liu Statistical theory ofquantization IEEE Transactions on Instrumentation and Measurement 452353 361 1996 Floating Point D Goldberg What every computer scientist should know about floatingpoint arithmetic ACM Computing Surveys 231 1991 Linear Algebra for Frequency Transformations o G Strang The discrete cosine transform SIAM Review 411135 147 1999 eek 4 TimeFrequencv 42 ESE 250 Sbrinu 10 DeHon amp39 21 3 Pcnn ESE250 Digital Audio Basics End Week 4 Lecture TimeFrequency Week 4 TimeFrequency 43 ESE 250 Sprinq 10 DeHon amp Koditschek 22