Airplane Tracking Using ADS-B Signals
This example shows you how to track planes by processing Automatic Dependent Surveillance-Broadcast (ADS-B) signals using Simulink® and Communications System Toolbox™. You can either use captured and saved signals or receive signals in real time using the Communications System Toolbox Support Package for RTL-SDR Radio. The example can show the tracked planes on a map, if you have the Mapping Toolbox™.
Required Hardware and Software
To run this example using captured signals, you need the following software:
To receive signals in real time, you also need the following hardware:
- RTL-SDR radio
and the following software
For a full list of Communications System Toolbox supported SDR platforms, refer to Supported Hardware section of Software Defined Radio (SDR) discovery page.
For an introduction on the Mode-S signaling scheme and ADS-B technology for tracking aircraft, refer to the Airplane Tracking Using MATLAB example.
The following block diagram summarizes the receiver code structure. The processing has four main parts: Signal Source, Physical Layer, Message Parser, and Data Viewer.
This example can use two signal sources:
- ''Captured Signal'': Over-the-air signals written to a file and sourced using a baseband file reader block at 2.4 Msps
- ''RTL-SDR Radio'': RTL-SDR radio at 2.4 Msps
The signal source is configured to provide enough samples to contain a maximum of 180 complete extended squitter messages. Since an extended squitter message is 288 samples long, set SamplesPerFrame property of the signal source object to 51840 samples, which is a 180 times 288. The rest of the algorithm searches for Mode-S packets in this frame of data and outputs all correctly identified packets. This type of processing is defined as batch processing. An alternative approach is to process one extended squitter message at a time. This single packet processing approach incurs 88 times more overhead than the batch processing, while it has 88 times less delay. Since the ADS-B receiver is delay tolerant, we chose to increase the speed of execution over latency.
The baseband samples received from the signal source are processed by the physical (PHY) layer to produce packets that contain the PHY layer header information and the raw message bits. The following diagram shows the physical layer structure.
The RTL-SDR radio is capable of using a sampling rate from 200 KHz up to 2.8 MHz. This example uses a sampling rate of 2.4 MHz. This sampling rate is chosen because it is above the Nyquist rate and also very close to the maximum practical sampling rate of the device.
The baseband signal is first interpolated by a factor of 5 to obtain a practical sampling rate of 12 MHz. Given the data rate is 1 Mbit/s, this corresponds to 12 samples per symbol. The rest of the receiver works on the magnitude of the interpolated complex values.
The packet synchronizer works on subframes of data that is equivalent to two extended squitter packets, i.e. 1440 samples at 12 MHz or 120 micro seconds. This subframe length ensures that a whole extended squitter packet can be found in the subframe. Packet synchronizer first correlates the received signal with the 8 microsecond preamble and find the peak value. Then, it validates the found synchronization point by checking if it confirms to the preamble sequence, [1 0 0 0 0 0 1 0 1 0 0 0 0 0 0], where a '1' represents a high value and a '0' represents a low value.
The Mode-S PPM modulation scheme defines two symbols. Each symbol has two chips, where one has a high value and the other has a low value. If the first chip is high followed by low chip, this corresponds to the symbol being a 1. Alternatively, if the first chip is low followed by high chip, then the symbol is 0. The bit parser demodulates the received chips and creates a binary message. The binary message is validated using a CRC checker. The output of bit parser is a vector of Mode-S physical layer header packets that contains the following fields:
- RawBits: Raw message bits
- CRCError: FALSE if CRC checks, TRUE if CRC fails
- Time: Time of reception in seconds from start of receiver
- DF: Downlink format (packet type)
- CA: Capability
The message parser processes the raw bits based on the packet type as described in [ 2 ]. This example can parse short squitter packets and extended squitter packets that contain airborne velocity, identification, and airborne position data.
The data viewer shows the received messages on a graphical user interface (GUI). For each packet type, the number of detected packets, the number of correctly decoded packets and the packet error rate (PER) is shown. As data is captured, the application lists information decoded from these messages in a tabular form.
You can also launch the map and start text file logging using the GUI.
- Start Data Logging - Save the captured data in a TXT file. You can use the saved data for later for post processing.
- Launch Map - Launch the map where the tracked flights can be viewed. NOTE: You must have a valid license for the Mapping Toolbox if you want to use this feature.
The following figures illustrate how the application tracks and lists flight details and displays them on a map.
- International Civil Aviation Organization, Annex 10, Volume 4. Surveillance and Collision Avoidance Systems.
- Technical Provisions For Mode S Services and Extended Squitter (Doc 9871)