Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

TDSPSymbolGenerator Class Reference

#include <TDSPSymbolGenerator.h>

Inheritance diagram for TDSPSymbolGenerator:

TDSPOutput1 TDSPOperator TQQObject TDSPPam TDSPPsk TDSPQam TDSPFastBpsk TDSPFastQpsk

Public Member Functions

 TDSPSymbolGenerator (char *name, Int_t, UInt_t=kDEFAULT_OPTIONS)
 ~TDSPSymbolGenerator ()
virtual Double_t SER (Double_t SNR)
Double_t LogSER_dB (Double_t SNRdB)
TComplexGetSymbols () const
UInt_t GetNumSymbols ()
void SetAnalyseGrid (UInt_t a)
void SetSignalLength (Int_t num)
void ReduceSignalLength (Int_t num)
Int_t GetSignalLength ()
Bool_t IsAnalysed ()
void SetOption (Option_t *)
Double_t GetSignalPower ()
Double_t GetReceivedPower ()
Double_t GetIntNoisePower ()
Double_t GetSINR ()
TComplex GetAttentuation ()
Double_t GetDistance (Option_t *opt)
TDSPSignalGetDecisionSignal ()
TComplexGetGlobalCorrection ()
void SetGlobalCorrection (TComplex c)
TComplexGetCorrection ()
void SetCorrection (TComplex c)
UInt_t GetCorrectionTrackingInterval () const
void SetCorrectionTrackingInterval (UInt_t i)
UInt_t EstimateNumSymbols (Double_t dError, UInt_t d, eEstimateNumSymbols method, UInt_t min=0)
UInt_t EstimateNumSymbols (Double_t dError, UInt_t d=10000, char *method="", UInt_t min=0)
void Generate ()
TDSPSignalUpdate (TDSPSignal *)
void ReferenceUpdate (TDSPSignal *s)

Data Fields

TComplexfSymbols
Int_t * fYields
 The Symbol Alphabet.

Int_t fMisIdentified
 fNumSymbols x fNumSymbols Matrix

Double_t fInEfficiency
Double_t fdInEfficiency
Double_t fNoisePower
Double_t fSignalPower
Double_t fReceivedPower
TComplex fAttentuation
Double_t fSINR
Double_t fLogSER
Double_t fdLogSER

Protected Member Functions

void NormalizeProbs ()
virtual void BookSymbols (Int_t num)
virtual void InitSymbols ()=0
virtual void GenerateSymbols (Int_t, TComplex *)
virtual Int_t GenerateSymbol (TComplex *)
virtual Int_t DetectSymbol (TComplex &)
void Analyse_Reset ()
void Analyse_Finish ()
void Analyse_Symbol (Int_t, TComplex *, Int_t, TComplex *)
void _calc_distances ()
void _check_distances ()
void DumpStep ()

Protected Attributes

UInt_t fDumpOptions
UInt_t fOptions
Long64_t fAnalyseGrid
Long64_t fNumAnalysed
Int_t fNumSymbols
Double_t * fProbs
Double_t * fDetectSigmas
 the probs of their occurence

TDSPSignalfDecisionSignal
 the variance

Int_t fNumISymbols
 Signal on what the final decision was made (after corrections).

Int_t fNumISymbolsAlloc
 the number of last generated symbol indicies

Int_t * fISymbols
 really alloced space fISymbols

Double_t * fDetectProbs
 the last generated Symbol indices

TComplex fGlobalCorrection
 global correction (for phase+gain control)

TComplex fCorrection
 dynamic correction (updated via tracking)

UInt_t fCorrectionTrackingInterval
 correction tracking interval

UInt_t fCorrectionTrackingIndex
 the actual correction tracking index

TDSPSignalfReferenceSignal
 A reference signal - normally the clean signal without noise.

TString Slot_Generate
TString Slot_Update
TString Slot_ReferenceUpdate
Double_t fMinDistance
Double_t fMeanDistance
Double_t fVarianceDistance
Double_t fQWeightedDistance
Double_t fQWeightedVarianceDistance
Bool_t _recalc_distances

