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::AWGN_Channel 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_1AWGN__Channel.html">AWGN_Channel</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::AWGN_Channel Class Reference<br> |
---|
72 | <small> |
---|
73 | [<a class="el" href="group__channels.html">Channel Modeling</a>]</small> |
---|
74 | </h1><!-- doxytag: class="itpp::AWGN_Channel" -->Ordinary AWGN Channel for cvec or vec inputs and outputs. |
---|
75 | <a href="#_details">More...</a> |
---|
76 | <p> |
---|
77 | <code>#include <<a class="el" href="channel_8h-source.html">channel.h</a>></code> |
---|
78 | <p> |
---|
79 | |
---|
80 | <p> |
---|
81 | <a href="classitpp_1_1AWGN__Channel-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="7894594d815d194c44b191162289e764"></a><!-- doxytag: member="itpp::AWGN_Channel::AWGN_Channel" ref="7894594d815d194c44b191162289e764" args="(double noisevar=0.0)" --> |
---|
85 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1AWGN__Channel.html#7894594d815d194c44b191162289e764">AWGN_Channel</a> (double noisevar=0.0)</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Class constructor. Sets the noise variance (for complex-valued channels the sum of real and imaginary parts). <br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="edf43a1a192a6c474ef915c297e9fcbb"></a><!-- doxytag: member="itpp::AWGN_Channel::set_noise" ref="edf43a1a192a6c474ef915c297e9fcbb" args="(double noisevar)" --> |
---|
89 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1AWGN__Channel.html#edf43a1a192a6c474ef915c297e9fcbb">set_noise</a> (double noisevar)</td></tr> |
---|
90 | |
---|
91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set noise variance (for complex-valued channels the sum of real and imaginary parts). <br></td></tr> |
---|
92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13fb914542cdad6909fe9e866322a031"></a><!-- doxytag: member="itpp::AWGN_Channel::get_noise" ref="13fb914542cdad6909fe9e866322a031" args="() const " --> |
---|
93 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1AWGN__Channel.html#13fb914542cdad6909fe9e866322a031">get_noise</a> () const </td></tr> |
---|
94 | |
---|
95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get noise variance (for complex-valued channels the sum of real and imaginary parts). <br></td></tr> |
---|
96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="619607f240984d3c5564c057b60851dc"></a><!-- doxytag: member="itpp::AWGN_Channel::operator()" ref="619607f240984d3c5564c057b60851dc" args="(const cvec &input)" --> |
---|
97 | cvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1AWGN__Channel.html#619607f240984d3c5564c057b60851dc">operator()</a> (const cvec &input)</td></tr> |
---|
98 | |
---|
99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Feed the complex input <em>input</em> through the complex-valued AWGN channel. <br></td></tr> |
---|
100 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="afbd26438bc064a1bfca9c0b36830e64"></a><!-- doxytag: member="itpp::AWGN_Channel::operator()" ref="afbd26438bc064a1bfca9c0b36830e64" args="(const vec &input)" --> |
---|
101 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1AWGN__Channel.html#afbd26438bc064a1bfca9c0b36830e64">operator()</a> (const vec &input)</td></tr> |
---|
102 | |
---|
103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Feed the input <em>through</em> the real-valued AWGN channel. <br></td></tr> |
---|
104 | </table> |
---|
105 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
106 | Ordinary AWGN Channel for cvec or vec inputs and outputs. |
---|
107 | <p> |
---|
108 | For real signals, the input parameter (<em>noisevar</em>) denotes the noise variance per real dimension. Therefore, it should be set to <img class="formulaInl" alt="$N_0/2$" src="form_232.png">, where <img class="formulaInl" alt="$N_0$" src="form_233.png"> is the noise power spectral density. However, in case of complex signals, the input parameter (<em>noisevar</em>) represents the noise variance per complex dimension, i.e. the sum of the variances in the real and imaginary parts, and thus is equal to <img class="formulaInl" alt="$N_0$" src="form_233.png">.<p> |
---|
109 | Example: <div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="itcomm_8h.html" title="Include file for the IT++ communications module.">itpp/itcomm.h</a>></span> |
---|
110 | <span class="keyword">using namespace </span>itpp; |
---|
111 | |
---|
112 | <span class="keywordtype">int</span> main() { |
---|
113 | Initiate the <a class="code" href="classitpp_1_1AWGN__Channel.html#7894594d815d194c44b191162289e764" title="Class constructor. Sets the noise variance (for complex-valued channels the sum of...">AWGN_Channel</a> <span class="keyword">class</span> |
---|
114 | <span class="keywordtype">double</span> noisevar = 0.1; |
---|
115 | <a class="code" href="classitpp_1_1AWGN__Channel.html#7894594d815d194c44b191162289e764" title="Class constructor. Sets the noise variance (for complex-valued channels the sum of...">AWGN_Channel</a> awgn_channel(noisevar); |
---|
116 | |
---|
117 | Initiate a QPSK-modulator, and generate the transmitted signal |
---|
118 | QPSK qpsk; |
---|
119 | bvec transmitted_bits = <a class="code" href="group__randgen.html#g5aa06887cf1fd3301b040987924068f0" title="Generates a random bit (equally likely 0s and 1s).">randb</a>(20); |
---|
120 | cvec transmitted_signal = qpsk.modulate_bits(transmitted_bits); |
---|
121 | |
---|
122 | Usage of the member operator () |
---|
123 | cvec received_signal = awgn_channel(transmitted_signal); |
---|
124 | |
---|
125 | Demodulate the bits |
---|
126 | bvec received_bits = qpsk.demodulate_bits(received_signal); |
---|
127 | } |
---|
128 | </pre></div> <hr>The documentation for this class was generated from the following files:<ul> |
---|
129 | <li><a class="el" href="channel_8h-source.html">channel.h</a><li><a class="el" href="channel_8cpp.html">channel.cpp</a></ul> |
---|
130 | </div> |
---|
131 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
132 | <a href="http://www.doxygen.org/index.html"> |
---|
133 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
134 | </body> |
---|
135 | </html> |
---|