GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
The Free & Open Software Radio Ecosystem
pll_freqdet_cf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2011 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_ANALOG_PLL_FREQDET_CF_H
12 #define INCLUDED_ANALOG_PLL_FREQDET_CF_H
13 
14 #include <gnuradio/analog/api.h>
16 #include <gnuradio/sync_block.h>
17 
18 namespace gr {
19 namespace analog {
20 
21 /*!
22  * \brief Implements a PLL which locks to the input frequency and outputs
23  * an estimate of that frequency. Useful for FM Demod.
24  * \ingroup synchronizers_blk
25  *
26  * \details
27  * Input stream 0: complex
28  * Output stream 0: float
29  *
30  * This PLL locks onto a [possibly noisy] reference carrier on
31  * the input and outputs an estimate of that frequency in radians per sample.
32  * All settings max_freq and min_freq are in terms of radians per sample,
33  * NOT HERTZ. The loop bandwidth determines the lock range and should be set
34  * around pi/200 -- 2pi/100.
35  * \sa pll_refout_cc, pll_carriertracking_cc
36  */
37 class ANALOG_API pll_freqdet_cf : virtual public sync_block,
38  virtual public blocks::control_loop
39 {
40 public:
41  // gr::analog::pll_freqdet_cf::sptr
42  typedef std::shared_ptr<pll_freqdet_cf> sptr;
43 
44  /* \brief Make PLL block that outputs the tracked signal's frequency.
45  *
46  * \param loop_bw: control loop's bandwidth parameter.
47  * \param max_freq: maximum (normalized) frequency PLL will lock to.
48  * \param min_freq: minimum (normalized) frequency PLL will lock to.
49  */
50  static sptr make(float loop_bw, float max_freq, float min_freq);
51 
52  void set_loop_bandwidth(float bw) override = 0;
53  virtual void set_damping_factor(float df) = 0;
54  virtual void set_alpha(float alpha) = 0;
55  virtual void set_beta(float beta) = 0;
56  virtual void set_frequency(float freq) = 0;
57  virtual void set_phase(float phase) = 0;
58  virtual void set_min_freq(float freq) = 0;
59  virtual void set_max_freq(float freq) = 0;
60 
61  virtual float get_loop_bandwidth() const = 0;
62  virtual float get_damping_factor() const = 0;
63  virtual float get_alpha() const = 0;
64  virtual float get_beta() const = 0;
65  virtual float get_frequency() const = 0;
66  virtual float get_phase() const = 0;
67  virtual float get_min_freq() const = 0;
68  virtual float get_max_freq() const = 0;
69 };
70 
71 } /* namespace analog */
72 } /* namespace gr */
73 
74 #endif /* INCLUDED_ANALOG_PLL_FREQDET_CF_H */
Implements a PLL which locks to the input frequency and outputs an estimate of that frequency....
Definition: pll_freqdet_cf.h:39
virtual void set_alpha(float alpha)=0
virtual void set_frequency(float freq)=0
virtual float get_min_freq() const =0
virtual void set_damping_factor(float df)=0
virtual void set_min_freq(float freq)=0
virtual float get_max_freq() const =0
virtual float get_alpha() const =0
virtual float get_damping_factor() const =0
virtual float get_beta() const =0
virtual float get_loop_bandwidth() const =0
virtual float get_frequency() const =0
void set_loop_bandwidth(float bw) override=0
Set the loop bandwidth.
virtual void set_max_freq(float freq)=0
std::shared_ptr< pll_freqdet_cf > sptr
Definition: pll_freqdet_cf.h:42
static sptr make(float loop_bw, float max_freq, float min_freq)
virtual void set_phase(float phase)=0
virtual float get_phase() const =0
virtual void set_beta(float beta)=0
A second-order control loop implementation class.
Definition: control_loop.h:51
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29