Public Member Functions | Private Member Functions | Private Attributes

OptFiber Class Reference

#include <ocsOptFiber.hh>

List of all members.

Public Member Functions

 OptFiber ()
 OptFiber (string InFileName, OptSignal *oOptSignal2, RanNumGen *RNG2)
void PropagateFiberScalarNLS (double *PropagatedLengthFiber)
void PropagateFiberDecoupledNLS (double *PropagatedLengthFiber)
void PropagateFiberScalarNLSWriteData (double *PropagatedLengthFiber, int WriteFlag, char *DistTimePowerPhaseFileName, int TimeIndexIncrement, double FirstWriteLength, double DeltaWriteLength, int *NumSlicesZ, int NumSlicesFirstWriteLength)
void SwitchOptSignalData (OptSignal *oOptSignal2)
void SetLengthFiberAndQtStepsFiber (double Length, int numSteps)
void SetStepLengths (double *usrStepLength)
void SetStepLength (double StepLength, int StepNumber)
void SetSndOrDispFiber (double SndOrDispFiber2)
void SetFstOrDispFiber (double FstOrDispFiber2)
void SetGammaFiber (double gamma2)
void SetAttenuation (double AttenuationFiber2)
void GetRandomStepLengths (double RelativeRangeLengths)
void WriteFileStepLengths (char *outFile)
double GetFirstOrderDispersion ()
double GetSecondOrderDispersion ()
double GetFiberLength ()
double GetFstOrDispFiber ()
double GetSndOrDispFiber ()
void WriteFileDispersionProfile (char *outFile)
double GetLengthFiber ()
int GetQtStepsFiber ()
double GetAttenuationFiber ()
double GetNepperAttenuationFiber ()
double GetNonLinIndexFiber ()
double GetGamma ()
void SetNonLinCoupling (double a11, double a12, double a21, double a22)
 ~OptFiber ()
void SetMeanDGD_SqrtLength (double MeanDGD_SqrtLength2)
void SetPMD_Fiber (double PMD_Fiber2)
void GetFiberSampleCompleteScatt (void)
void SkipOptFibers (int qtOptFibersSkipped)
void PropagateFiberCoupledNLS (double *PropagatedLength)
void PropagateFiberCoupledNLS (void)
void PropagateFullNonlinearFiberCoupledNLS (double *PropagatedLengthFiber)
void PropagateFullNonlinearFiberCoupledNLS (double *PropagatedLengthFiber, double DampTime)
void PropagateFiberCoupledNLSFreqDomainOnly (double *PropagatedLength)
void TransformJonesVectorThroughFiber (double RelFreq, cplx *JonesVec)
 Propagates a given Jones vector through an optical fiber.
void GetFiberSampleUnifRz (void)
void GetFiberSampleUnifRyRzRy (void)
void GetFiberSampleUnifRxRzRy (void)
double GetFiberSample (int TypeDistrib, double BiasingParam)
double GetFiberSampleImportSamplingFstSndOrderPDV_Exp (double BiasedAngleFstOrder, double BiasingParamFstOrder, double BiasingParamSndOrder)
double GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp (double BiasedAngleFstOrder, double BiasingParamFstOrder, double BiasingParamSndOrder)
double GetFiberSampleImportSamplingExp (double BiasingParam)
double GetFiberSampleImportSamplingCosRx (double BiasingParam)
double GetFiberSampleImportSamplingSndOrderPDV_Exp (double BiasedAngle, double BiasingParam)
double GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp (double BiasedAngle, double BiasingParam)
double GetHeuristicBalanceForSndOrderPDV_VariableAngleExp (string InFileNameWithDirectories, string InFileNameWithImpSampWeights, string OutFileNameWithHeuristicBalance)
void SetScatteringMatrix (int IndexStep, double Theta, double Phi, double Psi)
void SetScatteringMatrixRxRzRy (int IndexStep, double Theta, double Phi, double Psi)
void SetScatteringMatrixRzRxRzRyRzRy (int IndexStep, double Chi, double Ksi, double Delta, double Phi, double Theta, double Psi)
double GetDGD (double Freq)
double GetDGD_Manakov (double Freq)
double GetSndOrderDGD (double Freq)
double GetThirdOrderDGD (double Freq)
double Get_dDGD_domega (double Freq)
double GetNum_dDGD_domega (double Freq)
double GetNum_d2DGD_domega2 (double Freq)
void GetInPD_Vector (double Freq, double *InPD_Vector)
void GetInPD_VectorOld (double Freq, double *InPD_Vector)
void RotateThroughFiber (double Freq, double *OutVector)
void GetOutPD_Vector (double Freq, double *OutPD_Vector)
void GetOutPD_VectorOld (double Freq, double *OutPD_Vector)
void GetSndOrderOutPD_Vector (double Freq, double *SndOrderOutPD_Vector)
void GetSndOrderOutPD_Vector (double Freq, double *SndOrderOutPD_Vector, double *OutPD_Vector)
void GetNumSndOrderOutPD_Vector (double Freq, double *SndOrderOutPD_Vector)
void GetThirdOrderOutPD_Vector (double Freq, double *ThirdOrderOutPD_Vector)
void GetThirdOrderOutPD_Vector (double Freq, double *ThirdOrderOutPD_Vector, double *SndOrderOutPD_Vector, double *OutPD_Vector)
void GetNumThirdOrderOutPD_Vector (double Freq, double *ThirdOrderOutPD_Vector)
void GetNumOutPD_Vector (double *NumOutPD_Vector[3])
double GetExpectedDGD (void)
double GetExpectedSndOrderDGD (void)
double GetExpectedThirdOrderDGD (void)
double GetMeanDGD_SqrtLength (void)
double GetLocalBeatLength (void)
double GetLocalBeatLength (double Freq)

