add_gaus_noise.h
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:2k
源码类别:

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = add_gaus_noise.h
  3. //
  4. #ifndef _ADD_GAUS_NOISE_H_
  5. #define _ADD_GAUS_NOISE_H_
  6. #include "psmodel.h"
  7. #include "signal_T.h"
  8. #include "k_pwrmtr.h"
  9. using std::complex;
  10. template < class T>
  11. class AdditiveGaussianNoise : public PracSimModel
  12. {
  13. public:
  14.    AdditiveGaussianNoise( char* instance_name,
  15.             PracSimModel* outer_model,
  16.             Signal<T>* in_sig,
  17.             Signal<T>* sig_with_noise,
  18.             Signal<float>* measured_power_sig);
  19.    AdditiveGaussianNoise( char* instance_name,
  20.             PracSimModel* outer_model,
  21.             Signal<T>* in_sig,
  22.             Signal<T>* sig_with_noise,
  23.             Signal<T>* noise_only,
  24.             Signal<float>* measured_power_sig);
  25.    ~AdditiveGaussianNoise(void);
  26.    void Initialize(void);
  27.    int Execute(void);
  28. private:
  29.    int Proc_Block_Size;
  30.    double Samp_Rate;
  31.    Signal<T> *In_Sig;
  32.    Signal<T> *Noisy_Sig;
  33.    Signal<T> *Noise_Only_Sig;
  34.    Signal<float> *Power_Meas_Sig;
  35.    float *Sig_Pwr_Sig;
  36.    float Desired_Avg_Pwr;
  37.    float Estim_Init_Input_Pwr;
  38.    float Sqrt_Powers;
  39.    k_PowerMeter<T> *Power_Meter; 
  40.    float Anticip_Input_Pwr;
  41.    float Desired_Output_Pwr;
  42.    float Desired_Eb_No;
  43.    float Symb_Period;
  44.    float Num_Bits_Per_Symb;
  45.    float Time_Const_For_Pwr_Mtr;
  46.    int Seed;
  47.    bool Sig_Pwr_Meas_Enabled;
  48.    bool Outpt_Pwr_Scaling_On;
  49.    float Noise_Sigma;
  50.    float Power_Scaler;
  51.    std::complex<double> Sum;
  52.    double Sum_Sqrd;
  53.    int Num_Samps;
  54.    double Cumul_Batch_Power;
  55. };
  56. #endif