<?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>DSP log &#187; Filter</title>
	<atom:link href="http://www.dsplog.com/category/filter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dsplog.com</link>
	<description>Signal Processing for Communication</description>
	<lastBuildDate>Thu, 26 Jan 2012 01:29:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>BER for BPSK in ISI channel with MMSE equalization</title>
		<link>http://www.dsplog.com/2010/01/24/ber-bpsk-isi-channel-mmse-equalization/</link>
		<comments>http://www.dsplog.com/2010/01/24/ber-bpsk-isi-channel-mmse-equalization/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 06:34:09 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Capacity]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[BPSK]]></category>
		<category><![CDATA[ISI]]></category>
		<category><![CDATA[MMSE]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=870</guid>
		<description><![CDATA[In the past, we had discussed BER for BPSK in flat fading Rayleigh channel and BER for BPSK in a frequency selective channel using Zero Forcing Equalization. In this post, lets discuss a frequency selective channel with the use of Minimum Mean Square Error (MMSE) equalization to compensate for the inter symbol interference (ISI). For [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/' rel='bookmark' title='BER for BPSK in ISI channel with Zero Forcing equalization'>BER for BPSK in ISI channel with Zero Forcing equalization</a></li>
<li><a href='http://www.dsplog.com/2008/12/06/mimo-with-mmse-sic-and-optimal-ordering/' rel='bookmark' title='MIMO with MMSE SIC and optimal ordering'>MIMO with MMSE SIC and optimal ordering</a></li>
<li><a href='http://www.dsplog.com/2008/11/02/mimo-mmse-equalizer/' rel='bookmark' title='MIMO with MMSE equalizer'>MIMO with MMSE equalizer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the past, we had discussed <a title="BER for BPSK in Rayleigh channel from dsplog.com" href="http://www.dsplog.com/2008/08/10/ber-bpsk-rayleigh-channel/">BER for BPSK in flat fading Rayleigh channel</a> and <a title="BER for BPSK in frequency selective channel using ZF equalization" href="http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/">BER for BPSK in a frequency selective channel using Zero Forcing Equalization</a>. In this post, lets discuss a frequency selective channel with the use of Minimum Mean Square Error (MMSE) equalization to compensate for the inter symbol interference (ISI). For simplifying the discussion, we will assume that there is no pulse shaping at the transmitter. The ISI channel is assumed to be a fixed 3 tap channel.</p>
<p><span id="more-870"></span></p>
<h2>Transmit symbol</h2>
<p>Let the transmit symbols be modeled as</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)%20=%20%5Csum_%7Bn=-%5Cinfty%7D%5E%7B%5Cinfty%7Da_ng%28t-mT%29" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> is the symbol period,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_n" border="0" alt="" align="absmiddle" /> is the symbol to transmit,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> is the transmit filter,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" /> is the symbol index and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" />is the output waveform.</p>
<p>For simplicity,  lets assume that the transmit pulse shaping filter is not present, i.e <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)=\delta(t)" border="0" alt="" align="absmiddle" />.</p>
<p>So the transmit symbols can be modeled by the discrete time equivalent</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s[k]=a_n" border="0" alt="" align="absmiddle" /></p>
<p><img title="Transmit baseband symbols" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png" alt="" width="446" height="110" /></p>
<p><strong>Figure: Transmit symbols</strong></p>
<h2>Channel Model</h2>
<p>Lets us assume the channel to be a 3 tap multipath channel with spacing <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> i.e.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h[k]=\left[\begin{array}h_1 &amp; h_2 &amp; h_3 \end{array}\right]" border="0" alt="" align="absmiddle" /></p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/mutipath_channel.png"><img title="3 tap multipath channel" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/mutipath_channel.png" alt="3 tap multipath channel" width="300" height="179" /></a></p>
<p><strong>Figure: Channel model (3 tap multipath)</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>In addition to the multipath channel, the received signal gets corrupted by noise <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" />, typically referred to as <strong>Additive White Gaussian Noise</strong> (AWGN). The values of the noise <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" /> follows the Gaussian probability distribution function, <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?p%28x%29%20=%20%5Cfrac%7B1%7D%7B%5Csqrt%7B2%5Cpi%5Csigma%5E2%7D%7De%5E%7B%5Cfrac%7B-%28x-%5Cmu%29%5E2%7D%7B2%5Csigma%5E2%7D" border="0" alt="" align="absmiddle" /> with</p>
<p>mean <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\mu=0" border="0" alt="" align="absmiddle" /> and</p>
<p>variance <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Csigma%5E2%20=%20%5Cfrac%7BN_0%7D%7B2%7D" border="0" alt="" align="absmiddle" />.</p>
<p>The received signal is</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y[k]=s[k] \otimes h[k] + n" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\otimes" border="0" alt="" align="absmiddle" /> is the convolution operator.</p>
<h2>MMSE Equalization</h2>
<p>In Minimum Mean Square Error solution, for each sample time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?k" border="0" alt="" align="absmiddle" /> we would want to find a set of coefficients <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c%5Bk%5D" border="0" alt="" align="absmiddle" /> which minimizes the error between the desired signal <img src="../../cgi-bin/mimetex.cgi?s%5Bk%5D" border="0" alt="" align="absmiddle" /> and the equalized signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k]\otimes y[k]" border="0" alt="" align="absmiddle" />, i.e.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}E\left(e[k]\right)^2 &amp; = &amp; E\left(s[k]-c[k]\otimes y[k] \right)^2\\ &amp; = &amp;  E(s[k]-c^Ty)(s[k]-c^Ty)^T\\ &amp; = &amp;E(s[k])^2-E(c^Tys[k]) -E(s[k]y^Tc)+E(c^Tyy^Tc)\\ &amp; = &amp; E(s[k])^2-c^TR_{ys} -R_{sy}c+c^TR_{yy}c\end{array}" border="0" alt="" align="absmiddle" />,</p>
<p>where,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?e[k]" border="0" alt="" align="absmiddle" /> is the error at sample time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?k" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c" border="0" alt="" align="absmiddle" /> is column vector of dimension <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?[K\mbox{ x }1]" border="0" alt="" align="absmiddle" /> storing the equalization coefficients,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y" border="0" alt="" align="absmiddle" /> is column vector of dimension <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?[K\mbox{ x }1]" border="0" alt="" align="absmiddle" /> storing the received samples,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?K" border="0" alt="" align="absmiddle" /> is the number of taps in the equalizer,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?R_{ys}=E(ys[k]) " border="0" alt="" align="absmiddle" /> is the cross correlation between received sequence and input sequence ,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?R_{sy}=E(s[k]y^T) " border="0" alt="" align="absmiddle" /> is the cross correlation between received sequence and input sequence and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?R_{yy}=E(yy^T) " border="0" alt="" align="absmiddle" /> is the auto-correlation of the received sequence.</p>
<p>For solving the Minimum Mean Square Error (MMSE) criterion, we need to find a set of coefficients <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c" border="0" alt="" align="absmiddle" /> which minimizes <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?E(e[k])^2" border="0" alt="" align="absmiddle" />.</p>
<p>Differentiation with respect to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c" border="0" alt="" align="absmiddle" /> and equating to 0,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{rrl}\frac{\partial}{\partial c} \left[E(s[k])^2-c^TR_{ys} -R_{sy}c+c^TR_{yy}c\right]&amp;=&amp; 0\\  -R_{sy}+R_{yy}c&amp;= &amp; 0\\c &amp; = &amp;R^{-1}_{yy} R_{sy}\end{array}" border="0" alt="" align="absmiddle" />.</p>
<p>Simplifying,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}R_{sy}&amp;=&amp;E(s[k]y^T)\\&amp;=&amp;E(s[k](hs[k]+n)^T)\\&amp;=&amp;h^TE(s^2[k])+E(s[k]n)\\ &amp; = &amp; h\end{array}" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}R_{yy}&amp;=&amp;E(yy^T)\\&amp;=&amp;E((hs[k]+n)(hs[k]+n)^T)\\&amp;=&amp;E(hh^T)E(s^2[k])+hE(s[k]n)+E(n[k]s[k])h^T+E(n^2)\\ &amp; = &amp; E(hh^T) + E(n^2) \end{array}" border="0" alt="" align="absmiddle" /></p>
<p>Note :</p>
<p>a) <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?E(s^2[k])=1" border="0" alt="" align="absmiddle" /> is the variance of the input signal</p>
<p>b)<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?E(s[k]n[k])=0" border="0" alt="" align="absmiddle" /> (as there is no correlation between input signal and noise)</p>
<h2><strong>Simulation Model</strong></h2>
<p>Click here to download: <a href="http://www.dsplog.com/db-install/wp-content/uploads/2010/01/script_ber_bpsk_isi_mmse_equalization.m">Matlab/Octave script for computing BER for BPSK with 3 tap ISI channel with MMSE Equalization</a></p>
<p>The attached Matlab/Octave simulation script performs the following:</p>
<p>(a) Generation of random binary sequence</p>
<p>(b) BPSK modulation i.e bit 0 represented as -1 and bit 1 represented as +1</p>
<p>(c) Convolving the symbols with a 3-tap fixed fading channel.</p>
<p>(d) Adding White Gaussian Noise</p>
<p>(e) Computing the MMSE and ZF equalization filter at the receiver (with 7 taps in length)</p>
<p>(f) Demodulation and conversion to bits</p>
<p>(g) Counting the number of bit errors</p>
<p>(h) Repeating for multiple values of Eb/No</p>
<p>The simulation results are as shown in the plot below.<img class="alignnone size-full wp-image-875" title="BER plot for BPSK in a 3 tap ISI channel with MMSE equalizer" src="http://www.dsplog.com/db-install/wp-content/uploads/2010/01/ber_plot_bpsk_isi_mmse_equalizer.png" alt="BER plot for BPSK in a 3 tap ISI channel with MMSE equalizer" width="448" height="336" /></p>
<p><strong>Figure: BER plot for BPSK in a 3 tap ISI channel with MMSE equalizer</strong></p>
<p><strong>Observations</strong></p>
<p>1. Can see around 0.5dB gain with using MMSE equalizer</p>
<h2>Reference</h2>
<p><a href="http://www.complextoreal.com/chapters/filters.pdf"><span style="font-family: Book Antiqua;">Complex to Real : </span></a><span style="font-family: Book Antiqua;"><a href="http://www.complextoreal.com/chapters/filters.pdf">Tutorial 26 &#8211; Filters, analog, digital and adaptive equalization</a></span></p>
<p><span style="font-family: Book Antiqua;"><br />
</span></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/' rel='bookmark' title='BER for BPSK in ISI channel with Zero Forcing equalization'>BER for BPSK in ISI channel with Zero Forcing equalization</a></li>
<li><a href='http://www.dsplog.com/2008/12/06/mimo-with-mmse-sic-and-optimal-ordering/' rel='bookmark' title='MIMO with MMSE SIC and optimal ordering'>MIMO with MMSE SIC and optimal ordering</a></li>
<li><a href='http://www.dsplog.com/2008/11/02/mimo-mmse-equalizer/' rel='bookmark' title='MIMO with MMSE equalizer'>MIMO with MMSE equalizer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2010/01/24/ber-bpsk-isi-channel-mmse-equalization/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>BER for BPSK in ISI channel with Zero Forcing equalization</title>
		<link>http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/</link>
		<comments>http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 20:15:21 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[BPSK]]></category>
		<category><![CDATA[ISI]]></category>
		<category><![CDATA[ZF]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=857</guid>
		<description><![CDATA[In the past, we had discussed BER for BPSK in flat fading Rayleigh channel. In this post, lets discuss a frequency selective channel with the use of Zero Forcing (ZF) equalization to compensate for the inter symbol interference (ISI). For simplifying the discussion, we will assume that there is no pulse shaping at the transmitter. [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2010/01/24/ber-bpsk-isi-channel-mmse-equalization/' rel='bookmark' title='BER for BPSK in ISI channel with MMSE equalization'>BER for BPSK in ISI channel with MMSE equalization</a></li>
<li><a href='http://www.dsplog.com/2008/11/09/mimo-zero-forcing-successive-interference-cancellation/' rel='bookmark' title='MIMO with Zero Forcing Successive Interference Cancellation equalizer'>MIMO with Zero Forcing Successive Interference Cancellation equalizer</a></li>
<li><a href='http://www.dsplog.com/2008/10/24/mimo-zero-forcing/' rel='bookmark' title='MIMO with Zero Forcing equalizer'>MIMO with Zero Forcing equalizer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the past, we had discussed <a title="BER for BPSK in Rayleigh channel from dsplog.com" href="http://www.dsplog.com/2008/08/10/ber-bpsk-rayleigh-channel/">BER for BPSK in flat fading Rayleigh channel. I</a>n this post, lets discuss a frequency selective channel with the use of Zero Forcing (ZF) equalization to compensate for the inter symbol interference (ISI). For simplifying the discussion, we will assume that there is no pulse shaping at the transmitter. The ISI channel is assumed to be a fixed 3 tap channel.</p>
<p><span id="more-857"></span></p>
<h2>Transmit symbol</h2>
<p>Let the transmit symbols be modeled as</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)%20=%20%5Csum_%7Bn=-%5Cinfty%7D%5E%7B%5Cinfty%7Da_ng%28t-mT%29" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> is the symbol period,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_n" border="0" alt="" align="absmiddle" /> is the symbol to transmit,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> is the transmit filter,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" /> is the symbol index and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" />is the output waveform.</p>
<p>For simplicity,  lets assume that the transmit pulse shaping filter is not present, i.e <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)=\delta(t)" border="0" alt="" align="absmiddle" />.</p>
<p>So the transmit symbols can be modeled by the discrete time equivalent</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s[k]=a_n" border="0" alt="" align="absmiddle" /></p>
<p><img class="alignnone" title="Transmit baseband symbols" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png" alt="" width="446" height="110" /></p>
<p><strong>Figure: Transmit symbols</strong></p>
<h2>Channel Model</h2>
<p>Lets us assume the channel to be a 3 tap multipath channel with spacing <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> i.e.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h[k]=\left[\begin{array}h_1 &amp; h_2 &amp; h_3 \end{array}\right]" border="0" alt="" align="absmiddle" /></p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/mutipath_channel.png"><img class="alignnone size-full wp-image-859" title="3 tap multipath channel" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/mutipath_channel.png" alt="3 tap multipath channel" width="300" height="179" /></a></p>
<p><strong>Figure: Channel model (3 tap multipath)</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>In addition to the multipath channel, the received signal gets corrupted by noise <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" />, typically referred to as <strong>Additive White Gaussian Noise</strong> (AWGN). The values of the noise <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" /> follows the Gaussian probability distribution function, <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?p%28x%29%20=%20%5Cfrac%7B1%7D%7B%5Csqrt%7B2%5Cpi%5Csigma%5E2%7D%7De%5E%7B%5Cfrac%7B-%28x-%5Cmu%29%5E2%7D%7B2%5Csigma%5E2%7D" border="0" alt="" align="absmiddle" /> with</p>
<p>mean <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\mu=0" border="0" alt="" align="absmiddle" /> and</p>
<p>variance <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Csigma%5E2%20=%20%5Cfrac%7BN_0%7D%7B2%7D" border="0" alt="" align="absmiddle" />.</p>
<p>The received signal is</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y[k]=s[k] \otimes h[k] + n" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\otimes" border="0" alt="" align="absmiddle" /> is the convolution operator.</p>
<h2>Zero Forcing Equalization</h2>
<p>Objective of Zero Forcing Equalization is to find a set of filter coefficients <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k]" border="0" alt="" align="absmiddle" /> which can make <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h[k]\otimes c[k] = \delta[k]" border="0" alt="" align="absmiddle" />.</p>
<p>After equalization</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\hat{y}_{ZF}[k] &amp; = &amp; c[k]\otimes y[k]\\ &amp; = &amp; c[k] (s[k] \otimes h[k] + n \\ &amp; = &amp; s[k] + c[k] \otimes n\end{array}" border="0" alt="" align="absmiddle" />.</p>
<p><strong>Note</strong>:</p>
<p>The term <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k] \otimes n" border="0" alt="" align="absmiddle" /> causes noise amplification resulting poorer bit error rate performance.</p>
<p><strong>Deriving the equalization coefficients</strong></p>
<p>From the post on <a title="topelitz matrix in dsplog.com" href="http://www.dsplog.com/2007/04/21/using-toeplitz-matrices-in-matlab/http://www.dsplog.com/2007/04/21/using-toeplitz-matrices-in-matlab/">toeplitz matrix</a>,we know that convolution operation can be represented as matrix multiplication.</p>
<pre class="html">% Matlab code for using Toeplitz matrix for convolution
clear all
x = [1:3];
h = [4:6];
xM = toeplitz([x zeros(1,length(h)-1) ], [x(1) zeros(1,length(h)-1) ]);
y1 = xM*h';
y2 = conv(x,h);
diff = y1'-y2
diff = [  0   0   0   0   0 ]</pre>
<p>Using similar matrix algebra and assuming that the coefficients <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k]" border="0" alt="" align="absmiddle" /> has 3 taps, the equation <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h[k]\otimes%20c[k]%20=%20\delta[k]" border="0" alt="" align="absmiddle" /> can be equivalently represented as,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\left[\begin{array}{ccc}h2 &amp; h1 &amp; 0\\ h3 &amp; h2 &amp; h1 \\0 &amp; h3 &amp; h2\end{array}\right]\left[\begin{array}{c}c1\\c2\\c3\end{array}\right]=\left[\begin{array}{c}0\\1\\0\end{array}\right]" border="0" alt="" align="absmiddle" /></p>
<p>Solving for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c%5Bk%5D" border="0" alt="" align="absmiddle" />, we have</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\left[\begin{array}{c}c1\\c2\\c3\end{array}\right]=\left[\begin{array}{ccc}h2 &amp; h1 &amp; 0\\ h3 &amp; h2 &amp; h1 \\0 &amp; h3 &amp; h2\end{array}\right]^{-1}\left[\begin{array}{c}0\\1\\0\end{array}\right]" border="0" alt="" align="absmiddle" />.</p>
<p>If we assume that <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k]" border="0" alt="" align="absmiddle" /> has 5 taps,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\left[\begin{array}{ccccc}h2 &amp; h1 &amp; 0 &amp; 0 &amp; 0\\ h3 &amp; h2 &amp; h1 &amp; 0 &amp; 0\\ 0 &amp; h3 &amp; h2 &amp; h1 &amp; 0\\ 0 &amp; 0 &amp; h3 &amp; h2 &amp; h1 \\ 0 &amp; 0 &amp; 0 &amp; h3 &amp; h2 \end{array}\right]\left[\begin{array}{c}c1\\c2\\c3\\c4\\c5\end{array}\right]=\left[\begin{array}{c}0\\0\\1\\0\\0\end{array}\right]" border="0" alt="" align="absmiddle" /></p>
<p>Solving for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c%5Bk%5D" border="0" alt="" align="absmiddle" />, we have</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\left[\begin{array}{c}c1\\c2\\c3\\c4\\c5\end{array}\right]=\left[\begin{array}{ccccc}h2 &amp; h1 &amp; 0 &amp; 0 &amp; 0\\ h3 &amp; h2 &amp; h1 &amp; 0 &amp; 0\\ 0 &amp; h3 &amp; h2 &amp; h1 &amp; 0\\ 0 &amp; 0 &amp; h3 &amp; h2 &amp; h1 \\ 0 &amp; 0 &amp; 0 &amp; h3 &amp; h2 \end{array}\right]^{-1}\left[\begin{array}{c}0\\0\\1\\0\\0\end{array}\right]" border="0" alt="" align="absmiddle" />.</p>
<p><strong>Example</strong></p>
<pre class="html">% Assuming a 3 tap channel as follows
ht = [0.2 0.9 0.3];
L = length(ht);
kk = 1;
hM = toeplitz([ht([2:end]) zeros(1,2*kk+1-L+1)], [ ht([2:-1:1]) zeros(1,2*kk+1-L+1) ]);
d  = zeros(1,2*kk+1);
d(kk+1) = 1;
c  = [inv(hM)*d.'].';</pre>
<p>The frequency response of the channel <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h[k]" border="1" alt="" align="absmiddle" /> and the equalizer <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?c[k]" border="0" alt="" align="absmiddle" /> are shown below:<br />
<a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/frequency_response_zero_forcing_equalizer.png"><img class="alignnone size-full wp-image-863" title="Frequency response Zero Forcing equalizer" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/frequency_response_zero_forcing_equalizer.png" alt="Frequency response Zero Forcing equalizer" width="448" height="336" /></a></p>
<p><strong>Figure: Frequency response of the channel and the equalizer</strong></p>
<h2><strong>Simulation Model</strong></h2>
<p>Click here to download: <a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/script_ber_bpsk_isi_zf_equalization.m">Matlab/Octave script for computing BER for BPSK with 3 tap ISI channel with Zero Forcing Equalization</a></p>
<p>The attached Matlab/Octave simulation script performs the following:</p>
<p>(a) Generation of random binary sequence</p>
<p>(b) BPSK modulation i.e bit 0 represented as -1 and bit 1 represented as +1</p>
<p>(c) Convolving the symbols with a 3-tap fixed fading channel.</p>
<p>(d) Adding White Gaussian Noise</p>
<p>(e) Computing the equalization filter at the receiver &#8211; the equalization filter is 3, 5, 7, 9 taps in length</p>
<p>(f) Demodulation and conversion to bits</p>
<p>(g) Counting the number of bit errors</p>
<p>(h) Repeating for multiple values of Eb/No</p>
<p>The simulation results are as shown in the plot below.</p>
<p><img class="alignnone" title="BER plot for BPSK in 3 tap ISI channel with Zero Forcing equalizer" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/11/ber_plot_bpsk_isi_zero_forcing_equalizer.png" alt="" width="448" height="336" /></p>
<p><strong>Figure: BER plot for BPSK in a 3 tap ISI channel with Zero Forcing equalizer</strong></p>
<p><strong>Observations</strong></p>
<p>1. Increasing the equalizer tap length from 3 to 5 showed reasonable performance improvement.</p>
<p>2. Diminishing returns from improving the equalizer tap length above 5.</p>
<p>3. The results are poorer compared to the AWGN no multipath results. This is due to the noise amplification (see the frequency response above) by the zero forcing equalization filter.</p>
<p>Next step is to discuss the zero forcing equalizer in the presence of transmit pulse shaping and then move on to minimum mean square error equalizer.</p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2010/01/24/ber-bpsk-isi-channel-mmse-equalization/' rel='bookmark' title='BER for BPSK in ISI channel with MMSE equalization'>BER for BPSK in ISI channel with MMSE equalization</a></li>
<li><a href='http://www.dsplog.com/2008/11/09/mimo-zero-forcing-successive-interference-cancellation/' rel='bookmark' title='MIMO with Zero Forcing Successive Interference Cancellation equalizer'>MIMO with Zero Forcing Successive Interference Cancellation equalizer</a></li>
<li><a href='http://www.dsplog.com/2008/10/24/mimo-zero-forcing/' rel='bookmark' title='MIMO with Zero Forcing equalizer'>MIMO with Zero Forcing equalizer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2009/11/29/ber-bpsk-isi-channel-zero-forcing-equalization/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>BER with Matched Filtering</title>
		<link>http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/</link>
		<comments>http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/#comments</comments>
		<pubDate>Fri, 08 May 2009 00:40:18 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Error Rate]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[AWGN]]></category>
		<category><![CDATA[BPSK]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=551</guid>
		<description><![CDATA[In the post on transmit pulse shaping filter, we had discussed pulse shaping using rectangular and sinc. In this post we will discuss about optimal receiver structure when pulse shaping is used at the transmitter. The receiver structure is also called as matched filter. For the discussion, we will assume rectangular pulse shaping, the channel [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/' rel='bookmark' title='Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)'>Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)</a></li>
<li><a href='http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/' rel='bookmark' title='Eye diagram with raised cosine filtering'>Eye diagram with raised cosine filtering</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the post on <a title="Discussion on transmit pulse shaping filter in dsplog.com" href="http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/">transmit pulse shaping filter</a>, we had discussed pulse shaping using rectangular and sinc. In this post we will discuss about optimal receiver structure when pulse shaping is used at the transmitter. The receiver structure is also called as matched filter. For the discussion, we will assume rectangular pulse shaping, the channel is AWGN only and the modulation is BPSK.</p>
<h2><span id="more-551"></span>Transmitter</h2>
<p>The simplified transmitter structure is as shown below:</p>
<p style="text-align: center;">
<div id="attachment_552" class="wp-caption alignnone" style="width: 400px">
	<img class="size-full wp-image-552" title="transmit_pulse_shaping_filter_block_diagram" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/05/transmit_pulse_shaping_filter_block_diagram.png" alt="Transmit pulse shaping filter" width="400" height="47" />
	<p class="wp-caption-text">Transmit pulse shaping filter</p>
</div>
<p><strong>Figure: Transmit block diagram</strong></p>
<p>The sequence of operation are as follows:</p>
<p>a). The random binary data comes as input to the the BPSK modulator circuit.</p>
<p>b). The BPSK modulator maps bits to symbols i.e bit0 to -1 and bit1 to +1</p>
<p>The sequence of transmit symbols maybe visualized as follows.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png"><img class="alignnone size-full wp-image-115" title="Transmit Baseband symbols" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png" alt="transmission of sequence of baseband symbols" width="446" height="110" /></a></p>
<p><strong>Figure: Transmit symbols for baseband PAM transmission</strong></p>
<p>c). The upsampling block (the block with upward arrow) insert zeros between the samples based on the oversampling factor. For example, if the oversampling factor is 4, the block inserts 3 zeros between samples.</p>
<p>d). The last block in the chain is the filter, where the upsampled sequence is convolved with the filter. In this example, we have assumued rectangular filtering (also known as zero order hold), i.e. to repeat the current symbol till the next symbol arrives and so on. Mathematically, the filter can be represented as,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}g(t)&amp;=&amp;1,\mbox{   } 0\le t &lt; T\\&amp;=&amp; 0\mbox{   }  \mbox{elsewhere}\end{eqnarray}" border="0" alt="" align="absmiddle" />.</p>
<p>The filtered waveform can be as shown below.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbol_rectangular_filter.png"><img class="alignnone size-full wp-image-116" title="Transmit waveform with reactangular filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbol_rectangular_filter.png" alt="" width="440" height="267" /></a></p>
<p><strong>Figure: Baseband PAM transmisison with rectangular filtering</strong></p>
<p>The transmit spectrum assume that the symbol duration <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T=1\mu s" border="0" alt="" align="absmiddle" /> is shown below.</p>
<p><img class="alignnone size-full wp-image-556" title="Transmit spectrum for a rectangular matched filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/05/transmit_spectrum_rectangular_filter.png" alt="Transmit spectrum for a rectangular matched filter" width="448" height="336" /></p>
<p style="text-align: center;"><strong>Figure: Transmit spectrum for rectangular matched filter</strong></p>
<h2>Matched filter Receiver</h2>
<p>The filter having an impulse response <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h(t) = g(T-t)" border="0" alt="" align="absmiddle" /> is called a matched filter of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" />.</p>
<div id="attachment_555" class="wp-caption alignnone" style="width: 400px">
	<img class="size-full wp-image-555" title="Matched filter response for rectangular pulse" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/05/matched_filter_response_rectangular.png" alt="Matched filter response for rectangular pulse" width="400" height="110" />
	<p class="wp-caption-text">Matched filter response for rectangular pulse</p>