Private Member Functions

void AllocateMemory_SetLengthSteps (void)
double rms2meanDGD (void)
void ReleaseMemory (void)
void GetEulerMatrix (int IndexStep)
void GetRyRzRyMatrix (int IndexStep)
void GetRxRzRyMatrix (int IndexStep)
void GetRxRzRyRzRyMatrix (int IndexStep)
void GetRzRxRzRyRzRyMatrix (int IndexStep)
void GetTmOut (void)

Private Attributes

int TypeScattering
OptSignaloOptSignal
cfftwfft
fftMatrices sfftM
int MemAllocated
RanNumGenRNG
int GotFiberSample
double * theta
double * psi
double * phi
double * delta
double * ksi
double * chi
double * StepLength
int qtStepsFiber
int qtStepsFiberLast
double LengthFiber
double PMD_Fiber
double MeanDGD_SqrtLength
double FstOrDispFiber
double SndOrDispFiber
double NonLinIndexFiber
int WithNonLin
double EffectAreaFiber
double AttenuationFiber
double NepperAttenuationFiber
double CenterFreq
int qtPoints
double DeltaFreq
double cvtheta2
double cvtheta
cplxTransM [2][2]
double DeltaZ
double dBeta_2dOmega
double gamma
double NonLinCoupling [2][2]
fftMatrices sfftNumPD_Vector
double * Tmp1PD_Vector [3]
double * Tmp2PD_Vector [3]
double * Dev1PD_Vector [3]
double * Dev2PD_Vector [3]
bool FlagImportSamplingSndOrderPDV_VariableAngleExp
int DebugLevel

Constructor & Destructor Documentation

OptFiber::OptFiber (  ) 

References MemAllocated.

OptFiber::OptFiber ( string  InFileName,
OptSignal oOptSignal2,
RanNumGen RNG2 
)
OptFiber::~OptFiber (  ) 

References MemAllocated, and ReleaseMemory().


Member Function Documentation

void OptFiber::AllocateMemory_SetLengthSteps ( void   )  [private]
double OptFiber::Get_dDGD_domega ( double  Freq  ) 

This method returns the derivative of the differential-group delay (DGD) with respect to the angular frequency $$. The frequency derivative is evaluated at at the angular frequency Freq

References GetDGD(), GetOutPD_Vector(), GetSndOrderOutPD_Vector(), GotFiberSample, and MemAllocated.

Referenced by GetNum_d2DGD_domega2().

double OptFiber::GetAttenuationFiber (  )  [inline]

References AttenuationFiber.

double OptFiber::GetDGD ( double  Freq  ) 

This method returns the differential-group delay (DGD) of the current fiber at the angular frequency Freq. The DGD is equal to the length of the polarization-dispersion vector.

References GetOutPD_Vector(), sq(), and sqrt().

Referenced by GaussianReceiver::ComputeFirstOrderPMDParameters(), Get_dDGD_domega(), and GetNum_dDGD_domega().

double OptFiber::GetDGD_Manakov ( double  Freq  ) 

This method returns the differential-group delay (DGD) of the current fiber at the frequency Freq. The DGD is computed using an analytical method described in the JLT paper "Manakov-PMD equation ...", which is based on the Jones matrices.

Despite being an analytical method, the coputational time of this method scales with the square of the number of fiber steps. Therefore, the method GetDGD(), which scales with the number of fiber steps, should be the method of choice.

References dBeta_2dOmega, DeltaZ, GotFiberSample, jc, MemAllocated, pi, qtStepsFiber, sqrt(), and TransM.

void OptFiber::GetEulerMatrix ( int  IndexStep  )  [private]

This method generates an Euler matrix for the mode coupling of the section specified in the input parameter IndexStep. The Euler matrix corresponds to the rotation T = Rx * Ry * Rx.

The Euler angles used to generate the matrix are stored in the vectors phi[], theta[], and psi[], which are variables of the OptFiber class.

This is an internal method.

References jc, phi, psi, theta, and TransM.

Referenced by GetFiberSampleCompleteScatt(), GetFiberSampleUnifRz(), and SetScatteringMatrix().

double OptFiber::GetExpectedDGD ( void   )  [inline]
double OptFiber::GetExpectedSndOrderDGD ( void   )  [inline]

References GetExpectedDGD(), sq(), and sqrt().

double OptFiber::GetExpectedThirdOrderDGD ( void   )  [inline]

References cube(), GetExpectedDGD(), and sqrt().

double OptFiber::GetFiberLength (  )  [inline]

References LengthFiber.

double OptFiber::GetFiberSample ( int  TypeDistrib,
double  BiasingParam 
)

This method generates a random fiber realization using several methods to produce random mode coupling prior to each section.

The input parameter TypeDistrib specifies the time of random mode coupling: 1) Random rotation around the z-axis with a uniformly distributed angle of rotation; 2) Random rotation that produces a Stokes vector that is univormly distributed on the Poincar\'e sphere; 3) Importance sampling to bias first-order PMD;

The input parameter BiasingParam specifies the amount of bias if importance sampling to bias first-order PMD was selected (TypeDistrib == 3).

This method does not have the option of importance sampling to bias both first- and second-order PMD. Therefore, this method is OUT OF DATE.

References GetFiberSampleCompleteScatt(), GetFiberSampleImportSamplingCosRx(), GetFiberSampleImportSamplingExp(), GetFiberSampleImportSamplingSndOrderPDV_Exp(), GetFiberSampleUnifRz(), and pi.

void OptFiber::GetFiberSampleCompleteScatt ( void   ) 

This methods generates random mode couplings between the birefringent sections by a random polarization rotation. This polarization rotation transforms any input polarization state to a random output polarization state whose probability density function is uniformly distributed on the Poincar\'e sphere.

