Old Chinese version
¦b«e¤@¸`¤¤¡A§ÚÌ¥i¥H¨Ï¥Î¡uÂ÷´²®É¶¡³Å¥ß¸Âà´«¡v¡]²ºÙ DTFT¡^¨Ó±N¤@¬q¼Æ¦ì°T¸¹Âà´«¦¨¦UÓÀWÃЪº¤À¶q¡A¦ý³o¬O¤@Ó³sÄòªº¨ç¼Æ¡A¨Ã¤£¾A¦X¦b¹q¸£¤¤³B²z¡A¦]¦¹¥»¸`±N¤¶²Ð¡uÂ÷´²³Å¥ß¸Âà´«¡v¡]Discrete Fourier Transform¡^¡A²ºÙ DFT¡A¨ä¥\¯à¬O±N¤@¬q¼Æ¦ì°T¸¹Âà´«¦¨¨ä¦UÓÂ÷´²ÀW²vªº©¶ªi¤À¶q¡A¥H«K«áÄò¨Ï¥Î¹q¸£¶i¦æ¦UºØ³B²z¡C
¦pªG§Ú̪º°T¸¹¥i¥Hªí¥Ü¦¨ x[n], n = 0~N-1¡A¨º»ò DFT ªº¤½¦¡¦p¤U¡G
X[k]=(1/N)*Sn=0N-1
x[n]*exp(-j*2p*n*k/N), k=0, ..., N-1
³o¨Ç³Å¥ß¸«Y¼Æ X[k] ©Ò¥Nªíªº¸ê°T¬O k ªº¨ç¼Æ¡A¦Ó k ª½±µ©MÀW²v¦³¥¿¤ñÃö«Y¡A¦]¦¹³o¨Ç«Y¼Æ X[k] ³qºÙ¬°¡uÀWÃСv¡]Spectrum¡^¡A¦Ó¹ï©ó X[k] ªº¤ÀªR¡A§Ú̳qºÙ¬°¡uÀWÃФÀªR¡v¡]Spectral Analysis¡^¡C§Ṳ́]¥i¥H¥Ñ³o¨Ç³Å¥ß¸«Y¼Æ X[k]¡A¨Ó¤Ï±Àì©l°T¸¹ x[n]¡A¦p¤U¡G
x[n]=Sk=0N-1
X[k]*exp(j*2p*n*k/N), n=0, ..., N-1
³oÃ䦳´XÂIn»¡©ú¡G
- ¦pªGì©l°T¸¹ x[n] ¦³ N ÂI¡A¨º»òÂà´«¥X¨Óªº°T¸¹ X[k] ¤]·|¦³ N ÂI¡C
- ¤@¯ë¦Ó¨¥¡AX[k] ¬O¤@ӽƼơA¨ä¤j¤p¬O |(X[k])| ¡]abs(X[k]) in MATLAB¡^¡A¬Û¦ì¬O ¡çX[k] (angle(X[k]) or atan(imag(X[k])/real(X[k]) in MATLAB)¡C
- ¦pªGì©l°T¸¹ x[n] ³£¬O¹ê¼Æ¡A¨º»ò X[k] ©M X[N-k] ·|¬O¦@³m½Æ¼Æ¡Aº¡¨¬ |(X[k])| = |(X[N-k])| ¥H¤Î ¡çX[k] = -¡çX[N-k]¡C
¦pªG x[n] ¬O¹ê¼Æ¡A§ÚÌ¥i¥H±N x[n] ªí¥Ü¦p¤U¡G
x[n] = X[0]
+ X[1]*exp(j*2p*n*1/N) + X[N-1]*exp(j*2p*n*(N-1)/N)
+ X[2]*exp(j*2p*n*2/N) + X[N-2]*exp(j*2p*n*(N-2)/N)
+ X[3]*exp(j*2p*n*3/N) + X[N-3]*exp(j*2p*n*(N-3)/N)
+ ...
¹ï¤Wz²Ä k ¶µ¦Ó¨¥¡A§Ú̦³
X[k]*exp(j*2p*n*k/N) + X[N-k]*exp(j*2p*n*(N-k)/N)
= X[k]*exp(j*2p*n*k/N) + X[N-k]*exp(j*2p*n)*exp(-j*2p*n*k/N)
= X[k]*exp(j*2p*n*k/N) + X[N-k]*exp(-j*2p*n*k/N)
= 2*Re(X[k]*exp(j*2p*n*k/N))
¦pªG§ÚÌ¥H mk ªí¥Ü X[k] ªº¤j¤p¡A¥H pk ªí¥Ü X[k] ªº¬Û¦ì¡A¨º»ò¤W¦¡¥i¥H¤Æ²¦p¤U¡G
2*Re(mk*exp(j*pk)*exp(j*2p*n*k/N))
= 2*Re(mk*exp(j*(2p*n*k/N + pk))
= 2*mk*cos(2p*n*k/N + pk)
¤@¯ë¦Ó¨¥¡AN ¬O 2 ªº¿¼Æ¡A¦]¦¹ x[n] ¥i¥Hªí¥Ü¦¨
x[n] = X[0]
+ 2*Sk=1N/2-1mk*cos(2p*n*k/N + pk) + mN/2*cos(p*n + pN/2)
´«¥y¸Ü»¡¡A§ÚÌ¥i¥H±Nì©l°T¸¹©î¸Ñ¦¨¤@Óª½¬y°T¸¹ X[0] ¦A¥[¤W N/2 Ó©¶ªiªº²Õ¦X¡A³o¨Ç©¶ªiªº¾_´T´N¬O X[k] ªº¤j¤p¡A¦Ó¬Û¦ì«h¬O X[k] ªº¬Û¦ì¡C¦]¦¹¹ï©ó¹ê¼Æªº x[n] ¦Ó¨¥¡A§ÚÌ¥u»Ýn¬Ý³æÃ䪺 X[k]¡Ak = 0 ~ N/2¡A¦¹ºØ¥iºÙ¬°¡u³æÃäÀWÃСv¡C²Õ¦¨³o¨Ç³æÃäÀWÃЪº©¶ªi¦@¦³ 1+N/2 Ó¡AÀW²v¥Ñ¤p¨ì¤j¤À§O¬O fs/N*(0:N/2)¡A³o¨Ç©¶ªiºÙ¬°¡u°ò¥»©¶ªi¡v¡C
Y¬O®M¥Î¤Wz¤½¦¡¨Ópºâ DFT¡A©Ò»Ýnªº½ÆÂø«×¬O O(n2)¡A¦ý¦b 1965 ¦~¡A¦³¨â¦ì¾ÇªÌ´£¥X¨Ó¤@®M§óºë²ªººtºâªk¡A©Ò»Ýªº½ÆÂø«×¥u¦³ O(n log n)¡A³o¤@®MºtºâªkºÙ¬°¡u§Ö³t³Å¥ß¸Âà´«¡v¡]Fast Fourier Transform¡A²ºÙ FFT¡^¡A´«¥y¸Ü»¡¡AFFT ¬O¥Î¨Ópºâ DFT ªº§Ö³t¤èªk¡CY¨Ï¥Î MATLAB¡A¬ÛÃöªº«ü¥O¤]¬O fft¡C
º¥ý¡A§Ų́ϥΠMATLAB ªº fft «ü¥O¨ÓÅçÃÒ¹ê¼Æ°T¸¹¤§ DFT «Y¼Æªº¦@³m©Ê¡A¦p¤U¡G
¥Ñ¤W¹Ï¥i¥H¬Ý¥X¡ADFT «Y¼Æ·|¹ïºÙ©ó½Æ¼Æ¥±ªº¹ê¼Æ¶b¡A¥Nªí³o¨Ç«Y¼Æ³£·|¥H¦@³m½Æ¼Æªº¤è¦¡¦¨¹ï¥X²{¡C
¦pªG x[n] «ê¥©¬O³o¨Ç°ò¥»©¶ªi¤¤ªº¨ä¤¤¤@Ó¡A¨º»òpºâ¥X¨ÓªºÂùÃäÀWÃСAÀ³¸Ó¥u¦³¨âÓ«Y¼Æ¤£¬°¹s¡A§ÚÌ¥i¥Î MATLAB ÅçÃÒ¦p¤U¡G
¥Ñ¤W¹Ï¥i¥H¬Ý¥X¡G
- ¯à¶qÀWÃÐ¥u¦³¦b¨âÂI¤£¬°¹s¡A¨ä¥L¦UÂI²z½×¤WÀ³¸Ó¬O¹s¡A¦ý¥Ñ©ópºâºë«×¤§¬G¡A¹ê»Úȫܱµªñ©ó¹s¡A¦ý¤£¤@©w¬O¹s¡C
- ¬Û¦ìÀWÃШS¦³¤@©w³W«h¡A¹³¬O¶Ã¼Æ¡C³o¬O¥Ñ©ó¤j³¡¤Àªº¯à¶qÀWÃЫܤp¡A¦]¦¹¹ê»Úªº¬Û¦ìÀWÃШèS¦³¥ô¦ó·N¸q¡C
¦pªG x[n] ªºÀW²v¤£¬O³o¨Ç©¶ªi¤¤ªº¨ä¤¤¤@Ó¡A¨º»ò DFT ÁÙ¬O·|±N¦¹°T¸¹©î¸Ñ¦¨°ò¥»©¶ªiªº²Õ¦X¡A¦]¦¹¯à¶qÀWÃдN·|¤À´²¦b¦UÓ°ò¥»©¶ªi¡A¦p¤U©Ò¥Ü¡G
¦b¤Wz½d¨Ò¤¤¡A§Ų́ϥΠfftTwoSide.m ¨ç¼Æ¡]¦ì©ó SAP Toolbox¡^¨Ó¶i¦æÂùÃäÀWÃЪºpºâ¡A¨Ã±N¦P®Éµe¥X®É°ì°T¸¹¡BÀWÃЯà¶q¡BÀWÃЬۦì¤TӹϡC
¥Ñ©ó¹ï©ó¹ê¼Æªº x[n] ¦Ó¨¥¡AÂùÃäÀWÃЯà¶q¹Ï·|¥ª¥k¹ïºÙ¡A¦ÓÂùÃäÀWÃЬۦì¹Ï«h¬O¥ª¥k¤Ï¹ïºÙ¡A¦]¦¹§ÚÌ¥i¥H¥u¬Ý³æÃäÀWÃЧY¥i¡A½d¨Ò¦p¤U¡G
¦b¤Wz½d¨Ò¤¤¡A§Ų́ϥΠfftOneSide.m ¨ç¼Æ¡]¦ì©ó SAP Toolbox¡^¨Ó¶i¦æ³æÃäÀWÃЪºpºâ¡A¨Ã±N¦P®Éµe¥X®É°ì°T¸¹¡BÀWÃЯà¶q¡BÀWÃЬۦì¤TӹϡC
¤U±³oÓ½d¨Ò¡AÅã¥Ü¤@Ó»yµµ®Øªº³æÃäÀWÃСG
¦b¤Wz½d¨Ò¤¤¡A§ÚÌ¥i¥H¬Ý¨ì«Ü©úÅ㪺¿Óªi¥X²{¦bÀWÃЯà¶q¡A³o¬O¥Ñ©ó°T¸¹ªº¶g´Á©Ê©Ò³y¦¨ªºµ²ªG¡C¡]¬°¤F¥YÅã¿Óªi²{¶H¡A§Ú̪ºµ®Øè¦n¥]§t¤F¤TÓ§¹¾ãªº°ò¥»¶g´Á¡C¡^
·í k ¶V¤j®É¡A¥Nªí¹ïÀ³ªº©¶ªi¬O°ªÀW°T¸¹¡A¦]¦¹§ÚÌ¥i¥H±Ë±ó°ªÀW°T¸¹¡A¥u¥Î´XÓ§CÀW©¶ªi¡A¨Ó¦X¦¨ì©l°T¸¹¡A¹F¨ì¤U¦C¨â¶µ¥Øªº¡G
¥H¤U³oÓ½d¨Ò¡AÅã¥Ü¦p¦ó¥H©¶ªi¨Ó¦X¦¨¤@Ó¤èªi¡G
¥Ñ¦¹¥i¨£·í§Ú̩ҥΪº DFT «Y¼Æ¶V¦h¡A©Ò¦X¦¨ªºªi§Î´N·|¶V±µªñì¨Óªºªi§Î¡C
¤U±³oÓ½d¨Ò¡A«h¬O¥H©¶ªi¨Ó¦X¦¨¤@Ó¹ê»Ú»¡¸ÜÁnµªºªi§Î¡G
¥Ñ¦¹¥i¨£¦b¹ê»ÚªºÁnµªi§Î¤¤¡A§ÚÌ¥un¤Ö¼Æ´XÓ§CÀWªº«Y¼Æ¡A´N¥i¥H¦X¦¨Ãþ¦üì¨Óªº°T¸¹¡A¥Ñ¦¹¤]¥i¥Hª¾¹D«Ü¦h°ªÀW°T¸¹¬O¨S¦³§@¥Îªº¡C
¹ï©ó¶g´Á©Êªºªi§Î¡ADFT ·|´¡¤J¹sÂI¡A¦p¤U¡G
¬°¤°»ò DFT ·|´¡¤J¹sÂI©O¡HY¤£¨Ï¥Î¸Ô²Óªº¼Æ¾Ç¤ÀªR¡A¦U¦ì¦P¾Ç¬O§_¥i¥H¥Hª½Ä±ªº¤è¦¡¨Ó±À¾É¥X³oÓµ²ªG©O¡H
Y¦b®É°ìªi§Î¥[¤W¹sÂI¡A«h¦bÀW°ì©Ò²£¥Íªº®ÄªG¬O¤º®t¥H¼W¥[ÂI¼Æ¡A¦p¤U©Ò¥Ü¡G
´«¥y¸Ü»¡¡A¥[¤W¹sÂI¡A¦b¹ê½è¤W¨Ã¨S¦³¼W¥[°T¸¹ªº¸ê°T¡A¦ý¬O DFT ªºÂI¼Æ¥²¶·ÀH¤§¼W¥[¡A¦]¦¹¦bÀWÃЪº®ÄÀ³«h¬O¶i¦æ¤º®t¥H¼W¥[ÂI¼Æ¡C
Y¦b®É°ì¶i¦æ Downsample¡A«h¦bÀW°ì©Ò²£¥Íªº®ÄªG¦p¤U¡G
·í§ÚÌ Downsample ¶i¦æ¶V¦h¦¸¡A¦±½u·|¶V¥·Æ¡A¥Nªí°ªÀW³¡¤À¤w¸gºCºC¤£¨£¤F¡I
¦¹¥~¡A§ÚÌ¥i¥H±Nì¥ýªº®É°ì°T¸¹ªí¥Ü¦¨¼ÆÓ©¶ªi¨ç¼Æªº½u©Ê²Õ¦X¡A¨Ã¨Ï¥Î³Ì¤p¥¤èªk¡]lease-squares estimate¡^¨Ó¶i¦æ¦±½uÀÀ¦X¡]Curve fitting¡^¥H§ä¥X³Ì¨Îªº½u©Ê«Y¼Æ¡A³o¨Ç½u©Ê«Y¼Æ©M fft ©Ò±o¨ìªºµ²ªG¬O¤@¼Ëªº¡A½d¨Ò¦p¤U¡G
Audio Signal Processing and Recognition (µ°T³B²z»P¿ëÃÑ)