Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _OCS_GAUSSIAN_RECEIVER_HH_
00018 #define _OCS_GAUSSIAN_RECEIVER_HH_
00019
00020 #include "ocsOptSignal.hh"
00021 #include "ocsOptFilter.hh"
00022 #include "ocsOptDemuxer.hh"
00023 #include "ocsPhotodetector.hh"
00024 #include "ocsElecFilter.hh"
00025 #include "ocsElecSignalStat.hh"
00026 #include "ocsOptDataWriter.hh"
00027 #include "ChiSquareReceiver.hh"
00028 #include "ocsOptFiber.hh"
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00048
00081 enum typeGaussianNoise { UNPOLARIZED = 1,
00082 PARTIALLY_POLARIZED = 2,
00083 PARTIALLY_POLARIZED_WITH_DGD = 3};
00084
00086
00093 enum typePMDonSignal { NO_PMD = 1, FIRST_ORDER_PMD = 2 };
00094
00095
00097
00104 enum typeClockRecoveryGaussianReceiver { AUTOMATIC = 1, MANUALLY_SET = 2 };
00105
00109
00110 class GaussianReceiver
00111 {
00112
00113 public:
00114
00115 GaussianReceiver(OptSignal * WDMSignal2,
00116 RanNumGen *RNG2,
00117 int DemuxChannArrayIndex2,
00118 string InDir,
00119 string Job2);
00120
00121 ~GaussianReceiver();
00122
00123 string WriteTypeOutput(void);
00124 string WriteTypeGaussianNoise(void);
00125 string WriteTypePMDonSignal(void);
00126 string WriteTypeClockRecovery(void);
00127
00128 void ReceiveSignal(string FileID);
00129
00133
00134 void SetFirstOrderPMDParameters(
00135 double * StokesParametersPlusPlus,
00136 cplx * StokesParametersPlusMinus, cplx c_plus2, cplx c_minus2);
00137
00146
00147 void ComputeFirstOrderPMDParameters(OptFiber * PMF);
00148
00153
00159 void ReceiveSignalDGD_NoisePartiallyPolarized(
00160 double DGD2,
00161 double ClockRecoveryTime2,
00162 double *UnitStokesPlusPlus2,
00163 double *UnitAverageStokesSignal,
00164 double DOP_Signal,
00165 double TotalNoiseSpectralDensity,
00166 double DOP_Noise,
00167 double * UnitStokesVectorPolarizedPartNoise,
00168 string OutFileID);
00169
00170 private:
00171
00172
00173
00174 void RecoverClockAndSetTimeSlices(void);
00175 void SetTimeSlices(void);
00176 void ReceiveSignalUnpolarizedNoise(string FileID);
00177 void ReceiveSignalNoPMD_NoisePartiallyPolarized(string FileID);
00178
00182
00191 void ReceiveSignalDGD_NoisePartiallyPolarized(string FileID);
00192 void ComputeMinimumBERAndDecisionThreshold(string FileID);
00193 void WriteFilePairVectors(double * x, double *y, int dim, string OutFileName);
00194 void WriteFilePDFTimeSlices(string OutFileName);
00195 void ComputeAveragePDFs(string FileID);
00196
00197
00198
00199 typeOutput TypeOutput;
00200
00201 typeGaussianNoise TypeGaussianNoise;
00202 typePMDonSignal TypePMDonSignal;
00203 typeClockRecoveryGaussianReceiver TypeClockRecovery;
00204
00205 int DebugLevel;
00206
00207 double ClockRecoveryTime;
00208
00209 OptSignal * WDMSignal;
00210 OptSignal * SingleChannelSignal;
00211 OptSignal * WDMSignalTmp;
00212
00213 OptFilter * TunableOptFilter;
00214 OptDemuxer *oOptDemuxer;
00215
00216 Photodetector * oPhotodetector;
00217 ElecFilter * oElecFilter;
00218
00219 ElecSignalStat * oElecSignalStat;
00220
00221 int DemuxChannArrayIndex;
00222 string Job;
00223
00224 int ObjectInitialized;
00225
00226 int NumTimeSlices;
00227 int NumSlicesPerBit;
00228 double TimeBetweenSlices;
00229
00230 int NumBitsToPlot;
00231
00232 double * TimeSlices;
00233 int * TimeSliceIndices;
00234
00235 double * VarianceCurrent;
00236 double * MeanCurrent;
00237 double MeanNoise;
00238
00239 double MinCurrent,MaxCurrent,DeltaCurrent;
00240 int NumPointsCurrent;
00241 double * CurrentVector;
00242
00243 double * BER;
00244 double * AveragePDFZeros;
00245 double * AveragePDFOnes;
00246 double ** PDFTimeSlices;
00247 double * PDFTimeSlicesStorageVec;
00248 int * BitString;
00249
00250
00251
00252
00253 bool FirstOrderPMDParametersSet;
00254 double DGD;
00255 double * StokesPlusPlus;
00256 cplx * StokesPlusMinus;
00257 cplx c_plus;
00258 cplx c_minus;
00259
00260 };
00261
00262 #endif