This rotation is obtained in this method using the three Euler angles.

References cvtheta, GetEulerMatrix(), RanNumGen::GetRanNum(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, theta, and TypeScattering.

Referenced by GetFiberSample(), GetHeuristicBalanceForSndOrderPDV_VariableAngleExp(), and SkipOptFibers().

double OptFiber::GetFiberSampleImportSamplingCosRx ( double  BiasingParam  ) 

This method generates a fiber sample with importance sampling applied to first-order PMD. The random mode coupling between each section is produced by the combination of three random rotations: Rx, Rz, and Ry, that produce an uniform distribution of the Stokes vector on the Poincare sphere. The polarization transformation in each section is equal to T = Rx * Rz * Ry.

The biasing function used for importance sampling is based on the cosine functiion. It is recommendable to use the method GetFiberSampleImportSamplingExp() if you want to use importance sampling to bias first-order PMD. Therefore, this method is OUT OF DATE.

References CenterFreq, cvtheta, dBeta_2dOmega, RanNumGen::GetRanNum(), GetRxRzRyMatrix(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), StepLength, theta, TransRzRyV3to_Xhat(), and TypeScattering.

Referenced by GetFiberSample().

double OptFiber::GetFiberSampleImportSamplingExp ( double  BiasingParam  ) 

This method generates a fiber sample with importance sampling to bias first-order PMD. The random mode coupling between each section is produced by the combination of three random rotations: Rx, Rz, and Ry, that produce a Stokes vector that is uniformly distributed on the Poincare sphere. The polarization transformation in each section is equal to T = Rx * Rz * Ry.

The biasing function used for importance sampling is based on the exponential functiion.

To cover the differential group delay (DGD), which is the first-order PMD, from 0 to 4 times the mean DGD of a fiber with 80 sections one may use 0.0, 0.5, and 1.0 for the bias parameter BiasParam. All but $10^{-8}$ of the cumulative distribution function (cdf) of the DGD is in the region where the DGD is less than 4 times the mean DGD of a fiber.

The use of 80 section to model a fiber should be sufficient for most applications. For a fiber with 200 sections one may use 0.0, 0.3, and 0.6 for the bias parameter BiasParam, if it is necessary.

One should use importance sampling method to bias first- and second-order PMD even when one wants to bias only first-order PMD if one wants to combine samples from multiple distributions using the balanced heuristic method.

References CenterFreq, cvtheta, dBeta_2dOmega, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GetRxRzRyMatrix(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRzRyV3to_Xhat(), and TypeScattering.

Referenced by GetFiberSample().

double OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp ( double  BiasedAngleFstOrder,
double  BiasingParamFstOrder,
double  BiasingParamSndOrder 
)

This method generates a fiber sample with importance sampling to bias both first- and second-order PMD. The random mode coupling between each section is produced by the combination of five rotations: Rx, Rz, Ry, Rz, and Ry, that produce an uniform Stokes vector on the Poincar\'e sphere. The polarization transformation in each section is equal to T = Rx * Rz * Ry * Rz * Ry.

The biasing function used for importance sampling is based on the exponential functiion, where first- and second-order PMD are biased independently. Since firs- and second-order PMD are not independent quantities, it is not efficient to bias these two quantities independently.

The input parameter BiasingParamFstOrder is the bias parameter of the first-order PMD, and the input parameter BiasingParamSndOrder is the bias parameter of the second-order PMD. The parameter BiasedAngleFstOrder determines the angle between the polarization disperison vector of the previous section and the direction to which the current section will be biased. For pure first-order PMD bias this angle must be equal to zero. For pure second-order PMD bias, this angle must be equal to pi/2, where BiasingParamFstOrder must be equal to zero (unbiased). Different combinations of BiasedAngleFstOrder between 0 and pi/2 and and values of BiasingParamFstOrder and BiasingParamSndOrder must be used to cover the first- and second-order PMD plane.

To cover the differential group delay (DGD), which is the first-order PMD, from 0 to 4 times the mean DGD of a fiber with 80 sections one may use 0.0, 0.5, and 1.0 for the bias parameter. All but $10^{-8}$ of the cumulative distribution function (cdf) of the DGD is in the region where the DGD is less than 4 times the mean DGD of a fiber.

This function is OUT OF DATE, since it does not take into account the correlation of the second-order PMD with the first-order PMD.

References CenterFreq, cvtheta, dBeta_2dOmega, delta, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GetRxRzRyRzRyMatrix(), GotFiberSample, ksi, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRyV3to_YZ(), TransRzRyV3to_Xhat(), and TypeScattering.

double OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp ( double  BiasedAngleFstOrder,
double  BiasingParamFstOrder,
double  BiasingParamSndOrder 
)

This method generates a fiber sample with importance sampling to bias both first- and second-order PMD. It is the same as GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), except that the actual biased angle for the first-order PMD bias in each section varies linearly from zero to BiasedAngle as the section number varies from the first to the last section in the fiber.

The choice of this linearly varying angle for the first-order PMD bias is because large second-order PMD bias also require large first-order PMD bias.This phenomenon was demonstrated by G. Biondini and W. L. Kath.

The input parameter BiasingParamFstOrder is the bias parameter of the first-order PMD, and the input parameter BiasingParamSndOrder is the bias parameter of the second-order PMD. The parameter BiasedAngleFstOrder determines the angle between the polarization disperison vector of the previous section and the direction to which the current section will be biased, which varies linearly along the fiber sections as described in the previous paragraph. For pure first-order PMD bias this angle must be equal to zero. For pure second-order PMD biase, this angle must be equal to pi/2, where BiasingParamFstOrder must be equal to zero (unbiased). Different combinations of BiasedAngleFstOrder between 0 and pi/2 and and values of BiasingParamFstOrder and BiasingParamSndOrder must be used to cover the first- and second-order PMD plane.

To cover the differential group delay (DGD), which is the first-order PMD, from 0 to 4 times the mean DGD of a fiber with 80 sections one may use 0.0, 0.5, and 1.0 for the bias parameter. All but $10^{-8}$ of the cumulative distribution function (cdf) of the DGD is in the region where the DGD is less than 4 times the mean DGD of a fiber.

This function is OUT OF DATE, since it does not take into account the correlation of the second-order PMD with the first-order PMD.

References CenterFreq, cvtheta, dBeta_2dOmega, delta, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GetRxRzRyRzRyMatrix(), GotFiberSample, ksi, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRyV3to_YZ(), TransRzRyV3to_Xhat(), and TypeScattering.

double OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp ( double  BiasedAngle,
double  BiasingParam 
)

This method generates a fiber sample with importance sampling to bias both first- and second-order PMD.

The input parameter BiasingParam is the bias parameter for both the first- and the second-order PMD. The parameter BiasedAngle determines the angle between the polarization disperison vector of the previous section and the direction to which the current section will be biased. The second-order PMD is indirectly biased when BiasedAngle is different from zero and $$.

This method is OUT OF DATE.

References CenterFreq, chi, cvtheta, dBeta_2dOmega, delta, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GetRzRxRzRyRzRyMatrix(), GotFiberSample, ksi, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRyV3to_YZ(), TransRzRyV3to_Xhat(), and TypeScattering.

Referenced by GetFiberSample().

double OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp ( double  BiasedAngle,
double  BiasingParam 
)

This method generates a fiber sample with importance sampling to bias both first- and second-order PMD. This biasing technique was proposed by G. Biondini and W. L. Kath.

The input parameter BiasingParam is the bias parameter for both the first- and the second-order PMD. The parameter BiasedAngle determines the angle between the polarization disperison vector of the previous section and the direction to which the current section will be biased, which varies linearly along the fiber sections from zero to the maximum value defined in BiasedAngle.

The second-order PMD is indirectly biased when BiasedAngle is different from zero and $$. For pure first-order PMD bias this angle must be equal to zero. For pure second-order PMD biase, this angle must be equal to pi/2. Different combinations of BiasedAngle between 0 and pi/2 and and values of BiasingParam and must be used to cover the first- and second-order PMD plane of interest.

To cover the first- and second-order PMD plane of a fiber with 80 sections one may use the parameters (BiaingParam,BiasedAngle) = (0,0), (0.5, 0), (0.5, pi/3) (0.5,2 pi/3), (0.5, pi) (0.7,0), (1, 0), (1, pi/3) (1,2 pi/3), (1, pi). These distributions are sufficient to accurately compute outage probabilities of 10^{-7}. These samples must be combined using the balanced heuristics method implemented in GetHeuristicBalanceForSndOrderPDV_VariableAngleExp().

This is the method of choice to generate fibers using importance sampling to bias first- and second-order PMD.

References CenterFreq, chi, cvtheta, dBeta_2dOmega, delta, FlagImportSamplingSndOrderPDV_VariableAngleExp, RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GetRzRxRzRyRzRyMatrix(), GotFiberSample, ksi, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRyV3to_YZ(), TransRzRyV3to_Xhat(), and TypeScattering.

void OptFiber::GetFiberSampleUnifRxRzRy ( void   ) 

This method generates a fiber sample where the random mode coupling between each section is produced by the combination of three random rotations: Rx, Rz, and Ry, whose angles of rotation are uniformly distributed between 0 and 2 $$. The polarization transformation in each section is equal to T = Rx * Rz * Ry.

This method does not produce a uniform distribution of the output Stokes vector on the Poincare sphere. For most applications, it is preferred to use a model that produces a uniform rotation on the Poincare shpere, such as that one that can be obtained using the Euler angles.

This method is OUT OF DATE.

References cvtheta, RanNumGen::GetRanNum(), GetRxRzRyMatrix(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, theta, and TypeScattering.

void OptFiber::GetFiberSampleUnifRyRzRy ( void   ) 

This method generates a fiber sample where the random mode coupling between each section is produced by the combination of three random rotations: Ry, Rz, and Ry, whose angles of rotation are uniformly distributed between 0 and 2 $$. The polarization transformation in each section is equal to T = Ry * Ry * Rx.

This method does not produce a uniform distribution of the output Stokes vector on the Poinca\'e sphere. For most applications, it is preferred to use a model that produces a uniform distribution of the Stokes vector on the Poincar\'e shpere, such as that one that can be obtained using the Euler angles.

This method is OUT OF DATE.

References cvtheta, RanNumGen::GetRanNum(), GetRyRzRyMatrix(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, theta, and TypeScattering.

void OptFiber::GetFiberSampleUnifRz ( void   ) 

This method generates a fiber sample where the random mode coupling between each section is produced by a rotation Rz that is produced by a combination of three rotations, T = Rx * Ry * Rx.

This method can be used when one wants to model fibers with PMD using rotators. For most applications, it is preferred to use a model that produces a uniform rotation on the Poincare shpere, such as that one that can be obtained with the Euler angles.

References GetEulerMatrix(), RanNumGen::GetRanNum(), GotFiberSample, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RNG, theta, and TypeScattering.

Referenced by GetFiberSample().

double OptFiber::GetFirstOrderDispersion (  )  [inline]

References FstOrDispFiber.

double OptFiber::GetFstOrDispFiber (  )  [inline]

References FstOrDispFiber.

double OptFiber::GetGamma (  )  [inline]

References gamma.

double OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp ( string  InFileNameWithDirectories,
string  InFileNameWithImpSampWeights,
string  OutFileNameWithHeuristicBalance 
)

This method generates the combined weights for all the samples generated from multiple importance sampling distributions with firsr- and second-order PMD bias using the balanced heuristic method. All the samples can be later combined in a single distribution using the balanced heuristic weight files that are generated by this method. Thus method was developed by E. Veach.

The balanced heuristic weights are only computed for the samples that are generated using the method GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp().

The input parameter InFileNameWithDirectories contains a list of all the directories that contais the samples to be combined. The directory names must separated by a new line character.

The input parameterInFileNameWithImpSampWeights contains the name of the file that contains the importance sampling weights. The name of this file is unique. Therefore, all the files whose samples are being weighted must have the same name in their respective directories.

The input parameter OutFileNameWithHeuristicBalance contains the name of the files with the balanced heuristic weights that will be created in each directory. The name of this file is unique. Therefore, all the directories will have the same file name.

This is the method of choice to generate weights for the combination of multiple importance sampling distributions. Then, the samples can be combined with these weights using the method Histogram::MultipleHeuristicBalanceImport() of the Histogram class.

References CenterFreq, chi, cvtheta, dBeta_2dOmega, delta, GetFiberSampleCompleteScatt(), RanNumGen::GetLikelihoodRatioForRanCosineBiased(), RanNumGen::GetRanCosineBiased(), RanNumGen::GetRanNum(), GotFiberSample, ksi, MemAllocated, phi, pi, PMD_Fiber, psi, qtStepsFiber, RanNumGen::ResetRanNumGen(), RNG, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sgn(), StepLength, theta, TransRyV3to_YZ(), TransRzRyV3to_Xhat(), and TypeScattering.

void OptFiber::GetInPD_Vector ( double  Freq,
double *  InPD_Vector 
)

This method returns the input polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter InPD_Vector. This method is cumulative. Therefore, the parameter InPD_Vector must be initialized before computing for the first fiber.

The polarization-dispersion vector is defined by the Stokes vector at the receiver and and by the frequency derivative of the Stokes vector.

The length of the polarization-dispersion vector is equal to the differential-group delay (DGD), and the direction of the polarization-dispersion vector is parallel to the direction of the principal states of polarization (PSPs).

The polarization-dispersion vector is commonly referred to as the polarization mode dispersion (PMD) vector.

References chi, dBeta_2dOmega, delta, GotFiberSample, ksi, MemAllocated, phi, pi, psi, qtStepsFiber, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), StepLength, theta, and TypeScattering.

void OptFiber::GetInPD_VectorOld ( double  Freq,
double *  InPD_Vector 
)

This method returns the input polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter InPD_Vector. This method is cumulative. Therefore, the parameter InPD_Vector must be initialized before computing for the first fiber.

This method is OUT OF DATE.

References dBeta_2dOmega, GotFiberSample, MemAllocated, phi, pi, psi, qtStepsFiber, StepLength, and theta.

double OptFiber::GetLengthFiber (  )  [inline]

References LengthFiber.

double OptFiber::GetLocalBeatLength ( void   ) 

References CenterFreq, dBeta_2dOmega, and pi.

double OptFiber::GetLocalBeatLength ( double  Freq  )  [inline]

References dBeta_2dOmega, and pi.

double OptFiber::GetMeanDGD_SqrtLength ( void   )  [inline]

References MeanDGD_SqrtLength, and sqrt().

double OptFiber::GetNepperAttenuationFiber (  )  [inline]
double OptFiber::GetNonLinIndexFiber (  )  [inline]

References NonLinIndexFiber.

double OptFiber::GetNum_d2DGD_domega2 ( double  Freq  ) 

This method returns the numerical second-order derivative of the differential-group delay (DGD) with respect to the angular frequency $$. The second-order frequency derivative is evaluated at at the angular frequency Freq

References Get_dDGD_domega(), GetExpectedDGD(), GotFiberSample, MemAllocated, and pi.

double OptFiber::GetNum_dDGD_domega ( double  Freq  ) 

This method returns a numerical derivative of the differential-group delay (DGD) with respect to the angular frequency $$. The frequency derivative is evaluated at at the angular frequency Freq

This method was designed to test the analytical expression, which is the method of choice. Therefore, this method should be not used in other applications.

References GetDGD(), GetExpectedDGD(), GotFiberSample, MemAllocated, and pi.

void OptFiber::GetNumOutPD_Vector ( double *  NumOutPD_Vector[3]  ) 

This method returns the numericl output polarization-dispersion vector of the current fiber for all the frequencies in the FFT window. The polarization-dispersion vector at each frequency of the FFT window is stored in the pointer *NumOutPD_Vector[3], which has three dimensions. the pointer numer correspond to the frequency in the FFT array. The memory must have been alocated to the pointer array before calling this method.

This method is numerical and is very slow, since the numerical value of the polarization dispersion vector is obtained by using a numerical derivative of the Stokes vector with respect to the frequency. Therefore, this function should not be used. This function was written only to validate the analytical method GetNumOutPD_Vector().

References CenterFreq, Dev1PD_Vector, Dev2PD_Vector, cfftw::FFT(), fft, fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, FreeCplx(), GotFiberSample, Jones2Stokes(), LengthFiber, MemAllocated, NEAR_ZERO, NewCplx(), pi, PMD_Fiber, PropagateFiberCoupledNLS(), qtPoints, sfftM, sfftNumPD_Vector, sq(), sqrt(), Stokes2Jones(), Tmp1PD_Vector, Tmp2PD_Vector, fftMatrices::tOptSignalX, and fftMatrices::tOptSignalY.

void OptFiber::GetNumSndOrderOutPD_Vector ( double  Freq,
double *  SndOrderOutPD_Vector 
)

This method returns the numerical output second-order polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter SndOrderOutPD_Vector. This method is not cumulative. Therefore, it does not require initialization.

The second-order polarization-dispersion vector is the derivative of the polarization-dispersion vector with respect to the angular frequency.

Since this method is numerical, one should use a method that returns the second-order polarization-mode dispersion from an analytical method: GetSndOrderOutPD_Vector(). This method was developed only to test the analytical method for the computation of the second-order PMD.

References GetExpectedDGD(), GetOutPD_Vector(), GotFiberSample, MemAllocated, and pi.

void OptFiber::GetNumThirdOrderOutPD_Vector ( double  Freq,
double *  ThirdOrderOutPD_Vector 
)

This method returns the numerical output third-order polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter SndOrderOutPD_Vector. This method is not cumulative. Therefore, it does not require initialization of the input parameters.

The third-order polarization-dispersion vector is the second derivative of the polarization-dispersion vector with respect to the angular frequency.

Since this method is numerical, one should use a method that returns the third-order polarization-mode dispersion from an analytical expression. This method was developed only to test the analytical method for the computation of the second-order PMD: GetThirdOrderOutPD_Vector().

References GetExpectedDGD(), GetSndOrderOutPD_Vector(), GotFiberSample, MemAllocated, and pi.

void OptFiber::GetOutPD_Vector ( double  Freq,
double *  OutPD_Vector 
)

This method returns the output polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter OutPD_Vector. This method is cumulative. Therefore, the parameter OutPD_Vector must be initialized before computing for the first fiber.

The polarization-dispersion vector is defined by the Stokes vector at the receiver and and by the frequency derivative of the Stokes vector.

The length of the polarization-dispersion vector is equal to the differential-group delay (DGD), and the direction of the polarization-dispersion vector is parallel to the direction of the principal states of polarization (PSPs).

The polarization-dispersion vector is commonly referred to as the polarization mode dispersion (PMD) vector.

References chi, dBeta_2dOmega, delta, GotFiberSample, ksi, MemAllocated, phi, pi, psi, qtStepsFiber, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), StepLength, theta, and TypeScattering.

Referenced by GaussianReceiver::ComputeFirstOrderPMDParameters(), Get_dDGD_domega(), GetDGD(), and GetNumSndOrderOutPD_Vector().

void OptFiber::GetOutPD_VectorOld ( double  Freq,
double *  OutPD_Vector 
)

This method returns the output polarization-dispersion vector of the current fiber at the frequency Freq in the parameter OutPD_Vector. This method is cumulative. Therefore, the parameter OutPD_Vector must be initialized before computing for the first fiber.

This method is OUT OF DATE.

References dBeta_2dOmega, GotFiberSample, MemAllocated, phi, pi, psi, qtStepsFiber, StepLength, and theta.

int OptFiber::GetQtStepsFiber (  )  [inline]

References qtStepsFiber.

void OptFiber::GetRandomStepLengths ( double  RelativeRangeLengths  ) 
void OptFiber::GetRxRzRyMatrix ( int  IndexStep  )  [private]

This method generates a rotation T = Rx * Rz * Ry for the mode coupling of the section specified in the input parameter IndexStep. The angles used to generate the matrix are stored in the vectors phi[], theta[], and psi[], which are variables of the OptFiber class.

This method is applied in the use of importance sampling applied to first-order PMD.

This is an internal method that is OUT OF DATE, since importance sampling with first- and second-order PMD bias should be used even when one wants to bias only the first-order PMD.

References jc, phi, psi, theta, and TransM.

Referenced by GetFiberSampleImportSamplingCosRx(), GetFiberSampleImportSamplingExp(), GetFiberSampleUnifRxRzRy(), and SetScatteringMatrixRxRzRy().

void OptFiber::GetRxRzRyRzRyMatrix ( int  IndexStep  )  [private]

This method generates a rotation T = Rx * Rz * Ry * Rz * Ry for the mode coupling of the section specified in the input parameter IndexStep. This matrix can produces the same effect of the Euler matrix. The angles used to generate the matrix are stored in the vectors phi[], theta[], psi[], ksi[] and delta[], which are variables of the OptFiber class.

This method is applied in the use of one importance sampling method to bias the first- and second-order PMD. However, this method is not the most efficient one. Therefore, this method SHOULD NOT BE USED for importance sampling applied to PMD. One shoud use the method GetRzRxRzRyRzRyMatrix().

This is an internal method that is OUT OF DATE.

References delta, jc, ksi, phi, psi, theta, and TransM.

Referenced by GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), and GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp().

