The reduced optical signal class represents the reduced optical signal. More...
#include <ocsReduOptSignal.hh>
Public Member Functions | |
ReduOptSignal (string InFileName, double SignalNoiseBandwidth2) | |
Constructor. | |
ReduOptSignal (string InFileName2, string JobName) | |
JZAug02. | |
~ReduOptSignal () | |
Destructor. | |
ReduOptSignal (ReduOptSignal &OrigReduOptSignal) | |
Copy Constructor. | |
ReduOptSignal & | operator= (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 |
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.
ReduOptSignal::ReduOptSignal | ( | string | InFileName2, | |
double | SignalNoiseBandwidth2 | |||
) |
Constructor.
The constructor reads in parameters from a file and initializes:
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.
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 | |||
) |
JZAug02.
References AllocateMemory(), BitRateChann, CenterFreq, CenterWavelength, ChannSpacing, ElecFilterBandwidth, EnhancementFactor, Frequency2Wavelength(), InFileName, LogFile, LOWER_AND_UPPER, LOWER_ONLY, NumChannels, OptFilterBandwidth, ReadDouble(), ReadFileFreqPower(), ReadInt(), ReadString(), RegenerateReduOptSignalVaryingPower(), SetInStokes(), SignalNoiseBandwidth, TypePulse, Wavelength2Frequency(), WriteMatlabFileOptSignal(), and WriteTypePulse().
ReduOptSignal::~ReduOptSignal | ( | ) |
Destructor.
References ReleaseMemory().
Referenced by OptSignal::~OptSignal().
ReduOptSignal::ReduOptSignal | ( | ReduOptSignal & | OrigReduOptSignal | ) |
Copy Constructor.
Copy Constructor By John Zweck, Jan 2006
References AllocateMemory(), BitRateChann, CenterFreq, CenterWavelength, ChannSpacing, ElecFilterBandwidth, EnhancementFactor, Frequency, GetInStokes(), InFileName, NumChannels, OptFilterBandwidth, OptPowerChann, OptPowerChannArray, SetInStokes(), SignalNoiseBandwidth, StokesNoise, StokesSignal, and TypePulse.
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::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
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
References NumChannels.
Referenced by ProcessReduOptSignalParameters(), and WriteFileOptSignal().
double ReduOptSignal::GetChannSpacing | ( | void | ) | [inline] |
Referenced by ReduOptAmplifier::ReduOptAmplifier().
double ReduOptSignal::GetCoPolarizedNoiseInsideBandwidth | ( | int | ChannelArrayIndex, | |
double | BandwidthNoise | |||
) |
References ChannSpacing, sq(), sqrt(), and StokesNoise.
Referenced by GetCoPolarizedNoiseInsideChannel().
double ReduOptSignal::GetCoPolarizedNoiseInsideChannel | ( | int | ChannelArrayIndex | ) |
References GetCoPolarizedNoiseInsideBandwidth(), and SignalNoiseBandwidth.
double ReduOptSignal::GetDegreeOfPolarization | ( | void | ) |
Returns the degree of polarization of the total Stokes parameters.
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.
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 | |||
) |
A helper function for InitializeInStokes.
References InStokes.
Referenced by InitializeInStokes(), operator=(), ProcessReduOptSignalParameters(), ReduOptSignal(), RegenerateReduOptSignal(), and RegenerateReduOptSignalVaryingPower().
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
References GetNoiseInsideBandwidth(), and SignalNoiseBandwidth.
Referenced by GetElecTimeDomainSNR(), and GetOptSNR().
double ReduOptSignal::GetNormSignalNoiseBeatingCopolarized | ( | int | ChannelArrayIndex | ) |
References GetScalarProdSignalNoise().
double ReduOptSignal::GetNormSignalNoiseBeatingOrthogPolarized | ( | int | ChannelArrayIndex | ) |
References GetScalarProdSignalNoise().
int ReduOptSignal::GetNumChannels | ( | void | ) | [inline] |
Referenced by AddReducedNoise(), OptSignal::AddReducedNoiseToNoiseFreeSignal(), ReduLumpedLoss::ApplyLumpedLoss(), ReduPolDepAttenuator::InitPolDepAttenuator(), ReduPolarizer::PolarizeOptSignal(), ReduOptAmplifier::ReduOptAmplifier(), ReduOptFiber::ReduOptFiber(), ReduPolDepAttenuator::SyncNumChannels(), ReduOptFiber::SyncNumChannels(), ReduOptAmplifier::SyncNumChannels(), ReduPolarizTransformer::TransformPolarization(), and ReduPolarizTransformer::UndoLastPolarizTransformation().
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 | |||
) |
References ChannSpacing, sq(), sqrt(), and StokesNoise.
Referenced by GetOrthogPolarizedNoiseInsideChannel().
double ReduOptSignal::GetOrthogPolarizedNoiseInsideChannel | ( | int | ChannelArrayIndex | ) |
References GetOrthogPolarizedNoiseInsideBandwidth(), and SignalNoiseBandwidth.
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.
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)).
References ElecFilterBandwidth, GetElecTimeDomainSNR(), OptFilterBandwidth, and sqrt().
double ReduOptSignal::GetScalarProdSignalNoise | ( | int | ChannelArrayIndex | ) |
References sq(), sqrt(), StokesNoise, and StokesSignal.
Referenced by GetNormSignalNoiseBeatingCopolarized(), and GetNormSignalNoiseBeatingOrthogPolarized().
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!
References NumChannels, and StokesSignal.
Referenced by ReduOptAmplifier::AmplifyOptSignal().
double ReduOptSignal::GetStokesNoise | ( | int | StokesIndex, | |
int | ChannelArrayIndex | |||
) | [inline] |
Referenced by GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized().
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.
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.
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].
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.
References GetInStokes(), LogFile, NumChannels, ReadInStokes(), and SetInStokes().
Referenced by ProcessReduOptSignalParameters().
ReduOptSignal & ReduOptSignal::operator= | ( | ReduOptSignal & | RHS_ReduOptSignal | ) |
Assignment operator.
Assignment operator By: Ivan Lima (9/24/02)
References BitRateChann, CenterFreq, CenterWavelength, ChannSpacing, ElecFilterBandwidth, EnhancementFactor, Frequency, GetInStokes(), LogFile, NumChannels, OptFilterBandwidth, SetInStokes(), SignalNoiseBandwidth, StokesNoise, and StokesSignal.
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
OptPowerChannArray,: | double array of size NumChanns used to store the power for each channel |
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.
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
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.
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.
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.
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:
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 | ) |
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.
Referenced by operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), ReduOptSignal(), WriteFileOptSignal(), and WriteMatlabFileOptSignal().
double ReduOptSignal::CenterWavelength [private] |
Central wavelength of the simulation.
Either CenterFreq or CenterWavelength must be zero. See CenterFreq for more info
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. (??)
Referenced by GetCoPolarizedNoiseInsideBandwidth(), GetNoiseInsideBandwidth(), GetOrthogPolarizedNoiseInsideBandwidth(), operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), and ReduOptSignal().
double ReduOptSignal::ElecFilterBandwidth [private] |
Bandwidth of the electrical filter in the receiver.
Used in calculation of Q-factor from ESNR.
Referenced by GetElecTimeDomainSNR(), GetQ_Factor(), operator=(), and ReduOptSignal().
double ReduOptSignal::EnhancementFactor [private] |
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().
int ReduOptSignal::NumChannels [private] |
The number of WDM channels.
Referenced by AddReducedNoise(), AllocateMemory(), DepolarizeReduNoise(), GetChannelArrayIndex(), GetChannelPhysicalIndex(), GetElecTimeDomainSNR(), GetOptSNR(), GetSignalPower(), GetTotalPower(), GetTotalStokes(), InitializeInStokes(), operator=(), ProcessReduOptSignalParameters(), ReadFileFreqPower(), ReduOptSignal(), RegenerateReduOptSignal(), RegenerateReduOptSignalVaryingPower(), SetNumChannels(), WriteFileOptSignal(), and WriteMatlabFileOptSignal().
double ReduOptSignal::OptFilterBandwidth [private] |
Bandwidth of the optical filter in the receiver.
Used in calculation of Q-factor from ESNR.
Referenced by GetElecTimeDomainSNR(), GetQ_Factor(), operator=(), and ReduOptSignal().
double ReduOptSignal::OptPowerChann [private] |
The total optical power in each channel.
Referenced by ReduOptSignal(), and RegenerateReduOptSignal().
double* ReduOptSignal::OptPowerChannArray [private] |
Array of optical powers for each channel/frequency JZAug02
Referenced by AllocateMemory(), ReadFileFreqPower(), ReduOptSignal(), and RegenerateReduOptSignalVaryingPower().
double ReduOptSignal::SignalNoiseBandwidth [private] |
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().
double* ReduOptSignal::StokesNoise[4] |
Array used to store the Stokes parameters of the noise in each channel.
StokesSignal[ii][jj] is the ii-th Stokes parameter of noise in the the jj-th channel.
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), AddReducedNoise(), OptSignal::AddReducedNoiseToNoiseFreeSignal(), AllocateMemory(), ReduOptAmplifier::AmplifyOptSignal(), ReduLumpedLoss::ApplyLumpedLoss(), DepolarizeReduNoise(), GetCoPolarizedNoiseInsideBandwidth(), GetNoiseInsideBandwidth(), GetOrthogPolarizedNoiseInsideBandwidth(), GetScalarProdSignalNoise(), GetTotalPower(), GetTotalStokes(), operator=(), ReduPolarizer::PolarizeOptSignal(), ReduPolDepAttenuator::PolDepAttenuate(), ReduOptFiber::PropagateFiberCoupledNLS(), ReduOptSignal(), RegenerateReduOptSignal(), RegenerateReduOptSignalVaryingPower(), ReleaseMemory(), ReduPolarizTransformer::TransformPolarization(), ReduPolarizTransformer::UndoLastPolarizTransformation(), and WriteFileOptSignal().
double* ReduOptSignal::StokesSignal[4] |
Array used to store the Stokes parameters of the signal in each channel.
StokesSignal[ii][jj] is the ii-th Stokes parameter of signal in the the jj-th channel.
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), AllocateMemory(), ReduOptAmplifier::AmplifyOptSignal(), ReduLumpedLoss::ApplyLumpedLoss(), GetScalarProdSignalNoise(), GetSignalPower(), GetTotalPower(), GetTotalStokes(), operator=(), ReduPolarizer::PolarizeOptSignal(), ReduPolDepAttenuator::PolDepAttenuate(), ReduOptFiber::PropagateFiberCoupledNLS(), ReduOptSignal(), RegenerateReduOptSignal(), RegenerateReduOptSignalVaryingPower(), ReleaseMemory(), ReduPolarizTransformer::TransformPolarization(), ReduPolarizTransformer::UndoLastPolarizTransformation(), WriteFileOptSignal(), and WriteMatlabFileOptSignal().
typePulse ReduOptSignal::TypePulse [private] |
Enumeration variable which gives pulse format.
Used to compute efficiency factor of receiver.
Referenced by ReduOptSignal(), and WriteTypePulse().