discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Quadrature demodulation of FM


From: Jonathon Pendlum
Subject: [Discuss-gnuradio] Quadrature demodulation of FM
Date: Thu, 27 Mar 2008 19:55:35 -0400

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]