void OptFiber::GetRyRzRyMatrix ( int  IndexStep  )  [private]

This method generates a rotation T = Ry * Rz * Ry for the mode coupling of the section specified in the input parameter IndexStep. This matrix can produces the same effect of the Euler matrix. The angles used to generate the matrix are stored in the vectors phi[], theta[], and psi[], which are variables of the OptFiber class.

This method is applied in the use of importance sampling to bias first-order PMD. However, it was replaced by the method GetRxRzRyMatrix(). Therefore, it is OUT OF DATE.

This is an internal method.

References jc, phi, psi, theta, and TransM.

Referenced by GetFiberSampleUnifRyRzRy().

void OptFiber::GetRzRxRzRyRzRyMatrix ( int  IndexStep  )  [private]

This method generates a rotation T = Rz * Rx * Rz * Ry * Rz for the mode coupling of the section specified in the input parameter IndexStep. This matrix can produces the same effect of the Euler matrix. The angles used to generate the matrix are stored in the vectors phi[], theta[], psi[], ksi[] and delta[], which are variables of the OptFiber class.

This method is applied in the use of importance sampling method to bias first- and second-order PMD. This is the most efficient method in the OptFiber class for this purpose.

This is an internal method.

References chi, delta, jc, ksi, phi, psi, theta, and TransM.

