#include <NoiseCovariance.hh>
Public Member Functions | |
NoiseCovariance (string InFileName, string Job2, OptSignal *Signal2) | |
Constructor. | |
NoiseCovariance & | operator= (NoiseCovariance &RHS_NoiseCovariance) |
void | ResetVolatileParameters (void) |
Resets parameters to values should have at beginning of system. | |
~NoiseCovariance (void) | |
Destructor. | |
void | Propagate (OptFiberLocalError *Fiber2) |
Propagates through the fiber *Fiber2. | |
void | Amplify (OptAmplifier *Amplifier2) |
Amplifies Signal using amplifier *Amplifier2. | |
void | Attenuate (LumpedLoss *oLumpedLoss) |
void | TurnOffJitterSeparation (void) |
Used to change when in application code jitter separation occurs. | |
void | TurnOnJitterSeparation (void) |
Used to change when in application code jitter separation occurs. | |
string | WriteTypeNoiseMethod (void) |
string | WriteTypeJitterSeparation (void) |
void | WriteFileNoiseFreeSignalAndCovarianceMatrix (string OutFileNamesSuffix) |
void | ReadFileNoiseFreeSignalAndCovarianceMatrix (string InFileNamesPrefix) |
void | WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity (string OutFileNameSuffix) |
No real need to use this method anymore. | |
void | WriteFileTimeField (string OutFileName, fftMatrices Field) |
void | WriteFileFreqField (string OutFileName, fftMatrices Field) |
void | GetReducedNoiseFreeSignal (fftMatrices &ReceiverReducedNoiseFreeSignal) |
void | ComputeCovarianceMatrixAWGN (void) |
void | SetCovarianceMatrixAWGN (double OSNRdB, double B_OSA) |
void | InitializeCovarianceMatrix (double TotalNoiseSpectralDensity) |
void | PropagateAnalyticCWSignalNoLossNoDispersion (OptFiberLocalError *Fiber2, OptAmplifier *Amplifier2) |
void | GetCovarianceMatrix (double **ReceiverCovarianceMatrix, bool ReadInSignalAndCovMatrixFlag, double SetOSNRdB, double B_OSA) |
int | GetCovMatrixDim (void) |
int | GetCovMatrixFirstIndex (void) |
int | GetCovMatrixLastIndex (void) |
string | GetJobName (void) |
double | GetPropagatedLength (void) |
Public Attributes | |
OptSignal * | Signal |
Private Member Functions | |
void | AllocateMemory (void) |
void | Propagator (void) |
Computes the Propagator Matrix Psi(z) and the Noise Free Signal u_0. | |
void | ComputeColumnPropagator (int PerturbedFreqIndex, double Delta, bool RealNotImag, double TotalEnergy) |
Computes a column of the propagator matrix. | |
void | Perturb (int PerturbedFreqIndex, double Delta, bool RealNotImag) |
Propagates a pertrubation of the noise free signal through the fiber. | |
void | Perturb (int PerturbedFreqIndex, double Delta, bool RealNotImag, int ChannelIndex) |
Propagates a pertrubation of the noise free signal through the fiber. | |
void | UpdateCovMatrixODE (void) |
Computes K_new = Psi*K_old*(Psi^T). | |
void | ApplyArtificialDispersionCompensation (fftMatrices SignalData, bool DisentangleFlag) |
ArtificialDispersionCompensation for removal of phase and timing jitter. | |
void | ComputeArtificialDispersionCompensationOperator (void) |
void | AmplifyCovarianceMatrix (double LinearGain) |
void | LumpedLossCovarianceMatrix (double LossLinear) |
void | ComputeReducedSignal (fftMatrices Signal2, fftMatrices ReducedSignal2) |
void | ApplyArtificialCentralChannelDemux (fftMatrices &PerturbationEnd) |
void | RestoreChannels (fftMatrices &PerturbationEnd) |
Private Attributes | |
typeNoiseMethod | TypeNoiseMethod |
typeJitterSeparation | TypeJitterSeparation |
typeJitterSeparation | TypeJitterSeparationInput |
bool | AlsoRemoveZerosJitter |
string | Job |
OptFiberLocalError * | Fiber |
OptAmplifier * | Amplifier |
double | PropagatedLength |
double | PropagatedLengthSaved |
int | ZStepNum |
int | ZStepNumSaved |
double | AccumulatedFirstOrderDispersion |
double | AccumulatedSndOrderDispersion |
double | DeltaFrac |
The perturbation amount is a fraction DeltaFrac of the average power. | |
fftMatrices | DataToPropagate |
The signal data structure that actually propagates through the system. | |
typeSimulation | TypeSimulation |
int | SignalVecDim |
This is same as OptSignal::qtPoints. | |
cfftw * | fft |
int | CovMatrixDim |
Number of rows (or columns) of CovarianceMatrix. | |
int | CovMatrixFirstIndex |
CovMatrixFirstIndex = -CovMatrixDim/2. | |
int | CovMatrixLastIndex |
CovMatrixLastIndex = CovMatrixDim/2 - 1. | |
cfftw * | Reduced_fft |
double ** | CovarianceMatrix |
double ** | PropagatorMatrix |
double ** | TempProductMatrix |
double * | CovarianceStorageVec |
double * | PropagatorStorageVec |
double * | TempProductStorageVec |
fftMatrices | NoiseFreeSignalStart |
fftMatrices | NoiseFreeSignalEnd |
Used in Propagator method. | |
fftMatrices | jcNoiseFreeSignalEnd |
fftMatrices | jcOmegaNoiseFreeSignalEnd |
fftMatrices | PerturbationEnd |
Used in NoiseCovariance::ComputeColumnPropagator. | |
fftMatrices | ReducedPerturbationEnd |
Used in NoiseCovariance::ComputeColumnPropagator. | |
cplx * | ArtificialDispersionCompensationOperator |
fftMatrices | ReducedNoiseFreeSignal |
fftMatrices | ReducedNoiseFreeSignalStorage |
int | ChannelOfCovarianceMatrix |
int | NumberOfChannels |
fftMatrices | PerturbationEnd_saved |
The NoiseCovariance class is used in the computation of accurate eye diagrams and bit error rates in the presence of fiber nonlinearity, chromatic dispersion and amplifier ASE noise using the noise linearization methods of Ronald Holzloehner.
The class computes the noise-free signal and the noise covariance matrix using either the Monte Carlo or the ODE method. Details of Ron's method can be found in his papers in JLT and PTL in 2002. The class is based on Ron's code and was written for OCS by JZ.
NoiseCovariance::NoiseCovariance | ( | string | InFileName, | |
string | Job2, | |||
OptSignal * | Signal2 | |||
) |
Constructor.
References AllocateMemory(), AlsoRemoveZerosJitter, CovMatrixDim, CovMatrixFirstIndex, CovMatrixLastIndex, DataToPropagate, DeltaFrac, OptSignal::fft, fft, OptSignal::GetChannSpacing(), OptSignal::GetDeltaFreq(), OptSignal::GetNumChannels(), OptSignal::GetQtPoints(), OptSignal::GetTypeSimulation(), Job, LogFile, LogFileSeparator(), LOWER_AND_UPPER, LOWER_ONLY, MANDATORY, NumberOfChannels, ODE, OPTIONAL_NO_WARNING, OPTIONAL_WARNING, ReadDouble(), ReadInt(), ResetVolatileParameters(), OptSignal::sfftM, Signal, SignalVecDim, TypeJitterSeparation, TypeJitterSeparationInput, TypeNoiseMethod, TypeSimulation, and WriteTypeJitterSeparation().
NoiseCovariance::~NoiseCovariance | ( | void | ) |
Destructor.
References ArtificialDispersionCompensationOperator, AWGN, CovarianceMatrix, CovarianceStorageVec, CovMatrixDim, DataToPropagate, fft, fftMatrices::fOptSignalX, FreeCplx(), OptSignal::GetTypeSimulation(), jcNoiseFreeSignalEnd, jcOmegaNoiseFreeSignalEnd, MC_WITH_K, NoiseFreeSignalEnd, NoiseFreeSignalStart, NumberOfChannels, ODE, PerturbationEnd, PerturbationEnd_saved, PropagatorMatrix, PropagatorStorageVec, Reduced_fft, ReducedNoiseFreeSignal, ReducedNoiseFreeSignalStorage, ReducedPerturbationEnd, SCALAR, Signal, TempProductMatrix, TempProductStorageVec, fftMatrices::tOptSignalX, TypeNoiseMethod, and cfftw::~cfftw().
void NoiseCovariance::AllocateMemory | ( | void | ) | [private] |
Allocates and initializes memory for vectors and matrices Called by NoiseCovariance::NoiseCovariance
References ArtificialDispersionCompensationOperator, AWGN, CovarianceMatrix, CovarianceStorageVec, CovMatrixDim, CovMatrixFirstIndex, fftMatrices::fOptSignalX, OptSignal::GetTimeWindow(), OptSignal::GetTypeSimulation(), jcNoiseFreeSignalEnd, jcOmegaNoiseFreeSignalEnd, MC_WITH_K, NewCplx(), NoiseFreeSignalEnd, NoiseFreeSignalStart, NumberOfChannels, ODE, PerturbationEnd, PerturbationEnd_saved, PropagatorMatrix, PropagatorStorageVec, Reduced_fft, ReducedNoiseFreeSignal, ReducedNoiseFreeSignalStorage, ReducedPerturbationEnd, Signal, SignalVecDim, TempProductMatrix, TempProductStorageVec, fftMatrices::tOptSignalX, TypeNoiseMethod, and ZeroMatrix().
Referenced by NoiseCovariance().
void NoiseCovariance::Amplify | ( | OptAmplifier * | Amplifier2 | ) |
Amplifies Signal using amplifier *Amplifier2.
References Amplifier, AmplifyCovarianceMatrix(), OptAmplifier::AmplifyOptSignal(), AWGN, OptAmplifier::GetLinearGainOptAmplif(), MC_WITH_K, MC_WITHOUT_K, NOISE_ON_GAUSSIAN_WHITE, NOISE_ON_SEMI_ANALYTICAL, ODE, OptAmplifier::SetTypeAmplifierNoise(), and TypeNoiseMethod.
Referenced by PostDispCompSubSystem::ApplyPostDispCompUMBCCienaLoopJuly2001NoiseCov().
void NoiseCovariance::AmplifyCovarianceMatrix | ( | double | LinearGain | ) | [private] |
References AddToPrincipalDiag(), Amplifier, CovarianceMatrix, CovMatrixDim, DenseMatrixScale(), OptSignal::GetDeltaFreq(), OptAmplifier::GetSpectralNoisePowerDensityAddedPerPolarization(), and Signal.
Referenced by Amplify().
void NoiseCovariance::ApplyArtificialCentralChannelDemux | ( | fftMatrices & | PerturbationEnd | ) | [private] |
Extracts all the channels but the central one out of the WDM signal in order to be able to separate the phase and/or timing jitter from that channel
References fft, fftMatrices::fOptSignalX, OptSignal::GetCenterFreq(), OptSignal::GetChannSpacing(), OptSignal::GetDeltaFreq(), OptSignal::GetRelativeCenterFrequency(), cfftw::IFFT(), LogFile, NumberOfChannels, PerturbationEnd_saved, Signal, SignalVecDim, and fftMatrices::tOptSignalX.
Referenced by ComputeColumnPropagator().
void NoiseCovariance::ApplyArtificialDispersionCompensation | ( | fftMatrices | SignalData, | |
bool | DisentangleFlag | |||
) | [private] |
ArtificialDispersionCompensation for removal of phase and timing jitter.
When DisentangleFlag = true this method disentangles the pulses in the signal stored in SignalData by linearly compressing them with dispersion equal to the negative of NoiseCovariance::AccumulatedFirstOrderDispersion. When DisentangleFlag = false the method re-entangles the pulses by apply dispersion of NoiseCovariance::AccumulatedFirstOrderDispersion.
if(DisentangleFlag && CallNum100 == 0) {
char C_string[80]; sprintf(C_string,"ArtDisp%i.dat",CallNum); string FileName = Job + C_string;
WriteFileTimeField(FileName,SignalData);
}
CallNum++;
if(CallNum == 10) exit(1);
References ArtificialDispersionCompensationOperator, fft, fftMatrices::fOptSignalX, cfftw::IFFT(), SignalVecDim, and fftMatrices::tOptSignalX.
Referenced by ComputeColumnPropagator(), and Propagator().
void NoiseCovariance::Attenuate | ( | LumpedLoss * | oLumpedLoss | ) |
Attenuates the signal and covariance matrix using LumpedLoss object oLumpedLoss
This LumpedLoss object must act on the same signal that the NoiseCovariance object is acting on. I am not explicitly enforcing this at the moment.
References LumpedLoss::ApplyLumpedLoss(), AWGN, LumpedLoss::GetLossLinear(), LumpedLossCovarianceMatrix(), MC_WITH_K, MC_WITHOUT_K, ODE, and TypeNoiseMethod.
void NoiseCovariance::ComputeArtificialDispersionCompensationOperator | ( | void | ) | [private] |
Computes the Artificial Dispersion Compensation Operator used in NoiseCovariance::ApplyArtificialDispersionCompensation
References AccumulatedFirstOrderDispersion, AccumulatedSndOrderDispersion, ArtificialDispersionCompensationOperator, exp_jc_real(), fft, cfftw::freq(), pi, SignalVecDim, and sq().
Referenced by Propagator().
void NoiseCovariance::ComputeColumnPropagator | ( | int | PerturbedFreqIndex, | |
double | Delta, | |||
bool | RealNotImag, | |||
double | TotalEnergy | |||
) | [private] |
Computes a column of the propagator matrix.
Removes phase and timing jitter Called by NoiseCovariance::Propagator
References AlsoRemoveZerosJitter, ApplyArtificialCentralChannelDemux(), ApplyArtificialDispersionCompensation(), CovMatrixDim, CovMatrixFirstIndex, CovMatrixLastIndex, DataToPropagate, cfftw::FFT(), fft, fftMatrices::fOptSignalX, OptSignal::GetStringLength(), jcNoiseFreeSignalEnd, jcOmegaNoiseFreeSignalEnd, NoiseFreeSignalEnd, NONE, NumberOfChannels, PerturbationEnd, PHASE_AND_TIMING, PHASE_ONLY, PropagatorMatrix, ReducedPerturbationEnd, RestoreChannels(), SchmidtOrthogonalizer(), Signal, SignalVecDim, sq(), fftMatrices::tOptSignalX, and TypeJitterSeparation.
Referenced by Propagator().
void NoiseCovariance::ComputeCovarianceMatrixAWGN | ( | void | ) |
This method is used to compute the Covariance matrix from using Signal->GetTotalAccumulatedNoiseSpectralDensitySemiAnalytical()
References AddToPrincipalDiag(), AWGN, CovarianceMatrix, CovMatrixDim, OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), OptSignal::GetDeltaFreq(), OptSignal::GetTypeSimulation(), Signal, TypeNoiseMethod, and ZeroMatrix().
Referenced by GetCovarianceMatrix(), SetCovarianceMatrixAWGN(), and WriteFileNoiseFreeSignalAndCovarianceMatrix().
void NoiseCovariance::ComputeReducedSignal | ( | fftMatrices | Signal2, | |
fftMatrices | ReducedSignal2 | |||
) | [private] |
References CovMatrixFirstIndex, CovMatrixLastIndex, fft, cfftw::fftshift(), fftMatrices::fOptSignalX, cfftw::IFFT(), cfftw::ifftshift(), Reduced_fft, SignalVecDim, and fftMatrices::tOptSignalX.
Referenced by GetReducedNoiseFreeSignal(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), and WriteFileNoiseFreeSignalAndCovarianceMatrix().
void NoiseCovariance::GetCovarianceMatrix | ( | double ** | ReceiverCovarianceMatrix, | |
bool | ReadInSignalAndCovMatrixFlag, | |||
double | SetOSNRdB, | |||
double | B_OSA | |||
) |
This method is used by the ChiSquareReceiver class to set a pointer to the CovarianceMatrix
References AWGN, ComputeCovarianceMatrixAWGN(), CovarianceMatrix, CovMatrixDim, SetCovarianceMatrixAWGN(), and TypeNoiseMethod.
Referenced by ChiSquareReceiver::GetReducedNoiseFreeSigAndDiagonalizeCovMatrix().
int NoiseCovariance::GetCovMatrixDim | ( | void | ) | [inline] |
References CovMatrixDim.
Referenced by ChiSquareReceiver::ChiSquareReceiver().
int NoiseCovariance::GetCovMatrixFirstIndex | ( | void | ) | [inline] |
References CovMatrixFirstIndex.
Referenced by ChiSquareReceiver::ChiSquareReceiver().
int NoiseCovariance::GetCovMatrixLastIndex | ( | void | ) | [inline] |
References CovMatrixLastIndex.
Referenced by ChiSquareReceiver::ChiSquareReceiver().
string NoiseCovariance::GetJobName | ( | void | ) | [inline] |
References Job.
Referenced by ChiSquareReceiver::ChiSquareReceiver().
double NoiseCovariance::GetPropagatedLength | ( | void | ) | [inline] |
References PropagatedLength.
void NoiseCovariance::GetReducedNoiseFreeSignal | ( | fftMatrices & | ReceiverReducedNoiseFreeSignal | ) |
This method is used by the ChiSquareReceiver class to set a pointer to the ReducedNoiseFreeSignal.
Access as
ReceiverReducedNoiseFreeSignal.tOptSignalX[jj] ReceiverReducedNoiseFreeSignal.fOptSignalX[jj]
where jj=0...CovMatrixDim-1
References ComputeReducedSignal(), DataToPropagate, fftMatrices::fOptSignalX, ReducedNoiseFreeSignal, ReducedNoiseFreeSignalStorage, and fftMatrices::tOptSignalX.
Referenced by ChiSquareReceiver::GetReducedNoiseFreeSigAndDiagonalizeCovMatrix().
void NoiseCovariance::InitializeCovarianceMatrix | ( | double | TotalNoiseSpectralDensity | ) |
Sets the CovarianceMatrix to be diagonal matrix with specified TotalNoiseSpectralDensity. (For SCALAR signals only foe now.)
References AddToPrincipalDiag(), CovarianceMatrix, CovMatrixDim, OptSignal::GetDeltaFreq(), OptSignal::SetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), Signal, and ZeroMatrix().
void NoiseCovariance::LumpedLossCovarianceMatrix | ( | double | LossLinear | ) | [private] |
References CovarianceMatrix, CovMatrixDim, and DenseMatrixScale().
Referenced by Attenuate().
NoiseCovariance & NoiseCovariance::operator= | ( | NoiseCovariance & | RHS_NoiseCovariance | ) |
Assignment operator. Assumes LHS NoiseCovariance object has already been constructed.
Notes:
References AccumulatedFirstOrderDispersion, AccumulatedSndOrderDispersion, AlsoRemoveZerosJitter, CopyMatrix(), CovarianceMatrix, CovMatrixDim, CovMatrixFirstIndex, CovMatrixLastIndex, DeltaFrac, Job, MC_WITH_K, ODE, PropagatedLength, PropagatedLengthSaved, PropagatorMatrix, Signal, SignalVecDim, TypeJitterSeparation, TypeJitterSeparationInput, TypeNoiseMethod, TypeSimulation, ZStepNum, and ZStepNumSaved.
void NoiseCovariance::Perturb | ( | int | PerturbedFreqIndex, | |
double | Delta, | |||
bool | RealNotImag | |||
) | [private] |
Propagates a pertrubation of the noise free signal through the fiber.
References DataToPropagate, fft, Fiber, fftMatrices::fOptSignalX, cfftw::IFFT(), cfftw::index(), NoiseFreeSignalStart, OptFiberLocalError::Propagate(), PropagatedLength, PropagatedLengthSaved, SignalVecDim, fftMatrices::tOptSignalX, ZStepNum, and ZStepNumSaved.
Referenced by Propagator().
void NoiseCovariance::Perturb | ( | int | PerturbedFreqIndex, | |
double | Delta, | |||
bool | RealNotImag, | |||
int | ChannelIndex | |||
) | [private] |
Propagates a pertrubation of the noise free signal through the fiber.
Called by NoiseCovariance::Propagator
Comments by Walter. [JZ: I'm not sure if this realy works yet]
Computes the perturbation of any channel and therefore allows for the computation of the CovarianceMatrix for any channel
ChannelIndex has to be between 0 and NumberOfChannels-1; ChannelIndex allows to compute the Covariance Matrix of a channel different from the central one. In other words it allows to compute each block matrix on the diagonal of an ideal complete big CovarianceMatrix for a WDM simulation
References DataToPropagate, fft, Fiber, fftMatrices::fOptSignalX, OptSignal::GetDeltaFreq(), OptSignal::GetRelativeCenterFrequency(), cfftw::IFFT(), cfftw::index(), NoiseFreeSignalStart, OptFiberLocalError::Propagate(), PropagatedLength, PropagatedLengthSaved, Signal, SignalVecDim, fftMatrices::tOptSignalX, ZStepNum, and ZStepNumSaved.
void NoiseCovariance::Propagate | ( | OptFiberLocalError * | Fiber2 | ) |
Propagates through the fiber *Fiber2.
References AWGN, Fiber, MC_WITH_K, MC_WITHOUT_K, ODE, OptFiberLocalError::Propagate(), PropagatedLength, Propagator(), TypeNoiseMethod, UpdateCovMatrixODE(), and ZStepNum.
Referenced by PostDispCompSubSystem::ApplyPostDispCompUMBCCienaLoopJuly2001NoiseCov().
void NoiseCovariance::PropagateAnalyticCWSignalNoLossNoDispersion | ( | OptFiberLocalError * | Fiber2, | |
OptAmplifier * | Amplifier2 | |||
) |
Computes covariance matrix in case of CW signal for an amplifier followed by a single fiber with no loss and no dispersion. The power of the CW signal is specified by Signal->GetOptPowerChann() Based on a special case of a formula of Carena et al. in PTL Vol 9 Num 4 April 1997, p535.
References AddToPrincipalDiag(), Amplifier, CovarianceMatrix, CovMatrixDim, Fiber, OptSignal::GetDeltaFreq(), OptFiberLocalError::GetFiberLength(), OptFiberLocalError::GetGamma(), OptSignal::GetOptPowerChann(), OptAmplifier::GetSpectralNoisePowerDensityAddedPerPolarization(), Signal, and ZeroMatrix().
void NoiseCovariance::Propagator | ( | void | ) | [private] |
Computes the Propagator Matrix Psi(z) and the Noise Free Signal u_0.
References AccumulatedFirstOrderDispersion, AccumulatedSndOrderDispersion, ApplyArtificialDispersionCompensation(), ComputeArtificialDispersionCompensationOperator(), ComputeColumnPropagator(), CovMatrixFirstIndex, CovMatrixLastIndex, DataToPropagate, DeltaFrac, fft, Fiber, fftMatrices::fOptSignalX, cfftw::freq(), OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), OptSignal::GetAveragePower(), OptFiberLocalError::GetFiberLength(), OptFiberLocalError::GetFirstOrderDispersion(), OptFiberLocalError::GetSecondOrderDispersion(), cfftw::IFFT(), jc, jcNoiseFreeSignalEnd, jcOmegaNoiseFreeSignalEnd, NoiseFreeSignalEnd, NoiseFreeSignalStart, Perturb(), pi, OptFiberLocalError::Propagate(), PropagatedLength, PropagatedLengthSaved, OptSignal::SetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), Signal, SignalVecDim, sq(), sqrt(), fftMatrices::tOptSignalX, ZStepNum, and ZStepNumSaved.
Referenced by Propagate().
void NoiseCovariance::ReadFileNoiseFreeSignalAndCovarianceMatrix | ( | string | InFileNamesPrefix | ) |
Reads in files previously written out by NoiseCovariance::WriteFileNoiseFreeSignalAndCovarianceMatrix()
References CovarianceMatrix, CovMatrixDim, OptSignal::ReadComplexFields(), ReadMatrix(), and Signal.
Referenced by ChiSquareReceiver::ReceiveSignal().
void NoiseCovariance::ResetVolatileParameters | ( | void | ) |
Resets parameters to values should have at beginning of system.
Called at start of propagation through a system.
References AccumulatedFirstOrderDispersion, AccumulatedSndOrderDispersion, CovarianceMatrix, CovMatrixDim, PropagatedLength, PropagatedLengthSaved, ZeroMatrix(), ZStepNum, and ZStepNumSaved.
Referenced by NoiseCovariance().
void NoiseCovariance::RestoreChannels | ( | fftMatrices & | PerturbationEnd | ) | [private] |
Inserts the channels extracted by ApplyArtificialCentralChannelDemux into the SingleChannel PerturbationEnd signal from which the phase and/or timing jitter has been extracted.
References fft, fftMatrices::fOptSignalX, cfftw::IFFT(), PerturbationEnd_saved, SignalVecDim, and fftMatrices::tOptSignalX.
Referenced by ComputeColumnPropagator().
void NoiseCovariance::SetCovarianceMatrixAWGN | ( | double | OSNRdB, | |
double | B_OSA | |||
) |
Sets CovarianceMatrix to be the multiple of the identity matrix that with the NoiseFreeSignal gives the OSNR whose value in dB is OSNRdB. Only works when NoiseCovariance::TypeNoiseMethod == AWGN. For WDM signals divides total average power by number of channels to calculate the signal power
References ComputeCovarianceMatrixAWGN(), dB2Linear(), OptSignal::GetAveragePower(), OptSignal::GetNumChannels(), OptSignal::SetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), and Signal.
Referenced by GetCovarianceMatrix().
void NoiseCovariance::TurnOffJitterSeparation | ( | void | ) |
Used to change when in application code jitter separation occurs.
References TypeJitterSeparation.
void NoiseCovariance::TurnOnJitterSeparation | ( | void | ) |
Used to change when in application code jitter separation occurs.
References TypeJitterSeparation, and TypeJitterSeparationInput.
void NoiseCovariance::UpdateCovMatrixODE | ( | void | ) | [private] |
Computes K_new = Psi*K_old*(Psi^T).
References CovarianceMatrix, CovMatrixDim, DenseMatrixProduct(), PropagatorMatrix, and TempProductMatrix.
Referenced by Propagate().
void NoiseCovariance::WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity | ( | string | OutFileNameSuffix | ) |
No real need to use this method anymore.
FileName = Job + OutFileNameSuffix + "TotalNoiseSpectralDensity.dat";
ofstream OutFile(FileName.c_str(),ios::out);
if (!OutFile) { cerr << "Error: " << FileName << "could not be created."<<endl; exit(1); }
OutFile << "% NoiseSpectralDensity (SCALAR) [W/Hz] " << endl <<Signal->GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics();
OutFile.close();
References AWGN, ComputeReducedSignal(), CovMatrixFirstIndex, CovMatrixLastIndex, DataToPropagate, cfftw::delta_f, fftMatrices::fOptSignalX, OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), Job, Reduced_fft, ReducedNoiseFreeSignal, Signal, sq(), TypeNoiseMethod, OptSignal::WriteFileFreqPower(), and OptSignal::WriteFileTimePower().
void NoiseCovariance::WriteFileFreqField | ( | string | OutFileName, | |
fftMatrices | Field | |||
) |
void NoiseCovariance::WriteFileNoiseFreeSignalAndCovarianceMatrix | ( | string | OutFileNamesSuffix | ) |
References AWGN, ComputeCovarianceMatrixAWGN(), ComputeReducedSignal(), CovarianceMatrix, CovMatrixDim, CovMatrixFirstIndex, CovMatrixLastIndex, DataToPropagate, cfftw::delta_f, cfftw::delta_t, fftMatrices::fOptSignalX, Job, ODE, Reduced_fft, ReducedNoiseFreeSignal, Signal, sq(), fftMatrices::tOptSignalX, TypeNoiseMethod, OptSignal::WriteComplexFields(), OptSignal::WriteComplexFieldsFreq(), and WriteMatrix().
void NoiseCovariance::WriteFileTimeField | ( | string | OutFileName, | |
fftMatrices | Field | |||
) |
References OptSignal::GetDeltaTime(), Signal, SignalVecDim, sq(), fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
string NoiseCovariance::WriteTypeJitterSeparation | ( | void | ) |
References NONE, PHASE_AND_TIMING, PHASE_ONLY, and TypeJitterSeparation.
Referenced by NoiseCovariance().
string NoiseCovariance::WriteTypeNoiseMethod | ( | void | ) |
References AWGN, MC_WITH_K, MC_WITHOUT_K, ODE, and TypeNoiseMethod.
double NoiseCovariance::AccumulatedFirstOrderDispersion [private] |
The accumulated first order dispersion at the center frequency. Used for artificial dispersion compensation. Units: ??
Referenced by ComputeArtificialDispersionCompensationOperator(), operator=(), Propagator(), and ResetVolatileParameters().
double NoiseCovariance::AccumulatedSndOrderDispersion [private] |
The accumulated second order dispersion at the center frequency. Used for artificial dispersion compensation. Units: ??
Referenced by ComputeArtificialDispersionCompensationOperator(), operator=(), Propagator(), and ResetVolatileParameters().
bool NoiseCovariance::AlsoRemoveZerosJitter [private] |
Referenced by ComputeColumnPropagator(), NoiseCovariance(), and operator=().
OptAmplifier* NoiseCovariance::Amplifier [private] |
Referenced by Amplify(), AmplifyCovarianceMatrix(), and PropagateAnalyticCWSignalNoLossNoDispersion().
int NoiseCovariance::ChannelOfCovarianceMatrix [private] |
double** NoiseCovariance::CovarianceMatrix [private] |
Real covariance matrix of size 2*NoiseCovarianceCovMatrixDim x 2*NoiseCovarianceCovMatrixDim
This is the script K in Ron's papers/thesis
Referenced by AllocateMemory(), AmplifyCovarianceMatrix(), ComputeCovarianceMatrixAWGN(), GetCovarianceMatrix(), InitializeCovarianceMatrix(), LumpedLossCovarianceMatrix(), operator=(), PropagateAnalyticCWSignalNoLossNoDispersion(), ReadFileNoiseFreeSignalAndCovarianceMatrix(), ResetVolatileParameters(), UpdateCovMatrixODE(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), and ~NoiseCovariance().
double* NoiseCovariance::CovarianceStorageVec [private] |
Real vector of length 4*sq(NoiseCovariance::CovMatrixDim) where the elements of NoiseCovariance::CovarianceMatrix are actually stored
Referenced by AllocateMemory(), and ~NoiseCovariance().
int NoiseCovariance::CovMatrixDim [private] |
Number of rows (or columns) of CovarianceMatrix.
Ron's N. Must be even
Referenced by AllocateMemory(), AmplifyCovarianceMatrix(), ComputeColumnPropagator(), ComputeCovarianceMatrixAWGN(), GetCovarianceMatrix(), GetCovMatrixDim(), InitializeCovarianceMatrix(), LumpedLossCovarianceMatrix(), NoiseCovariance(), operator=(), PropagateAnalyticCWSignalNoLossNoDispersion(), ReadFileNoiseFreeSignalAndCovarianceMatrix(), ResetVolatileParameters(), UpdateCovMatrixODE(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), and ~NoiseCovariance().
int NoiseCovariance::CovMatrixFirstIndex [private] |
CovMatrixFirstIndex = -CovMatrixDim/2.
Ron's N1
Referenced by AllocateMemory(), ComputeColumnPropagator(), ComputeReducedSignal(), GetCovMatrixFirstIndex(), NoiseCovariance(), operator=(), Propagator(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), and WriteFileNoiseFreeSignalAndCovarianceMatrix().
int NoiseCovariance::CovMatrixLastIndex [private] |
CovMatrixLastIndex = CovMatrixDim/2 - 1.
Ron's N2
Referenced by ComputeColumnPropagator(), ComputeReducedSignal(), GetCovMatrixLastIndex(), NoiseCovariance(), operator=(), Propagator(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), and WriteFileNoiseFreeSignalAndCovarianceMatrix().
fftMatrices NoiseCovariance::DataToPropagate [private] |
The signal data structure that actually propagates through the system.
Referenced by ComputeColumnPropagator(), GetReducedNoiseFreeSignal(), NoiseCovariance(), Perturb(), Propagator(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), and ~NoiseCovariance().
double NoiseCovariance::DeltaFrac [private] |
The perturbation amount is a fraction DeltaFrac of the average power.
Referenced by NoiseCovariance(), operator=(), and Propagator().
cfftw* NoiseCovariance::fft [private] |
Pointer to the fft class to take fft's of size NoiseCovariance::SignalVecDim
Referenced by ApplyArtificialCentralChannelDemux(), ApplyArtificialDispersionCompensation(), ComputeArtificialDispersionCompensationOperator(), ComputeColumnPropagator(), ComputeReducedSignal(), NoiseCovariance(), Perturb(), Propagator(), RestoreChannels(), WriteFileFreqField(), and ~NoiseCovariance().
OptFiberLocalError* NoiseCovariance::Fiber [private] |
Referenced by Perturb(), Propagate(), PropagateAnalyticCWSignalNoLossNoDispersion(), and Propagator().
Used in Propagator method:. jc times NoiseFreeSignalEnd Used to handle phase jitter
Referenced by AllocateMemory(), ComputeColumnPropagator(), Propagator(), and ~NoiseCovariance().
Used in Propagator method to store: jc frequency NoiseFreeSignalEnd Used to handle timing jitter
Referenced by AllocateMemory(), ComputeColumnPropagator(), Propagator(), and ~NoiseCovariance().
string NoiseCovariance::Job [private] |
Used in Propagator method.
Referenced by AllocateMemory(), ComputeColumnPropagator(), Propagator(), and ~NoiseCovariance().
Used in Propagator method to store the noise free signal at start of a fiber
Referenced by AllocateMemory(), Perturb(), Propagator(), and ~NoiseCovariance().
int NoiseCovariance::NumberOfChannels [private] |
fftMatrices NoiseCovariance::PerturbationEnd [private] |
Used in NoiseCovariance::ComputeColumnPropagator.
Referenced by AllocateMemory(), ComputeColumnPropagator(), and ~NoiseCovariance().
Referenced by AllocateMemory(), ApplyArtificialCentralChannelDemux(), RestoreChannels(), and ~NoiseCovariance().
double NoiseCovariance::PropagatedLength [private] |
Referenced by GetPropagatedLength(), operator=(), Perturb(), Propagate(), Propagator(), and ResetVolatileParameters().
double NoiseCovariance::PropagatedLengthSaved [private] |
Referenced by operator=(), Perturb(), Propagator(), and ResetVolatileParameters().
double** NoiseCovariance::PropagatorMatrix [private] |
Real propagator matrix of size 2*NoiseCovarianceCovMatrixDim x 2*NoiseCovarianceCovMatrixDim
This is the in Ron's papers/thesis
Referenced by AllocateMemory(), ComputeColumnPropagator(), operator=(), UpdateCovMatrixODE(), and ~NoiseCovariance().
double* NoiseCovariance::PropagatorStorageVec [private] |
Real vector of length 4*sq(NoiseCovariance::CovMatrixDim) where the elements of NoiseCovariance::PropagatorMatrix are actually stored
Referenced by AllocateMemory(), and ~NoiseCovariance().
cfftw* NoiseCovariance::Reduced_fft [private] |
Pointer to the fft class to take fft's of size NoiseCovariance::CovMatrixDim
ReducedTimeWindow = TimeWindow ReducedDeltaTime = TimeWindow/CovMatrixDim ReducedDeltaFreq = DeltaFreq ReducedFreqWindow = DeltaFreq*CovMatrixDim
Referenced by AllocateMemory(), ComputeReducedSignal(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), and ~NoiseCovariance().
Reduced signals have size CovMatrixDim. The reduced signal in frequency is obtained from the full length noise free signal by extracting the central CovMatrixDim frequencies. The reduced signal in time should be computed from the reduced signal in frequency using the cfftw object NoiseCovariance::Reduced_fft. The ReducedNoiseFreeSignal is computed in NoiseCovariance::ComputeReducedSignal
Indices for the reduced signal start at CovMatrixFirstIndex and end at CovMatrixLastIndex. The actual data is stored in the arrays fftMatrices ReducedNoiseFreeSignalStorage whose indices go from 0 to CovMatrixDim - 1.
Referenced by AllocateMemory(), GetReducedNoiseFreeSignal(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), and ~NoiseCovariance().
Referenced by AllocateMemory(), GetReducedNoiseFreeSignal(), and ~NoiseCovariance().
Used in NoiseCovariance::ComputeColumnPropagator.
Reduced signals have size CovMatrixDim. The reduced signal in frequency is obtained from the full length signal by extracting the central CovMatrixDim frequencies. If required the reduced signal in time should be computed from the reduced signal in frequency using the cfftw object NoiseCovariance::Reduced_fft
Referenced by AllocateMemory(), ComputeColumnPropagator(), and ~NoiseCovariance().
Referenced by AllocateMemory(), AmplifyCovarianceMatrix(), ApplyArtificialCentralChannelDemux(), ChiSquareReceiver::ChiSquareReceiver(), ComputeColumnPropagator(), ComputeCovarianceMatrixAWGN(), InitializeCovarianceMatrix(), NoiseCovariance(), operator=(), Perturb(), PropagateAnalyticCWSignalNoLossNoDispersion(), Propagator(), ReadFileNoiseFreeSignalAndCovarianceMatrix(), SetCovarianceMatrixAWGN(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), WriteFileFreqField(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), WriteFileTimeField(), and ~NoiseCovariance().
int NoiseCovariance::SignalVecDim [private] |
This is same as OptSignal::qtPoints.
Referenced by AllocateMemory(), ApplyArtificialCentralChannelDemux(), ApplyArtificialDispersionCompensation(), ComputeArtificialDispersionCompensationOperator(), ComputeColumnPropagator(), ComputeReducedSignal(), NoiseCovariance(), operator=(), Perturb(), Propagator(), RestoreChannels(), WriteFileFreqField(), and WriteFileTimeField().
double** NoiseCovariance::TempProductMatrix [private] |
Real matrix of size 2*NoiseCovarianceCovMatrixDim x 2*NoiseCovarianceCovMatrixDim used in UpdateCovMatrixODE()
This is the matrix C in Ron's code
Referenced by AllocateMemory(), UpdateCovMatrixODE(), and ~NoiseCovariance().
double* NoiseCovariance::TempProductStorageVec [private] |
Real vector of length 4*sq(NoiseCovariance::CovMatrixDim) where the elements of NoiseCovariance::TempProductMatrix are actually stored
Referenced by AllocateMemory(), and ~NoiseCovariance().
Referenced by NoiseCovariance(), operator=(), and TurnOnJitterSeparation().
Referenced by AllocateMemory(), Amplify(), Attenuate(), ComputeCovarianceMatrixAWGN(), GetCovarianceMatrix(), NoiseCovariance(), operator=(), Propagate(), WriteFileAWGNNoiseFreeSignalAndNoiseSpectralDensity(), WriteFileNoiseFreeSignalAndCovarianceMatrix(), WriteTypeNoiseMethod(), and ~NoiseCovariance().
Referenced by NoiseCovariance(), operator=(), WriteFileFreqField(), and WriteFileTimeField().
int NoiseCovariance::ZStepNum [private] |
Referenced by operator=(), Perturb(), Propagate(), Propagator(), and ResetVolatileParameters().
int NoiseCovariance::ZStepNumSaved [private] |
Referenced by operator=(), Perturb(), Propagator(), and ResetVolatileParameters().