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::QAM 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 | <!-- |
---|
10 | function 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 | } |
---|
22 | function 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 | } |
---|
46 | window.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 Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related 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 List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1QAM.html">QAM</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::QAM Class Reference<br> |
---|
72 | <small> |
---|
73 | [<a class="el" href="group__modulators.html">Digital Modulation</a>]</small> |
---|
74 | </h1><!-- doxytag: class="itpp::QAM" --><!-- doxytag: inherits="Modulator< std::complex< double > >" -->M-ary <a class="el" href="classitpp_1_1QAM.html" title="M-ary QAM modulator with square lattice.">QAM</a> modulator with square lattice. |
---|
75 | <a href="#_details">More...</a> |
---|
76 | <p> |
---|
77 | <code>#include <<a class="el" href="modulator_8h-source.html">modulator.h</a>></code> |
---|
78 | <p> |
---|
79 | |
---|
80 | <p> |
---|
81 | <a href="classitpp_1_1QAM-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="a5b1798b2370c0648a61e102a0e852f3"></a><!-- doxytag: member="itpp::QAM::QAM" ref="a5b1798b2370c0648a61e102a0e852f3" args="()" --> |
---|
85 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#a5b1798b2370c0648a61e102a0e852f3">QAM</a> ()</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default Constructor. <br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bcab714c15a168763b39940be2ffb636"></a><!-- doxytag: member="itpp::QAM::QAM" ref="bcab714c15a168763b39940be2ffb636" args="(int M)" --> |
---|
89 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#bcab714c15a168763b39940be2ffb636">QAM</a> (int <a class="el" href="classitpp_1_1Modulator.html#a434960c7ff9e5356d832aa53b46930b">M</a>)</td></tr> |
---|
90 | |
---|
91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Class Constructor. <br></td></tr> |
---|
92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3c1e5de708ba4c2c007c5613e7f2d50e"></a><!-- doxytag: member="itpp::QAM::~QAM" ref="3c1e5de708ba4c2c007c5613e7f2d50e" args="()" --> |
---|
93 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#3c1e5de708ba4c2c007c5613e7f2d50e">~QAM</a> ()</td></tr> |
---|
94 | |
---|
95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> |
---|
96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec5d9e5188bc1ceca2a575f37f806a07"></a><!-- doxytag: member="itpp::QAM::set_M" ref="ec5d9e5188bc1ceca2a575f37f806a07" args="(int M)" --> |
---|
97 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#ec5d9e5188bc1ceca2a575f37f806a07">set_M</a> (int <a class="el" href="classitpp_1_1Modulator.html#a434960c7ff9e5356d832aa53b46930b">M</a>)</td></tr> |
---|
98 | |
---|
99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Change the size of the signal constellation. <br></td></tr> |
---|
100 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa8c6d12e65e8a145faabd11d0d6be92"></a><!-- doxytag: member="itpp::QAM::demodulate_bits" ref="fa8c6d12e65e8a145faabd11d0d6be92" args="(const cvec &signal, bvec &bits) const " --> |
---|
101 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#fa8c6d12e65e8a145faabd11d0d6be92">demodulate_bits</a> (const cvec &signal, bvec &bits) const </td></tr> |
---|
102 | |
---|
103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Hard demodulation of bits. <br></td></tr> |
---|
104 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bae9938fa352e6e79c7b61e5f2743748"></a><!-- doxytag: member="itpp::QAM::demodulate_bits" ref="bae9938fa352e6e79c7b61e5f2743748" args="(const cvec &signal) const " --> |
---|
105 | bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#bae9938fa352e6e79c7b61e5f2743748">demodulate_bits</a> (const cvec &signal) const </td></tr> |
---|
106 | |
---|
107 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Hard demodulation of bits. <br></td></tr> |
---|
108 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9722a6826869c6d6e15a9835d76239b"></a><!-- doxytag: member="itpp::QAM::set" ref="b9722a6826869c6d6e15a9835d76239b" args="(const Vec< std::complex< double > > &symbols, const ivec &bits2symbols)" --> |
---|
109 | virtual void </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>< std::complex< double > > &<a class="el" href="classitpp_1_1Modulator.html#3069840e9e7a44180615fb772cf9ae42">symbols</a>, const ivec &<a class="el" href="classitpp_1_1Modulator.html#3ca26614189cb7a66da369bf0c4b9070">bits2symbols</a>)</td></tr> |
---|
110 | |
---|
111 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the constellation to use in the modulator. <br></td></tr> |
---|
112 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6e7cfa06570e2a1de515be5222a53a83"></a><!-- doxytag: member="itpp::QAM::bits_per_symbol" ref="6e7cfa06570e2a1de515be5222a53a83" args="() const" --> |
---|
113 | virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#6e7cfa06570e2a1de515be5222a53a83">bits_per_symbol</a> () const</td></tr> |
---|
114 | |
---|
115 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns number of bits per symbol. <br></td></tr> |
---|
116 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28b1c28bf8f4596e4d5149f1f3c8cd76"></a><!-- doxytag: member="itpp::QAM::get_symbols" ref="28b1c28bf8f4596e4d5149f1f3c8cd76" args="() const" --> |
---|
117 | virtual <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex<br class="typebreak"> |
---|
118 | < double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#28b1c28bf8f4596e4d5149f1f3c8cd76">get_symbols</a> () const</td></tr> |
---|
119 | |
---|
120 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the symbol values used in the modulator. <br></td></tr> |
---|
121 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#a8186f0e837fd3d440a6acb7a0225d35">get_bits2symbols</a> () const</td></tr> |
---|
122 | |
---|
123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the bitmap, which maps input bits into symbols. <a href="#a8186f0e837fd3d440a6acb7a0225d35"></a><br></td></tr> |
---|
124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f7bde9d3bfa9e39c06017534e3f6647"></a><!-- doxytag: member="itpp::QAM::modulate" ref="4f7bde9d3bfa9e39c06017534e3f6647" args="(const ivec &symbolnumbers, Vec< std::complex< double > > &output) const" --> |
---|
125 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#4f7bde9d3bfa9e39c06017534e3f6647">modulate</a> (const ivec &symbolnumbers, <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > &output) const</td></tr> |
---|
126 | |
---|
127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Modulation of symbols. <br></td></tr> |
---|
128 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0cb2673987e110920b519c139cdebe1"></a><!-- doxytag: member="itpp::QAM::modulate" ref="e0cb2673987e110920b519c139cdebe1" args="(const ivec &symbolnumbers) const" --> |
---|
129 | virtual <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex<br class="typebreak"> |
---|
130 | < double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#e0cb2673987e110920b519c139cdebe1">modulate</a> (const ivec &symbolnumbers) const</td></tr> |
---|
131 | |
---|
132 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Modulation of symbols. <br></td></tr> |
---|
133 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="845b5fbf4dad59edd3772627250623a1"></a><!-- doxytag: member="itpp::QAM::demodulate" ref="845b5fbf4dad59edd3772627250623a1" args="(const Vec< std::complex< double > > &signal, ivec &output) const" --> |
---|
134 | virtual void </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>< std::complex< double > > &signal, ivec &output) const</td></tr> |
---|
135 | |
---|
136 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Demodulation of symbols. <br></td></tr> |
---|
137 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7f2c15efa18d1cb46b8c97723c11ec9d"></a><!-- doxytag: member="itpp::QAM::demodulate" ref="7f2c15efa18d1cb46b8c97723c11ec9d" args="(const Vec< std::complex< double > > &signal) const" --> |
---|
138 | virtual ivec </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>< std::complex< double > > &signal) const</td></tr> |
---|
139 | |
---|
140 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Demodulation of symbols. <br></td></tr> |
---|
141 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53826bf7e0ec83b99592235b0c2f6235"></a><!-- doxytag: member="itpp::QAM::modulate_bits" ref="53826bf7e0ec83b99592235b0c2f6235" args="(const bvec &bits, Vec< std::complex< double > > &output) const" --> |
---|
142 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#53826bf7e0ec83b99592235b0c2f6235">modulate_bits</a> (const bvec &bits, <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > &output) const</td></tr> |
---|
143 | |
---|
144 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Modulation of bits. <br></td></tr> |
---|
145 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="622fa1ce4243330b7efa0605a9492513"></a><!-- doxytag: member="itpp::QAM::modulate_bits" ref="622fa1ce4243330b7efa0605a9492513" args="(const bvec &bits) const" --> |
---|
146 | virtual <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex<br class="typebreak"> |
---|
147 | < double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#622fa1ce4243330b7efa0605a9492513">modulate_bits</a> (const bvec &bits) const</td></tr> |
---|
148 | |
---|
149 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Modulation of bits. <br></td></tr> |
---|
150 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d03bbe8bd467898f149d5f134f6f120"></a><!-- doxytag: member="itpp::QAM::demodulate_bits" ref="4d03bbe8bd467898f149d5f134f6f120" args="(const Vec< std::complex< double > > &signal, bvec &bits) const" --> |
---|
151 | virtual void </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>< std::complex< double > > &signal, bvec &bits) const</td></tr> |
---|
152 | |
---|
153 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Hard demodulation of bits. <br></td></tr> |
---|
154 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e3432dad687ac0ee102c208e34920f8"></a><!-- doxytag: member="itpp::QAM::demodulate_bits" ref="9e3432dad687ac0ee102c208e34920f8" args="(const Vec< std::complex< double > > &signal) const" --> |
---|
155 | virtual bvec </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>< std::complex< double > > &signal) const</td></tr> |
---|
156 | |
---|
157 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Hard demodulation of bits. <br></td></tr> |
---|
158 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </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>< std::complex< double > > &rx_symbols, double N0, vec &soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr> |
---|
159 | |
---|
160 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Soft demodulator for AWGN channels. <a href="#9beffaf8f69378f9c20a85f3023bd9af"></a><br></td></tr> |
---|
161 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9cba88e460e11775fb72d21b543c375"></a><!-- doxytag: member="itpp::QAM::demodulate_soft_bits" ref="a9cba88e460e11775fb72d21b543c375" args="(const Vec< std::complex< double > > &rx_symbols, double N0, Soft_Method method=LOGMAP) const" --> |
---|
162 | virtual vec </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>< std::complex< double > > &rx_symbols, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr> |
---|
163 | |
---|
164 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Soft demodulator for AWGN channels. <br></td></tr> |
---|
165 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </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>< std::complex< double > > &rx_symbols, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > &channel, double N0, vec &soft_bits, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr> |
---|
166 | |
---|
167 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Soft demodulator for fading channels. <a href="#bd014d868b4f883712f92a7130401714"></a><br></td></tr> |
---|
168 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e40b7afd0d38d2d86b561b9dff6f55fd"></a><!-- doxytag: member="itpp::QAM::demodulate_soft_bits" ref="e40b7afd0d38d2d86b561b9dff6f55fd" args="(const Vec< std::complex< double > > &rx_symbols, const Vec< std::complex< double > > &channel, double N0, Soft_Method method=LOGMAP) const" --> |
---|
169 | virtual vec </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>< std::complex< double > > &rx_symbols, const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > &channel, double N0, <a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> method=LOGMAP) const</td></tr> |
---|
170 | |
---|
171 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Soft demodulator for fading channels. <br></td></tr> |
---|
172 | <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> |
---|
173 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb3e654a3fb6d127ee8d266677689233"></a><!-- doxytag: member="itpp::QAM::calculate_softbit_matrices" ref="bb3e654a3fb6d127ee8d266677689233" args="()" --> |
---|
174 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#bb3e654a3fb6d127ee8d266677689233">calculate_softbit_matrices</a> ()</td></tr> |
---|
175 | |
---|
176 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This function calculates the soft bit mapping matrices S0 and S1. <br></td></tr> |
---|
177 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
178 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2c1d5047f75d9a43e0a7c165a69d165"></a><!-- doxytag: member="itpp::QAM::L" ref="d2c1d5047f75d9a43e0a7c165a69d165" args="" --> |
---|
179 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#d2c1d5047f75d9a43e0a7c165a69d165">L</a></td></tr> |
---|
180 | |
---|
181 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The square-root of M. <br></td></tr> |
---|
182 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="234cc9d2e3b6a0eb76af03371e3472a9"></a><!-- doxytag: member="itpp::QAM::scaling_factor" ref="234cc9d2e3b6a0eb76af03371e3472a9" args="" --> |
---|
183 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1QAM.html#234cc9d2e3b6a0eb76af03371e3472a9">scaling_factor</a></td></tr> |
---|
184 | |
---|
185 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Scaling factor of square <a class="el" href="classitpp_1_1QAM.html" title="M-ary QAM modulator with square lattice.">QAM</a> constellation (sqrt((M-1)*2/3)). <br></td></tr> |
---|
186 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="552cd7add3e998eca485d0ea39808e0d"></a><!-- doxytag: member="itpp::QAM::setup_done" ref="552cd7add3e998eca485d0ea39808e0d" args="" --> |
---|
187 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#552cd7add3e998eca485d0ea39808e0d">setup_done</a></td></tr> |
---|
188 | |
---|
189 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Setup indicator. <br></td></tr> |
---|
190 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3656edc52486e0551b734b32ab67d3b6"></a><!-- doxytag: member="itpp::QAM::k" ref="3656edc52486e0551b734b32ab67d3b6" args="" --> |
---|
191 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3656edc52486e0551b734b32ab67d3b6">k</a></td></tr> |
---|
192 | |
---|
193 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of bits per modulation symbol. <br></td></tr> |
---|
194 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a434960c7ff9e5356d832aa53b46930b"></a><!-- doxytag: member="itpp::QAM::M" ref="a434960c7ff9e5356d832aa53b46930b" args="" --> |
---|
195 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#a434960c7ff9e5356d832aa53b46930b">M</a></td></tr> |
---|
196 | |
---|
197 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of modulation symbols. <br></td></tr> |
---|
198 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1b1a9a706c0736c51966703bea58cf48"></a><!-- doxytag: member="itpp::QAM::bitmap" ref="1b1a9a706c0736c51966703bea58cf48" args="" --> |
---|
199 | <a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#1b1a9a706c0736c51966703bea58cf48">bitmap</a></td></tr> |
---|
200 | |
---|
201 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Bit to symbol mapping table (size: M x k). <br></td></tr> |
---|
202 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ca26614189cb7a66da369bf0c4b9070"></a><!-- doxytag: member="itpp::QAM::bits2symbols" ref="3ca26614189cb7a66da369bf0c4b9070" args="" --> |
---|
203 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3ca26614189cb7a66da369bf0c4b9070">bits2symbols</a></td></tr> |
---|
204 | |
---|
205 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Bit to symbol mapping in decimal form (size: M). <br></td></tr> |
---|
206 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3069840e9e7a44180615fb772cf9ae42"></a><!-- doxytag: member="itpp::QAM::symbols" ref="3069840e9e7a44180615fb772cf9ae42" args="" --> |
---|
207 | <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#3069840e9e7a44180615fb772cf9ae42">symbols</a></td></tr> |
---|
208 | |
---|
209 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Corresponding modulation symbols (size: M). <br></td></tr> |
---|
210 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c19c8fe07e95e4eb80e832a633b7c422"></a><!-- doxytag: member="itpp::QAM::S0" ref="c19c8fe07e95e4eb80e832a633b7c422" args="" --> |
---|
211 | imat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#c19c8fe07e95e4eb80e832a633b7c422">S0</a></td></tr> |
---|
212 | |
---|
213 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix where row k contains the constellation points with '0' in bit position k. <br></td></tr> |
---|
214 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d4c223ffd96fdc5b26ba5c44956998b"></a><!-- doxytag: member="itpp::QAM::S1" ref="9d4c223ffd96fdc5b26ba5c44956998b" args="" --> |
---|
215 | imat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#9d4c223ffd96fdc5b26ba5c44956998b">S1</a></td></tr> |
---|
216 | |
---|
217 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix where row k contains the constellation points with '1' in bit position k. <br></td></tr> |
---|
218 | <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> |
---|
219 | <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> |
---|
220 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d47d1377dffb2aed9f21f8f976e80a0a"></a><!-- doxytag: member="itpp::QAM::Modulator_1D" ref="d47d1377dffb2aed9f21f8f976e80a0a" args="" --> |
---|
221 | typedef <a class="el" href="classitpp_1_1Modulator.html">Modulator</a>< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#d47d1377dffb2aed9f21f8f976e80a0a">Modulator_1D</a></td></tr> |
---|
222 | |
---|
223 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Definition of 1D Modulator (with real symbols). <br></td></tr> |
---|
224 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="97dc4e87ae4fa63c4e7dbbeac0ab00b0"></a><!-- doxytag: member="itpp::QAM::Modulator_2D" ref="97dc4e87ae4fa63c4e7dbbeac0ab00b0" args="" --> |
---|
225 | typedef <a class="el" href="classitpp_1_1Modulator.html">Modulator</a><br class="typebreak"> |
---|
226 | < std::complex< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Modulator.html#97dc4e87ae4fa63c4e7dbbeac0ab00b0">Modulator_2D</a></td></tr> |
---|
227 | |
---|
228 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Definition of 2D Modulator (with complex symbols). <br></td></tr> |
---|
229 | </table> |
---|
230 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
231 | M-ary <a class="el" href="classitpp_1_1QAM.html" title="M-ary QAM modulator with square lattice.">QAM</a> modulator with square lattice. |
---|
232 | <p> |
---|
233 | The size of the <a class="el" href="classitpp_1_1QAM.html" title="M-ary QAM modulator with square lattice.">QAM</a> constellation is <img class="formulaInl" alt="$M = 2^k$" src="form_256.png">, where <img class="formulaInl" alt="$k = 1, 2, \ldots $" src="form_257.png">. Symbol values in each dimension are: <img class="formulaInl" alt="$\{-(\sqrt{M}-1), \ldots, -3, -1, 1, 3, \ldots, (\sqrt{M}-1)\}$" src="form_258.png">. The bitmap is Gray encoded. Symbols are normalized so that the average energy is 1. That is, normalized with <img class="formulaInl" alt="$\sqrt{2(M-1)/3}$" src="form_259.png">.<p> |
---|
234 | Beside 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"> |
---|
235 | <img class="formulaDsp" alt="\[r_k = c_k s_k + n_k,\]" src="form_252.png"> |
---|
236 | <p> |
---|
237 | 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> |
---|
238 | It is also assumed that the channel estimates are perfect when calculating the soft bits. <hr><h2>Member Function Documentation</h2> |
---|
239 | <a class="anchor" name="bd014d868b4f883712f92a7130401714"></a><!-- doxytag: member="itpp::QAM::demodulate_soft_bits" ref="bd014d868b4f883712f92a7130401714" args="(const Vec< std::complex< double > > &rx_symbols, const Vec< std::complex< double > > &channel, double N0, vec &soft_bits, Soft_Method method=LOGMAP) const" --> |
---|
240 | <div class="memitem"> |
---|
241 | <div class="memproto"> |
---|
242 | <table class="memname"> |
---|
243 | <tr> |
---|
244 | <td class="memname">virtual void <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>< std::complex< double > >::demodulate_soft_bits </td> |
---|
245 | <td>(</td> |
---|
246 | <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > & </td> |
---|
247 | <td class="paramname"> <em>rx_symbols</em>, </td> |
---|
248 | </tr> |
---|
249 | <tr> |
---|
250 | <td class="paramkey"></td> |
---|
251 | <td></td> |
---|
252 | <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > & </td> |
---|
253 | <td class="paramname"> <em>channel</em>, </td> |
---|
254 | </tr> |
---|
255 | <tr> |
---|
256 | <td class="paramkey"></td> |
---|
257 | <td></td> |
---|
258 | <td class="paramtype">double </td> |
---|
259 | <td class="paramname"> <em>N0</em>, </td> |
---|
260 | </tr> |
---|
261 | <tr> |
---|
262 | <td class="paramkey"></td> |
---|
263 | <td></td> |
---|
264 | <td class="paramtype">vec & </td> |
---|
265 | <td class="paramname"> <em>soft_bits</em>, </td> |
---|
266 | </tr> |
---|
267 | <tr> |
---|
268 | <td class="paramkey"></td> |
---|
269 | <td></td> |
---|
270 | <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> </td> |
---|
271 | <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td> </td> |
---|
272 | </tr> |
---|
273 | <tr> |
---|
274 | <td></td> |
---|
275 | <td>)</td> |
---|
276 | <td></td><td></td><td> const<code> [virtual, inherited]</code></td> |
---|
277 | </tr> |
---|
278 | </table> |
---|
279 | </div> |
---|
280 | <div class="memdoc"> |
---|
281 | |
---|
282 | <p> |
---|
283 | Soft demodulator for fading channels. |
---|
284 | <p> |
---|
285 | This 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"> |
---|
286 | <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"> |
---|
287 | <p> |
---|
288 | or approximate, but faster calculation is performed.<p> |
---|
289 | The 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"> |
---|
290 | <img class="formulaDsp" alt="\[\frac{d_1^2 - d_0^2}{N_0}\]" src="form_272.png"> |
---|
291 | <p> |
---|
292 | <p> |
---|
293 | When 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> |
---|
294 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
295 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
296 | <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em> </td><td>The received noisy constellation symbols <img class="formulaInl" alt="$r_k$" src="form_278.png"> </td></tr> |
---|
297 | <tr><td valign="top"></td><td valign="top"><em>channel</em> </td><td>The channel values <img class="formulaInl" alt="$c_k$" src="form_253.png"> </td></tr> |
---|
298 | <tr><td valign="top"></td><td valign="top"><em>N0</em> </td><td>The spectral density of the AWGN noise </td></tr> |
---|
299 | <tr><td valign="top"></td><td valign="top"><em>soft_bits</em> </td><td>The soft bits calculated using the expression above </td></tr> |
---|
300 | <tr><td valign="top"></td><td valign="top"><em>method</em> </td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr> |
---|
301 | </table> |
---|
302 | </dl> |
---|
303 | <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> |
---|
304 | |
---|
305 | </div> |
---|
306 | </div><p> |
---|
307 | <a class="anchor" name="9beffaf8f69378f9c20a85f3023bd9af"></a><!-- doxytag: member="itpp::QAM::demodulate_soft_bits" ref="9beffaf8f69378f9c20a85f3023bd9af" args="(const Vec< std::complex< double > > &rx_symbols, double N0, vec &soft_bits, Soft_Method method=LOGMAP) const" --> |
---|
308 | <div class="memitem"> |
---|
309 | <div class="memproto"> |
---|
310 | <table class="memname"> |
---|
311 | <tr> |
---|
312 | <td class="memname">virtual void <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>< std::complex< double > >::demodulate_soft_bits </td> |
---|
313 | <td>(</td> |
---|
314 | <td class="paramtype">const <a class="el" href="classitpp_1_1Vec.html">Vec</a>< std::complex< double > > & </td> |
---|
315 | <td class="paramname"> <em>rx_symbols</em>, </td> |
---|
316 | </tr> |
---|
317 | <tr> |
---|
318 | <td class="paramkey"></td> |
---|
319 | <td></td> |
---|
320 | <td class="paramtype">double </td> |
---|
321 | <td class="paramname"> <em>N0</em>, </td> |
---|
322 | </tr> |
---|
323 | <tr> |
---|
324 | <td class="paramkey"></td> |
---|
325 | <td></td> |
---|
326 | <td class="paramtype">vec & </td> |
---|
327 | <td class="paramname"> <em>soft_bits</em>, </td> |
---|
328 | </tr> |
---|
329 | <tr> |
---|
330 | <td class="paramkey"></td> |
---|
331 | <td></td> |
---|
332 | <td class="paramtype"><a class="el" href="group__modulators.html#g5128af4688e1a1caa84e1fabf051faa7">Soft_Method</a> </td> |
---|
333 | <td class="paramname"> <em>method</em> = <code>LOGMAP</code></td><td> </td> |
---|
334 | </tr> |
---|
335 | <tr> |
---|
336 | <td></td> |
---|
337 | <td>)</td> |
---|
338 | <td></td><td></td><td> const<code> [virtual, inherited]</code></td> |
---|
339 | </tr> |
---|
340 | </table> |
---|
341 | </div> |
---|
342 | <div class="memdoc"> |
---|
343 | |
---|
344 | <p> |
---|
345 | Soft demodulator for AWGN channels. |
---|
346 | <p> |
---|
347 | This 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"> |
---|
348 | <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"> |
---|
349 | <p> |
---|
350 | or approximate, but faster calculation is performed.<p> |
---|
351 | The 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"> |
---|
352 | <img class="formulaDsp" alt="\[\frac{d_1^2 - d_0^2}{N_0}\]" src="form_272.png"> |
---|
353 | <p> |
---|
354 | <p> |
---|
355 | This function can be used on channels where the channel gain <img class="formulaInl" alt="$c_k = 1$" src="form_273.png">.<p> |
---|
356 | When 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> |
---|
357 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
358 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
359 | <tr><td valign="top"></td><td valign="top"><em>rx_symbols</em> </td><td>The received noisy constellation symbols </td></tr> |
---|
360 | <tr><td valign="top"></td><td valign="top"><em>N0</em> </td><td>The spectral density of the AWGN noise </td></tr> |
---|
361 | <tr><td valign="top"></td><td valign="top"><em>soft_bits</em> </td><td>The soft bits calculated using the expression above </td></tr> |
---|
362 | <tr><td valign="top"></td><td valign="top"><em>method</em> </td><td>The method used for demodulation (LOGMAP or APPROX)</td></tr> |
---|
363 | </table> |
---|
364 | </dl> |
---|
365 | <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> |
---|
366 | |
---|
367 | </div> |
---|
368 | </div><p> |
---|
369 | <a class="anchor" name="a8186f0e837fd3d440a6acb7a0225d35"></a><!-- doxytag: member="itpp::QAM::get_bits2symbols" ref="a8186f0e837fd3d440a6acb7a0225d35" args="() const" --> |
---|
370 | <div class="memitem"> |
---|
371 | <div class="memproto"> |
---|
372 | <table class="memname"> |
---|
373 | <tr> |
---|
374 | <td class="memname">virtual ivec <a class="el" href="classitpp_1_1Modulator.html">itpp::Modulator</a>< std::complex< double > >::get_bits2symbols </td> |
---|
375 | <td>(</td> |
---|
376 | <td class="paramname"> </td> |
---|
377 | <td> ) </td> |
---|
378 | <td> const<code> [inline, virtual, inherited]</code></td> |
---|
379 | </tr> |
---|
380 | </table> |
---|
381 | </div> |
---|
382 | <div class="memdoc"> |
---|
383 | |
---|
384 | <p> |
---|
385 | Get the bitmap, which maps input bits into symbols. |
---|
386 | <p> |
---|
387 | The 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> |
---|
388 | <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> |
---|
389 | 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(); |
---|
390 | 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(); |
---|
391 | bvec in_bits = <span class="stringliteral">"100"</span> <span class="comment">// input bits</span> |
---|
392 | <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> |
---|
393 | <span class="comment">// mapping of d into PSK symbol using bits2sym and sym tables</span> |
---|
394 | std::complex<double> out_symbol = sym(bits2sym(d)); |
---|
395 | </pre></div> |
---|
396 | </div> |
---|
397 | </div><p> |
---|
398 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
399 | <li><a class="el" href="modulator_8h-source.html">modulator.h</a><li><a class="el" href="modulator_8cpp.html">modulator.cpp</a></ul> |
---|
400 | </div> |
---|
401 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
402 | <a href="http://www.doxygen.org/index.html"> |
---|
403 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
404 | </body> |
---|
405 | </html> |
---|