<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>60Hz powerline &#8211; ASN Home</title>
	<atom:link href="https://www.advsolned.com/tag/60hz-powerline/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.advsolned.com</link>
	<description>ASN home site</description>
	<lastBuildDate>Tue, 23 Nov 2021 10:47:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>FIR Comb Filter: powerline harmonic cancellation and CIC</title>
		<link>https://www.advsolned.com/fir-comb-filter/</link>
					<comments>https://www.advsolned.com/fir-comb-filter/#respond</comments>
		
		<dc:creator><![CDATA[ASN consultancy team]]></dc:creator>
		<pubDate>Wed, 04 Jul 2018 14:18:48 +0000</pubDate>
				<category><![CDATA[ASN FilterScript]]></category>
		<category><![CDATA[50Hz mains interference]]></category>
		<category><![CDATA[50Hz powerline]]></category>
		<category><![CDATA[60Hz powerline]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[CIC]]></category>
		<category><![CDATA[comb]]></category>
		<category><![CDATA[FIR]]></category>
		<category><![CDATA[harmonics]]></category>
		<guid isPermaLink="false">http://www.advsolned.com/?p=5990</guid>

					<description><![CDATA[<p>Comb filters: powerline (50/60Hz) harmonic cancellation filters, audio applications; cascaded integrator–comb (CIC) filters: anti-aliasing, anti-imaging</p>
<p>The post <a rel="nofollow" href="https://www.advsolned.com/fir-comb-filter/">FIR Comb Filter: powerline harmonic cancellation and CIC</a> appeared first on <a rel="nofollow" href="https://www.advsolned.com">ASN Home</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style='padding-bottom:10px; ' class='av-special-heading av-special-heading-h1    '><h1 class='av-special-heading-tag '  itemprop="headline"  >FIR Comb Filter: powerline harmonic cancellation and CIC</h1><div class='special-heading-border'><div class='special-heading-inner-border' ></div></div></div>
<section class="av_textblock_section "  itemscope="itemscope" itemtype="https://schema.org/BlogPosting" itemprop="blogPost" ><div class='avia_textblock  '   itemprop="text" ><p>Comb filters have found use as powerline (50/60Hz) harmonic cancellation filters in audio applications, and form the basis of so called CIC (cascaded integrator–comb) filters used for anti-aliasing in decimation (sample rate reduction), and anti-imaging in interpolation (sample rate increase) applications.</p>
<p style="text-align: left;">The frequency response of a comb filter consists of a series of regularly-spaced troughs, giving the appearance of a comb. As seen in the plot below, the spacing of each trough appears at either odd or even harmonics of the desired fundamental frequency.</p>
<p style="text-align: center;"><a href="http://www.advsolned.com/wp-content/uploads/2018/07/fircomb.png"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-5991" src="http://www.advsolned.com/wp-content/uploads/2018/07/fircomb.png" alt="Comb filters have found use as powerline (50/60Hz) harmonic cancellation filters in audio applications, and form the basis of so called CIC (cascaded integrator–comb) filters used for anti-aliasing in decimation (sample rate reduction), and anti-imaging in interpolation (sample rate increase) application" width="453" height="536" srcset="https://www.advsolned.com/wp-content/uploads/2018/07/fircomb.png 464w, https://www.advsolned.com/wp-content/uploads/2018/07/fircomb-254x300.png 254w, https://www.advsolned.com/wp-content/uploads/2018/07/fircomb-450x532.png 450w" sizes="(max-width: 453px) 100vw, 453px" /></a><em>Frequency response of a typical FIR comb filter (odd harmonics cancellation):<br />
</em><em>\(f_s=500Hz\),  \(f_c=25Hz\), \(L=10\) and \(\alpha=1\)<br />
</em></p>
<p style="text-align: left;"><span class="" style="display:block;clear:both;height: 0px;padding-top: 25px;border-top-width:0px;border-bottom-width:0px;"></span>An FIR comb filter can be described by the following transfer function:</p>
<p style="text-align: center;">\(H(z)=1+\alpha z^{-L}\)<span class="" style="display:block;clear:both;height: 0px;padding-top: 2px;border-top-width:0px;border-bottom-width:0px;"></span><br />
\(\Rightarrow Y(z)=X(z)\left[1+\alpha z^{-L}\right]\)</p>
<p style="text-align: left;">Clearly, the comb filter is simply a weighted delayed replica of itself, specifiied by \(L\). Taking inverse z-transforms, we obtain the difference equation needed for implementation,</p>
<p style="text-align: center;">\(y(n)=x(n)+\alpha x(n-L)\)</p>
<p>where, \(\alpha\) is used to set the Q (bandwidth) of the notch and may be either positive or negative depending on what type of frequency response is required. In order to elaborate on this, negative values of \(\alpha\) have their first trough at DC and their second trough at the fundamental frequency. Clearly this type of comb filter can be used to remove any DC components from a measured waveform if so required. All subsequent troughs appear at even harmonics up to and including the Nyquist frequency.</p>
<p>Positive values of \(\alpha\) on the other hand, only have troughs at the fundamental and odd harmonic frequencies, and as such cannot be used to remove any DC components.</p>
<h2>Application to powerline interference cancellation</h2>
<p>The affectivity of the comb filter is dependent on the sampling frequency, \(f_s\), as \(L\) is limited to integer values only. Also, a relationship between \(f_s\), as \(L\) and will be dependent on the sign of \(\alpha\). Thus, for the purposes of the mains cancellation application considered in this discussion, only positive values of will be considered, as we need only cancel odd harmonics.</p>
<p>A simple relationship for determining  \(L\) can be summarized for positive values of \(\alpha\) as follows:</p>
<p style="text-align: center;">\(L=ceil\left( \large{\frac{f_s}{2f_c}}\right)\)</p>
<p>where, \(f_c\) is the desired centre point of the fundamental notch frequency. Based on this expression, we can re-calculate the sampling frequency, such that \(f_c\) is a true multiple of \(f_s\)</p>
<p style="text-align: center;">\(f_{snew}=2f_c L\)</p>
<h2>Example of a comb filter</h2>
<p>For the example considered herein, i.e. \(f_s=500Hz\) and \(f_c=25Hz\), we obtain \(L=10\). However, if \(f_c=60Hz\), we would need \(L=5\), and a new sampling rate of \(600Hz\) respectively, although it&#8217;s interesting to note that \(f_s=480Hz\) for \(L=4\) would also suffice.</p>
<span class="" style="display:block;clear:both;height: 0px;padding-top: 20px;border-top-width:0px;border-bottom-width:0px;"></span>
<h2>Implementation</h2>
<p>An FIR comb filter may be implemented in <span style="color: #0000ff;"><a style="color: #0000ff;" href="http://www.advsolned.com/asn_filter_designer/#live-math-scripting">ASN FilterScript</a></span> as follows:<br />
[code language=&#8221;java&#8221;]<br />
ClearH1;  // clear primary filter from cascade<br />
interface L = {4,20,1,5}; // delay<br />
interface alpha = {-1,1,0.01,1};</p>
<p>Main()<br />
Num = {1,zeros(L-1),alpha}; // numerator coefficients<br />
Den = {1};<br />
Gain = 1/sum(abs(Num));<br />
[/code]<br />
<span class="" style="display:block;clear:both;height: 0px;padding-top: 20px;border-top-width:0px;border-bottom-width:0px;"></span></p>
<p><a href="http://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png"><img decoding="async" class="alignleft wp-image-3310" style="margin: 10px 80px 10px 20px;" src="http://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png" alt="" width="183" height="253" srcset="https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png 800w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-217x300.png 217w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-768x1062.png 768w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-745x1030.png 745w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-510x705.png 510w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-450x622.png 450w" sizes="(max-width: 183px) 100vw, 183px" /></a></p>
<p style="text-align: left;"><a class="button" href="http://www.advsolned.com/request-form-asn-filter-designer-demo/">Download demo now</a></p>
<p><a class="button" href="http://www.advsolned.com/pricing-and-licencing/#Best_licence_forme">Licencing information</a></p>
</div></section>
</div></div></div><!-- close content main div --></div></div><div id='av_section_1' class='avia-section main_color avia-section-default avia-no-border-styling avia-bg-style-scroll   container_wrap sidebar_right' style=' '  ><div class='container' ><div class='template-page content  av-content-small alpha units'><div class='post-entry post-entry-type-page post-entry-5990'><div class='entry-content-wrapper clearfix'></div></div></div><!-- close content main div --></div></div><div id='after_section_1' class='main_color av_default_container_wrap container_wrap sidebar_right' style=' '  ><div class='container' ><div class='template-page content  av-content-small alpha units'><div class='post-entry post-entry-type-page post-entry-5990'><div class='entry-content-wrapper clearfix'>
</div></div></div><!-- close content main div --></div></div><div id='av_section_2' class='avia-section main_color avia-section-default avia-no-border-styling avia-bg-style-scroll   container_wrap sidebar_right' style=' '  ><div class='container' ><div class='template-page content  av-content-small alpha units'><div class='post-entry post-entry-type-page post-entry-5990'><div class='entry-content-wrapper clearfix'></div></div></div><!-- close content main div --></div></div><div id='after_section_2' class='main_color av_default_container_wrap container_wrap sidebar_right' style=' '  ><div class='container' ><div class='template-page content  av-content-small alpha units'><div class='post-entry post-entry-type-page post-entry-5990'><div class='entry-content-wrapper clearfix'>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="5990"
					data-ulike-nonce="b99357c6de"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_5990"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="+4"></span>			</div></div>
	<p>The post <a rel="nofollow" href="https://www.advsolned.com/fir-comb-filter/">FIR Comb Filter: powerline harmonic cancellation and CIC</a> appeared first on <a rel="nofollow" href="https://www.advsolned.com">ASN Home</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.advsolned.com/fir-comb-filter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
