GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
pfb_synthesizer_ccf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2012 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 
12 #ifndef INCLUDED_PFB_SYNTHESIZER_CCF_H
13 #define INCLUDED_PFB_SYNTHESIZER_CCF_H
14 
15 #include <gnuradio/filter/api.h>
17 
18 namespace gr {
19 namespace filter {
20 
21 /*!
22  * \brief Polyphase synthesis filterbank with
23  * gr_complex input, gr_complex output and float taps
24  * \ingroup channelizers_blk
25  *
26  * \details
27  *
28  * The PFB synthesis filterbank combines multiple baseband signals
29  * into a single channelized signal. Each input stream is,
30  * essentially, modulated onto an output channel according the the
31  * channel mapping (see set_channel_map for details).
32  *
33  * Setting this filterbank up means selecting the number of output
34  * channels, the prototype filter, and whether to handle channels
35  * at 2x the sample rate (this is generally used only for
36  * reconstruction filtering).
37  *
38  * The number of channels sets the maximum number of channels to
39  * use, but not all input streams must be connected. For M total
40  * channels, we can connect inputs 0 to N where N < M-1. Because
41  * of the way GNU Radio handles stream connections, we must
42  * connect the channels consecutively, and so we must use the
43  * set_channel_map if the desired output channels are not the same
44  * as the the default mapping. This features gives us the
45  * flexibility to output to any given channel. Generally, we try
46  * to not use the channels at the edge of the spectrum to avoid
47  * issues with filtering and roll-off of the transmitter or
48  * receiver.
49  *
50  * When using the 2x sample rate mode, we specify the number of
51  * channels that will be used. However, the actual output signal
52  * will be twice this number of channels. This is mainly important
53  * to know when setting the channel map. For M channels, the
54  * channel mapping can specy from 0 to 2M-1 channels to output
55  * onto.
56  *
57  * For more details about this and the concepts of reconstruction
58  * filtering, see:
59  *
60  * <B><EM>f. harris, "Multirate Signal Processing for Communication
61  * Systems," Upper Saddle River, NJ: Prentice Hall, Inc. 2004.</EM></B>
62  *
63  * <B><EM>X. Chen, E. Venosa, and fred harris, “Polyphase analysis
64  * filter bank up-converts unequal channel bandwidths with
65  * arbitrary center frequencies - design ii,” in SDR’10-WinnComm,
66  * 2010.</EM></B>
67  *
68  * <B><EM>E. Venosa, X. Chen, and fred harris, “Polyphase analysis
69  * filter bank down-converts unequal channel bandwidths with
70  * arbitrary center frequencies - design I,” in SDR’10-WinnComm,
71  * 2010.</EM></B>
72  *
73  * <B><EM>f. j. harris, C. Dick, X. Chen, and E. Venosa, “Wideband 160-
74  * channel polyphase filter bank cable TV channeliser,” in IET
75  * Signal Processing, 2010.</EM></B>
76  */
78 {
79 public:
80  // gr::filter::pfb_synthesizer_ccf::sptr
81  typedef std::shared_ptr<pfb_synthesizer_ccf> sptr;
82 
83  /*!
84  * Build the polyphase synthesis filterbank.
85  * \param numchans (unsigned integer) Specifies the number of
86  * channels <EM>M</EM>
87  * \param taps (vector/list of floats) The prototype filter to
88  * populate the filterbank.
89  * \param twox (bool) use 2x oversampling or not (default is no)
90  */
91  static sptr
92  make(unsigned int numchans, const std::vector<float>& taps, bool twox = false);
93 
94  /*!
95  * Resets the filterbank's filter taps with the new prototype filter
96  * \param taps (vector/list of floats) The prototype filter to
97  * populate the filterbank.
98  */
99  virtual void set_taps(const std::vector<float>& taps) = 0;
100 
101  /*!
102  * Print all of the filterbank taps to screen.
103  */
104  virtual void print_taps() = 0;
105 
106  /*!
107  * Return a vector<vector<>> of the filterbank taps
108  */
109  virtual std::vector<std::vector<float>> taps() const = 0;
110 
111  /*!
112  * Set the channel map. Channels are numbers as:
113  * <pre>
114  * N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2
115  * <------------------- 0 -------------------->
116  * freq
117  * </pre>
118  *
119  * So input stream 0 goes to channel 0, etc. Setting a new channel
120  * map allows the user to specify where in frequency he/she wants
121  * the input stream to go. This is especially useful to avoid
122  * putting signals into the channels on the edge of the spectrum
123  * which can either wrap around (in the case of odd number of
124  * channels) and be affected by filter rolloff in the transmitter.
125  *
126  * The map must be at least the number of streams being sent to the
127  * block. Less and the algorithm will not have enough data to
128  * properly setup the buffers. Any more channels specified will be
129  * ignored.
130  */
131  virtual void set_channel_map(const std::vector<int>& map) = 0;
132 
133  /*!
134  * Gets the current channel map.
135  */
136  virtual std::vector<int> channel_map() const = 0;
137 };
138 
139 } /* namespace filter */
140 } /* namespace gr */
141 
142 #endif /* INCLUDED_PFB_SYNTHESIZER_CCF_H */
Polyphase synthesis filterbank with gr_complex input, gr_complex output and float taps.
Definition: pfb_synthesizer_ccf.h:78
virtual std::vector< int > channel_map() const =0
static sptr make(unsigned int numchans, const std::vector< float > &taps, bool twox=false)
virtual std::vector< std::vector< float > > taps() const =0
std::shared_ptr< pfb_synthesizer_ccf > sptr
Definition: pfb_synthesizer_ccf.h:81
virtual void set_taps(const std::vector< float > &taps)=0
virtual void set_channel_map(const std::vector< int > &map)=0
synchronous 1:N input to output with history
Definition: sync_interpolator.h:26
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
static constexpr float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
GNU Radio logging wrapper.
Definition: basic_block.h:29
PMT_API pmt_t map(pmt_t proc(const pmt_t &), pmt_t list)
Apply proc element-wise to the elements of list and returns a list of the results,...