</div>
<p><strong>Figure: Matched filter response for a rectangular pulse shaping filter</strong></p>
<p>In this example, as <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> is a rectangular function, the mtched filter is also rectangular.</p>
<p>We pass the received signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" /> through the matched filter <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?h(t)" border="0" alt="" align="absmiddle" />. The output of the convolution peaks at time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> and we sample the at that time instant to perform the demodulation.</p>
<p>Further,<strong> if the filtered transmit signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" /> is corrupted by noise, the filter with impulse response matched to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" /> maximizes the output Signal to Noise Ratio</strong>. The proof for this claim is detailed in Chapter 5.1.2 Matched Filter Demodulator in <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communications-John-Proakis%2Fdp%2F0072321113&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Digital Communications by John Proakis.</a></p>
<h2>Simulation Model</h2>
<p>The Matlab/Octave script performs the following</p>
<p>(a) Generate random binary sequence of +1&#8242;s and -1&#8242;s.</p>
<p>(b) Upsample by inserting zeros and the convolve with rectangular filter</p>
<p>(c) Add white Gaussian noise.</p>
<p>(d) Convolve the received samples with matched filter, and extract output at time T</p>
<p>(e) Perform hard decision decoding and count the bit errors</p>
<p>(f) Repeat for multiple values of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{E_b}{N_0}" border="0" alt="" align="absmiddle" /> and plot the simulation and theoretical results.</p>
<p>Click here to download<a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/05/script_ber_bpsk_awgn_with_matched_filter.m"> Matlab/Octave script for computing the BER for BPSK modulation in AWGN only with using rectangular pulse shaping at the transmitter and corresponding matched filter</a></p>
<p><img class="alignnone size-full wp-image-558" title="BER plot for BPSK in AWGN with rectangular pulse shaping and matched filtering" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/05/ber_plot_ber_bpsk_awgn_matched_filter.png" alt="BER plot for BPSK in AWGN with rectangular pulse shaping and matched filtering" width="448" height="336" /></p>
<p><strong>Figure: BER plot for BPSK with rectangular pulse shaping and matched filtering</strong></p>
<h2>Observations<strong><br />
</strong></h2>
<p>Can see that the simulated results are in good agreement with the <a title="derivation of BER for BPSK in dsplog.com" href="http://www.dsplog.com/2007/08/05/bit-error-probability-for-bpsk-modulation/">theoretical BER results for BPSK in AWGN in AWGN</a>.</p>
<h2>References</h2>
<p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communications-John-Proakis%2Fdp%2F0072321113&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Digital Communications by John Proakis.</a><img style="border: medium none  ! important; margin: 0px ! important;" src="https://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/' rel='bookmark' title='Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)'>Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)</a></li>
<li><a href='http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/' rel='bookmark' title='Eye diagram with raised cosine filtering'>Eye diagram with raised cosine filtering</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Eye diagram with raised cosine filtering</title>
		<link>http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/</link>
		<comments>http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/#comments</comments>
		<pubDate>Thu, 01 May 2008 03:03:43 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[eye diagram]]></category>
		<category><![CDATA[raised cosine]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=145</guid>
		<description><![CDATA[We have discussed about probable transmit pulse shaping filter and have observed that raised cosine filtering filtering allows a simpler implementation, albeit at the cost of increased bandwidth. Let us know understand the eye diagram, which is a useful graphical tool to quantify the degradation of the signal due to filtering. Eye diagram An eye [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/' rel='bookmark' title='BER with Matched Filtering'>BER with Matched Filtering</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>We have discussed about probable <strong>transmit pulse shaping filter</strong> and have observed that <a title="Raised cosine filtering for transmit pulse shaping" href="http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/" target="_blank">raised cosine filtering  filtering</a> allows a simpler implementation, albeit at the cost of increased bandwidth. Let us know understand the <strong>eye diagram</strong>, which is a useful graphical tool to quantify the degradation of the signal due to filtering.</p>
<h2><strong>Eye diagram</strong></h2>
<p>An eye diagram is generated in an oscilloscope operating in the persistence mode by observing the output of the filter with the symbol timing serving as the trigger. The observation window can be set as 2 times the symbol period. (Refer. Section 5.1.3 in <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a>).</p>
<p><span id="more-145"></span></p>
<p>When the input data is random, the eye diagram which consists of many overlapped traces of the signal captures visually all the paths which the waveform takes.</p>
<h2><strong>Simulation script</strong></h2>
<p>Matlab/Octave script for simulating the eye diagram plot. The code performs the following</p>
<p>(a) Defines random BPSK modulated symbols (+1&#8242;s and -1&#8242;s)</p>
<p>(b) Defines two raised cosine filters with<strong> <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" /></strong><strong> </strong>= 0.5, <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" /><strong> </strong>= 1</p>
<p>(c) Upsamples the transmit sequence by zero insertion</p>
<p>(d) Convolves the upsampled transmit sequence with the filter</p>
<p>(e) Overlays the time domain samples to plot the eye diagram</p>
<p>Click here to download: <a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/05/eye_diagram_plot.m">Matlab/Octave script for ploting the eye diagram<br />
</a></p>
<h2>Update</h2>
<p><em><strong>25th May 2008</strong></em></p>
<p>Corrected the issue. Modified the code to handle division by zero.</p>
<p>(a) <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{sin(\pi x)}{\pi x} =1" border="0" alt="" align="absmiddle" /> for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x=0" border="0" alt="" align="absmiddle" /> and</p>
<p>(b) <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{cos(\alpha \pi t/T)}{1-(2\alpha t/T)^2}=\frac{\pi}{4}" border="0" alt="" align="absmiddle" /> for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?|\frac{\alpha t}{T}| = \frac{1}{2}" border="0" alt="" align="absmiddle" /></p>
<p>(Thanks to the article in RFDesign.com, <a title="The care and feeding of digital pulse shaping filter" href="http://rfdesign.com/mag/radio_care_feeding_digital/" target="_self">The care and feeding of digital, pulse-shaping filter</a>, Ken Gentile)</p>
<p><em><strong>19th May 2008</strong></em></p>
<p>It has been brought to my attention that the code is unable to plot the eye diagram accurately in Matlab environment. The difference is because my version of Octave seems to handle the division by numbers close to zero cleanly, where as Matlab insists on returning Inf. I will fix the code and release an update. sorry for the inconvenience.</p>
<p><img class="alignnone size-full wp-image-147" title="Eye diagram following raised cosine filtering with alpha=0.5" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/05/eye_diagram_raised_cosine_alpha_05.png" alt="Eye diagram following raised cosine filtering with alpha=0.5" width="448" height="336" /></p>
<p><strong>Figure: Eye diagram following raised cosine filtering with </strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" /><strong> = 0.5</strong></p>
<p><a title="Eye diagram plot with raised cosine filtering with alpha = 1"><img class="alignnone size-full wp-image-148" title="Eye diagram following raised cosine filtering with alpha =1" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/05/eye_diagram_raised_cosine_alpha_1.png" alt="Eye diagram following raised cosine filtering with alpha =1" width="448" height="336" /></a></p>
<p><strong>Figure: Eye diagram following raised cosine filtering with </strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" /><strong> = 1</strong></p>
<p>As can be observed from the above figures, the above waveform has a shape similar to the human eye and hence the name <strong>eye diagram</strong>. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2><strong>Observations</strong></h2>
<p>1. For increasing the margin for error free transmission, the vertical opening of the eye should be more. In the presence of inter-symbol interference, the vertical opening of the eye reduces, thus increasing the probability of error.</p>
<p>2. The ideal sampling instant is the point where the <strong>vertical eye opening is maximum</strong>.</p>
<p>3. <strong>Smaller horizontal eye opening</strong> means implies more sensitivity to timing errors.</p>
<p>Note:</p>
<p>From the above figures, it can be observed that the horizontal eye opening with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=0.5 is <strong>smaller than</strong> with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=1.</p>
<p>Reason: The tails of the raised cosine filter with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=1 dies away faster than the case where <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=0.5. Hence error in timing cause a bigger performance degradation for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=0.5 than for<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=1 scenario. However, the flip side of using <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=1 is the increased bandwidth required for transmission.</p>
<p><strong>Reference</strong></p>
<p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a><img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Digital Communication: Third Edition, by John R. Barry, Edward A. Lee, David G. Messerschmitt</a></p>
<address>Hope this helps.</address>
<address>Krishna<img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /></address>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/' rel='bookmark' title='BER with Matched Filtering'>BER with Matched Filtering</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Raised cosine filter for transmit pulse shaping</title>
		<link>http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/</link>
		<comments>http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 00:25:02 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[Nyquist]]></category>
		<category><![CDATA[pulse shaping]]></category>
		<category><![CDATA[raised cosine]]></category>
		<category><![CDATA[sinc]]></category>
		<category><![CDATA[transmitter]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=131</guid>
		<description><![CDATA[In the previous post on transmit filtering using Nyquist pulse, we had briefly learned that the information symbol with a symbol period can be transmitted without inter symbol interference (ISI) by using Nyquist pulse, . The resultant waveform is ideally bandlimited to frequencies from Hz to Hz. However, in typical transmission schemes, we do not [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/' rel='bookmark' title='Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)'>Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)</a></li>
<li><a href='http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/' rel='bookmark' title='Eye diagram with raised cosine filtering'>Eye diagram with raised cosine filtering</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the previous post on <a title="No ISI transmit pulse shape filtering using Nyquist pulse" href="http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/" target="_blank">transmit filtering using Nyquist pulse</a>, we had briefly learned that the information symbol <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" /> with a symbol period <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> can be transmitted <strong>without inter symbol interference (ISI)</strong> by using Nyquist pulse,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t) = \frac{sin(\pi t/T)}{\pi t/T},\mbox{   } t=-\infty \mbox{ to } +\infty " border="0" alt="" align="absmiddle" />.</p>
<p>The resultant waveform is ideally bandlimited to frequencies from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz.</p>
<p>However, in typical transmission schemes, we do not hear of pulse shaping using sinc() filters. Rather, pulse shaping using raised cosine filter is frequently used. <strong>In this post, objective is to understand the motivation behind using raised cosine filtering for pulse shaping.</strong></p>
<p><span id="more-131"></span></p>
<p>Though the sinc filter achieves bandlimited transmission within <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm\frac{1}{2T}" border="0" alt="" align="absmiddle" /> Hz with out inter symbol interference,  the sinc filter has the following issues:</p>
<p>1. The <strong>tail of the sinc filter decays slowly</strong>. Note that practical implementations cannot use a filter which extends from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-\infty" border="0" alt="" align="absmiddle" /> to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\infty" border="0" alt="" align="absmiddle" />. To ensure that only filter taps having small values are only ignored, need to use a filter of large length.</p>
<p>2. <strong>Small errors in timing synchronization</strong> at the receiver will result in significant intersymbol interference. Reason: The error in timing synchronization means that the sampling tme at the receiver is not aligned. This implies that filter tap values at time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\ldots,\ -2T,\ -T,\ +T,\  +2T, \ldots " border="0" alt="" align="absmiddle" /> etc are non-zero. Hence reults in significant inter symbol interference.</p>
<p>Given so, there was a motivation to find filters which satisfies the Nyquist criterion, but has a faster decay of the filter tail. A commonly used pulse shaping filter satisfying the Nyquist criterion while having a faster decay is called the <strong>raised cosine filters </strong>having the following equation,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t) = \left(\frac{sin(\pi t/T)}{\pi t/T}\right)\left(\frac{cos(\alpha \pi t/T)}{1-(2\alpha t/T)^2}\right),\mbox{   } t=-\infty \mbox{ to } +\infty " border="0" alt="" align="absmiddle" /></p>
<p>(Refer. Equation 5.8 in <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a>).</p>
<p>where<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />is the <strong><em>excess bandwidth parameter</em></strong> and takes values from 0 to 1.</p>
<p>With <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=0, the raised cosine filter reduces to the classical Nyquist filter with zero excess bandwidth outside <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm\frac{1}{2T}" border="0" alt="" align="absmiddle" />.</p>
<p>With <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />=1 it  is called 100% excess bandwidth and does not occupy frequencies outside <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm\frac{1}{T}" border="0" alt="" align="absmiddle" />.</p>
<p><strong>Note:</strong></p>
<p>(a) <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{sin(\pi x)}{\pi x} =1" border="0" alt="" align="absmiddle" /> for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x=0" border="0" alt="" align="absmiddle" /> and</p>
<p>(b) <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{cos(\alpha \pi t/T)}{1-(2\alpha t/T)^2}=\frac{\pi}{4}" border="0" alt="" align="absmiddle" /> for <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?|\frac{\alpha t}{T}| = \frac{1}{2}" border="0" alt="" align="absmiddle" /></p>
<p>(Thanks to the article in RFDesign.com, <a title="The care and feeding of digital pulse shaping filter" href="http://rfdesign.com/mag/radio_care_feeding_digital/" target="_self">The care and feeding of digital, pulse-shaping filter</a>, Ken Gentile)</p>
<p>The frequency response of the raised cosine filter is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}G(f) &amp; =&amp; T, \mbox{   } &amp; |f| \le \frac{1-\alpha}{2T} \\ &amp; = &amp; Tcos^2\left[\frac{\pi T}{2\alpha} \left(|f|-\frac{1-\alpha}{2T}\right)\right], \mbox{   } &amp; \frac{1-\alpha}{2T} &lt; |f| \le \frac{1+\alpha}{2T}\\&amp; = &amp; 0, \mbox{   } &amp; \frac{1+\alpha}{2T} &lt; |f|\end{eqnarray}" border="0" alt="" align="absmiddle" />.</p>
<h2><strong>Simulation model</strong></h2>
<p>Using the attached Matlab/Octave script, one can plot the time domain and frequency domain representations of the raised cosine filters for different values of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />.</p>
<p>Click here to download:</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/05/raised_cosine_filter.m">Matlab/Octave code for ploting the time and frequency response of raised cosine filter</a></p>
<h2>Update</h2>
<p><strong>25th May 2008</strong></p>
<p>Modified the code to handle the divison by zero error.</p>
<p><strong>19th May 2008</strong></p>
<p>It has been brought to my attention that the code is unable to plot accurately in Matlab environment. The difference is because my version of Octave seems to handle the division by numbers close to zero cleanly, where as Matlab insists on returning Inf. I will fix the code and release an update. sorry for the inconvenience.</p>
<p><a title="Time domain plot of raised cosine filters with alpha = 0, 0.5, 1"><img class="alignnone size-full wp-image-133" title="Time domain response of raised cosine filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/time_domain_raised_cosine_filter.png" alt="" width="448" height="336" /></a></p>
<p><strong>Figure: Time domain response of raised cosine pulse shaping filters</strong></p>
<p><img class="alignnone size-full wp-image-134" title="Frequency domain response of raised cosine filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/frequency_domain_raised_cosine_filter.png" alt="" width="448" height="336" /><br />
<strong>Figure: Frequency domain response of raised cosine pulse shaping filters</strong></p>
<p><strong>Observations</strong></p>
<p>[PROS] From the time domain samples, can observe that filter tail of the raised cosine filter with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />greater than 0 dies down faster. This implies that practical implementations can ignore taps which are close to zero with negligible loss in performance.</p>
<p>[PROS] As the filter taps values at <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm 2T" border="0" alt="" align="absmiddle" /> and above are close to zero, timing mis-alignmnet at the receiver does not contribute to significant inter symbol interference.</p>
<p>[CONS] As can be seen from the frequency response, with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />greater than 0, the fitler response is bandlimited only till <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm \frac{1+\alpha}{2T}" border="0" alt="" align="absmiddle" />. We need a wider bandwidth to transmit the waveform when compared to classical Nyquist bandwidth.</p>
<p>Given that the <strong>raised cosine filtering simplifies the practical implementation</strong> (by making the receiver more robust to timing synchronization errors), the <span style="text-decoration: underline;">i</span><strong>ncrease in transmission bandwidth may be a small price to pay</strong>.</p>
<p><strong>Note</strong></p>
<p>From the frequency domain response, one may observe that the shape of the roll-off looks like a cosine waveform having a DC value. Henec the term raised cosine filters. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Reference</strong></p>
<p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a><img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Digital Communication: Third Edition, by John R. Barry, Edward A. Lee, David G. Messerschmitt</a></p>
<p>Hope this helps.</p>
<p>Krishna<img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
<li><a href='http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/' rel='bookmark' title='Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)'>Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)</a></li>
<li><a href='http://www.dsplog.com/2008/05/01/eye-diagram-plot-matlab-raised-cosine-filter/' rel='bookmark' title='Eye diagram with raised cosine filtering'>Eye diagram with raised cosine filtering</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Transmit pulse shaping filter &#8211; rectangular and sinc (Nyquist)</title>
		<link>http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/</link>
		<comments>http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 01:06:03 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[Nyquist]]></category>
		<category><![CDATA[pulse shaping]]></category>
		<category><![CDATA[rectangular]]></category>
		<category><![CDATA[transmitter]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=112</guid>
		<description><![CDATA[In the previous post on I-Q modulator and de-modulator, we had briefly mentioned that the a baseband PAM transmission can be modelled as , where is the symbol period, is the symbol to transmit, is the transmit filter, is the symbol index and is the output waveform. In this post, the objective is to understand [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/' rel='bookmark' title='BER with Matched Filtering'>BER with Matched Filtering</a></li>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the previous post on <a title="Need for IQ modulator and de modulator" href="http://www.dsplog.com/2008/04/05/need-for-i-q-modulator-and-demodulator/" target="_blank">I-Q modulator and de-modulator</a>, we had briefly mentioned that the a baseband PAM transmission can be modelled as</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)%20=%20%5Csum_%7Bm=-%5Cinfty%7D%5E%7B%5Cinfty%7Da_mg%28t-mT%29" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> is the symbol period,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" /> is the symbol to transmit,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> is the transmit filter,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?m" border="0" alt="" align="absmiddle" /> is the symbol index and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" />is the output waveform.</p>
<p>In this post, the objective is to understand the properties of the transmit filter<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> i.e. <strong>to find out a filter which occupies the minimum required bandwidth while ensuring inter-symbol-interference (ISI) free transmission of the information symbol </strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" /><strong>. </strong></p>
<p><span id="more-112"></span></p>
<p>The sequence of transmit symbols maybe visualized as follows.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png"><img class="alignnone size-full wp-image-115" title="Transmit Baseband symbols" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbols.png" alt="transmission of sequence of baseband symbols" width="446" height="110" /></a></p>
<p><strong>Figure: Transmit symbols for baseband PAM transmission</strong></p>
<p>To recover the symbols from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" />, one may sample the waveform at multiples of symbol interval <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" />. The sampled waveform can be,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(kT)=\sum_{m=-\infty}^{+\infty}a_mg(kT-mT)" border="0" alt="" align="absmiddle" />.</p>
<p>Breaking the above equation into two parts,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(kT)=g(0)a_k+\sum_{m \neq k}a_mg(kT-mT)" border="0" alt="" align="absmiddle" /></p>
<p>From the above equation, it is intuitive that for ensuring no inter symbol interference (ISI), the second term in the above equation should be zero i.e. the taps of the filter <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t)" border="0" alt="" align="absmiddle" /> should be zero at <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-T,\  T,\ 2T,\ldots" border="0" alt="" align="absmiddle" /> and non-zero at time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0" border="0" alt="" align="absmiddle" />.</p>
<p><strong>Rectangular filter</strong></p>
<p>The most simplest filter is the zero-order hold filter, i.e. to repeat the current symbol till the next symbol arrives and so on. Mathematically, the filter can be represented as,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}g(t)&amp;=&amp;1,\mbox{   } 0\le t &lt; T\\&amp;=&amp; 0\mbox{   }  \mbox{elsewhere}\end{eqnarray}" border="0" alt="" align="absmiddle" />.</p>
<p>The filtered waveform can be as shown below.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbol_rectangular_filter.png"><img class="alignnone size-full wp-image-116" title="Transmit waveform with reactangular filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbol_rectangular_filter.png" alt="" width="440" height="267" /></a></p>
<p><strong>Figure: Baseband PAM transmisison with rectangular filtering</strong></p>
<p>Though there is no ISI with rectangular filtering, we will show later that this filtering is not be optimal from the bandwidth perspective.</p>
<p><strong>Filtering with sinc() shaped pulses</strong></p>
<p>From our textbooks, we may recall that sinc shaped pulses have have a band limited rectangular spectrum. For example, consider the sinc pulse of width <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?2T" border="0" alt="" align="absmiddle" />.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g(t) = \frac{sin(\pi t/T)}{\pi t/T},\mbox{   } t=-\infty \mbox{ to } +\infty " border="0" alt="" align="absmiddle" /></p>
<p><img class="alignnone size-full wp-image-118" title="time domain response of sinc filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/tx_symbol_sinc_filter.png" alt="" width="446" height="154" /></p>
<p><strong>Figure: Time domain response of sinc filter</strong></p>
<p>As desired, the above filter has zeros at  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-T,\  T,\ 2T,\ldots" border="0" alt="" align="absmiddle" /> and non-zero value at time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0" border="0" alt="" align="absmiddle" />. The corresponding frequency response is a rectangular pulse bandlimited from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz. The frequency response is as shown below:</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/sinc_filter_frequency_response.png"><img class="alignnone size-full wp-image-117" title="Frequency response of sinc filter" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/sinc_filter_frequency_response.png" alt="" width="340" height="187" /></a></p>
<p><strong>Figure: Frequency response of sinc shaped filter</strong><br />
<a name="Summary"></a></p>
<p><strong>Infact, the above sinc shaped pulse satisfies the Nyquist criterion and is called Nyquist pulse </strong>(Refer Sec 5.1.1 <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]).</a></p>
<p>It follows that with the sinc shaped pulse (also called Nyquist pulse) used for transmit filtering:</p>
<p>(a) inter-symbol interference (ISI) is not introduced when sampled properly.</p>
<p>(b) minimum required bandwidth for transmitting <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" /> symbols (with symbol period <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" />)is<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz.</p>
<p><strong>Simulation model</strong></p>
<p>Brief Matlab/Octave script for observing the spectrum of a random BPSK modulated symbols with rectangular filtering and sinc shape filtering might be helpful to uderstand the concept further.</p>
<p>Click here to download.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/transmitpulseshapefilter.m">Matlab/Octave code for simulating transmit pulse shaping with rectangular and sinc waveforms</a></p>
<p>The observed spectrum is as shown below.</p>
<p><a href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/transmitspectrum_rect_sinc.png"><img class="alignnone size-full wp-image-119" title="Transmit spectrum with rectangular and sinc shaped filtering" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/transmitspectrum_rect_sinc.png" alt="" width="448" height="336" /></a></p>
<p><strong>Figure: Transmit spectrum with rectangular and sinc shaped pulse shaping filter</strong></p>
<p><strong>Summary</strong></p>
<p>1. From the above spectrum plot, the sinc shaped filter does not result in perfectly bandlimited spectrum from from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz. This is because, by theory, the sinc pulse exists from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-\infty" border="0" alt="" align="absmiddle" /> to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?+\infty" border="0" alt="" align="absmiddle" />. However, for simulations the sinc pulse is truncated for a finite duration. This results in negligible (less than -30dB) spectral content present outside <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm\frac{1}{2T}" border="0" alt="" align="absmiddle" />Hz.</p>
<p>2. The above discussion does not present why the sinc shaped filtering is optimal for ensuring minimum bandwidth. For the theoretical understanding, one may refer Sec 5.1.1 of <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a>.</p>
<p><strong>Reference</strong></p>
<p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">[DIG-COMM-BARRY-LEE-MESSERSCHMITT]</a><img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FDigital-Communication-John-R-Barry%2Fdp%2F0792375483&amp;tag=dl04-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Digital Communication: Third Edition, by John R. Barry, Edward A. Lee, David G. Messerschmitt</a></p>
<p>Hope this helps.</p>
<p>Krishna<img style="border-style: none ! important; margin: 0px" src="http://www.assoc-amazon.com/e/ir?t=dl04-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2009/05/08/ber-with-matched-filtering/' rel='bookmark' title='BER with Matched Filtering'>BER with Matched Filtering</a></li>
<li><a href='http://www.dsplog.com/2008/05/25/update-correction-in-matlab-code-for-raised-cosine-filter/' rel='bookmark' title='Update: Correction in Matlab code for raised cosine filter'>Update: Correction in Matlab code for raised cosine filter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/04/14/transmit-pulse-shape-nyquist-sinc-rectangular/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Digital implementation of RC low pass filter</title>
		<link>http://www.dsplog.com/2007/12/02/digital-implementation-of-rc-low-pass-filter/</link>
		<comments>http://www.dsplog.com/2007/12/02/digital-implementation-of-rc-low-pass-filter/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 23:39:40 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[low pass filter]]></category>
		<category><![CDATA[RC]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/2007/12/02/digital-implementation-of-rc-low-pass-filter/</guid>
		<description><![CDATA[Thanks to the nice article from Xilinx TechXclusives [XLNX-TECH], let us try to understand the probable digital implementation of resistor-capacitor based low pass filter. Consider a simple RC filter shown in the figure below. Assuming that there is no load across the capacitor, the capacitor charges and discharges through the resistor path. Figure: RC low [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2007/07/01/example-of-cascaded-integrator-comb-filter-in-matlab/' rel='bookmark' title='Example of Cascaded Integrator Comb filter in Matlab'>Example of Cascaded Integrator Comb filter in Matlab</a></li>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2007/05/12/polyphase-filters-for-interpolation/' rel='bookmark' title='Polyphase filters for interpolation'>Polyphase filters for interpolation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>Thanks to the nice article from Xilinx TechXclusives [<a title="white paper from xilinx.com" href="http://www.xilinx.com/support/documentation/white_papers/wp279.pdf">XLNX-TECH</a>], let us try to understand the probable digital implementation of resistor-capacitor based low pass filter. Consider  a simple RC filter shown in the figure below. Assuming that there is no load across the capacitor, the capacitor charges and discharges through the resistor path.</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/rc_lpf.jpg" alt="RC low pass filter" width="377" height="233" /></p>
<p><strong>Figure: RC low pass filter</strong></p>
<p><span id="more-27"></span></p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_i" border="0" alt="" align="absmiddle" /> is the voltage at the input of resistor and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_o" border="0" alt="" align="absmiddle" /> is the voltage at the output.</p>
<p>From capacitor theory, the charge in the capacitor is <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?Q=CV=%5Cint%20i%20dt" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?C" border="0" alt="" align="absmiddle" /> is the capacitance</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?V" border="0" alt="" align="absmiddle" />is the voltage and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?i" border="0" alt="" align="absmiddle" /> is the constant current flowing for short duration of time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?dt" border="0" alt="" align="absmiddle" />.</p>
<p>With the input voltage <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_i" border="0" alt="" align="absmiddle" /> is greater than output voltage <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_o" border="0" alt="" align="absmiddle" />, resulting in current <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?i" border="0" alt="" align="absmiddle" /> flowing through the resistor <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?R" border="0" alt="" align="absmiddle" />, where <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?i" border="0" alt="" align="absmiddle" /></p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?i=\frac{(v_i-v_o)}{R}" border="0" alt="" align="absmiddle" />.</p>
<p>When this current flows into the capacitor for a short time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?dt" border="0" alt="" align="absmiddle" />,  the capacitor will charge and the voltage across the capacitor increases to</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v%5E%27_o%20=%20v_o%20+%20%5Cfrac%7B1%7D%7BC%7Didt%20=%20v_o%20+%20%5Cfrac%7B1%7D%7BRC%7D%28v_i-v_o%29dt" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v^'_o" border="0" alt="" align="absmiddle" /> is the new value of output voltage.</p>
<p><strong>Digital Implementation</strong></p>
<p>The above equation seems to be convenient for digital implementation as shown in the equation below:</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%5Bn%5D%20=%20y%5Bn-1%5D%20+%20k%28x%5Bn-1%5D-y%5Bn-1%5D%29" border="0" alt="" align="absmiddle" /></p>
<p>where,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?k=\frac{1}{RC}dt" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y[n]" border="0" alt="" align="absmiddle" /> is <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v^'_o" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y[n-1]" border="0" alt="" align="absmiddle" /> is <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_o" border="0" alt="" align="absmiddle" /> and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x[n-1]" border="0" alt="" align="absmiddle" /> is <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?v_i" border="0" alt="" align="absmiddle" />.</p>
<p>The transfer function of the above equation is</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?H%28z%29%20=%20%5Cfrac%7Bkz%5E%7B-1%7D%7D%7B1-%281-k%29z%5E%7B-1%7D%7D" border="0" alt="" align="absmiddle" />.</p>
<h2>Simulation model</h2>
<p>Script for plotting the frequency and step response of a digital RC low pass filter.</p>
<p>Click <a title="Script for plotting the frequency and step response of a digital RC low pass filter" href="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/script_digital_rc_lpf.m" target="_blank">here</a> to download.</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/rc_lpf_frequency-response.jpg" alt="Frequency response of a digital RC low pass filter" width="500" height="375" /></p>
<p><strong>Figure: Frequency response of the digital implementation of RC low pass filter</strong></p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/rc_lpf_step_response.jpg" alt="Step response of a digital RC low pass filter" width="500" height="375" /></p>
<p><strong>Figure: Step response of the digital implementation of RC low pass filter</strong></p>
<p><strong>Observations</strong></p>
<p>1. As expected, lower the value of k, tighter is the frequency response and slower is the settling time. This is in synch with analog RC implementation, where a higher value of R and C suggests that the capacitor takes more time to charge/discharge (Note that k is inversely proportional to RC).</p>
<p>2. To facilitate simpler digital implementations not involving multipliers, the value of k can be chosen to be a power of 2.</p>
<p><strong>References</strong></p>
<p>[<a href="http://www.xilinx.com/support/documentation/white_papers/wp279.pdf">XLNX-TECH</a>] Xilinx TechXclusives: <a title="white paper from xilinx.com" href="http://www.xilinx.com/support/documentation/white_papers/wp279.pdf">Digitally Removing a DC Offset (or &#8220;DSP Without Math?&#8221;), By Ken Chapman Senior Staff Engineer, Applications Specialist, Xilinx UK</a>.</p>
<p>Hope this helps.</p>
<p>Krishna</p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2007/07/01/example-of-cascaded-integrator-comb-filter-in-matlab/' rel='bookmark' title='Example of Cascaded Integrator Comb filter in Matlab'>Example of Cascaded Integrator Comb filter in Matlab</a></li>
<li><a href='http://www.dsplog.com/2008/04/22/raised-cosine-filter-for-transmit-pulse-shaping/' rel='bookmark' title='Raised cosine filter for transmit pulse shaping'>Raised cosine filter for transmit pulse shaping</a></li>
<li><a href='http://www.dsplog.com/2007/05/12/polyphase-filters-for-interpolation/' rel='bookmark' title='Polyphase filters for interpolation'>Polyphase filters for interpolation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2007/12/02/digital-implementation-of-rc-low-pass-filter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.dsplog.com @ 2012-02-05 02:58:58 -->
