0% found this document useful (0 votes)
223 views5 pages

Software Defined AIS Receiver Implementation Based On RTL-SDR and GNU Radio

The document discusses the implementation of a software defined Automatic Identification System (AIS) receiver using RTL-SDR and GNU Radio. AIS is a vessel tracking system that allows ships to automatically broadcast and receive identification, position and other data to nearby vessels and shore stations. The paper presents a method to receive and decode signals from AIS class A mobile stations using an RTL-SDR device with a VHF antenna connected to GNU Radio and an AIS decoder. This allows identification and tracking of AIS-equipped vessels in the reception area.

Uploaded by

Deepa Bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views5 pages

Software Defined AIS Receiver Implementation Based On RTL-SDR and GNU Radio

The document discusses the implementation of a software defined Automatic Identification System (AIS) receiver using RTL-SDR and GNU Radio. AIS is a vessel tracking system that allows ships to automatically broadcast and receive identification, position and other data to nearby vessels and shore stations. The paper presents a method to receive and decode signals from AIS class A mobile stations using an RTL-SDR device with a VHF antenna connected to GNU Radio and an AIS decoder. This allows identification and tracking of AIS-equipped vessels in the reception area.

Uploaded by

Deepa Bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

The 2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

Software Defined AIS Receiver Implementation


Based on RTL-SDR and GNU Radio
Badr Oumimoun Leila Nahiri Habib Idmouida
ERSC, EMI ERSC, EMI LRIT Laboratory, FSR
2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob) | 978-1-6654-7486-3/22/$31.00 ©2022 IEEE | DOI: 10.1109/APWiMob56856.2022.10014409

University Center for Research University Center for Research University Center for Research
in Space Technologies, EMI in Space Technologies, EMI in Space Technologies, EMI
Mohammed V University in Rabat, Mohammed V University in Rabat, Mohammed V University in Rabat,
Rabat, Morrocco Rabat, Morrocco Rabat, Morrocco
[email protected] [email protected] habib [email protected]

Adnane Addaim Zouhair Guennoun Khalid Minaoui


ERSC, EMI ERSC, EMI LRIT Laboratory, FSR
University Center for Research University Center for Research University Center for Research
in Space Technologies, EMI in Space Technologies, EMI in Space Technologies, EMI
Mohammed V University in Rabat, Mohammed V University in Rabat, Mohammed V University in Rabat,
Rabat, Morrocco Rabat, Morrocco Rabat, Morrocco
[email protected] [email protected] [email protected]

Abstract—Automatic Identification System (AIS) is a radio limitation of radars. The AIS transponder unit is meant to
data system on board ships with an objectif to exchange different automatically broadcast the vessel’s position, course and speed
kind of informations (static, dynamic and trip related informa- over ground as well as static and voyage related information
tions). This exchange could happen between ships themselves
or between ship and ground stations. while receiving these over VHF channels (161.975 MHz for class A mobile stations
informations, AIS devices on board or ashore present in the and 162.025 MHz for class B mobile stations) with 12.5W
reception area can automatically locate, identify and track AIS- transmission power [3]. This enables the mariners to be
equipped vessels. There are many types of AIS devices such aware of other ships long before visual contact is established,
as class A mobile stations (161.975 MHz) mandated for vessels allowing them to take required measures good time. Fig. 1
300GT and above, and class B mobile stations (162.025 MHz)
with limited functionality and primarily used for vessels such as shows the data types included in AIS transmission.
pleasure crafts. This paper presents the reception and decoding
of AIS class A mobile station signal using RTL-SDR device with
VHF antenna, GNU Radio and AIS decoder to decode the frame.

Index Terms—AIS, RTL-SDR, GNU Radio

I. I NTRODUCTION
AIS was required by the International Maritime Organiza-
tion (IMO) in 2004 [1]. Now, it is regarded as a safe naviga-
tional aid. It consists of exchanging data between ships, with
the objective of illustrating the position of nearby boats. Due Fig. 1. AIS data type
to The growth of AIS into a worldwide system that relies on a
satellite constellation- Satellite based Automatic Identification
II. BASIC THEORIES
System (S-AIS) [2] - since 2009. Sector participants would
have been in position to maintain a close check on maritime A. Self-Organized TDMA communication protocol of AIS
traffic wherever it takes place. And this will give birth to The AIS transponder consists of a GPS receiver that pro-
new services and innovations in the field that frequently go vides position, speed, and time information to a computer. The
beyond the confines of traditional maritime surveillance and computer then utilizes a VHF radio to share the information
decryption. with other AIS stations. This method is known as Self-
AIS stands for automatic identification system. It allows Organized Time Division Multiple Access (SO-TDMA) [4],
identification and tracking from other ships and from shore and it only requires one radio channel for transmission and
stations. A broadcast AIS improves safety and overcomes the reception.

