ADS-B Preamble Detector (adsb_preamble_detector_s)
ASD-B (Automatic Dependent Surveillance-Broadcast) preamble detection
Design
The ADS-B preamble is used to identify the beginning of a transmitted ADS-B data packet signal. The data packet is modulated using pulse position modulation and has a total duration of 120 microseconds for the ADS-B Mode S signal. The first 8 microseconds constitute the preamble. The remaining 112 microseconds are data symbols.
The structure of the ADS-B preamble is shown in Figure 212:.
Figure 212: ADS-B Mode S Preamble.
To detect the preamble, a pulse stream is first generated by comparing the input samples with the averaged input samples. A pulse is generated when the input sample is greater than the corresponding input average sample and zero when less than the input average sample. Then a comparator is used to determine a match in the pulse stream with the preamble array pattern shown below:
PREAMBLE_ARRAY = [ 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0]
Note: The preamble array is first scaled based on samples per symbol rate. At a minimum, 2 samples per symbol rate is required as shown in the array above.
When the comparator determines a match, the remaining input samples that constitute the 112 data bit symbols are passed to the component’s output port. The preamble symbols are not included in the output.
The input sample average is determined by the processing samples per symbol rate and duration of the preamble. The preamble is comprised of 8 symbols so at a minimum of 2 samples per symbol, the input average should represent an average of 16 samples. When the processing rate is 4 samples per symbol, the average should be 32 samples. This method of comparing input samples to average of samples removes dependency of signal amplitude and accommodates the dynamic range in receiving strong or weak signals without having to normalize using gain control.
The ADS-B detector component assumes that the phase and frequency offsets of the received input samples has been corrected through the use of the magnitude squared calculation.
Interface
<?xml version="1.0"?>
<!-- This is the spec file (OCS) for: ADSB_Preamble_Detector -->
<componentspec>
<port name="input_sample" protocol="short_timed_sample-prot" />
<port name="input_average" protocol="short_timed_sample-prot"/>
<port name="output" protocol="short_timed_sample-prot" producer="true"/>
<property name="samp_per_symbol" type="ulong" initial="true" default="4"
description="Number of input samples per ppm symbol"/>
<property name="num_of_symbols" type="ulong" initial="true" default="112"
description="Number of symbols of ADS-B data packet"/>
<property name="preamble" type="uShort" default='0xA140' initial="true"
description="Pattern of ADS-B ModeS preamble"/>
</componentspec>
Opcode Handling
Only sample opcodes are passed to the output port.
Properties
samp_per_symbol: Number of input samples per ppm symbol.Type:
ulongAccess:
Parameter:
FalseWritable:
FalseInitial:
TrueVolatile:
False
Default value:
4
num_of_symbols: Number of symbols of ADS-B data packet.Type:
ulongAccess:
Parameter:
FalseWritable:
FalseInitial:
TrueVolatile:
False
Default value:
112
preamble: Pattern of ADS-B ModeS preamble.Type:
ushortAccess:
Parameter:
FalseWritable:
FalseInitial:
TrueVolatile:
False
Default value:
0xA140
Ports
Inputs:
input_sample: Phase corrected input ADS-B samples.Protocol:
short_timed_sample-protOptional:
False
input_average: Average of input ADS-B samples. Average number of samples is dependent on samples per symbol.Protocol:
short_timed_sample-protOptional:
False
Outputs:
output: ADS-B data packet symbols with removed preamble.Protocol:
short_timed_sample-protOptional:
False
Implementations
adsb_preamble_detector_s(HDL)
Example Application
<?xml version="1.0"?>
<instance component="ocpi.core.file_read" name="file_read_1">
<property name="filename" value="input_samples.bin"/>
</instance>
<instance component="ocpi.core.file_read" name="file_read_2">
<property name="filename" value="input_average.bin"/>
</instance>
<connection>
<port instance="file_read_1" name="out"/>
<port instance="adsb_preamble_detector_s" name="input_sample"/>
</connection>
<connection>
<port instance="file_read_2" name="out"/>
<port instance="adsb_preamble_detector_s" name="input_average"/>
</connection>
<instance component="ocpi.examples.components.adsb_preamble_detector_s" connect="file_write">
<property name="samp_per_symbol" value='4'/>
</instance>
<instance component="ocpi.core.file_write">
<property name="filename" value="output.bin"/>
</instance>
</application>
Dependencies
The dependencies to other elements in OpenCPI are:
magnitude_squared_xs_s.hdl
moving_average_s.hdl
There is also a dependency on:
ieee.std_logic_1164
ieee.numeric_std
Limitations
Limitations of adsb_preamble_detector_s are:
The input samples to the ADS-B preamble detector must be phase and frequency offset corrected and the averaging of the input average samples must be averaged according to sample per symbol rate:
2 samples per symbol : average of 16 samples
4 samples per symbol : average of 32 samples
Testing
Tested platforms: None