GnuRadio: Clock Recovery MM: imu out of bounds

I have created a flowgraph, based on an example of Michael O.,
which takes in a signal, and should output bits.I need to use the clock
recovery MM block, which I do not fully understand yet. However, after
reading some blogposts, I am quite sure that I can leave most of the
settings default, except for the Omega one. Here’s my flowgraph:
http://imgur.com/pHRXnZu

When running this flowgraph, it gives me the following error:

thread[thread-per-block[5]:<block clock_recovery_mm_ff (9)>]:
mmse_fir_interpolator_ff: imu out of bounds.

While searching, I stumbled upon this piece of code in the source of
GnuRadio:

int imu = (int)rint(mu * NSTEPS);
if((imu < 0) || (imu > NSTEPS)) {
throw std::runtime_error(“mmse_fir_interpolator_ff: imu out of
bounds.\n”);
}

So, I suspect it is not due to my Omega setting (which might be wrong, I
have to play with that setting), but that it is due to my Mu setting,
which is just the default (0.5). However, I understand that Mu needs to
be between 0 and 1, so I do not really understand what the problem is.
Anyone who does?Environment details:GNU Radio Companion 3.7.7.1Running a
GNU Radio live DVD in a virtual machine (VirtualBox 4.2.12) on Windows
7.Using Volk machine: ssse3_64

On Wed, Aug 19, 2015 at 2:51 AM, Michael B [email protected] wrote:

have to play with that setting), but that it is due to my Mu setting, which

Michael,

I don’t have an answer, but I can say where you’re doing something
wrong.
You’re samples/symbol (samp_per_sym) is definitely /not/ 2.5k. That’s a
massively oversampled signal and can’t be right. You need to think
what’s
the sampling rate of the system? What’s the symbol rate of my signal?
That
will tell you the samples/symbol you need. It should small, like 2 or 4.

Tom

Hi Tom,

Thanks for your answer. That’s indeed something that I need to think
about more. However, as I understand it, the samples per symbol rate is
equal to (samp_rate / data_rate). My sample rate is 500k, and my data
rate (i think) is only around 100 or 200. See this figure of my
(cleaned) signal:

http://imgur.com/8pNqCop

You see that it takes approximately 10 ms to transmit one symbol. This
means 100 symbols per second. As I have 500k samples per second, this
means 5k samples per symbol, right?

However, I have tried setting the samples per symbol to 4, just to try,
and the ‘out of bounds’ error still persists.

Regards,
Michael

From: [email protected]
Date: Wed, 19 Aug 2015 09:41:19 -0400
Subject: Re: [Discuss-gnuradio] GnuRadio: Clock Recovery MM: imu out of
bounds
To: [email protected]
CC: [email protected]

On Wed, Aug 19, 2015 at 2:51 AM, Michael B [email protected] wrote:

I have created a flowgraph, based on an example of Michael O.,
which takes in a signal, and should output bits.I need to use the clock
recovery MM block, which I do not fully understand yet. However, after
reading some blogposts, I am quite sure that I can leave most of the
settings default, except for the Omega one. Here’s my flowgraph:
http://imgur.com/pHRXnZu

When running this flowgraph, it gives me the following error:

thread[thread-per-block[5]:<block clock_recovery_mm_ff (9)>]:
mmse_fir_interpolator_ff: imu out of bounds.

While searching, I stumbled upon this piece of code in the source of
GnuRadio:

int imu = (int)rint(mu * NSTEPS);
if((imu < 0) || (imu > NSTEPS)) {
throw std::runtime_error(“mmse_fir_interpolator_ff: imu out of
bounds.\n”);
}

So, I suspect it is not due to my Omega setting (which might be wrong, I
have to play with that setting), but that it is due to my Mu setting,
which is just the default (0.5). However, I understand that Mu needs to
be between 0 and 1, so I do not really understand what the problem is.
Anyone who does?Environment details:GNU Radio Companion 3.7.7.1Running a
GNU Radio live DVD in a virtual machine (VirtualBox 4.2.12) on Windows
7.Using Volk machine: ssse3_64

Michael,
I don’t have an answer, but I can say where you’re doing something
wrong. You’re samples/symbol (samp_per_sym) is definitely /not/ 2.5k.
That’s a massively oversampled signal and can’t be right. You need to
think what’s the sampling rate of the system? What’s the symbol rate of
my signal? That will tell you the samples/symbol you need. It should
small, like 2 or 4.
Tom

On Thu, Aug 20, 2015 at 3:09 AM, Michael B [email protected] wrote:

means 100 symbols per second. As I have 500k samples per second, this means
5k samples per symbol, right?