Constructor & Destructor Documentation

TDSPSymbolGenerator::TDSPSymbolGenerator char *  name,
Int_t  ,
UInt_t  = kDEFAULT_OPTIONS
 

TDSPSymbolGenerator::~TDSPSymbolGenerator  ) 
 


Member Function Documentation

void TDSPSymbolGenerator::_calc_distances  )  [protected]
 

void TDSPSymbolGenerator::_check_distances  )  [protected]
 

void TDSPSymbolGenerator::Analyse_Finish  )  [protected]
 

void TDSPSymbolGenerator::Analyse_Reset  )  [protected]
 

void TDSPSymbolGenerator::Analyse_Symbol Int_t  ,
TComplex ,
Int_t  ,
TComplex
[protected]
 

virtual void TDSPSymbolGenerator::BookSymbols Int_t  num  )  [protected, virtual]
 

Int_t TDSPSymbolGenerator::DetectSymbol TComplex  )  [inline, protected, virtual]
 

Reimplemented in TDSPFastBpsk, and TDSPFastQpsk.

Definition at line 221 of file TDSPSymbolGenerator.h.

References Abs(), Exp(), fDetectProbs, fDetectSigmas, fNumSymbols, fSymbols, and NOT_DETECTED.

00221                                                           {
00222   
00223   Double_t len,s1;
00224   Double_t max_lik = 0;
00225 
00226   Int_t detected = NOT_DETECTED;
00227 
00228   // Calculate all Likelihoods
00229   //
00230   for(register Int_t i=0;i<fNumSymbols;i++) {
00231 
00232     len=Abs(s-fSymbols[i]);
00233     len*=-len;
00234 
00235     s1=2*fDetectSigmas[i];
00236     s1*=s1;
00237 
00238     fDetectProbs[i] = TMath::Exp(len/s1);
00239     
00240     if (fDetectProbs[i]>max_lik) {
00241       detected = i;
00242       max_lik = fDetectProbs[i];
00243     } else 
00244       if (fDetectProbs[i] == max_lik) {
00245     detected = NOT_DETECTED;
00246       }
00247   }
00248 
00249 
00250   return detected;
00251 
00252 }

void TDSPSymbolGenerator::DumpStep  )  [protected]
 

UInt_t TDSPSymbolGenerator::EstimateNumSymbols Double_t  dError,
UInt_t  d = 10000,
char *  method = "",
UInt_t  min = 0
 

UInt_t TDSPSymbolGenerator::EstimateNumSymbols Double_t  dError,
UInt_t  d,
eEstimateNumSymbols  method,
UInt_t  min = 0
 

void TDSPSymbolGenerator::Generate  ) 
 

Int_t TDSPSymbolGenerator::GenerateSymbol TComplex  )  [inline, protected, virtual]
 

Reimplemented in TDSPFastBpsk, and TDSPFastQpsk.

Definition at line 200 of file TDSPSymbolGenerator.h.

References fNumSymbols, fProbs, and fSymbols.

Referenced by GenerateSymbols().

00200                                                             {
00201   Double_t fR = gRandom->Rndm();
00202   Double_t prob = 0;
00203   
00204   for(Int_t i=0;i<fNumSymbols;i++) {
00205     prob += fProbs[i];
00206     if (fR < prob) {*c = fSymbols[i];return i;};
00207   }
00208   
00209   
00210   // This should only happen if fR==1
00211   // 
00212 
00213   Error("GenerateSymbol","(..) - Unnormal case fR = %f, prob = %f\n",
00214     fR,prob);
00215   
00216   *c = fSymbols[fNumSymbols-1];
00217 
00218   return fNumSymbols-1;
00219 }

void TDSPSymbolGenerator::GenerateSymbols Int_t  ,
TComplex
[inline, protected, virtual]
 

Reimplemented in TDSPFastBpsk, and TDSPFastQpsk.

Definition at line 256 of file TDSPSymbolGenerator.h.

References fISymbols, and GenerateSymbol().

