Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

ReduOptSignal Class Reference

The reduced optical signal class represents the reduced optical signal. More...

#include <ocsReduOptSignal.hh>

List of all members.

Public Member Functions

 ReduOptSignal (string InFileName, double SignalNoiseBandwidth2)
 Constructor.
 ReduOptSignal (string InFileName2, string JobName)
 JZAug02.
 ~ReduOptSignal ()
 Destructor.
 ReduOptSignal (ReduOptSignal &OrigReduOptSignal)
 Copy Constructor.
ReduOptSignaloperator= (ReduOptSignal &RHS_ReduOptSignal)
 Assignment operator.
void AddReducedNoise (ReduOptSignal *ReduOptSignal1)
void RegenerateReduOptSignal (void)
void RegenerateReduOptSignal (double *OptPowerChannArray2)
void RegenerateReduOptSignalVaryingPower (void)
void DepolarizeReduNoise (void)
 Depolarizes the noise in each channel.
void WriteFileOptSignal (char *outFile)
void WriteMatlabFileOptSignal (string OutFileName)
 JZAug02.
void SetOptElecFilterBandwidth (double OptFilterBandwidthTmp, double ElecFilterBandwidthTmp)
 Set the optical and electrical filter bandwidths.
void SetOptElecFilterBandwidth (string FileNameOptFilter, string FileNameElecFilter)
 Set the optical and electrical filter bandwidths.
void SetEnhancementFactor (double EnhancementFactorTmp)
double GetChannSpacing (void)
double GetSignalNoiseBandwidth (void)
double GetDegreeOfPolarization (void)
 Returns the degree of polarization of the total Stokes parameters.
double GetTotalPower (void)
 Returns the total power.
double GetSignalPower (void)
 Returns the total signal power.
const char * WriteTypePulse (void)
 Returns the pulse type.
double GetQ_Factor (int ChannelArrayIndex)
 Returns the Q factor of the channel with index ChannelArrayIndex.
double GetBitErrorRate (double Q_Factor)
double GetOptSNR (int ChannelArrayIndex)
 Returns the optical SNR of the channel with index ChannelArrayIndex.
double GetSignal (int ChannelArrayIndex)
void GetTotalStokes (double *StokesTotal)
 Computes the Stokes parameters of the total signal and noise.
double GetStokesSignal (int StokesIndex, int ChannelArrayIndex)
 Returns a normalized Stokes parameter of the Signal in a given channel.
double GetNoiseInsideChannel (int ChannelArrayIndex)
 Returns the noise in the channel with index ChannelArrayIndex.
double GetScalarProdSignalNoise (int ChannelArrayIndex)
double GetCoPolarizedNoiseInsideChannel (int ChannelArrayIndex)
double GetOrthogPolarizedNoiseInsideChannel (int ChannelArrayIndex)
double GetStokesNoiseInsideChannel (int StokesIndex, int ChannelArrayIndex)
 Returns a normalized Stokes parameter of the noise in a given channel.
double GetStokesNoise (int StokesIndex, int ChannelArrayIndex)
double GetNoiseInsideBandwidth (int ChannelArrayIndex, double BandwidthNoise)
double GetTotalNoiseSpectralDensity (void)
double GetCoPolarizedNoiseInsideBandwidth (int ChannelArrayIndex, double BandwidthNoise)
double GetOrthogPolarizedNoiseInsideBandwidth (int ChannelArrayIndex, double BandwidthNoise)
double GetNormSignalNoiseBeatingCopolarized (int ChannelArrayIndex)
double GetNormSignalNoiseBeatingOrthogPolarized (int ChannelArrayIndex)
double GetElecTimeDomainSNR (int ChannelArrayIndex)
 Returns the electrical signal-to-noise ratio of a channel.
double GetOutageProbGaussian (double MeanPenalty, double StdDevPenalty, double MaxAcceptablePenalty)
void SetNumChannels (int NumChannels2)
 This method enables the user to change the number of channels on the fly.
void SetOptPowerChannel (double OptPowerChann2)
int GetNumChannels (void)
double GetOptPowerChann (void)
double GetBitRateChann (void)
int GetChannelArrayIndex (int ChannelPhysicalIndex)
 Converts index of channel from ChannelPhysicalIndex to ChannelArrayIndex.
int GetChannelPhysicalIndex (int ChannelArrayIndex)
 Converts index of channel from ChannelArrayIndex to ChannelPhysicalIndex.