978-1-6654-7486-3/22/$31.00 ©2022 IEEE


Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:26 UTC from IEEE Xplore. Restrictions apply.
The 2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

B. Time Slot method


The AIS transmitter uses a time slot of only few hundreds
seconds to send its own data. Meanwhile it reserves another
time slot for the next message. We notice that all AIS equipped
ships and shore stations go through the same procedure.
Fig. 3. Structural scheme of RTL-SDR
C. HDLC frame standards
Everything is regarded as a sequence of bits in a Bit
Oriented approach. HDLC is also a bit-oriented protocol. It E. RTL-SDR
is an abbreviation for High Data Link Control. This protocol RTL-SDR is a low-cost hardware device used for Software
is commonly used in AIS communications. The main change Defined Radio real-time communication experiments [6]. It
is that in AIS broadcasts, the address and control fields are can only receive and has a maximum bandwidth of about
omitted because the Data field covers these functions. 3MHz as well as a frequency range of 24MHz to 1766MHz.
D. NMEA message standards The structural layout of the employed RTL-SDR device is
shown in Fig. 3.
The systems employed in the navy are always evolving,
enhancing the user’s safety and comfort. The NMEA (Na- F. Software defined Radio
tional Marine Electronics Association) defines and controls
A software defined radio system is a radio signal receiving
the NMEA 0183 standard, which is a serial communication
and transmitting system in which the majority of the functions
interface for conveying a ”sentence” to one or more receivers.
are provided in the digital domain [5]. It enables reconfigura-
We mention that the NMEA 0183 frame protocol utilizes
bility by managing program functionality. It should also be
ASCII characters. In Fig. 2 we have the general structure of
able to adapt to the system’s dynamic behavior. It is a radio in
NMEA encapsulated sentence described in Table I .
which a part or all of the physical layer functions are software
defined.
TABLE I
NMEA SENTENCE DESCRIPTION
G. GNU Radio
To build and SDR receiver or transmitter, some appropriate
Field 0 In this field there is the sentence beginning delimiter
which is ”!” in the case of AIS transmissions. drivers and software are required. GNU Radio is one of these
Field 1 The 5-character address field is located here. The first freeware programs. It is a free software development toolkit
two letters indicate the current sentence’s source identification. includes different blocks for reception, transmission and signal
The final three characters refer to the format of the sentence.
Field 2 Contains the overall amount of packed sentences required for processing [7]. These blocks can be merged to form a more
the entire data. complex unit named a flowgraph. To mention that these blocks
Field 3 Contains the decimal number of the existing sentence are written in C++ or python, and it allows you to add
out of the whole number of sentences.
Field 4 For multi-sentence communications, This field refer
additional user-written blocks as extra blocks in order to utilize
to a decimal sequential identifier that differentiates them when it is necessary.
one packet message with one or more sentences from
another encapsulated message with the same phrase III. S OFTWARE D ESIGN
format string.
Field 5 Represents the data holding block. Its size is controlled A. System structural scheme
by the adress field. This field’s bits areall packaged The RTL-SDR device, which is in charge of receiving
into six-bit ASCII characters.
Field 6 Provides the decimal number of fill bits that were inserted signals, is attached to the laptop and setup using GNU Radio
at the end of the data if needed to form the final six-bit software. The RTL-SDR device receives the signal and for-
character. wards it to the GNU Radio scheme. The GNU Radio program
Field 7 We have the checksum delimiter, in order to separates
the NMEA phrase from the NMEA checksum field. It denotes also includes an NRZI decoding method. The bit stream that
the end of a sentence. results will be stored in a binary file. HDLC to AIS NMEA
Field 8 Carries the NMEA checksum, which is represented by two converter software will be used to convert the data into an AIS
hexadecimal characters. The checksum is computed
by performingan Exclusive-Or operation across all characters
NMEA message as shown in in Fig. 4. To open and decode
in the phrase between the start ”!” and stop ”*” delimiters. this message, the AIS decoder software will be employed.

Fig. 2. General structure of NMEA encapsulated sentence Fig. 4. Structural scheme of AIS receiver system

Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:26 UTC from IEEE Xplore. Restrictions apply.
The 2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

stated, various settings are required (sample rate = 1MHz


; central frequency = 162MHz ; decimation = 40).
• The rational resampler is a support block for the follow-
ing GMSK demodulator block. It prepares the signal’s
sample rate before applying GMSK demodulation on it.
• The signal demodulation procedure is provided by the
GMSK demodulation block. For current transmission,
an input signal with a specified sample rate is required
(9.6 KHz in AIS transmission case).

