ADS-B Example Using libiio

Note

This page was migrated from the ADI Wiki.

Overview

This page documents an airplane tracking system using Automatic Dependent Surveillance – Broadcast (ADS-B) signals. The technology allows aircraft to broadcast their positions via satellite navigation at 1090 MHz, using the AD-FMCOMMS3-EBZ RF transceiver board with MATLAB and Simulink.

Signal Characteristics

  • Transmit Frequency: 1090 MHz

  • Modulation: Pulse Position Modulation (PPM)

  • Data Rate: 1 Mbit/s

  • Message Length: 56 μsec or 112 μsec

  • Error Detection: 24-bit CRC checksum

Requirements

Software

MATLAB 2014b or later with:

For the Simulink version, additionally:

Hardware

MATLAB Implementation

The ad9361_ModeS.m script performs three main operations:

  1. Prepare the Mode S signal

  2. Calculate the earth zone according to user input

  3. Receive data via libiio and decode the ADS-B signals

The script supports two operating modes depending on how TX_LO_FREQ and RX_LO_FREQ are configured.

Pre-captured Data

In this mode, the transmitter and receiver use matching local oscillator frequencies for controlled testing. Any LO frequency supported by the board is acceptable.

[rssi1,rssi2]=ad9361_ModeS('ip','pre-captured',channel);

For example, to receive pre-captured data on Channel 2:

[rssi1,rssi2]=ad9361_ModeS('192.168.10.2','pre-captured',2);

At the end of the simulation, RSSI values for both channels are shown in the command window along with a result table listing decoded aircraft information:

https://media.githubusercontent.com/media/analogdevicesinc/documentation/main/docs/learning/ADS-B_airplane_tracking_tutorial/images/result_libiio.png

Live Data

In this mode, the receiver operates at 1090 MHz to capture real aircraft signals. TX_LO_FREQ must be set far from 1090 MHz to avoid interference. With a proper antenna, the system can decode signals from aircraft within approximately 80 miles.

ADS-B spectrum analyzer output
[rssi1,rssi2]=ad9361_ModeS('ip','live',channel);

The result table below shows decoded real-world aircraft information. With a proper antenna, this model is able to capture and decode aircraft signals in an 80 miles range with FMCOMMS3. Since there are two types of Mode S messages (56 usec or 112 usec), some messages contain more information than others.

https://media.githubusercontent.com/media/analogdevicesinc/documentation/main/docs/learning/ADS-B_airplane_tracking_tutorial/images/result_real.png

Support

For questions about FMCOMMS3, AD9361, or libiio, please ask on the EngineerZone. ADI Support

For questions about the ADS-B algorithm, please contact MathWorks. MathWorks Support