double GetCenterFreq (void)
 Returns the central frequency of the reduced signal in Hz.
double GetFrequency (int ChannelArrayIndex)
 Returns the frequency of the channel with index ChannelArrayIndex.
double GetEnhancementFactor (void)
void SetInStokes (const int ChannelArrayIndex, double *StokesVector)
 A helper function for InitializeInStokes.
double GetInStokes (const int ChannelArrayIndex, const int StokesIndex)
 A helper function for InitializeInStokes.

Public Attributes

double * StokesSignal [4]
 Array used to store the Stokes parameters of the signal in each channel.
double * StokesNoise [4]
 Array used to store the Stokes parameters of the noise in each channel.

Private Member Functions

void AllocateMemory (void)
void ReleaseMemory (void)
 Releases allocated memory.
void ProcessReduOptSignalParameters (ifstream *InFile)
void InitializeInStokes (ifstream *InFile)
int ReadInStokes (string InStokesName, int ch, ifstream *InFile)
 A helper function for InitializeInStokes.
void SetInStokes (const int ChannelArrayIndex, const int StokesIndex, double StokesValue)
 A helper function for InitializeInStokes.
double * GetInStokes (const int ChannelArrayIndex)
 A helper function for InitializeInStokes.
void ReadFileFreqPower (string FrequencyDataInFileName)
 JZAug02.

Private Attributes

typePulse TypePulse
 Enumeration variable which gives pulse format.
double CenterFreq
 Central Frequency of the simulation.
double CenterWavelength
 Central wavelength of the simulation.
int NumChannels
 The number of WDM channels.
double ChannSpacing
 The channel spacing.
double SignalNoiseBandwidth
 The bandwidth of the signal and noise in each channel.
double BitRateChann
 The bit rate of a channel.
double OptPowerChann
 The total optical power in each channel.
double * OptPowerChannArray
double * InStokes
 Double array of initial Stokes parameters for each channel.
double OptFilterBandwidth
 Bandwidth of the optical filter in the receiver.
double ElecFilterBandwidth
 Bandwidth of the electrical filter in the receiver.
double EnhancementFactor
 The enhancement factor of the receiver.
string InFileName
 Name of the input parameter file for the Reduced Optical Signal.
double * Frequency

Detailed Description

The reduced optical signal class represents the reduced optical signal.

The reduced optical signal data consists of the power and three Stokes parameters of the signal and noise within each channel of a WDM system and possibly additional unpolarized noise that is not contained within any of the channels. This class also contains methods to compute the $ Q$-factor of a given channel due to the polarization effects.


Constructor & Destructor Documentation

ReduOptSignal::ReduOptSignal ( string  InFileName2,
double  SignalNoiseBandwidth2 
)

Constructor.

The constructor reads in parameters from a file and initializes:

  1. The central frequency of the simulation frequency window
  2. The frequencies of each WDM channel
  3. The power and Stokes parameters of the signal and noise in each channel
  4. The type of pulse and efficiency factor of the receiver that is used to compute the electrical SNR from the optical SNR.
  5. The parameters SignalNoiseBandwidth and PolarizNoiseBandwidth.
Parameters:
InFileName2,: The name of the input parameter file (string)
SignalNoiseBandwidth2,: Used to initialize the class parameter SignalNoiseBandwidth
PolarizNoiseBandwidth2,: Used to initialize the class parameter PolarizNoiseBandwidth

The code requires that

SignalNoiseBandwidth <= PolarizNoiseBandwidth <= ChannSpacing

If PolarizNoiseBandwidth2 == 0 then PolarizNoiseBandwidth = SignalNoiseBandwidth

If PolarizNoiseBandwidth2 < 0 then PolarizNoiseBandwidth = ChannSpacing.

See also:
ReduOptSignal(string InFileName,double SignalNoiseBandwidth2), RegenerateReduOptSignal, ~ReduOptSignal ProcessReduOptSignalParameters

References AllocateMemory(), BitRateChann, CenterFreq, CenterWavelength, ChannSpacing, ElecFilterBandwidth, EnhancementFactor, Frequency2Wavelength(), InFileName, LogFile, LOWER_AND_UPPER, LOWER_ONLY, NumChannels, OptFilterBandwidth, OPTIONAL_NO_WARNING, OptPowerChann, ProcessReduOptSignalParameters(), ReadDouble(), ReadInt(), RegenerateReduOptSignal(), SignalNoiseBandwidth, TypePulse, Wavelength2Frequency(), and WriteTypePulse().