• The NRZI decoding process is referred to by the differ-


ential decoder and invert blocks. According to the NRZI
decoding standard, the Differential Decoder unit is the
Exclusive-Or operation for every pair of neighbor bits
in the stream. Meanwhile the Invert block performs bit
inversion on every bit in the stream.

IV. R ESULTS
Fig. 5. AIS receiver flowgraph Fig. 6 shows a binary signal representing the NRZI decoded
bit sequence. This figure refers to the bit sequence seen bellow:
“01010101010101010101010101111110001110000011011
B. GNU Radio flowgraph 01010100101110000110110101100100000100011001101110
In this work, we used the GNU Radio version 3.7.11 10101000011000110010010001011000001101000010011100
for UBUNTU. Fig. 5 depicts the implemented AIS receiver 00101100001011110011011101011100011110000010010110
flowgraph. Our software only processes data from AIS channel 011011101110011011101111110”
A (161.975 MHz). The flowgraph is divided into four key The preamble sequence (010101010101010101010101) is
sections: included in the message frame. Which appear at the start of the
• The first part is the source unit, which is the RTL-SDR data sentence. In addition, the data frame contains the frame
receiving device. payload as well as the HDLC start and stop flags (01111110),
• second part is the output unit, which is where we will which identify the start and end of the sentence. The bit stream
save data as files. is retained as a binary file and will be processed later by the
• The third part deals with signal processing, which in- AIS NMEA message generator Fig. 7.
cludes the demodulation process.
• The fourth and last section focuses on visualizing and
presenting the signal processing progress at each level.
• The first block is the RTL-SDR source. It is the process-
ing’s starting point, including some required parameters.
(gain = 40dB ; sample rate = 1MHz ; central frequency
= 161.991MHz).
• The output unit is represented by both of the file sink’s
blocks. The first one on the left is connected to the
source unit and acts as a recording device to preserve
the received data. The one on the right followed the
processing block in order to keep the processed data bit
stream in a binary file. Fig. 6. NRZI decoded frame
• frequency sink block aims to show the signal’s spectral
density.
• Correclate acces code Block looks for a set of bits that
fits the acces code and highlights them visually.
• Uchar to float block convert the binary stream into float
type value for further use in the time sink block.
• Time sink block shows the temporel representation of the
entering value stream.
• Frenquency FIR filter block removes the AIS channel
frequency with a sampling rate of 25KHz. As previously Fig. 7. AIS NMEA message generator

Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:26 UTC from IEEE Xplore. Restrictions apply.
The 2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

There are four options in the main menu: ”exit” to quit


