<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m0044">

  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Filtering Periodic Signals</name>

  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.8</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2000/07/24</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/07/12 00:00:00.008 GMT-5</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="mrshawn">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Shawn</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Stewart</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">mrshawn@alumni.rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">filtering</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">linear circuit</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">lowpass filter</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">This module demonstrates the effect that a time-invariant filter can have on periodic waveforms.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="introduction">       
      The Fourier series representation of a periodic signal makes it
      easy to determine how a linear, time-invariant filter reshapes
      such signals <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">in general</emphasis>.  The fundamental
      property of a linear system is that its input-output relation
      obeys superposition:
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">L</m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:ci type="fn">
		    <m:msub>
		      <m:mi>s</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:ci type="fn">
		    <m:msub>
		      <m:mi>s</m:mi>
		      <m:mn>2</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:plus/>
	    <m:apply>
	      <m:times/>
	      <m:ci>
		<m:msub>
		  <m:mi>a</m:mi>
		  <m:mn>1</m:mn>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:ci type="fn">L</m:ci>
		<m:apply>
		  <m:ci type="fn">
		    <m:msub>
		      <m:mi>s</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:ci>
		<m:msub>
		  <m:mi>a</m:mi>
		  <m:mn>2</m:mn>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:ci type="fn">L</m:ci>
		<m:apply>
		  <m:ci type="fn">
		    <m:msub>
		      <m:mi>s</m:mi>
		      <m:mn>2</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>.
      Because the Fourier series represents a periodic signal as a
      linear combination of complex exponentials, we can exploit the
      superposition property.  Furthermore, we found for linear
      circuits that their output to a complex exponential input is
      just the frequency response evaluated at the signal's frequency
      times the complex exponential.  Said mathematically, if
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">x</m:ci>
	    <m:ci>t</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:exp/>
	    <m:apply>
	      <m:times/>
	      <m:imaginaryi/>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:pi/>
		  <m:ci>k</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:ci>T</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply> 
	</m:apply>
      </m:math>,
      then the output   
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">y</m:ci>
	    <m:ci>t</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:ci type="fn">H</m:ci>
	      <m:apply>
		<m:divide/>
		<m:ci>k</m:ci>
		<m:ci>T</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:exp/>
	      <m:apply>
		<m:times/>
		<m:imaginaryi/>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>k</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:ci>T</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply> 
      </m:math>
      because 
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>f</m:ci>
	  <m:apply>
	    <m:divide/>
	    <m:ci>k</m:ci>
	    <m:ci>T</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>.
      Thus, if   
      <m:math>
	<m:apply>
	  <m:ci type="fn">x</m:ci>
	  <m:ci>t</m:ci>
	</m:apply>
      </m:math>
      is periodic thereby having a Fourier series, a linear circuit's
      output to this signal will be the superposition of the output to
      each component.

      <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="output">  
	<m:math> 
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">y</m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>k</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:infinity/>
	      </m:uplimit>
	      <m:lowlimit>
		<m:apply>
		  <m:minus/>
		  <m:infinity/>
		</m:apply>
	      </m:lowlimit>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>c</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:ci type="fn">H</m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:ci>k</m:ci>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		      <m:ci>T</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

      Thus, the output has a Fourier series, which means that it too
      is periodic. Its Fourier coefficients equal
      <m:math>
	<m:apply>
	  <m:times/>
	  <m:ci>
	    <m:msub>
	      <m:mi>c</m:mi>
	      <m:mi>k</m:mi>
	    </m:msub>
	  </m:ci>
	  <m:apply>
	    <m:ci type="fn">H</m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:ci>k</m:ci>
	      <m:ci>T</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>.
      <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">	
	To obtain the spectrum of the output, we simply multiply the
	input spectrum by the frequency response 
      </emphasis>.      
      The circuit modifies the magnitude and phase of each Fourier
      coefficient.  Note especially that while the Fourier
      coefficients do not depend on the signal's period, the circuit's
      transfer function does depend on frequency, which means that the
      circuit's output will differ as the period varies.
    </para>


    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="filter" orient="vertical">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Filtering a period signal</name>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="sig14.png"/> 
	<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Periodic pulse signal</caption> 
      </subfigure> 
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> 
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="sig16.png"/>
	<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  Top plots show the pulse signal's spectrum for various
	  cutoff frequencies.  Bottom plots show the filter's output
	  signals.
	</caption>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	A periodic pulse signal, such as shown on the left part 
	(<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:divide/>
	      <m:ci>Δ</m:ci>
	      <m:ci>T</m:ci>
	    </m:apply>
	    <m:cn>0.2</m:cn>
	  </m:apply>
	</m:math>),
	serves as the input to an   
	<m:math>
	  <m:apply>
	    <m:times/> 
	    <m:ci>R</m:ci>
	    <m:ci>C</m:ci>
	  </m:apply>
	</m:math>
	lowpass filter.  The input's period was 1 ms (millisecond).
	The filter's cutoff frequency was set to the various values
	indicated in the top row, which display the output signal's
	spectrum and the filter's transfer function.  The bottom row
	shows the output signal derived from the Fourier series
	coefficients shown in the top row.
      </caption>
    </figure> 


    <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="diagramsolved">
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exampleparagraph">
	The periodic pulse signal shown on the left above serves as
	the input to a
	<m:math>
	  <m:apply>
	    <m:times/> 
	    <m:ci>R</m:ci>
	    <m:ci>C</m:ci>
	  </m:apply>
	</m:math>-circuit that has the transfer function (calculated
	<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="magphase" document="m0028" strength="9">elsewhere</cnxn>)

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="transferfunction">  
	  <m:math> 
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">H</m:ci>
		<m:ci>f</m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:apply>
		  <m:plus/>
		  <m:cn>1</m:cn>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>R</m:ci>
		    <m:ci>C</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="filter" strength="9"/> shows the output changes
	as we vary the filter's cutoff frequency.  Note how the
	signal's spectrum extends well above its fundamental
	frequency.  Having a cutoff frequency ten times higher than
	the fundamental does perceptibly change the output waveform,
	rounding the leading and trailing edges.  As the cutoff
	frequency decreases (center, then left), the rounding becomes
	more prominent, with the leftmost waveform showing a small
	ripple.
      </para>
    </example>


    <exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exer1">
      <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="frstprob">
	  What is the average value of each output waveform?  The
	  correct answer may surprise you.
	</para>
      </problem>
      <solution xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="frstprobsoln">
	  Because the filter's gain at zero frequency equals one, the
	  average output values equal the respective average input
	  values.
	</para>
      </solution>
    </exercise>

    
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="finalconclusion"> 
      This example also illustrates the impact a lowpass filter can
      have on a waveform.  The simple
      <m:math>
	<m:apply> 
	  <m:times/>
	  <m:ci>R</m:ci>
	  <m:ci>C</m:ci>
	</m:apply>
      </m:math>
      filter used here has a rather gradual frequency response, which
      means that higher harmonics are smoothly suppressed. Later, we
      will describe filters that have much more rapidly varying
      frequency responses, allowing a much more dramatic selection of
      the input's Fourier coefficients.  
    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="conclusion">       
      More importantly, we have calculated the output of a circuit to
      a periodic input <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">without</emphasis> writing, much less
      solving, the differential equation governing the circuit's
      behavior.  Furthermore, we made these calculations entirely in
      the frequency domain.  Using Fourier series, we can calculate
      how <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">any</emphasis> linear circuit will respond to a
      periodic input.
    </para>    

  </content>
</document>
