¥»¸`±N¤¶²Ð¦b¼Æ¦ì°T¸¹³B²z±`¥Î¨ìªºÂoªi¾¹¡]Filters¡^¡A¨Ã²³æ¤¶²Ð¨äÀ³¥Î¡C¤@¯ë¤H¤j·§³£Å¥¹LÂoªi¾¹¡A¦ý¬O¹ï©ó¬ÛÃöªº¼Æ¾Ç¤ÀªR¡A¥i¯à³£Ä±±o«Ü½ÆÂø¡A·q¦Ó»·¤§¡C¥»¸`±N±qÀ³¥Î±¨ÓµÛ¤â¡A¨Ã»¡©ú¬ÛÃöªº MATLAB «ü¥O¡A©Ò¥H¨Ã¤£·|²o¯A¨ì½ÆÂøªº¤ÀªR¡C²³æªº»¡¡A¤@ÓÂoªi¾¹¥i¥H¥Î¨âÓ¦V¶q a ©M b ¨Ó¥Nªí¡A¨ä¤¤ a ªºªø«×¬O p¡Ab ªºªø«×¬O q¡A¦Ó¥B a ªº²Ä¤@Ó¤¸¯À a1 ¥Ã»·¬O 1¡A¦p¤U¡G
a = [1, a2, ... ap] ·í§Ú̧â¨ã¦³°Ñ¼Æ a ©M b ªºÂoªi¾¹À³¥Î¨ì¤@¬qÂ÷´²®É¶¡°T¸¹ x[n]¡A©Ò±o¨ìªºµ²ªG¬O y[n]¡A¥i¥Hªí¥Ü¦p¤U¡G
b = [b1, b2, ... bq]y[n] = b1x[n] + b2x[n-1] + ... + bqx[n-q+1] ³oÓ¦¡¤l¬Ý°_¨Ó¦³ÂI½ÆÂø¡A¤U±§Ų́Ӭݰ_Ó¯S¨Ò¡A´N·|¤ñ¸û²M·¡¡C
-a2y[n-1] - a3y[n-2] - ... - apx[n-p+1]º¥ý¡A¦pªG
a = [1] ¨º»òÂoªi¾¹ªº¿é¥X´N¬O
b = [1/5, 1/5, 1/5, 1/5, 1/5]y[n] = (x[n] + x[n-1] + x[n-2] + x[n-3] + x[n-4])/5 ³o´N¬O¤@Ó²³æªºÂoªi¾¹¡A´«¥y¸Ü»¡¡AÂoªi¾¹ªº¿é¥XÈ¡Aµ¥©óì°T¸¹¦b¹L¥h¤ÂIªº¥§¡È¡A¦]¦¹³oÓÂoªi¾¹´N¦³¡u§C³q¡v¡]Low Pass¡^ªº®ÄªG¡A´«¥y¸Ü»¡¡A¤ñ¸û¦y¾Uªº°T¸¹¡]°ªÀWªº³¡¤À¡^¡A¸g¹L¤F¤ÂI¨D¥§¡¡A·|Åܪº¤ñ¸û¥·Æ¡A¦]¦¹¾ãÓ°T¸¹ªº°ªÀW³¡¤À·|³QÀ£§C¡A¦Ó§CÀW³¡¤À«h¤ñ¸û¤£¨ü¨ì¼vÅT¡A©Ò¥H³o¤@ÃþÂoªi¾¹´NºÙ¬°¡u§C³qÂoªi¾¹¡v¡]Low Pass Filter¡^¡C§C³qÂoªi¾¹ªº®ÄªG¡A´N¦n¹³¥Î¯ÈªM¸nµÛ¼L¤ÚÁ¿¸Ü¡A¥u³Ñ¤U§C¨H¡B¼Ò½k¡B´e´eªºÁnµ¡C¥H¤U¬O¤@Ó½d¨Ò¡G
¦b¤Wz½d¨Ò¤¤¡Ay = filter(b, a, x) §Y¬O¥Ñì©l°T¸¹ x ¤ÎÂoªi¾¹°Ñ¼Æ a ©M b¡A¨Ó²£¥ÍÂoªi¾¹ªº¿é¥X°T¸¹ y¡C¥Ñ¤Wz½d¨Ò¹Ï§Î¥i¥H¬Ý¥X¡A¦b°ªÀWªº³¡¤À¡]¤×¨ä¬O®ðµªº³¡¤À¡^¡A°T¸¹¾_´T©úÅã°§C¡A³o´N¬O§C³qÂoªi¾¹ªº®ÄªG¡C§Ṳ́]¥i¥Hª½±µÅ¥¬Ý¬Ý°T¸¹ªº®t²§¡G§Ú̦b¬Ý¥t¤@²ÕÂoªi¾¹¡G
- ì°T¸¹ x[n]¡Gexample/whatMovies.wav
- Âoªi¾¹¿é¥X°T¸¹ y[n]¡Gexample/lpf01.wav
a = [1] ¨º»òÂoªi¾¹ªº¿é¥X´N¬O
b = [1, -1]y[n] = x[n] - x[n-1] ´«¥y¸Ü»¡¡AÂoªi¾¹ªº¿é¥XÈ¡Aµ¥©óì°T¸¹¥Ø«eªºÈ´î±¼ì°T¸¹¦b«e¤@Ӯɶ¡ÂIªºÈ¡A¦]¦¹ÅܤƼ@¯Pªº°T¸¹¡]§Y°ªÀW°T¸¹¡^¡A¨ä®t²§·|³Q¬ðÅã¥X¨Ó¡A¦ÓÅܤƤ£¼@¯Pªº°T¸¹¡]§Y§CÀW°T¸¹¡^¡A¨ä®t²§·|³QÀ£§í¡A©Ò¥H³o¤@ÃþªºÂoªi¾¹´NºÙ¬°¡u°ª³qÂoªi¾¹¡v¡]High Pass Filter¡^¡A½Ð¨£¤U¦C½d¨Ò¡G
¥Ñ¤Wz½d¨Ò¹Ï§Î¥i¥H¬Ý¥X¡A¦b°ªÀWªº³¡¤À¡]¤×¨ä¬O®ðµªº³¡¤À¡^¡A°T¸¹¾_´T¬Û¹ï©úÅãÅܤj¡A³o´N¬O°ª³qÂoªi¾¹ªº®ÄªG¡C§Ṳ́]¥i¥Hª½±µÅ¥¬Ý¬Ý°T¸¹ªº®t²§¡G¸g¹L¤F°ª³qÂoªi¾¹¤§«á¡A°T¸¹Å¥°_¨Óªº·Pı¡A¦n¹³´N¬O¤p«¬¦¬µ¾÷¡]¨S¦³«§Cµ³â¥z¡^ªº¼½©ñ®ÄªG¡A¤ñ¸û¦y¾U¨ë¦Õ¡C
- ì°T¸¹ x[n]¡Gexample/whatMovies.wav
- Âoªi¾¹¿é¥X°T¸¹ y[n]¡Gexample/hpf01.wav
°£¤F°ª³q©M§C³qÂoªi¾¹¥~¡AÂoªi¾¹¤]¥i¥H²£¥Í¦UºØ¤£¦Pªºµ®Ä¡A¨Ò¦p
a = [1] ¨º»òÂoªi¾¹ªº¿é¥X´N¬O
b = [1, 0, 0, 0, ..., 0, 0.8] ¡]¤¤¶¡§¨Âø¤F3199Ó¹s¡^y[n] = x[n] + 0.8*x[n-3200] ´«¥y¸Ü»¡¡A³oÓÂoªi¾¹ªº¥\¯à´N¬O¡u³æ¦¸°jµ¾¹¡v¡A·|²£¥Í¤@¦¸°jµ¡AY¨ú¼ËÀW²v fs = 16kHz¡A«h°jµ©M쵪º®É¶¡®t¬O 3200/fs = 3200/16000 = 0.2 ¬í¡C½Ð¨£¤U¦C½d¨Ò¡G
¦b¤Wz½d¨Ò¤¤¡Again = 0.8 ¥Nªí°jµªº°I´î¤ñÈ¡A¦Ó delay = 0.2 «h¬O°jµªº®É¶¡®t¡C§ÚÌ¥i¥HÅ¥¬Ý¬Ýì°T¸¹©MÂoªi¾¹¿é¥Xªº®t²§¡G¤WzÂoªi¾¹¥u¯à²£¥Í¤@Ó°jµ¡A¤ñ¸û¤£¹³¤@¯ë¦h«°jµ¡CYn²£¥Í¦h«°jµ¡A¥i¥Î¤U¦CÂoªi¾¹¡G
- ì°T¸¹ x[n]¡Gexample/whatMovies.wav
- Âoªi¾¹¿é¥X°T¸¹ y[n]¡Gexample/echo01.wav
a = [1, 0, 0, 0, ..., 0, -0.8] ¡]¤¤¶¡§¨Âø¤F3199Ó¹s¡^ ¨º»òÂoªi¾¹ªº¿é¥X´N¬O
b = [1]y[n] = x[n] + 0.8*y[n-3200] ³oÓÂoªi¾¹ªº¥\¯à´N¬O¡u¦h«°jµ¾¹¡v¡A·|²£¥Í¦h«°jµ¡AY¨ú¼ËÀW²v fs = 16kHz¡A«h°jµ¤§¶¡ªº®É¶¡®t¬O 3200/fs = 3200/16000 = 0.2 ¬í¡C½Ð¨£¤U¦C½d¨Ò¡G
§ÚÌ¥i¥HÅ¥¬Ý¬Ýì°T¸¹©MÂoªi¾¹¿é¥Xªº®t²§¡G
- ì°T¸¹ x[n]¡Gexample/whatMovies.wav
- Âoªi¾¹¿é¥X°T¸¹ y[n]¡Gexample/echo02.wav¡]¬O§_¦³¡uÅ]µ¶Ç¸£¡vªº·Pı¡H¡^
Audio Signal Processing and Recognition (µ°T³B²z»P¿ëÃÑ)