GNU Radio 3.7.2 C++ API
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  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_CHANNELS_DYNAMIC_CHANNEL_MODEL_H
24 #define INCLUDED_CHANNELS_DYNAMIC_CHANNEL_MODEL_H
25 
26 #include <gnuradio/channels/api.h>
27 #include <gnuradio/hier_block2.h>
28 #include <gnuradio/types.h>
29 
30 namespace gr {
31  namespace channels {
32 
33  /*!
34  * \brief dynamic channel simulator
35  * \ingroup dynamic_channel_models_blk
36  *
37  * \details
38  * This block implements a dynamic channel model simulator that can
39  * be used to help evaluate, design, and test various signals,
40  * waveforms, and algorithms.
41  *
42  * This model allows the user to set up an AWGN noise cource, a
43  * random walk process to simulate carrier frequency drift, a random
44  * walk process to simulate sample rate offset drive, and a frequency
45  * selective fading channel response that is either Rayleigh or Ricean
46  * for a user specified power delay profile.
47  */
49  {
50  public:
51  // gr::channels::dynamic_channel_model::sptr
53 
54  /*! \brief Build the dynamic channel simulator.
55  *
56  * \param samp_rate Input sample rate in Hz
57  * \param sro_std_dev sample rate drift process standard deviation per sample in Hz
58  * \param sro_max_dev maximum sample rate offset in Hz
59  * \param cfo_std_dev carrier frequnecy drift process standard deviation per sample in Hz
60  * \param cfo_max_dev maximum carrier frequency offset in Hz
61 
62  * \param N number of sinusoids used in frequency selective fading simulation
63  * \param doppler_freq maximum doppler frequency used in fading simulation in Hz
64  * \param LOS_model defines whether the fading model should include a line of site
65  component. LOS->Rician, NLOS->Rayleigh
66  * \param K Rician K-factor, the ratio of specular to diffuse power in the model
67  * \param delays A list of fractional sample delays making up the power delay profile
68  * \param mags A list of magnitudes corresponding to each delay time in the power delay profile
69  * \param ntaps_mpath The length of the filter to interpolate the power delay profile over.
70  Delays in the PDP must lie between 0 and ntaps_mpath, fractional delays
71  will be sinc-interpolated only to the width of this filter.
72  * \param noise_amp Specifies the standard deviation of the AWGN process
73  * \param noise_seed A random number generator seed for the noise source.
74  */
75  static sptr make(
76  double samp_rate,
77  double sro_std_dev,
78  double sro_max_dev,
79  double cfo_std_dev,
80  double cfo_max_dev,
81  unsigned int N,
82  double doppler_freq,
83  bool LOS_model,
84  float K,
85  std::vector<float> delays,
86  std::vector<float> mags,
87  int ntaps_mpath,
88  double noise_amp,
89  double noise_seed );
90 
91  virtual double samp_rate() const = 0;
92  virtual double sro_dev_std() const = 0;
93  virtual double sro_dev_max() const = 0;
94  virtual double cfo_dev_std() const = 0;
95  virtual double cfo_dev_max() const = 0;
96  virtual double noise_amp() const = 0;
97  virtual double doppler_freq() const = 0;
98  virtual double K() const = 0;
99 
100  virtual void set_samp_rate(double) = 0;
101  virtual void set_sro_dev_std(double) = 0;
102  virtual void set_sro_dev_max(double) = 0;
103  virtual void set_cfo_dev_std(double) = 0;
104  virtual void set_cfo_dev_max(double) = 0;
105  virtual void set_noise_amp(double) = 0;
106  virtual void set_doppler_freq(double) = 0;
107  virtual void set_K(double) = 0;
108 
109  };
110 
111  } /* namespace channels */
112 } /* namespace gr */
113 
114 #endif /* INCLUDED_CHANNELS_CHANNEL_MODEL_H */
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
boost::shared_ptr< dynamic_channel_model > sptr
Definition: dynamic_channel_model.h:52
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:30
Hierarchical container class for gr::block's and gr::hier_block2's.
Definition: hier_block2.h:46
dynamic channel simulator
Definition: dynamic_channel_model.h:48