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