RE: Re: Complex samples format with ASK

Hello,

thank you very much for answering me.

Selon Paul M. [email protected]:

  1. Find the magnitude (or even power since it saves a sqrt) of the
    before

Manchester code - Wikipedia
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:

root@localhost:~/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
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)

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 M.

Thank you very much,

Marco

Hello Marco

(1) You use an opt. filter to get the passband from 400kHz to 410kHz.
your message is on frequency 4** kHz?

(2) After I run your code, I got different error (GUI error)
on
File “usrp_am_mw_rcv_002.py”, line 309, in set_freq
self.update_status_bar()
File “usrp_am_mw_rcv_002.py”, line 321, in update_status_bar
msg = “Volume:%r Setting:%s” % (self.vol, self.state)

  if I remark this two line. give up update_status_bar() then,
  the error is the same as yours.

  I guess, the problem is in
  self.connect (self.u, self.chan_filt, self.am_demod) <-
  Do you try to connect some sink block after self.am_demo

such like scopesink.scope_sink_f

(3)
Matlab? I didn’t try my USRP on Matlab.
Q: work in time domain or in the samples domain?
The code is on time domain, isn’t.

(4)
In Paul says:

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

I prefer to use matched filter, but i also got another different
question.
How do i know, the package start. hmm… I need more and more study!!

CJay

Marco Bottino wrote:

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:

root@localhost:~/Desktop# ./usrp_am_mw_rcv_002.py -R B -f 13560000
Using RX d’board B: LF Rx

gr_fir_ccf: using SSE


“/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)

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 M.

Thank you very much,

Marco