• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

GaussianReceiver.hh

Go to the documentation of this file.
00001 // $Id:
00002 
00003 //###################################################################
00004 //
00005 //           Optical Communication Systems Simulator
00006 //
00007 //       Copyright (2006):
00008 //       Optical Fiber Communications Laboratory (OFCL)
00009 //       Computer Science & Electrical Engineering Department (CSEE)
00010 //       University of Maryland Baltimore County (UMBC)
00011 //
00012 //###################################################################
00013 
00014 // Written by John Zweck, Jan 2006
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 From ChiSquareReceiver.hh:
00033 
00034 Enumeration type that specifies sort of statistics of electrical pdf
00035 to be generated by the class
00036 
00037     Possible values:
00038 
00039     - PDFS = 1, i.e., pdfs in each bit at clock recovery 
00040                       together with average pdfs of marks and spaces
00041     - EYE = 2, i.e., a contour eye diagram 
00042           
00043 enum typeOutput { PDFS = 1, EYE = 2};
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   // METHODS:
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   // DATA:
00198 
00199   typeOutput TypeOutput;  
00200   // enumtype  typeOutput is defined in ChiSquareReceiver.hh
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   // Parameters for signal with FirstOrderPMD
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

Generated on Fri Jul 2 2010 12:57:46 for OCS by  doxygen 1.7.1