ReduOptSignal::ReduOptSignal ( string  InFileName2,
string  JobName 
)
ReduOptSignal::~ReduOptSignal (  ) 

Destructor.

See also:
ReleaseMemory()

References ReleaseMemory().

Referenced by OptSignal::~OptSignal().

ReduOptSignal::ReduOptSignal ( ReduOptSignal OrigReduOptSignal  ) 

Member Function Documentation

void ReduOptSignal::AddReducedNoise ( ReduOptSignal ReduOptSignal1  ) 

The noise in ReduOptSignal1 is added incoherently to the current ReduOptSignal. For each channel, the Stokes vectors of the noise in ReduOptSignal1 are added to those of the current ReduOptSignal

References GetNumChannels(), NumChannels, and StokesNoise.

void ReduOptSignal::AllocateMemory ( void   )  [private]

Allocates memory for the Stokes parameters of the signal and noise in each channel

References Frequency, InStokes, NumChannels, OptPowerChannArray, StokesNoise, and StokesSignal.

Referenced by ReduOptSignal(), and SetNumChannels().

void ReduOptSignal::DepolarizeReduNoise ( void   ) 

Depolarizes the noise in each channel.

Sets the three Stokes parameters of the noise in each channel to zero, thus depolarizing the noise. The power of the noise and the StokesExtraUnpolChannNoise power are not changed by this method.

References NumChannels, and StokesNoise.

double ReduOptSignal::GetBitErrorRate ( double  Q_Factor  )  [inline]

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

double ReduOptSignal::GetBitRateChann ( void   )  [inline]
double ReduOptSignal::GetCenterFreq ( void   )  [inline]

Returns the central frequency of the reduced signal in Hz.

Referenced by ReduOptAmplifier::ReduOptAmplifier(), and ReduOptFiber::ReduOptFiber().

int ReduOptSignal::GetChannelArrayIndex ( int  ChannelPhysicalIndex  ) 

Converts index of channel from ChannelPhysicalIndex to ChannelArrayIndex.

ChannelPhysicalIndex runs:
-N/2,..... N/2 - 1 for N = NumChannels even and
-(N-1)/2, ... (N-1)/2 for N odd

ChannelArrayIndex runs 0,1,...,N-1

See also:
ProcessReduOptSignalParameters (ifstream * InFile) GetChannelPhysicalIndex(int ChannelArrayIndex)

References NumChannels.

int ReduOptSignal::GetChannelPhysicalIndex ( int  ChannelArrayIndex  ) 

Converts index of channel from ChannelArrayIndex to ChannelPhysicalIndex.

ChannelPhysicalIndex runs:
-N/2,..... N/2 - 1 for N = NumChannels even and
-(N-1)/2, ... (N-1)/2 for N odd

ChannelArrayIndex runs 0,1,...,N-1

See also:
ProcessReduOptSignalParameters (ifstream * InFile) GetChannelArrayIndex(int ChannelPhysicalIndex)

References NumChannels.

Referenced by ProcessReduOptSignalParameters(), and WriteFileOptSignal().

double ReduOptSignal::GetChannSpacing ( void   )  [inline]
double ReduOptSignal::GetCoPolarizedNoiseInsideBandwidth ( int  ChannelArrayIndex,
double  BandwidthNoise 
)
double ReduOptSignal::GetCoPolarizedNoiseInsideChannel ( int  ChannelArrayIndex  ) 
double ReduOptSignal::GetDegreeOfPolarization ( void   ) 

Returns the degree of polarization of the total Stokes parameters.

See also:
GetTotalStokes

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

double ReduOptSignal::GetElecTimeDomainSNR ( int  ChannelArrayIndex  ) 

Returns the electrical signal-to-noise ratio of a channel.

Computes the electrical signal-to-noise ratio (ESNR) of the channel with index ChannelArrayIndex. The ESNR is usd to compute the Q-factor of the channel using the formula of Marcuse.

The ESNR is defined to be the efficiency factor of the receiver multiplied by the OSNR. The OSNR is the ratio of the signal power in the channel to the noise power in the channel. The noise power in the channel is defined to be the total noise in a band of size OptFilterBandwidth about the channel.

The efficiency factor is the ratio of the peak power in a pulse to the average power of the pulse and is given by the value of EnhancementFactor.

An explanation of why we use this definition can be found in UMBC's report to SAIC (June 2001, pages 9-10). A more up to date explanation can be found in Curtis Menyuk's book chapter on polarization effects in WDM systems, which UMBC will provide to SAIC upon request.

