discuss-gnuradio
[Top][All Lists]
Advanced

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

RE: [Discuss-gnuradio] Re: Complex samples format with ASK


From: Marco Bottino
Subject: RE: [Discuss-gnuradio] Re: Complex samples format with ASK
Date: Wed, 03 Dec 2008 11:53:37 -0500
User-agent: Internet Messaging Program (IMP) 3.2.3

Hello,

thank you very much for answering me.


Selon Paul Mathews <address@hidden>:

> > I know very little about RFID, but I can make these observations on
>
> > how I would probably perform a naive demodulation of this signal.
>
> >  1. Tune the USRP to your carrier frequency and bring your signal
> > down to baseband (centered around DC).
> >  2. Choose an appropriate number of samples per symbol or bit (I'd
>
> > arbitrarily choose 6 .. or 8).
> >  3. Filter the incoming signal to some appropriate spectral mask.
> >  4. Find the magnitude (or even power since it saves a sqrt) of the
> > complex vector.
> >  5. Develop some algorithm which accounts for frequency offset/tracking.
>
> >  6. Perform hard decisions from the soft decisions you make from the
> > algorithm developed in step (5).
>
>
> Marco,
> Are you trying to decode the reader transmission, or the tag reply? You may
> be able to use a matched filter as a first step to clean up the signal
> before
> demodulating. I'm not really sure what 13.56 MHz RFID signals look like, but
> that
>
> helps a lot at 915 MHz.
>
> Regardless, I think step 3 is the key to get you started. You don't want to
> just
> throw out the I or Q channel. You probably want to use the complex_to_mag
> block,
> and then the signal will look like what you expect.
>
> michael
>
> To try to answer Marco's original question about I/Q directly: the phase
> info available from I/Q samples is not directly useful for RFID ASK signals.
> However, the calculated magnitude provides slightly better SNR than would
> samples of magnitude alone.
>
> I've done a lot of work with 13 MHz RFID. Most common form of modulation is
> Amplitude Shift Keying, a form of AM, with the data stream Manchester
> encoded.
> http://en.wikipedia.org/wiki/Manchester_coding
> A good example of channel filtering and AM demodulation using complex_to_mag
> is usrp_am_mw_rcv.py. That example is setup for AM broadcast, so you'll want
> to widen the channel filter BW out to accomodate the baud rate you're using,
> and, you can eliminate the audio filtering and sink code.

I am trying to understand how to modify usrp_am_mw_rcv.py code:
I have eliminated everything inherent the volume and the audio and I have
modified the parameters in that way:
16 as usrp_decim
1 as chanfilt_decim

chan_filt_coeffs:
400e3 as passband cutoff
410e3 as stopband cutoff
1.0 as passband ripple
60 as stopband attenuation

Is it correct?
(To be more clear I have attached the .py modified file)
I think I'll still have some troubles with the GUI, but so far this is the
message error I got:

address@hidden:~/Desktop# ./usrp_am_mw_rcv_002.py -R B -f 13560000
Using RX d'board B: LF Rx
>>> gr_fir_ccf: using SSE

** (python:6937): WARNING **: IPP request failed with status 1030
FYI: No Powermate or Contour Knob found
Traceback (most recent call last):
  File "./usrp_am_mw_rcv_002.py", line 335, in <module>
    app = stdgui2.stdapp (wfm_rx_block, "USRP Broadcast AM MW RX modified")
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
36, in __init__
    wx.App.__init__ (self, redirect=False)
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7935, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7509, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
39, in OnInit
    frame = stdframe (self.top_block_maker, self.title, self._nstatus)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
86, in __init__
    self.top_block.start ()
  File "/usr/local/lib/python2.5/site-packages/gnuradio/gr/top_block.py", line
45, in start
    self._tb.start()
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py",
line 1461, in start
    return _gnuradio_swig_py_runtime.gr_top_block_sptr_start(*args)
RuntimeError: complex_to_mag(4): insufficient connected output ports (1 needed,
0 connected)




> The demodulated
> output is the 'envelope' of the signal, with an offset the depends on the
> percentage of modulation achieved. The RFID reader in Marco's case achieves
> 100% modulation, so the offset will be 50% of peak level, like this (fixed
> font spacing req'd):
>        ___     ___     ___
>       |   |   |   |   |   |
>  0 ___|   |___|   |___|   |___
>
> RFID tags typically achieve much lower modulation percentages, depending on
> coupling with the reader, like this:
>
>
>        ___     ___    ___
>       |   |___|   |__|   |
>  0 ___|                  |___
>
> In either case, you can threshold the data at some value less than the
> average peak to do a crude conversion from envelope to bits. In turn, you
> can examine the bitstream to locate bit transitions. The bit stream can then
> be decoded.

Here I have another question: at the moment I am trying to do that in Matlab
because of my so much inexperience in programming with Gnuradio. My problem is
to recognize the length of the bits... Once I have converted the I/Q samples in
magnitude, do I have to work in time domain or in the samples domain? (to be
more clear, counting the microseconds or counting the number of the samples to
identify a bit period?)


> There are better ways, e.g., using matched filters, to identify
> Manchester codes directly from the envelope data, but this should get you
> started.
> Paul Mathews
>
>
>

Thank you very much,

Marco

Attachment: usrp_am_mw_rcv_002.py
Description: Text Data


reply via email to

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