#include <GaussianReceiver.hh>
Given a noise free signal, appropriate noise statistics and receive filters this class computes the Gaussian approximation of the PDF of the current in each bit and the corresponding bit-error ratio
GaussianReceiver::GaussianReceiver | ( | OptSignal * | WDMSignal2, | |
RanNumGen * | RNG2, | |||
int | DemuxChannArrayIndex2, | |||
string | InDir, | |||
string | Job2 | |||
) |
References AveragePDFOnes, AveragePDFZeros, BER, ClockRecoveryTime, CurrentVector, DebugLevel, DeltaCurrent, DemuxChannArrayIndex, EYE, FIRST_ORDER_PMD, FirstOrderPMDParametersSet, OptSignal::GetBitLength(), OptSignal::GetQtPoints(), OptSignal::GetStringLength(), OptSignal::GetTimeWindow(), Job, LogFile, LogFileSeparator(), LOWER_AND_UPPER, LOWER_ONLY, MANDATORY, MANUALLY_SET, MaxCurrent, MeanCurrent, MinCurrent, NewDouble(), NewInt(), NO_BOUNDS, NumBitsToPlot, NumPointsCurrent, NumSlicesPerBit, NumTimeSlices, ObjectInitialized, oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, OPTIONAL_NO_WARNING, PARTIALLY_POLARIZED, PDFS, PDFTimeSlices, PDFTimeSlicesStorageVec, OptDemuxer::PrepareToDemuxChannel(), ReadDouble(), ReadInt(), ElecSignalStat::SetOptElecFiltersForGaussianStatistics(), SingleChannelSignal, StokesPlusMinus, StokesPlusPlus, TimeBetweenSlices, TimeSliceIndices, TimeSlices, TunableOptFilter, TypeClockRecovery, TypeGaussianNoise, TypeOutput, TypePMDonSignal, VarianceCurrent, WDMSignal, WDMSignalTmp, WriteTypeClockRecovery(), WriteTypeGaussianNoise(), WriteTypeOutput(), and WriteTypePMDonSignal().
GaussianReceiver::~GaussianReceiver | ( | ) |
References AveragePDFOnes, AveragePDFZeros, BER, CurrentVector, FIRST_ORDER_PMD, MeanCurrent, NumTimeSlices, ObjectInitialized, oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, PARTIALLY_POLARIZED, PDFS, PDFTimeSlices, PDFTimeSlicesStorageVec, SingleChannelSignal, StokesPlusMinus, StokesPlusPlus, TimeSlices, TunableOptFilter, TypeGaussianNoise, TypeOutput, TypePMDonSignal, VarianceCurrent, WDMSignalTmp, ElecSignalStat::~ElecSignalStat(), OptDemuxer::~OptDemuxer(), OptSignal::~OptSignal(), and Photodetector::~Photodetector().
void GaussianReceiver::ComputeAveragePDFs | ( | string | FileID | ) | [private] |
References AveragePDFOnes, AveragePDFZeros, CurrentVector, DebugLevel, BitString::GetBit(), Job, MeanCurrent, MeanNoise, NumBitsToPlot, NumPointsCurrent, NumTimeSlices, OptSignal::oBitString, PDFTimeSlices, pi, Quadrature(), SingleChannelSignal, sq(), sqrt(), VarianceCurrent, WriteFilePairVectors(), and WriteFilePDFTimeSlices().
Referenced by ReceiveSignal(), and ReceiveSignalDGD_NoisePartiallyPolarized().
void GaussianReceiver::ComputeFirstOrderPMDParameters | ( | OptFiber * | PMF | ) |
The OptFiber PMF must be associated to the OptSignal WDMSignal. You must have called PMF->GetFiberSampleCompleteScatt() before calling this method. The implementation of the theory given in this method assumes that WDMSignal has only been generated using a signal constructor or OptSignal::RegenerateSignalString() and is to be propagated through the PMF. In particular, the signal has not been sent through a PolarizTransformer. Instead, you can use OptSignal::SetInJones() and OptSignal::RegenerateSignalString()
References c_minus, c_plus, DGD, OptSignal::GetCenterFreq(), OptFiber::GetDGD(), OptSignal::GetInJones(), OptFiber::GetOutPD_Vector(), JonesPair2MixedStokes(), SetFirstOrderPMDParameters(), Stokes2Jones(), OptFiber::TransformJonesVectorThroughFiber(), and WDMSignal.
void GaussianReceiver::ComputeMinimumBERAndDecisionThreshold | ( | string | FileID | ) | [private] |
References AveragePDFOnes, AveragePDFZeros, BER, CurrentVector, DebugLevel, Job, max(), NumPointsCurrent, Quadrature(), and WriteFilePairVectors().
Referenced by ReceiveSignal(), and ReceiveSignalDGD_NoisePartiallyPolarized().
void GaussianReceiver::ReceiveSignal | ( | string | FileID | ) |
References ComputeAveragePDFs(), ComputeMinimumBERAndDecisionThreshold(), FIRST_ORDER_PMD, NO_PMD, PARTIALLY_POLARIZED, PDFS, ReceiveSignalDGD_NoisePartiallyPolarized(), ReceiveSignalNoPMD_NoisePartiallyPolarized(), ReceiveSignalUnpolarizedNoise(), TypeGaussianNoise, TypeOutput, TypePMDonSignal, UNPOLARIZED, WriteTypeGaussianNoise(), and WriteTypePMDonSignal().
void GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized | ( | double | DGD2, | |
double | ClockRecoveryTime2, | |||
double * | UnitStokesPlusPlus2, | |||
double * | UnitAverageStokesSignal, | |||
double | DOP_Signal, | |||
double | TotalNoiseSpectralDensity, | |||
double | DOP_Noise, | |||
double * | UnitStokesVectorPolarizedPartNoise, | |||
string | OutFileID | |||
) |
Receives a signal that is the sum of (1) a noise-free signal that has gone through first-order PMD fiber (ie PMF) and (2) Partially polarized noise. To be used when know input parameters, say from an experiment. See Jan 5th 2006 "How to validate receiver formula" by J. Zweck
UnitStokesPlusPlus2, UnitAverageStokesSignal and UnitStokesVectorPolarizedPartNoise are 3x1 and have length one.
References ClockRecoveryTime, ComputeAveragePDFs(), ComputeMinimumBERAndDecisionThreshold(), DemuxChannArrayIndex, OptDemuxer::DemuxChannel(), Photodetector::DetectOptSignal(), DGD, ElecFilter::FilterElecSignal(), OptSignal::GetAutocorrelationFunctionOptSignalX(), Photodetector::GetConvFactOptElecPhotod(), ElecSignalStat::GetIntegralForSignalNoiseVariance(), ElecSignalStat::GetMeanNoiseGaussianStatistics(), ElecSignalStat::GetNoiseNoiseVarianceGaussianStatistics(), OptSignal::GetNumChannels(), InnerProduct(), jc, Job, JonesPair2MixedStokes(), MeanCurrent, MeanNoise, NumTimeSlices, oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, PDFS, OptDemuxer::PrepareToDemuxChannel(), OptSignal::RegenerateSignalString(), ElecSignalStat::ResetOptElecFiltersForGaussianStatistics(), OptSignal::SetInJones(), SetTimeSlices(), Photodetector::sfftPM, SingleChannelSignal, sq(), sqrt(), Stokes2Jones(), StokesPlusPlus, Photodetector::TimeShiftSignal(), TimeSliceIndices, TimeSlices, fftPowerMatrices::tPowerSignal, TypeOutput, VarianceCurrent, WDMSignal, and WDMSignalTmp.
Referenced by ReceiveSignal().
void GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized | ( | string | FileID | ) | [private] |
Receives a signal that is the sum of (1) a noise-free signal that has gone through first-order PMD fiber (ie PMF) and (2) Partially polarized noise.
For each different fiber realization and input polarization state, you must call GaussianReceiver::ComputeFirstOrderPMDParameters. You must also propagate the signal through an OptFiber object before calling this method. The clock will be recovered based on the signal after the PMF unless you use TypeClockRecovery = MANUALLY_SET.
References c_minus, c_plus, ClockRecoveryTime, DemuxChannArrayIndex, OptDemuxer::DemuxChannel(), Photodetector::DetectOptSignal(), DGD, ElecFilter::FilterElecSignal(), Photodetector::GetConvFactOptElecPhotod(), ElecSignalStat::GetIntegralForSignalNoiseVariance(), ElecSignalStat::GetMeanNoiseGaussianStatistics(), ElecSignalStat::GetNoiseNoiseVarianceGaussianStatistics(), OptSignal::GetNumChannels(), ReduOptSignal::GetStokesNoise(), ReduOptSignal::GetTotalNoiseSpectralDensity(), OptSignal::GetTypeSimulation(), InnerProduct(), Job, MeanCurrent, MeanNoise, NumTimeSlices, oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, OptSignal::oReduOptSignal, OptDemuxer::PrepareToDemuxChannel(), RecoverClockAndSetTimeSlices(), OptSignal::RegenerateSignalString(), ElecSignalStat::ResetOptElecFiltersForGaussianStatistics(), OptSignal::SetInJones(), Photodetector::sfftPM, SingleChannelSignal, sq(), sqrt(), StokesPlusMinus, StokesPlusPlus, TimeSliceIndices, TimeSlices, fftPowerMatrices::tPowerSignal, VarianceCurrent, WDMSignal, WDMSignalTmp, and Photodetector::WriteFileTimePower().
void GaussianReceiver::ReceiveSignalNoPMD_NoisePartiallyPolarized | ( | string | FileID | ) | [private] |
Referenced by ReceiveSignal().
void GaussianReceiver::ReceiveSignalUnpolarizedNoise | ( | string | FileID | ) | [private] |
References ClockRecoveryTime, DemuxChannArrayIndex, OptDemuxer::DemuxChannel(), Photodetector::DetectOptSignal(), ElecFilter::FilterElecSignal(), OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), ElecSignalStat::GetMeanNoiseGaussianStatistics(), ElecSignalStat::GetNoiseNoiseVarianceGaussianStatistics(), OptSignal::GetTypeSimulation(), Job, MeanCurrent, MeanNoise, NumTimeSlices, oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, OptDemuxer::PrepareToDemuxChannel(), RecoverClockAndSetTimeSlices(), ElecSignalStat::ResetOptElecFiltersForGaussianStatistics(), Photodetector::sfftPM, SingleChannelSignal, sqrt(), TimeSliceIndices, TimeSlices, fftPowerMatrices::tPowerSignal, VarianceCurrent, and Photodetector::WriteFileTimePower().
Referenced by ReceiveSignal().
void GaussianReceiver::RecoverClockAndSetTimeSlices | ( | void | ) | [private] |
References AUTOMATIC, ClockRecoveryTime, ElecSignalStat::ComputePerformanceStatistics(), DemuxChannArrayIndex, OptDemuxer::DemuxChannel(), Photodetector::DetectOptSignal(), ElecFilter::FilterElecSignal(), ElecSignalStat::GetClockRecoveryTimeBeforeTimeShift(), oElecFilter, oElecSignalStat, oOptDemuxer, oPhotodetector, SetTimeSlices(), and TypeClockRecovery.
Referenced by ReceiveSignalDGD_NoisePartiallyPolarized(), and ReceiveSignalUnpolarizedNoise().
void GaussianReceiver::SetFirstOrderPMDParameters | ( | double * | StokesParametersPlusPlus, | |
cplx * | StokesParametersPlusMinus, | |||
cplx | c_plus2, | |||
cplx | c_minus2 | |||
) |
StokesParametersPlusPlus and StokesParametersPlusMinus are 4x1 vectors for the first-order PMD fiber. c_plus2 and c_minus2 are the cplx splitting factors.
References c_minus, c_plus, FirstOrderPMDParametersSet, StokesPlusMinus, and StokesPlusPlus.
Referenced by ComputeFirstOrderPMDParameters().
void GaussianReceiver::SetTimeSlices | ( | void | ) | [private] |
References ClockRecoveryTime, DebugLevel, EYE, OptSignal::GetBitLength(), OptSignal::GetDeltaTime(), OptSignal::GetTimeWindow(), NumTimeSlices, SingleChannelSignal, TimeBetweenSlices, TimeSliceIndices, TimeSlices, and TypeOutput.
Referenced by ReceiveSignalDGD_NoisePartiallyPolarized(), and RecoverClockAndSetTimeSlices().
void GaussianReceiver::WriteFilePairVectors | ( | double * | x, | |
double * | y, | |||
int | dim, | |||
string | OutFileName | |||
) | [private] |
Referenced by ComputeAveragePDFs(), and ComputeMinimumBERAndDecisionThreshold().
void GaussianReceiver::WriteFilePDFTimeSlices | ( | string | OutFileName | ) | [private] |
References CurrentVector, NumPointsCurrent, NumTimeSlices, and PDFTimeSlices.
Referenced by ComputeAveragePDFs().
string GaussianReceiver::WriteTypeClockRecovery | ( | void | ) |
References AUTOMATIC, MANUALLY_SET, and TypeClockRecovery.
Referenced by GaussianReceiver().
string GaussianReceiver::WriteTypeGaussianNoise | ( | void | ) |
References PARTIALLY_POLARIZED, PARTIALLY_POLARIZED_WITH_DGD, TypeGaussianNoise, and UNPOLARIZED.
Referenced by GaussianReceiver(), and ReceiveSignal().
string GaussianReceiver::WriteTypeOutput | ( | void | ) |
References EYE, PDFS, and TypeOutput.
Referenced by GaussianReceiver().
string GaussianReceiver::WriteTypePMDonSignal | ( | void | ) |
References FIRST_ORDER_PMD, NO_PMD, and TypePMDonSignal.
Referenced by GaussianReceiver(), and ReceiveSignal().
double* GaussianReceiver::AveragePDFOnes [private] |
Referenced by ComputeAveragePDFs(), ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver(), and ~GaussianReceiver().
double* GaussianReceiver::AveragePDFZeros [private] |
Referenced by ComputeAveragePDFs(), ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver(), and ~GaussianReceiver().
double* GaussianReceiver::BER [private] |
Referenced by ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver(), and ~GaussianReceiver().
int* GaussianReceiver::BitString [private] |
cplx GaussianReceiver::c_minus [private] |
cplx GaussianReceiver::c_plus [private] |
double GaussianReceiver::ClockRecoveryTime [private] |
double* GaussianReceiver::CurrentVector [private] |
int GaussianReceiver::DebugLevel [private] |
Referenced by ComputeAveragePDFs(), ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver(), and SetTimeSlices().
double GaussianReceiver::DeltaCurrent [private] |
Referenced by GaussianReceiver().
int GaussianReceiver::DemuxChannArrayIndex [private] |
double GaussianReceiver::DGD [private] |
Referenced by ComputeFirstOrderPMDParameters(), and ReceiveSignalDGD_NoisePartiallyPolarized().
bool GaussianReceiver::FirstOrderPMDParametersSet [private] |
Referenced by GaussianReceiver(), and SetFirstOrderPMDParameters().
string GaussianReceiver::Job [private] |
double GaussianReceiver::MaxCurrent [private] |
Referenced by GaussianReceiver().
double* GaussianReceiver::MeanCurrent [private] |
double GaussianReceiver::MeanNoise [private] |
double GaussianReceiver::MinCurrent [private] |
Referenced by GaussianReceiver().
int GaussianReceiver::NumBitsToPlot [private] |
Referenced by ComputeAveragePDFs(), and GaussianReceiver().
int GaussianReceiver::NumPointsCurrent [private] |
int GaussianReceiver::NumSlicesPerBit [private] |
Referenced by GaussianReceiver().
int GaussianReceiver::NumTimeSlices [private] |
int GaussianReceiver::ObjectInitialized [private] |
Referenced by GaussianReceiver(), and ~GaussianReceiver().
ElecFilter* GaussianReceiver::oElecFilter [private] |
ElecSignalStat* GaussianReceiver::oElecSignalStat [private] |
OptDemuxer* GaussianReceiver::oOptDemuxer [private] |
Photodetector* GaussianReceiver::oPhotodetector [private] |
double** GaussianReceiver::PDFTimeSlices [private] |
Referenced by ComputeAveragePDFs(), GaussianReceiver(), WriteFilePDFTimeSlices(), and ~GaussianReceiver().
double* GaussianReceiver::PDFTimeSlicesStorageVec [private] |
Referenced by GaussianReceiver(), and ~GaussianReceiver().
OptSignal* GaussianReceiver::SingleChannelSignal [private] |
cplx* GaussianReceiver::StokesPlusMinus [private] |
double* GaussianReceiver::StokesPlusPlus [private] |
double GaussianReceiver::TimeBetweenSlices [private] |
Referenced by GaussianReceiver(), and SetTimeSlices().
int* GaussianReceiver::TimeSliceIndices [private] |
double* GaussianReceiver::TimeSlices [private] |
OptFilter* GaussianReceiver::TunableOptFilter [private] |
Referenced by GaussianReceiver(), and ~GaussianReceiver().
Referenced by GaussianReceiver(), RecoverClockAndSetTimeSlices(), and WriteTypeClockRecovery().
Referenced by GaussianReceiver(), ReceiveSignal(), WriteTypeGaussianNoise(), and ~GaussianReceiver().
typeOutput GaussianReceiver::TypeOutput [private] |
Referenced by GaussianReceiver(), ReceiveSignal(), WriteTypePMDonSignal(), and ~GaussianReceiver().
double* GaussianReceiver::VarianceCurrent [private] |
OptSignal* GaussianReceiver::WDMSignal [private] |
Referenced by ComputeFirstOrderPMDParameters(), GaussianReceiver(), and ReceiveSignalDGD_NoisePartiallyPolarized().
OptSignal* GaussianReceiver::WDMSignalTmp [private] |
Referenced by GaussianReceiver(), ReceiveSignalDGD_NoisePartiallyPolarized(), and ~GaussianReceiver().