See also:
OptFilterBandwidth, EnhancementFactor, GetNoiseInsideBandwidth(int ChannelArrayIndex,double OptFilterBandwidth), GetQ_Factor(int ChannelArrayIndex)

References ElecFilterBandwidth, EnhancementFactor, GetNoiseInsideBandwidth(), GetNoiseInsideChannel(), GetSignal(), NumChannels, and OptFilterBandwidth.

Referenced by GetQ_Factor().

double ReduOptSignal::GetEnhancementFactor ( void   )  [inline]
double ReduOptSignal::GetFrequency ( int  ChannelArrayIndex  )  [inline]

Returns the frequency of the channel with index ChannelArrayIndex.

ChannelArrayIndex in range 0,1,2,...,NumChannels-1.

Referenced by ReduOptAmplifier::AllocateNoiseAmplitudeChannels(), ReduOptFiber::PropagateFiberCoupledNLS(), WriteFileOptSignal(), and WriteMatlabFileOptSignal().

double ReduOptSignal::GetInStokes ( const int  ChannelArrayIndex,
const int  StokesIndex 
)
double * ReduOptSignal::GetInStokes ( const int  ChannelArrayIndex  )  [private]

A helper function for InitializeInStokes.

References InStokes.

double ReduOptSignal::GetNoiseInsideBandwidth ( int  ChannelArrayIndex,
double  BandwidthNoise 
)

Returns the noise in the bandwidth BandwidthNoise about the channel with index ChannelArrayIndex

References ChannSpacing, and StokesNoise.

Referenced by GetElecTimeDomainSNR(), and GetNoiseInsideChannel().

double ReduOptSignal::GetNoiseInsideChannel ( int  ChannelArrayIndex  ) 

Returns the noise in the channel with index ChannelArrayIndex.

In this method the noise is the total noise in a band of size SignalNoiseBandwidth about the channel

See also:
SignalNoiseBandwidth, double GetNoiseInsideBandwidth(int ChannelArrayIndex, double SignalNoiseBandwidth)

References GetNoiseInsideBandwidth(), and SignalNoiseBandwidth.

Referenced by GetElecTimeDomainSNR(), and GetOptSNR().

double ReduOptSignal::GetNormSignalNoiseBeatingCopolarized ( int  ChannelArrayIndex  ) 
double ReduOptSignal::GetNormSignalNoiseBeatingOrthogPolarized ( int  ChannelArrayIndex  ) 
int ReduOptSignal::GetNumChannels ( void   )  [inline]
double ReduOptSignal::GetOptPowerChann ( void   )  [inline]
double ReduOptSignal::GetOptSNR ( int  ChannelArrayIndex  ) 

Returns the optical SNR of the channel with index ChannelArrayIndex.

References GetNoiseInsideChannel(), GetSignal(), and NumChannels.

double ReduOptSignal::GetOrthogPolarizedNoiseInsideBandwidth ( int  ChannelArrayIndex,
double  BandwidthNoise 
)
double ReduOptSignal::GetOrthogPolarizedNoiseInsideChannel ( int  ChannelArrayIndex  ) 
double ReduOptSignal::GetOutageProbGaussian ( double  MeanPenalty,
double  StdDevPenalty,
double  MaxAcceptablePenalty 
)

Computes the probability that a penalty is larger than a maximum allowed penalty assuming that the penalty is Gaussian distributed

In an application this method is used to compute the probability that $ Q$ is larger than MaxAcceptablePenalty. It assumes that $ Q$ is Gaussian distributed with mean MeanPenalty and standard deviation StdDevPenalty.

References erffc(), and sqrt().

double ReduOptSignal::GetQ_Factor ( int  ChannelArrayIndex  ) 

Returns the Q factor of the channel with index ChannelArrayIndex.

The Q factor of a channel is computed from the electrical signal-to-noise ratio using the formula of Marcuse.

See Marcuse paper which is referenced in UMBC's report to SAIC (June 2001, page 9, equation (2)).

See also:
GetElecTimeDomainSNR(int ChannelArrayIndex)

References ElecFilterBandwidth, GetElecTimeDomainSNR(), OptFilterBandwidth, and sqrt().

double ReduOptSignal::GetScalarProdSignalNoise ( int  ChannelArrayIndex  ) 
double ReduOptSignal::GetSignal ( int  ChannelArrayIndex  )  [inline]

