On Mon, Dec 26, 2011 at 7:42 AM, Uzair B. [email protected] wrote:
- A frequency offest in the channel in ratio
It does a sample rate change to model the difference in the clock
rates between real systems. For a value of 1, there is no rate change.
you sure you’re getting a different number of samples out than you put
for this block? That’s not how it’s supposed to work.
It’s simulating how when the transmitter sends a sample at time T, the
receiver will sample it at time T+delta(t), where delta(t) is a function
time (if this were just T+delta, you can simulate that by setting just
initial phase of the fractional interpolator).
Doesnt the interpolation mean an increase in the number of samples?
Yes, technically. The block is really constructed as a gr_block, which
allows it to have any rate change required. Perhaps calling it
interpolator was a bit of a misnomer, but it probably fit the original,
intended use better. But it can behave as a decimator, too (although
is technically incorrect since decimate really means to reduce by 10).
Maybe a better name would have been “fractional_rate_changer” or
Secondly, I have connected this channel model to polyphase filter banks for
clock recovery. I don’t get a correct output if I increase epsilon? And another
thing, can you please share as to what does each parameter filter bank imply? ( I
have read the documentation, but, cannot make much sense of it).
Well, you’re not the first to have trouble with that block. I wrote the
documentation for those PFB blocks, and they are about as detailed as
get in GNU Radio right now. Seems like I spent more time discussing the
theory of their operation rather than how to actually use the damn
First, I’ve done exactly what you’re doing and haven’t had a problem, so
the issue must be in the parameters you are using. What setting are you
using for epsilon? Remember, this is supposed to simulate a timing
between two clocks, so we’re talking the difference in the parts per
million. Tens of ppm at the most extreme. I’ve used the PFB clock
block to recovery a bit stream where the clocks were off by as much as
If you’re ever working with a clock that is that bad, just throw it away
Second, the parameters of the PFB have to be set right. I will assume
the ‘sps’ (samples per symbol) is pretty obvious. The loop bandwidth is
used to set the gain of the inner control loop (see:
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
to move relative to the error).
The filter size is the number of banks in the filterbank. This defaults
32, and you probably don’t need any better (for single-precision
point numbers, you won’t get much of a gain beyond this). The init_phase
which bank to start off with. This really doesn’t matter as it’s the
algorithms job to find and track this. The max_deviation caps how fast
algorithm can move. The default of 1.5 is generous, but keeps the
from going too crazy when given bogus input.
The osps is the number of output samples per symbol. By default, the
algorithm produces 1 sample per symbol, sampled at the exact sample
This osps value was added to better work with equalizers, which do a
job of modeling the channel if they have 2 samps/sym.
That leaves the taps of the filter. One of the benefits of this
is that you can put the matched filter in here as the taps, so you get
the matched filter and sample timing correction in one go. So create
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
combine to get the current symbols energy back (there’s probably a
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
profiles in each filter. So take this number of taps and multiply it by
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
taps into the filterbanks in such a way that each bank now represents
filter at different phases, equally spaced at 2pi/N, where N is the
The algorithm works by finding the phase that minimizes the derivative
this filter and tracks any changes, so the filter itself is centered on
symbol itself and the filtering operation takes this and the energy of
symbol present in the surrounding symbols together. The ISI is minimized
this point; it’s value is at most related to the half of the maximum
possible phase difference between two banks in the filterbank.
I’m going to take what I wrote here and add it to the documentation for
file. I hope it clears some things up for everyone.