00257                                       {
00258   Int_t *sym = fISymbols;
00259   for(register Int_t i=num;i;--i) 
00260     *(sym++) = GenerateSymbol(c++);
00261 }

TComplex TDSPSymbolGenerator::GetAttentuation  )  [inline]
 

Definition at line 158 of file TDSPSymbolGenerator.h.

References fAttentuation, and fNumAnalysed.

00158 { return fAttentuation/Double_t(fNumAnalysed);};

TComplex& TDSPSymbolGenerator::GetCorrection  )  [inline]
 

Definition at line 172 of file TDSPSymbolGenerator.h.

References fCorrection.

00172 { return fCorrection;}; 

UInt_t TDSPSymbolGenerator::GetCorrectionTrackingInterval  )  const [inline]
 

Definition at line 175 of file TDSPSymbolGenerator.h.

References fCorrectionTrackingInterval.

00175 { return fCorrectionTrackingInterval;}; 

TDSPSignal* TDSPSymbolGenerator::GetDecisionSignal  ) 
 

Double_t TDSPSymbolGenerator::GetDistance Option_t *  opt  ) 
 

TComplex& TDSPSymbolGenerator::GetGlobalCorrection  )  [inline]
 

Definition at line 166 of file TDSPSymbolGenerator.h.

References fGlobalCorrection.

00166 { return  fGlobalCorrection;};

Double_t TDSPSymbolGenerator::GetIntNoisePower  )  [inline]
 

Definition at line 156 of file TDSPSymbolGenerator.h.

References fNoisePower, and fNumAnalysed.

00156 { return fNoisePower/fNumAnalysed;};

UInt_t TDSPSymbolGenerator::GetNumSymbols  )  [inline]
 

Definition at line 146 of file TDSPSymbolGenerator.h.

References fNumSymbols.

00146 { return fNumSymbols;};

Double_t TDSPSymbolGenerator::GetReceivedPower  )  [inline]
 

Definition at line 155 of file TDSPSymbolGenerator.h.

References fNumAnalysed, and fReceivedPower.

00155 { return fReceivedPower/fNumAnalysed;};

Int_t TDSPSymbolGenerator::GetSignalLength  )  [inline]
 

Definition at line 150 of file TDSPSymbolGenerator.h.

References fNumISymbols.

00150 { return fNumISymbols;};

Double_t TDSPSymbolGenerator::GetSignalPower  )  [inline]
 

Definition at line 154 of file TDSPSymbolGenerator.h.

References fNumAnalysed, and fSignalPower.

00154 { return fSignalPower/fNumAnalysed;};

Double_t TDSPSymbolGenerator::GetSINR  )  [inline]
 

Definition at line 157 of file TDSPSymbolGenerator.h.

References fNoisePower, and fSignalPower.

00157 { return fSignalPower/fNoisePower;};

TComplex* TDSPSymbolGenerator::GetSymbols  )  const [inline]
 

Definition at line 143 of file TDSPSymbolGenerator.h.

References fSymbols.

00143 { return fSymbols;};

virtual void TDSPSymbolGenerator::InitSymbols  )  [protected, pure virtual]
 

Implemented in TDSPPam, TDSPPsk, and TDSPQam.

Bool_t TDSPSymbolGenerator::IsAnalysed  )  [inline]
 

Definition at line 151 of file TDSPSymbolGenerator.h.

00151 { return fAnalysed; };

Double_t TDSPSymbolGenerator::LogSER_dB Double_t  SNRdB  )  [inline]
 

Definition at line 265 of file TDSPSymbolGenerator.h.

References Log10(), and SER().

00265                                                              {
00266   Double_t s=TMath::Power(10,SNRdB/10);
00267   return TMath::Log10(SER(s)); 
00268 }

void TDSPSymbolGenerator::NormalizeProbs  )  [protected]
 

void TDSPSymbolGenerator::ReduceSignalLength Int_t  num  ) 
 

void TDSPSymbolGenerator::ReferenceUpdate TDSPSignal s  )  [inline]
 

Definition at line 192 of file TDSPSymbolGenerator.h.

