Skip to content
/ dvbs2 Public

DVB-S2 SDR Transceiver powerded by AFF3CT & StreamPU.

License

Notifications You must be signed in to change notification settings

aff3ct/dvbs2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DVB-S2 SDR Transceiver

Machines installation

  • Ubuntu 16.04, 18.04 and 20.04 have been tested
  • Needs Git, CMake and hwloc:
sudo apt install git cmake hwloc libhwloc-dev

UHD Installation

UHD is the software library that is needed for controlling the USRPs. Follow the instructions in "Install Linux" part at Ettus N310 Building.

When asked to checkout a specific tag for UHD, use the following: v3.14.1.1-rc1 When asked to checkout a specific tag for GNU radio, use the following: 3.7.13.4

To update the USRP's FPGA images to switch between 1Gb / 10Gb / Dual 10Gb Ethernet, follow the instructions at Ettus N310 Getting Started, "Updating the FPGA Image".

Finally, add the following in ~/.bashrc or /etc/profile:

export UHD_LOG_FILE="./usrp.log"

Ethernet configuration

Connect the USRP on a 10Gb ports. Then configure the IP address and MTU.

  • Example file for 16.04 Desktop : /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth2
iface eth2 inet static
    address 192.168.20.1/24
    mtu 8000
  • Example file for 18.04 Server: /etc/netplan/50-cloud-init.yaml
network:
    ethernets:
        enp0s31f6:
            addresses: [192.168.222.59/24]
            gateway4: 192.168.222.254
            nameservers:
              addresses: [192.168.222.8]
        enp79s0f0:
            addresses: [192.168.20.1/24]
            gateway4: 0.0.0.0
            mtu: 8000
        enp79s0f1:
            addresses: [192.168.10.1/24]
            gateway4: 0.0.0.0
            mtu: 8000
    version: 2

Benchmark

To validate the installation, you may run the following benchmark:

/usr/local/lib/uhd/examples/benchmark_rate  \
  --args "type=n3xx,addr=192.168.20.2,master_clock_rate=125e6" \
  --duration 60 \
  --channels "0" \
  --rx_rate 31.25e6 \
  --rx_subdev "A:0" \
  --tx_rate 31.25e6 \
  --tx_subdev "A:0"

Compile & Install

Get the AFF3CT library:

git submodule update --init --recursive

Linux/MacOS/MinGW

Generate the Makefile and compile the DVB-S2 project:

mkdir build
cd build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -funroll-loops -march=native" -DSPU_LINK_HWLOC=ON
make -j20

If you don't want to compile the code with USRPs you can add the -DDVBS2_LINK_UHD=OFF option:

cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -funroll-loops -march=native" -DSPU_LINK_HWLOC=ON -DDVBS2_LINK_UHD=OFF

Binaries

The source code of this project is in the src/ directory:

  • src/mains/TX: source code of the transmitter,
  • src/mains/TX_VAR: source code of the transmitter with variable SNRs,
  • src/mains/CH: source code of the channel (useful to add noise after TX when running without a real radio),
  • src/mains/RX: source code of the receiver,
  • src/mains/TX_RX: source code of the Monte-Carlo simulation with the transmitter and the receiver,
  • src/mains/TX_RX_BB: source code of the Monte-Carlo simulation without filters and synchro,
  • src/common: source code common to the transmitter and the receiver.

The compiled binaries are:

  • build/bin/dvbs2_tx: the transmitter,
  • build/bin/dvbs2_tx_var: the transmitter with variable SNRs,
  • build/bin/dvbs2_ch: executable that takes the TX IQs file and adds noise to it (it produces a noisy file that can be consumed by the RX without real radio),
  • build/bin/dvbs2_rx: the receiver (alias of dvbs2_rx_sched),
  • build/bin/dvbs2_rx8: the receiver with handmade 8-stage pipeline,
  • build/bin/dvbs2_rx13: the receiver with handmade 13-stage pipeline,
  • build/bin/dvbs2_rx_sched: the receiver with automatic pipeline scheduling,
  • build/bin/dvbs2_rx_dump: dumps the symbols received by the RX in the dump.bin file,
  • build/bin/dvbs2_tx_rx: the Monte-Carlo simulation of the transmitter and the receiver,
  • build/bin/dvbs2_tx_rx_bb: the Monte-Carlo simulation of the transmitter and the receiver without filters and synchro.

