GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
cpm.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2012 Free Software Foundation, Inc.
4  *
5  * SPDX-License-Identifier: GPL-3.0-or-later
6  *
7  */
8 
9 
10 #ifndef INCLUDED_ANALOG_CPM_H
11 #define INCLUDED_ANALOG_CPM_H
12 
13 #include <gnuradio/analog/api.h>
14 #include <vector>
15 
16 namespace gr {
17 namespace analog {
18 
19 /*! \brief Return the taps for an interpolating FIR filter
20  * (gr::filter::interp_fir_filter_fff).
21  */
23 {
24 public:
25  enum cpm_type { LRC, LSRC, LREC, TFM, GAUSSIAN, GENERIC = 999 };
26 
27  /*! \brief Return the taps for an interpolating FIR filter
28  * (gr::filter::interp_fir_filter_fff).
29  *
30  * \details
31  * These taps represent the phase response \f$g(k)\f$ for use in a CPM modulator,
32  * see also gr_cpmmod_bc.
33  *
34  * \param type The CPM type (Rectangular, Raised Cosine,
35  * Spectral Raised Cosine, Tamed FM or Gaussian).
36  * \param samples_per_sym Samples per symbol.
37  * \param L The length of the phase response in symbols.
38  * \param beta For Spectral Raised Cosine, this is the rolloff
39  * factor. For Gaussian phase responses, this the
40  * 3dB-time-bandwidth product. For all other cases,
41  * it is ignored.
42  *
43  * Output: returns a vector of length \a K = \p samples_per_sym
44  * x \p L. This can be used directly in an
45  * interpolating FIR filter such as
46  * gr_interp_fir_filter_fff with interpolation factor \p
47  * samples_per_sym.
48  *
49  * All phase responses are normalised s.t. \f$ \sum_{k=0}^{K-1}
50  * g(k) = 1\f$; this will cause a maximum phase change of \f$ h
51  * \cdot \pi\f$ between two symbols, where \a h is the
52  * modulation index.
53  *
54  * The following phase responses can be generated:
55  * - LREC: Rectangular phase response.
56  * - LRC: Raised cosine phase response, looks like 1 - cos(x).
57  * - LSRC: Spectral raised cosine. This requires a rolloff factor beta.
58  * The phase response is the Fourier transform of raised cosine
59  * function.
60  * - TFM: Tamed frequency modulation. This scheme minimizes phase change for
61  * rapidly varying input symbols.
62  * - GAUSSIAN: A Gaussian phase response. For a modulation index h = 1/2, this
63  * results in GMSK.
64  *
65  * A short description of all these phase responses can be found in [1].
66  *
67  * [1]: Anderson, Aulin and Sundberg; Digital Phase Modulation
68  */
69  static std::vector<float> phase_response(cpm_type type,
70  unsigned samples_per_sym,
71  unsigned L,
72  double beta = 0.3);
73 };
74 } // namespace analog
75 } // namespace gr
76 
77 #endif /* INCLUDED_ANALOG_CPM_H */
Return the taps for an interpolating FIR filter (gr::filter::interp_fir_filter_fff).
Definition: cpm.h:23
static std::vector< float > phase_response(cpm_type type, unsigned samples_per_sym, unsigned L, double beta=0.3)
Return the taps for an interpolating FIR filter (gr::filter::interp_fir_filter_fff).
cpm_type
Definition: cpm.h:25
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29