Quadrature demodulation of FM

Before I ask my question, I’d like to thank everyone that’s been helping
me
out. I (and my peers at Purdue) are just starting out with the USRP and
really appreciate the support.

On to my question, I wrote a demodulation block for FM that uses a
method
different than the provided quadrature_demod_cf block. Here is a block
diagram of what I’m attempting:
http://pico.iis.u-tokyo.ac.jp/media/9/20060626-SQD-princ.jpg. I can
record
data from the USRP and successfully demodulate FM radio in MATLAB using
this
technique. However, I cannot accomplish this with my signal processing
block
I wrote. To test my block, I use the example wideband FM receiver code,
usrp_wfm_rcv.py, and basically insert my demodulation block in place of
the
provided demodulation block.

Here is the work code I made, note it is just a small modification of
quadrature_demod_cf.cc:

int gr_quad_demod_baseband::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
gr_complex *in = (gr_complex *) input_items[0];
float *out = (float *) output_items[0];
in++; // ensure that in[-1] is valid

for (int i = 0; i < noutput_items; i++){
    float I_1 = real(in[i-1]);
    float I_2 = real(in[i]);
    float Q_1 = imag(in[i-1]);
    float Q_2 = imag(in[i]);

    float dI = I_1 - I_2;
    float dQ = Q_1 - Q_2;

    float dQxI = dQ*I_1;
    float dIxQ = dI*Q_1;

    out[i] = d_gain*(dIxQ - dQxI);
}

return noutput_items;

}

The demodulation is really simple and if you do not get it at first,
please
check out the link to the block diagram. On a final note, my block is
also
running very slowly. I continuously get overrun notifications (I believe
that is the meaning of uO). I think I am quite close to the answer, I
just
need a little guidance. Anyone have any suggestions? Thanks in advance!

Jon Pendlum
Purdue University Undergraduate Student

I think you want to look at Richard Lyon’s book on DSP, Fig 13-61(b).
The book should be on the recommended reading list for GNU Radio. I
think this is an implementation of the algorithm you are trying to
implement.

I’ve used this method successfully with the OSSIE SCA code from VT.
Unfortunately that code is behind a silly click through system, but
I’m copying this code to an open repository next week. If you have
more questions, email me next week.

Philip