Referenced by GetFiberSampleImportSamplingSndOrderPDV_Exp(), GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), and SetScatteringMatrixRzRxRzRyRzRy().

double OptFiber::GetSecondOrderDispersion (  )  [inline]

References SndOrDispFiber.

double OptFiber::GetSndOrderDGD ( double  Freq  ) 

This method returns the length of the second-order polarization dispersion vector, which is the derivative of the polarization-dispersion vector with respect to the angular frequency.

Note that the length of the second-order polarization-dispersion vector is not the same as the derivative of the DGD with respect to the angular frequency.

References GetSndOrderOutPD_Vector(), sq(), and sqrt().

void OptFiber::GetSndOrderOutPD_Vector ( double  Freq,
double *  SndOrderOutPD_Vector,
double *  OutPD_Vector 
)

This method returns both the output polarization-dispersion vector and the output second-order polarization-dispersion vector of the current fiber at the frequency Freq in the input paremeters OutPD_Vector and SndOrderOutPD_Vector. This method is cumulative. Therefore, the input parameters must be initialized before computing for the first fiber.

The second-order polarization-dispersion vector is the derivative of the polarization-dispersion vector with respect to the angular frequency.

References chi, dBeta_2dOmega, delta, GotFiberSample, ksi, MemAllocated, phi, pi, psi, qtStepsFiber, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), StepLength, theta, and TypeScattering.