However, I have tried setting the samples per symbol to 4, just to try,
and the ‘out of bounds’ error still persists.

Regards,
Michael

Decimate decimate decimate. You should down sample your signal as soon
as
possible to something reasonable. You want your sample rate to be large
enough to hold the information, but not too large that you’re just
wasting
cycles. Take your input signal down to reasonably represent the slow
data
rate so that the actual sps is correct. You can just set these numbers
arbitrarily.

Tom

Hi Tom,

Thanks for your help. I’ve adapted the sample rate of the result coming
out of the low-pass filter now. However, if I decimate much further, my
signal becomes a bit too weak I think.
New chart:
http://imgur.com/mbt288s,etHbYLT#0

New result:
http://imgur.com/mbt288s,etHbYLT#1

Is this a better approach?
The initial error still persists though.

Regards

From: [email protected]
To: [email protected]
Date: Thu, 20 Aug 2015 09:09:42 +0200
CC: [email protected]
Subject: Re: [Discuss-gnuradio] GnuRadio: Clock Recovery MM: imu out of
bounds

Hi Tom,

Thanks for your answer. That’s indeed something that I need to think
about more. However, as I understand it, the samples per symbol rate is
equal to (samp_rate / data_rate). My sample rate is 500k, and my data
rate (i think) is only around 100 or 200. See this figure of my
(cleaned) signal:

http://imgur.com/8pNqCop

You see that it takes approximately 10 ms to transmit one symbol. This
means 100 symbols per second. As I have 500k samples per second, this
means 5k samples per symbol, right?

However, I have tried setting the samples per symbol to 4, just to try,
and the ‘out of bounds’ error still persists.

Regards,
Michael

From: [email protected]
Date: Wed, 19 Aug 2015 09:41:19 -0400
Subject: Re: [Discuss-gnuradio] GnuRadio: Clock Recovery MM: imu out of
bounds
To: [email protected]
CC: [email protected]

On Wed, Aug 19, 2015 at 2:51 AM, Michael B [email protected] wrote:

I have created a flowgraph, based on an example of Michael O.,
which takes in a signal, and should output bits.I need to use the clock
recovery MM block, which I do not fully understand yet. However, after
reading some blogposts, I am quite sure that I can leave most of the
settings default, except for the Omega one. Here’s my flowgraph:
http://imgur.com/pHRXnZu

When running this flowgraph, it gives me the following error:

thread[thread-per-block[5]:<block clock_recovery_mm_ff (9)>]:
mmse_fir_interpolator_ff: imu out of bounds.

While searching, I stumbled upon this piece of code in the source of
GnuRadio:

int imu = (int)rint(mu * NSTEPS);
if((imu < 0) || (imu > NSTEPS)) {
throw std::runtime_error(“mmse_fir_interpolator_ff: imu out of
bounds.\n”);
}

So, I suspect it is not due to my Omega setting (which might be wrong, I
have to play with that setting), but that it is due to my Mu setting,
which is just the default (0.5). However, I understand that Mu needs to
be between 0 and 1, so I do not really understand what the problem is.
Anyone who does?Environment details:GNU Radio Companion 3.7.7.1Running a
GNU Radio live DVD in a virtual machine (VirtualBox 4.2.12) on Windows
7.Using Volk machine: ssse3_64

Michael,
I don’t have an answer, but I can say where you’re doing something
wrong. You’re samples/symbol (samp_per_sym) is definitely /not/ 2.5k.
That’s a massively oversampled signal and can’t be right. You need to
think what’s the sampling rate of the system? What’s the symbol rate of
my signal? That will tell you the samples/symbol you need. It should
small, like 2 or 4.
Tom

Hi Michael,

so, this having sat on my “what the hell, I need to look at this” list
for the weekend:
I can’t reproduce the behaviour, but that might simply have the cause of
me using white noise instead of your recording. Could you share that?

I have two hypotheses and one observation so far:
The observation is that in many places where we want to get the closest
int to a float, we use stuff like int imu= rint(mu*NSTEPS), which is
wrong in respect to the return value (double), the parameter type
(double) and in most cases also the side effects (rint is the version of
nearbyint that sets error flags, but we don’t check them). We should use
something else; that’s an overhaul of existing code that’ll have to be
done another day.

So first hypothesis:
It’s your signal that will suffice for us to reproduce the error. That’s
the “good” case, because then one can actually inspect what goes wrong
here.

Second hypothesis:
Based on above observation and VirtualBox’ history of delicate floating
point bugs, this might get a bit more involved, especially since
floating point exception registers are involved, which historically were
hard to properly multithread/make ISR save; maybe the overhaul mentioned
above would solve the issue, though.

Best regards,
Marcus