GNU Radio 3.7.3 C++ API
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
>
28
#include <
gnuradio/sync_interpolator.h
>
29
30
namespace
gr {
31
namespace
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 sythesis 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
*/
89
class
FILTER_API
pfb_synthesizer_ccf
:
virtual
public
sync_interpolator
90
{
91
public
:
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
make(
unsigned
int
numchans,
104
const
std::vector<float> &
taps
,
105
bool
twox=
false
);
106
107
/*!
108
* Resets the filterbank's filter taps with the new prototype filter
109
* \param taps (vector/list of floats) The prototype filter to
110
* populate the filterbank.
111
*/
112
virtual
void
set_taps(
const
std::vector<float> &
taps
) = 0;
113
114
/*!
115
* Print all of the filterbank taps to screen.
116
*/
117
virtual
void
print_taps() = 0;
118
119
/*!
120
* Return a vector<vector<>> of the filterbank taps
121
*/
122
virtual
std::vector<std::vector<float> >
taps
()
const
= 0;
123
124
/*!
125
* Set the channel map. Channels are numbers as:
126
* N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2
127
* <------------------- 0 -------------------->
128
* freq
129
*
130
* So input stream 0 goes to channel 0, etc. Setting a new channel
131
* map allows the user to specify where in frequency he/she wants
132
* the input stream to go. This is especially useful to avoid
133
* putting signals into the channels on the edge of the spectrum
134
* which can either wrap around (in the case of odd number of
135
* channels) and be affected by filter rolloff in the transmitter.
136
*
137
* The map must be at least the number of streams being sent to the
138
* block. Less and the algorithm will not have enough data to
139
* properly setup the buffers. Any more channels specified will be
140
* ignored.
141
*/
142
virtual
void
set_channel_map(
const
std::vector<int> &
map
) = 0;
143
144
/*!
145
* Gets the current channel map.
146
*/
147
virtual
std::vector<int> channel_map()
const
= 0;
148
};
149
150
}
/* namespace filter */
151
}
/* namespace gr */
152
153
#endif
/* INCLUDED_PFB_SYNTHESIZER_CCF_H */
gnuradio
gr-filter
include
gnuradio
filter
pfb_synthesizer_ccf.h
Generated by
1.8.3.1