void OptFiber::GetSndOrderOutPD_Vector ( double  Freq,
double *  SndOrderOutPD_Vector 
)

This method returns the output second-order polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter SndOrderOutPD_Vector. This method is not cumulative. Therefore, it does not require initialization.

The second-order polarization-dispersion vector is the derivative of the polarization-dispersion vector with respect to the angular frequency.

Referenced by Get_dDGD_domega(), GetNumThirdOrderOutPD_Vector(), and GetSndOrderDGD().

double OptFiber::GetSndOrDispFiber (  )  [inline]

References SndOrDispFiber.

double OptFiber::GetThirdOrderDGD ( double  Freq  ) 

This method returns the length of the third-order polarization dispersion vector, which is the second derivative of the polarization- dispersion vector with respect to the angular frequency.

Note that the length of the third-order polarization-dispersion vector is not the same as the second derivative of the DGD with respect to the angular frequency.

References GetThirdOrderOutPD_Vector(), sq(), and sqrt().

void OptFiber::GetThirdOrderOutPD_Vector ( double  Freq,
double *  ThirdOrderOutPD_Vector 
)

This method returns the output third-order polarization-dispersion vector of the current fiber at the frequency Freq in the input parameter ThirdOrderOutPD_Vector. This method is not cumulative. Therefore, it does not require initialization of the input parameter.

