00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef EQUALIZER_H
00030 #define EQUALIZER_H
00031
00032 #include <basicdevice.h>
00033 #include <phbib.h>
00034 #include <signals.h>
00035 #include "matrixseq.h"
00036 #include "arith.h"
00037
00038 namespace mimo {
00039
00050 class Equalizer : public simth::Device
00051 {
00052 private:
00053 void init();
00054 protected:
00055 Equalizer(int deviceID, DeviceSystemIntf* system,
00056 const simth::PropertyList& pl,
00057 size_t nr_rx_, size_t nr_tx_);
00058 Equalizer(int deviceID, DeviceSystemIntf* system,
00059 const simth::PropertyList& pl);
00060 const size_t nr_rx;
00061 const size_t nr_tx;
00062 const size_t iports;
00063
00064
00065 void assert_connections() const;
00066 void assert_vector_nr_tx(const mimo::CVector &testvec,
00067 const std::string& which = "output vector")
00068 const;
00069 public:
00070 virtual void updateInputLengths();
00071 virtual void updateOutputLengths();
00072
00073 void print(std::ostream &os) const;
00074
00075 static void init(const std::string& fileName,
00076 Device** dev,
00077 DeviceSystemIntf* sysPtr,
00078 int ID,
00079 const std::string& regionQualifier);
00080 };
00081
00106 class EqualizerZF : public Equalizer
00107 {
00108 public:
00109 EqualizerZF(int deviceID, DeviceSystemIntf* system,
00110 const simth::PropertyList& pl,
00111 size_t nr_rx, size_t nr_tx);
00112
00113 EqualizerZF(int deviceID, DeviceSystemIntf* system,
00114 const simth::PropertyList& pl)
00115 : Equalizer (deviceID, system, pl)
00116 { };
00117
00118 void process();
00119
00123 static void calcZF(const CVectorSeq& received_signal,
00124 const MatrixFreqSignal& channelestim,
00125 CVectorSeq & equalized_signal,
00126 CVectorSeq *softout_information);
00127 };
00128
00129
00154 class EqualizerMMSE : public Equalizer
00155 {
00156 private:
00157 double noise;
00158
00159 public:
00160 EqualizerMMSE(int deviceID, DeviceSystemIntf* system,
00161 const simth::PropertyList& pl,
00162 size_t nr_rx, size_t nr_tx, const std::string& loopVar);
00163
00164 EqualizerMMSE(int deviceID, DeviceSystemIntf* system,
00165 const simth::PropertyList& pl);
00166
00170 void setSNR(double snr);
00171 void setNoisePower(double n);
00172
00173 void process();
00174 static void calcMMSE(const CVectorSeq& received_signal,
00175 const MatrixFreqSignal& channelestim,
00176 CVectorSeq & equalized_signal,
00177 double noise_power,
00178 CVectorSeq *softout_information);
00179 };
00180
00204 class EqualizerMRC : public Equalizer
00205 {
00206 public:
00207 EqualizerMRC(int deviceID, DeviceSystemIntf* system,
00208 const simth::PropertyList& pl,
00209 size_t nr_rx, size_t nr_tx);
00210
00211 EqualizerMRC(int deviceID, DeviceSystemIntf* system,
00212 const simth::PropertyList& pl)
00213 : Equalizer (deviceID, system, pl)
00214 { };
00215
00216 void process();
00217 };
00218
00219
00234 class EqualizerMRCSwitch : public Equalizer
00235 {
00236 public:
00237 EqualizerMRCSwitch(int deviceID, DeviceSystemIntf* system,
00238 const simth::PropertyList& pl,
00239 size_t nr_rx, size_t nr_tx);
00240
00241 void process();
00242 };
00243
00244 }
00245
00246 #endif