References fReferenceSignal.

00192 { fReferenceSignal=s;};

virtual Double_t TDSPSymbolGenerator::SER Double_t  SNR  )  [virtual]
 

Reimplemented in TDSPPam, TDSPPsk, and TDSPQam.

Referenced by LogSER_dB().

void TDSPSymbolGenerator::SetAnalyseGrid UInt_t  a  ) 
 

void TDSPSymbolGenerator::SetCorrection TComplex  c  )  [inline]
 

Definition at line 173 of file TDSPSymbolGenerator.h.

References fCorrection.

00173 { fCorrection=c;}; 

void TDSPSymbolGenerator::SetCorrectionTrackingInterval UInt_t  i  )  [inline]
 

Definition at line 176 of file TDSPSymbolGenerator.h.

References fCorrectionTrackingInterval.

void TDSPSymbolGenerator::SetGlobalCorrection TComplex  c  )  [inline]
 

Definition at line 167 of file TDSPSymbolGenerator.h.

References fGlobalCorrection.

00167 { fGlobalCorrection=c;};

void TDSPSymbolGenerator::SetOption Option_t *   ) 
 

void TDSPSymbolGenerator::SetSignalLength Int_t  num  ) 
 

TDSPSignal* TDSPSymbolGenerator::Update TDSPSignal  )  [virtual]
 

Reimplemented from TDSPOutput1.


Field Documentation

Bool_t TDSPSymbolGenerator::_recalc_distances [protected]
 

Definition at line 108 of file TDSPSymbolGenerator.h.

Long64_t TDSPSymbolGenerator::fAnalyseGrid [protected]
 

Definition at line 49 of file TDSPSymbolGenerator.h.

TComplex TDSPSymbolGenerator::fAttentuation
 

Definition at line 124 of file TDSPSymbolGenerator.h.

Referenced by GetAttentuation().

TComplex TDSPSymbolGenerator::fCorrection [protected]
 

dynamic correction (updated via tracking)

Definition at line 69 of file TDSPSymbolGenerator.h.

Referenced by GetCorrection(), and SetCorrection().

UInt_t TDSPSymbolGenerator::fCorrectionTrackingIndex [protected]
 

the actual correction tracking index

Definition at line 71 of file TDSPSymbolGenerator.h.

UInt_t TDSPSymbolGenerator::fCorrectionTrackingInterval [protected]
 

correction tracking interval

Definition at line 70 of file TDSPSymbolGenerator.h.

Referenced by GetCorrectionTrackingInterval(), and SetCorrectionTrackingInterval().

TDSPSignal* TDSPSymbolGenerator::fDecisionSignal [protected]
 

the variance

Definition at line 60 of file TDSPSymbolGenerator.h.

Double_t* TDSPSymbolGenerator::fDetectProbs [protected]
 

the last generated Symbol indices

Definition at line 65 of file TDSPSymbolGenerator.h.

Referenced by DetectSymbol().

Double_t* TDSPSymbolGenerator::fDetectSigmas [protected]
 

the probs of their occurence

Definition at line 58 of file TDSPSymbolGenerator.h.

Referenced by DetectSymbol().

Double_t TDSPSymbolGenerator::fdInEfficiency
 

Definition at line 119 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fdLogSER
 

Definition at line 127 of file TDSPSymbolGenerator.h.

UInt_t TDSPSymbolGenerator::fDumpOptions [protected]
 

Definition at line 46 of file TDSPSymbolGenerator.h.

TComplex TDSPSymbolGenerator::fGlobalCorrection [protected]
 

global correction (for phase+gain control)

Definition at line 68 of file TDSPSymbolGenerator.h.

Referenced by GetGlobalCorrection(), and SetGlobalCorrection().

Double_t TDSPSymbolGenerator::fInEfficiency
 

Definition at line 118 of file TDSPSymbolGenerator.h.

Int_t* TDSPSymbolGenerator::fISymbols [protected]
 

really alloced space fISymbols

Definition at line 64 of file TDSPSymbolGenerator.h.