TABLE II
the application, ”Chnl” to specify the AIS Channel A. The NMEA SENTENCE DESCRIPTION
”file” option enables you to provide the source file, and the
”gen” command starts the primary data processing step. The Bits Parameter Binary segment Decimal Decoded value
value form and meaning
operation begins with the source file being opened and all 1-6 Message 000001 1 Class A AIS
previously detected relevant data being copied to the buffer. type position report
This will come to an end when the HDLC stop flag sequence 7-8 Repeat 00 0 Default repeat
indicator settings
(01111110) is encountered. In the subsequent phases, all 9-38 Source 01101100100101 455426966 First 3 digits
unneeded bits will be deleted which include the HDLC start MMSI 01000011100101 refers to
and stop flag sequence and the preamble sequence. As well number 10 the MID
number (455-
as the last 16 bits preceding the stop flag sequence indicating Maldivia)
the received check sequence. The remaining data sequence 39- Navigation- 1100 12 power-driven
contains the appropriate AIS data bits. As the last binary 42 al status vessel pushing
ahead
alteration of the processed data, bit flipping is performed on
43- Rate of 000000000 0 0 degrees/min
the appropriate AIS data bits. It involves combining bits into 50 turn
groups of eight bits and then flipping them so that the first bit 51- Speed 0011001110 206 20.6 knots
in the group becomes the last one and vice versa. The resulting 60 over
ground
data sequence contains accurate AIS message data and may 61 Position 1 1 High ( 10m)
now be decrypted based on AIS message structure standards: accuracy
“000001000110110010010101000011100101101100000000 62- Longitude 1000010101010 139794578 56.445 degree
89 0011000100100 East
0000110011101100001010101000110001001001001101000 10
1011000110010001010011110100001011001111101011000 90- Latitude 0110100010110 54889610 53.456 degree
1000010010000011001101”. Table. II shows the decoded 116 001100100010 North
10
segments of the resulting data sequence with their meaning. 117- Course 011110100001 1953 195.3 degrees
In the AIS NMEA message, the data bits are grouped by 6 128 over
and each group is turned into a 6-bit ASCII symbol as shown ground
129- True 011001111 207 207 degrees
in Fig. 8. Table .III describes the fields of the final NMEA 137 heading
message generated. 138- Time 101011 43 43 second
143 stamp
144- Special 00 0 not available
145
maneuver
indicator
146- Spare 010 2 not used
148
149 RAIM- 0 0 RAIM not in
Flag use
Fig. 8. AIS NMEA message 150- Communic- 00100100000110 73933 Stack of
168 ation state 01101 communi-
cation state
specifications
V. DISCUSSION
The primary purpose of this study was to create open
maritime AIS on software defined radio, that will be capable
of using a wide range of SDR devices. It was built around TABLE III
NMEA SENTENCE FIELDS DESCRIPTION
an RTL-SDR device AIS receiver with various drawbacks for
channel A mobile stations. The system necessitates indepen- Fields 0;1 ”!AIVDM” indicates the beginning of a VDM format
dent recording of input signal with demodulation and initial sentence (received from AIS station).
Field 2 ”1” denotes the number of sentences required
NRZI decoding via the GNURadio receiver flowgraph, as well to accommodate all sent data.
as major binary data treatment via NMEA message creation Fiel 3 ”1” denotes the current sentence’s sequential number.
and minimum data decoding via the HDLC to AIS NMEA Field 4 It is the sequential identifier for multi sentence messages
Since it is one sentence message, this field is empty
converter. However, the entire decoding cycle takes only a few Field 5 ”A” refers to the receiving channel (161.975MHZ)
minutes, and also the price of this receiver seems to be much Field 6 Represents the received and processed AIS data.
lower than that of the specialized device. Also Developments It contains 168 bits of information.
Field 7 “0” means that 0 last bits in payload are fill-bits and
in ASIC, FPGA, SoC, open-source software have paved the therefore must be ignored.
way for modern marine electronics innovation. whether it’s Field 8;9 determines the end of the sentence and returns the
MFDs, depth sounders, thermal cameras, or AIS Transponders. hexadecimal NMEA checksum generated prior to
transmission to check for probable error appearance.
A significant amount of signal processing needed to encode
and decode AIS communications may now be specified in

Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:26 UTC from IEEE Xplore. Restrictions apply.
The 2022 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob)

software. This substitutes a major amount of the more typical


hardware-intensive analog solution, making it easier to create,
quicker, and more capable.
ACKNOWLEDGMENT
This work was carried out in the frame of the cooperation
between the Royal Centre for Space Research and Studies
(CRERS) and the Mohammed V University in Rabat (UM5R).
R EFERENCES
[1] A. Dembovskis, “Ais message extraction from overlapped ais signals for
sat-ais applications,” Ph.D. dissertation, Universität Bremen, 2015.
[2] R. Challamel, T. Calmettes, and C. N. Gigot, “A european hybrid high per-
formance satellite-ais system,” 2012 6th Advanced Satellite Multimedia
Systems Conference, ASMS 2012 and 12th Signal Processing for Space
Communications Workshop, SPSC 2012, pp. 246–252, 2012.
[3] E. N. de Souza, K. Boerder, and Matwin, “Technical characteristics
for an automatic identification system using time division multiple
access in the vhf maritime mobile frequency band m series mobile,
radiodetermination, amateur and related satellite services.” [Online].
Available: http://www.itu.int/ITU-R/go/patents/en
[4] H. Wu, C. Shi, B. Yu, H. Chen, and C. Gao, “Influence of bit-error
rate on the throughput of stdma ad-hoc network,” in 27th International
Conference on Distributed Computing Systems Workshops (ICDCSW’07).
IEEE, 2007, pp. 81–81.
[5] R. Krishnan, R. G. Babu, S. Kaviya, N. P. Kumar, C. Rahul, and S. S.
Raman, “Software defined radio (sdr) foundations, technology tradeoffs:
A survey,” IEEE International Conference on Power, Control, Signals and
Instrumentation Engineering, ICPCSI 2017, pp. 2677–2682, 6 2018.
[6] M. Mishra, A. Potnis, P. Dwivedy, and S. K. Meena, “Notice of removal:
Software defined radio based receivers using rtl - sdr: A review,” In-
ternational Conference on Recent Innovations in Signal Processing and
Embedded Systems, RISE 2017, vol. 2018-January, pp. 62–65, 6 2018.
[7] R. Anand, G. Xavier, V. Hariharan, N. Prasannan, R. Peter, and K. P.
Soman, “Gnu radio based control system,” Proceedings - 2012 Inter-
national Conference on Advances in Computing and Communications,
ICACC 2012, pp. 259–262, 2012.

Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:26 UTC from IEEE Xplore. Restrictions apply.

You might also like