GNU Radio Manual and C++ API Reference  3.7.13.4
The Free & Open Software Radio Ecosystem
mpsk_receiver_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2007,2011,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_DIGITAL_MPSK_RECEIVER_CC_H
24 #define INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H
25 
26 #include <gnuradio/digital/api.h>
27 #include <gnuradio/block.h>
29 
30 namespace gr {
31  namespace digital {
32 
33  /*!
34  * \brief This block takes care of receiving M-PSK modulated
35  * signals through phase, frequency, and symbol synchronization.
36  * \ingroup synchronizers_blk
37  * \ingroup deprecated_blk
38  *
39  * \details
40  * It performs carrier frequency and phase locking as well as
41  * symbol timing recovery. It works with (D)BPSK, (D)QPSK, and
42  * (D)8PSK as tested currently. It should also work for OQPSK and
43  * PI/4 DQPSK.
44  *
45  * The phase and frequency synchronization are based on a Costas
46  * loop that finds the error of the incoming signal point compared
47  * to its nearest constellation point. The frequency and phase of
48  * the NCO are updated according to this error. There are
49  * optimized phase error detectors for BPSK and QPSK, but 8PSK is
50  * done using a brute-force computation of the constellation
51  * points to find the minimum.
52  *
53  * The symbol synchronization is done using a modified Mueller and
54  * Muller circuit from the paper:
55  *
56  * "G. R. Danesfahani, T. G. Jeans, "Optimisation of modified Mueller
57  * and Muller algorithm," Electronics Letters, Vol. 31, no. 13, 22
58  * June 1995, pp. 1032 - 1033."
59  *
60  * This circuit interpolates the downconverted sample (using the
61  * NCO developed by the Costas loop) every mu samples, then it
62  * finds the sampling error based on this and the past symbols and
63  * the decision made on the samples. Like the phase error
64  * detector, there are optimized decision algorithms for BPSK and
65  * QPKS, but 8PSK uses another brute force computation against all
66  * possible symbols. The modifications to the M&M used here reduce
67  * self-noise.
68  *
69  */
71  : virtual public block,
72  virtual public blocks::control_loop
73  {
74  public:
75  // gr::digital::mpsk_receiver_cc::sptr
76  typedef boost::shared_ptr<mpsk_receiver_cc> sptr;
77 
78  /*!
79  * \brief Make a M-PSK receiver block.
80  *
81  * \param M modulation order of the M-PSK modulation
82  * \param theta any constant phase rotation from the real axis of the constellation
83  * \param loop_bw Loop bandwidth to set gains of phase/freq tracking loop
84  * \param fmin minimum normalized frequency value the loop can achieve
85  * \param fmax maximum normalized frequency value the loop can achieve
86  * \param mu initial parameter for the interpolator [0,1]
87  * \param gain_mu gain parameter of the M&M error signal to adjust mu (~0.05)
88  * \param omega initial value for the number of symbols between samples (~number of samples/symbol)
89  * \param gain_omega gain parameter to adjust omega based on the error (~omega^2/4)
90  * \param omega_rel sets the maximum (omega*(1+omega_rel)) and minimum (omega*(1+omega_rel)) omega (~0.005)
91  *
92  * The constructor also chooses which phase detector and
93  * decision maker to use in the work loop based on the value of
94  * M.
95  */
96  static sptr make(unsigned int M, float theta,
97  float loop_bw,
98  float fmin, float fmax,
99  float mu, float gain_mu,
100  float omega, float gain_omega, float omega_rel);
101 
102  //! Returns the modulation order (M) currently set
103  virtual float modulation_order() const = 0;
104 
105  //! Returns current value of theta
106  virtual float theta() const = 0;
107 
108  //! Returns current value of mu
109  virtual float mu() const = 0;
110 
111  //! Returns current value of omega
112  virtual float omega() const = 0;
113 
114  //! Returns mu gain factor
115  virtual float gain_mu() const = 0;
116 
117  //! Returns omega gain factor
118  virtual float gain_omega() const = 0;
119 
120  //! Returns the relative omega limit
121  virtual float gain_omega_rel() const = 0;
122 
123  //! Sets the modulation order (M) currently
124  virtual void set_modulation_order(unsigned int M) = 0;
125 
126  //! Sets value of theta
127  virtual void set_theta(float theta) = 0;
128 
129  //! Sets value of mu
130  virtual void set_mu(float mu) = 0;
131 
132  //! Sets value of omega and its min and max values
133  virtual void set_omega(float omega) = 0;
134 
135  //! Sets value for mu gain factor
136  virtual void set_gain_mu(float gain_mu) = 0;
137 
138  //! Sets value for omega gain factor
139  virtual void set_gain_omega(float gain_omega) = 0;
140 
141  //! Sets the relative omega limit and resets omega min/max values
142  virtual void set_gain_omega_rel(float omega_rel) = 0;
143  };
144 
145  } /* namespace digital */
146 } /* namespace gr */
147 
148 #endif /* INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H */
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: logger.h:695
boost::shared_ptr< mpsk_receiver_cc > sptr
Definition: mpsk_receiver_cc.h:76
This block takes care of receiving M-PSK modulated signals through phase, frequency, and symbol synchronization.
Definition: mpsk_receiver_cc.h:70
A second-order control loop implementation class.
Definition: control_loop.h:61
The abstract base class for all &#39;terminal&#39; processing blocks.A signal processing flow is constructed ...
Definition: block.h:65