marriage but despite just a few months into marriage my wife has been one of the main ...... It defines the orientation of celestial objects in terms of elevation and.
COARSE ATITUDE DETERMINATION ALGORITHMS USING SIGNAL TO NOISE RATIO OF GPS SATELLITES SIGNALS
BY Rashid Mehmood, BSc
THESIS SUBMITTED TO THE AERONAUTICS & ASTRONAUTICS DEPARTMENT IN PARTIAL FULFILLMENT OF THE REQUIREMENTS OF MASTER OF SCIENCE IN GUIDANCE, NAVIGATION & CONTROL AT THE INSTITUTE OF SPACE TECHNOLOGY December 2015
i
CERTIFICATE OF APPROVAL
It is certified that the research work titled as “Coarse Attitude Determination Algorithms Using Signal to Noise Ratio of GPS Satellite Signals” conceded out by Rashid Mehmood, Reg. # 110511007, under the supervision of Dr. Umar Iqbal Bhatti at Institute of Space Technology (IST), Islamabad, Pakistan. It is completely sufficient, in capacity and in superiority, as a thesis for the degree of Master of Guidance, Navigation and Control (GNC).
Supervisor:
____________________ Dr. Umar Iqbal Bhatti
External Examiner:
____________________ Dr.
Internal Examiner:
____________________ Dr.
Internal Examiner/Head of Department:
____________________ Dr. ii
iii
To my Parents
iv
DECLARATION
It is declared that the work contained in this thesis is my own original work and that I have not previously in its entirety or in part submitted it at any university or institution for a degree or for any other qualification.
Rashid Mehmood:
Date: ………………
v
ACKNOWLEDGEMENTS
First and foremost many thanks to God almighty. Completing this thesis would never have been possible without the support and contribution of so many important people. The most prominent among those is my supervisor Dr. Umar Bhatti .In addition to Dr. Umar the other person to whom I must pay my regards is Dr. Qasim Zeeshan an inspirational person who can “infect” you with the disease of “research and development” and I wish Pakistan may have more people like him. I would also like to thanks, Dr. Sohail and Sir Abdul Waheed who have taught us so many topics and besides teaching always been so much supportive whenever and where ever I needed them. I am thankful to my university Institute of space technology for giving me the opportunity to study GNC and that is also with a scholarship. I must say that despite room for improvement still IST is one of the best institutes you can look forward to in Pakistan and in space technology. Last but not the least I am thankful to my whole family for the support I have received from them especially my elder brother and my father. It would be an extreme injustice if would not mention the support from my wife. I had almost left MS thesis due to job and marriage but despite just a few months into marriage my wife has been one of the main driving and urging force for completing the thesis. I had to leave a full-time (Private) job for getting results from hardware and then have to leave Karachi for visiting IST and I had never lost her support despite our newly born baby boy.
vi
ABSTRACT This thesis presents Coarse attitude determination algorithms by using SNR (signal to noise ratio) of GPS satellites signals. The emphasis of work described is the use of simple hardware and software as compared to traditional SNR based approaches. Fuzzy logic has been used as opposed to commonly utilized mathematical equations. A low- cost GPS receiver with 1 Hz update rate has been reprogrammed to 5 Hz refresh rate to enable its use for demanding the application of a typical CubeSat. By actively blocking all signals from below and sides the satellite signals with highest SNR is considered nearest to the antenna bore-sight angle. Calibration process is employed for more precise results by sweeping all the sky and recording the highest possible SNR of all satellites. An average weight is given accordingly to each satellite as per magnitude of its SNR. The result for azimuth shows a maximum error of 20 degrees with an average of 8 degrees. The results for elevation have a maximum error of 25 degrees with an average of 15 degrees. In this way, the algorithm can be used onboard a CubeSat for coarse attitude measurement. By using measurements obtained from onboard GPS receiver, a CubeSat can gain considerable advantage in terms of stringent payload requirements of a typical Cube Sat.
vii
TABLE OF CONTENTS
CERTIFICATE OF APPROVAL ................................................................................... ii DECLARATION................................................................................................................v ACKNOWLEDGEMENTS ............................................................................................ vi ABSTRACT ..................................................................................................................... vii TABLE OF CONTENTS .............................................................................................. viii CHAPTER 1 .......................................................................................................................1 INTRODUCTION..............................................................................................................1 1.1
Literature Review............................................................................................................. 3
1.2
Motivation ........................................................................................................................ 5
1.3
Thesis Structure ............................................................................................................... 6
COORDINATE SYSTEMS ..............................................................................................8 2.1
Coordinate Frames ........................................................................................................... 8
2.1.1
Earth-fixed frame ..................................................................................................... 8
2.1.2
Local level frame ................................................................................................... 10
2.1.3
Horizontal coordinate frame.................................................................................. 11
CHAPTER 3 .....................................................................................................................15 GLOBAL POSITIONING SYSTEM .............................................................................15 3.1
Introduction .................................................................................................................... 15
3.2
History ........................................................................................................................... 15
3.3
Up gradation................................................................................................................... 16
3.4
Working fundamentals ................................................................................................... 17
3.5
Detail of transmitted signal ............................................................................................ 20 viii
3.6
GPS NMEA 0183 protocol ............................................................................................ 22
3.7
NMEA messages ............................................................................................................ 23
CHAPTER 4 .....................................................................................................................27 ANTENNA AND SIGNAL ..............................................................................................27 4.1
Signals to Noise Ratio.................................................................................................... 27
4.2
Antenna .......................................................................................................................... 28
4.2.1
Bandwidth .............................................................................................................. 28
4.2.2
Gain ........................................................................................................................ 28
4.2.3
Radiation pattern .................................................................................................... 28
4.3
Patch antenna ................................................................................................................. 29
4.3.1 4.4
Radiation patterns of patch antenna ....................................................................... 30
Advantages..................................................................................................................... 31
CHAPTER 5 .....................................................................................................................33 THE CONCEPT OF DETERMINING ORIENTATION ...........................................33 5.1
Attitude determination using GPS ................................................................................. 34
5.2
Shielding from radio waves ........................................................................................... 35
5.3
Arduino .......................................................................................................................... 36
5.4
Fuzzy Logic ................................................................................................................... 36
5.5
Logging of Highest SNR ............................................................................................... 39
5.6
Division of Problems ..................................................................................................... 42
5.6.1
Main program......................................................................................................... 42
5.6.2
Sub Algorithms ...................................................................................................... 43
5.6.3
Algorithm 1 ............................................................................................................ 44
5.6.4
Algorithm 2 ............................................................................................................ 45
5.6.5
Algorithm 3 ............................................................................................................ 46
5.6.6
Algorithm 4 ............................................................................................................ 52
5.6.7
Algorithm 5 ............................................................................................................ 53
5.6.8
Algorithm 6 ............................................................................................................ 56
5.6.9
Algorithm 7 ............................................................................................................ 56
5.7
Improved Algorithm for future ...................................................................................... 58 ix
CHAPTER 6 .....................................................................................................................59 ERRORS AND SOURCES .............................................................................................59 6.1
Error Study ..................................................................................................................... 59
6.2
Error due to antenna lobe ............................................................................................... 59
6.3
SNR degradation due to lower elevation ....................................................................... 60
6.4
Error due to troposphere and Ionosphere ....................................................................... 61
6.5
Leakages of side lobes ................................................................................................... 64
6.6
Error due to signal multipath ......................................................................................... 64
6.7
Signal blockage by building........................................................................................... 66
CHAPTER 7 .....................................................................................................................68 RESULTS AND CONCLUSIONS .................................................................................68 7.1
Measurements techniques .............................................................................................. 68
7.2
Results for Azimuth ....................................................................................................... 69
7.3
Results for Elevation ...................................................................................................... 71
7.4
Results for Turn rates ..................................................................................................... 72
7.5
Conclusion ..................................................................................................................... 73
CHAPTER 8 .....................................................................................................................74 FUTURE RESEARCH ....................................................................................................74 8.1
Antenna Lobe ................................................................................................................. 74
8.2
SNR Attenuation due to Elevation ................................................................................. 74
8.3
Refraction due to Ionosphere ......................................................................................... 74
8.4
Algorithm Optimization ................................................................................................. 75
8.5
Inclusion of Other Satellite Systems .............................................................................. 75
REFERNCES ..................................................................................................................... i Print References ............................................................................................................................ i Internet ......................................................................................................................................... ii
Picture Credits ................................................................................................................. iii
x
List of Tables Table No
Table Caption
Page no
2.1
Earth frame
10
3.1 3.2 3.3
GPS Up gradation NMEA Protocol NMEA messages
17 23 24
5.1 5.2
GPS required Information Weight relationship
44 55
7.1 7.2 7.3
Readings for Azimuth Readings for Elevation Readings for Azimuth and Ele turn rates
70 71 72
xi
List of Figures Figure No
Figure Caption
Page No
2.1 2.2 2.3 2.4
Earth Coordinate Frame Local Coordinate Frame Horizontal Coordinate Frame Elevation and Azimuth
9 11 12 12
3.1 3.2 3.3 3.4 3.5 3.6 3.7
GPS Constellation GPS basics GPS Triangulation (a) GPS Triangulation (b) GPS Working Pseudo random code NMEA output
15 17 18 19 19 20 23
4.1 4.2 4.3
Antenna lobe Patch antenna Patch antenna lobe
29 30 31
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11
Insulation of side and back lobes Arduino Mega 2560 Fuzzy Logic example GPS satellites SNR on mobile Highest SNR of all satellites at once Main Algorithm program Algorithm 1 Algorithm 2 Logic related to Azimuth and Elevation Satellites with Opposite Azimuth Screen shot of GPS Test app
35 36 38 39 41 42 45 46 47 48 49
xii
5.12 5.13 5.14 5.15 5.16 5.17 5.18
Logic related to Elevation Algorithm 3 (Looking up to sky) Algorithm 4 Algorithm 5 Algorithm 6 Algorithm 7 Algorithm for future
50 52 53 54 56 57 58
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11
Error due to Lobe SNR degradation Refraction Error Refraction in fishing Refraction compensation by hunter fish Earth atmosphere layers Leakages of side and back lobes Multipath error Multipath error Urban canyon Signal blockage by buildings
60 61 61 62 63 64 64 65 65 67 67
7.1 7.2
Measuring tools (google maps) Measuring tools (D)
68 69
8.1
Inclusion of other GNSS Systems
75
xiii
List of Abbreviations and Symbols GPS SNR NASA LOS FEDSAT WGS MEO LORAN TRANSIT TOA TOT TOF NMEA Psignal
Pnoise ‘dB’ ‘dBi’ SNR A avgAmid
Azimuth final
Global Positioning System Signal to Noise Ratio National Aeronautics and Space Administration Line of Sight Federation Satellite World Geodetic System Medium Earth Orbit Long Range Navigation Navy Navigation Satellite System Time of Arrival Time of Transmission Time of Flight National Marine Electronics Association Power of Received Signal Power of background Noise Decibel Decibel isotropic Difference between signal to noise ratio of first and second satellite Difference between average azimuth and azimuth of first satellite Average azimuth of first and second satellite Finally calculated azimuth for antenna after applying weights
xiv
CHAPTER 1 INTRODUCTION
Since its evolution in the last quarter of 20th century, GPS has come a long way from secret & sensitive military navigation system providing invaluable help in locating fellow servicemen “Behind the enemy line” or to drop “smart bombs” with “pin point” accuracy to a device which become part of our daily life providing guidance toward our friend’s home or “smartly” tagging our photos taken with smartphones. During all that time since its first introduction, the prime use of GPS has always been 2D and then 3D location (with altitude). Since the dawn of 21st century, a new usage of GPS begins to appear and that is for attitude/orientation determination. There were two methods used for it. The first method is by receiving carrier phase on two antennae placed at a certain distant (as per wavelength) while the other is based on the signal to noise ratio of GPS satellites. It must be noted that SNR of GPS satellites is a standard measurement of a GPS receiver. The result of the former method is better than the later but requires relatively increase space (for antennas), power and computation. On the other hand, the SNR based system requires lesser space, electric power, and computation. Considering application for Cube Sat, the SNR method is preferred. Although it cannot be used as a standalone system since it’s not accurate but it can work with other sensors such as magnetometer for good reliable results. It can also work alone as a backup system and
1
also when high accuracy is not the first priority. An example of this is to determine the downward or upward orientation of a CubeSat with respect to the Earth. After the successful launch of Apollo 11 mission to the moon the term “Rocket Science” has become a synonym for referring to a process or a technology which is extremely difficult to understand by general public. Astronauts are considered living legends and space was referred to as the final frontier. The importance of space science is not diminished in the 21st century. Although has taken a discerning turn. It is no more a property of gigantic organizations (such as NASA) having budgets that surpass combined national budgets of many countries. The advancement in computers and electronics technology has made possible the access of high-tech space technology to a relatively small organization and educational institutes. It has even reached a point where some companies are taking space to commercial level (such as SPACE X). Right from the start of the century increasing number of the educational institute are trying to involve their students in space research in a much more practical way as compared to typical previous working in lab simulation. A popular way of doing this is launching of CubeSat satellites (a satellite with equal length of approximately 10cm on all sides). Accuracy, durability, weight, and cost are constrained for a space mission and CubeSat is no exception to this. Extensive research is going on to get more out of limited space and weight budgets of a cube-sat. One of the basic laws of space bounded design is to have at least one or more backup sensors depending upon the importance of the measurement sensor. Low weight, space and cost budgets do not allow cube sat-sets to have such luxury. One of the most important information for a satellite is its current 3D position and 2
orientation as all the activities a satellite can perform demand this basic information whether its communication, spying or photography. Orientation is normally taken from magnetometer or other sensors.
This thesis presents
an alternate method of finding orientation/ coarse attitude with GPS antenna. Although worked has been done on this since 2001 for application on different CubeSat this approach is based on fuzzy logic and mapping of visible satellites. This method confirms that the antenna bore-sight angle is within few degrees of any GPS satellite and it also provides acceptable results when the antenna boresight is not pointing toward any of the GPS satellite. Literature Review The use of GPS signal for orientation/attitude determination has a history as old as going back march 1989 when a paper by the title “Measurement of aircraft position velocity and attitude using rouge GPS receiver” was presented during the fifth international geodetic symposium on satellite positioning. [14] Other researchers also contributed in this regard [8] [9]. But the method took a different approach than the one in this thesis. The method was based on measurement of GPS carrier phase received on multiple antennae placed at a specific distance and angle to each other. One of the problems which should be solved before applying the carrier phase method is the integer resolution ambiguity [10] [14]. In 1999 PENINA AXELRAD and CHARLES P. BEHERE presented a paper “Satellite Attitude Determination Based on GPS Signal to Noise Ratio” [7] . In that paper the authors used a method of finding coarse attitude (or orientation) determination of satellite using signal to noise ratio of a single GPS antenna. The method was based on calibration of 3
boresight vector of the antenna. The first step is to develop a first-hand mapping of the angle between antenna boresight and the GPS-LOS vector to SNR. The mapping is based on ground data or data set taken from a space flight. An accuracy of 3 – 10-degree rms was claimed based on data from the actual flight of several spacecraft. The number of GPS satellites available at an instant and the quality of precision of calibration had a major impact on the accuracy of attitude obtained. In 2003 Chaochao Wang, while working with the same basic principle investigated another meth method in which he integrated SNR of a low-cost GPS with 3 axis rate gyros using Kalman filter [11]. The SNR based method could also be used with carrier phase method for solving its intial integer ambiguity resolution [7]. There are at least two prominent application of the method one was on Fastrac [13] and the other was on Fedsat [11] and in both of them, 3-axis magnetometer was coupled with GPS which not only resolves the roll issue but also enhanced many features. In 2004, Salman Syed used fuzzy logic to remove errors in GPS reading due to urban canyon phenomenon [12]. Rather than using complex equations he used simple common sense interpretations to get a better result from GPS for vehicle location by simply starting from the understanding that a vehicle must be on the road rather than on the roof of the skyscraper. Further guidance on the topic of fuzzy logic was acquired from the two very renowned books [6]
4
Motivation In 2013 Institute of space technology became the first ever university in Pakistan to launch its very own cube satellite [22].It was a proud moment for not only the people directly involved in the project but also for those who were attached to the institute and in fact the whole country itself. This created an urge in the author to contribute toward future plans of CubeSat’s. While studying other CubeSat around the globe the author noticed that the major constraints for such project are weight and cost. CubeSats are typically experimental satellites used for the sack of learning so their major goal has been simple data signal transmission which may include satellite position, orientation and in some cases imagery and other data. The initial target given to Author was to get information with a GPS receiver whether the satellite was facing sky or ground. Later on, the author realized that it can be done further and adjusted the target for 45-degree accuracy for both azimuth and orientation.As the author started hardware experiment using an inexpensive GPS coupled with basic Arduino microcontroller he found that he can even go further and set his target to get an accuracy of within 20 degrees for both azimuth and elevation. All tests were performed on the ground while struggling with multipath errors but still the author was able to achieve set targets with azimuth results within 10 degrees of accuracy for 80% of time [chapter 7 Results]. Besides achieving good results the other main goal in author’s mind was to make the method very simple and inexpensive so that a young student could also implement it. For precisely this reason the author mostly used a simple fuzzy logic method where applicable and used simple equation where needed. Rather than formulating the problem in one or two complex equation the author divided my problem into small parts and applied different 5
logics for different conditions. This not only made it simple but allowed the author to use a very low-cost microcontroller like Arduino with very low computation power (16 MHz) to implement all the logics. Arduino microcontrollers are very low cost and extremely easy to use due to abundance of online libraries but they do lack in computation power, program memories, and complex function capabilities. Thesis Structure This thesis is organized as follows • Chapter 1 covers the background information and gives an overview of the research. It summarizes the problem statement and also gives the motivation of the thesis. • Chapter 2 discusses different type of coordinate systems in use today their features and differences from each other • Chapter 3 discusses the fundamental working of GPS its history and uses. Also, it discusses transmitted signals, GPS NMEA protocol, and messages. • Chapter 4 discusses Antenna and its types with each having the specific application. The radiation pattern of the patch antenna is discussed along with advantages. • Chapter 5 covers the core concept of attitude determination via SNR and discusses main and sub-algorithms. • Chapter 6 discusses the different type of errors and their sources and also the possible prevention mechanism.
6
• Chapter 7 discusses results for azimuth, elevation and turn rates with maximum and average errors and the conclusion is given at the end of it. • Chapter 8 shed light on the opportunity for future researched to improve the results even further.
7
CHAPTER 2
COORDINATE SYSTEMS
Coordinate Frames The author has obtained the orientation of GPS antenna in a horizontal coordinate system that is in Azimuth and Elevation. However, that information can be transformed to other coordinate systems by using a suitable transformation matrix. A transformation matrix is set of trigonometric functions which can transform one coordinate system to another coordinate system. [2]. 2.1.1 Earth-fixed frame The Earth-fixed frame is traditionally attached to the Earth frame. It rotates with respect to the inertial frame at a rate of 15.04109 degrees/h. The center of the Earth mass is also the center of the Earth-fixed frame. The equatorial plane contains the X-axis and it is oriented in the direction of 0 degree Greenwich meridians. The Y-axis is also parallel to equatorial plan and it is at 90 degrees from the 0 degree meridians. The Earth rotational axis represents the Z-axis. The standard earth fixed coordinate system frame nowadays in common use is (World Geodetic System) WGS-84[2]. It is the most preferable for GPS because it is accepted and followed by all over the globe.
8
Fig 2.1, Earth Coordinate Frame The basic parameters of WGS-84 are given in the table 2.1. It defines its shape, angular rate as well as Earth mass. As can be noticed in fig 2.1 above the X and Y axis are in the horizontal plane of the Earth which is the marked by the Equator at its outer boundry. Both the above axis are 90 degrees apart and originate from the center of the Earth. Both of them cross The Equator at the different point. X-axis cross Equator at Greenwich meridian whereas Y axis cross Equator 90 degrees away in East. The Z axis starts from the center of the Earth and moves toward North.
9
Table 2.1 Earth frame
2.1.2
PARAMETER
WGS-84
Semi-major axis
6378137.0 m
Flattening
1/298.25722563
Angular Velocity
7.292115x105 rad/s
Geocentric gravitational constant
3.9860050x1014 m3 /sec2
Normalized 2nd degree zonal harmonic coefficient of gravitational potential
-484.16685x106
Local level frame
The local level frame is used for determining the attitude of mobile objects it is a topocentric navigation frame. As shown in figure 2.2 the direction normal to Earth ellipsoidal is denoted by the Z-axis. As compared to sphere an ellipsoid is a 3D elliptical shape. Since the Earth is not a perfect sphere rather more ellipsoidal therefore ellipsoid is used to define the shape of Earth. The ellipsoidal East is Y axis while Ellipsoidal north is for the X axis.
10
Fig 2.2, Local Geodetic frame As shown in figure 2.2 above the frame is determined by adding a tangent plane to the surface of the Earth. The tangent plane is considered attached to a point on the surface of Earth and that point is also used as the origin for this coordinate system. 2.1.3
Horizontal coordinate frame
It’s a celestial coordinate system which depends on observer’s actual horizon as the base of calculations. It defines the orientation of celestial objects in terms of elevation and azimuth angle. The system categorizes the sky in two parts, one part which is above the observer’s head and the others below the earth which cannot be seen by the observer. The edge of the earth is known as true horizon while the edge of the Earth parallel to the tangent line to earth is known as astronomical horizon as shown in figure 2.3 below. The pointer up into the sky is known as zenith while the one into the ground is known as the nadir.
11
Fig 2.3, Horizontal Coordinate Frames The system has two horizontal angular coordinates 2.1.3.1 Elevation The elevation is the angle between observer’s local horizon and the object that’s elevation need to be measured. Its value varies from 0 degrees to 90 degrees. Another method is a complement of altitude that is from zenith right from overhead.
Fig 2.4, Azimuths and Elevation 12
2.1.3.2 Azimuth It is the angle between the observers true north and the object whose azimuth needs to be measured. The angle is always measured from the right side (east) of the North. For example, 350 degree is -10 degrees from The North but will always be measured as 350 degrees and not -10 degrees. This system is fixed with the
Earth and not with stars which mean that elevation and
azimuth of a particular object in the sky will keep changing as time passes, as the object would show drift with the rotation of the Earth. A further important point to note is that the same object in the sky will show different azimuth and elevation while observed from a different location on Earth. The horizontal coordinate system serves best in determining the timing for rising and setting of objects in the sky. For example, with an elevation of 0 degrees means that the object is on the horizon. An increase in the value of elevation means that the object is rising while a decrement means that the object is setting. As the frame is fixed with earth movement, therefore, there is always a diurnal motion added to any object being observed. A diurnal motion is observed in objects in the sky to an observer standing on the surface of Earth due to rotation of Earth. The diurnal motion is always constant and is added in the direction from east to west due to the rotation of the earth. Net movement of an object can be obtained by comparing with celestial objects. There are two special cases with the horizontal system and that is from the South Pole all directions are toward the North Pole and the second case is from the North Pole all directions are toward the South Pole. Therefore, while standing on these poles the horizontal coordinate cannot be used. 13
Another point should be mentioned here is by the horizon it means astronomical horizon and not the true horizon as the true horizon is slightly lower compare to the astronomical horizon and that difference increases as the observer gains height.
14
CHAPTER 3 GLOBAL POSITIONING SYSTEM Introduction Global Positioning System is a combination of 24 satellite spread uniformly around the world at MEO (Medium Earth Orbit) orbit 20,180 km providing navigational support to GPS receivers holders around the planet. The actual number of the satellite is more than 30 but some are placed as “backup” in a case when needed. History The GPS concept is an extension of the ground base navigation system and it possesses some similarities to older systems such as LORAN and DECCA NAVIGATOR, which were developed earlier in the 1940s. LORAN was based on fixed ground station transmitters which were 100-300 km apart [20]. The transmitters continuously send unique radio signal which was received and processed by the LORAN receivers for position determination. DECCA was also similar ground based system.
Fig 3.1, GPS satellites constellation 15
In 1957 Soviet Union launched SPUTNIK 1[23]. Two American scientists by the name of George Weiffenbach and William Guier studied its received signals and found that due to Doppler Effect they could calculate with pinpoint accuracy the position of the satellite in its orbit. They were then given the task of doing inverse calculations which mean locating the signal receiver’s position by the use of the received signals. In fact, the Americans at that time were working on a new missile by the name of POLARIS which was designed to be launched from a submarine but the submarine needed to have its precise position before launching the missile. For solving position problem for submarines a new satellite system was designed and launched which is known as TRANSIT. In the 1960s, the need for a more precise navigation system was felt and work began on present day GPS. It was earlier known as Defense Navigation Satellite System and the individual satellites were known as Navistar. Different types of prototypes were launched during periods of 1978 to 1985[23]. In 1983 a Korean passenger jet was shot down in the Soviet Union prohibited airspace and then president of the United State, Ronald Reagan issued an order of free use of GPS facility for civilian use when it would be fully developed. In 1996, Bill Clinton signed a bill which allowed the civilian user to have the same accuracy as that of the military [23]. Up gradation GPS has been continuously upgraded with the launch of new satellites with each having the better technology compare to the previous. The up gradation could not have been possible in basic methodology as it would need replacement of all the satellites so improvements were done in satellite’s own position accuracy, signal quality and overall 16
reliability of the satellite for longer working period. A brief history of this development is given in the table below. Table 3.1 GPS up gradation
Launch Block I II IIA IIR IIR-M IIF IIIA IIIB IIIC
Period 1978–1985 1989–1990 1990–1997 1997–2004 2005–2009 From 2010 From 2017 — — Total
Satellite launches Success Failure 10 9 19 12 8 11 0 0 0 66
1 0 0 1 0 0 0 0 0 2
In prep 0 0 0 0 0 1 0 0 0 1
Planned
Currently in orbit and healthy
0 0 0 0 0 0 12 8 16 36
0 0 2 12 7 11 0 0 0 31
(Last update: June 13, 2014)
Working fundamentals The location of a receiver in space can be determined by measuring its distance to some known position in surrounding space. Let’s examine from one-dimension example given below.
Fig 3.2, GPS basics 17
The receiver is at a distance of x1 and x2 from two known points which are p1 and p2. If the distance x1 and x2 are known then exact position of Receiver can be obtained. The concept can further be extended to 2 dimensions where imaginary circle would be drawn from known points to receiver by using distance from known points as radius of these circles.
Fig 3.3, GPS triangulation (a) Similar to one dimension here the known points are p1, p2 and p3 and the known distance of the receiver from them is x1, x2, and x3. A solution of equations of circles will ultimately provide the two-dimensional position of the receiver. 18
Fig 3.4, GPS Triangulation (b) In GPS, the above idea is further extended and the circles become spheres. All the satellites send continuous data known as ephemeris. This data includes the position of satellite and time of transmission. The GPS receiver uses the above data along with delay took by the signal to reach the receiver and finally determine its own position.
Fig 3.5, GPS working 19
GPS basic theory works around time. Every GPS satellite possesses an onboard atomic clock. The accuracy resolution of these clocks depends on the movement of electrons from one orbit to another thus provide very precise and accurate time information [1]. Alongside the time, GPS satellites also provide accurate information about their position in orbit. For more accurate information about its own position a GPS satellite has onboard instruments but it also get a correction from ground stations every time it passes over them [3]. Detail of transmitted signal Each satellite transmits a continuous signal which includes information by using spread spectrum method.
Fig 3.6, Pseudo random codes i)
The combination of ones and zeros known as the pseudo random code is transmitted
by every satellite. The combination of 1 and 0 may appear random and sometimes as noise 20
but in fact it is a predefined code. The pseudo-random code does not change over a period and the receiver always saves it by extracting it from GPS signal for future reference. ii) GPS also send TOT (Time of Transmission) along with Pseudo code. The GPS receiver compares the already available pseudo code with one received from the satellite and calculates the expected time of arrival of a particular part of the code (known as an epoch) to the actual time of arrival TOA. iii)
The message sent by a GPS satellite also includes time of transmission TOT of an
epoch. The x, y and z are unknown position coordinates of the receiver while is the position of the satellite where i denotes the number of satellite i.e. 1, 2, 3…to maximum number of satellites. There is another quantity and that is the time on a satellite clock represented by s. The time on which the receiver found its message is represented by TOA. After removing receiver clock bias denoted as b we can get much accurate time from receiver clock.
ti ti b
(3.1)
The time taken by a signal from a satellite to the receiver can be represented as ti b si t ̃i - b - si, by multiplying this time with the speed of light c we can find the distance covered by the signal from the satellite to receiver distance
Recivers distance = (ti b si )c Now we can apply the equation connecting the two points as follows 21
(3.2)
( x xi )2 ( y yi )2 ( z zi )2 [(t i b si ) c]2 , i 1,2,....., n
(3.3)
Or
( x xi )2 ( y yi )2 ( z zi )2 bc pi , i 1,2,...., n
(3.4)
Where Pi is pseudo range
pi (t i si )c
(3.5)
By using TOT (Time of Transmission) and TOA (Time of Arrival), the receiver calculates the TOF (Time of Flight) which is the time taken by signal to travel from a particular satellite to receiver. Each signal from the particular satellite will have different time of flight which will depend on the distance between the GPS satellite and the receiver. In fact all the work of calculation regarding TOA, TOF and the calculation of longitude, latitude is done in parallel using the navigational equations. GPS NMEA 0183 protocol NMEA 0183 is a common protocol for communication between electronic devices for maritime purposes which may include echo sounder, anemometer, sonars, gyrocompass, GPS receivers, autopilots, and other such devices [23][2]. The National Marine Electronics Association is the sole administrator for these protocol standards. NMEA 0183 replaced the earlier protocol by the name of NMEA 0180 and NMEA 0182 standards. It employs basic serial communications protocol which includes data rate, data length, end bit etc. By using broadcast communication, a sender can send data to theoretically unlimited receivers. The contents of an individual sentence can be defined at an application layer. This allows
22
the receivers to separate the message more precisely. It uses ASCII based serial protocol communications. Table 3.2 NMEA Protocol
Typical Baud rate
4800
Data bits
8
Parity
None
Stop bits
1
Handshake
None
The output of GPS contains a lot of information delivered in the form of sentences which include longitude, latitude, altitude, speed, time and other related information.
Fig 3.7, GPS output
NMEA messages Every sentence starts with a $ sign and include nearly 80 characters which end with carriage return line. Sentences are mostly given in single line with next sentence starting from the next line. Sample sentences are given below [20]. 23
Table 3.3 NMEA messages $GPGLL: Geographical position, latitude and longitude 1) Latitude 4) E or W (East or West)
2) N or S (North or South)
3) Longitude
5) Time (UTC)
6) Status A - Data Valid, V - Data Invalid
7) Checksum
$GPGSA: GPS dilution of precision and active satellites 1) Selection mode
2) Mode
4) ID of 2nd satellite used for fix
……14) ID of 12th satellite
16) HDOP in meters
17) VDOP in meters
3) ID of 1st satellite used for fix 15) PDOP in meters
used for fix 18) Checksum
$GPGSV: GPS satellite in view 1) Total number of messages 4) Satellite number
2) Message number
3) Satellites in view
5) Elevation in degrees
6) Azimuth in degrees to true north
7) SNR in Db
More satellite info’s like 4)-7)
n) Checksum
$GPGGA:
1) Time (UTC)
GPS fixed data
2) Latitude
3) N or S (North or South)
24
4) Longitude
5) E or W (East or West)
7) Number of satellites in view, 00 – 12
8) Horizontal Dilution of precision
10) Units of antenna altitude, meters
11) Geoidal separation, the difference between the WGS-84 earth ellipsoid and mean-sea-level (geoid), "-" means meansea-level below ellipsoid 14) Differential reference
13) Age of differential GPS data, time in seconds since last SC104 type 1 or 9 update, null field when DGPS is not used
6) GPS Quality Indicator, 0 - fix not available, 1 - GPS fix, 2 - Differential GPS fix 9) Antenna Altitude above/below mean-sealevel (geoid) 12) Units of geoidal separation, meters
15) Checksum
station ID, 0000-1023
$GPRMC: Recommended minimum specific GPS/TRANSIT data
1) Time (UTC) 4) N or S 7) Speed over ground, knots 10) Magnetic Variation, degrees
2) Status, V = Navigation receiver warning 5) Longitude 8) Track made good, degrees true
3) Latitude
11) E or W
12) Checksum
6) E or W 9) Date, dummy
$GPVTG: Track made good and ground speed
1) Track Degrees 4) M = Magnetic 7) Speed Km per Hour
2) T = True 5) Speed Knots 8) K = Kilometers per Hour
25
3) Track Degrees 6) N = Knots 9) Checksum
$GPZDA:
1) Local zone minutes description, same sign as local hours 4) Month, 01 to 12 7) Checksum
Time and date
2) Local zone description, 00 to +/- 13 hours
3) Year
5) Day, 01 to 31
6) Time (UTC)
26
CHAPTER 4 ANTENNA AND SIGNAL
Antenna has been an integral part of the revolution that had swept the world of communication in the last century and still going on with rapid pace in this century also. Miniaturization of the antenna has occurred with the use of higher frequency and desire to get higher data rates. The Antenna has evolved in different categories depending upon shape and frequencies they operate on.
Signals to Noise Ratio Signal to noise ration also known as SNR or S/N is basically the ratio between desired signals with respect to noise in the background [4]. The higher the ratio the better the quality of the signal will be considered. Although there is a difference between signal strength and signal to noise ratio but keeping in mind that in most situations the background noise remains constant while the signal to noise ratio changes due to change in signal strength only. Keeping this assumption in mind, the change in signal strength can be taken as a change in the signal to noise ratio. In numerical form, this can be written as follows [4].
SNR
Psignal Pnoise
,
(4.1)
Psignal ,db 10log10 ( Psignal )
(4.2)
And
Pnoise,db 10log10 ( Pnoise ) 27
(4.3)
SNRdb 10log(
Psignal Pnoise
),
(4.4)
Antenna An Antenna is a device which radiates or receives electromagnetic signals. Antenna has evolved into different designs according to requirements. 4.2.1 Bandwidth This defines the limits of frequencies between which antenna’s working will not suffer due to mismatch of its impedance. Impedance is the opposition an electric circuit or device shows toward current when the voltage is applied. It is based on a complex ratio between current and voltage in AC circuit. 4.2.2 Gain Gain is the measure of ability of an antenna to transmit or receive most of its signal from a particular direction. This mean an antenna with higher gain will radiate most of its energy in one particular direction and similar pattern will be followed while receiving the signal as well. 4.2.3 Radiation pattern The radiation pattern of any antenna is a 3D diagram of its signal transmitting or receiving strength which basically shows the direction and magnitude [4]. An isotropic antenna is a theoretical device which transmits signals to all direction with equal strength like a spherical water fountain. However, in practical is not possible as all antennas have a certain direction where their strength is strong. These strong zones are known as antenna lobe. The strongest area will represent the main lobe. This will be an area where antenna’s
28
transmitting or receiving power will be at highest. There will be other area where antenna transmitting power will show pattern and they will be minor or side lobes.
Fig 4.1, Patch antenna lobes Patch antenna It is made from metal sheets arranged over a plane ground. It can give gain from 9 to 6 dBi. Due to its small size it is one of the most popular options with space constrained wireless devices. It is mostly used in the form of arrays
29
Fig 4.2, Patch antenna
4.3.1
Radiation patterns of patch antenna
Micro strip patch antenna or more simply the patch antenna is one of the most widely used antenna. Operating between the 1 to 6 GHz it acquires attention in 1970s when the bandwidths it can operate on become more widely used. The size and flat profile of this antenna made it the first choice in all those areas where space and weight are big issues like aircraft and mobile phones etc.
30
Fig 4.3 Patch antenna lobes
The patch antenna has a pattern of radiation as shown in figure above. The radiating slots in patch antenna generate two element arrays. As a result a narrow beam emerges compared to a simple slot. The surface on the back also marginalized radiation from back, which result in increased reception or transmission of radiation from front direction. The width of the beam is same for both x and y direction which appears like a “cone”. The width of a typical beam with -3 dB is nearly 65 degree, or in other words 32.5 degree from either side of boresight.
The width of beam is comparatively narrow compared to any other simple antenna, which is the main reason for assembling such antennas in an array. Advantages The biggest advantage is the size and shape it has which allows large aperture because it is almost flat in shape. The other advantage is that of being low weight. The layer of dielectric 31
can be adjusted to full fill different requirements. Dielectric of air has losses which are very low, making it very useful in wireless applications. A higher dielectric constant material e.g. ceramics decreases the wavelength reducing the antenna size significantly. All these advantages made it an ideal contender for GPS receiver and a fact is that most GPS receivers are using it.
32
CHAPTER 5 THE CONCEPT OF DETERMINING ORIENTATION As mentioned earlier in chapter 3 that once fixed, the GPS receiver can give azimuth and elevation of all available satellites. The satellites are almost equally distributed to all part of the sky above the GPS antenna. GPS satellites operate in medium Earth orbit (MEO) with an approximate altitude of 20,200 km or 12,550 miles. This altitude means that each satellite circles the globe once in every 12 hours [20].
The constellation for GPS is designed with equally spaced six orbital planes with each plane having 4 satellites [24]. In 2011, 3 more satellites were added to the active operation and now the number of active satellites is 27 which make sure that a user must receive signals from at least 4 satellites virtually in any part of the Earth. This configuration is also referred to as “Walker configuration” due to the fact that it was first proposed by John Walker. The mathematical way of defining this is as follows [23].
i:t / p/ f
(5.1)
Where i represent inclination and t is the total number of satellites. The number of equally spaced planes is represented by p and f is the spacing between satellites in adjacent planes.
33
Attitude determination using GPS Attitude determination using SNR is based on signal strength of GPS satellites signal. Although there is a significant difference but some analogy can be made with the working of radars [27].
Radars work by detecting reflected signal from a flying object. The signal itself do not contain any information and the information calculated by the radar itself is a strength of reflected signal, time taken by reflected signal and the most important direction from which that signal is coming.
In SNR based method signal traveling time is not required. The direction of the signal is itself transmitted by the GPS satellites which the receiver calculates in the form of azimuth and elevation. In contrast to the working of radar where the position of the target is required by the user. In SNR based method the user needs to know its own orientation by using signals transmitted by the targets (GPS Satellites). It’s interesting to note here that the phenomenon of reflection on which radar works actually create an error in SNR based method in the form of multipath signals.
For the method discussed in this thesis, the preference is a narrowest antenna lobe but antenna lobe, in reality, is as wide as 65 degree which is still usable. The patch antenna will show a strong signal of that GPS satellite which is nearest to its boresight (Main front line direction) [18] and similarly lowest signal for those satellites which are away from the boresight.
34
A comparison between the signal strength of available satellites can be used to calculate the approximate orientation of the (shielded) patch antenna. But for more precise and useful results a more complex and well-designed algorithm is needed. Shielding from radio waves Suppressing minor and back lobes of patch antenna needs some solution. A solution was presented by putting the GPS antenna inside a dish structure while the dish was shielded from below by a piece of aluminum foil. The foil is then grounded. All these steps helped a lot in reducing the back lobe of patch antenna but it was not useful against multipath signals reflected by a surface placed on the front side of the patch antenna. A good point is that the multipath will become lesser as the patch antenna would move up in altitude for CubSate application and hence will automatically disappear. The overall purpose of this exercise is to “force” antenna to look in the forward direction only.
Fig 5.1, Antenna shielding
It was not a perfect setup but it was working good enough to take a usable reading from the GPS receiver.
35
Arduino Arduino is an open-source microcontroller platform which has revolutionized the application of microcontroller to grass root level. It is a combination of low-cost hardware, virtually unlimited code library, continuously increasing the number of hardware shields and ever growing community of Arduino users. By just analyzing the hardware, one can easily observe that no extraordinary feature has been added to Arduino as compared to a normal Atmel controller. It has been made easy to use which was previously hindered by a need for program burner and a dedicated board to put hardware along with the difficulty of programming and availability of ready to burn code library.
Fig 5.2, Arduino
Fuzzy Logic Logic depends on reasoning and reasoning means extracting new proposition from already available propositions. Propositions in classical logic, are found either true or false which mean its truth value is either 1 or 0. Fuzzy logic is a combination of several valued logics 36
where the truth value can be from 0 to 1. This is different from Boolean logic where the value can only be shown by 0 or 1. Problems like partial truth concepts are also handled by fuzzy logic where the value can be between completely false and completely true. The idea of fuzzy logic was first introduced in University of California at Berkeley by Dr. Lotfi Zadeh in the 1960s. One of the main assumption of classical set theory: Its boundaries needed to be declared precisely and as a result, membership of the set is obtained with certainty. This means that any individual is either a member of a set or not a member of it at all. However, in real life, most sets and limits are not clearly defined. For example, the set of obese people is one whose boundaries are not precisely defined. In order to get around this limitation of classical set theory, a fuzzy set was studied and used as an alternate solution. Let U be a universal set or universe of discourse. A set of fuzzy in U is denoted by A (x) it will have values taken from the interval [0, 1]. In general terms, a fuzzy set is a generalization of our old classical set by giving permission to membership functions to have values in the interval [0, 1] and not just 0 and 1. This implies that the membership function of the fuzzy set is a continuous function from 0 to 1 given by range [0, 1] while the classical set only takes values of 0 and 1. From definition given above it is clear that there is nothing “fuzzy” about a fuzzy set. It is a set whose membership function are continuous. On the other hand, the classical set is also known is crisp set. Let A {( x, A ( x)) | x U } , where A is a fuzzy set in U made of ordered pairs x which is a generic element.
37
When U is continuous (e.g., U ), a set A of fuzzy type is normally written as A A ( x ) / x which represent all the points x U and A ( x ) as associated membership U
function. It is also known that U is discrete. In common practice A is written as
A U A ( x) / x which represent the summation of all the points x U and A ( x ) as the associated membership function. Fuzzy Logic Example Automotive Speed Controller 3 inputs: speed (5 levels) acceleration (3 levels) distance to destination (3 levels) 1 output: power (fuel flow to engine) Set of rules to determine output based on input value
Fig 5.3, Fuzzy logic example Example Rules If speed is too slow and acceleration is DECELERATING, then increase power greatly. 38
IF speed is SLOW and acceleration is DECREASING, then increase the power slightly. IF distance is CLOSE, then decrease power slightly.
Logging of Highest SNR An SNR logging mechanism has been employed to keep the record of highest possible SNR of each satellite. In an ideal scenario, this data should be calculated with some predefined formulae but the fact is that formula itself need research as SNR of GPS keep varying with time, temperature and position so to get things simple the author has taken live data and logged them in a data array in a microcontroller. For a better understanding of this observe the picture below taken as a screen shot from a mobile software known as GPS test [Google play]. The picture shows SNR values of all visible satellite.
Fig 5.4, GPS satellites SNR level
The green and yellow bars are showing the SNRs of different GPS satellites whereas row at the bottom is showing identity number of those satellites. There could be multiple 39
reasons due to which the SNR of satellite differs from each other. One of the reasons is the orientation of the GPS antenna installed at the satellite. If all other factors except orientation could be removed (By shielding back side) it can then be assumed that the variation in SNR is purely due to the orientation of the GPS antenna. This logic is based on the fact the signal strength is maximum near antenna boresight angle and minimum at 90 degrees away from antenna boresight. Before understanding this highest SNR recording method it is important to check the figure 5.3 above and it can be observed that the satellite number 18 is with the highest SNR value that is 44dB when satellite number 17 is with the lowest 20dB. The data array will only update itself if the new SNR is higher than the previous one so after sweeping the whole sky which is like standing inside a half sphere of the sky one could record highest possible SNR of all the satellite. It is important to note that even after the initial calibration the updating will continuously work during normal operation and will discard the previous values if the satellite azimuth or elevation varies more than 5 degrees. After first complete sweep of the sky e.g. north to east and south to west and all circles of azimuth with changing elevation the data in the array for the highest SNR may look like as in the figure 5.5 below.
40
Fig 5.5, Highest Possible SNR sample As it could be observed that the highest SNR value from any satellite is similar to other but not exactly the same. The factors due to which these values may vary even at exactly the antenna boresight angle are as follows. •
Satellite near the horizon always has lower SNR Behr [7] Wang [11].
•
Interferences from other GPS satellites signals or reflection from nearby objects this
was observed during ground experiments for fedsat [11] satellite.
The important thing to understand is that now the observer has the knowledge of what would be the expected SNR if a particular satellite would come at boresight angle of the patch antenna. This means that at instant of maximum SNR the orientation of the satellite is approximately orientation of the GPS receiver’s antenna.
Another important point is that highest SNR of satellite do not decrease even if the satellite is about 4-5 degrees away from the boresight angle which means one cannot be sure about accuracy for better than 5 degrees. 41
Division of Problems In order to solve the problem in a simple manner and with fuzzy logic the overall problem is needed to be broken down into small algorithms so that it could be solved even with a simple 8-bit micro-controller without solving any complex equations.
5.6.1
Main program
send SNR of satellite to a data array
Record SNR at present instant
Start
Highest possible SNR of satellites
Keep updating with highest available values
Compare current highest SNR with highest possible value
SNR of satellites at current instant
Sort current satellite as per SNR vlaues Check whether current highest value is highest possible value
Display orientation as that of Satellite with highest SNR
Check if the Antenna is directed toward sky
Display elevation as 90 degrees
Take mid point between top two satellites and move it toward higher(SNR) satellite by applying weights
Display the calculated Orientation
Fig 5.6, Flow chart of Main Algorithm
42
5.6.2
Sub Algorithms The list and detail of sub-algorithm used in the main program are as follows i)
Algorithm 1 Sweeping the sky and recording the highest possible SNR of all
the available GPS satellites. Also, parallel updating of the SNR data array for updated information.
ii) Algorithm 2 SNR recording of currently viewed satellites and then sorting of those satellites according to their SNR. With satellite on top with highest SNR.
iii)
Algorithm 3 It checks if the patch antenna is looking in upward direction or
90-degree elevation (with possible tolerance up to 10 degrees).
iv) Algorithm 4 It checks if the top satellite is showing its highest possible SNR. If that is the case, then declaring the azimuth and elevation of the top satellite as azimuth and elevation of the GPS receiver’s antenna.
v)
Algorithm 5 If the SNR of a currently top satellite is less than its highest
possible SNR then taking the average of azimuth and elevation with next satellite. After taking average the algorithm shifts the calculated average of azimuth and elevation toward satellite which has higher SNR by applying weight gain.
43
vi) Algorithm 6 It takes the difference between the present and the previously calculated value of antenna azimuth and elevation and divides the difference by time between both observations for turn rates.
vii)
Algorithm 7 It checks if the top satellite (according to SNR) is within 60
degrees of north and that is from 300 NW– 60 NE degrees. In such case, it takes the tangent of the azimuth angles for using them in an algorithm. 5.6.3 Algorithm 1 Algorithm 1 comprises of both physical and software based elements. Programming aspect The programming aspect includes the declaration of a data array as universal outside the main program so that it should retain the value even if the programming loop executes many times. The data array comprises of 40 elements with each element consisting of following parts shown in the table 5.1 below. The reason for introducing 40 elements is that the PRN number of the satellite above the GPS antenna may vary from 1 to 36 so each satellite has been allotted a separate place to save its data. Table 5.1 GPS required Information Satellite PRN
Satellite Elevation
Satellite Azimuth
Satellite SNR
This data array is declared before the main programming loop so that the running of main programming loop would not reset or change the value of data array dedicated for recording highest possible SNR of all available satellites. There is a small part of the code in the main 44
program loop that compares the present value of SNR with the previous value and if the present SNR is higher than the previous recorded SNR then it replaces the previous values with newly arrived values which includes satellite PRN number, azimuth, and elevation and SNR.
Start
Manual rotation of antenna dish to cover all angles
Make a data array and update when higher value is available
Data array for recording highest possible SNR
If the satellite changes its orentation more than 5 degree in either elevation or azimuth then reset its value
Fig 5.7, Algorithm 1 5.6.4 Algorithm 2 This algorithm includes a declaration of another array for receiving and sorting satellites’ SNR which were found according to the current orientation of the antenna. For the purpose
45
of sorting, this data array is declared inside the main program so that it should be refreshed on every run of the main code. As the maximum number of satellites a GPS antenna can observe at a single instant is 1214 therefore, the data array is declared for 15. The next step is sorting of satellites with respect to their SNR. For this, standard sorting programming has been followed which takes SNR as the sorting criteria.
Start
Sorting of satellites according to SNR
Recording current SNR in Data array
Data array for currently available SNR
Fig 5.8, Algorithm 2 5.6.5 Algorithm 3 This is a special algorithm to check if the antenna is facing up towards the sky or not. There are two separate logics working behind this algorithm
Logic1: According to this, logic antenna facing up to the sky is likely to have more satellite of opposite azimuth as compared to antenna which is not facing the sky As seen in figure 5.9 below that there are six GPS satellites above the patch antenna. If the antenna is pointing toward the sky (90 degrees from the horizon) the percentage of finding GPS satellites with opposite azimuth around boresight angle is much more as compared to a situation when the antenna is facing toward or near 46
to the horizon (Elevation = 0 degrees). By “opposite” the author means a difference of 180 degree or near about between any two satellites’ azimuths. As it can be observe in fig 5.9 below that there are two instants
Fig 5.9, Logic related to azimuth and elevation
When a difference of 180 degrees between two satellites would be found and those satellites will have a very high SNR as compare to other visible satellites. Therefore, in sorting list they will be in the top 4.
47
Fig 5.10, Satellites with Opposite Azimuth Another way of explaining this is by observing the figure below which is basically a screen shot of mobile software for GPS known as GPS TEST.
48
Fig 5.11, Logic related to azimuth and elevation If the antenna in the above figure is pointing towards sky, then satellite number 3 should be nearest to the antenna boresight angle while satellite 15 should be the farthest. Satellite numbers 6 and 19 which are nearest to antenna boresight have azimuth difference of near 180 degrees (as already mentioned the term “opposite angles”). Logic 2: According to this logic if the antenna is facing up as elevation=90 degrees then the sum of elevation of top 3 satellites must be more than 200 degrees.
49
Fig 5.12, Logic related to Elevation While explaining elevation it was mentioned that 0 degrees elevation means that the satellite is on the horizon almost “touching” the earth and 90 degrees mean satellite right above your head. If the antenna is directed towards the sky direction it is likely to receive strongest signals from satellites that are near 90 degrees elevation. In other words, if top 2 or 3 satellites have elevation near 90 degrees or at least more than 70 degrees each then it’s absolutely certain that GPS patch antenna is facing in the upward direction. Combination of logics It is a possibility that in a certain situation one of the logic may show the negative output but it is highly unlikely to get the negative output from both of them together. For example, azimuth = 175 to 185 degrees can give true value even though it might not be correct. A True value means two of the top 4 satellites have azimuth difference of around 180 degrees. 50
One possibility for an incorrect output might be that one of the satellite gets blocked by some building and now the comparison is done between top 5 and not top 4. The other reason could have been that the antenna might be receiving some reflected signals of the satellite with strong SNR. The satellite might be behind the patch antenna but due to reflection from a nearby object it might appear in front of the antenna. Similarly, error might occur in logic for elevation. Both these logics are combined in AND logic combination and the parameters are set at such tight margin that they will only give upward direction when it is certainly facing towards sky so if both of the logics detect the upward direction the algorithm will declare direction of antenna upward or elevation=90 degrees. Optimization of equation Optimization was one of the key steps in getting the good results. Too loose range (160200 for azimuth) means computer will show sky direction Even thought it might be slightly downward and too tight range (178-182 for azimuth) mean computer would not show sky direction even though it might be facing the sky. Same goes for ranges for elevation. After a long period of testing which was spread over 24 hours, the azimuth range was set 175 to 185 degrees and elevation as S1+S2+S3>200 degrees.
51
Start
Check if the elevation sum of top 3 satellite is above 200 degree
Check in top 4 satellite for a pair of satellites 180 degree apart Check for both conditions to be true
Display Elevation as 90 degrees
Fig 5.13, Algorithm 3 5.6.6 Algorithm 4 This algorithm checks if the GPS patch antenna is pointing directly at a particular satellite. Recall algorithm 1 in which the sky was swept manually to record highest possible SNR of all the satellite available in the sky over the antenna. Also, recall Algorithm 2 where SNR of the current available satellite with a certain orientation of antenna was saved and sorted according to SNR values. Algorithm 1 and 2 were implemented so that Algorithm 4 could be implemented later on. This Algorithm compares results of Algorithm 1 and 2 to check if the antenna is directly pointing toward a particular GPS satellite
52
Start
Data array of highest possible SNR
Data array of SNR at current instant
Check whether the current highest SNR is at its highest possible value
Display the orientation of current highest satellite as orientation of antenna
Fig 5.14, Flow chart for algorithm 4 5.6.7 Algorithm 5 Algorithm 5 comes into action when the all other algorithm gives result in negative. This means neither the patch antenna is facing upward nor directly facing toward a GPS satellite. The algorithm assumed that the antenna is facing toward a space between two satellites. It takes averages of azimuth and elevation and then optimizes the results by shifting the calculated averages of azimuth and elevation toward the satellite which has higher SNR. The difference between SNR of two satellites actually dictates the weight that would be given to higher satellite. If both satellites have exactly similar SNR then average of their azimuths and elevations will be taken as azimuth and elevation of the GPS antenna. 53
Start
Take average between 1st and 2nd Satellites
Calculate the difference between SNR of 1st and 2nd Satellites and Calculate Gain
Move the average point towards highest satellite by applying Gain
Display final calculated orientation
Fig 5.15, Flow chart for algorithm 5
Weight applied to average Weight is applied to both azimuth and elevation by a simple formula which utilized the difference between SNR of two GPS satellite (1st and 2nd on SNR list) as well as the difference between azimuths or elevations of satellites and their average mid-point. Difference between SNR of two satellites SNR = SNR SNRsat1 SNRsat 2
54
(5.2)
avgAmid
1 ( Azimuthsat1 Azimuthsat1 ) 2
(5.3)
Difference between average azimuth and azimuth of 1st satellite =
A avgAmid Azimuthsat1
(5.4)
Final azimuth point = Azimuth final avgAmid (A * SNR *0.16)
(5.5)
The source for this formula is practical experiments conducted for a continuous period of time in different time of the day. The table below can give the reader an idea about the evolution of it. Table 5.2, Weight relationship Difference between SNR 0 dB
Weight gain
Final factor
0.16
0
Assumptions (Based on practical experiments)
Patch antenna is toward midpoint of two satellites 1 dB 0.16 0.16 Adjustment according to weight 2 dB 0.16 0.32 Adjustment according to weight 3 dB 0.16 0.48 Adjustment according to weight 4 dB 0.16 0.64 Adjustment according to weight 5 dB 0.16 0.8 Adjustment according to weight 6 dB 0.16 0.96 Patch antenna is directed completely towards a satellite which has highest SNR The same formula is applied for elevation also .0.16 mean than SNR difference should be above 6 dB to shift the average azimuth or elevation toward the 1st satellite. On average, a difference of 0 to 4 dB has been observed. 0 dB difference means that the midpoint is the final calculated point.
55
5.6.8 Algorithm 6 In this algorithm the difference between the present and previous values of azimuth and elevation has been taken and then the difference is divided by time over which those observations were taken to get turn rates for both azimuth and elevation.
Start
Save presentation Orientation and time at which it was measured
Take a 2nd reading of orientation and time at which it was measured
Calculate change in orientation in time delta t
Divide the change in orientation with change in time delta t
Display the results as rates of orientation
Fig 5.16, Flow chart for algorithm 6 5.6.9 Algorithm 7 This algorithm address the problem of azimuth angles which are around North Pole or azimuth = 0 degrees. This could be understood by just imagining the practical difference 56
between azimuth of 350 degrees and 10 degrees. Of course, the difference is 20 degrees but mathematical equation will give 340 degrees. To overcome this problem, the angles are first converted by applying tangent and after calculation, the tangent inverse is applied to obtain angles in degrees.
Start
Check whether the azimuth of top three satellites is above 300 and below 60
Apply tangent on azimuth values before applying formula
Apply any require calculation
Apply tangent inverse to get angles in degrees
Fig 5.17, Flow chart for Algorithm 7
57
Improved Algorithm for future After finishing the thesis the author continued his work on further improvement and designed another algorithm with even better possible results. The algorithm will be based on triangulation. Probability circles will be drawn around top 4 satellites. The radius of those circles will depend on difference of satellite’s current SNR and highest possible SNR .The point on which those circles will intersect each other and would give the point toward which the antenna is pointing. The benefit of this algorithm is that it will take into account both azimuth and elevation simultaneously and it will also remove error due to lower SNR of satellites near the horizon.
Fig 5.18, Algorithm for future
58
CHAPTER 6 ERRORS AND SOURCES Error Study The error study of coarse attitude determination covers the errors from different aspects. Some of the errors are inherent and cannot be removed while some have been taken care of and recommendations have been derived for future research. Error due to antenna lobe This is an inherent type of error which appears due to the geometry of antenna lobe. In order to understand this error, one must first analyze the geometry of the antenna lobe. In general, the patch antenna has several lobes with major and some minor lobes but the method blocks all lobes except the front lobe. The geometry of main front lobe at antenna side is no wider than the area of the patch antenna but at the other end, the diameter of the lobe is very wide. That wider diameter of antenna lobe is the source of error as within that wide end of the lobe and precisely inside (5 degrees) around boresight vector the SNR variation response would be very minute or none. One possible option is by physically narrow down the lobe by putting the antenna in some cylindrical structure but that will also effect GDOP of GPS which will ultimately affect the basic function of GPS and that is coordinate finding. Without location of receiver, we cannot find out the azimuth and elevation of any GPS satellite.
59
Fig 6.1, Error due to antenna lobe width
There is another method which needs further research and that is of using two separate antennas. In that method one GPS receiver will be fully open to accurately locating its own position, azimuth, and elevation with respect to different satellites and the other GPS reciver is fully covered in cylindrical structure to have desire narrow antenna beam for minimum error. Only practical research can tell how effective that method might be. It is one of the major reason why SNR based attitude determination methods have accuracy limited to 5 SNR degradation due to lower elevation
The source of this error is signal degradation of satellites near the horizon, which though understandable but highly undesirable. One method of overcoming this error is by calculating degradation pattern according to changes in elevation and then applying appropriate gain to satellites which have lower SNR due to the lower elevation. The Author has tried to do so but due to complexity had to leave it for future research.
60
Fig 6.2, Signal degradation
Error due to troposphere and Ionosphere Ionosphere and troposhere creates error in basic working of GPS but ionosphere is also responsible for creating error in orientation determination of patch antenna.
Fig 6.3, Refraction Error
61
This problem is similar to that of catching a fish under water with an arrow or hunting of insect by an underwater fish.
Fig 6.4, Refraction in fishing
Fig 6.5, Refraction compensation by hunter fish 62
The major effect of ionosphere is not the refraction but the added delay in signals as signal with higher frequency pass through it comparitivly slower as compare to signals with lower frequency. The ionosphere signal delaying error is evident on pseudorange error.
In short satellite at lower elevation will show their highest SNR above their actual elevation angle and that difference will create an error. To overcome this error a research is needed on the amount of refraction a signal has to face depending upon elevation as well as the effects of atmospheric temperature on the refractive behavior of ionosphere. The good news about ionosphere related error is that the Cube Sat is likely to be launched above ionosphere and thus can escape from the refractive properties of the ionosphere.
Fig 6.6, Earth atmosphere layers 63
Leakages of side lobes Although the author tried his best to ensure blockage of side and back lobes of patch antenna still there is a chance of leakage and the blocking procedure needs some up gradation to work more precisely.
Fig 6.7, antenna shielding
Error due to signal multipath Like in normal operation of GPS to find location, GPS multipath also affects the accuracy in attitude determination of patch antenna though the logic behind both those errors is entirely different.
Fig 6.8, Error due to multipath
64
In normal GPS operation the error generated by multipath error results in signal distortion and delay which increases error in longitude and latitude.
Fig 6.9, Multi path
The error in location will also have an indirect effect on orientation/coarse attitude determination but the margin will be little as a very large error in location can only add a significant error in azimuth or elevation. The actual error multipath signal adds in orientation determination is in directional vector between receiver and GPS. Basically, the satellite may also appear in that direction where it is actually not but only because its reflected signal is coming from that direction make it falsely appear in that direction. Recall the algorithm of sorting based upon SNR value. A reflected signal can change the sorting of the satellites in a undesired way which can completely change the results of the whole algorithm and in some case (practically experience) a user may find orientation resulting toward the South though the antenna might be facing North in reality. 65
Signal blockage by building The system is built while keeping in mind its application for CubeSat but it had to be tested on ground. Buildings around testing point were a big a problem. The ideal roof would be roof of MCB towers Karachi but that need lot of written application, clearances and time which the author didn’t have.
Fig 6.10, Urban Canyon
The phenomenon is also known as urban canyon as the cavity between two buildings behaves like a canyon.
66
Fig 6.11, Signal blockage by buildings
67
CHAPTER 7 RESULTS AND CONCLUSIONS Measurements techniques
The Results of azimuth, elevation and rates are taken and given below. The tools used for the measurements are magnetically corrected compass (true north), a geometrical instrument for measuring degrees and references from google map pictures .As discuss earlier due to an inherent error of 5 degree, high accuracy of measuring instruments was not necessary.
Fig 7.1, Measurements tools
68
Fig 7.2, Measurements tools
Results for Azimuth Azimuth errors were lower when the top satellite is between 30 to 60 degrees elevation. And worst when the elevation of the top satellite is near 0 degrees or around 80 degrees.
69
Table 7.1 Reading for Azimuth Sr
Magneto meter/
Reading via
Error in
(error/180)*100
No
Google map
SNR of GPS
degrees
Comparison with maximum possible error
1
0
355
5
2.8
2
20
27
7
3.9
3
40
43
3
1.7
4
60
48
12
6.7
5
80
87
7
3.9
6
100
90
10
5.6
7
120
128
8
4.4
8
140
132
8
4.4
9
160
160
0
0.0
10
180
173
7
3.9
11
200
213
13
7.2
12
220
214
6
3.3
13
240
231
9
5.0
14
260
267
7
3.9
15
280
266
14
7.8
16
300
303
3
1.7
17
320
300
20
11.1
18
340
334
6
3.3
19
360
357
3
1.7
7.79
4.3
Averages
70
Results for Elevation
Elevation error is lowest between 30 to 60 degrees and worst near the horizon and around 80 degrees. The error also depend on GDOP of a satellite. More satellite with 30 degrees of antenna bore sight angle mean better accuracy. Table 7.2 Readings for Elevation Readings for Elevation Magneto
Reading via
(error/90)*100 Error in
Sr
meter/
SNR of GPS
Comparison with maximum
Comment
degrees Google map
In degrees
possible error
1
0
20
20
22.2
2
15
25
10
11.1
Horizon Error above horizon result start to improve
3
30
40
10
11.1
4
45
51
6
6.7
5
60
45
10
15
6
75
55
20
22.2
7
80
90
10
11.1
8
85
65
20
20
9
90
90
6
6.7
13
14
Averages
Elevation =90 , >80
Elevation calculation is affected by the unavailability of satellites near horizon and inaccuracy when elevation is near 90. GDOP is bad for elevation as compared to AZIMUTH
71
Results for Turn rates Rates are calculated from the value of azimuth and elevation so they will have the same error as that of elevation and azimuth had. Table 7.3 Readings for Azimuth and Elevation Turn rates
Azimuth rates Rates in degree/s Initial position After 1st second After 2nd second Final position Difference between positions Integration of rates
175 degrees -35 -27 111degrees -64 degrees -64 degrees
Elevation rates Rates in degree/s Initial position After 1st second After 2nd second Final position
15 degrees -15 -55 85 degrees
Difference between positions
70 degrees
integration of rates
70 degrees
72
Elevation calculation is affected by unavailability of satellites near horizon and inaccuracy when elevation is near 90
Conclusion The method provides a very easy and cost effective solution for orientation / coarse attitude determination for multiple applications. Without increasing cost or weight it can provide a redundancy orientation sensor for CubeSat. Average of up to 8 degrees accuracy was achieved for azimuth while 15 degrees was achieved for elevation. The results can further improve after the removal of error sources highlighted in this thesis.
73
CHAPTER 8 FUTURE RESEARCH The practical results are more reliable as compared to any simulation. The practical work has given a hint toward areas which need further research and will definitely improve results in the long terms and may also benefit other related areas also. The areas are as follows Antenna Lobe Further research is needed in antenna design selection and its gain pattern. The more precise design will able the user to predict the SNR at a specific orientation and thus help to omit the need of manual calibration which is needed at the start. SNR Attenuation due to Elevation This particular area is wide open for further research and will significantly improve results to a larger extent. Another thing which needs a parallel research is the effect of temperature and day timing. Refraction due to Ionosphere The refraction due to ionosphere increases as satellite elevation decreases and due to this refraction the satellite is seen above its actual elevation which is counterproductive for orientation determination but fortunately this is not applicable to the satellites in orbit.
74
Algorithm Optimization Further research is needed for optimizing the algorithm used in this thesis. In fact, some entire different algorithm may also be tried for the search of accuracy but that is only possible after minimizing the errors mentioned above. Inclusion of Other Satellite Systems Several other systems such as GLONASS (Russia) are already underway or planned to be operational in near future such as GALILEO (Europe) and BeiDou (China). The inclusion of these systems will increase the satellite concentration on the sky. More satellites will definitely increase accuracy of the system.
Fig 8.1, Other GNSS
75
REFERNCES Print References Books [1] James bao– Yen tsui, “Fundamentals of Global Positioning System Receivers (A Software Approach)”, 1st edition [2] Mohinder S. Grewal, Lawrence R. Weill, Angus P. Andrews, “Global Positioning Systems, Inertial Navigation and Integration” [3] Pratap misra, Per Enge, “Global Positioning Systems, Signals, Measurements and Performance” [4] Robert J. Schoenbeck, “Electronic Communications (Modulation and Transmission)” [5] Brian Evans, “Beginning Arduino Programming (Writing Good Code for the Most Popular Embedded Board in the World)” [6] Huaguang Zhang, Derong Liu, “Fuzzy Modeling and Fuzzy Control”, Boston. Basel.Berlin. Birkhauser, 2006
Research papers [7] Axelrad, P., and Behre, C. P., “Satellite Attitude Determination Based on GPS Signalto-Noise Ratio,” Proceedings of the IEEE, Vol. 87, No. 1, 1999, pp. 122–144. [8] Duncan C. B., Dunn C. E., 1998, “Estimating Attitude from GPS Measurements on One Antenna”, Technical Support Package, NASA Tech Brief, Vol. 22, No. 6, Item #107 [9] Hashida Y., Unwin M. J., 1993, “Satellite Attitude from a Single GPS Antenna”, Proceedings of the ION GPS-93, pp 355-363, Salt Lake city, UT [10] John L. Crassidis., F. Landis Markley., “A New Algorithm for Attitude Determination Using Global Positioning System Signals.”. [11] Wang C, Walker R. A., Enderle W., 2002, “Single Antenna Attitude Determination for FedSat”, Proceedings of the ION GPS-2002, pp. 1064-1074, Portland, Oregon
i
[12] S. Syed and M.E. Cannon. “Fuzzy Logic Based-Map Matching Algorithm for Vehicle Navigation System in Urban Canyons”.2004 [13] E. Glenn Lightsey¤ and Jared Madsen., 2003 “Three-Axis Attitude Determination Using Global Positioning System Signal Strength Measurements”, University of Texas at Austin, Austin, Texas [14] C. E. Cohen, “Attitude determination,” in Global Positioning System: Theory and Applications, Vol. II (Progress in Astronautics and Aeronautics series), vol. 164, B. W. Parkinson and J. J. Spilker, Jr., Eds. Washington, DC: AIAA, 1996, pp. 519–538. [15] J. R. Carpenter and R. M. Hain, “Precise evaluation of orbital GPS attitude determination on the STS-77 GPS attitude and navigation experiment (GANE),” in Proc. ION National Technical Meeting, Santa Monica, CA, Jan. 1997, pp. 387–398. [16] J. K. Brock, R. Fuller, B. Kemper, D. Mlecsko, J. Rodden, and A. Tadros, “GPS attitude determination and navigation flight experiment,” in Proc. ION GPS-95, Palm Springs, CA, pp. 545–554. [17] L. M. Ward, “Spacecraft attitude estimation using GPS: Methodology and results,” Ph.D. dissertation, Dep. Aerospace Eng. Sci., Univ. Colorado, Boulder, Aug. 1996. [18] C. P. Behre, GPS Based Attitude Algorithms for Low Cost Satellite Missions, Ph.D. dissertation, Dep. Aerospace Eng. Sci., Univ. Colorado, Boulder, Dec. 1997. [19] C. J. Comp and P. Axelrad, “An adaptive SNR-based carrier phase multipath mitigation technique,” IEEE Trans. Aerospace Electron. Syst., vol. 34, pp. 264–276, Jan. 1998.
Internet [20]GPS/MET home page, University Corporation for Atmospheric Research. http://pocc.gpsmet.ucar.edu/ [21]Orbital Sciences home page. [Online.] Available http://www.orbital.com/ [22]Institute of Space Technology http://www.ist.edu.pk [23]Wikipedia: Global Positioning System https://en.wikipedia.org/wiki/Global_Positioning_System ii
[24]Wikipedia: Antenna https://en.wikipedia.org/wiki/Antenna_(radio) [25]Garmin: GPS http://www8.garmin.com/aboutGPS [26]Arduino: https://www.arduino.cc/ https://www.arduino.cc/en/Main/Software https://www.arduino.cc/en/Main/ArduinoBoardMega2560 https://forum.arduino.cc/ [27]Code library for GPS http://arduiniana.org/libraries/tinygpsplus/ [28] Radars https://en.wikipedia.org/wiki/Radar
Picture Credits • • • • • • • • • •
Wikipedia Xenon.colorado.edu How-gps-works.com Cyberphysics.co.uk Diydrones.com Globalspec.com Thescienceforum.com Arduino.cc Ublox.com Roundsolution.com
iii