GNU Radio 3.7.2 C++ API
costas_loop_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006,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_COSTAS_LOOP_CC_H
24 #define INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
25 
26 #include <gnuradio/digital/api.h>
28 #include <gnuradio/sync_block.h>
29 
30 namespace gr {
31  namespace digital {
32 
33  /*!
34  * \brief A Costas loop carrier recovery module.
35  * \ingroup synchronizers_blk
36  *
37  * \details
38  * The Costas loop locks to the center frequency of a signal and
39  * downconverts it to baseband. The second (order=2) order loop
40  * is used for BPSK where the real part of the output signal is
41  * the baseband BPSK signal and the imaginary part is the error
42  * signal. When order=4, it can be used for quadrature
43  * modulations where both I and Q (real and imaginary) are
44  * outputted.
45  *
46  * More details can be found online:
47  *
48  * J. Feigin, "Practical Costas loop design: Designing a simple
49  * and inexpensive BPSK Costas loop carrier recovery circuit," RF
50  * signal processing, pp. 20-36, 2002.
51  *
52  * http://rfdesign.com/images/archive/0102Feigin20.pdf
53  *
54  * The Costas loop can have two output streams:
55  * stream 1 is the baseband I and Q;
56  * stream 2 is the normalized frequency of the loop
57  */
59  : virtual public sync_block,
60  virtual public blocks::control_loop
61  {
62  public:
63  // gr::digital::costas_loop_cc::sptr
65 
66  /*!
67  * Make a Costas loop carrier recovery block.
68  *
69  * \param loop_bw internal 2nd order loop bandwidth (~ 2pi/100)
70  * \param order the loop order, either 2, 4, or 8
71  */
72  static sptr make(float loop_bw, int order);
73 
74  /*!
75  * Returns the current value of the loop error.
76  */
77  virtual float error() const = 0;
78  };
79 
80  } /* namespace digital */
81 } /* namespace gr */
82 
83 #endif /* INCLUDED_DIGITAL_COSTAS_LOOP_CC_H */
A Costas loop carrier recovery module.
Definition: costas_loop_cc.h:58
#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< costas_loop_cc > sptr
Definition: costas_loop_cc.h:64
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
Definition: control_loop.h:31