Referenced by GetElecTimeDomainSNR(), and GetOptSNR().

double ReduOptSignal::GetSignalNoiseBandwidth ( void   )  [inline]
double ReduOptSignal::GetSignalPower ( void   ) 

Returns the total signal power.

SignalPower = Sum of Powers of the signal in each channel.

So noise power is not included!

See also:
GetTotalPower

References NumChannels, and StokesSignal.

Referenced by ReduOptAmplifier::AmplifyOptSignal().

double ReduOptSignal::GetStokesNoise ( int  StokesIndex,
int  ChannelArrayIndex 
) [inline]
double ReduOptSignal::GetStokesNoiseInsideChannel ( int  StokesIndex,
int  ChannelArrayIndex 
) [inline]

Returns a normalized Stokes parameter of the noise in a given channel.

Returns the normalized Stokes parameter with index StokesIndex (in range 0,1,2,3) for the channel with index ChannelArrayIndex The Stokes parameter is normalized using the power of the polarized noise in the given channel.

double ReduOptSignal::GetStokesSignal ( int  StokesIndex,
int  ChannelArrayIndex 
) [inline]

Returns a normalized Stokes parameter of the Signal in a given channel.

Returns the normalized Stokes parameter with index StokesIndex (in range 0,1,2,3) for the channel with index ChannelArrayIndex The Stokes parameter is normalized using the power of the signal in the given channel.

Referenced by ReduPolarizTransformer::GetImportSampPolarizTransformation().

double ReduOptSignal::GetTotalNoiseSpectralDensity ( void   )  [inline]

To be safe, use only for single-channel simulations. Note: StokesNoise[0][0] contains total noise in frequency window given by ChannSpacing centered on channel zero.

Referenced by OptSignal::AddReducedNoiseToNoiseFreeSignal(), and GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized().

double ReduOptSignal::GetTotalPower ( void   ) 

Returns the total power.

TotalPower = Sum of Powers of the signal and Noise in each channel as well as the power in the Unpolarized noise.

See also:
GetTotalStokes

References NumChannels, StokesNoise, and StokesSignal.

Referenced by ReduOptAmplifier::AmplifyOptSignal(), and ReduOptAmplifier::SetFixedOutputPowerFromCurrentOptSignal().

void ReduOptSignal::GetTotalStokes ( double *  StokesTotal  ) 

Computes the Stokes parameters of the total signal and noise.

Parameters:
StokesTotal,: The total Stokes parameters, computed by this method. (A double array of length 4)

The unnormalized total Stokes parameters are defined as follows.
StokesTotal[0] = Sum of Powers of the signal and Noise in each channel as well as the power in the Unpolarized noise.

The total Stokes vector is
(StokesTotal[1],StokesTotal[2],StokesTotal[3]) = Sum of the Stokes vectors of the signal and noise in each channel.

These unnormalized total Stokes parameters are then normalized by dividing by StokesTotal[0].

See also:
GetTotalPower

References NumChannels, StokesNoise, and StokesSignal.

Referenced by GetDegreeOfPolarization().

void ReduOptSignal::InitializeInStokes ( ifstream *  InFile  )  [private]

Initializes the input Stokes parameters of the reduced optical signal. Called by ProcessReduOptSignalParameters.

The input Stokes parameters, InStokes, for the signal in each channel are read from the input file stream InFile. If the InStokes parameters for channels 1,2 are not specified in the input parameter file then we abort. If the InStokes parameters for a channel whose index is larger than two are not specified in the input parameter file then we proceed as follows.

  1. If the channel has an odd index then we use the InStokes parameters specified for Channel 1.
  2. If the channel has an even index then we use the InStokes parameters specified for Channel 2.

References GetInStokes(), LogFile, NumChannels, ReadInStokes(), and SetInStokes().

Referenced by ProcessReduOptSignalParameters().

ReduOptSignal & ReduOptSignal::operator= ( ReduOptSignal RHS_ReduOptSignal  ) 
void ReduOptSignal::ProcessReduOptSignalParameters ( ifstream *  InFile  )  [private]

Initializes the frequencies and input Stokes parameters of the reduced optical signal. Called by the class constructor.

In the input parameter file the channels are labelled 1,2,3,.., NumChannels. Internally in the code the channels are indexed by ChannelArrayIndex which takes values 0,1,2,...,NumChannels-1.

