GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
dynamic_channel_model.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2009,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_CHANNELS_DYNAMIC_CHANNEL_MODEL_H
12 #define INCLUDED_CHANNELS_DYNAMIC_CHANNEL_MODEL_H
13 
14 #include <gnuradio/channels/api.h>
15 #include <gnuradio/hier_block2.h>
16 #include <gnuradio/types.h>
17 
18 namespace gr {
19 namespace channels {
20 
21 /*!
22  * \brief dynamic channel simulator
23  * \ingroup dynamic_channel_models_blk
24  *
25  * \details
26  * This block implements a dynamic channel model simulator that can
27  * be used to help evaluate, design, and test various signals,
28  * waveforms, and algorithms.
29  *
30  * This model allows the user to set up an AWGN noise source, a
31  * random walk process to simulate carrier frequency drift, a random
32  * walk process to simulate sample rate offset drive, and a frequency
33  * selective fading channel response that is either Rayleigh or Ricean
34  * for a user specified power delay profile.
35  */
37 {
38 public:
39  // gr::channels::dynamic_channel_model::sptr
40  typedef std::shared_ptr<dynamic_channel_model> sptr;
41 
42  /*! \brief Build the dynamic channel simulator.
43  *
44  * \param samp_rate Input sample rate in Hz
45  * \param sro_std_dev sample rate drift process standard deviation per sample in Hz
46  * \param sro_max_dev maximum sample rate offset in Hz
47  * \param cfo_std_dev carrier frequnecy drift process standard deviation per sample
48  in Hz
49  * \param cfo_max_dev maximum carrier frequency offset in Hz
50 
51  * \param N number of sinusoids used in frequency selective fading simulation
52  * \param doppler_freq maximum doppler frequency used in fading simulation in Hz
53  * \param LOS_model defines whether the fading model should include a line of site
54  component. LOS->Rician, NLOS->Rayleigh
55  * \param K Rician K-factor, the ratio of specular to diffuse power in the model
56  * \param delays A list of fractional sample delays making up the power delay profile
57  * \param mags A list of magnitudes corresponding to each delay time in the power
58  delay profile
59  * \param ntaps_mpath The length of the filter to interpolate the power delay profile
60  over. Delays in the PDP must lie between 0 and ntaps_mpath, fractional delays will be
61  sinc-interpolated only to the width of this filter.
62  * \param noise_amp Specifies the standard deviation of the AWGN process
63  * \param noise_seed A random number generator seed for the noise source.
64  */
65  static sptr make(double samp_rate,
66  double sro_std_dev,
67  double sro_max_dev,
68  double cfo_std_dev,
69  double cfo_max_dev,
70  unsigned int N,
71  double doppler_freq,
72  bool LOS_model,
73  float K,
74  std::vector<float> delays,
75  std::vector<float> mags,
76  int ntaps_mpath,
77  double noise_amp,
78  double noise_seed);
79 
80  virtual double samp_rate() const = 0;
81  virtual double sro_dev_std() const = 0;
82  virtual double sro_dev_max() const = 0;
83  virtual double cfo_dev_std() const = 0;
84  virtual double cfo_dev_max() const = 0;
85  virtual double noise_amp() const = 0;
86  virtual double doppler_freq() const = 0;
87  virtual double K() const = 0;
88 
89  virtual void set_samp_rate(double) = 0;
90  virtual void set_sro_dev_std(double) = 0;
91  virtual void set_sro_dev_max(double) = 0;
92  virtual void set_cfo_dev_std(double) = 0;
93  virtual void set_cfo_dev_max(double) = 0;
94  virtual void set_noise_amp(double) = 0;
95  virtual void set_doppler_freq(double) = 0;
96  virtual void set_K(double) = 0;
97 };
98 
99 } /* namespace channels */
100 } /* namespace gr */
101 
102 #endif /* INCLUDED_CHANNELS_CHANNEL_MODEL_H */
dynamic channel simulator
Definition: dynamic_channel_model.h:37
virtual void set_samp_rate(double)=0
virtual double sro_dev_max() const =0
virtual void set_doppler_freq(double)=0
virtual double K() const =0
virtual void set_noise_amp(double)=0
virtual double sro_dev_std() const =0
virtual double doppler_freq() const =0
virtual void set_K(double)=0
virtual void set_cfo_dev_std(double)=0
virtual void set_sro_dev_std(double)=0
virtual double cfo_dev_std() const =0
virtual void set_sro_dev_max(double)=0
virtual double samp_rate() const =0
std::shared_ptr< dynamic_channel_model > sptr
Definition: dynamic_channel_model.h:40
virtual void set_cfo_dev_max(double)=0
static sptr make(double samp_rate, double sro_std_dev, double sro_max_dev, double cfo_std_dev, double cfo_max_dev, unsigned int N, double doppler_freq, bool LOS_model, float K, std::vector< float > delays, std::vector< float > mags, int ntaps_mpath, double noise_amp, double noise_seed)
Build the dynamic channel simulator.
virtual double noise_amp() const =0
virtual double cfo_dev_max() const =0
Hierarchical container class for gr::block's and gr::hier_block2's.
Definition: hier_block2.h:34
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29