summaryrefslogtreecommitdiff
path: root/gr-digital/include/digital
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-08-14 19:23:41 -0400
committerTom Rondeau <trondeau@vt.edu>2012-08-14 19:23:41 -0400
commitab479e3d5b5d77eb4133dd06ea3ffc51551fccd6 (patch)
treeaadbda22cf4c7dc3ff808948dc6dea8d9da4b983 /gr-digital/include/digital
parent48a95b3469febf4929c74f41beac6b33ab77566e (diff)
digital: converted mpsk_receiver to new style.
Diffstat (limited to 'gr-digital/include/digital')
-rw-r--r--gr-digital/include/digital/CMakeLists.txt2
-rw-r--r--gr-digital/include/digital/mpsk_receiver_cc.h147
2 files changed, 148 insertions, 1 deletions
diff --git a/gr-digital/include/digital/CMakeLists.txt b/gr-digital/include/digital/CMakeLists.txt
index 2445a6fe37..27e151e0a5 100644
--- a/gr-digital/include/digital/CMakeLists.txt
+++ b/gr-digital/include/digital/CMakeLists.txt
@@ -104,7 +104,7 @@ install(FILES
# kurtotic_equalizer_cc.h
map_bb.h
# metric_type.h
-# mpsk_receiver_cc.h
+ mpsk_receiver_cc.h
mpsk_snr_est_cc.h
# ofdm_cyclic_prefixer.h
# ofdm_frame_acquisition.h
diff --git a/gr-digital/include/digital/mpsk_receiver_cc.h b/gr-digital/include/digital/mpsk_receiver_cc.h
new file mode 100644
index 0000000000..14094e25b7
--- /dev/null
+++ b/gr-digital/include/digital/mpsk_receiver_cc.h
@@ -0,0 +1,147 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2007,2011,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H
+#define INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H
+
+#include <digital/api.h>
+#include <gr_block.h>
+
+namespace gr {
+ namespace digital {
+
+ /*!
+ * \brief This block takes care of receiving M-PSK modulated
+ * signals through phase, frequency, and symbol synchronization.
+ * \ingroup sync_blk
+ * \ingroup demod_blk
+ * \ingroup digital
+ *
+ * This block takes care of receiving M-PSK modulated signals
+ * through phase, frequency, and symbol synchronization. It
+ * performs carrier frequency and phase locking as well as symbol
+ * timing recovery. It works with (D)BPSK, (D)QPSK, and (D)8PSK
+ * as tested currently. It should also work for OQPSK and PI/4
+ * DQPSK.
+ *
+ * The phase and frequency synchronization are based on a Costas
+ * loop that finds the error of the incoming signal point compared
+ * to its nearest constellation point. The frequency and phase of
+ * the NCO are updated according to this error. There are
+ * optimized phase error detectors for BPSK and QPSK, but 8PSK is
+ * done using a brute-force computation of the constellation
+ * points to find the minimum.
+ *
+ * The symbol synchronization is done using a modified Mueller and
+ * Muller circuit from the paper:
+ *
+ * "G. R. Danesfahani, T. G. Jeans, "Optimisation of modified Mueller
+ * and Muller algorithm," Electronics Letters, Vol. 31, no. 13, 22
+ * June 1995, pp. 1032 - 1033."
+ *
+ * This circuit interpolates the downconverted sample (using the
+ * NCO developed by the Costas loop) every mu samples, then it
+ * finds the sampling error based on this and the past symbols and
+ * the decision made on the samples. Like the phase error
+ * detector, there are optimized decision algorithms for BPSK and
+ * QPKS, but 8PSK uses another brute force computation against all
+ * possible symbols. The modifications to the M&M used here reduce
+ * self-noise.
+ *
+ */
+ class DIGITAL_API mpsk_receiver_cc : virtual public gr_block
+ {
+ public:
+ // gr::digital::mpsk_receiver_cc::sptr
+ typedef boost::shared_ptr<mpsk_receiver_cc> sptr;
+
+ /*!
+ * \brief Buil M-PSK receiver block.
+ *
+ * \param M modulation order of the M-PSK modulation
+ * \param theta any constant phase rotation from the real axis of the constellation
+ * \param loop_bw Loop bandwidth to set gains of phase/freq tracking loop
+ * \param fmin minimum normalized frequency value the loop can achieve
+ * \param fmax maximum normalized frequency value the loop can achieve
+ * \param mu initial parameter for the interpolator [0,1]
+ * \param gain_mu gain parameter of the M&M error signal to adjust mu (~0.05)
+ * \param omega initial value for the number of symbols between samples (~number of samples/symbol)
+ * \param gain_omega gain parameter to adjust omega based on the error (~omega^2/4)
+ * \param omega_rel sets the maximum (omega*(1+omega_rel)) and minimum (omega*(1+omega_rel)) omega (~0.005)
+ *
+ * The constructor also chooses which phase detector and
+ * decision maker to use in the work loop based on the value of
+ * M.
+ */
+ 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);
+
+ //! Returns the modulation order (M) currently set
+ virtual float modulation_order() const = 0;
+
+ //! Returns current value of theta
+ virtual float theta() const = 0;
+
+ //! Returns current value of mu
+ virtual float mu() const = 0;
+
+ //! Returns current value of omega
+ virtual float omega() const = 0;
+
+ //! Returns mu gain factor
+ virtual float gain_mu() const = 0;
+
+ //! Returns omega gain factor
+ virtual float gain_omega() const = 0;
+
+ //! Returns the relative omega limit
+ virtual float gain_omega_rel() const = 0;
+
+ //! Sets the modulation order (M) currently
+ virtual void set_modulation_order(unsigned int M) = 0;
+
+ //! Sets value of theta
+ virtual void set_theta(float theta) = 0;
+
+ //! Sets value of mu
+ virtual void set_mu(float mu) = 0;
+
+ //! Sets value of omega and its min and max values
+ virtual void set_omega(float omega) = 0;
+
+ //! Sets value for mu gain factor
+ virtual void set_gain_mu(float gain_mu) = 0;
+
+ //! Sets value for omega gain factor
+ virtual void set_gain_omega(float gain_omega) = 0;
+
+ //! Sets the relative omega limit and resets omega min/max values
+ virtual void set_gain_omega_rel(float omega_rel) = 0;
+ };
+
+ } /* namespace digital */
+} /* namespace gr */
+
+#endif /* INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H */