Referenced by GenerateSymbols(), TDSPFastQpsk::GenerateSymbols(), and TDSPFastBpsk::GenerateSymbols().

Double_t TDSPSymbolGenerator::fLogSER
 

Definition at line 126 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fMeanDistance [protected]
 

Definition at line 101 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fMinDistance [protected]
 

Definition at line 100 of file TDSPSymbolGenerator.h.

Int_t TDSPSymbolGenerator::fMisIdentified
 

fNumSymbols x fNumSymbols Matrix

Definition at line 117 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fNoisePower
 

Definition at line 121 of file TDSPSymbolGenerator.h.

Referenced by GetIntNoisePower(), and GetSINR().

Long64_t TDSPSymbolGenerator::fNumAnalysed [protected]
 

Definition at line 50 of file TDSPSymbolGenerator.h.

Referenced by GetAttentuation(), GetIntNoisePower(), GetReceivedPower(), and GetSignalPower().

Int_t TDSPSymbolGenerator::fNumISymbols [protected]
 

Signal on what the final decision was made (after corrections).

Definition at line 62 of file TDSPSymbolGenerator.h.

Referenced by GetSignalLength().

Int_t TDSPSymbolGenerator::fNumISymbolsAlloc [protected]
 

the number of last generated symbol indicies

Definition at line 63 of file TDSPSymbolGenerator.h.

Int_t TDSPSymbolGenerator::fNumSymbols [protected]
 

Definition at line 55 of file TDSPSymbolGenerator.h.

Referenced by DetectSymbol(), GenerateSymbol(), and GetNumSymbols().

UInt_t TDSPSymbolGenerator::fOptions [protected]
 

Definition at line 47 of file TDSPSymbolGenerator.h.

Double_t* TDSPSymbolGenerator::fProbs [protected]
 

Definition at line 56 of file TDSPSymbolGenerator.h.

Referenced by GenerateSymbol().

Double_t TDSPSymbolGenerator::fQWeightedDistance [protected]
 

Definition at line 103 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fQWeightedVarianceDistance [protected]
 

Definition at line 104 of file TDSPSymbolGenerator.h.

Double_t TDSPSymbolGenerator::fReceivedPower
 

Definition at line 123 of file TDSPSymbolGenerator.h.

Referenced by GetReceivedPower().

TDSPSignal* TDSPSymbolGenerator::fReferenceSignal [protected]
 

A reference signal - normally the clean signal without noise.

Definition at line 72 of file TDSPSymbolGenerator.h.

Referenced by ReferenceUpdate().

Double_t TDSPSymbolGenerator::fSignalPower
 

Definition at line 122 of file TDSPSymbolGenerator.h.

Referenced by GetSignalPower(), and GetSINR().

Double_t TDSPSymbolGenerator::fSINR
 

Definition at line 125 of file TDSPSymbolGenerator.h.

TComplex* TDSPSymbolGenerator::fSymbols
 

Definition at line 114 of file TDSPSymbolGenerator.h.

Referenced by DetectSymbol(), GenerateSymbol(), TDSPFastQpsk::GenerateSymbol(), TDSPFastBpsk::GenerateSymbol(), and GetSymbols().

Double_t TDSPSymbolGenerator::fVarianceDistance [protected]
 

Definition at line 102 of file TDSPSymbolGenerator.h.

Int_t* TDSPSymbolGenerator::fYields
 

The Symbol Alphabet.

Definition at line 116 of file TDSPSymbolGenerator.h.

TString TDSPSymbolGenerator::Slot_Generate [protected]
 

Definition at line 74 of file TDSPSymbolGenerator.h.

TString TDSPSymbolGenerator::Slot_ReferenceUpdate [protected]
 

Definition at line 76 of file TDSPSymbolGenerator.h.

TString TDSPSymbolGenerator::Slot_Update [protected]
 

Reimplemented from TDSPOutput1.

Definition at line 75 of file TDSPSymbolGenerator.h.


The documentation for this class was generated from the following file:
Generated on Fri Apr 23 16:24:13 2004 by doxygen 1.3.2