diff options
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h | 78 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h | 80 |
2 files changed, 105 insertions, 53 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h index 514f580ba..f4f589cd9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h @@ -94,36 +94,61 @@ class gr_fir_ccf; * constructor, we just ask for "gain," which is d_alpha while d_beta * is equal to (gain^2)/4. * - * The clock sync block needs to know the number of samples per symbol - * (sps), because it only returns a single point representing the - * symbol. The sps can be any positive real number and does not need - * to be an integer. The filter taps must also be specified. The taps - * are generated by first conceiving of the prototype filter that - * would be the signal's matched filter. Then interpolate this by the - * number of filters in the filterbank. These are then distributed - * among all of the filters. So if the prototype filter was to have 45 - * taps in it, then each path of the filterbank will also have 45 - * taps. This is easily done by building the filter with the sample - * rate multiplied by the number of filters to use. + * The block's parameters are: * - * The number of filters can also be set and defaults to 32. With 32 - * filters, you get a good enough resolution in the phase to produce - * very small, almost unnoticeable, ISI. Going to 64 filters can - * reduce this more, but after that there is very little gained for - * the extra complexity. + * \li \p sps: The clock sync block needs to know the number of samples per + * symbol, because it defaults to return a single point representing + * the symbol. The sps can be any positive real number and does not + * need to be an integer. * - * The initial phase is another settable parameter and refers to the - * filter path the algorithm initially looks at (i.e., d_k starts at - * init_phase). This value defaults to zero, but it might be useful to - * start at a different phase offset, such as the mid- point of the - * filters. + * \li \p loop_bw: The loop bandwidth is used to set the gain of the + * inner control loop (see: + * http://gnuradio.squarespace.com/blog/2011/8/13/control-loop-gain-values.html). + * This should be set small (a value of around 2pi/100 is suggested in + * that blog post as the step size for the number of radians around + * the unit circle to move relative to the error). * - * The final parameter is the max_rate_devitation, which defaults to - * 1.5. This is how far we allow d_rate to swing, positive or - * negative, from 0. Constraining the rate can help keep the algorithm - * from walking too far away to lock during times when there is no - * signal. + * \li \p taps: One of the most important parameters for this block is + * the taps of the filter. One of the benefits of this algorithm is + * that you can put the matched filter in here as the taps, so you get + * both the matched filter and sample timing correction in one go. So + * create your normal matched filter. For a typical digital + * modulation, this is a root raised cosine filter. The number of taps + * of this filter is based on how long you expect the channel to be; + * that is, how many symbols do you want to combine to get the current + * symbols energy back (there's probably a better way of stating + * that). It's usually 5 to 10 or so. That gives you your filter, but + * now we need to think about it as a filter with different phase + * profiles in each filter. So take this number of taps and multiply + * it by the number of filters. This is the number you would use to + * create your prototype filter. When you use this in the PFB + * filerbank, it segments these taps into the filterbanks in such a + * way that each bank now represents the filter at different phases, + * equally spaced at 2pi/N, where N is the number of filters. * + * \li \p filter_size (default=32): The number of filters can also be + * set and defaults to 32. With 32 filters, you get a good enough + * resolution in the phase to produce very small, almost unnoticeable, + * ISI. Going to 64 filters can reduce this more, but after that + * there is very little gained for the extra complexity. + * + * \li \p init_phase (default=0): The initial phase is another + * settable parameter and refers to the filter path the algorithm + * initially looks at (i.e., d_k starts at init_phase). This value + * defaults to zero, but it might be useful to start at a different + * phase offset, such as the mid-point of the filters. + * + * \li \p max_rate_deviation (default=1.5): The next parameter is the + * max_rate_devitation, which defaults to 1.5. This is how far we + * allow d_rate to swing, positive or negative, from 0. Constraining + * the rate can help keep the algorithm from walking too far away to + * lock during times when there is no signal. + * + * \li \p osps (default=1): The osps is the number of output samples per symbol. By default, + * the algorithm produces 1 sample per symbol, sampled at the exact + * sample value. This osps value was added to better work with + * equalizers, which do a better job of modeling the channel if they + * have 2 samps/sym. */ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block @@ -141,6 +166,7 @@ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block * \param osps (int) The number of output samples per symbol (default=1). * */ + friend GR_CORE_API gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (double sps, float loop_bw, const std::vector<float> &taps, unsigned int filter_size, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h index 447d3e59d..43d382713 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h @@ -49,7 +49,7 @@ class gr_fir_fff; * minimizing the derivative of the filtered signal, which in turn * maximizes the SNR and minimizes ISI. * - * This approach works by setting up two filterbanks; one filterbanke + * This approach works by setting up two filterbanks; one filterbank * contains the signal's pulse shaping matched filter (such as a root * raised cosine filter), where each branch of the filterbank contains * a different phase of the filter. The second filterbank contains @@ -93,36 +93,62 @@ class gr_fir_fff; * constructor, we just ask for "gain," which is d_alpha while d_beta * is equal to (gain^2)/4. * - * The clock sync block needs to know the number of samples per second - * (sps), because it only returns a single point representing the - * sample. The sps can be any positive real number and does not need - * to be an integer. The filter taps must also be specified. The taps - * are generated by first conceiving of the prototype filter that - * would be the signal's matched filter. Then interpolate this by the - * number of filters in the filterbank. These are then distributed - * among all of the filters. So if the prototype filter was to have 45 - * taps in it, then each path of the filterbank will also have 45 - * taps. This is easily done by building the filter with the sample - * rate multiplied by the number of filters to use. + * The block's parameters are: * - * The number of filters can also be set and defaults to 32. With 32 - * filters, you get a good enough resolution in the phase to produce - * very small, almost unnoticeable, ISI. Going to 64 filters can - * reduce this more, but after that there is very little gained for - * the extra complexity. + * \li \p sps: The clock sync block needs to know the number of samples per + * symbol, because it defaults to return a single point representing + * the symbol. The sps can be any positive real number and does not + * need to be an integer. * - * The initial phase is another settable parameter and refers to the - * filter path the algorithm initially looks at (i.e., d_k starts at - * init_phase). This value defaults to zero, but it might be useful to - * start at a different phase offset, such as the mid- point of the - * filters. + * \li \p loop_bw: The loop bandwidth is used to set the gain of the + * inner control loop (see: + * http://gnuradio.squarespace.com/blog/2011/8/13/control-loop-gain-values.html). + * This should be set small (a value of around 2pi/100 is suggested in + * that blog post as the step size for the number of radians around + * the unit circle to move relative to the error). * - * The final parameter is the max_rate_devitation, which defaults to - * 1.5. This is how far we allow d_rate to swing, positive or - * negative, from 0. Constraining the rate can help keep the algorithm - * from walking too far away to lock during times when there is no - * signal. + * \li \p taps: One of the most important parameters for this block is + * the taps of the filter. One of the benefits of this algorithm is + * that you can put the matched filter in here as the taps, so you get + * both the matched filter and sample timing correction in one go. So + * create your normal matched filter. For a typical digital + * modulation, this is a root raised cosine filter. The number of taps + * of this filter is based on how long you expect the channel to be; + * that is, how many symbols do you want to combine to get the current + * symbols energy back (there's probably a better way of stating + * that). It's usually 5 to 10 or so. That gives you your filter, but + * now we need to think about it as a filter with different phase + * profiles in each filter. So take this number of taps and multiply + * it by the number of filters. This is the number you would use to + * create your prototype filter. When you use this in the PFB + * filerbank, it segments these taps into the filterbanks in such a + * way that each bank now represents the filter at different phases, + * equally spaced at 2pi/N, where N is the number of filters. * + * \li \p filter_size (default=32): The number of filters can also be + * set and defaults to 32. With 32 filters, you get a good enough + * resolution in the phase to produce very small, almost unnoticeable, + * ISI. Going to 64 filters can reduce this more, but after that + * there is very little gained for the extra complexity. + * + * \li \p init_phase (default=0): The initial phase is another + * settable parameter and refers to the filter path the algorithm + * initially looks at (i.e., d_k starts at init_phase). This value + * defaults to zero, but it might be useful to start at a different + * phase offset, such as the mid-point of the filters. + * + * \li \p max_rate_deviation (default=1.5): The next parameter is the + * max_rate_devitation, which defaults to 1.5. This is how far we + * allow d_rate to swing, positive or negative, from 0. Constraining + * the rate can help keep the algorithm from walking too far away to + * lock during times when there is no signal. + * + * \li \p osps: note that unlike the ccf version of this algorithm, + * this block does \a not have a setting for the number of output + * samples per symbol. This is mostly because it should not be + * necessary as the reason for having multiple output sps is to + * perform equalization and the equalizers will take in complex + * numbers in order to do magnitude and phase correction. */ class GR_CORE_API gr_pfb_clock_sync_fff : public gr_block |