The third-order polarization-dispersion vector is the second derivative of the polarization-dispersion vector with respect to the angular frequency.

Referenced by GetThirdOrderDGD().

void OptFiber::GetThirdOrderOutPD_Vector ( double  Freq,
double *  ThirdOrderOutPD_Vector,
double *  SndOrderOutPD_Vector,
double *  OutPD_Vector 
)

This method returns the output polarization-dispersion vector, the output second-order polarization-dispersion vector, and the third-order polarization-dispersion vector of the current fiber at the frequency Freq in the input paremeters OutPD_Vector, SndOrderOutPD_Vector, and ThirdOrderOutPD_Vector. This method is cumulative. Therefore, the input parameters must be initialized before computing for the first fiber.

The third-order polarization-dispersion vector is the second derivative of the polarization-dispersion vector with respect to the angular frequency.

References chi, dBeta_2dOmega, delta, GotFiberSample, ksi, MemAllocated, phi, pi, psi, qtStepsFiber, RotatesAboutX(), RotatesAboutY(), RotatesAboutZ(), sq(), StepLength, theta, and TypeScattering.

void OptFiber::GetTmOut ( void   )  [private]
void OptFiber::PropagateFiberCoupledNLS ( void   )  [inline]

Referenced by GetNumOutPD_Vector().

void OptFiber::PropagateFiberCoupledNLS ( double *  PropagatedLength  ) 
void OptFiber::PropagateFiberCoupledNLSFreqDomainOnly ( double *  PropagatedLength  ) 

This propagate method is PropagateFiberCoupledNLS without nonlinearity and done entriely in the frequency domain. No Fourier transforms are taken at all. JZ Sept 6th 2002.

This propagate method is PropagateFiberCoupledNLS without nonlinearity and done entriely in the frequency domain. No Fourier transforms are taken at all. JZ Sept 6th 2002.

If you only have linear propagation and are only analyzing the data in the frequency domain this method will give you god speed. Otherwise don't use it! JZ Sept 6th 2002.

References cube(), jc, pi, and sq().

void OptFiber::PropagateFiberDecoupledNLS ( double *  PropagatedLengthFiber  ) 
void OptFiber::PropagateFiberScalarNLS ( double *  PropagatedLengthFiber  ) 
void OptFiber::PropagateFiberScalarNLSWriteData ( double *  PropagatedLengthFiber,
int  WriteFlag,
char *  DistTimePowerPhaseFileName,
int  TimeIndexIncrement,
double  FirstWriteLength,
double  DeltaWriteLength,
int *  NumSlicesZ,
int  NumSlicesFirstWriteLength 
)
void OptFiber::PropagateFullNonlinearFiberCoupledNLS ( double *  PropagatedLengthFiber,
double  DampTime 
)
void OptFiber::PropagateFullNonlinearFiberCoupledNLS ( double *  PropagatedLengthFiber  )  [inline]
void OptFiber::ReleaseMemory ( void   )  [private]

References chi, delta, ksi, phi, psi, StepLength, theta, and TransM.

Referenced by SetLengthFiberAndQtStepsFiber(), and ~OptFiber().

