GNU Radio Manual and C++ API Reference 3.7.14.0
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/block.h>
29
30namespace gr {
31namespace 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 */
70class DIGITAL_API mpsk_receiver_cc : virtual public block,
71 virtual public blocks::control_loop
72{
73public:
74 // gr::digital::mpsk_receiver_cc::sptr
75 typedef boost::shared_ptr<mpsk_receiver_cc> sptr;
76
77 /*!
78 * \brief Make a M-PSK receiver block.
79 *
80 * \param M modulation order of the M-PSK modulation
81 * \param theta any constant phase rotation from the real axis of the
82 * constellation \param loop_bw Loop bandwidth to set gains of phase/freq
83 * tracking loop \param fmin minimum normalized frequency value the loop can
84 * achieve \param fmax maximum normalized frequency value the loop can achieve
85 * \param mu initial parameter for the interpolator [0,1]
86 * \param gain_mu gain parameter of the M&M error signal to adjust mu (~0.05)
87 * \param omega initial value for the number of symbols between samples (~number
88 * of samples/symbol) \param gain_omega gain parameter to adjust omega based on the
89 * error (~omega^2/4) \param omega_rel sets the maximum (omega*(1+omega_rel)) and
90 * 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,
97 float theta,
98 float loop_bw,
99 float fmin,
100 float fmax,
101 float mu,
102 float gain_mu,
103 float omega,
104 float gain_omega,
105 float omega_rel);
106
107 //! Returns the modulation order (M) currently set
108 virtual float modulation_order() const = 0;
109
110 //! Returns current value of theta
111 virtual float theta() const = 0;
112
113 //! Returns current value of mu
114 virtual float mu() const = 0;
115
116 //! Returns current value of omega
117 virtual float omega() const = 0;
118
119 //! Returns mu gain factor
120 virtual float gain_mu() const = 0;
121
122 //! Returns omega gain factor
123 virtual float gain_omega() const = 0;
124
125 //! Returns the relative omega limit
126 virtual float gain_omega_rel() const = 0;
127
128 //! Sets the modulation order (M) currently
129 virtual void set_modulation_order(unsigned int M) = 0;
130
131 //! Sets value of theta
132 virtual void set_theta(float theta) = 0;
133
134 //! Sets value of mu
135 virtual void set_mu(float mu) = 0;
136
137 //! Sets value of omega and its min and max values
138 virtual void set_omega(float omega) = 0;
139
140 //! Sets value for mu gain factor
141 virtual void set_gain_mu(float gain_mu) = 0;
142
143 //! Sets value for omega gain factor
144 virtual void set_gain_omega(float gain_omega) = 0;
145
146 //! Sets the relative omega limit and resets omega min/max values
147 virtual void set_gain_omega_rel(float omega_rel) = 0;
148};
149
150} /* namespace digital */
151} /* namespace gr */
152
153#endif /* INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H */
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:66
A second-order control loop implementation class.
Definition: control_loop.h:62
This block takes care of receiving M-PSK modulated signals through phase, frequency,...
Definition: mpsk_receiver_cc.h:72
virtual void set_gain_omega(float gain_omega)=0
Sets value for omega gain factor.
virtual float theta() const =0
Returns current value of theta.
boost::shared_ptr< mpsk_receiver_cc > sptr
Definition: mpsk_receiver_cc.h:75
virtual float gain_omega_rel() const =0
Returns the relative omega limit.
virtual void set_gain_mu(float gain_mu)=0
Sets value for mu gain factor.
virtual float mu() const =0
Returns current value of mu.
virtual float gain_mu() const =0
Returns mu gain factor.
virtual void set_theta(float theta)=0
Sets value of theta.
virtual void set_mu(float mu)=0
Sets value of mu.
virtual float modulation_order() const =0
Returns the modulation order (M) currently set.
virtual float gain_omega() const =0
Returns omega gain factor.
virtual void set_modulation_order(unsigned int M)=0
Sets the modulation order (M) currently.
static sptr make(unsigned int M, float theta, float loop_bw, float fmin, float fmax, float mu, float gain_mu, float omega, float gain_omega, float omega_rel)
Make a M-PSK receiver block.
virtual void set_omega(float omega)=0
Sets value of omega and its min and max values.
virtual float omega() const =0
Returns current value of omega.
virtual void set_gain_omega_rel(float omega_rel)=0
Sets the relative omega limit and resets omega min/max values.
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: basic_block.h:45