root/doc/html/classitpp_1_1BPSK__c.html @ 354

Revision 353, 47.4 kB (checked in by smidl, 16 years ago)

doc

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>mixpp: itpp::BPSK_c Class Reference</title>
4<link href="tabs.css" rel="stylesheet" type="text/css">
5<link href="doxygen.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.8 -->
8<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
56      <li><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
62      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
63      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
64      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
65    </ul>
66  </div>
67  <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1BPSK__c.html">BPSK_c</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::BPSK_c Class Reference<br>
72<small>
73[<a class="el" href="group__modulators.html">Digital Modulation</a>]</small>
74</h1><!-- doxytag: class="itpp::BPSK_c" --><!-- doxytag: inherits="itpp::PSK" --><a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> modulator with complex symbols. 
75<a href="#_details">More...</a>
76<p>
77<code>#include &lt;<a class="el" href="modulator_8h-source.html">modulator.h</a>&gt;</code>
78<p>
79
80<p>
81<a href="classitpp_1_1BPSK__c-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
82<tr><td></td></tr>
83<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
84<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9fec782b1b30ed82fe9501748e8dc77"></a><!-- doxytag: member="itpp::BPSK_c::BPSK_c" ref="b9fec782b1b30ed82fe9501748e8dc77" args="()" -->
85&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#b9fec782b1b30ed82fe9501748e8dc77">BPSK_c</a> ()</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="875e10dff64692bdccaa2893722bd823"></a><!-- doxytag: member="itpp::BPSK_c::~BPSK_c" ref="875e10dff64692bdccaa2893722bd823" args="()" -->
89virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#875e10dff64692bdccaa2893722bd823">~BPSK_c</a> ()</td></tr>
90
91<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
92<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="553f833f72bfedff81dbe8bd96b044da"></a><!-- doxytag: member="itpp::BPSK_c::modulate_bits" ref="553f833f72bfedff81dbe8bd96b044da" args="(const bvec &amp;bits, cvec &amp;output) const " -->
93void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#553f833f72bfedff81dbe8bd96b044da">modulate_bits</a> (const bvec &amp;bits, cvec &amp;output) const </td></tr>
94
95<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modulate bits into <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> symbols in complex domain. <br></td></tr>
96<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="602de97ff5d2d49c1bed878c06d3c08a"></a><!-- doxytag: member="itpp::BPSK_c::modulate_bits" ref="602de97ff5d2d49c1bed878c06d3c08a" args="(const bvec &amp;bits) const " -->
97cvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#602de97ff5d2d49c1bed878c06d3c08a">modulate_bits</a> (const bvec &amp;bits) const </td></tr>
98
99<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modulate bits into <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> symbols in complex domain. <br></td></tr>
100<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="442fa8ff1a0d59a1137587d82c2e51b5"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_bits" ref="442fa8ff1a0d59a1137587d82c2e51b5" args="(const cvec &amp;signal, bvec &amp;output) const " -->
101void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#442fa8ff1a0d59a1137587d82c2e51b5">demodulate_bits</a> (const cvec &amp;signal, bvec &amp;output) const </td></tr>
102
103<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Demodulate noisy <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> symbols in complex domain into bits. <br></td></tr>
104<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="27354a23209a8e9609e2872818f1223c"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_bits" ref="27354a23209a8e9609e2872818f1223c" args="(const cvec &amp;signal) const " -->
105bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#27354a23209a8e9609e2872818f1223c">demodulate_bits</a> (const cvec &amp;signal) const </td></tr>
106
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Demodulate noisy <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> symbols in complex domain into bits. <br></td></tr>
108<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#d36813fb58ef90ca61b622f8e981bdb1">demodulate_soft_bits</a> (const cvec &amp;rx_symbols, double N0, vec &amp;soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const </td></tr>
109
110<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for AWGN channel.  <a href="#d36813fb58ef90ca61b622f8e981bdb1"></a><br></td></tr>
111<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="553f79f8ca8c5353bb2d7ae8e7caa89e"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="553f79f8ca8c5353bb2d7ae8e7caa89e" args="(const cvec &amp;rx_symbols, double N0, Soft_Method method=LOGMAP) const " -->
112vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#553f79f8ca8c5353bb2d7ae8e7caa89e">demodulate_soft_bits</a> (const cvec &amp;rx_symbols, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const </td></tr>
113
114<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for AWGN channel. <br></td></tr>
115<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#dc23ca863435111308c979b81abd2a0b">demodulate_soft_bits</a> (const cvec &amp;rx_symbols, const cvec &amp;channel, double N0, vec &amp;soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const </td></tr>
116
117<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for a known channel in AWGN.  <a href="#dc23ca863435111308c979b81abd2a0b"></a><br></td></tr>
118<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74c920d0277137529e278250a4827e01"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="74c920d0277137529e278250a4827e01" args="(const cvec &amp;rx_symbols, const cvec &amp;channel, double N0, Soft_Method method=LOGMAP) const " -->
119vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BPSK__c.html#74c920d0277137529e278250a4827e01">demodulate_soft_bits</a> (const cvec &amp;rx_symbols, const cvec &amp;channel, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const </td></tr>
120
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for a known channel in AWGN. <br></td></tr>
122<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="879b97ace3a3b51a274c2838eddf78d4"></a><!-- doxytag: member="itpp::BPSK_c::set_M" ref="879b97ace3a3b51a274c2838eddf78d4" args="(int M)" -->
123void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1PSK.html#879b97ace3a3b51a274c2838eddf78d4">set_M</a> (int <a class="el" href="classitpp_1_1Modulator.html#a434960c7ff9e5356d832aa53b46930b">M</a>)</td></tr>
124
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the size of the signal constellation. <br></td></tr>
126<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d03bbe8bd467898f149d5f134f6f120"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_bits" ref="4d03bbe8bd467898f149d5f134f6f120" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;signal, bvec &amp;bits) const" -->
127virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#4d03bbe8bd467898f149d5f134f6f120">demodulate_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;signal, bvec &amp;bits) const</td></tr>
128
129<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hard demodulation of bits. <br></td></tr>
130<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e3432dad687ac0ee102c208e34920f8"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_bits" ref="9e3432dad687ac0ee102c208e34920f8" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;signal) const" -->
131virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#9e3432dad687ac0ee102c208e34920f8">demodulate_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;signal) const</td></tr>
132
133<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hard demodulation of bits. <br></td></tr>
134<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9722a6826869c6d6e15a9835d76239b"></a><!-- doxytag: member="itpp::BPSK_c::set" ref="b9722a6826869c6d6e15a9835d76239b" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;symbols, const ivec &amp;bits2symbols)" -->
135virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#b9722a6826869c6d6e15a9835d76239b">set</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;<a class="el" href="classitpp_1_1Modulator.html#3069840e9e7a44180615fb772cf9ae42">symbols</a>, const ivec &amp;<a class="el" href="classitpp_1_1Modulator.html#3ca26614189cb7a66da369bf0c4b9070">bits2symbols</a>)</td></tr>
136
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the constellation to use in the modulator. <br></td></tr>
138<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6e7cfa06570e2a1de515be5222a53a83"></a><!-- doxytag: member="itpp::BPSK_c::bits_per_symbol" ref="6e7cfa06570e2a1de515be5222a53a83" args="() const" -->
139virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#6e7cfa06570e2a1de515be5222a53a83">bits_per_symbol</a> () const</td></tr>
140
141<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns number of bits per symbol. <br></td></tr>
142<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28b1c28bf8f4596e4d5149f1f3c8cd76"></a><!-- doxytag: member="itpp::BPSK_c::get_symbols" ref="28b1c28bf8f4596e4d5149f1f3c8cd76" args="() const" -->
143virtual <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex<br class="typebreak">
144&lt; double &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#28b1c28bf8f4596e4d5149f1f3c8cd76">get_symbols</a> () const</td></tr>
145
146<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the symbol values used in the modulator. <br></td></tr>
147<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#a8186f0e837fd3d440a6acb7a0225d35">get_bits2symbols</a> () const</td></tr>
148
149<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the bitmap, which maps input bits into symbols.  <a href="#a8186f0e837fd3d440a6acb7a0225d35"></a><br></td></tr>
150<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f7bde9d3bfa9e39c06017534e3f6647"></a><!-- doxytag: member="itpp::BPSK_c::modulate" ref="4f7bde9d3bfa9e39c06017534e3f6647" args="(const ivec &amp;symbolnumbers, Vec&lt; std::complex&lt; double &gt; &gt; &amp;output) const" -->
151virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#4f7bde9d3bfa9e39c06017534e3f6647">modulate</a> (const ivec &amp;symbolnumbers, <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;output) const</td></tr>
152
153<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modulation of symbols. <br></td></tr>
154<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0cb2673987e110920b519c139cdebe1"></a><!-- doxytag: member="itpp::BPSK_c::modulate" ref="e0cb2673987e110920b519c139cdebe1" args="(const ivec &amp;symbolnumbers) const" -->
155virtual <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex<br class="typebreak">
156&lt; double &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#e0cb2673987e110920b519c139cdebe1">modulate</a> (const ivec &amp;symbolnumbers) const</td></tr>
157
158<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modulation of symbols. <br></td></tr>
159<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="845b5fbf4dad59edd3772627250623a1"></a><!-- doxytag: member="itpp::BPSK_c::demodulate" ref="845b5fbf4dad59edd3772627250623a1" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;signal, ivec &amp;output) const" -->
160virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#845b5fbf4dad59edd3772627250623a1">demodulate</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;signal, ivec &amp;output) const</td></tr>
161
162<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Demodulation of symbols. <br></td></tr>
163<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7f2c15efa18d1cb46b8c97723c11ec9d"></a><!-- doxytag: member="itpp::BPSK_c::demodulate" ref="7f2c15efa18d1cb46b8c97723c11ec9d" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;signal) const" -->
164virtual ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#7f2c15efa18d1cb46b8c97723c11ec9d">demodulate</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;signal) const</td></tr>
165
166<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Demodulation of symbols. <br></td></tr>
167<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53826bf7e0ec83b99592235b0c2f6235"></a><!-- doxytag: member="itpp::BPSK_c::modulate_bits" ref="53826bf7e0ec83b99592235b0c2f6235" args="(const bvec &amp;bits, Vec&lt; std::complex&lt; double &gt; &gt; &amp;output) const" -->
168virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#53826bf7e0ec83b99592235b0c2f6235">modulate_bits</a> (const bvec &amp;bits, <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;output) const</td></tr>
169
170<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modulation of bits. <br></td></tr>
171<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#9beffaf8f69378f9c20a85f3023bd9af">demodulate_soft_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, double N0, vec &amp;soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr>
172
173<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for AWGN channels.  <a href="#9beffaf8f69378f9c20a85f3023bd9af"></a><br></td></tr>
174<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9cba88e460e11775fb72d21b543c375"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="a9cba88e460e11775fb72d21b543c375" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, double N0, Soft_Method method=LOGMAP) const" -->
175virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#a9cba88e460e11775fb72d21b543c375">demodulate_soft_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr>
176
177<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for AWGN channels. <br></td></tr>
178<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#bd014d868b4f883712f92a7130401714">demodulate_soft_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;channel, double N0, vec &amp;soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr>
179
180<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for fading channels.  <a href="#bd014d868b4f883712f92a7130401714"></a><br></td></tr>
181<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e40b7afd0d38d2d86b561b9dff6f55fd"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="e40b7afd0d38d2d86b561b9dff6f55fd" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, const Vec&lt; std::complex&lt; double &gt; &gt; &amp;channel, double N0, Soft_Method method=LOGMAP) const" -->
182virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#e40b7afd0d38d2d86b561b9dff6f55fd">demodulate_soft_bits</a> (const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt; &amp;channel, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr>
183
184<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Soft demodulator for fading channels. <br></td></tr>
185<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
186<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb3e654a3fb6d127ee8d266677689233"></a><!-- doxytag: member="itpp::BPSK_c::calculate_softbit_matrices" ref="bb3e654a3fb6d127ee8d266677689233" args="()" -->
187void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#bb3e654a3fb6d127ee8d266677689233">calculate_softbit_matrices</a> ()</td></tr>
188
189<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function calculates the soft bit mapping matrices S0 and S1. <br></td></tr>
190<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
191<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="552cd7add3e998eca485d0ea39808e0d"></a><!-- doxytag: member="itpp::BPSK_c::setup_done" ref="552cd7add3e998eca485d0ea39808e0d" args="" -->
192bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#552cd7add3e998eca485d0ea39808e0d">setup_done</a></td></tr>
193
194<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup indicator. <br></td></tr>
195<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3656edc52486e0551b734b32ab67d3b6"></a><!-- doxytag: member="itpp::BPSK_c::k" ref="3656edc52486e0551b734b32ab67d3b6" args="" -->
196int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3656edc52486e0551b734b32ab67d3b6">k</a></td></tr>
197
198<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of bits per modulation symbol. <br></td></tr>
199<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a434960c7ff9e5356d832aa53b46930b"></a><!-- doxytag: member="itpp::BPSK_c::M" ref="a434960c7ff9e5356d832aa53b46930b" args="" -->
200int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#a434960c7ff9e5356d832aa53b46930b">M</a></td></tr>
201
202<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of modulation symbols. <br></td></tr>
203<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1b1a9a706c0736c51966703bea58cf48"></a><!-- doxytag: member="itpp::BPSK_c::bitmap" ref="1b1a9a706c0736c51966703bea58cf48" args="" -->
204<a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#1b1a9a706c0736c51966703bea58cf48">bitmap</a></td></tr>
205
206<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit to symbol mapping table (size: M x k). <br></td></tr>
207<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ca26614189cb7a66da369bf0c4b9070"></a><!-- doxytag: member="itpp::BPSK_c::bits2symbols" ref="3ca26614189cb7a66da369bf0c4b9070" args="" -->
208ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3ca26614189cb7a66da369bf0c4b9070">bits2symbols</a></td></tr>
209
210<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit to symbol mapping in decimal form (size: M). <br></td></tr>
211<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3069840e9e7a44180615fb772cf9ae42"></a><!-- doxytag: member="itpp::BPSK_c::symbols" ref="3069840e9e7a44180615fb772cf9ae42" args="" -->
212<a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3069840e9e7a44180615fb772cf9ae42">symbols</a></td></tr>
213
214<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Corresponding modulation symbols (size: M). <br></td></tr>
215<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c19c8fe07e95e4eb80e832a633b7c422"></a><!-- doxytag: member="itpp::BPSK_c::S0" ref="c19c8fe07e95e4eb80e832a633b7c422" args="" -->
216imat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#c19c8fe07e95e4eb80e832a633b7c422">S0</a></td></tr>
217
218<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix where row k contains the constellation points with '0' in bit position k. <br></td></tr>
219<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d4c223ffd96fdc5b26ba5c44956998b"></a><!-- doxytag: member="itpp::BPSK_c::S1" ref="9d4c223ffd96fdc5b26ba5c44956998b" args="" -->
220imat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#9d4c223ffd96fdc5b26ba5c44956998b">S1</a></td></tr>
221
222<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix where row k contains the constellation points with '1' in bit position k. <br></td></tr>
223<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
224<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
225<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d47d1377dffb2aed9f21f8f976e80a0a"></a><!-- doxytag: member="itpp::BPSK_c::Modulator_1D" ref="d47d1377dffb2aed9f21f8f976e80a0a" args="" -->
226typedef <a class="el" href="classitpp_1_1Modulator.html">Modulator</a>&lt; double &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#d47d1377dffb2aed9f21f8f976e80a0a">Modulator_1D</a></td></tr>
227
228<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Definition of 1D Modulator (with real symbols). <br></td></tr>
229<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="97dc4e87ae4fa63c4e7dbbeac0ab00b0"></a><!-- doxytag: member="itpp::BPSK_c::Modulator_2D" ref="97dc4e87ae4fa63c4e7dbbeac0ab00b0" args="" -->
230typedef <a class="el" href="classitpp_1_1Modulator.html">Modulator</a><br class="typebreak">
231&lt; std::complex&lt; double &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#97dc4e87ae4fa63c4e7dbbeac0ab00b0">Modulator_2D</a></td></tr>
232
233<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Definition of 2D Modulator (with complex symbols). <br></td></tr>
234</table>
235<hr><a name="_details"></a><h2>Detailed Description</h2>
236<a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> modulator with complex symbols.
237<p>
238This is a special version of the <a class="el" href="classitpp_1_1PSK.html" title="M-ary PSK modulator.">PSK</a> modulator with <img class="formulaInl" alt="$M = 2$" src="form_262.png"> constellation points. The following bit to symbol mapping is used:<ul>
239<li><img class="formulaInl" alt="$0 \rightarrow 1+0i$" src="form_263.png"></li><li><img class="formulaInl" alt="$1 \rightarrow -1+0i$" src="form_264.png">.</li></ul>
240<p>
241Beside hard demapping, this class can also perform soft demodulation, calculating the log-MAP estimate of the individual bits. To use it properly the received symbols should be equal to: <p class="formulaDsp">
242<img class="formulaDsp" alt="\[r_k = c_k s_k + n_k,\]" src="form_252.png">
243<p>
244 where <img class="formulaInl" alt="$c_k$" src="form_253.png"> is the real or complex channel gain, <img class="formulaInl" alt="$s_k$" src="form_254.png"> is the transmitted constellation symbol, and <img class="formulaInl" alt="$n_k$" src="form_255.png"> is the AWGN of the channel (with variance <img class="formulaInl" alt="$N_0$" src="form_233.png">).<p>
245It is also assumed that the channel estimates are perfect when calculating the soft bits.<p>
246<dl class="note" compact><dt><b>Note:</b></dt><dd>Although constellation points of the <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> modulator can be represented in the real domain only, this class uses complex signals to be compatible with other <a class="el" href="classitpp_1_1PSK.html" title="M-ary PSK modulator.">PSK</a> and <a class="el" href="classitpp_1_1QAM.html" title="M-ary QAM modulator with square lattice.">QAM</a> based modulators.</dd></dl>
247<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> </dd></dl>
248<hr><h2>Member Function Documentation</h2>
249<a class="anchor" name="bd014d868b4f883712f92a7130401714"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="bd014d868b4f883712f92a7130401714" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, const Vec&lt; std::complex&lt; double &gt; &gt; &amp;channel, double N0, vec &amp;soft_bits, Soft_Method method=LOGMAP) const" -->
250<div class="memitem">
251<div class="memproto">
252      <table class="memname">
253        <tr>
254          <td class="memname">virtual void <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>&lt; std::complex&lt; double &gt;  &gt;::demodulate_soft_bits           </td>
255          <td>(</td>
256          <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt;  &gt; &amp;&nbsp;</td>
257          <td class="paramname"> <em>rx_symbols</em>, </td>
258        </tr>
259        <tr>
260          <td class="paramkey"></td>
261          <td></td>
262          <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt;  &gt; &amp;&nbsp;</td>
263          <td class="paramname"> <em>channel</em>, </td>
264        </tr>
265        <tr>
266          <td class="paramkey"></td>
267          <td></td>
268          <td class="paramtype">double&nbsp;</td>
269          <td class="paramname"> <em>N0</em>, </td>
270        </tr>
271        <tr>
272          <td class="paramkey"></td>
273          <td></td>
274          <td class="paramtype">vec &amp;&nbsp;</td>
275          <td class="paramname"> <em>soft_bits</em>, </td>
276        </tr>
277        <tr>
278          <td class="paramkey"></td>
279          <td></td>
280          <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a>&nbsp;</td>
281          <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td>&nbsp;</td>
282        </tr>
283        <tr>
284          <td></td>
285          <td>)</td>
286          <td></td><td></td><td> const<code> [virtual, inherited]</code></td>
287        </tr>
288      </table>
289</div>
290<div class="memdoc">
291
292<p>
293Soft demodulator for fading channels.
294<p>
295This function calculates the log-likelihood ratio (LLR) of the received signal from fading channels. Depending on the soft demodulation method chosen, either full log-MAP calculation is performed (default method), according to the following equation: <p class="formulaDsp">
296<img class="formulaDsp" alt="\[\log \left( \frac{P(b_i=0|r)}{P(b_i=1|r)} \right) = \log \left( \frac{\sum_{s_i \in S_0} \exp \left( -\frac{|r_k - c_k s_i|^2}{N_0} \right)} {\sum_{s_i \in S_1} \exp \left( -\frac{|r_k - c_k s_i|^2}{N_0} \right)} \right) \]" src="form_275.png">
297<p>
298 or approximate, but faster calculation is performed.<p>
299The approximate method finds for each bit the closest constellation points that have zero and one in the corresponding position. Let <img class="formulaInl" alt="$d_0 = |r_k - c_k s_0|$" src="form_276.png"> denote the distance to the closest zero point and <img class="formulaInl" alt="$d_1 = |r_k - c_k s_1|$" src="form_277.png"> denote the distance to the closest one point for the corresponding bit respectively. The approximate algorithm then computes <p class="formulaDsp">
300<img class="formulaDsp" alt="\[\frac{d_1^2 - d_0^2}{N_0}\]" src="form_272.png">
301<p>
302<p>
303When this function is to be used together with MAP-based turbo decoding algorithms then the channel reliability factor <img class="formulaInl" alt="$L_c$" src="form_274.png"> of the turbo decoder shall be set to 1. The output from this function can also be used by a Viterbi decoder using an AWGN based metric calculation function.<p>
304<dl compact><dt><b>Parameters:</b></dt><dd>
305  <table border="0" cellspacing="2" cellpadding="0">
306    <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em>&nbsp;</td><td>The received noisy constellation symbols <img class="formulaInl" alt="$r_k$" src="form_278.png"> </td></tr>
307    <tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>The channel values <img class="formulaInl" alt="$c_k$" src="form_253.png"> </td></tr>
308    <tr><td valign="top"></td><td valign="top"><em>N0</em>&nbsp;</td><td>The spectral density of the AWGN noise </td></tr>
309    <tr><td valign="top"></td><td valign="top"><em>soft_bits</em>&nbsp;</td><td>The soft bits calculated using the expression above </td></tr>
310    <tr><td valign="top"></td><td valign="top"><em>method</em>&nbsp;</td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr>
311  </table>
312</dl>
313<dl class="note" compact><dt><b>Note:</b></dt><dd>For soft demodulation it is suggested to use the N-dimensional modulator (Modulator_ND) instead, which is based on the QLLR (quantized) arithmetic and therefore is faster. Please note, however, that mixed use of <code>Modulator_1D/<code>Modulator_2D</code> and</code> <code>Modulator_ND</code> is not advised. </dd></dl>
314
315</div>
316</div><p>
317<a class="anchor" name="9beffaf8f69378f9c20a85f3023bd9af"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="9beffaf8f69378f9c20a85f3023bd9af" args="(const Vec&lt; std::complex&lt; double &gt; &gt; &amp;rx_symbols, double N0, vec &amp;soft_bits, Soft_Method method=LOGMAP) const" -->
318<div class="memitem">
319<div class="memproto">
320      <table class="memname">
321        <tr>
322          <td class="memname">virtual void <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>&lt; std::complex&lt; double &gt;  &gt;::demodulate_soft_bits           </td>
323          <td>(</td>
324          <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>&lt; std::complex&lt; double &gt;  &gt; &amp;&nbsp;</td>
325          <td class="paramname"> <em>rx_symbols</em>, </td>
326        </tr>
327        <tr>
328          <td class="paramkey"></td>
329          <td></td>
330          <td class="paramtype">double&nbsp;</td>
331          <td class="paramname"> <em>N0</em>, </td>
332        </tr>
333        <tr>
334          <td class="paramkey"></td>
335          <td></td>
336          <td class="paramtype">vec &amp;&nbsp;</td>
337          <td class="paramname"> <em>soft_bits</em>, </td>
338        </tr>
339        <tr>
340          <td class="paramkey"></td>
341          <td></td>
342          <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a>&nbsp;</td>
343          <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td>&nbsp;</td>
344        </tr>
345        <tr>
346          <td></td>
347          <td>)</td>
348          <td></td><td></td><td> const<code> [virtual, inherited]</code></td>
349        </tr>
350      </table>
351</div>
352<div class="memdoc">
353
354<p>
355Soft demodulator for AWGN channels.
356<p>
357This function calculates the log-likelihood ratio (LLR) of the received signal from AWGN channels. Depending on the soft demodulation method chosen, either full log-MAP calculation is performed (default method), according to the following equation: <p class="formulaDsp">
358<img class="formulaDsp" alt="\[\log \left( \frac{P(b_i=0|r)}{P(b_i=1|r)} \right) = \log \left( \frac{\sum_{s_i \in S_0} \exp \left( -\frac{|r_k - s_i|^2}{N_0} \right)} {\sum_{s_i \in S_1} \exp \left( -\frac{|r_k - s_i|^2}{N_0} \right)} \right) \]" src="form_269.png">
359<p>
360 or approximate, but faster calculation is performed.<p>
361The approximate method finds for each bit the closest constellation points that have zero and one in the corresponding position. Let <img class="formulaInl" alt="$d_0 = |r_k - s_0|$" src="form_270.png"> denote the distance to the closest zero point and <img class="formulaInl" alt="$d_1 = |r_k - s_1|$" src="form_271.png"> denote the distance to the closest one point for the corresponding bit respectively. The approximate algorithm then computes <p class="formulaDsp">
362<img class="formulaDsp" alt="\[\frac{d_1^2 - d_0^2}{N_0}\]" src="form_272.png">
363<p>
364<p>
365This function can be used on channels where the channel gain <img class="formulaInl" alt="$c_k = 1$" src="form_273.png">.<p>
366When this function is to be used together with MAP-based turbo decoding algorithms then the channel reliability factor <img class="formulaInl" alt="$L_c$" src="form_274.png"> of the turbo decoder shall be set to 1. The output from this function can also be used by a Viterbi decoder using an AWGN based metric calculation function.<p>
367<dl compact><dt><b>Parameters:</b></dt><dd>
368  <table border="0" cellspacing="2" cellpadding="0">
369    <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em>&nbsp;</td><td>The received noisy constellation symbols </td></tr>
370    <tr><td valign="top"></td><td valign="top"><em>N0</em>&nbsp;</td><td>The spectral density of the AWGN noise </td></tr>
371    <tr><td valign="top"></td><td valign="top"><em>soft_bits</em>&nbsp;</td><td>The soft bits calculated using the expression above </td></tr>
372    <tr><td valign="top"></td><td valign="top"><em>method</em>&nbsp;</td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr>
373  </table>
374</dl>
375<dl class="note" compact><dt><b>Note:</b></dt><dd>For soft demodulation it is suggested to use the N-dimensional modulator (<code>Modulator_ND</code>) instead, which is based on the QLLR (quantized) arithmetic and therefore is faster. Please note, however, that mixed use of <code>Modulator_1D/<code>Modulator_2D</code> and</code> <code>Modulator_ND</code> is not advised. </dd></dl>
376
377</div>
378</div><p>
379<a class="anchor" name="dc23ca863435111308c979b81abd2a0b"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="dc23ca863435111308c979b81abd2a0b" args="(const cvec &amp;rx_symbols, const cvec &amp;channel, double N0, vec &amp;soft_bits, Soft_Method method=LOGMAP) const " -->
380<div class="memitem">
381<div class="memproto">
382      <table class="memname">
383        <tr>
384          <td class="memname">void itpp::BPSK_c::demodulate_soft_bits           </td>
385          <td>(</td>
386          <td class="paramtype">const cvec &amp;&nbsp;</td>
387          <td class="paramname"> <em>rx_symbols</em>, </td>
388        </tr>
389        <tr>
390          <td class="paramkey"></td>
391          <td></td>
392          <td class="paramtype">const cvec &amp;&nbsp;</td>
393          <td class="paramname"> <em>channel</em>, </td>
394        </tr>
395        <tr>
396          <td class="paramkey"></td>
397          <td></td>
398          <td class="paramtype">double&nbsp;</td>
399          <td class="paramname"> <em>N0</em>, </td>
400        </tr>
401        <tr>
402          <td class="paramkey"></td>
403          <td></td>
404          <td class="paramtype">vec &amp;&nbsp;</td>
405          <td class="paramname"> <em>soft_bits</em>, </td>
406        </tr>
407        <tr>
408          <td class="paramkey"></td>
409          <td></td>
410          <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a>&nbsp;</td>
411          <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td>&nbsp;</td>
412        </tr>
413        <tr>
414          <td></td>
415          <td>)</td>
416          <td></td><td></td><td> const<code> [virtual]</code></td>
417        </tr>
418      </table>
419</div>
420<div class="memdoc">
421
422<p>
423Soft demodulator for a known channel in AWGN.
424<p>
425This function calculates the log-MAP estimate assuming equally likely bits transmitted: <p class="formulaDsp">
426<img class="formulaDsp" alt="\[\log \left( \frac{P(b=0|r)}{P(b=1|r)} \right) = \frac{4 \Re\{r c^{*}\}}{N_0}\]" src="form_286.png">
427<p>
428<p>
429<dl compact><dt><b>Parameters:</b></dt><dd>
430  <table border="0" cellspacing="2" cellpadding="0">
431    <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em>&nbsp;</td><td>The received noisy constellation symbols, <img class="formulaInl" alt="$r$" src="form_281.png"> (complex but symbols in real part) </td></tr>
432    <tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>The channel coefficients, <img class="formulaInl" alt="$c$" src="form_284.png"> (complex) </td></tr>
433    <tr><td valign="top"></td><td valign="top"><em>N0</em>&nbsp;</td><td>The spectral density of the AWGN noise, <img class="formulaInl" alt="$n$" src="form_61.png"> </td></tr>
434    <tr><td valign="top"></td><td valign="top"><em>soft_bits</em>&nbsp;</td><td>The soft bits calculated using the expression above </td></tr>
435    <tr><td valign="top"></td><td valign="top"><em>method</em>&nbsp;</td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr>
436  </table>
437</dl>
438<dl class="note" compact><dt><b>Note:</b></dt><dd>For soft demodulation it is suggested to use the N-dimensional modulator (<a class="el" href="classitpp_1_1Modulator__ND.html" title="Base class for an N-dimensional (ND) vector (MIMO) modulator.">Modulator_ND</a>) instead, which is based on the QLLR (quantized) arithmetic and therefore is faster. Please note, however, that mixed use of <code>Modulator_1D/<code>Modulator_2D</code> and</code> <code><a class="el" href="classitpp_1_1Modulator__ND.html" title="Base class for an N-dimensional (ND) vector (MIMO) modulator.">Modulator_ND</a></code> is not advised. </dd></dl>
439
440<p>References <a class="el" href="fix__functions_8cpp-source.html#l00098">itpp::conj()</a>, and <a class="el" href="fix__functions_8cpp-source.html#l00084">itpp::real()</a>.</p>
441
442</div>
443</div><p>
444<a class="anchor" name="d36813fb58ef90ca61b622f8e981bdb1"></a><!-- doxytag: member="itpp::BPSK_c::demodulate_soft_bits" ref="d36813fb58ef90ca61b622f8e981bdb1" args="(const cvec &amp;rx_symbols, double N0, vec &amp;soft_bits, Soft_Method method=LOGMAP) const " -->
445<div class="memitem">
446<div class="memproto">
447      <table class="memname">
448        <tr>
449          <td class="memname">void itpp::BPSK_c::demodulate_soft_bits           </td>
450          <td>(</td>
451          <td class="paramtype">const cvec &amp;&nbsp;</td>
452          <td class="paramname"> <em>rx_symbols</em>, </td>
453        </tr>
454        <tr>
455          <td class="paramkey"></td>
456          <td></td>
457          <td class="paramtype">double&nbsp;</td>
458          <td class="paramname"> <em>N0</em>, </td>
459        </tr>
460        <tr>
461          <td class="paramkey"></td>
462          <td></td>
463          <td class="paramtype">vec &amp;&nbsp;</td>
464          <td class="paramname"> <em>soft_bits</em>, </td>
465        </tr>
466        <tr>
467          <td class="paramkey"></td>
468          <td></td>
469          <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a>&nbsp;</td>
470          <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td>&nbsp;</td>
471        </tr>
472        <tr>
473          <td></td>
474          <td>)</td>
475          <td></td><td></td><td> const<code> [virtual]</code></td>
476        </tr>
477      </table>
478</div>
479<div class="memdoc">
480
481<p>
482Soft demodulator for AWGN channel.
483<p>
484This function calculates the log-MAP estimate assuming equally likely bits transmitted: <p class="formulaDsp">
485<img class="formulaDsp" alt="\[\log \left( \frac{P(b=0|r)}{P(b=1|r)} \right) = \frac{4 \Re\{r\}} {N_0}\]" src="form_285.png">
486<p>
487<p>
488<dl compact><dt><b>Parameters:</b></dt><dd>
489  <table border="0" cellspacing="2" cellpadding="0">
490    <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em>&nbsp;</td><td>The received noisy constellation symbols, <img class="formulaInl" alt="$r$" src="form_281.png"> (complex but symbols in real part) </td></tr>
491    <tr><td valign="top"></td><td valign="top"><em>N0</em>&nbsp;</td><td>The spectral density of the AWGN noise, <img class="formulaInl" alt="$n$" src="form_61.png"> </td></tr>
492    <tr><td valign="top"></td><td valign="top"><em>soft_bits</em>&nbsp;</td><td>The soft bits calculated using the expression above </td></tr>
493    <tr><td valign="top"></td><td valign="top"><em>method</em>&nbsp;</td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr>
494  </table>
495</dl>
496<dl class="note" compact><dt><b>Note:</b></dt><dd>For soft demodulation it is suggested to use the N-dimensional modulator (<a class="el" href="classitpp_1_1Modulator__ND.html" title="Base class for an N-dimensional (ND) vector (MIMO) modulator.">Modulator_ND</a>) instead, which is based on the QLLR (quantized) arithmetic and therefore is faster. Please note, however, that mixed use of <code>Modulator_1D/<code>Modulator_2D</code> and</code> <code><a class="el" href="classitpp_1_1Modulator__ND.html" title="Base class for an N-dimensional (ND) vector (MIMO) modulator.">Modulator_ND</a></code> is not advised. </dd></dl>
497
498<p>References <a class="el" href="fix__functions_8cpp-source.html#l00084">itpp::real()</a>.</p>
499
500<p>Referenced by <a class="el" href="modulator_8cpp-source.html#l00270">demodulate_soft_bits()</a>.</p>
501
502</div>
503</div><p>
504<a class="anchor" name="a8186f0e837fd3d440a6acb7a0225d35"></a><!-- doxytag: member="itpp::BPSK_c::get_bits2symbols" ref="a8186f0e837fd3d440a6acb7a0225d35" args="() const" -->
505<div class="memitem">
506<div class="memproto">
507      <table class="memname">
508        <tr>
509          <td class="memname">virtual ivec <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>&lt; std::complex&lt; double &gt;  &gt;::get_bits2symbols           </td>
510          <td>(</td>
511          <td class="paramname">          </td>
512          <td>&nbsp;)&nbsp;</td>
513          <td> const<code> [inline, virtual, inherited]</code></td>
514        </tr>
515      </table>
516</div>
517<div class="memdoc">
518
519<p>
520Get the bitmap, which maps input bits into symbols.
521<p>
522The mapping is done as follows. An input bit sequence in decimal notation is used for indexing the <code>bits2symbols</code> table. The indexing result denotes the symbol to be used from the <code>symbols</code> table, e.g.:<p>
523<div class="fragment"><pre class="fragment"> PSK <a class="code" href="group__miscfunc.html#g441f466a2b056fe5f2b05fcd894c472f" title="Calculates the modulus, i.e. the signed reminder after division.">mod</a>(8); <span class="comment">// assume 8-PSK modulator</span>
524 cvec sym =  <a class="code" href="group__miscfunc.html#g441f466a2b056fe5f2b05fcd894c472f" title="Calculates the modulus, i.e. the signed reminder after division.">mod</a>.get_symbols();
525 ivec bits2sym = <a class="code" href="group__miscfunc.html#g441f466a2b056fe5f2b05fcd894c472f" title="Calculates the modulus, i.e. the signed reminder after division.">mod</a>.get_bits2symbols();
526 bvec in_bits = <span class="stringliteral">"100"</span> <span class="comment">// input bits</span>
527 <span class="keywordtype">int</span> d = <a class="code" href="group__convertfunc.html#g698adf78bc0f9d36fd5987bc87d543fa" title="Convert a bvec to decimal int with the first bit as MSB if msb_first == true.">bin2dec</a>(in_bits); <span class="comment">// decimal representation of in_bits = 4</span>
528 <span class="comment">// mapping of d into PSK symbol using bits2sym and sym tables</span>
529 std::complex&lt;double&gt; out_symbol = sym(bits2sym(d));
530</pre></div> 
531</div>
532</div><p>
533<hr>The documentation for this class was generated from the following files:<ul>
534<li><a class="el" href="modulator_8h-source.html">modulator.h</a><li><a class="el" href="modulator_8cpp.html">modulator.cpp</a></ul>
535</div>
536<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by&nbsp;
537<a href="http://www.doxygen.org/index.html">
538<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
539</body>
540</html>
Note: See TracBrowser for help on using the browser.