<?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; Receiver</title>
	<atom:link href="http://www.dsplog.com/category/receiver-synchronization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dsplog.com</link>
	<description>Signal Processing for Communication</description>
	<lastBuildDate>Sun, 05 Feb 2012 11:32:57 +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>Inter Carrier Interference (ICI) in OFDM due to frequency offset</title>
		<link>http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/</link>
		<comments>http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 00:04:31 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[ICI]]></category>
		<category><![CDATA[OFDM]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=689</guid>
		<description><![CDATA[In this post, let us evaluate the impact of frequency offset resulting in Inter Carrier Interference (ICI) while receiving an OFDM modulated symbol. We will first discuss the OFDM transmission and reception, the effect of frequency offset and later we will define the loss of orthogonality and resulting signal to noise ratio (SNR) loss due [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/' rel='bookmark' title='Frequency offset estimation using 802.11a short preamble'>Frequency offset estimation using 802.11a short preamble</a></li>
<li><a href='http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/' rel='bookmark' title='Understanding an OFDM transmission'>Understanding an OFDM transmission</a></li>
<li><a href='http://www.dsplog.com/2008/02/24/peak-to-average-power-ratio-for-ofdm/' rel='bookmark' title='Peak to Average Power Ratio for OFDM'>Peak to Average Power Ratio for OFDM</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In this post, let us evaluate the impact of frequency offset resulting in Inter Carrier Interference (ICI) while receiving an OFDM modulated symbol. We will first discuss the OFDM transmission and reception, the effect of frequency offset and later we will define the loss of orthogonality and resulting signal to noise ratio (SNR) loss due to the presence of frequency offset. The analysis is accompanied by Matlab/Octave simulation scripts.</p>
<h2><span id="more-689"></span>OFDM transmission</h2>
<p>As discussed in the post on Understanding an OFDM transmission,  for sending an OFDM modulated symbol, we use multiple sinusoidals with frequency separation <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{1}{T}" border="0" alt="" align="absmiddle" /> is used, where <img src="../../cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" /> is the symbol period. The information <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_k" border="0" alt="" align="absmiddle" /> to be send on each subcarrier <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?k" border="0" alt="" align="absmiddle" /> is multiplied by the corresponding carrier <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g_k(t)=e^{\frac{j2\pi kt}{T}}" border="0" alt="" align="absmiddle" /> and the sum of such modulated sinusoidals form the transmit signal. Mathematically, the transmit signal is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}s(t) &amp;= &amp;a_0g_0(t) + a_1g_1(t)+\ldots+a_{K-1}g_{K-1}(t)\\ &amp; = &amp;\sum_{0}^{K-1}a_kg_k(t) \\&amp;=&amp;\frac{1}{\sqrt{T}}\underbrace{\sum_{0}^{K-1}a_ke^{\frac{j2\pi kt}{T}}}\ w(t) \end{eqnarray}" border="0" alt="" align="absmiddle" /></p>
<p>The interpretation of the above equation is as follows:<br />
(a) Each information signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_k" border="0" alt="" align="absmiddle" /> multiplies the sinusoidal having frequency of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{k}{T}" border="0" alt="" align="absmiddle" />.<br />
(b) Sum of all such modulated sinusoidals are added and the resultant signal is sent out as <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" />.</p>
<h2>OFDM reception</h2>
<p>In an OFDM receiver, we will multiply the received signal with a bank of correlators and integrate over the period <img src="../../cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" />. The correlator to extract information send on subcarrier  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?k" border="0" alt="" align="absmiddle" /> is<img src="../../cgi-bin/mimetex.cgi?c_m(t)=\frac{1}{\sqrt{T}}e^{-\frac{j2\pi%20mt}{T}}" border="0" alt="" align="absmiddle" />.</p>
<p>The integral,<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}\frac{1}{\sqrt{T}}\int_Ts(t)e^{-\frac{j2\pi%20mt}{T}} &amp; = &amp; a_k,&amp; m=k\\ &amp; = &amp; 0, &amp; m\ne k\end{eqnarray}" border="0" alt="" align="absmiddle" />,</p>
<p>where<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?m" border="0" alt="" align="absmiddle" /> takes values from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0" border="0" alt="" align="absmiddle" /> till <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?K-1" border="0" alt="" align="absmiddle" />.</p>
<h2>Frequency offset</h2>
<p>In a typical wireless communication system, the signal to be transmitted is upconverted to a carrier frequency prior to transmission. The receiver is expected to tune to the same carrier frequency for down-converting the signal to baseband, prior to demodulation.</p>
<p><a title="Signal Up/Down conversion" href="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/signal_up_down_conversion.png"><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/signal_up_down_conversion.png" alt="Signal Up/Down conversion" width="384" height="255" /></a></p>
<p><strong>Figure: Up/down conversion</strong></p>
<p><img title="More..." src="http://www.dsplog.com/db-install/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p>However, due to device impairments the carrier frequency of the receiver need not be same as the carrier frequency of the transmitter. When this happens, the received baseband signal, instead of being centered at DC (0MHz), will be centered at a frequency <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\delta}" border="0" alt="" align="absmiddle" />, where<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_%7B%5Cdelta%7D%20=%20f_%7BTx%7D%20-%20f_%7BRx%7D" border="0" alt="" align="absmiddle" />.</p>
<p>The baseband representation is (ignoring noise),</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t%29%20=%20s%28t%29e%5E%7Bj2%5Cpi%20f_%7B%5Cdelta%7Dt%7D" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(t)" border="0" alt="" align="absmiddle" /> is the  received signal</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" /> is the transmitted signal and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\delta}" border="0" alt="" align="absmiddle" /> is the frequency offset.</p>
<h2>Effect of frequency offset in OFDM receiver</h2>
<p>Let us assume that the frequency offset <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\delta}" border="0" alt="" align="absmiddle" /> is a fraction of subcarrier spacing <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?1/T" border="0" alt="" align="absmiddle" /> i.e.<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\delta}=\frac{\delta}{T}" border="0" alt="" align="absmiddle" />.</p>
<p>Also, for simplifying the equations, lets us assume that the transmitted symbols on all subcarriers,  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_k=1" border="0" alt="" align="absmiddle" /></p>
<p>The received signal is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(t) = s(t)e^{\frac{j2\pi\delta }{T}t}" border="0" alt="" align="absmiddle" />.</p>
<p>The output of the correlator for sub-carrier <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?m" border="0" alt="" align="absmiddle" /> is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{eqnarray}\frac{1}{\sqrt{T}}\int_Ty(t)e^{-\frac{j2\pi%20mt}{T}} &amp; = &amp; \frac{1}{T}\int_{T}e^{\frac{j2\pi (k+\delta-m)}{T}t},&amp; m=\in \{0,...,K-1\}\\ &amp; = &amp;  \frac{1}{j2\pi (k+\delta-m)}(e^{j2\pi (k+\delta-m)}-1) &amp; \end{eqnarray}" border="0" alt="" align="absmiddle" />.</p>
<p>For  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\delta=0" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{rrr}\frac{1}{j2\pi(k+\delta-m)}(e^{j2\pi%20(k+\delta-m)}-1)&amp;=1, &amp;m=k\\ \frac{1}{j2\pi(k+\delta-m)}(e^{j2\pi%20(k+\delta-m)}-1)&amp;=0, &amp;m \ne k\\\end{array}" border="0" alt="" align="absmiddle" /></p>
<p>The integral reduces to the OFDM receiver with no impairments case.</p>
<p>However for non zero values of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\delta" border="0" alt="" align="absmiddle" />, we can see that the amplitude of the correlation with subcarrier <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?m" border="0" alt="" align="absmiddle" /> includes</p>
<ul>
<li>distortion due to frequency offset between actual frequency <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{m+\delta}{T}" border="0" alt="" align="absmiddle" /> and the desired frequency <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{m}{T}" border="0" alt="" align="absmiddle" />.</li>
<li>distortion due to interference with other subcarriers with with desired frequency <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{m}{T}" border="0" alt="" align="absmiddle" />. This term is also known as <strong>Inter Carrier Interference (ICI)</strong>.</li>
</ul>
<h2>Simulation Model</h2>
<p>Click here to download the <a href="http://www.dsplog.com/db-install/wp-content/uploads/2009/08/script_frequency_offset_ofdm.m">Matlab/Octave script for computing RMS error with frequency offset</a>. The script performs the following:</p>
<p>1. Generates an OFDM symbol with all subcarriers modulated with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_k=1" border="0" alt="" align="absmiddle" />.</p>
<p>2. Introduce frequency offset and add noise to result in <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{E_b}{N_0}" border="0" alt="" align="absmiddle" />=30dB.</p>
<p>3. Perform demodulation at the receiver.</p>
<p>4. Find the difference between the desired and actual constellation.</p>
<p>5. Compute the rms value of error across all subcarriers.</p>
<p>6. Repeat this for different values of frequency offset.</p>
<p><img class="alignnone size-full wp-image-712" title="Plot of the magnitude of error vs frequency offset in OFDM" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/08/error_magnitude_vs_frequency_offset_ofdm.png" alt="Plot of the magnitude of error vs frequency offset in OFDM" width="448" height="336" /></p>
<p><strong>Figure: Error Magnitude vs frequency offset for OFDM</strong></p>
<h2>Observations</h2>
<p>The theoretical results are computed by <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\sum_m\frac{1}{j2\pi (k+\delta-m)}e^{j2\pi (k+\delta-m)}" border="0" alt="" align="absmiddle" />.</p>
<p>Quite likely the simulated results are slightly better than theoretical results because the simulated results are computed using average error for all subcarriers (and the subcarriers at the edge undergo lower distortion).</p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/' rel='bookmark' title='Frequency offset estimation using 802.11a short preamble'>Frequency offset estimation using 802.11a short preamble</a></li>
<li><a href='http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/' rel='bookmark' title='Understanding an OFDM transmission'>Understanding an OFDM transmission</a></li>
<li><a href='http://www.dsplog.com/2008/02/24/peak-to-average-power-ratio-for-ofdm/' rel='bookmark' title='Peak to Average Power Ratio for OFDM'>Peak to Average Power Ratio for OFDM</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>Softbit for 16QAM</title>
		<link>http://www.dsplog.com/2009/07/05/softbit-16qam/</link>
		<comments>http://www.dsplog.com/2009/07/05/softbit-16qam/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 17:05:53 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[16-QAM]]></category>
		<category><![CDATA[QAM]]></category>
		<category><![CDATA[Viterbi]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=636</guid>
		<description><![CDATA[In the post on Soft Input Viterbi decoder, we had discussed BPSK modulation with convolutional coding and soft input Viterbi decoding in AWGN channel. Let us know discuss the derivation of soft bits for 16QAM modulation scheme with Gray coded bit mapping. The channel is assumed to be AWGN alone. Gray Mapped 16-QAM constellation In [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/01/binary-to-gray-code-for-16qam/' rel='bookmark' title='Binary to Gray code for 16QAM'>Binary to Gray code for 16QAM</a></li>
<li><a href='http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/' rel='bookmark' title='16QAM Bit Error Rate (BER) with Gray mapping'>16QAM Bit Error Rate (BER) with Gray mapping</a></li>
<li><a href='http://www.dsplog.com/2008/05/18/bit-error-rate-for-16psk-modulation-using-gray-mapping/' rel='bookmark' title='Bit error rate for 16PSK modulation using Gray mapping'>Bit error rate for 16PSK modulation using Gray mapping</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>In the post on <a title="soft input Viterbi decoding in dspLog.com" href="http://www.dsplog.com/2009/01/14/soft-viterbi/">Soft Input Viterbi decoder</a>, we had discussed BPSK modulation with convolutional coding and soft input Viterbi decoding in AWGN channel. Let us know discuss the derivation of soft bits for 16QAM modulation scheme with Gray coded bit mapping. The channel is assumed to be AWGN alone.</p>
<p><span id="more-636"></span></p>
<h2>Gray Mapped 16-QAM constellation</h2>
<p>In the past, we had discussed <a title="BER for 16QAM in AWGN" href="http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/">BER for 16QAM in AWGN</a> modulation. The 4 bits in each constellation point can be considered as two bits each on independent 4-PAM modulation on I-axis and Q-axis respectively.</p>
<table border="1" cellspacing="0" frame="box" rules="groups">
<colgroup>
<col width="86"></col>
</colgroup>
<colgroup>
<col width="86"></col>
</colgroup>
<colgroup>
<col width="86"></col>
</colgroup>
<colgroup>
<col width="86"></col>
</colgroup>
<tbody>
<tr>
<td width="86" height="18" align="center"><strong>b0b1</strong></td>
<td width="86" align="center"><strong>I</strong></td>
<td width="86" align="center"><strong>b2b3</strong></td>
<td width="86" align="center"><strong>Q</strong></td>
</tr>
</tbody>
<tbody>
<tr>
<td height="18" align="center">00</td>
<td align="center">-3</td>
<td align="center">00</td>
<td align="center">-3</td>
</tr>
<tr>
<td height="18" align="center">01</td>
<td align="center">-1</td>
<td align="center">01</td>
<td align="center">-1</td>
</tr>
<tr>
<td height="18" align="center">11</td>
<td align="center">+1</td>
<td align="center">11</td>
<td align="center">+1</td>
</tr>
<tr>
<td height="18" align="center">10</td>
<td align="center">+3</td>
<td align="center">10</td>
<td align="center">+3</td>
</tr>
</tbody>
</table>
<p><strong>Table: Gray coded constellation mapping for 16-QAM</strong></p>
<p><img title="16QAM modulation with Gray coded mapping" src="http://www.dsplog.com/db-install/wp-content/uploads/2008/05/16qam_gray_mapping.png" alt="16QAM modulation with Gray coded mapping" width="448" height="336" /></p>
<p><strong>Figure: 16QAM constellation plot with Gray coded mapping</strong></p>
<h2><strong>Channel Model<br />
</strong></h2>
<p>The received coded sequence is</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y=c%20+%20n" 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 modulated coded sequence taking values in the alphabet</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Calpha_%7B16QAM%7D=%5Cleft%7B%5Cpm%201+%5Cpm%201j,%5C%20%5Cpm%201+%5Cpm%203j,%5C%5C%5Cpm%203%20+%20%5Cpm%203j,%5C%20%5Cpm%203+%5Cpm%201j%20%5Cright%7D" border="0" alt="" align="absmiddle" />.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" />is the Additive White Gaussian Noise following the probability distribution function,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?p%28n%29%20=%20%5Cfrac%7B1%7D%7B%5Csqrt%7B2%5Cpi%5Csigma%5E2%7D%7De%5E%7B%5Cfrac%7B-%28n-%5Cmu%29%5E2%7D%7B2%5Csigma%5E2%7D" border="0" alt="" align="absmiddle" /> with mean <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\mu=0" border="0" alt="" align="absmiddle" /> and 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>
<h2>Demodulation</h2>
<p>For demodulation, we would want to maximize the probability that the bit  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b_m" border="0" alt="" align="absmiddle" /> was transmitted given we received <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y" border="0" alt="" align="absmiddle" /> i.e <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(b_m|y)" border="0" alt="" align="absmiddle" />. This criterion is called <strong>Maximum a posteriori probability (MAP)</strong>.</p>
<p>Using <a title="wiki entry on Bayes rule " href="http://en.wikipedia.org/wiki/Bayes%27_theorem#Statement">Bayes rule</a>,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(b_m|y) = \frac{P(y|b_m)p(b_m)}{p(y)}" border="0" alt="" align="absmiddle" />.</p>
<p><strong>Note: </strong>The probability that all constellation points occur are equally likely, so maximizing <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(b_m|y)" border="0" alt="" align="absmiddle" /> is equivalent to maximizing <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P%28y%7Cb_m%29" border="0" alt="" align="absmiddle" />.</p>
<h2>Soft bit for b0</h2>
<p>The bit mapping for the <strong>bit b0</strong> with 16QAM Gray coded mapping is shown below. We can see that when b0 toggles from 0 to 1, only the real part of the constellation is affected.</p>
<p><img class="alignnone size-full wp-image-645" title="Bit maping for bit b0 is Gray coded 16QAM " src="http://www.dsplog.com/db-install/wp-content/uploads/2009/07/16qam_bit_mapping_bit_b0.png" alt="Bit maping for bit b0 is Gray coded 16QAM " width="400" height="138" /></p>
<p><strong>Figure: Bit b0 for 16QAM Gray coded mapping</strong></p>
<p>When the b0 is 0, the real part of the QAM constellation takes values -3 or -1. The conditional probability of the received signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y" border="0" alt="" align="absmiddle" /> given b0 is 0 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(y|b_0=0) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}+3)^2}{2\sigma^2}} + \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}" border="0" alt="" align="absmiddle" />.</p>
<p>When the bit0 is 1, the real part of the QAM constellation takes values +1 or +3. The conditional probability given b0 is zero is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(y|b_0=1) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}-1)^2}{2\sigma^2}} + \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}" border="0" alt="" align="absmiddle" />.</p>
<p>We can define a likelihood ratio that if</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b0=1,\ if \frac{P(y|b_0=1)}{P(y|b_0=0)}\ge0" border="0" alt="" align="absmiddle" />.</p>
<p>The likelihood ratio for b0 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_0=1)}{P(y|b_0=0)}=\frac{e^{\frac{-(y_{re}-1)^2}{2\sigma^2}} + e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}+e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<h3>Region #1 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}%20%3C%20-2" border="0" alt="" align="absmiddle" />)</h3>
<p>When <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re} &lt; -2" border="0" alt="" align="absmiddle" />, then we can assume that relative contribution by constellation +3 in the numerator and -1 in the denominator is less and can be ignored. So the likelihood ratio reduces to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_0=1)}{P(y|b_0=0)}\approx\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<p>Taking logarithm on both sides,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\ln\left(\frac{P(y|b_0=1)}{P(y|b_0=0)}\right)&amp;\approx&amp;\ln\left(\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}}\right)\\&amp;=&amp;\frac{1}{2\sigma^2}(y_{re}+3)^2-(y_{re}-1)^2\\&amp;=&amp;\frac{1}{\sigma^2}4(y_{re}+1)\end{array}" border="0" alt="" align="absmiddle" />.</p>
<h3>Region #2 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-2\le%20y_{re}%20%3C0" border="0" alt="" align="absmiddle" />), Region #3 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0%5Cle%20y_{re}%20%3C2" border="0" alt="" align="absmiddle" />)</h3>
<p>When <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-2\le y_{re} &lt;0" border="0" alt="" align="absmiddle" /> or <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0%5Cle%20y_{re}%20%3C2" border="0" alt="" align="absmiddle" />, then we can assume that relative contribution by constellation +3 in the numerator and -3 in the denominator is less and can be ignored. So the likelihood ratio reduces to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_0=1)}{P(y|b_0=0)}\approx\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<p>Taking logarithm on both sides,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\ln\left(\frac{P(y|b_0=1)}{P(y|b_0=0)}\right)&amp;\approx&amp;\ln\left(\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}\right)\\&amp;=&amp;\frac{1}{2\sigma^2}(y_{re}+1)^2-(y_{re}-1)^2\\&amp;=&amp;\frac{1}{\sigma^2}2r\end{array}" border="0" alt="" align="absmiddle" />.</p>
<h3>Region #4 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}\ge%202" border="0" alt="" align="absmiddle" />)</h3>
<p>If <strong><strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}\ge%202" border="0" alt="" align="absmiddle" /></strong></strong>, then we can assume that relative contribution by constellation +1 in the numerator and -3 in the denominator is less and can be ignored. So the likelihood ratio reduces to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_0=1)}{P(y|b_0=0)}\approx\frac{%20e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<p>Taking logarithm on both sides,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\ln\left(\frac{P(y|b_0=1)}{P(y|b_0=0)}\right)&amp;\approx&amp;\ln\left(\frac{%20e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}\right)\\&amp;=&amp;\frac{1}{2\sigma^2}(y_{re}+1)^2-(y_{re}-3)^2\\&amp;=&amp;\frac{1}{\sigma^2}4(y_{re}-1)\end{array}" border="0" alt="" align="absmiddle" />.</p>
<h2>Soft bit for b1</h2>
<p>The bit mapping for the <strong>bit b1</strong> with 16QAM Gray coded mapping is shown below. We can see that when b0 toggles from 0 to 1, only the real part of the constellation is affected.</p>
<p><img class="alignnone size-full wp-image-646" title="Gray coded 16QAM bit mapping for bit b1" src="http://www.dsplog.com/db-install/wp-content/uploads/2009/07/16qam_bit_mapping_bit_b1.png" alt="Gray coded 16QAM bit mapping for bit b1" width="400" height="138" /></p>
<p><strong>Figure: Bit b1 for 16QAM Gray coded mapping</strong></p>
<p>When the b1 is zero, the real part of the QAM constellation takes values -3 or +3. The conditional probability given b0 is zero is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(y|b_0=0) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}+3)^2}{2\sigma^2}} + \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}" border="0" alt="" align="absmiddle" />.</p>
<p>When the bit0 is 1, the real part of the QAM constellation takes values -1 or +1. The conditional probability given b0 is zero is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?P(y|b_1=1) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}+1)^2}{2\sigma^2}} + \frac{1}{\sqrt{2\pi \sigma^2}}e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}" border="0" alt="" align="absmiddle" />.</p>
<p>We can define a likelihood ratio that if</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b1=1,\ if \frac{P(y|b_1=1)}{P(y|b_1=0)}\ge0" border="0" alt="" align="absmiddle" />.</p>
<p>The likelihood ratio for b1 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_1=1)}{P(y|b_1=0)}=\frac{e^{\frac{-(y_{re}+1)^2}{2\sigma^2}} + e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}+e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<h3>Region #1 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}%20%3C%20-2" border="0" alt="" align="absmiddle" />), Region#2 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-2\le%20y_{re}%20%3C0" border="0" alt="" align="absmiddle" />)</h3>
<p>When <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re} &lt; -2" border="0" alt="" align="absmiddle" /> or <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?-2\le%20y_{re}%20%3C0" border="0" alt="" align="absmiddle" />, then we can assume that relative contribution by constellation +1 in the numerator and +3 in the denominator is less and can be ignored. So the likelihood ratio reduces to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_1=1)}{P(y|b_1=0)}\approx\frac{%20e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<p>Taking logarithm on both sides,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\ln\left(\frac{P(y|b_1=1)}{P(y|b_1=0)}\right)&amp;\approx&amp;\ln\left(\frac{%20e^{\frac{-(y_{re}+1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}+3)^2}{2\sigma^2}}}\right)\\&amp;=&amp;\frac{1}{2\sigma^2}(y_{re}+3)^2-(y_{re}+1)^2\\&amp;=&amp;\frac{2}{\sigma^2}(r+2)\end{array}" border="0" alt="" align="absmiddle" />.</p>
<h3>Region #3 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0%5Cle%20y_{re}%20%3C2" border="0" alt="" align="absmiddle" />), Region #4 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}\ge%202" border="0" alt="" align="absmiddle" />)</h3>
<p>If <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0%5Cle%20y_{re}%20%3C2" border="0" alt="" align="absmiddle" />or <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{re}\ge 2" border="0" alt="" align="absmiddle" />, then we can assume that relative contribution by constellation -1 in the numerator and -3 in the denominator is less and can be ignored. So the likelihood ratio reduces to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{P(y|b_1=1)}{P(y|b_1=0)}\approx\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}" border="0" alt="" align="absmiddle" />.</p>
<p>Taking logarithm on both sides,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lll}\ln\left(\frac{P(y|b_1=1)}{P(y|b_1=0)}\right)&amp;\approx&amp;\ln\left(\frac{%20e^{\frac{-(y_{re}-1)^2}{2\sigma^2}}}{e^{\frac{-(y_{re}-3)^2}{2\sigma^2}}}\right)\\&amp;=&amp;\frac{1}{2\sigma^2}(y_{re}-3)^2-(y_{re}-1)^2\\&amp;=&amp;\frac{2}{\sigma^2}(-y_{re}+2)\end{array}" border="0" alt="" align="absmiddle" />.</p>
<h2>Summary</h2>
<p>Note: As the factor  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\frac{2}{\sigma^2}" border="0" alt="" align="absmiddle" /> is common to all the terms, it can be removed.</p>
<p>The softbit for bit b0 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lllr}sb(b0) &amp; = &amp; 2(y_{re}+1), &amp; y_{re} &lt; -2 \\&lt;br /&gt; &amp; = &amp; y_{re}, &amp; -2 \le y_{re} &lt; 2\\ &amp; = &amp; 2(y_{re}-1), &amp; y_{re} &gt; 2\end{array}" border="0" alt="" align="absmiddle" /> .</p>
<p>The softbit for bit b1 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lllr}sb(b1) &amp; = &amp; y_{re}+2, &amp; y_{re} \le 0 \\&lt;br /&gt; &amp; = &amp; -y_{re} + 2, &amp;  y_{re} &gt; 0\end{array}" border="0" alt="" align="absmiddle" />.</p>
<p>The softbit for bit b1 can be simplified to,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lllr}sb(b1) &amp; = &amp; -|y_{re}|+2, &amp; \mbox{for all } y_{re}\end{array}" border="0" alt="" align="absmiddle" />.</p>
<p>It is easy to observe that the softbits for bits <strong>b2, b3</strong> are identical to softbits for <strong>b0, b1</strong> respectively except that the decisions are based on the imaginary component of the received vector <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y_{im}" border="0" alt="" align="absmiddle" />.</p>
<p>The softbit for bit b2 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lllr}sb(b2) &amp; = &amp; 2(y_{im}+1), &amp; y_{im} &lt; -2 \\&lt;br /&gt; &amp; = &amp; y_{im}, &amp; -2 \le y_{im} &lt; 2\\ &amp; = &amp; 2(y_{im}-1), &amp; y_{im} &gt; 2\end{array}" border="0" alt="" align="absmiddle" /> .</p>
<p>The softbit for bit b3 is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\begin{array}{lllr}sb(b3) &amp; = &amp; -|y_{im}|+2, &amp; \mbox{for all }y_{im}\end{array}" border="0" alt="" align="absmiddle" />.</p>
<p>As described in the paper, <a title="Softbit for OFDM in HiperLAN" href="http://www.hpl.hp.com/techreports/2001/HPL-2001-246.pdf">Simplified Soft-Output Demapper for Binary Interleaved COFDM with Application to HIPERLAN/2, <em>Filippo Tosato1, Paola Bisaglia, HPL-2001-246 October 10th , 2001</em>,</a> the term</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?2(y_{re}+1) \approx = y_{re}" border="0" alt="" align="absmiddle" /> and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?2(y_{im}+1) \approx = y_{im}" border="0" alt="" align="absmiddle" />,</p>
<p>This simplification avoids the need for having a threshold check in the receiver for sofbits b0 and b2 respectively.</p>
<h2>Reference</h2>
<p><a title="Softbit for OFDM in HiperLAN" href="http://www.hpl.hp.com/techreports/2001/HPL-2001-246.pdf">Simplified Soft-Output Demapper for Binary Interleaved COFDM with Application to HIPERLAN/2, <em>Filippo Tosato1, Paola Bisaglia, HPL-2001-246 October 10th , 2001</em></a></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/01/binary-to-gray-code-for-16qam/' rel='bookmark' title='Binary to Gray code for 16QAM'>Binary to Gray code for 16QAM</a></li>
<li><a href='http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/' rel='bookmark' title='16QAM Bit Error Rate (BER) with Gray mapping'>16QAM Bit Error Rate (BER) with Gray mapping</a></li>
<li><a href='http://www.dsplog.com/2008/05/18/bit-error-rate-for-16psk-modulation-using-gray-mapping/' rel='bookmark' title='Bit error rate for 16PSK modulation using Gray mapping'>Bit error rate for 16PSK modulation using Gray mapping</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2009/07/05/softbit-16qam/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Gray code to Binary conversion for PSK and PAM</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/</link>
		<comments>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comments</comments>
		<pubDate>Mon, 12 May 2008 00:47:05 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[Binary]]></category>
		<category><![CDATA[Gray]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/?p=151</guid>
		<description><![CDATA[Given that we have discussed Binary to Gray code conversion, let us discuss the Gray to BInary conversion. Conversion from Gray code to natural Binary Let be the equivalent Gray code for an bit binary number with representing the index of the bit. 1. For , i.e, the most significant bit (MSB) of the Gray [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/01/binary-to-gray-code-for-16qam/' rel='bookmark' title='Binary to Gray code for 16QAM'>Binary to Gray code for 16QAM</a></li>
<li><a href='http://www.dsplog.com/2008/05/11/binary-to-gray-code-conversion-psk-pam/' rel='bookmark' title='Binary to Gray code conversion for PSK and PAM'>Binary to Gray code conversion for PSK and PAM</a></li>
<li><a href='http://www.dsplog.com/2008/05/18/bit-error-rate-for-16psk-modulation-using-gray-mapping/' rel='bookmark' title='Bit error rate for 16PSK modulation using Gray mapping'>Bit error rate for 16PSK modulation using Gray mapping</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>Given that we have discussed <a title="Binary to Gray code conversion" href="http://www.dsplog.com/2008/05/11/binary-to-gray-code-conversion-psk-pam/" target="_self">Binary to Gray code conversion</a>, let us discuss the Gray to BInary conversion.</p>
<h2>Conversion from Gray code to natural Binary</h2>
<p>Let <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?g[n-1:0]" border="0" alt="" align="absmiddle" /> be the equivalent Gray code for an <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?n" border="0" alt="" align="absmiddle" /> bit binary number <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b[n-1:0]" border="0" alt="" align="absmiddle" /> with  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?j" border="0" alt="" align="absmiddle" /> representing the index of the bit.</p>
<p><strong>1.</strong> For <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?j=n-1" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b[n-1] = g[n-1]" border="0" alt="" align="absmiddle" /> i.e, the most significant bit (MSB) of the Gray code is same as the MSB of original binary number.</p>
<p><strong>2.</strong> For <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?j=n-2\mbox{ to }0" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?b[j]=b[j+1]\oplus g[j]" border="0" alt="" align="absmiddle" /> i.e, <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?j^{th}" border="0" alt="" align="absmiddle" /> bit of the Binary number is the exclusive-OR (XOR) of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?{j}^{th}" border="0" alt="" align="absmiddle" /> of the bit of the Gray code and <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?{j+1}^{th}" border="0" alt="" align="absmiddle" /> of the bit of the binary number.<span id="more-151"></span></p>
<h2>Simulation model</h2>
<p><span style="text-decoration: underline;"><strong>Look Up Table based Matlab/Octave mode for Gray to Binary conversion</strong></span><br />
<code><br />
clear<br />
% binary to gray code conversion<br />
ipBin = [0:15] ; % decimal equivalent for a 4-bit binary<br />
opGray = bitxor(ipBin,floor(ipBin/2))<br />
% Gray to Binary conversion<br />
[tt ind] = sort(opGray); % sorting Gray code elements to form the lookup table<br />
opBin = ind(opGray+1)-1; % picking elements from the array</code></p>
<p><span style="text-decoration: underline;"><strong>The Trick from <a title="Gray to Binary conversion from DSPGuru" href="http://www.dspguru.com/comp.dsp/tricks/alg/grayconv.htm" target="_self">DSP-Guru to do Gray to Binary</a><a title="Gray code to Binary code conversion from DSPGuru" href="http://www.dspguru.com/comp.dsp/tricks/alg/grayconv.htm" target="_blank"> conversion</a>, thanks to <a title="comp.dsp thread on Gray code generation" href="http://groups.google.co.in/group/comp.dsp/browse_thread/thread/081ff2279133b4c9#" target="_self">Jerry Avins</a>.</strong></span><br />
<code><br />
clear<br />
% binary to Gray code<br />
ipBin = [0:15]<br />
opGray = bitxor(ipBin,floor(ipBin/2))<br />
% Gray code to binary<br />
opBin = bitxor(opGray,floor(opGray/2^8)) ;<br />
opBin = bitxor(opBin,floor(opBin/2^4)) ;<br />
opBin = bitxor(opBin,floor(opBin/2^2)) ;<br />
opBin = bitxor(opBin,floor(opBin/2^1)) ;</code></p>
<h2>Concluding thoughts</h2>
<p>1. As on now, I do not understand how the <a title="Gray code to Binary code conversion from DSPGuru" href="http://www.dspguru.com/comp.dsp/tricks/alg/grayconv.htm" target="_blank">DSP Guru trick</a> for Gray code to Binary works. Of course, if I figure out, I will update this post. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>2. Having discussed Binary to Gray code conversion and Gray to Binary conversion, we are now armed  to discuss the bit-error rate probabilities for various modulation schemes (Recall: We have been discussing symbol error rate in Additive White Gaussian noise till date).</p>
<address>Thanks,</address>
<address>Krishna<br />
</address>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/01/binary-to-gray-code-for-16qam/' rel='bookmark' title='Binary to Gray code for 16QAM'>Binary to Gray code for 16QAM</a></li>
<li><a href='http://www.dsplog.com/2008/05/11/binary-to-gray-code-conversion-psk-pam/' rel='bookmark' title='Binary to Gray code conversion for PSK and PAM'>Binary to Gray code conversion for PSK and PAM</a></li>
<li><a href='http://www.dsplog.com/2008/05/18/bit-error-rate-for-16psk-modulation-using-gray-mapping/' rel='bookmark' title='Bit error rate for 16PSK modulation using Gray mapping'>Bit error rate for 16PSK modulation using Gray mapping</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Need for I-Q modulator and demodulator</title>
		<link>http://www.dsplog.com/2008/04/05/need-for-i-q-modulator-and-demodulator/</link>
		<comments>http://www.dsplog.com/2008/04/05/need-for-i-q-modulator-and-demodulator/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 02:07:05 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[Transmitter]]></category>
		<category><![CDATA[demodulator]]></category>
		<category><![CDATA[I-Q]]></category>
		<category><![CDATA[modulator]]></category>
		<category><![CDATA[PAM]]></category>
		<category><![CDATA[QAM]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/2008/04/05/need-for-i-q-modulator-and-demodulator/</guid>
		<description><![CDATA[Post describes about the need for I-Q modulation by comparing the spectral efficiency of passband PAM and passband QAM. 
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/18/bounds-on-communication-shannon-capacity/' rel='bookmark' title='Bounds on Communication based on Shannon&#8217;s capacity'>Bounds on Communication based on Shannon&#8217;s capacity</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/06/15/shannon-gaussian-channel-capacity-equation/' rel='bookmark' title='Understanding Shannon&#8217;s capacity equation'>Understanding Shannon&#8217;s capacity equation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>Some time back, a friend mentioned that he is yet to understand the need for having both in-phase (I) and quadrature-phase (Q) signals in typical wireless systems.</p>
<p>In this post, the attempt is to bring out the motivation for having I-Q modulation and present the block diagram of a simple I-Q modulator (and demodulator).</p>
<p>I am using the text provided in Sec 5.2.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><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" /> as reference.</p>
<h2>Baseband PAM transmission</h2>
<p>Consider a simple baseband transmission where the information is sent by modulating a pulse. This can be represented 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 thesymbol 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><span id="more-98"></span></p>
<p>Pictorially the same can be represented as,</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/baseband_transmit.png" alt="transmission of baseband PAM signal" width="300" height="81" /></p>
<p><strong>Figure: Baseband PAM transmission</strong> (Refer: Figure 5.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>To transmit  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?s(t)" border="0" alt="" align="absmiddle" /> undistorted through the channel, the minimum bandwidth required is half the symbol rate <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?frac{1}{2T}" border="0" alt="" align="absmiddle" /> (per the Nyquist criterion).</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/baseband_transmit1.png" alt="Spectrum of baseband PAM" width="400" height="220" /></p>
<p><strong>Figure: Minimum bandwidth required for transmitting baseband PAM with symbol rate  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?frac{1}{T}" border="0" alt="" align="absmiddle" /></strong></p>
<p><span style="text-decoration: underline;"><strong>Assuming that there are <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?N" border="0" alt="" align="absmiddle" /> alphabets in <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" />, the spectral efficiency for basedband PAM is,</strong></span></p>
<p><strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?Gamma_{BB-PAM}=%7B%5Cfrac%7B%5Clog_2N%7D%7B%5Cfrac%7B1%7D%7B2T%7D%7D%7D/T=2T%5Clog_2N/T%20=%202%5Clog_2N" border="0" alt="" align="absmiddle" />bits/second/Hertz.</strong></p>
<p>BB-PAM : Baseband PAM<br />
<a name="Passband PAM"></a></p>
<h2>Passband PAM transmission</h2>
<p>Now, consider that the baseband PAM signal is upconverted to a carrier frequency <strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_c" border="0" alt="" align="absmiddle" /></strong> by multiplication by a carrier, i.e.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?hat{s}%28t%29%20=%5Csqrt2cos%282%5Cpi%20f_c%20t%29%20%5Csum_%7Bm=-%5Cinfty%7D%5E%7B%5Cinfty%7Da_mg%28t-mT%29" border="0" alt="" align="absmiddle" />.</p>
<p>The spectrum of the passband PAM is as shown below,</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/passband_transmit.png" alt="spectrum of passband PAM" width="400" height="134" /></p>
<p><strong> Figure: Spectrum of passband PAM</strong></p>
<p>To avoid transmit <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?hat{s}(t)" border="0" alt="" align="absmiddle" /> undistorted through the channel, we require a passband filter having bandwidth  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?frac{1}{T}" border="0" alt="" align="absmiddle" />.</p>
<p><span style="text-decoration: underline;"><strong>Assuming that there are <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?N" border="0" alt="" align="absmiddle" /> alphabets in <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?a_m" border="0" alt="" align="absmiddle" />, the spectral efficiency for passband PAM is,</strong></span></p>
<p><strong><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?Gamma_{PB-PAM}=%7B%5Cfrac%7B%5Clog_2N%7D%7B%5Cfrac%7B1%7D%7BT%7D%7D%7D/T=T%5Clog_2N/T%20=%20%5Clog_2N" border="0" alt="" align="absmiddle" />bits/second/Hertz.</strong></p>
<p>PB-PAM : PassBand PAM</p>
<p>Can see that spectral efficiency of passband PAM is <span style="text-decoration: underline;"><strong>half</strong></span> of baseband PAM.</p>
<p>Note:</p>
<p>Passband PAM is composed of real signals and real signals have symmetric spectra. So, half the bandwidth is not carrying any &#8216;extra&#8217; information.</p>
<h2>Moving to passband QAM</h2>
<p>It is known that if a sine wave and a cosine wave is periodic over time <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?T" border="0" alt="" align="absmiddle" />, then they are orthogonal i.e.<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cint_T%20%5Csin%20wt%20%5Ccos%20wt%20=%200" border="0" alt="" align="absmiddle" />.</p>
<p>Given so, a popular way which people came across to improve the efficiency of the passband PAM is to send information on the sine wave also in parallel, i.e.</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cbar%7Bs%7D%28t%29%20=%5Csqrt2%5Ccos%20%282%5Cpi%20f_c%20t%29%20%5Csum_%7Bm=-%5Cinfty%7D%5E%7B%5Cinfty%7Da^I_mg%28t-mT%29%20-%20%5Csqrt2%5Csin%20%282%5Cpi%20f_c%20t%29%20%5Csum_%7Bm=-%5Cinfty%7D%5E%7B%5Cinfty%7Da^Q_mg%28t-mT%29" border="0" alt="" align="absmiddle" />.</p>
<p>This forms the passband QAM modulation. This signal requires the same bandwidth as passband PAM, however carries twice the informtion. For notational convineance, the above signal can be represented mathematically as,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cbar%7Bs%7D%28t%29=%5Csqrt%7B2%7D%5CRe%20%5Cleft%5B%20%20%5Ctilde%7Bs%7D%28t%29e%5E%7Bj%5C2%5Cpi%20f_c%20t%7D%5Cright%5D" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Ctilde%7Bs%7D%28t%29=%5Csum_m%20%5Ctilde%7Ba%7D_mg%28t-mT%29" border="0" alt="" align="absmiddle" /> and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?tilde{a}_m=a^I_m+a^Q_m" border="0" alt="" align="absmiddle" />.</p>
<p>This forms the I-Q modulator circuit. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/iq_modulator.png" alt="IQ modulator" /></p>
<p><strong>Figure: IQ modulator</strong></p>
<p>The IQ demodulator can be visualized as shown in the figure below</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/04/iq_demodulator.png" alt="IQ demodulator" /></p>
<p><strong>Figure: IQ demodulator</strong></p>
<p>On the combined signal, downconvert the cosine (inphase, I) and the sine (quadrature Q) arms, then proceed to do independent demodulation on each arm.<br />
<a name="Summary"></a><br />
Summarizing,</p>
<p>(a) It is the need for improved spectral efficiency that resulted in I-Q modulation (and de-modulation).</p>
<p>(b) Another approach for improving the spectral efficiency of passband PAM is to filter away half the bandwidth (which is not carrying any &#8216;extra&#8217; information). This is called Single Sideband Modulation (SSB).</p>
<p>Anyhow, it seems that using I-Q modulation is simpler to implement than circuit for filtering away half the spectrum. So, I-Q modulation stays. <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><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>Thanks,<br />
Krishna</p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/06/18/bounds-on-communication-shannon-capacity/' rel='bookmark' title='Bounds on Communication based on Shannon&#8217;s capacity'>Bounds on Communication based on Shannon&#8217;s capacity</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/06/15/shannon-gaussian-channel-capacity-equation/' rel='bookmark' title='Understanding Shannon&#8217;s capacity equation'>Understanding Shannon&#8217;s capacity equation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/04/05/need-for-i-q-modulator-and-demodulator/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Frequency offset estimation using 802.11a short preamble</title>
		<link>http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/</link>
		<comments>http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 01:11:01 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[802.11a]]></category>
		<category><![CDATA[frequency offset]]></category>
		<category><![CDATA[OFDM]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/</guid>
		<description><![CDATA[From the previous post on OFDM (here), we have understood that an OFDM waveform is made of sum of multiple sinusoidals (also called subcarriers) each modulated independently. In this post, let us try to understand the estimation of frequency offset in a typical OFDM receiver (using the short preamble specified per IEEE 802.11a specification as [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/' rel='bookmark' title='Inter Carrier Interference (ICI) in OFDM due to frequency offset'>Inter Carrier Interference (ICI) in OFDM due to frequency offset</a></li>
<li><a href='http://www.dsplog.com/2011/10/22/back/' rel='bookmark' title='Back!'>Back!</a></li>
<li><a href='http://www.dsplog.com/2008/02/17/cylcic-prefix-in-orthogonal-frequency-division-multiplexing/' rel='bookmark' title='Cylcic prefix in Orthogonal Frequency Division Multiplexing'>Cylcic prefix in Orthogonal Frequency Division Multiplexing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>From the previous post on OFDM (<a href="http://www.dsplog.com/2008/02/03/understanding-an-ofdm-transmission/" target="_blank">here</a>), we have understood that an OFDM waveform is made of sum of multiple sinusoidals (also called subcarriers) each modulated independently. In this post, let us try to understand the estimation of frequency offset in a typical OFDM receiver (using the short preamble specified per <a href="http://standards.ieee.org/getieee802/download/802.11a-1999.pdf">IEEE 802.11a specification</a> as a reference).</p>
<h2>Understanding frequency offset</h2>
<p>In a typical wireless communication system, the signal to be transmitted is upconverted to a carrier frequency prior to transmission. The receiver is expected to tune to the same carrier frequency for downconverting the signal to baseband, prior to demodulation.</p>
<p><a title="Signal Up/Down conversion" href="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/signal_up_down_conversion.png"><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/signal_up_down_conversion.png" alt="Signal Up/Down conversion" width="384" height="274" /></a></p>
<p><strong>Figure: Up/down conversion</strong></p>
<p><span id="more-59"></span></p>
<p>However, due to device impairments the carrier frequency of the receiver need not be same as the carrier frequency of the transmitter. When this happens, the received baseband signal, instead of being centered at DC (0MHz), will be centered at a frequency <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\Delta}" border="0" alt="" align="absmiddle" />, where<br />
<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_%7B%5CDelta%7D%20=%20f_%7BTx%7D%20-%20f_%7BRx%7D" border="0" alt="" align="absmiddle" />.</p>
<p>The baseband representation is (ignoring noise),</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t%29%20=%20x%28t%29e%5E%7Bj2%5Cpi%20f_%7B%5CDelta%7Dt%7D" border="0" alt="" align="absmiddle" />, where</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(t)" border="0" alt="" align="absmiddle" /> is the  received signal</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x(t)" border="0" alt="" align="absmiddle" /> is the transmitted signal and</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\Delta}" border="0" alt="" align="absmiddle" /> is the frequency offset.</p>
<h2>Frequency offset estimation in 802.11a OFDM preamble</h2>
<p>From the <a href="http://standards.ieee.org/getieee802/download/802.11a-1999.pdf" target="_blank">IEEE 802.11a specifications</a> (Sec 17.3.3), it can be observed that each OFDM packet has a preamble structure formed using 10 short preambles of duration <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?0.8%5Cmu%20s" border="0" alt="" align="absmiddle" /> each. This short preamble is constructed by defining 12 subcarriers only (out of the available 52 subcarriers) where the modulation of individual subcarriers ensure a low <a href="http://www.dsplog.com/2008/02/24/peak-to-average-power-ratio-for-ofdm/">peak to average power ratio</a>.</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/short_preamble.png" alt="802.11a OFDM short preamble" width="446" height="167" /></p>
<p><strong> Figure: OFDM short preamble 802.11a specification</strong></p>
<p>From the equation defined in the previous section,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t%29%20=%20x%28t%29e%5E%7Bj2%5Cpi%20f_%7B%5CDelta%7Dt%7D" border="0" alt="" align="absmiddle" />.</p>
<p>Given that short preamble is perodic with <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cdelta%20t%20=%200.8%5Cmu%20s" border="0" alt="" align="absmiddle" />,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t-%5Cdelta%20t%29=x%28t%29e%5E%7Bj%5C2%20%5Cpi%20f_%7B%5CDelta%7D%20%28t-%20%5Cdelta%20t%29" border="0" alt="" align="absmiddle" />.</p>
<p>At the receiver as both  <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(t)" border="0" alt="" align="absmiddle" /> and <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t-%5Cdelta%20t%29" border="0" alt="" align="absmiddle" /> are known,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cbegin%7Beqnarray%7Dy%28t-%5Cdelta%20%20t%29%20y%5E*%28t%29%20&amp;%20=%20&amp;%20x%28t%29e%5E%7Bj2%20%5Cpi%20f_%7B%5CDelta%7D%28t-%5Cdelta%20t%29%7Dx%5E*%28t%29e%5E%7B-j2%20%5Cpi%20f_%7B%5CDelta%7Dt%7D%20%5C%5C%20&amp;%20=%20&amp;%7Cx%28t%29%7C%5E2e%5E%7Bj2%5Cpi%20f_%7B%5CDelta%7D-%5Cdelta%20t%7D%5Cend%7Beqnarray%7D" border="0" alt="" align="absmiddle" />.</p>
<p>Taking angle() of both sides of the equation</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cbegin%7Beqnarray%7D%5Cangle%7By%28t-%5Cdelta%20%20t%29%20y%5E*%28t%29%7D%20&amp;=&amp;%5Cangle%7B%7Cx%28t%29%7C%5E2e%5E%7Bj2%5Cpi%20f_%7B%5CDelta%7D-%5Cdelta%20t%7D%7D%5C%5C&amp;%20=&amp;-%202%5Cpi%20f_%7B%5CDelta%7D%5Cdelta%20t%5Cend%7Beqnarray%7D" border="0" alt="" align="absmiddle" />.</p>
<p>So, the frequency offset <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_{\Delta}" border="0" alt="" align="absmiddle" /> is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_%7B%5CDelta%7D=-%5Cfrac%7B%5Cangle%7By%28t-%5Cdelta%20t%29%20y^*%28t%29%7D%7D%7B2%5Cpi%20%5Cdelta%20t%7D" border="0" alt="" align="absmiddle" />. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Simulation model</h2>
<p>Simple Matlab/Octave script simulating generation of 802.11a short preamble, introducing frequency offset of 200kHz and estimating frequency offset  is provided. Click here to <a title="frequency offset estimation using 802.11a short preamble" href="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/frequencyoffsetestimateofdm.m">download</a>.</p>
<p><img src="http://www.dsplog.com/db-install/wp-content/uploads/2008/03/freqestimate.png" alt="plot of frequency offset estimate using 802.11a short preamble" width="448" height="336" /></p>
<p><strong>Figure: Plot of frequency offset estimate using 802.11a short preamble</strong></p>
<p>As can be observed starting from sample number 17 (i.e. after <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cdelta%20t%20=%200.8%5Cmu%20s,%5C%20fs=20MHz" border="0" alt="" align="absmiddle" /> ) and till samples number 160 (<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?8%5Cmu%20s,%5C%20%20fs=20MHz" border="0" alt="" align="absmiddle" />) the frequency offset estimate is available. For improving accuracy in the presence of noise, typically the output <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y%28t-%5Cdelta%20t%29y%5E*%28t%29" border="0" alt="" align="absmiddle" /> is accumulated prior to computation of angle.</p>
<h2>Maximum possible frequency offset which can be estimated</h2>
<p>It is known that limits of the phase estimated by the angle() function is from <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5B-%5Cpi,%20+%5Cpi%29" border="0" alt="" align="abdmiddle" />. Plugging this to the above equation, the minimum value of frequency offset value which can be estimated is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_%7B%5CDelta%20,%20min%7D=%5Cfrac%7B-%5Cpi%7D%7B2*pi*%5Cdelta%20t%7D%20=%20-625kHz" border="0" alt="" align="absmiddle" /></p>
<p>and the maximum value is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?f_%7B%5CDelta%20,%20max%7D=%5Cfrac%7B+%5Cpi%7D%7B2*pi*%5Cdelta%20t%7D%20=+%20625kHz" border="0" alt="" align="absmiddle" />.</p>
<p>From Sec17.3.9.4 (of <a href="http://standards.ieee.org/getieee802/download/802.11a-1999.pdf">IEEE 802.11a specification</a>), the center frequency tolerance is <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?%5Cpm%2020ppm" border="0" alt="" align="absmiddle" />. With a carrier frequency of 5.8GHz, this specification  corresponds to a frequency offset within the range <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\pm232kHz" border="0" alt="" align="absmiddle" />. Thankfully, this is within the &#8216;estimatable&#8217; range of frequency offsets which which can be estimated by the short preamble <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p><strong>Note:</strong><br />
We have not discussed the effect of inter carrier interference (ICI) between the sub-carriers which happens in the presence of frequency offset. Maybe we can discuss in a later post.</p>
<h2>References</h2>
<p>[802.11A] <a href="http://standards.ieee.org/getieee802/download/802.11a-1999.pdf" target="_blank">Wireless LAN Medium Access Control (MAC) and Physical (PHY) Layer specifications &#8211; High speed physical layer in 5GHz band</a></p>
<p>Hope this helps.<br />
Krishna</p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/' rel='bookmark' title='Inter Carrier Interference (ICI) in OFDM due to frequency offset'>Inter Carrier Interference (ICI) in OFDM due to frequency offset</a></li>
<li><a href='http://www.dsplog.com/2011/10/22/back/' rel='bookmark' title='Back!'>Back!</a></li>
<li><a href='http://www.dsplog.com/2008/02/17/cylcic-prefix-in-orthogonal-frequency-division-multiplexing/' rel='bookmark' title='Cylcic prefix in Orthogonal Frequency Division Multiplexing'>Cylcic prefix in Orthogonal Frequency Division Multiplexing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/feed/</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
		<item>
		<title>First order digital PLL for tracking constant phase offset</title>
		<link>http://www.dsplog.com/2007/06/10/first-order-digital-pll-for-tracking-constant-phase-offset/</link>
		<comments>http://www.dsplog.com/2007/06/10/first-order-digital-pll-for-tracking-constant-phase-offset/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 05:15:00 +0000</pubDate>
		<dc:creator>Krishna Sankar</dc:creator>
				<category><![CDATA[Receiver]]></category>
		<category><![CDATA[first order]]></category>
		<category><![CDATA[frequency offset]]></category>
		<category><![CDATA[phase]]></category>
		<category><![CDATA[PLL]]></category>

		<guid isPermaLink="false">http://www.dsplog.com/2007/06/10/first-order-digital-pll-for-tracking-constant-phase-offset/</guid>
		<description><![CDATA[Considering a typical scenario where there might exist a small phase offset between local oscillator between the transmitter and receiver. Figure 1 : Transmitter receiver with constant phase offset In such cases, it might be desirable to estimate and track the phase offset such that the performance of the receiver does not degrade. A simple [...]
Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/' rel='bookmark' title='Frequency offset estimation using 802.11a short preamble'>Frequency offset estimation using 802.11a short preamble</a></li>
<li><a href='http://www.dsplog.com/2007/03/25/zero-order-hold-and-first-order-hold-based-interpolation/' rel='bookmark' title='Zero-order hold and first-order hold based interpolation'>Zero-order hold and first-order hold based interpolation</a></li>
<li><a href='http://www.dsplog.com/2007/04/08/2nd-order-sigma-delta-modulator/' rel='bookmark' title='2nd order sigma delta modulator'>2nd order sigma delta modulator</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p>Considering a typical scenario where there might exist a small phase offset between local oscillator between the transmitter and receiver.</p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/8649381@N03/537288934/"><img src="http://farm2.static.flickr.com/1308/537288934_a0802bd11d.jpg" alt="tx_rx_phase_offset.gif" width="500" height="143" /></a></p>
<p>Figure 1 :</p>
<h4>Transmitter receiver with constant phase offset</h4>
<p>In such cases, it might be desirable to estimate and track the phase offset such that the performance of the receiver does not degrade.</p>
<p><span id="more-15"></span></p>
<p>A simple first order digital phase locked loop for tracking the constat phase offset can be as</p>
<p>Assuming that the transmitter signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x(n)" border="0" alt="" align="absmiddle" /> gets rotated by a constant phase <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\phi" border="0" alt="" align="absmiddle" />, the received signal <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(n) = x(n)e^{j\phi}" border="0" alt="" align="absmiddle" />. In a simple no-noise case, assuming that the phase offset is small (and the signal gets decoded correctly), the estimate of phase offset is,</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\theta(n) = \arg\left\{\hat{x}^\ast(n)y(n)\right\}" border="0" alt="" align="absmiddle" />.</p>
<p>Typically, a first order phase locked loop which converges to <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\phi" border="0" alt="" align="absmiddle" />is used for facilitating synchronous demodulation.</p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/8649381@N03/538176397/"><img src="http://farm2.static.flickr.com/1084/538176397_e6d193babb.jpg" alt="first order pll" width="500" height="322" /></a></p>
<p>Figure 2 :</p>
<h4>First order digital phase locked loop (PLL)</h4>
<p>(adapted from Fig 5.7 of [<a href="http://www.amazon.com/Synchronization-Techniques-Receivers-Applications-Communications/dp/0306457253">Mengali</a>])</p>
<p>The estimate <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\theta(n)" border="0" alt="" align="absmiddle" /> from each sampling instant is accumulated to form the estimate <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\hat{\phi}(n)" border="0" alt="" align="absmiddle" />. This estimated phase is removed from the received samples<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?y(n) = x(n)e^{j\phi(n)}" border="0" alt="" align="absmiddle" /> to generate <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?x(n)e^{j\phi(n) - j\hat{\phi}(n)}" border="0" alt="" align="absmiddle" />. The parameter<img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />is a non-zero positive constant in the range <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?(0\ 1]" border="0" alt="" align="absmiddle" /> controls the rate of convergence of the loop. Higher value of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />indicates faster convergence, but is more prone to noise effects. Lower value of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />is less noisy, but results in slower convergence.</p>
<p>Assuming <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha=1" border="0" alt="" align="absmiddle" />, the phase estimate at the output of the filter is</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\hat{\phi}(n) = \hat{\phi}(n-1) + \theta(n-1)" border="0" alt="" align="absmiddle" />.</p>
<p>Substituting, <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\theta(n) = \phi(n) - \hat{\phi}(n)" border="0" alt="" align="absmiddle" />, then</p>
<p><img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\hat{\phi}(n) = \hat{\phi}(n-1) + \phi(n-1) - \hat{\phi}(n-1)=\phi(n-1)" border="0" alt="" align="absmiddle" />.</p>
<p>A simple Matlab code to simulate this can be as follows:</p>
<p><span style="color: #0000ff;">% random +/-1 BPSK source<br />
xn = 2*(rand(1,1000) &gt;0.5) &#8211; 1;<br />
% introducing a phase offset of 20 degrees<br />
phiDeg = 20;<br />
phiRad = phiDeg*pi/180;<br />
yn = xn*exp(j*phiRad);<br />
% first order pll<br />
alpha = 0.01;<br />
phiHat = 0;<br />
for ii = 1:length(yn)<br />
yn(ii) = yn(ii)*exp(-j*phiHat);<br />
% demodulating circuit<br />
xHat = 2*real(yn(ii)&gt;0) -1 ;<br />
phiHatT = angle(conj(xHat)*yn(ii));<br />
% accumulation<br />
phiHat = alpha*phiHatT + phiHat;<br />
% dumping variables for plot<br />
phiHatDump(ii) = phiHat;<br />
end</span></p>
<p><span style="color: #0000ff;">plot(phiHatDump*180/pi,&#8217;r.-&#8217;)</span></p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/8649381@N03/538226983/"><img src="http://farm2.static.flickr.com/1343/538226983_8563a5df4a.jpg" alt="phiHat_n_alpha" width="500" height="375" /></a></p>
<p>Figure 3: Convergence of <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\hat{\phi}" border="0" alt="" align="absmiddle" />for two <img src="http://www.dsplog.com/cgi-bin/mimetex.cgi?\alpha" border="0" alt="" align="absmiddle" />values.</p>
<p>Reference:</p>
<p>[1] <a href="http://www.amazon.com/Synchronization-Techniques-Receivers-Applications-Communications/dp/0306457253">Synchronization Techniques for Digital Receivers (Applications of Communications Theory) by Umberto Mengali</a></p>
<p>Related posts:<ol>
<li><a href='http://www.dsplog.com/2008/03/03/frequency-offset-estimation-using-80211a-short-preamble/' rel='bookmark' title='Frequency offset estimation using 802.11a short preamble'>Frequency offset estimation using 802.11a short preamble</a></li>
<li><a href='http://www.dsplog.com/2007/03/25/zero-order-hold-and-first-order-hold-based-interpolation/' rel='bookmark' title='Zero-order hold and first-order hold based interpolation'>Zero-order hold and first-order hold based interpolation</a></li>
<li><a href='http://www.dsplog.com/2007/04/08/2nd-order-sigma-delta-modulator/' rel='bookmark' title='2nd order sigma delta modulator'>2nd order sigma delta modulator</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dsplog.com/2007/06/10/first-order-digital-pll-for-tracking-constant-phase-offset/feed/</wfw:commentRss>
		<slash:comments>3</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-11 00:20:24 -->