In the input parameter file if the flag $EvenlySpacedFreqsFlag is set to 1 then the channels are evenly spaced in frequency, with the channel spacing determined by the parameter $ChannSpacing. As I understand it code is only guarenteed to work when EvenlySpacedFreqsFlag=1.

Example A: NumChannels = 5

If ChannSpacing is 100GHz and CenterFreq = 193THz then channels are

InputFileIndex 1 2 3 4 5
ChannelArrayIndex 0 1 2 3 4
Frequencies 192.8, 192.9 193.0, 193.1, 193.2

In general for an odd number of channels:

CenterFreq has index (NumChanns+1)/2.

Example B: NumChannels = 6

If ChannSpacing is 100GHz and CenterFreq = 193THz then channels are

InputFileIndex 1 2 3 4 5 6
ChannelArrayIndex 0 1 2 3 4 5
Frequencies 192.7 192.8, 192.9 193.0, 193.1, 193.2

In general for an even number of channels:

CenterFreq has also index (NumChanns+1)/2.

If EvenlySpacedChannsFlag is set to 0 then the wavelengths of the channels are read in using

$WavelengthChann1 1550e-9 # m
$WavelengthChann2 1552e-9
$WavelengthChann3 1553e-9

etc.

References CenterFreq, ChannSpacing, Frequency, GetChannelPhysicalIndex(), GetInStokes(), InFileName, InitializeInStokes(), LogFile, LogFileSeparator(), LOWER_AND_UPPER, LOWER_ONLY, NEAR_ZERO, NumChannels, ReadDouble(), ReadInt(), SetInStokes(), sq(), sqrt(), and Wavelength2Frequency().

Referenced by ReduOptSignal(), and SetNumChannels().

void ReduOptSignal::ReadFileFreqPower ( string  FrequencyDataInFileName  )  [private]

JZAug02.

References CenterFreq, ChannSpacing, Frequency, NumChannels, and OptPowerChannArray.

Referenced by ReduOptSignal().

int ReduOptSignal::ReadInStokes ( string  InStokesName,
int  ch,
ifstream *  InFile 
) [private]

A helper function for InitializeInStokes.

In the parameter file the input stokes parameters of, for example, channel 1 are specified using the syntax

$InStokesChann1 S_0 S_1 S_2 S_3

where S_0 S_1 S_2 S_3 are 4 doubles.

References SetInStokes().

Referenced by InitializeInStokes().

void ReduOptSignal::RegenerateReduOptSignal ( double *  OptPowerChannArray2  ) 

JZAug02 Reinitializes the Stokes 4-vector for the signal and noise in each channel. This special purpose method allows for different optical power levels in the different channels

Special purpose method to allow for different optical power levels in the different channels

Parameters:
OptPowerChannArray,: double array of size NumChanns used to store the power for each channel
  1. Sets the Stokes 4-vector of the signal in each channel to be the input Stokes 4-vector multiplied by the optical power of the channel
  2. Sets the Stokes vector of the noise in each channel to be zero.
  3. Sets the extra unpolarized noise outside the channels to zero.
See also:
InitializeInStokes, ReduOptSignal(string InFileName, double SignalNoiseBandwidth2).

References GetInStokes(), NumChannels, StokesNoise, and StokesSignal.

void ReduOptSignal::RegenerateReduOptSignal ( void   ) 

(Re)-initializes the Stokes 4-vector for the signal and noise in each channel

Called by the constructors and also before each Monte Carlo experiment.

  1. Sets the Stokes 4-vector of the signal in each channel to be the input Stokes 4-vector multiplied by OptPowerChann.
  2. Sets the Stokes vector of the noise in each channel to be zero.
  3. Sets the extra Unpolarized noise outside the channels to zero.
See also:
InitializeInStokes, ReduOptSignal(string InFileName, double SignalNoiseBandwidth2, double PolarizNoiseBandwidth2).

References GetInStokes(), NumChannels, OptPowerChann, StokesNoise, and StokesSignal.

Referenced by ReduOptSignal(), OptSignal::RegenerateSignalString(), and SetNumChannels().

void ReduOptSignal::RegenerateReduOptSignalVaryingPower ( void   ) 

JZAug02 Reinitializes the Stokes 4-vector for the signal and noise in each channel. This special purpose method allows for different optical power levels in the different channels

See also:
OptPowerChannArray

References GetInStokes(), NumChannels, OptPowerChannArray, StokesNoise, and StokesSignal.

Referenced by ReduOptSignal().

void ReduOptSignal::ReleaseMemory ( void   )  [private]