double OptFiber::rms2meanDGD ( void   )  [private]
void OptFiber::RotateThroughFiber ( double  Freq,
double *  OutVector 
)
void OptFiber::SetAttenuation ( double  AttenuationFiber2  ) 
void OptFiber::SetFstOrDispFiber ( double  FstOrDispFiber2  ) 
void OptFiber::SetGammaFiber ( double  gamma2  ) 
void OptFiber::SetLengthFiberAndQtStepsFiber ( double  Length,
int  numSteps 
)
void OptFiber::SetMeanDGD_SqrtLength ( double  MeanDGD_SqrtLength2  ) 
void OptFiber::SetNonLinCoupling ( double  a11,
double  a12,
double  a21,
double  a22 
) [inline]
void OptFiber::SetPMD_Fiber ( double  PMD_Fiber2  ) 
void OptFiber::SetScatteringMatrix ( int  IndexStep,
double  Theta,
double  Phi,
double  Psi 
)

This method imposes a given random mode coupling prior to each section. The random mode coupling is defined by the three Euler angles of the scattering matrix.

The input parameter IndexStep specifies the number of the section where the random mode coupling matrix will be modified. The parameters Phi, Theta, and Psi are the Euler angles.

This method should not be called directly to generate random fiber realizations.

References GetEulerMatrix(), GotFiberSample, phi, psi, theta, and TypeScattering.

void OptFiber::SetScatteringMatrixRxRzRy ( int  IndexStep,
double  Theta,
double  Phi,
double  Psi 
)
void OptFiber::SetScatteringMatrixRzRxRzRyRzRy ( int  IndexStep,
double  Chi,
double  Ksi,
double  Delta,
double  Phi,
double  Theta,
double  Psi 
)
void OptFiber::SetSndOrDispFiber ( double  SndOrDispFiber2  ) 
void OptFiber::SetStepLength ( double  StepLength,
int  StepNumber 
)

References qtStepsFiber, and StepLength.

void OptFiber::SetStepLengths ( double *  usrStepLength  ) 

References LengthFiber, qtStepsFiber, and StepLength.

void OptFiber::SkipOptFibers ( int  qtOptFibersSkipped  ) 

This method calls the random number generator as many times as required to generate the number of fibers specified in the input parameter qtOptFibersSkiped.

This feature allows to accumulate parallel PMD statistics, since all the fibers used in all the parallel processes are guaranteed to be statistically uncorrelated. For exmple, if one needs to make a statistics that requires 100,000 fibers, one could run 10 independent processes with 10,000 fibers each. However one needs to skip the fibers that are going to be generated by other proesses using this method. The first process could generate the first 10,000 fibers. The second process skips the first 10,000 fibers, then generates the following 10,000 fibers. The third process skips the first 20,000 fiber, then generate the following 10,000 fibers, and so on.

References GetFiberSampleCompleteScatt().

void OptFiber::SwitchOptSignalData ( OptSignal oOptSignal2  ) 
void OptFiber::TransformJonesVectorThroughFiber ( double  RelFreq,
cplx JonesVec 
)

Propagates a given Jones vector through an optical fiber.

The PMD at relative frequency, RelFreq, is measured relative to the center frequency of the channel. Compatible with OptFiber::PropagateFiberCoupledNLS provided no dispersion or nonlinearity. Written by JZ, Dec 2nd 2005

References CenterFreq, dBeta_2dOmega, GotFiberSample, jc, MemAllocated, pi, qtStepsFiber, StepLength, and TransM.

Referenced by GaussianReceiver::ComputeFirstOrderPMDParameters().

void OptFiber::WriteFileDispersionProfile ( char *  outFile  ) 
void OptFiber::WriteFileStepLengths ( char *  outFile  ) 

References qtStepsFiber, and StepLength.


Member Data Documentation

double OptFiber::AttenuationFiber [private]
double OptFiber::CenterFreq [private]
double * OptFiber::chi [private]
double OptFiber::cvtheta [private]
double OptFiber::cvtheta2 [private]
double OptFiber::dBeta_2dOmega [private]
int OptFiber::DebugLevel [private]
double* OptFiber::delta [private]
double OptFiber::DeltaFreq [private]
double OptFiber::DeltaZ [private]
double* OptFiber::Dev1PD_Vector[3] [private]

Referenced by GetNumOutPD_Vector().

double* OptFiber::Dev2PD_Vector[3] [private]

Referenced by GetNumOutPD_Vector().

double OptFiber::EffectAreaFiber [private]

Referenced by OptFiber().

cfftw* OptFiber::fft [private]
double OptFiber::FstOrDispFiber [private]
double OptFiber::gamma [private]
int OptFiber::GotFiberSample [private]
double * OptFiber::ksi [private]
double OptFiber::LengthFiber [private]
double OptFiber::MeanDGD_SqrtLength [private]
int OptFiber::MemAllocated [private]
double OptFiber::NonLinCoupling[2][2] [private]
double OptFiber::NonLinIndexFiber [private]

Referenced by GetNonLinIndexFiber(), and OptFiber().

double * OptFiber::phi [private]
double OptFiber::PMD_Fiber [private]
double * OptFiber::psi [private]
int OptFiber::qtPoints [private]
int OptFiber::qtStepsFiber [private]

Referenced by GetNumOutPD_Vector().

double OptFiber::SndOrDispFiber [private]
double* OptFiber::StepLength [private]
double* OptFiber::theta [private]
double* OptFiber::Tmp1PD_Vector[3] [private]

Referenced by GetNumOutPD_Vector().

double* OptFiber::Tmp2PD_Vector[3] [private]

Referenced by GetNumOutPD_Vector().

cplx* OptFiber::TransM[2][2] [private]
int OptFiber::TypeScattering [private]
int OptFiber::WithNonLin [private]

The documentation for this class was generated from the following files: