Handheld Navigation System Implementation on FPGA 651747/  · Handheld Navigation System

  • View
    212

  • Download
    0

Embed Size (px)

Text of Handheld Navigation System Implementation on FPGA 651747/  · Handheld Navigation System

  • Handheld Navigation System Implementation on FPGA Board

    Thamer Salman Ali

    THESIS WORK2011 ELECTRICAL ENGINEERING

  • Handheld Navigation System Implementation on FPGA Board

    Thamer Salman Ali

    This thesis work is performed at Jnkping University within the subject area of Electrical Engineering. The work is part of the Masters Degree program with the Specialization in Embedded Systems. The author is responsible for the given opinions, conclusions and results. Supervisor: Alf Johansson Examiner: Professor Shashi Kumar Credit points: 30 points (D-level)

  • Abstract

    Abstract

    The widespread use of navigation devices is increasing rapidly. This all becomes possible mainly due to increased development of hardware, for instance increased computing power (e.g. microcontroller, GPS, Compass) and software. The Handheld Navigation (HNS) is one of the navigation techniques. It is used in different fields. Just like any-other means of navigation, it is used to determine the position and direction of the user accurately and find the shortest track with precision. Global Positioning System (GPS) is a technology that can be used to determine position coordinates, time, speed and course over ground. The electronic compass is a traditional device that is used to determine the current directional angle of the user. The goal of the thesis is to compare the results of directions angle and distance from two designs (directions angle and distance are calculated based upon information from GPS receiver and the other directions angle and distance are calculated based upon information from GPS receiver and Compass). In the thesis, we have developed dual designs to achieve the goal of the thesis. The first design uses the GPS receiver coordinates to calculate the direction angle and distance, the second design integrates the GPS positioning and the digital compass, to calculate the direction and distance of Handheld Navigation user. Each device communicates with the microcontroller through the interfaces. As there are two designs. Directional results are obtained from each design. Then these results are compared with each other. After comparison, the more accurate result is chosen for the user. A Handheld Navigation PCB board design has been made. In addition SD card and LCD display are used. Both designs have been carried out on Altera Cyclone II FPGAs. The result of the prototyping shows, that the best design for Handheld Navigation System is the design that consists of GPS and Compass because the compass sensing is stable depending on the magnetic north while the previous design depends on calculated direction on movement and then also on the speed of movement.

    i

  • Sammanfattning

    Sammanfattning Handhllna navigationssystem fr satellitnavigering, GPS, har blivit allt vanligare. Vid navigation mste man knna till riktningen till mlet men ocks i vilken riktning navigations-utrustningen pekar eftersom detta utgr referens fr att berkna korrigeringar. Om navigationsutrustningen rr sig med en viss hastighet s kan rrelseriktningen berknas frn ett antal p varandra fljande positions- koordinater. Denna metod fungerar bra i t.ex. ett fordon som rr sig med en rimlig hastighet. Om systemet skall anvndas av en person som gr s uppstr problem. Personen kan stanna upp och vrida runt i olika riktningar. D finns d inga bra tidigare koordinater fr att berkna rrelseriktningen dvs. hur navigationssystemet pekar. Nr personen sedan rr sig i en viss riktning s mste systemet frflyttas en viss strcka innan riktningen kan berknas. Lngden p den strcka som krvs pverkas ocks av noggrannheten hos koordinatbestmningen. GPS- systemet har en icke frsumbar oskerhet p ett antal meter. Om en elektronisk kompass anvnds fr att bestmma hur navigationssystemet pekar s frsvinner kravet p att systemet mste frflyttas fr att kunna bestmma sin riktning. I detta examensarbete har ett GPS baserat navigationssystem utvecklats fr att kunna jmfra system baserade p enbart GPS med sdana som har ocks en elektronisk kompass. Ett utvecklingskort fr programmerbar logik har anvnts som plattform. Kortets FPGA-krets innehller bde processor, Nios-II soft core, och interface mot givare och minnen. Resultaten frn testerna visar, inte helt ovntat, att ett system med kompass ger en skrare navigation och en kortare vg mellan start och ml. Detta gller frmst nr det finns hinder i vgen.

    i

  • Key Words

    Key Words GPS Compass FPGA DE2 Board Quartus-II Nios-II

    ii

  • List of Abbreviations

    List of Abbreviations

    IDE Integrated Development Environment CPU Central Process Unit DSP Digital Signal Processor FPGA Field-Programmable Gate Array EEPROM Electrically Erasable Programmable Read-Only Memory SOPC System On-a- Programmable-Chip HAL Hardware Abstraction Layer HDL Hardware Description Language IDE Integrated Development Environment EDS Embedded Design Suite IP Intellectual Property PLD Programmable Logic Device LB Logic Block RF Radio Frequency SRAM Static Random Access Memory UART Universal Asynchronous Receiver/Transmitter GNSS Global Navigation Satellite System GPS Global Positioning System 3D Three Dimensional BPSK Binary-Phase Shift Keying CDMA Code Division Multiple Access WGS-84 World Geodetic System 1984 NMEA National Marine Electronics Association ALM Adaptive Logic Module HNS Handheld Navigation C/A Coarse/Acquisition PRN Pseudo Random Noise GUI Graphical User Interface ISR Interrupt Service Routine OS Operation System RTOS Real-Time Operating System FIFO First In First Out

    iii

  • Acknolwedgement

    Acknowledgement

    First and foremost I would like to express my gratitude to my supervisor Alf Johansson for his continuous supervision and suggestions throughout this thesis. As a master program coordinator, his long-term guidance and dedicated demanding time was very helpful in boosting our knowledge towards the electronics world. My special thanks to Prof. Shashi Kumar for his encouragement, motivation and firm support throughout my Master thesis, which will always be remembered. I also extend my gratitude to Prof. Lennart lindh for introducing me towards the platform of navigation. I would like to thanks to all of my teachers for their support and providing valuable knowledge during my Masters study. My eternal gratitude which cannot be expressed in simple words goes to my parents and my brothers "Abd Alretha" for their encouragement and unconditioned support to me. Their prayers and love provided me an everlasting support at every foot-step during my difficult hours from birth. My thanks and love to all my friends for their discussions, friendship, and all kinds of help. Its my pleasure to work with all of them. Last but not least, Thanks to JTH and Sweden for providing a beautiful environment and a realistic study atmosphere during my thesis work.

    iv

  • Table of Contents

    Table of Contents

    1 Introduction ............................................................................. 1 1.1 MOTIVATION FOR TWO DESIGNS ................................................................................................. 1 1.2 HANDHELD NAVIGATION SYSTEM (HNS) ................................................................................... 1 1.3 PURPOSE AND AIMS .................................................................................................................... 2 1.4 LIMITATIONS ............................................................................................................................... 3 1.5 OUTLINE ..................................................................................................................................... 3

    2 Theoretical background .......................................................... 4 2.1 GLOBAL POSITION SYSTEM (GPS) .............................................................................................. 4

    2.1.1 GPS Function ................................................................................................................... 5 2.1.2 GPS Signal Description .................................................................................................... 6

    2.2 WORLD GEODETIC SYSTEM (WGS 84) ....................................................................................... 9 2.3 GPS SOFTWARE INTERFACE ....................................................................................................... 9 2.4 HARVERSINE FORMULA ............................................................................................................ 10 2.5 ELECTRONIC COMPASS ............................................................................................................. 11 2.6 PROTOTYPING EMBEDDED SYSTEMS ......................................................................................... 13

    2.6.1 DE2 Development Board ................................................................................................ 13

    3 System Development Methodology ..................................... 22 3.1 RESEARCH METHOD .................................................................................................................. 22

    4 Design of Handheld Navigation System .............................. 24 4.1 HANDHELD NAVIGATION SYSTEM DESIGNS(HNSD) ................................................................ 24

    4.1.1 First Navigation Design ................................................................................................. 24 4.1.2 Second Navigation Design .............................................................................................. 25 4.1.3 Performace of two Designs ...............................................................