Releases allocated memory.

Frees memory previosuly allocated for the Stokes parameters of the signal and noise in each channel and for the array of central frequencies for the channels.

See also:
~ReduOptSignal()

References Frequency, InStokes, StokesNoise, and StokesSignal.

Referenced by SetNumChannels(), and ~ReduOptSignal().

void ReduOptSignal::SetEnhancementFactor ( double  EnhancementFactorTmp  )  [inline]
void ReduOptSignal::SetInStokes ( const int  ChannelArrayIndex,
const int  StokesIndex,
double  StokesValue 
) [private]

A helper function for InitializeInStokes.

References InStokes.

void ReduOptSignal::SetInStokes ( const int  ChannelArrayIndex,
double *  StokesVector 
)

A helper function for InitializeInStokes.

References InStokes.

Referenced by InitializeInStokes(), operator=(), ProcessReduOptSignalParameters(), ReadInStokes(), and ReduOptSignal().

void ReduOptSignal::SetNumChannels ( int  NumChannels2  ) 

This method enables the user to change the number of channels on the fly.

This function was created to compute outage probability as a function of the NumChannels. You should not be using this method unless you really want to perform a sweep across different values of the parameter NumChannels.

References AllocateMemory(), InFileName, NumChannels, ProcessReduOptSignalParameters(), RegenerateReduOptSignal(), and ReleaseMemory().

Referenced by OptSignal::SetNumChannels().

void ReduOptSignal::SetOptElecFilterBandwidth ( double  OptFilterBandwidthTmp,
double  ElecFilterBandwidthTmp 
)

Set the optical and electrical filter bandwidths.

These bandwidths are required to compute the Q-factor in the reduced model from the electrical signal-to-noise ratio using the formula of Marcuse.

See also:
void SetOptElecFilterBandwidth( string FileNameOptFilter, string FileNameElecFilter)

References LogFile.

void ReduOptSignal::SetOptElecFilterBandwidth ( string  FileNameOptFilter,
string  FileNameElecFilter 
)

Set the optical and electrical filter bandwidths.

These bandwidths are required to compute the Q-factor in the reduced model from the electrical signal-to-noise ratio using the formula of Marcuse.
The bandwidths are read in from input parameter files.

The bandwidth of the optical filter is set using the input file parameter FreqFWHM_OptFilter.

The bandwidth of the electrical filter is set using the input file parameter f_3dB.

The electrical filter is a low-pass filter. The input value, f_3dB [GHz] = 0.5*FreqFWHM_ElecFilter*1e-9 is the HALF width at half maximum of the filter.

This means that the amplitude of the filter transfer function has height 1/sqrt(2) at f_3dB.

References LogFile, LOWER_ONLY, MANDATORY, and ReadDouble().

void ReduOptSignal::SetOptPowerChannel ( double  OptPowerChann2  )  [inline]
void ReduOptSignal::WriteFileOptSignal ( char *  outFile  ) 

Writes the power and Stokes parameters of the signal and noise in each channel to a file.

Parameters:
outFile,: The name of the output file (a char array)

The following data is written to the output file in order. In this discussion $S_0$ denotes the power, $(S_1,S_2,S_3)$ is the Stokes vector, $s_i = S_i/S_0$ for $i=1,2,3$ are the components of the normalized Stokes vector, and the normalized power is $s_0 = 1$.

For each channel:

  • First for the signal in that channel
    1. The power in the given channel.
    2. The fraction of the signal or noise that is polarized. This is defined to be the length of the normalized Stokes vector $(s_1,s_2,2_3)$.
    3. The fraction of the signal (or noise) that is Unpolarized, which is by definition 1 - polarized part of signal (or noise).
    4. $s_0$, $(s_1,s_2,s_3)$.
  • Next the noise power in the channel which is defined to be the sum of $S_0$ for the noise in the channel and the fraction of the additional noise that lies in the channel bandwidth.
  • The total Stokes parameters are also output.

References CenterFreq, GetChannelPhysicalIndex(), GetFrequency(), NumChannels, sq(), sqrt(), StokesNoise, and StokesSignal.

void ReduOptSignal::WriteMatlabFileOptSignal ( string  OutFileName  ) 

JZAug02.

References CenterFreq, GetFrequency(), NumChannels, and StokesSignal.

Referenced by ReduOptSignal().

const char * ReduOptSignal::WriteTypePulse ( void   ) 

Returns the pulse type.

