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