Gnuradio DAB constellation using gr-dab and USRP

From Opendigitalradio
(Difference between revisions)
Jump to: navigation, search
(Installation)
 
(7 intermediate revisions by one user not shown)

Latest revision as of 11:20, 22 November 2011

Plot in live the constellation diagram of a received DAB signal using gr-dab and USRP.

(thumbnail)
DAB constellation (D-QPSK)

Contents

[edit] Pre-requisites

  • USRP or baseband recording from a file
    • WBX daughterboard or modified RFX400 (TVRX daughterboard has too much phase noise and cannot be used)
  • Linux PC with Gnuradio source (>=3.2)
  • gr-dab tools

[edit] Installation

  • Download source code of gnuradio and gr-dab tools
  • Patch peak detector of gnuradio source code with patch/not-applied-in-trunk of gr-dab
  • Patch "dab_rx_constellation.py" with patch below
  • Configure, compile and install gnuradio and then gr-dab tools.

[edit] Usage

(dab_rx_constellation.py -h)

Usage: dab_rx_constellation.py: [options] <filename>

Options:
  -h, --help            show this help message and exit
  -m DAB_MODE, --dab-mode=DAB_MODE
                        DAB mode [default=1]
  -F, --filter-input    Enable FFT filter at input
  -c, --correct-ffe     do fine frequency correction
  -u, --correct-ffe-usrp
                        do fine frequency correction by retuning the USRP
                        instead of in software
  -e, --equalize-magnitude
                        do magnitude equalization
  -s RESAMPLE_FIXED, --resample-fixed=RESAMPLE_FIXED
                        resample by a fixed factor (fractional interpolation)
  -S, --autocorrect-sample-rate
                        Estimate sample rate offset and resample (dynamic
                        fractional interpolation)
  -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC
                        select USRP Rx side A or B [default=A]
  -f FREQ, --freq=FREQ  set frequency to FREQ [default=227360000.0]
  -r SAMPLE_RATE, --sample-rate=SAMPLE_RATE
                        set sample rate to SAMPLE_RATE [default=2000000]
  -d DECIM, --decim=DECIM
                        set decimation rate to DECIM [default=32]
  -g RX_GAIN, --rx-gain=RX_GAIN
                        set receive gain in dB (default is midpoint)
  -v, --verbose         verbose output

Example for plotting the constellation of an ensemble on 223.936MHz:

dab_rx_constellation.py -R A -f 223936000 -c -e -S

Screenshot-usrp dab gui rx-1.png Screenshot-usrp dab gui rx-2.png

[edit] dab_rx_constellation.py patch

Index: dab_rx_constellation.py
===================================================================
--- dab_rx_constellation.py    (revision 203)
+++ dab_rx_constellation.py    (working copy)
@@ -91,8 +91,8 @@
        self.demod = dab.ofdm_demod(self.dab_params, self.rx_params, verbose=self.verbose)

        self.v2s = gr.vector_to_stream(gr.sizeof_gr_complex, self.dab_params.num_carriers)
-        self.scope = scopesink2.constellation_sink(self.panel, title="DAB constellation sink", sample_rate=self.dab_params.sample_rate, frame_decim=3)
-        self.scope.win.set_marker("plus")
+        self.scope = scopesink2.scope_sink_c(self.panel, title="DAB constellation sink", sample_rate=self.dab_params.sample_rate, frame_decim=3)
+        # self.scope.win.set_marker("plus")

        # self.sink = gr.null_sink(gr.sizeof_char*self.dab_params.num_carriers/4)
        self.trigsink = gr.null_sink(gr.sizeof_char)
Personal tools