References CRZ_GAUSS, CRZ_RCOS, NRZ, RZ_GAUSS, RZ_SECH, and TypePulse.

Referenced by ReduOptSignal().


Member Data Documentation

double ReduOptSignal::BitRateChann [private]

The bit rate of a channel.

e.g. 10 Gb/s. Not used in reduced model ??

Referenced by operator=(), and ReduOptSignal().

double ReduOptSignal::CenterFreq [private]

Central Frequency of the simulation.

Either CenterFreq or CenterWavelength must be zero. Whichever of these parameters is not zero is used to set the center of the simulation window. If the flag EvenlySpacedFreqsFlag in the input parameter file is 1 then the channel frequencies are set using the center frequency and the channel spacing. As I understand it code is only guarenteed to work when EvenlySpacedFreqsFlag=1.

See also:
CenterWavelength ChannSpacing

Referenced by operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), ReduOptSignal(), WriteFileOptSignal(), and WriteMatlabFileOptSignal().

Central wavelength of the simulation.

Either CenterFreq or CenterWavelength must be zero. See CenterFreq for more info

See also:
CenterFreq ChannSpacing

Referenced by operator=(), and ReduOptSignal().

double ReduOptSignal::ChannSpacing [private]

The channel spacing.

Only meaningful when EvenlySpacedFreqsFlag=1 in parameter input file. As I understand it the REduced Model code is only guarenteed to work when EvenlySpacedFreqsFlag=1. (??)

See also:
CenterFreq CenterWavelength

Referenced by GetCoPolarizedNoiseInsideBandwidth(), GetNoiseInsideBandwidth(), GetOrthogPolarizedNoiseInsideBandwidth(), operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), and ReduOptSignal().

Bandwidth of the electrical filter in the receiver.

Used in calculation of Q-factor from ESNR.

See also:
OptFilterBandwidth EnhancementFactor

Referenced by GetElecTimeDomainSNR(), GetQ_Factor(), operator=(), and ReduOptSignal().

The enhancement factor of the receiver.

Depends on the pulse format (TypePulse) and the bandwidths of the optical and electrical filters. Is an input parameter to the reduced model.

See the article "Polarization Effects in Long-Haul Undersea Systems" by Curtis Menyuk et al. to appear as a chapter in a book in 2002 for a discussion of the enhancement factor. In that paper it may be called the efficiency factor.

Referenced by GetElecTimeDomainSNR(), operator=(), and ReduOptSignal().

double* ReduOptSignal::Frequency [private]

Double array of size NumChannels used to store frequencies of channels relative to the CenterFreq.

Referenced by AllocateMemory(), operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), ReduOptSignal(), and ReleaseMemory().

string ReduOptSignal::InFileName [private]

Name of the input parameter file for the Reduced Optical Signal.

This parameter is probably only used by the constuctor and so could be changed to be local to the constructor

Referenced by ProcessReduOptSignalParameters(), ReduOptSignal(), and SetNumChannels().

double* ReduOptSignal::InStokes [private]

Double array of initial Stokes parameters for each channel.

Referenced by AllocateMemory(), GetInStokes(), ReleaseMemory(), and SetInStokes().

Bandwidth of the optical filter in the receiver.

Used in calculation of Q-factor from ESNR.

See also:
ElecFilterBandwidth EnhancementFactor

Referenced by GetElecTimeDomainSNR(), GetQ_Factor(), operator=(), and ReduOptSignal().

double ReduOptSignal::OptPowerChann [private]

The total optical power in each channel.

Referenced by ReduOptSignal(), and RegenerateReduOptSignal().

Array of optical powers for each channel/frequency JZAug02

Referenced by AllocateMemory(), ReadFileFreqPower(), ReduOptSignal(), and RegenerateReduOptSignalVaryingPower().

The bandwidth of the signal and noise in each channel.

Must be less than ChannSpacing.

This parameter is the bandwidth of the noise (and of the signal) that is used in the computation of the signal-to-noise ratio of a channel using the function GetOptSNR.

The larger SignalNoiseBandwidth the more the noise that is included in a channel, the lower the optical SNR.

Referenced by GetCoPolarizedNoiseInsideChannel(), GetNoiseInsideChannel(), GetOrthogPolarizedNoiseInsideChannel(), operator=(), and ReduOptSignal().

Enumeration variable which gives pulse format.

Used to compute efficiency factor of receiver.

See also:
WriteTypePulse

Referenced by ReduOptSignal(), and WriteTypePulse().


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