{"id":579,"date":"2012-10-31T13:08:44","date_gmt":"2012-10-31T13:08:44","guid":{"rendered":"http:\/\/Ascenten.net\/tech-notes\/?p=579"},"modified":"2018-10-26T12:43:37","modified_gmt":"2018-10-26T12:43:37","slug":"audio-equalizer-a-perspective-on-digital-signal-processing","status":"publish","type":"post","link":"https:\/\/ascenten.net\/tech-notes\/audio-equalizer-a-perspective-on-digital-signal-processing\/","title":{"rendered":"Audio Equalizer \u2013 A Perspective on Digital Signal Processing"},"content":{"rendered":"<p>Digital Signal Processing plays a key role in today\u2019s world, where television, sound systems, cameras <span class=\"GINGER_SOFATWARE_correct\">etc<\/span>\u00a0are turning towards digital methods. Many signal processing such applications involve amplifying or attenuating only a small portion of a signal\u2019s frequency spectrum, while leaving the remainder of the spectrum unaffected and one of such applications is a digital audio equalizer.<\/p>\n<p>&nbsp;<\/p>\n<p>This effect is commonly obtained by using a digital filter that has poles or zeroes at specified center frequencies. Digital filter having a pole at a specified center frequency is called \u2018resonant filter\u2019 which enhances a specified frequency in the spectrum, while the filter having zero at a specified frequency is called \u2018notch filter\u2019 which attenuates a specified frequency in the spectrum of the input signal and leaves the rest of the spectrum unaffected.<\/p>\n<p>&nbsp;<\/p>\n<p>In digital audio equalization, any desired frequency response can be obtained by cascading such filters with different center frequencies, where each cascaded system contains a pair of zeroes and conjugate poles.<\/p>\n<p>&nbsp;<\/p>\n<p>By cascading a <span class=\"GINGER_SOFATWARE_correct\">resonant<\/span> and a notch filter an order system can be generated. If \u2018<span class=\"GINGER_SOFATWARE_correct\">r<\/span>\u2019 and \u2018R\u2019 are distances of zero and pole from the origin in unit circle and they are located at center frequency \u03c9<sub>0<\/sub>, transfer function of the system is given by,<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-580\" title=\"oct12-nl-img_18\" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_18-1.jpg\" alt=\"\" width=\"250\" height=\"58\" \/><\/p>\n<p>Where,<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-581\" title=\"oct12-nl-img_27\" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_27-1.jpg\" alt=\"\" width=\"556\" height=\"24\" srcset=\"https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_27-1.jpg 556w, https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_27-1-300x13.jpg 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>In the transfer function H<span class=\"GINGER_SOFATWARE_correct\">(<\/span>z), zeroes are located at<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-582\" title=\" \" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_34-1.jpg\" alt=\"\" width=\"74\" height=\"16\" align=\"bottom\" \/> \u00a0 <span class=\"GINGER_SOFATWARE_correct\">and<\/span> poles are located at <img loading=\"lazy\" decoding=\"async\" title=\" \" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_36-1.jpg\" alt=\"\" width=\"85\" height=\"20\" align=\"top\" \/>\u00a0Here complex conjugates of zeroes and poles are considered to get real filter coefficients.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-584 aligncenter\" title=\" Figure: 1\" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_06-1.jpg\" alt=\"\" width=\"531\" height=\"363\" srcset=\"https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_06-1.jpg 531w, https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_06-1-300x205.jpg 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/p>\n<p style=\"text-align: center;\">Figure: 1<\/p>\n<p>&nbsp;<\/p>\n<p>There are three possibilities to choose the values of \u2018<span class=\"GINGER_SOFATWARE_correct\">r<\/span>\u2019 and \u2018R\u2019 which are mentioned below.<\/p>\n<p>&nbsp;<\/p>\n<ol type=\"i\">\n<li>If <span class=\"GINGER_SOFATWARE_correct\">r<\/span> &lt; R, pole dominates and second order system H<span class=\"GINGER_SOFATWARE_correct\">(<\/span>z) works as a resonant filter at center frequency \u03c9<sub>0<\/sub>.<\/li>\n<li>If <span class=\"GINGER_SOFATWARE_correct\">r<\/span> &gt; R, zero dominates and second order system H<span class=\"GINGER_SOFATWARE_correct\">(<\/span>z) works as a notch filter at center frequency \u03c9<sub>0<\/sub>.<\/li>\n<li>In this case, r &gt; R or r &lt; \u00a0R that means pole and zero <span class=\"GINGER_SOFATWARE_correct\">are<\/span> very close to each other at center frequency \u03c9<sub>0<\/sub>. If <span class=\"GINGER_SOFATWARE_correct\">r<\/span> &gt; R, we get a notch at a center frequency \u03c9<sub>0<\/sub> <span class=\"GINGER_SOFATWARE_correct\">while<\/span> if <span class=\"GINGER_SOFATWARE_correct\">r<\/span> &lt; \u00a0R then we get a sharp peak at center frequency \u03c9<sub>0 <\/sub><span class=\"GINGER_SOFATWARE_correct\">and<\/span> frequencies away from the \u03c9<sub>0<\/sub> <span class=\"GINGER_SOFATWARE_correct\">remains<\/span> unchanged as shown in figure 1.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>The third case is very important for the applications because frequencies other than \u03c9<sub>0<\/sub> <span class=\"GINGER_SOFATWARE_correct\">remains<\/span> flat and we can easily get notch or resonator by small amount of change in the values of \u2018<span class=\"GINGER_SOFATWARE_correct\">r<\/span>\u2019 or \u2018R\u2019. This second order system is used in audio equalizer to enhance or attenuate particular frequency easily.<\/p>\n<p>&nbsp;<\/p>\n<p>In the application of audio equalizer, more than one <span class=\"GINGER_SOFATWARE_correct\">frequencies<\/span> need to be controlled. An example of equalizer is shown in figure 2, where frequencies starting from 32 Hz to 16 KHz are mentioned at specific intervals and magnitude of each frequency can be modified up to 12 dB.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-585 aligncenter\" title=\" Figure: 2\" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_09-1.jpg\" alt=\"\" width=\"414\" height=\"219\" srcset=\"https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_09-1.jpg 414w, https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_09-1-300x159.jpg 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/p>\n<p style=\"text-align: center;\">\u00a0Figure: 2<\/p>\n<p>&nbsp;<\/p>\n<p>To implement <span class=\"GINGER_SOFATWARE_correct\">transfer function<\/span> of audio equalizer such second order filters are cascaded. Zeros &amp; poles of every second order filter are located at different center frequencies which are 32 Hz, 64 Hz, 125 Hz, 16 KHz as shown in figure 2 and sampling frequency of 64 KHz is used as per Nyquist sampling theorem.<\/p>\n<p>&nbsp;<\/p>\n<p>We are using 10 different frequencies in equalizer, so 10 second order filters are cascaded to implement <span class=\"GINGER_SOFATWARE_correct\">transfer function<\/span> of an equivalent system. As each cascaded filter is second order, equalizer system becomes of order 20.<\/p>\n<p>&nbsp;<\/p>\n<p>If N is the no. <span class=\"GINGER_SOFATWARE_correct\">of<\/span> 2<sup><span class=\"GINGER_SOFATWARE_correct\">nd<\/span><\/sup> <span class=\"GINGER_SOFATWARE_correct\">order<\/span> filter cascaded, transfer function of equalizer is given by,<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-586\" title=\" \" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_15-1.jpg\" alt=\"\" width=\"172\" height=\"71\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Where H<sub><span class=\"GINGER_SOFATWARE_correct\">i<\/span><\/sub>(z) system is given by,<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-587\" title=\" \" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_22-1.jpg\" alt=\"\" width=\"259\" height=\"52\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Where,<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-588 \" title=\" \" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_30-1.jpg\" alt=\"\" width=\"579\" height=\"48\" srcset=\"https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_30-1.jpg 579w, https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_30-1-300x25.jpg 300w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-589 aligncenter\" title=\" Figure: 3\" src=\"http:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_03-1.jpg\" alt=\"\" width=\"519\" height=\"439\" srcset=\"https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_03-1.jpg 519w, https:\/\/ascenten.net\/tech-notes\/wp-content\/uploads\/2012\/10\/oct12-nl-img_03-1-300x254.jpg 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/p>\n<p align=\"center\">Figure: 3<\/p>\n<p>&nbsp;<\/p>\n<p>Audio equalizer is implemented using MATLAB and simulation result of <span class=\"GINGER_SOFATWARE_correct\">equalizer\u2019s frequency spectrum<\/span> is shown in figure 3. <span class=\"GINGER_SOFATWARE_correct\">it<\/span> shows that all mentioned frequencies are enhanced or attenuated as per the details shown in figure 2.<\/p>\n<p>&nbsp;<\/p>\n<p>In the equalizer, each frequency has different values of \u2018<span class=\"GINGER_SOFATWARE_correct\">r<\/span>\u2019 and \u2018R\u2019 depending on its attenuation or amplification.\u00a0 So we can easily enhance or attenuate any of given frequencies by just changing its value of \u2018<span class=\"GINGER_SOFATWARE_correct\">r<\/span>\u2019 or \u2018R\u2019.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Digital Signal Processing plays a key role in today\u2019s world, where television, sound systems, cameras etc\u00a0are turning towards digital methods. Many signal processing such applications involve amplifying or attenuating only a small portion of a signal\u2019s frequency spectrum, while leaving the remainder of the spectrum unaffected and one of such&#8230;<\/p>\n","protected":false},"author":1,"featured_media":912,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mansi"],"_links":{"self":[{"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/posts\/579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/comments?post=579"}],"version-history":[{"count":1,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":930,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/posts\/579\/revisions\/930"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/media\/912"}],"wp:attachment":[{"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/media?parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/categories?post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ascenten.net\/tech-notes\/wp-json\/wp\/v2\/tags?post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}