itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
sim_cofdm_demap.hpp
1 /*xxx
2 * \brief - SIM::cofdm_demap - demap [I,Q] QAM data carriers into QAM codes and BPSK pilot carriers into booleans
3 * \author maki
4 */
5 
6 #ifndef COFDM_DEMAP_HPP
7 #define COFDM_DEMAP_HPP
8 
9 #include <complex>
10 #include <itpp/itbase.h>
11 #include <itpp/itcomm.h>
12 #include "sim_qam_dem.hpp"
13 #include "sim\_sim_extension.hpp"
14 
15 using namespace itpp;
16 using namespace std;
17 
18 namespace SIM
19 {
20 
28 {
29 private:
30  cvec carriers;
31 
32  int NFFT;
33  double PA;
34 
35  qam_dem qamdem;
36  ivec data_carriers;
37  ivec pilots_carriers;
38  ivec zero_carriers;
39 
40 public:
41  ivec y0;
42 
44  {
45  NFFT = 256;
46  PA = 0.5;
47  qamdem.set_size(4);
48  y0.set_size(NFFT);
49  carriers.set_length(NFFT);
50  carriers = to_cvec(zeros(NFFT), zeros(NFFT));
51  data_carriers = to_ivec(itpp::linspace(0, NFFT - 1, NFFT));
52  pilots_carriers.set_size(0);
53  zero_carriers.set_size(0);
54  };
55 
57  {
58  };
59 
63  void set_NFFT(int n);
64 
68  void set_qam_size(int m);
69 
73  void set_PA(double pa);
74 
78  void set_data_carriers(ivec dc_indx);
79 
83  void set_pilots_carriers(ivec pc_indx);
84 
88  void set_zero_carriers(ivec zc_indx);
89 
93  void set_carriers(cvec c);
94 
98  ivec get_data();
99 
103  bvec get_pilots();
104 
110  imat process(const bvec &ce, const cmat &x);
111 
112 };
113 
114 
115 }
116 #endif //SIM_cofdm_mod
QAM demodulator Core function: SIM::qam_dem.process() .
Definition: sim_qam_dem.hpp:26
SIM layer implements low level simulation models with itpp base classes as operational types...
Definition: sim_amp.hpp:15
void set_size(int m)
Definition: sim_qam_dem.cpp:14
~cofdm_demap()
Definition: sim_cofdm_demap.hpp:56
de-mapper of COFDM carriers into QAM and BPSK symbol codes Core immediate functions: SIM::cofdm_dema...
Definition: sim_cofdm_demap.hpp:27
Definition: _sci_assert.cpp:35
ivec y0
y0[i] - QAM_CODES, BOOL_PILOTS for data carriers and pilots
Definition: sim_cofdm_demap.hpp:41
cofdm_demap()
Definition: sim_cofdm_demap.hpp:43