Run

Simulation

Some refs with according command line instructions can be found in the refs/ directory for build/bin/dvbs2_tx_rx and build/bin/dvbs2_tx_rx_bb.

Testing TX and RX Separately

Run the transmitter (TX) to generate symbols (= IQs) without noise (here the TX stops after 10 seconds, see the --tx-time-limit 10000 option):

./bin/dvbs2_tx --sim-stats --rad-type USER_BIN --rad-tx-file-path out_tx.bin -F 8 --src-type USER --src-path ../conf/src/K_14232.src --mod-cod QPSK-S_8/9 --tx-time-limit 10000

Add AWGN noise on the previously emitted IQs (-m controls the noise level Eb/N0 in dB):

./bin/dvbs2_ch --sim-stats --rad-type USER_BIN --rad-rx-file-path out_tx.bin --rad-tx-file-path out_tx_noisy.bin --rad-rx-no-loop -F 8 --mod-cod QPSK-S_8/9 -m 4.0

Run the receiver (RX) on the noisy IQs (without waiting and learning phases, see the --no-wl-phases option):

./bin/dvbs2_rx --sim-stats --src-type USER --src-path ../conf/src/K_14232.src --rad-type USER_BIN --rad-rx-file-path out_tx_noisy.bin -F 8 --mod-cod QPSK-S_8/9 --dec-implem NMS --dec-ite 10 --dec-simd INTER --snk-path /dev/null --rad-rx-no-loop --no-wl-phases

Note: In the previous command lines, the -F 8 option controls the inter-frame level (= the number of frames processed during each task execution). The latest will maximize the throughput if -F is a multiple of the number of 32-bit floating-point elements that can be contained in a SIMD register (for instance: in SSE/NEON optimal -F is equal to 4, in AVX optimal -F is equal to 8, and in AVX-512 optimal -F is equal to 16). Be aware that increasing -F will have a negative impact on the latency and on the memory footprint of the system (this is linear with the -F value).

Radio

BER / FER

Here are example command lines for RX and TX, considering QPSK-S_8/9:

./bin/dvbs2_rx --sim-stats --rad-threaded --rad-rx-subdev-spec "A:0" --rad-rx-rate 30e6 --rad-rx-freq 2360e6 --rad-rx-gain 20 -F 16 --src-type USER --src-path ../conf/src/K_14232.src --mod-cod QPSK-S_8/9 --dec-implem NMS --dec-ite 10 --dec-simd INTER
./bin/dvbs2_tx --sim-stats --rad-threaded --rad-tx-subdev-spec "A:0" --rad-tx-rate 30e6 --rad-tx-freq 2360e6 --rad-tx-gain 30 -F  8 --src-type USER --src-path ../conf/src/K_14232.src --mod-cod QPSK-S_8/9

Video Streaming

An convenient setup is to use a first computer for TX, a second computer for RX, and a third for displaying the video.

  • Convert a video to TS format (transport stream) using VLC for example
  • Stream that video from TX computer:
./bin/dvbs2_tx --sim-stats --rad-threaded --rad-tx-subdev-spec "A:0" --rad-tx-rate 30e6 --rad-tx-freq 2360e6 --rad-tx-gain 30 -F  8 --src-type USER_BIN --src-path /path/to/input/ts/video.ts --mod-cod QPSK-S_8/9
  • Create a fifo on RX computer mkfifo output_stream_fifo.ts
  • Receive the video and write into this fifo
./bin/dvbs2_rx --sim-stats --rad-threaded --rad-rx-subdev-spec "A:0" --rad-rx-rate 30e6 --rad-rx-freq 2360e6 --rad-rx-gain 20 -F 16 --mod-cod QPSK-S_8/9 --dec-implem NMS --dec-ite 10 --dec-simd INTER --snk-path output_stream_fifo.ts
  • On the third computer, connected by ssh to the RX computer, stream and display the video via ssh:
 ssh <rx ip address>  "cat /path/to/fifo/output_stream_fifo.ts" | cvlc -

About

DVB-S2 SDR Transceiver powerded by AFF3CT & StreamPU.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages