design of fpga based data parser for global positioning system

4
2020 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS) 159 978-1-7281-7109-8/20/$31.00 ©2020 IEEE Design of FPGA based Data Parser for Global Positioning System Zainul Abidin Dept. of Electrical Engineering Universitas Brawijaya Malang, Indonesia [email protected], Nauval Aryawiratama Dept. of Electrical Engineering Universitas Brawijaya Malang, Indonesia [email protected], Adharul Muttaqin Dept. of Electrical Engineering Universitas Brawijaya Malang, Indonesia [email protected] Effendi Dodi Arisandi Center for Rocket Technology National Institute of Aeronautics and Space of Indonesia Bogor, Indonesia [email protected] Corina Martineac Electrical Engineering Faculty Technical University of Cluj-Napoca Cluj-Napoca, Romania [email protected] Abstract—In this paper, design of data parser based on Field Programmable Gate Array (FPGA) for Global Positioning System (GPS) is presented. The FPGA system consists of Universal Asynchronous Receiver/Transmitter (UART) receiver, data parser, and UART transmitter. The data parser was designed using brute-force string matching algorithm. Simulation results show that GPS raw data of National Marine Electronics Association (NMEA) sentences were successfully parsed to $GPGGA sentence only. Finally, data of latitude, longitude, number of satellite, and altitude from $GPGGA sentence can be obtained and transmitted for further processing. Keywords— Global Positioning System, Field Programmable Gate Array, data parser, $GPGGA I. INTRODUCTION Global Positioning System (GPS) is a navigation system which is used to determine accurate real time information. GPS system is widely used for three dimensional navigation by sea, land, and airborne usage without limitation of area in the world and weather conditions. Satellites are working 24/7 by following their orbits at about 10,600 miles above surface of the earth. Each satellite sends real time information of high precision navigation data to the ground continuously. GPS receivers on the ground collect and process the navigation data for several applications. Since the GPS system are high precision, covered globally, real time, and not limited to weather conditions, it is usually used for searching, rescuing, management of traffic, land survey and mapping, vehicle scheduling, and other applications involved in navigation positioning [1, 2]. Raw data collected by GPS receiver are interpreted based on National Marine Electronics Association (NMEA) sentences, such as $GPRMC, $GPVTG, $GSGGA, $GPGGA, etc [3]. In an application like rocket payload, GPS is needed to track the rocket position. In this case, data contain information of lattitude, longitude, and altitude are needed. Additionally, number of satellite is also necessary to validate the position information. The $GPGGA described as Global Positioning System Fix Data contains the needed information. Therefore, data parsing is needed to extract $GPGGA. [1, 3]. Moving object requires fast data parsing, therefore, instead of microcontroller, Field Programmable Gate Array (FPGA) is considered as the solution. The FPGA can be used to design digital modules [4]. Furthermore, the FPGA is able to handle parallel processing and make faster data processing in real time [5-10]. Verilog Hardware Description Language (VHDL) is used to design and verify the implementation of digital system. The VHDL is employed to control input and output of the digital system simulation [11]. The VHDL gives an alternative approach to circuit designer to design circuits using text descriptions without depending on a schematics. In this case, the VHDL is equipped with the FPGA to parse raw data from GPS receiver. In this paper, design of data parser based on FPGA for GPS is presented. This is very useful for a moving object with multi GPS receivers. II. DATA PARSER DESIGN Position sensing system is designed using FPGA as illustrated in Fig. 1. GPS receiver is used as sensor that gives input to FPGA. This research is focused on the system inside FPGA. Since the GPS receiver communicates with another device using Universal Asynchronous Receiver/Transmitter (UART), the input is connected to UART receiver (Rx port). Data from the GPS is received through UART serial communication. Then, the data need to be parsed using brute-force string matching algorithm by data parser. The algorithm is useful for matching every 8 bits received data. UART Receiver Data Parser UART Transmitter Serial output GPS Receiver FPGA Fig. 1. Block diagram of position sensing system In this work, the data to be parsed is the part of the GPS data with the code of “$GPGGA”. The code contains some data, however, only 3 dimensional data, i.e. lattitude, longitude, altitude and number of satellite will be processed. UART Authorized licensed use limited to: Universitas Brawijaya. Downloaded on December 10,2020 at 06:51:09 UTC from IEEE Xplore. Restrictions apply.

Upload: others

Post on 08-May-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Design of FPGA based Data Parser for Global Positioning System

2020 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS)

159 978-1-7281-7109-8/20/$31.00 ©2020 IEEE

Design of FPGA based Data Parser for Global

Positioning System

Zainul Abidin

Dept. of Electrical Engineering

Universitas Brawijaya

Malang, Indonesia

[email protected],

Nauval Aryawiratama

Dept. of Electrical Engineering

Universitas Brawijaya

Malang, Indonesia

[email protected],

Adharul Muttaqin

Dept. of Electrical Engineering

Universitas Brawijaya

Malang, Indonesia

[email protected]

Effendi Dodi Arisandi

Center for Rocket Technology

National Institute of Aeronautics and Space of Indonesia

Bogor, Indonesia

[email protected]

Corina Martineac

Electrical Engineering Faculty

Technical University of Cluj-Napoca

Cluj-Napoca, Romania

[email protected]

Abstract—In this paper, design of data parser based on

Field Programmable Gate Array (FPGA) for Global

Positioning System (GPS) is presented. The FPGA system

consists of Universal Asynchronous Receiver/Transmitter

(UART) receiver, data parser, and UART transmitter. The

data parser was designed using brute-force string matching

algorithm. Simulation results show that GPS raw data of

National Marine Electronics Association (NMEA) sentences

were successfully parsed to $GPGGA sentence only. Finally,

data of latitude, longitude, number of satellite, and altitude

from $GPGGA sentence can be obtained and transmitted for

further processing.

Keywords— Global Positioning System, Field Programmable

Gate Array, data parser, $GPGGA

I. INTRODUCTION

Global Positioning System (GPS) is a navigation system which is used to determine accurate real time information. GPS system is widely used for three dimensional navigation by sea, land, and airborne usage without limitation of area in the world and weather conditions. Satellites are working 24/7 by following their orbits at about 10,600 miles above surface of the earth. Each satellite sends real time information of high precision navigation data to the ground continuously. GPS receivers on the ground collect and process the navigation data for several applications. Since the GPS system are high precision, covered globally, real time, and not limited to weather conditions, it is usually used for searching, rescuing, management of traffic, land survey and mapping, vehicle scheduling, and other applications involved in navigation positioning [1, 2].

Raw data collected by GPS receiver are interpreted based on National Marine Electronics Association (NMEA) sentences, such as $GPRMC, $GPVTG, $GSGGA, $GPGGA, etc [3]. In an application like rocket payload, GPS is needed to track the rocket position. In this case, data contain information of lattitude, longitude, and altitude are needed. Additionally, number of satellite is also necessary to validate the position information. The $GPGGA described as Global Positioning System Fix Data contains the needed information. Therefore, data parsing is needed to extract $GPGGA. [1, 3].

Moving object requires fast data parsing, therefore, instead of microcontroller, Field Programmable Gate Array (FPGA) is considered as the solution. The FPGA can be used

to design digital modules [4]. Furthermore, the FPGA is able to handle parallel processing and make faster data processing in real time [5-10]. Verilog Hardware Description Language (VHDL) is used to design and verify the implementation of digital system. The VHDL is employed to control input and output of the digital system simulation [11]. The VHDL gives an alternative approach to circuit designer to design circuits using text descriptions without depending on a schematics. In this case, the VHDL is equipped with the FPGA to parse raw data from GPS receiver. In this paper, design of data parser based on FPGA for GPS is presented. This is very useful for a moving object with multi GPS receivers.

II. DATA PARSER DESIGN

Position sensing system is designed using FPGA as illustrated in Fig. 1. GPS receiver is used as sensor that gives input to FPGA. This research is focused on the system inside FPGA. Since the GPS receiver communicates with another device using Universal Asynchronous Receiver/Transmitter (UART), the input is connected to UART receiver (Rx port). Data from the GPS is received through UART serial communication. Then, the data need to be parsed using brute-force string matching algorithm by data parser. The algorithm is useful for matching every 8 bits received data.

UART Receiver Data Parser

UART

TransmitterSerial output

GPS Receiver

FPGA

Fig. 1. Block diagram of position sensing system

In this work, the data to be parsed is the part of the GPS data with the code of “$GPGGA”. The code contains some data, however, only 3 dimensional data, i.e. lattitude, longitude, altitude and number of satellite will be processed. UART

Authorized licensed use limited to: Universitas Brawijaya. Downloaded on December 10,2020 at 06:51:09 UTC from IEEE Xplore. Restrictions apply.

Page 2: Design of FPGA based Data Parser for Global Positioning System

2020 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS)

160

transmitter is also necessary in order to be connected with other devices for further data processing, such as display in LCD, compare with other GPS receivers, and send to microcontroller or mini computer. In this work, both UART receiver and transmitter are not discussed in detail because the UART blocks are widely known.

For more detail, data parsing using brute-force string matching algorithm is illustrated in Fig. 2 [12]. Brute-force is one of the direct approaches to solving a problem, which is generally done based on the definition and statement of a problem from the concepts involved. This algorithm is the simplest and easiest string matching algorithm to implement. Although many algorithms are smarter and more efficient, this approach cannot be ignored for several reasons. First, unlike other strategies, brute-force is very applicable to a wide and varied problem area. Second, for some other important problems, such as sorting, searching, and matrix multiplication, we can approach this algorithm. Third, this algorithm is quite enough when compared to other algorithms that are more efficient with acceptable speed. Fourth, although it is relatively inefficient, this brute-force algorithm is still able to solve problems of small size. Finally, the brute-force algorithm can also be useful for educational purposes because it is very basic [12].

The way this algorithm works is by trying each pattern position (the word to be matched) which is symbolized by m against the text symbolized by n, then the process of matching each character and text in that position from left to right. If a match is found later, slide the pattern to the right once and continue matching characters starting from the first character of the pattern. Keep in mind that the last position that can be the prefix of the pattern is at n - m (the position index of the text is from 0 to n -1). Pseudocode for this algorithm is as follows.

for i 0 to n – m do

j 0

while j < m and P[j] = T[i+j]do

jj+1

if j = m return i

return -1

From the pseudocode, it can be seen that this algorithm requires two kinds of inputs, namely the input character text array and the input array pattern, each of which has a data width of n - 1 and m -1. In the course of the execution there were two repetitions. In the deepest loop there is a condition that compares the contents of the array of pattern with the array of text.

Based on Fig. 2, a state diagram is important to guarantee the data parsing process runs systematically. Fig. 3 shows the state diagram of the data parsing. Transition from initial state to destination stage is triggered by character detection. If there is mismatch, then the process will return to “Dollar” state. For more detail, the transition process is explained by Table I. The data from GPS will be sorted and the output data contains only latitude, longitude, altitude, and number of satellite tracked by the GPS.

Fig. 2. GPGGA parsing scheme

Fig. 3. State diagram of data parsing

TABLE I. STATE TABLE

Initial Stage Destination

State

Transition

Trigger

Meaning

Dollar DetG Rx_Byte == 0x24 Detect character “$”

DetG DetP Rx_Byte == 0x47 Detect character “G”

DetP DetG2 Rx_Byte == 0x50 Detect character “P”

DetG2 DetG3 Rx_Byte == 0x47 Detect character “G”

DetG3 DetA Rx_Byte == 0x47 Detect character “G”

DetA DetComma Rx_Byte == 0x41 Detect character “A”

DetComma ParsingData Rx_Byte == 0x2C Detect character “,’

ParsingData Dollar Rx_Byte == 0x0A Detect New Line

III. SIMULATION RESULT

System was designed and implemented to board of FPGA DE0-Nano Altera Cyclone IV EP4CE22F17C6N. Performance of the system is presented by simulation results. The simulation was done by giving raw GPS data as input of the FPGA. The simulations are carried out for the UART receiver entity, the UART transmitter entity and the FPGA system.

A. UART Receiver Entity

Baud rate of 9600 bps was used in the simulation of UART receiver entity. The UART receiver entity was tested by giving a character of “7”. In ASCII code, character “7” has hexadecimal code of 0x37 (0b00110111). The simulation

Authorized licensed use limited to: Universitas Brawijaya. Downloaded on December 10,2020 at 06:51:09 UTC from IEEE Xplore. Restrictions apply.

Page 3: Design of FPGA based Data Parser for Global Positioning System

2020 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS)

161

result is shown in Fig. 4. The index counts 8 times, from 0 to 7, which shows the number of bits of data entered. In this simulation the input data is given from the MSB to the LSB. The output of this entity is in the form of data with a width of 8 bits. It can be seen that the output of this entity is 0b00110111 which means the process of receiving serial data has been successfully carried out in about 990.5 μs for 1 byte.

Fig. 4. Simulation result of UART receiver entity

B. UART Transmitter Entity

UART transmitter simulation was done by providing input in the form of character “9”, which has ASCII code of 0x39 (0b00111001). The simulation result shown in Fig. 5 proves it has succeeded in producing output with a falling edge which indicates the start bit. Then the LSB will be sent first continue until the MSB. Furthermore, the last is the tx signal will experience a rising edge which indicates the stop bit of UART communication. The process takes time about 1.042 ms.

Fig. 5. Simulation result of UART transmitter entity

C. FPGA System

Performance of the data parser is confirmed by giving raw data of GPS receiver. The raw data contains NMEA sentences which define data types. Each data type is

followed with unique NMEA standard numbers as shown in Fig. 6. The numbers indicate certain informations. This parsing system was focused on NMEA sentence of GGA. So that, the data will be sorted and the $GPGGA sentence data only will be taken. According to Fig. 6, description of the $GPGGA sentence data is listed in Table II. The simulation has been successfully carried out and the result can be seen in Figs. 7 and 8. Figure 7 shows the change in state for the detection process. State begins with the detection of the character $ (Dollar). After the character has been found, it will proceed to the next detection process until it has fully detected $GPGGA. The parsing process has been successfully carried out in about 191.1 ms from the entry of the initial raw data marked by a done signal which will become high. The simulation result in Fig. 8 show that the tx signal remains idle. It means that data will not be sent. By zooming the Fig. 8, Fig. 9 proves that when it reaches data of latitude, longitude, number of satellite, and altitude, the tx signal is activated and send the data.

Fig. 6. Raw data of GPS receiver

TABLE II. NMEA $GPGGA SENTENCE DATA DESCRIPTION

No Description

1 Latitude 07 deg 56.89465' S

2 Longitude 112 deg 38.31502' E

3 Number of satellites being tracked is 4

4 Altitude, above mean sea level is 469 meters

Fig. 7. Parsing states

Authorized licensed use limited to: Universitas Brawijaya. Downloaded on December 10,2020 at 06:51:09 UTC from IEEE Xplore. Restrictions apply.

Page 4: Design of FPGA based Data Parser for Global Positioning System

2020 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS)

162

Fig. 8. FPGA system simulation result

Fig. 9. FPGA output

IV. CONCLUSION

In this paper, design of FPGA data parser was presented. Simulation results show that the FPGA system works well by receiving the raw GPS data and parsing into data of latitude, longitude, number of satellite, and altitude. Furthermore, the output of the FPGA system confirmed that the data can be send to next process using the designed UART transmitter.

For more complex applications, multiple GPS receivers must be used to increase the accuracy and minimize error. Development of the FPGA parser system for multiple GPS with synchronous input will be developed in the future work. Furthermore, performance between actual implementations of FPGA based and other data parser system, such as microcontroller based data parser system, will be compared.

ACKNOWLEDGMENT

Authors would like to thank Faculty of Engineering, Universitas Brawijaya and Lembaga Penelitian dan Pengabdian Masyarakat Universitas Brawijaya (LPPM - UB) through Hibah Peneliti Pemula (Award No. 436.5/UN10.C10/PN/2020).

REFERENCES

[1] H. R. Radi, L. W. B. Vivian, M. N. S. Zainudin., M. M. Ismail,

“FPGA-based global positioning system,” International Journal of Electrical & Computer Sciences IJECS-IJENS, vol. 12, no. 5, pp. 11-14, October 2012.

[2] F. S. Larosa, “Design, simulation, implementation and testing of search and tracking modules for a FPGA-based GPS receiver,” 2019 X Southern Conference on Programmable Logic (SPL), April 2019, pp. 33–38, 10.1109/SPL.2019.8714299.

[3] A. A. B. Ariffin, N. H. A. Aziz, K. A. Othman, “Implementation of GPS for Location Tracking,” 2011 IEEE Control and System Graduate Research Colloquium, June 2011, pp. 77–81, 10.1109/ICSGRC.2011.5991833.

[4] A. Muttaqin, Z. Abidin, R. A. Setyawan, I. Az Zahra, “Development of advanced automated test equipment for digital system by using FPGA,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 15, no. 2, pp. 661-670, August 2019, 10.11591/ijeecs.v15.i2.pp661-670.

[5] S. Palnitkar, “Verilog HDL: A guide to Digital Design and Synthesis, Second Edition”, Prentice Hall PTR, USA, 2003.

[6] I. M. Popescu, B. Popa, R. Prejbeanu, I. Cosmin, "Evaluation of parallel and real-time processing performance for some vibration signals using FPGA technology," 2018 19th International Carpathian Control Conference (ICCC), Szilvasvarad, pp. 365-370, 2018.

[7] Z. Kokosinski and B. Malus, "FPGA implementations of a parallel associative processor with multi–comparand multi–search operations," International Symposium on Parallel and Distributed Computing, Krakow, pp. 444-448, 2008.

[8] N. Fujita, R. Kobayashi, Y. Yamaguchi and T. Boku, "Parallel processing on FPGA combining computation and communication in openCL programming," IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), Rio de Janeiro, pp. 479-488, 2019.

[9] F. A. Alquaied, A. I. Almudaifer, M. A. AlShaya, "A novel high-speed parallel sorting algorithm based on FPGA," Saudi International Electronics, Communications and Photonics Conference (SIECPC), Riyadh, pp. 1-4, 2011.

[10] W. Chen, S. Ding, Z. Chai, D. He,W. Zhang, G. Zhang, Q Peng, W. Luo, "FPGA-based parallel implementation of SURF algorithm," IEEE 22nd International Conference on Parallel and Distributed Systems, Wuhan, pp. 308-315, 2016.

[11] Z. Zhou, Xu Xin, S. Zhaolin, L. Nan, "FPGA based high-speed parallel transmission system design and implementation," International Conference on Intelligent System Design and Engineering Application, Changsha, pp. 767-770, 2010.

[12] A. Levitin, “Introduction to the design and analysis of algorithm 3rd edition, ” New Jersey: Pearson Education, Inc, 2012.

Authorized licensed use limited to: Universitas Brawijaya. Downloaded on December 10,2020 at 06:51:09 UTC from IEEE Xplore. Restrictions apply.