amrit thesis

128
i Attitude Determination and Control System for Nanosatellites by AMRIT SAGAR to the DEPARTMENT OF MECHANICAL ENGINEERING INDIAN INSTITUTE OF TECHNOLOGY KANPUR May, 2010

Upload: shantanu-agarwal

Post on 09-Feb-2016

111 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: Amrit Thesis

i

Attitude Determination and Control

System for Nanosatellites

by

AMRIT SAGAR

to the

DEPARTMENT OF MECHANICAL ENGINEERING

INDIAN INSTITUTE OF TECHNOLOGY KANPUR

May, 2010

Page 2: Amrit Thesis

ii

Attitude Determination and Control

System for Nanosatellites

A Thesis Submitted

in Partial Fulfilment of the Requirements

for the Degree of

MASTER OF TECHNOLOGY

by

AMRIT SAGAR

to the

DEPARTMENT OF MECHANICAL ENGINEERING

INDIAN INSTITUTE OF TECHNOLOGY KANPUR

May, 2010

Page 3: Amrit Thesis

ii

CERTIFICATE

Page 4: Amrit Thesis

iii

Statement of Thesis Preparation

1. Thesis title: “Attitude Determination and Control System for Nanosatellites”

2. Degree for which thesis is submitted: “Master of Technology”

3. The thesis guide was referred to for the thesis preparation :Yes

4. Specifications regarding thesis format have been closely followed :Yes

5. The contents of the thesis have been organized according to the guidelines :Yes

6. The thesis has been prepared without resorting to plagiarism :Yes

7. All sources used have been cited appropriately :Yes

8. The thesis has not been submitted elsewhere for a degree :Yes

(Signature of Student)

Name: Amrit Sagar

Roll no.: Y5827063

Department: Mechanical Engineering

Page 5: Amrit Thesis

iv

ABSTRACT

Attitude Determination and Control System (ADCS) is a key component of satellites

and other spacecraft, and is used to estimate and control the orientation of the

spacecraft in the zero gravity orbital environment. Nanosatellites are fast becoming a

useful platform for the design, development, and testing of various new technologies in

space. ADCS in nanosatellites are constrained by size and power considerations, but

retain most of the requirements of large satellites. This thesis describes the design and

development of the ADCS developed for the nanosatellite 'Jugnu'. A tri-axis

magnetometer and extended Kalman filtering based ADCS system is designed and

developed for Jugnu. The system involves reaction wheels and magnetorquers for

actuation and keeps the satellite in a 3-axis stabilized state. It provides an estimation

accuracy of 1 degree and a pointing accuracy of 3 degrees.

This thesis defines the role of the ADCS in Jugnu. The ADCS design and algorithms

developed for attitude estimation and control in the various modes of operation are

described. The hardware specifications and calibration processes are explained. A

detailed literature survey is also presented to justify the selection of sensors and

actuators.

Page 6: Amrit Thesis

v

Acknowledgement

I am extremely grateful to my mentor, Prof. N. S. Vyas for his guidance, constant

support and encouragement. Under his mentorship, I got the opportunity to work in an

enriching environment where I could explore my subject to the fullest while working in

a team of highly competent individuals, and I am thankful for the same.

I would like to thank Prof. S. G. Dhande for his motivational support. My various

interactions with him have been very inspirational and I hold them dear.

I extend my thanks to Prof. Hari B. Hablani and Prof. Sudhir Kamle for their patient

and unending support throughout the duration of the project.

I would like to thank all my friends and colleagues, specially Shantanu Agarwal, Anuj

Sharma, Ruchira Chobisa, Shashank Chintalagiri, Sri Karun, Saket Saurav and

Ravikant for their invaluable support. I also thank Ankesh, Ankush and especially

Khsitij for helping me with the electronics hardware and the HIL simulations. Among

my juniors, I would like to thank Parul, Mayank, Aryaman, Abhishekh, Vashistha and

Anshul. I would also like to give my thanks to the lab staff that take care of all the

minute details that go into making a conceptual project a reality.

Above all, I am blessed with caring parents who have given me full freedom to explore

whatever I wish and have always supported me in my decisions. I extend my deepest

gratitude to my parents and my sister for their invaluable love, affection,

encouragement and support.

Page 7: Amrit Thesis

vi

Table of Contents

CERTIFICATE II

STATEMENT OF THESIS PREPARATION III

ABSTRACT IV

ACKNOWLEDGEMENT V

CHAPTER 1 1

INTRODUCTION 1

1.1 THE ‘JUGNU’ NANOSATELLITE 1

1.2 SYSTEM SPECIFICATIONS 3

1.3 ROLE OF THE ADCS IN JUGNU 4

1.4 MODES OF OPERATION OF THE ADCS 4

1.5 THESIS ORGANIZATION 5

CHAPTER 2 6

LITERATURE REVIEW 6

2.1 SENSORS 6

2.1.1 Sun Sensor 7 2.1.2 Star Tracker 8 2.1.3 Horizon Sensor 8 2.1.4 Gyroscopic sensor 8 2.1.5 Magnetometer 9

2.2 ACTUATORS 12

2.2.1 Permanent Magnet 13 2.2.2 Spin Stabilization 13 2.2.3 Gravity Gradient 13 2.2.4 Reaction Wheel 13 2.2.5 Reaction Control System, RCS 14 2.2.6 Torque Coils 14 2.2.7 Torque Rods 14

CHAPTER 3 16

SATELLITE ORBIT AND OPERATIONAL MODES 16

3.1 REFERENCE FRAMES 16

3.2 SATELLITE’S POSITION IN THE ORBIT 20

3.3 OPERATIONAL MODES 23

3.3.1 Suspended Mode 23 3.3.2 Detumbling Mode 23 3.3.3 Attitude Acquire Mode 23 3.3.4 Maneuvering Mode 23 3.3.5 Stabilization Mode 24 3.3.6 Momentum Dumping Mode 24 3.3.7 Earth Pointing Mode 24

Page 8: Amrit Thesis

vii

CHAPTER 4 26

ATTITUDE ESTIMATION 26

4.1 ALGORITHM DESCRIPTION AND ANALYSIS 26

4.1.1 Singularity Elimination 27 4.1.2 Derivation of the state equation 28 4.1.3 Dynamic equations 30 4.1.4 State Equation Linearization 32 4.1.5 Relation between measurement vector and the state vector 34 4.1.6 State vector propagation 35 4.1.7 Flowchart 39 4.1.8 Use Case diagram 40 4.1.9 Simulation Results 41

CHAPTER 5 48

ATTITUDE CONTROL 48

5.1 DETUMBLING MODE 48

5.1.1 Algorithm Description and Analysis 48 5.1.2 Flowchart 50 5.1.3 Use Case diagram 51 5.1.4 Simulation Results 52

5.2 MANEUVERING MODE 55

5.2.1 Sun vector determination 55 5.2.2 Algorithm description and analysis 56 5.2.3 Implementation of four reaction wheels 63 5.2.4 True state propagation 66 5.2.5 Flowchart 68 5.2.6 Use Case diagram 69 5.2.7 Maneuvering Mode Results 70

5.3 PID STABILIZATION MODE 75

5.3.1 Algorithm description and analysis 75 5.3.2 Flowchart 78 5.3.3 Use Case diagram 79 5.3.4 Simulation results 80

5.4 MOMENTUM DUMPING MODE 86

5.4.1 Algorithm description and analysis 86 5.4.2 Flowchart 89 5.4.3 Use Case diagram 90 5.4.4 Simulation results 92

5.5 EARTH POINTING MODE 94

5.5.1 Algorithm description and analysis 94 5.5.2 Simulation results 95

CHAPTER 6 98

HARDWARE SPECIFICATION 98

6.1 SENSOR 98

6.2 ACTUATORS 99

6.2.1 Design and analysis of torque coils 99

Page 9: Amrit Thesis

viii

6.2.2 Reaction wheels arrangement 103

CHAPTER 7 104

CONCLUSION 104

SCOPE OF FUTURE WORK 105

APPENDIX A 108

TWO LINE ELEMENT DESCRIPTION 108

APPENDIX B 110

QUATERNION KINEMATICS 110

Page 10: Amrit Thesis

ix

List of Figures Figure 1.1 Jugnu subsystems block diagram 2

Figure 3.1 ECI frame in the ecliptic plane and the equatorial plane 17

Figure 3.2 Orbital parameters 18

Figure 3.3 True anomaly, Eccentric anomaly and mean anomaly 20

Figure 3.4 Satellite’s mode sequence 25

Figure 4.1 Attitude estimation flowchart 39

Figure 4.2 Attitude acquire mode use case diagram 40

Figure 4.3 True and estimated quaternion ( ) w.r.t. inertial frame 41

Figure 4.4 True and estimated quaternion ( ) w.r.t. inertial frame 41

Figure 4.5 True and estimated quaternion ( ) w.r.t. inertial frame 42

Figure 4.6 True and estimated quaternion ( ) w.r.t. inertial frame 42

Figure 4.7 True and estimated angular rate of the satellite 43

Figure 4.8 True and estimated disturbance torque 43

Figure 4.9 Attitude quaternion estimation error and error boundary 44

Figure 4.10 Angular rate estimation error and error boundary 44

Figure 4.11 Disturbance torque estimation error and error boundary 45

Figure 4.12 Innovation of Extended Kalman Filter 45

Figure 4.13 Angular error between true and estimated attitude 46

Figure 4.14 True and estimated magnetic field in the body frame 46

Figure 4.15 Angular momentum of the satellite in the inertial frame 47

Figure 4.16 Angular momentum of the satellite in the body frame 47

Figure 5.1 Detumbling mode flowchart 50

Figure 5.2 Detumbling mode use case diagram 51

Figure 5.3 Angular rate of the satellite 52

Figure 5.4 Magnitude of angular rate of the satellite 53

Figure 5.5 Rate of change of magnetic field 53

Figure 5.6 Magnitude of rate of change of magnetic field 54

Figure 5.7 Required magnetic moment 54

Figure 5.8 Sun vector in body frame 56

Figure 5.9 Commanded angular rate profile for maneuvering 58

Figure 5.10 Control law for the Maneuvering mode 60

Figure 5.11 Maneuvering mode flowchart 68

Figure 5.12 Maneuvering mode use case diagram 69

Figure 5.13 Angular rate of the satellite 70

Figure 5.14 Angle rotated by the satellite during maneuvering 70

Figure 5.15 Actual and target quaternion during maneuvering 71

Figure 5.16 Reaction wheel speeds during maneuvering 71

Figure 5.17 Total control torque acting on the satellite 72

Figure 5.18 Proportional torque acting on the satellite 73

Figure 5.19 Derivative torque acting on the satellite 73

Figure 5.20 Feed forward torque acting on the satellite 74

Page 11: Amrit Thesis

x

Figure 5.21 Gyric torque acting on the satellite 74

Figure 5.22 Control law for the PID stabilization mode 76

Figure 5.23 PID stabilization mode flowchart 78

Figure 5.24 PID stabilization mode use case diagram 79

Figure 5.25 Angular rate of the satellite 80

Figure 5.26 Angle rotated by the satellite during PID stabilization mode 81

Figure 5.27 Actual and target quaternion of the satellite 81

Figure 5.28 Reaction wheel speeds during PID stabilization mode 82

Figure 5.29 Total control torque acting on the satellite 82

Figure 5.30 Proportional torque acting on the satellite 83

Figure 5.31 Integral torque acting on the satellite 83

Figure 5.32 Derivative torque acting on the satellite 84

Figure 5.33 Gyric torque acting on the satellite 84

Figure 5.34 Feed forward torque acting on the satellite 85

Figure 5.35 Control law for the Momentum dumping mode 88

Figure 5.36 Momentum dumping mode flowchart 89

Figure 5.37 Momentum dumping mode use case diagram 90

Figure 5.38 Reaction wheel speeds during Momentum dumping mode 92

Figure 5.39 Required magnetic moment during Momentum dumping mode 93

Figure 5.40 Magnetic torque acting on the satellite 93

Figure 5.41 Attitude quaternion w.r.t. LVLH frame 95

Figure 5.42 Angular rate of the satellite 96

Figure 5.43 Reaction wheel speeds during Earth pointing mode 96

Figure 5.44 Total control torque acting on the satellite 97

Figure 6.1 HMR2300 digital Tri axis magnetometer 98

Figure 6.2 PCB based torque coils 102

Figure 6.3 Arrangement of four reaction wheels 103

Page 12: Amrit Thesis

xi

List of Tables Table 1.1 Jugnu specifications...................................................................................... 3

Table 2.1 Sensor survey summary .............................................................................. 11

Table 2.2 Actuator survey summary ........................................................................... 15

Table 4.1 Use case diagram description for Attitude acquire mode ............................. 40

Table 5.1 Use case diagram description for Detumbling mode ................................... 51

Table 5.2 Use case diagram description for Maneuvering mode ................................. 69

Table 5.3 Use case diagram description for PID stabilization mode ............................ 79

Table 5.4 Use case diagram description for Momentum dumping mode ..................... 91

Table 6.1 Torque coil design specifications .......................................................... 102

Page 13: Amrit Thesis

xii

Nomenclature

Rate of change of magnetic field

Magnetic field at ith instant

Time interval between two consecutive magnetometer readings

Magnetic moment vector

Scale factor for getting required magnetic moment

Current through the three torque coils

Number of turns in the torque coil

Area of the torque coils

Maximum available current

Angular rate

Disturbance torque

True attitude quaternion

True ten element state vector for Extended Kalman filter

Inertial tensor

Measurement noise matrix

True nine element state vector for Extended Kalman filter

White noise for the state equation in attitude estimation

Vector part of error quaternion

Error quaternion

Estimated quaternion

Transformation matrix from ten element state vector to nine

element state vector

Estimated nine element state vector

Estimated ten element state vector

Nine element error state vector

Error angular rate

Error disturbance torque

State dynamics matrix

True angular momentum of the satellite

Page 14: Amrit Thesis

xiii

True control torque

True known external disturbance torque

True total external torque

Estimated angular rate of the satellite

th true magnetometer measurement

Measurement noise during th measurement

th estimated magnetometer measurement

Error in th estimated measurement

Measurement sensitivity matrix

th magnetic field value in the inertial frame from IGRF model

Angular in one propagation step

Quaternion propagation matrix

State transition matrix

Process noise matrix

Kalman gain

Error covariance matrix

Sun vector in the ecliptic frame

Sun’s angular position from vernal equinox

Angular rate of earth around the sun

Sun vector in the ECI frame

Angle between ecliptic frame and ECI frame

Sun vector in the body frame

Body diagonal vector in the body frame

Total commanded angle for maneuvering

Commanded angle for maneuvering

Axis of rotation for maneuvering

Angular rate of the satellite during maneuvering

Angular momentum of the satellite in the body frame

Maximum controllable angular rate of the satellite

Limiting coefficient of the wheel angular rate

Maximum wheel angular momentum

Page 15: Amrit Thesis

xiv

Maximum controllable angular acceleration of the satellite

Commanded angular acceleration of the satellite

Limiting coefficient of the torque provided by each wheel

Maximum torque capacity of the wheel

Time for which satellite is accelerated during maneuvering

Total time for maneuvering

Commanded angular rate of the satellite

Time for which angular acceleration is zero during maneuvering

Commanded quaternion w. r. t. initial body quaternion

Commanded quaternion w. r. t. inertial frame

Initial body quaternion w. r. t. inertial frame

Commanded angular rate vector in the commanded frame

Commanded angular acceleration i the commanded frame

Attitude quaternion of the body frame w. r. t. inertial frame

Estimated attitude quaternion

Error quaternion

Rotation matrix corresponding to the error attitude quaternion

Error in the angular rate

Angular error

Damping coefficient of the controller

Reciprocal of the systems natural frequency

Proportional gain

Gyric torque acting on the satellite

Feed forward torque

Proportional torque

Derivative torque

Derivative gain

Total control torque

Spin angular momentum of the wheels in the body frame

Rotor inertia of each reaction wheel

Spin angular rate in the body frame of reference

Page 16: Amrit Thesis

xv

Spin angular rate in the wheel frame of reference

Spin angular momentum in the wheel frame of reference

Transformation matrix from the wheel frame to the body frame

Transformation matrix from the body fame to the wheel frame

Predicted wheel angular rates at th instant

Measured wheel angular rates at th instant

Actual control torque during th time step

Total PD control torque

Total PID control torque

Integral torque

Integral gain

Integral gain coefficient of the PID controller

Orbital angular rate of the satellite

Total external torque acting on the satellite

Excess wheel angular momentum in the wheel frame

Excess wheel angular momentum in the body frame

Maximum magnetic moment capacity along each orthogonal axis

Mean anomaly of the satellite in the orbit

Initial mean anomaly of the satellite

Eccentric anomaly of the orbit

True anomaly of the satellite in the orbit

Eccentricity of the orbit

Ascending node angle

Position vector of the satellite in the orbit frame

Semi-major axis of the orbit of the satellite

Position vector of the satellite in the ECI frame

Position vector of the satellite in the ECEF frame

Change in orbital angular rate of the satellite

Unperturbed orbital angular rate of the satellite

Zonal harmonic coefficient due to earth’s non spherical shape

Mean radius of earth

Page 17: Amrit Thesis

xvi

Inclination of the orbit of the satellite with the equatorial plane

Rate of change of ascending node angle

Magnetic permeability

Potential drop across the torque coil

Total resistance of the torque coils and the driver circuit

Torque coil resistance

Resistance of the torque driver circuit

Resistivity of the coil material

Depth of the coil layer

Abbreviations

TAM Tri Axis Magnetometer

PWM Pulse Width Modulation

OBC On Board Computer

PCB Printed Circuit Board

OBC1 On Board Computer 1

OBC2 On Board Computer 2

ADCS Attitude Determination and Control System

DC Direct Current

EI Ecliptic Inertial

ECI Earth Centred Inertial

ECEF Earth Centred Earth Fixed

RTN Radial Transverse Normal

LVLH Local Vertical Local Horizontal

PD Proportional Derivative

PID Proportional Integral Derivative

COTS Commercial Off The Shelf

TLE Two Line Elements

NORAD North American Aerospace Defence Command

SGP4 Simplified General Perturbation 4

LDR Light Dependent Resistor

Page 18: Amrit Thesis

1

Chapter 1

Introduction

In the recent past, nanosatellites have opened new avenues of technology. This has

given impetus to the growth of satellite technology in many countries. Academic

institutions along with the corporate world are involved in collaborative research and

development work. The main benefit of these low cost nanosatellites is that they serve

as a test bed for latest miniaturized technologies.

Typical nano/micro satellite applications include terrain–mapping, weather tracking,

disaster management, low gravity experiments, astronomical studies, global positioning

and geological studies. They are also very useful in scientific research. They are

extensively used in diverse experiments related to satellite communication, atmospheric

studies, low gravity behaviour, measurement of the Earth’s magnetic field etc. Various

missions are already under progress equipped with Spectrometers, Telescopes,

Magnetometers designed by several universities and companies.

The Attitude Determination and Control System (ADCS) is a crucial subsystem of the

nanosatellite as a majority of the aforementioned applications require estimation and

control of the spacecraft attitude to some degree. Remote sensing applications, for

example, require the imaging systems to be oriented towards the target area. The

specific requirements from such a system depend heavily on the payload and its

applications. In general, imaging payloads present the most stringent attitude control

requirements.

1.1 The „Jugnu‟ Nanosatellite

Jugnu is an attempt at implementing miniaturized space technologies and creating

opportunities for learning in the academic context. The Indian Space Research

Organization (ISRO) has helped the team in meeting with the necessary requirements

of the project. Jugnu should serve as a test bed for the next generation semiconductor

Page 19: Amrit Thesis

2

and other micro- and nano-technologies for space. It would also serve as a platform for

exploring possibilities of cost-effective space missions. Jugnu is proposed to be placed

in low-earth polar orbit at an altitude of about 700 km by ISRO’s Polar Satellite Launch

Vehicle (PSLV).

The Jugnu nanosatellite comprises of a number of subsystems. These subsystems can

be divided into two groups. The first group consists of subsystems which make up the

nanosatellite bus. The nanosatellite bus is a minimal system which provides a platform

for the launch of various payloads. The hardware and software developed for the

nanosatellite bus are designed to be flexible and reusable. The second group of

subsystems are the payloads. These payloads are generally mission-specific. Some

payloads may eventually be incorporated into the nanosatellite bus.

The satellite design is mostly indigenous. Non-space grade, commercial-off-the-shelf

(COTS) components are used to keep the cost low. Unlike conventional satellites which

have a large number of redundant systems, Jugnu has minimal redundancies at the

component level. Some redundancy is maintained at the functional level and efforts are

made to achieve single point failure tolerant design for the satellite.

Figure 1.1 Jugnu subsystems block diagram

In a nanosatellite, there are very stringent specifications for the weight and size of the

individual subsystems. Hence, the main technical challenge in nanosatellite

Page 20: Amrit Thesis

3

development is to design the subsystems fitting the specified dimensions without

compromising on their performance.

The design of Jugnu is compatible with the CubeSat standards proposed by California

Polytechnic State University, San Luis Obispo and Stanford University's Space

Systems Development Lab. This allows the use of COTS components with space

heritage, and ensures continued compatibility of the hardware designed with

international standards, for use in future missions. The satellite consists of various

Printed Circuit Boards (PCBs). All the components are mounted on these PCBs in a

manner that they are compatible with the 3U-Cubesat structure procured from Pumpkin

Inc. The PCBs are stacked using stack-through connectors on them and are guided by

four screws which run along the length of the structure.

1.2 System Specifications

Following is the detailed tabulation of the system specifications of ‘Jugnu’.

Table 1.1 Jugnu specifications

Orbit Sun Synchronous Polar Orbit, 500-850 Km

Data Storage Triple modular redundancy memory, SD card : 2 GB

Mass < 3 Kg Ejection System Mass : 3.5 Kg,

Nominal ejection speed :

1.5 m/sec

Structure 10 cm x 10 cm x 34 cm Power System Li-ion batteries, Surface

mounted Solar panels, Avg.

power requirement: 3

Watts

Imaging

(Payload)

Near IR range(770-860

nm), GSD - 200

m(approx.), Focal length- 35mm, F no.-4

Attitude

Determination

and Control System

3 axis stabilized, automatic

mode switching, attitude

estimation accuracy: 1 degree,

3 axis Magnetometer, 4

Reaction wheels, 3-axis

Magnetorquers

GPS

(Payload)

Position accuracy: 20 m ,

12 channels, Patch antenna

Thermal Control

System

Passive system- MLI, OSR,

Thermal Grease, Surface

Coatings

IMU (Payload)

3 axis, ADXL Accelerometers, 3 axis rate

Communication Telemetry: 437.505 MHz, FSK, 9600 bps.

Page 21: Amrit Thesis

4

gyros, delta-sigma ADC Uplink: 145.980 MHz, FSK, 1200 bps

Beacon: 437.275 MHz,

OOK

On Board Computer

(i)MSP 430(16 MHz) processor, 8 KB RAM and

128 KB Flash

(ii) ARM 7 core (AT91SAM7x), 64 KB

RAM, 512 KB flash

Ground Station Yagi- Uda (Downlink and Uplink), fully autonomous

tracking and control, GUI

at control station.

1.3 Role of the ADCS in Jugnu

The design of the attitude determination and control system in Jugnu is based on

attitude control requirements of the nanosatellite bus being developed as well as those

of the individual payloads. The nanosatellite bus depends on ADCS for sun tracking in

order to maintain system power levels and ground tracking for communication. In

addition, the navigational system which is part of the ADCS is used for scheduling

payload operations and other housekeeping activities by the on-board computer. The

payloads which are part of the Jugnu nanosatellite are:

1. Near IR Imaging System

2. GPS Receiver

3. Inertial Measurement Unit

The three payloads present different attitude control requirements from the ADCS. The

Near-IR Imaging system has the most stringent requirements in the form of high

pointing accuracy, and 3-axis stabilization.

1.4 Modes of operation of the ADCS

The attitude control system in Jugnu functions in various modes, depending on the

requirements of the spacecraft at that time. These modes are controlled by the On-

Board Computer (OBC). The OBC is able to take action to ensure maintenance of

satellite power levels, proper communication with ground station, and operation of

payloads. The modes of operation of the ADCS are described in Chapter 3. The use of

separate modes of operation allows flexibility in the operation of the satellite. This

flexibility is used by autonomous algorithms in the OBC to enhance system reliability.

Page 22: Amrit Thesis

5

1.5 Thesis Organization

Chapter 2 of this thesis covers the literature survey portion of the current work. It

briefly describes the different sensors and actuators available for ADCS. This chapter

also includes the hardware selection matrices which help in deciding the sensors and

actuators best suitable for the current nanosatellite project.

Chapter 3 gives the general description of a satellite orbit. It also has an overview of

different operational modes of the satellite and their sequence; it includes a flowchart

explaining the mode sequence followed by the onboard computer.

Chapter 4 gives the details of the Extended Kalman filter used to estimate satellite’s

attitude. It describes the state vector and the equations for propagating and updating it.

It includes the flowchart explaining the algorithm and the use case diagram showing the

dependencies on other hardware and modules of the satellite. The simulation results are

presented at the end of the chapter. Chapter 5 covers all the control modes and

algorithms used. It also includes the flowcharts, use case diagrams and simulation

results. Chapter 6 covers the specifications of the sensors and actuators selected. It also

gives the design details of the torque coils used and the relative arrangement of the four

reaction wheels.

Chapter 7 concludes the work and gives the algorithm performances. It also gives the

scope for future work in ADCS.

Appendices are given at the end of the thesis.

Page 23: Amrit Thesis

6

Chapter 2

Literature Review

The main functions of the subsystem are the estimation and control of the attitude of

the satellite. Generally, attitude determination part is significantly complex, in the case

of small satellites. This is mainly because of the limited number of sensors which will

fit into the small form factor of nanosatellites. In this chapter, various sensors and

actuators which are available for use have been presented. Advantages and

disadvantages of each have also been mentioned.

2.1 Sensors

Most of the sensors presented here are reference sensors. These sensors measure a

known vector in the satellite’s body frame of reference. This reference vector is already

known in the inertial frame through different analytical models depending on which

reference vector is in consideration. The objective is to find the rotation matrix of the

body frame with respect to the inertial frame thus by describing satellite’s complete

orientation in the inertial frame. However, it is not possible to get the complete rotation

matrix with the help of only one reference vector. So, either multiple sensors are used

or multiple measurements are taken from a single sensor to get the unique rotation

matrix. The latter choice is time consuming but cheap. Hence, it can be thought of as an

option in case of small satellites. The details of the algorithm and the use of Extended

Kalman Filter to estimate the spacecraft attitude are explained in Chapter 4 of this

thesis.

On the other hand, sensors like gyroscopes are not reference sensors. They measure the

angular rate of the satellite which can be integrated over time to get the orientation with

respect to some initial value. This means that some initial attitude must be known in

order to estimate the spacecraft attitude. Besides, gyros also show some continuous

drift in their measurements which causes errors to accumulate over time, making them

unsuitable for long term attitude estimation use.

Page 24: Amrit Thesis

7

Following is a brief description of different kind of attitude sensors typically used in

satellites.

2.1.1 Sun Sensor

Sun sensors are widely used in satellites for attitude determination, providing sun

vector measurement in spacecraft coordinates. If a vector pointing towards the sun

could be determined, this would aid the computing of the satellite attitude. As the

detection target, the sun has large energy output which makes sensing very easy. A sun

sensor in its simplest form is a photo diode on each side of the satellite which will tell

which side is most likely to be towards the sun. Another possibility for determining a

sun vector is utilizing measurements of the currents from the solar panels. A light

dependent resistor (LDR) could be placed on a side for determining whether it is

pointing towards the sun or not.

Analog Sun Sensor vs. Digital Sun Sensor

The direction to the sun can be measured in two different ways, both of them relying on

photocells. The first one, the analog sun sensor, measures the intensity of sunlight, and

the second one, the digital sun sensor, uses a pattern where different photocells are

exposed depending on the direction of the sun. Due to the measuring principles, there is

a trade-off between the accuracy and the size of the FOV (field of view) for both sun

sensors, i.e. either larger FOV but lower accuracy or higher accuracy but smaller FOV.

Traditional sun sensors with large FOV always lack the accuracy to satisfy the

requirement of high accuracy for satellite attitude determination subsystems. It is hard

to realize both high accuracy and large FOV in one sensor. The major technical

difficulty lies in that the resolution of the detector is limited, and the precondition for

realizing high accuracy and large FOV in one sensor is that the detector must have

enough pixels. The accuracy of a sun sensor also depends on its response to reflected

radiation from the Earth. Earth radiation usually affects analog sun sensors to a greater

degree.

Generally Digital Sun sensor gives better accuracy than analog sensors. Digital sun

sensors are also more complex than analog sensor in construction. Digital sun sensors

using photoelectric detectors like CCD (Charge Coupled Device) or APS (Active Pixel

Page 25: Amrit Thesis

8

Sensor) image sensors have an inherently higher accuracy. Currently, novel techniques

are being developed that give high accuracy as well as larger FOV with photoelectric

detector with fewer pixels. One such principle is optical vernier principle with which

better than 0.02◦ in the entire FOV of ±64

◦ can be realized. Sun sensors available

commercially, however, are either too large for their use in nanosatellites, or have a

very narrow FOV. They also tend to be much more expensive than other options.

2.1.2 Star Tracker

The star tracker is by far the most accurate attitude determination system available,

with accuracies down to a few thousands of a degree. The Charge Coupled Device

(CCD) or the Active Pixel Sensors (APS) produces an image of the stars. This image is

compared with an on board catalogue of the starry sky to determine the attitude. The

star tracker is, however, so heavy and big, especially the baffle needed to shield the

sensor from sun, earth, and moon shine, that it is infeasible for nanosatellites.

2.1.3 Horizon Sensor

The horizon sensor/scanner determines where the earth is relative to the spacecraft.

This is usually done by measuring the IR radiation from the earth. Usually only two

axes are determined, hence this sensor is best suited in combination with other sensors.

Accurate horizon scanners are relatively expensive and large, and hence not suited for

the nanosatellite applications.

2.1.4 Gyroscopic sensor

The gyroscope is not a reference sensor, but an inertial sensor. It measures angular

acceleration, and these measurements must be integrated twice to obtain the attitude

estimate. The integration leads to a drift which leads to the need for calibration. The

gyroscope is more suited in conjunction with other sensors, or for measuring rapid

changes in attitude. Gyro sensors will provide the angular acceleration of the satellite

about all three axes and thus provide monitoring of its actuators. The traditional

gimballed gyroscope is too big and heavy. A modern ring laser or piezo-electric

gyroscope is smaller, but much more expensive. MEMS gyro sensors usually contain a

silicon based vibration device and a custom designed integrated circuit for the

capacitive sensor circuitry. These devices operate on the principle of detecting an

Page 26: Amrit Thesis

9

induced Coriolis acceleration on a proof mass that vibrates along a direction orthogonal

to the axis about which the input rotation is applied. Hence, the rotation rate is

estimated by measuring the displacement of the proof mass in a direction orthogonal to

both the driven motion and the axis about which rotational motion is to be sensed.

MEMS gyroscopes are yet to be adequately proven in space, and are therefore not used

in the satellite bus. It may be used in future missions after Jugnu’s IMU is space-

proven.

2.1.5 Magnetometer

Magnetometers are simple, reliable and lightweight sensors carried on most spacecraft

as part of the attitude control system. A magnetometer can only be used in orbit close to

earth where the magnetic field is strong and well modelled. As Jugnu is to orbit at

approximately 700km, a Low Earth Orbit (LEO), this is feasible. The magnetometer

consists of three orthogonal sensor elements which measure the earth’s magnetic field

in three axes in the sensor frame. If the magnetometer is aligned with the satellites axes,

or the rotation matrix between the body and sensor frame is known, the magnetic field

in the body frame is obtained. The combination of three sensor elements mounted on an

orthogonal base make up a vector sensing system. A three axis magnetometer measures

directly the direction and intensity of the local magnetic field expressed in the sensor

frame. The attitude is determined from magnetometer by comparing the measured

geomagnetic field with a reference field determined by a reference model.

Following is a brief summary of all the different kinds of magnetometers available in

the market.

2.1.5.1 Induction Coil Magnetometer

The induction coil is one of the most widely used vector measurement tools, as well as

one of the simplest. It is based on Faraday’s law, which states that a changing magnetic

flux, φ, through the area enclosed by a loop of wire, causes a voltage e to be induced

which is proportional to the rate of change of the flux. The magnetometer thus consists

of one or more coils, and voltage measurements are used to calculate the magnetic

field.

Page 27: Amrit Thesis

10

2.1.5.2 Fluxgate Magnetometer

A fluxgate magnetometer is popular for use in many applications. Characteristically, it

is small, reliable, and does not require much power to operate. It is able to measure the

vector components of a magnetic field in a 0.1 nT to 1 mT range. The fluxgate

magnetometer is a transducer which converts a magnetic field into an electric voltage.

Fluxgates are configured with windings through which a current is applied. If there is

no component of the magnetic field along the axis of the winding, the flux change

detected by the winding is zero. If there is a field component present, the flux in the

core changes from a low level to a high level when the material goes from one

saturation level to another. From Faraday’s law, a changing flux produces a voltage at

the terminals of the winding proportional to the rate of change of the flux.

2.1.5.3 Magnetoresistive magnetometers

Although the fluxgate magnetometer gives the best performance with very low power

consumption, the magnetoresistive magnetometers are smaller in size and therefore

preferred. Honeywell (2003) produces an array of magnetoresistive magnetometers,

three of which are presented below.

i. The integrated circuit, magnetometer HMC 1001(1-axis)/1002(2-axis)

They both measure only 1.9 cm x2.54 cm. Using these IC sensors will require

additional interfacing and filtering hardware and software in the satellite, and to

obtain 3-axes measurements of the magnetic field, at least two of them are

necessary. When mounting these ICs on circuit boards above the spacecraft,

close attention must be paid to get them perfectly perpendicularly aligned. If

they are misaligned, the errors in measurement will make them unusable for

attitude estimation.

ii. The analog three-axis magnetometer HMC 2003

This is also a one-chip sensor with a 2.54x1.9cm footprint weighing only a few

grams, and using approximately 0.2 watts, maximum. This device has three

analog outputs giving full three-dimensional vector measurements of the

magnetic field. The device is also equipped with the possibility of setting an

offset on each of the three axes. This enables the possibility of measuring the

magnetic field and applying a control torque simultaneously, as the

magnetometer can be offset to compensate for the applied magnetic field. If

Page 28: Amrit Thesis

11

other on-board equipment produces well known magnetic field, this could also

be compensated for. However, it is not likely that such fields are well known or

modelled. The magnetometer requires an external degaussing circuit providing a

high voltage peak to reset the magnetometer.

iii. The digital smart magnetometer HMR 2300

The Honeywell HMR2300 is a three-axis smart digital magnetometer to detect

the strength and direction of an incident magnetic field. Three of Honeywell’s

magneto-resistive sensors are oriented in orthogonal directions to measure the

X, Y and Z vector components of a magnetic field. These sensor outputs are

converted to 16-bit digital values using an internal delta-sigma A/D converter.

Onboard EEPROM stores the magnetometer’s configuration for persistent

operation. The data output is serial full-duplex RS-232 or half-duplex RS-485

with 9600 or 19,200 data rates.

The summary of all the sensors mentioned above is given in the following table.

Table 2.1 Sensor survey summary

No. Component Name Features

1 Digital Sun Sensor Reference sensor

Sufficiently high accuracy

Low Albedo error

More complex in construction

2 Analog Sun Sensor Reference sensor

Low Accuracy

High Albedo error

3 Star Tracker Reference sensor

Very High Accuracy

Used for very fine pointing

Large Size

4 Horizon Sensor Reference sensor

Large Size

5 Magnetometer Reference sensor

Can be used in LEO satellites due to

the sufficiently high magnetic field at

low altitudes

IGRF model is generally used to

predict the orientation

Page 29: Amrit Thesis

12

6 Gyro sensor Inertial sensor

Gives angular acceleration about all

three axis

Acceleration integrated to get angular

velocity and position

MEMS gyro extremely small in size

Used along with the reference sensors

to get useful results

It is apparent from the above summary that for small satellites where orbit altitudes are

generally low, magnetometer is a good choice. For university nanosatellites, weight and

cost should be low and accuracy requirement is also not as high as those for high

bandwidth communication and defense applications. Hence, HMR 2300 from

Honeywell is chosen as the primary attitude sensor for the current work. The details of

the sensor are discussed in a later chapter.

2.2 Actuators

Actuation is a critical part of the ADCS. A working and stable system needs to be

developed to successfully complete our mission. The spacecraft is inherently unstable

and is submitted to torques engendered by its interaction with the environment and by

movement within the vehicle. Though the forces associated with these torques are not

normally sufficiently large to affect the orbit of a space vehicle, the torques can affect

the attitude of the spacecraft significantly. The torques of the environment (external) on

a planet-centric satellite can originate from solar radiation pressure, magnetic and

gravitational planetary fields, and free molecular forces (if the satellite is sufficiently

close to a planetary atmosphere). The possibility of impacts produced by meteorites and

particles of dust also exists. The torque that originates because of internal movements

can be taken care of by displacement of the load and by the movements and actions of

the occupants as well as by the ejection of propellants and other liquid.

A variety of actuators can be used to stabilize the satellite in the orbit. Out of many

kinds of actuators, few are available in the market and can be purchased where as some

can be fabricated in the laboratory with minimal fabrication capability. Some of the

typical actuators are described below.

Page 30: Amrit Thesis

13

2.2.1 Permanent Magnet

If a large permanent magnet is put in the spacecraft, this magnet will interact with the

earth’s magnetic field in much the same way as a compass. The south pole of the

magnet will be drawn towards the magnetic north pole of the earth, and vice versa. This

will lead to a slight tumbling mode with two revolutions per orbit and no possibilities

of controlling spin around the magnets axis. Without any other means of detumbling,

this will also be very slow.

2.2.2 Spin Stabilization

If the satellite rotates around one axis, the gyroscopic effect of this will reduce the

fluctuations on the other axes. The spin can be obtained in various ways. If the satellite

is coloured differently on each side, the solar pressure will be greater on the lighter

surfaces than on the darker ones. This however is a very slow method. Spinning could

also be obtained by a thruster and maintained by magnetic torquers. Instead of spinning

the entire satellite, a momentum wheel inside the satellite can do the same job.

2.2.3 Gravity Gradient

If a boom with a tip mass is deployed from the satellite, the innermost of the two

masses will be in a lower orbit and pull on the outermost, preferably the satellite. The

pull and the change in the satellites moment of inertia will stabilize the two axes

perpendicular to the boom. The challenge, especially on a nanosatellite, is the

construction and deployment of the boom. The boom should be stiff to avoid

oscillation, but must be stored in a small compartment of the satellite during launch.

2.2.4 Reaction Wheel

Reaction wheels use the rotational variant of Newton’s third law. If the action is

accelerating a wheel inside the spacecraft, the spacecraft will accelerate just as much in

the opposite direction. Three reaction wheels in an orthogonal configuration or four in a

tetrahedron configuration for redundancy may be used for attitude control. Reaction

wheels are the most accurate attitude control actuator for satellites.

Page 31: Amrit Thesis

14

2.2.5 Reaction Control System, RCS

A RCS utilizes Newton’s third law which states that every action has an equal and

contrary reaction. Some gas is propelled out of a nozzle and the satellite moves in

opposite direction. If the nozzles are not pointed directly away from the center of

inertia this will lead to rotational torques as well. The gas is stored in a tank on board

the satellite. Thrusters are mounted in pairs to generate the momentum needed for

control. The RCS is highly accurate, but is large and heavy, and will eventually have

spent all the available gas, and will thus not perform for long without a very large tank.

This makes it unsuitable for use in nanosatellites.

2.2.6 Torque Coils

The torque coil is simply a long copper wire, wound into a coil. The coils will produce

a torque given as

(2.1)

where

is the magnetic moment generated by a number of coils with area when

current flows through it.

is the earth’s magnetic field in the body frame of reference

2.2.7 Torque Rods

Alternatively, torque rods can be used. Torque rods operate on the same principle as

torque coils, but instead of a big area coil the windings is spun around a piece of metal

with very high permeability. Such materials are called ferromagnetic materials, and can

have a relative permeability, μ, of up to 10^6. The relative permeability enters equation

and the expression for the magnetic torque becomes

(2.2)

Hence, the current needed to produce the same torque is then much lower; however the

weight increases drastically because of the metal core in the rods. Another

inconvenience of the torque rods is that the ferromagnetic core has memory, and

hysteresis is thus introduced in the control loop. Different ferromagnetic alloys have

different hysteresis characteristics, and this, together with the permeability, must be

taken into consideration in designing a magnetic torque rod.

Page 32: Amrit Thesis

15

Following table is a summary of actuators generally used in satellites.

Table 2.2 Actuator survey summary

No. Component Name Features

1 Permanent Magnet Interact with earth’s magnetic field to give control

over attitude

Slow Response

Gives slight tumbling mode with 2 revolutions per

orbit

2 Spin Stabilization Stability due to gyroscopic affect

Add complexities during imaging and

communication

Always small fraction of total solar panel area is

in view of sun.

3 Gravity Gradient

Boom Slow response

One dimension is longer than other. Thus

stabilizing force will be there.

Difficulty to realize in small systems

4 Reaction Wheels Very fine pointing

Small size

5 Reaction Control

System Fast control

Limited life(decided by the mass of the propellant)

Coarse pointing

6 Torque Coils Small size

Low efficiency

IGRF model is generally used to predict the

orientation

7 Torque Rods High weight

Contains metal core

High efficiency

One dimension generally longer than the other.

If can be accommodated inside the satellite then it

is best option

IGRF model is generally used

From the above summary it was decided to use two actuators; Torque coils and reaction

wheels. The specifications of the actuators are presented in a later chapter.

Page 33: Amrit Thesis

16

Chapter 3

Satellite Orbit and Operational

Modes

During most of the satellite’s operational modes, the position of the satellite in some

reference frame is necessary. For example, during Attitude Acquire Mode, earth’s

magnetic field is needed to be calculated using IGRF (International Geo-magnetic

Reference Field) model which takes satellite’s position as an input. Depending on the

position of the satellite in the orbit and the upcoming communication windows,

different operational modes are selected by the OBC. So, we focus our attention to see

how the satellite’s position is described in different reference frames and how that is

relevant in different contexts. However, before explaining the satellite’s orbit and its

position in it, all the reference frames involving satellite’s position and attitude are

described.

3.1 Reference frames

It is required find an inertial frame or pseudo inertial frame (which accelerates very

slowly as compared to the dynamics of the satellite). We start our work with the

assumption that the earth moves round the sun in a perfectly circular orbit (eccentricity

is neglected).

We know that the line joining the South Pole and the North Pole of earth makes an

angle of 66.5o with plane containing the orbit of earth around sun. As this line is

perpendicular to the equatorial plane, the angle between this plane and the ecliptic

plane (plane containing earth’s orbit around sun) becomes 23.5o. Now, we have two

planes; the ecliptic plane and the equatorial plane inclined an angle of 23.5o with each

other. These two planes intersect each other at a line which is common to both the

planes. This line of intersection passes through sun’s centre on 21st March, every year.

On this day, the line joining from centre of earth to centre of sun (the line of

intersection towards sun) is chosen as the X axis of an inertial frame with earth’s centre

Page 34: Amrit Thesis

17

as the origin. Let’s call this frame as Ecliptic Inertial (EI) frame. Z axis of this frame is

perpendicular to the solar plane in such a way that if one sees from positive Z axis

towards negative Z axis, it would appear that earth is moving in an anticlockwise

fashion around sun. Y axis direction can be found out using the right hand rule. Now

that we have described the EI frame completely, it has to be noted that it is moving

around sun in a circular (assumption) path and thus it is not a inertial frame strictly. But

we assume it to be one as the dynamics related to the satellite are much slower than the

orbital frequency of the earth around sun. Same is also true for the other inertial frame

that we are going to discuss here.

The next frame is known as the ECI (Earth Centred Inertial) frame. This frame is very

important because we describe the orbit and all its parameters in this frame. Satellite’s

attitude is also described with respect to this frame only. This ECI frame is simply

obtained by rotating the EI frame about its negative X axis by 23.5o so that the XY

plane of the ECI frame coincides with the equatorial plane and the positive Z axis

passes through the North Pole.

Figure 3.1 ECI frame in the ecliptic plane and the equatorial plane

Equatorial plane

XECI

YECI

ZECI

Earth’s equatorial plane is tipped 23.5o

from the ecliptic plane

Ecliptic plane

Page 35: Amrit Thesis

18

Before describing the other reference frames involved, one needs to know about the

orbital parameters needed to describe satellite’s orbit and its position in. There are six

orbital parameters which describe satellite’s orbit and its position in the ECI frame.

These parameters are known as Keplerian elements. As explained by Kepler satellites

move in an elliptical path around earth with earth situated at one of the two foci of the

ellipse. He gave his theory for the revolving planets around sun but this also holds good

for satellites as the basic principle governing the motion is the central force of gravity

varying in the inverse square fashion.

Figure 2.2 Orbital parameters

In the above figure, the reference direction is along XECI direction. The six orbital

parameters are as follows

1. Semi-major axis ( )

It is the semi-major axis of the ellipse in which satellite is revolving around

earth. It is basically the distance between the centre of the ellipse and its

perigee.

2. Longitude of Ascending Node ( )

It is the angle made by the line joining earth’s centre and the point at which

satellite crosses the equatorial plane in an ascending manner from southern

hemisphere to northern hemisphere with the positive X axis of the ECI frame.

Page 36: Amrit Thesis

19

3. Inclination ( )

It is the angle between the orbital plane and the equatorial plane (XY plane of

the ECI frame).

4. Argument of Perigee / Periapasis ( )

It is the angle subtended by the perigee and the point of ascending node at the

centre of earth.

5. True Anomaly ( )

It is the angle subtended by the satellite and the perigee at the centre of earth.

6. Eccentricity ( )

It is the eccentricity of the ellipse in which satellite revolves around earth.

There are four more reference frames which are of our interest. One of them is the

Orbit reference frame. ECI frame is first give a rotation of angle about positive Z

axis and then a rotation of angle about positive X axis of the new frame. Finally, the

XY plane of the generated frame coincides with the orbital plane. This frame is known

as the Orbit reference frame.

The next frame is known as RTN (Radial Transverse Normal) frame. It is obtained by

rotating the orbit frame by an angle about its positive Z axis. Next one is known as

the LVLH (Local Vertical Local Horizontal) frame. Its X axis coincides with Y axis of

the RTN frame. Its Y axis is along the negative Z axis of the RTN frame. Z axis can be

found out using right hand rule. The last reference frame of our interest is the Earth

Centred Earth Fixed (ECEF) frame of reference. This frame moves with an angular rate

equal to the angular rate of earth about its axis. X axis of this frame passes through the

Greenwich Meridian and the Z axis coincides with the Z axis of the ECI frame.

Now, we need to get the position of the satellite in the orbit frame and get it transferred

to ECI frame. Before that, one needs to understand few properties of an ellipse. In the

following figure, is known as the true anomaly of the satellite and this gives directly

the angular position of the satellite from the perigee. This angle is measured at the

focus (earth’s centre), not at the centre of the ellipse. Eccentric anomaly is the angle

between the line joining the centre of the ellipse and the point of perpendicular

projection of the satellite on the auxiliary circle and the line of perigee. This angle is

Page 37: Amrit Thesis

20

measured at the centre of the ellipse as shown in the figure. Mean anomaly as such

does not have any angular interpretation but as it varies linearly with respect to time, it

is equivalent to the area swept by the satellite at the focus according to Kepler’s second

law. The rate of change of mean anomaly is equivalent to the reciprocal of the orbital

frequency.

3.2 Satellite‟s position in the orbit

Figure 3.3 True anomaly, Eccentric anomaly and mean anomaly

The aforementioned angles are related to each other in the following manner.

(3.1)

where is the mean anomaly at time and is the orbital angular rate.

We can also write mean anomaly in terms of eccentric anomaly as

(3.2)

Equation (3.2) can be solved using Newton-Raphson method to get the eccentric

anomaly .

Page 38: Amrit Thesis

21

Once we have , we can calculate true anomaly using the following relation.

(3.3)

Therefore, the true anomaly can be written as

(3.4)

Therefore, if we have the mean anomaly of the satellite, we can obtain the eccentric

anomaly and the true anomaly using the above relations.

Our aim is to find satellite’s position in the ECI frame which can be obtained once we

have the position in the orbit frame. Satellite’s position in the orbit frame can be written

as:

(3.5)

Position of the satellite in the ECI frame can be calculated by pre-multiplying three

rotation matrices corresponding to the three angles; argument of perigee, inclination

and longitude of ascending node.

(3.6)

For getting the position in ECEF frame, is given a rotation of θ along the positive

Z axis of the ECI frame. So, we can write

(3.7)

In order to reach at the above final expression of the position in the ECI frame, the

orbital code needs to be propagated. The orbit in consideration is a Sun-synchronous

orbit. This means that the orbit precesses with an angular rate equal to the angular rate

of earth around sun. This kind of precession is caused because of the flatness of earth at

the two poles. This is just a reflection of the perturbations caused on the Keplerian

elements by this kind of flatness. Lagrange’s planetary equations give the details of the

perturbations on all Keplerian elements. We present here only the equations involving

the largest perturbing effect known as the effect. comes from the second order

Page 39: Amrit Thesis

22

term of the complete expression for the perturbed Keplerian elements. In our case,

we’ll use only the following three equations:

(3.8)

(3.9)

(3.10)

where

is the change in the orbital angular rate due to

is the unperturbed orbital angular rate

is the mean radius of earth

is the semi-major axis of the satellite’s orbit

is the inclination of the orbit with the equatorial plane

is the eccentricity of the orbit

is the rate of change of argument of perigee

is the rate of change of the ascending node angle

All the above mentioned orbital parameters and their rates are needed to locate the

satellite in the ECI frame. There are many models which take into account all the

perturbing effects like perturbation from Sun, Moon and other higher order effects due

to non spherical shape of earth. For example SGP4 (Simplified General Perturbation 4th

order) model is the one which is very accurate and takes into account all the above

mentioned perturbing effects into account. However, for our requirement, we need not

consider all these effects. We can use the updated orbital parameters in the form of TLE

(Two Line Elements) released by NORAD (North American Aerospace Defence

Command). We also do not need all the information available on TLE. We can extract

the data relevant to us from the TLE and upload those to the satellite periodically as the

uplink data. Therefore, it is required to update the orbital parameters periodically from

the ground station. The detailed description of TLE is given in Appendix A.

Page 40: Amrit Thesis

23

3.3 Operational modes

Satellite’s complete operation has been divided into few operational modes. This gives

the user on ground more flexibility to choose a particular operation and make a

sequence as per the requirement. This also helps the onboard computer make the mode

scheduling autonomously and switch the modes according to that schedule. Following

is a brief description of different operational modes. The details of the modes and their

analysis are given in the following chapters.

3.3.1 Suspended Mode

This is the mode when ADCS is completely inactive. Generally this mode is

encountered just after ejection from the launch vehicle or in case of complete satellite

shut down to overcome an emergency situation.

3.3.2 Detumbling Mode

In case of small satellite ejection from the launch vehicle, the ejection system does not

really actively control the angular rate of the satellite during ejection. The angular rate

of the satellite can vary drastically depending upon the mechanism used for ejection. It

can be as high as 10 deg/s. This rate is very high for the slow attitude estimation

algorithms to work. Hence, it is required to bring down the angular rate of the tumbling

satellite. In order to reduce the total angular momentum of the satellite, external torque

is developed by using the torque coils and the satellite is detumbled. This mode takes

about 2 to 3 orbits of time depending upon the initial tumbling rate.

3.3.3 Attitude Acquire Mode

This mode uses Tri-Axis Magnetometer data as input and processes them using

Extended Kalman Filter to estimate satellite’s attitude (orientation) with respect to the

inertial frame of reference.

3.3.4 Maneuvering Mode

This mode is active when it is required to reorient the satellite to a particular target

direction. This is done using the four reaction wheels fixed on the satellite structure.

Page 41: Amrit Thesis

24

3.3.5 Stabilization Mode

A PID controller is used at the end of every maneuvering process to stabilize the

satellite and fine tune its orientation and angular rate. This is also done using the for

reaction wheels.

3.3.6 Momentum Dumping Mode

This mode is active when it is required to de-saturate the reaction wheels to bring their

speeds well below the maximum speed limit. This is done using the torque coils.

3.3.7 Earth Pointing Mode

This mode is combination of maneuvering mode and PID stabilization mode. This

mode is active during major payload operations such as imaging and GPS testing.

Apart from payload operations, this mode is also active during communication with the

ground station.

The onboard orbital code propagates the orbit for two days and makes a list of all

possible communication windows with the time stamps. Depending on the duration of

the communication window, power availability and payload priority sequence, OBC

makes a schedule for different operational modes autonomously. However, direct

interference from ground command can over-write the mode sequence and plan it

according to the user on the ground.

Following is a flowchart which explains the sequence followed by the onboard

computer unless interfered by ground command.

Page 42: Amrit Thesis

25

Just after Ejection or after an

emergency system restart

(ADCS in Suspended Mode)

Undergoes

Detumbling Mode

Check if Detumbling

is doneNO

YES

Start Attitude

Estimation

Check if Attitude is

acquiredNO

YES

Go to Sun-pointing direction

Maneuvering Mode active

Stabilize the satellite using

PID controller

Stabilization Mode active

Check if Momentum

Dumping is requiredYES

Do Momentum

Dumping

NO

Check if there are any

tasks in the queue

YES

NO

Go to Earth-pointing

direction for imaging

Maneuvering Mode Active

Check for any other

tasks in the queueYESNO

Figure 3.4 Satellite‟s mode sequence

Page 43: Amrit Thesis

26

Chapter 4

Attitude Estimation

In order to describe satellite’s complete dynamic state, one needs to have the

information of the attitude (orientation) with respect to some inertial frame and its time

derivatives. Here in our analysis, only first two time derivatives are considered as the

third derivative is not very intuitive in nature and also because it is assumed that the

second derivative (or its equivalent quantity) is changing very slowly relative to the

major dynamics of the satellite. The first time derivative of the attitude is equivalent to

its angular rate which is denoted by the symbol ‘ ’. The second derivative of the

attitude is indirectly related to the external disturbance torque acting on the satellite

which is denoted by the symbol ‘ ’. The reason for choosing external disturbance

torque instead of angular acceleration as the information on the second derivative of

attitude is that it is an extrinsic quantity coming directly from the environment which is

not really dependent on satellite’s inertia. Unlike angular rate and external disturbance

torque, satellite’s attitude with respect to the inertial frame can be represented in many

forms. Rotation matrix and quaternion are the most popular ones. In our analysis, we

are considering quaternion as the representation of satellite’s attitude. However,

rotation matrix has been used in many places in the control algorithms.

4.1 Algorithm Description and Analysis

In the present work, we have considered a state vector having ten elements in total; four

for attitude quaternion, three for angular rate and three for external disturbance torque.

Attitude quaternion can be written as

(4.1)

Similarly, angular rate can be written as

(4.2)

and external disturbance torque as

(4.3)

Page 44: Amrit Thesis

27

Combining the above three, the state vector becomes

(4.4)

Current attitude estimation algorithm uses only three axis magnetometer data. Though

this algorithm is very sluggish in nature, it serves the purpose well, especially in the

case of small satellites where generally scientific experiments are conducted instead of

using them for commercial payloads. Since the relation between state vector elements

and their first derivatives is highly nonlinear in nature, Extended Kalman Filter has

been used to estimate the state vector.

General state equation for the Extended Kalman Filter is

(4.5)

where is the state vector, is the control moment, is the zero mean white

noise known as process noise described by the process noise matrix and is the

first time derivative of the state vector.

In our case, since there is no control moment the state equation is reduced to

(4.6)

4.1.1 Singularity Elimination

As of now, we have considered a ten element state vector having first four elements as

the attitude quaternion. It should be noted that all the four elements of the attitude

quaternion are not independent. They are bound by the following constraint

(4.7)

This dependency of the elements of the state vector causes singularity in the Error

Covariance Matrix P described in the appendix. In order to avoid such a situation, a

nine element state vector has been chosen and has been used in the Kalman filter

instead of the ten element state vector as mentioned above.

Page 45: Amrit Thesis

28

Vector part of the error quaternion can be written as

(4.8)

Similarly, angular rate can be written as

(4.9)

and external disturbance torque can be written as

(4.10)

Combining the above equations, the state vector becomes

(4.11)

Here, the error quaternion is defined as

(4.12)

where is the true quaternion and is the estimated quaternion

4.1.2 Derivation of the state equation

We know that conjugate of the quaternion is defined as

(4.13)

Let

(4.13)

Now, we have

(4.14)

Therefore, can be rewritten as

(4.15)

(4.16)

where

(4.17)

and is defined as [2]

Page 46: Amrit Thesis

29

(4.18)

Therefore, can be written as

(4.19)

Vector component of the error quaternion can be written as

(4.20)

(4.21)

where

(4.22)

Now, the relation between the nine element true state vector and the ten element true

state vector can be written as

(4.23)

(4.24)

When the operator is operated on the ten element estimated state vector to get the

nine element estimated state vector, following is obtained.

(4.25)

(4.26)

Now, we have both true and estimated nine element state vectors as and . The

difference state vector can be written as

Page 47: Amrit Thesis

30

(4.27)

(4.28)

As, we have already seen, state equation for the true state can be written as

(4.29)

Similarly, state equation for the estimated state can be written as

(4.30)

Therefore, state equation for the error state can be written as

(4.31)

(4.32)

Linearizing Equation (4.32), we have

(4.33)

where

(4.34)

It has to be noted here that is also a vector.

Derivation of the matrix F will follow the introduction of the dynamic equations for

propagating the state vector.

4.1.3 Dynamic equations

It is apparent that the elements of the ten element complete state vector and their time

derivatives are related in highly nonlinear fashion. Same is also true for the nine

element state vector considered in our analysis. Following is a quick revision of the

dynamic equations dealing with the elements of the state vector. There are three matrix

Page 48: Amrit Thesis

31

equations for the first time derivatives of the attitude quaternion, the angular rate of the

satellite and the disturbance torque acting on it.

Time derivative of the attitude quaternion is a function of the current attitude

quaternion and the current angular rate. This function can be written as [2]

(4.35)

where is a 4 X 4 matrix and is completely a function of the angular rate of the

satellite.Derivation of the Equation (4.35) is beyond the scope of this paper.

Rate of change of the angular rate of the satellite can be derived from the simple

relation between rate of change of angular momentum in the body frame and the same

in inertial frame. The relation is as follows

(4.36)

Subscript on the first term indicates the derivative in inertial frame and subscript on

the last term indicates the derivative in body frame.

We know that rate of change of angular momentum in the inertial frame is equal to the

total external torque acting on the satellite. So, we can rewrite Equation (4.36)

(4.37)

where

is the control torque coming from the reaction wheels.

is the known external torque such as torque due to gravity gradient, air drag and

solar radiation pressure.

is the unknown external disturbance torque which is estimated as a part of the state

vector and which is significant if any of the source is not modelled properly. Now,

Equation (4.37) can be written as

(4.38)

(4.39)

(4.40)

Page 49: Amrit Thesis

32

where is the total external torque.

It is assumed that the disturbance torque is constant, as in reality any change is very

slow generally, with frequency equal to the reciprocal of the orbital period. Therefore,

we can write

(4.41)

4.1.4 State Equation Linearization

We have already linearized the error state equation in Section 4.1.2. The linearized

equation can be further decomposed into three parts. Therefore, after decomposition

Equation (4.33) can be written as

(4.42)

(4.43)

(4.44)

It should be noted that all the terms in Equation (4.42), Equation (4.43) and Equation

(4.44) are functions of time. , and are the components of the state dynamic

matrix, the derivation of which follows this section.

4.1.4.1 Derivation of quaternion dynamic matrix

The attitude quaternion evolves with time as a function of the angular rate of the

satellite. Similarly, the first derivative of the error attitude quaternion can be written as

[2]

(4.45)

(4.46)

As we need only the vector component

(4.47)

(4.48)

Page 50: Amrit Thesis

33

(4.49)

where is the 3 X 3 unit matrix.

Therefore, can be written as

(4.50)

(4.51)

4.1.4.2 Derivation of the angular rate dynamic matrix

Since there is no control torque acting on the satellite during attitude acquire mode,

Equation (4.39) can be rewritten as

(4.52)

In general, the known external torque (gravity gradient, air drag, solar radiation

pressure) acting on the satellite depends only on the attitude quaternion. So, we have

(4.53)

By definition,

(4.54)

Now, can be further decomposed into three parts

(4.55)

(4.56)

(4.57)

(4.58)

4.1.4.3 Derivation of disturbance torque dynamic matrix :

Since is assumed to be zero, can be written as

(4.59)

Now, can be written as

Page 51: Amrit Thesis

34

(4.60)

4.1.5 Relation between measurement vector and the state vector

In our analysis, the only measurement is from the tri axis magnetometer which is fixed

with the satellite’s body. It measures Earth’s magnetic field in the body frame of

reference in all three orthogonal directions. It is clear that the measurement readings

directly depend on the attitude of the satellite. Hence, the measurement vector can be

written as

(4.61)

where is a nonlinear relation between the state vector (in this case only the

attitude quaternion part) and the measurement vector and is a zero mean white noise

known as measurement noise (In this case it is the noise coming from the

magnetometer) described by the measurement noise matrix . It has to be noted that the

process noise and measurement noise are uncorrelated.

The estimated measurement vector can be written as

(4.62)

Therefore, the innovation can be written as

(4.63)

(4.64)

(4.65)

where is known as the measurement sensitivity matrix and is calculated after

linearizing .

(4.66)

The measurement vector for the kth

step can be written as

(4.67)

Here, the function is used to transform the magnetic field from the inertial

frame to the body frame. Therefore, it can be written as

(4.68)

Page 52: Amrit Thesis

35

where is the rotation matrix corresponding to the quaternion from inertial frame

to body frame and is the magnetic field in the inertial frame calculated using IGRF

model.

Now, can be written as

(4.69)

Therefore, becomes

(4.70)

(4.71)

(4.72)

We know that . Therefore, after neglecting the second order terms, Equation

(4.72) can be rewritten as

(4.73)

(4.74)

Now, we have

(4.75)

After expanding, can be written as

(4.76)

4.1.6 State vector propagation

Between every two consecutive measurement updates, the state vector is propagated in

smaller time steps. This propagation is based upon the dynamic equations involving the

state vector derivatives.

Page 53: Amrit Thesis

36

4.1.6.1 Attitude quaternion propagation

Let the angular increment during one propagation step be .

(4.77)

Therefore, the quaternion propagation matrix becomes [2]

(4.78)

and the attitude quaternion after propagation can be written as

(4.79)

where, is the estimated quaternion before propagation and is the estimated

quaternion after propagation.

4.1.6.2 Angular rate propagation

We have already derived the expression for angular acceleration. Therefore, the angular

rate can be propagated as follows

(4.80)

(4.81)

where, is the angular rate before propagation and is the angular rate after

propagation.

4.1.6.3 Disturbance torque propagation

As we have assumed that the rate of change of disturbance torque is zero, we can write

that

(4.82)

where is the disturbance torque before propagation and is the disturbance

torque after propagation.

4.1.6.4 Propagation of error covariance matrix

The elements of the error covariance matrix are expected to decrease with time as the

extended Kalman filter converges. The updated matrix is used to calculate the

Kalman gain . Therefore it is necessary to propagate and update it.

Page 54: Amrit Thesis

37

We have already derived the state equation as

(4.83)

Now that we have the explicit expression for the matrix , we can integrated the above

linearized differential equation for the duration of one propagation time step. After

integration, the right hand side can be written as

(4.84)

It is assumed that the matrix remains constant during the propagation step .

Therefore the state transition matrix can be written as

(4.85)

After Taylor series expansion and neglecting the higher order terms, it can be shown

that

(4.86)

So, the state propagation equation becomes

(4.87)

The process noise matrix can be written as

(4.88)

On further simplification can be written as

(4.89)

Now, matrix can be propagated as

(4.90)

4.1.6.5 State vector update

It has to be noted that and calculated above are the functions of best estimated state

vector just before the new update state. Therefore, these matrices can be rewritten as

and which means they the best estimates available before

measurement update with number of measurement updates already made.

By definition Kalman gain can be written as

(4.91)

Therefore, the state vector correction can be written as

(4.92)

(4.93)

Page 55: Amrit Thesis

38

(4.94)

where is the magnetometer reading and is the estimated

magnetic field in the body frame reference calculated using IGRF model and the

estimated attitude quaternion.

Now, we can write the updated state vector after measurement as

(4.95)

The measurement sensitivity matrix and the error covariance matrix are now

updated using the updated state vector as

(4.96)

(4.97)

Page 56: Amrit Thesis

39

4.1.7 Flowchart

The following flowchart shows the algorithm to estimate the state vector. It also shows

the different functions used in the implemented code.

Start

Initialize P matrix

with prescribed value

Also initialize

q_est

w_est

nd_est

Initialize

ws_est

hs_est

h_est

g_gg_est

Initialize process

noise parameters

nq

nw

nNd

Initialize

measurement

noise matrix R

Refresh orbit position and

initialize system parameters

such as I matrix

Set the mode as

Attitude Acquire Mode

Assign

q_k_minus = q_est

w_k_minus = w_est

nd_k_minus = nd_est

h_k_minus = h_est

ws_k_minus = ws_est

hs_k_minus = hs_est

State_vector_update()

Get and assign

q_est = q_k_plus

w_est = w_k_plus

nd_est = nd_k_plus

ws_est = ws_k_plus

hs_est = hs_k_plus

h_est = h_k_plus

Calculate and assign

c3_est = C_b_lvlh_est(:,3)

calculate_phi_k()

calculate_Qk_kalman()

P_minus

Calculate and assign

g_control = [0;0;0]

g_ext_est = gmag + nd_est + g_gg_est

Estimate_state_propagation()

Propagate the orbit

Calculate q_b_LVLH

Check if P dig values are less than

the corresponding threshold values

YES

Log message:

Attitude Acquired

NO

Stop

Figure 4.1 Attitude estimation flowchart

Page 57: Amrit Thesis

40

4.1.8 Use Case diagram

Following use case diagram of attitude acquire mode shows the dependency of different

satellite modules.

Attitude Acquire Mode

OBC1

Tri Axis MagnetometerOBC2

Variable

Initialization

Telemetry data to ground station through

Beacon

State Vector Update

State Vector

Propagation

Code Convergency Check

Status (Windowed average of

residual)

*

**

*

*

*

*

*

*

*

*

*

*

*

Figure 4.2 Attitude acquire mode use case diagram

Table 3.1 Use case diagram description for Attitude acquire mode

No. Actor / Use Case Description

1 OBC1

Sends command to magnetometer, gets the

magnetic field readings and sends them to OBC2 for State Vector Update

2 OBC2 Does all the attitude estimation calculation part

3 Tri Axis Magnetometer Measures Earth’s magnetic field in the body

frame of reference

4 Telemetry data to ground station through Beacon

Sends the status of the running Estimation

algorithm status (convergence) back to Earth

through Beacon

5 Attitude Acquire Mode This mode estimates satellite’s attitude without implementing any control

6 Variable Initialization Initializes the state vector and other parameters

need for the attitude estimation algorithm

7 State Vector Update Take magnetometer reading and updates (corrects) the attitude obtained from the last

propagation step

8 State Vector Propagation Propagates the state vector using the equations governing its dynamics

9 Code Convergence Check

Calculates the residual value and sends it back

to earth through Beacon. It also checks if the

residual is less than a particular threshold

Page 58: Amrit Thesis

41

4.1.9 Simulation Results

Following simulation results show the filter performance. It shows how the estimated

attitude quaternion tracks and converges with the true attitude. Same is also true for the

estimated angular rate and disturbance torque.

Figure 4.3 True and estimated quaternion ( ) w.r.t. inertial frame

Figure 4.4 True and estimated quaternion ( ) w.r.t. inertial frame

Page 59: Amrit Thesis

42

Figure 4.5 True and estimated quaternion ( ) w.r.t. inertial frame

Figure 4.6 True and estimated quaternion ( ) w.r.t. inertial frame

From the above four plots, it is clear that the attitude is converged in a less than one

orbital period. Same can also be inferred from the following two figures which show

the convergence of angular rate and disturbance torque.

Page 60: Amrit Thesis

43

Figure 4.7 True and estimated angular rate of the satellite

Figure 4.8 True and estimated disturbance torque

The disturbance torque along each of the three orthogonal directions is set to 1e-8 N.m.

for the simulation. The filter converges to these values within one orbital period.

Page 61: Amrit Thesis

44

Following three figures show how the attitude, angular rate and the disturbance torque

errors are bounded by their +/- 1 values.

Figure 4.9 Attitude quaternion estimation error and error boundary

Figure 4.10 Angular rate estimation error and error boundary

Page 62: Amrit Thesis

45

Figure 4.11 Disturbance torque estimation error and error boundary

Figure 4.12 Innovation of Extended Kalman Filter

In the above figure, the innovation of the filter keeps decreasing with time as expected.

Page 63: Amrit Thesis

46

Figure 4.13 Angular error between true and estimated attitude

In the above figure, the total angular error is plotted against time. It starts from an

initial error of 80o and goes below 1

o in less than one orbital period.

Figure 4.14 True and estimated magnetic field in the body frame

Page 64: Amrit Thesis

47

Figure 4.15 Angular momentum of the satellite in the inertial frame

Figure 4.16 Angular momentum of the satellite in the body frame

Above three figures show the convergence of the magnetic field, angular momentum in

the inertial frame and angular momentum in the body frame.

Page 65: Amrit Thesis

48

Chapter 5

Attitude Control

Attitude estimation is a pre-requisite for attitude control. Once the attitude is acquired

with reasonable accuracy, the satellite undergoes many control modes to perform

different payload operations. In this chapter, we will discuss different control modes

planned for the successful operation of the nanosatellite ‘Jugnu’. Before describing the

control modes, Detumbling Mode is described. This is not really a control mode

because the attitude of the satellite is not controlled during this mode. This mode is

carried out before Attitude Acquire Mode.

5.1 Detumbling Mode

As mentioned earlier in Chapter 3, the satellite starts tumbling after its separation from

the launch vehicle. It is required to bring down its angular rate to an acceptable range to

ensure the convergence of the attitude estimation algorithm. This is done by generating

the required magnetic moment in the three orthogonal directions which in turn interacts

with earth’s magnetic field and generates a net external torque on the satellite in a

direction opposite to the direction of the existing angular momentum. This controller is

called bdot controller as it uses the rate of change of magnetic field value to compute

the control torque.

5.1.1 Algorithm Description and Analysis

Torque required to detumble is directly proportional to the tumbling rate of the satellite.

Though there is no explicit estimation of the tumbling rate (angular rate), an alternative

method is used to estimate the torque requirement. A TAM (Tri Axis Magnetometer) is

fixed on the satellite body with its three sensors aligned with the three orthogonal

directions (generally along the principal inertia axes) of the body. These sensors

measure the earth’s magnetic field value in the three orthogonal directions. These

values change rapidly if the tumbling rate is high. This rate of change of magnetic field

( ) is calculated by taking the difference between two consecutive TAM readings and

Page 66: Amrit Thesis

49

dividing it with the time difference between them. This value (3 x 1 vector with three

components in the three orthogonal directions) is then multiplied by a scale factor to

obtain the required magnetic moment value (3 x 1 vector). The time step between two

consecutive TAM readings is fixed and carefully chosen by looking at the algorithm’s

performance during simulations.

This required magnetic moment is generated by using Torque Coils. The required

magnetic moment value is converted into the current value as the mean area and

number of turns of each coil is known from the design. This current value is again

converted into the duty cycle of the PWM as the DC supply voltage value is fixed. The

torque coils have a definite magnetic moment capacity. So, the calculated value of the

required magnetic moment is truncated after a certain maximum limit.

If the tumbling rate is very high, the controller will not be able to capture the change in

magnetic field and execute the control torque properly. This situation is detected when

bdot value does not go below a certain threshold value even after the satellite has spent

a significant amount of time in the Detumbling Mode. Solution to this problem is to

reduce the time step between two consecutive magnetometer readings and thus making

the controller faster.

Since the rate of change of TAM readings is the only available measure for knowing

whether the satellite is being detumbled or not, its magnitude is send back to earth in

the beacon signal. Following is the simple analysis for calculating the required PWM

duty cycle.

Rate of change of magnetic field is

(5.1)

Now, the required magnetic moment can be written as

(5.2)

And the required current vector in all three orthogonal directions becomes

(5.3)

Similarly, the required duty cycle value for the PWM supply becomes

Page 67: Amrit Thesis

50

(5.4)

The calculated magnetic moment about each axis is truncated at 0.03 Am2 due to

design constrains.

Therefore the retarding torque on the satellite can be written as

(5.5)

5.1.2 Flowchart

Following flowchart explains the bdot controller algorithm for detumbling.

Start Detumbling

Mode

Take Magnetometer

readings

Calculate bdot

Check if bdot magnitude is less than

bdot_threshold

YES

NO

Start

bdot_threshold_time_counter

Check if bdot_threshold_time_counter is greater

than bdot_threshold_time_counter_threshold

YES

NO

Set bdot_threshold_time_counter = 0

Log message: Satellite

Detumbled

Stop Detumbling

Mode

Check if Dtime_counter is greater

than Dtime_counter_threshold

NO

YES

Check if Mode

= Primary

YES

Log error message: Primary

Detumbling Mode Failed

Set Mode = Secondary

Reduce dt

Set all the threshold limits to their

new values

NO

Log error message:

Secondary Detumbling Mode

Failed

Rely on Momentum Dumping

Mode

Set Mode = Primary

Figure 5.1 Detumbling mode flowchart

Page 68: Amrit Thesis

51

5.1.3 Use Case diagram

Following use case diagram shows the interdependency of different modules during

detumbling mode.

Figur 5.2 Detumbling mode use case diagram

Table 5.1 Use case diagram description for Detumbling mode

No. Actor / Use Case Description

1 Tri Axis Magnetometer data

acquire

Acquires the magnetic field value with a

prescribed frequency in the body frame using the HMR2300 magnetometer

2 Magnetometer data processing Calculates the rate of change of magnetic field

3 Detumbling Mode

Computes the required magnetic moment

value for detumbling and the duty cycle of

the PWM supply

4 Active Torque Coils through PWM

Generates the required magnetic moment by

passing current through the PCB based

Torque Coils

5 Telemetry data through beacon

Sends the magnitude of the rate of change of

magnetic field value through beacon as an

acknowledgement of the detumbling process

Page 69: Amrit Thesis

52

5.1.4 Simulation Results

Following simulation results show the detumbling of the satellite starting from an

initial tumbling rate of 6 deg/s in all three axis.

Figure 5.3 Angular rate of the satellite

Above figure shows the angular rate along each three axes. The behaviour is different

in the Z direction as the satellite in consideration is a 3U satellites. A 3U satellite has

the X and Y axis principle moment of inertias equal and is larger than the same along Z

axis. So, the gyric torque tends to spin stabilize the satellite dynamically along one of

the major principle inertial directions.

Page 70: Amrit Thesis

53

Figure 5.4 Magnitude of angular rate of the satellite

Above figure shows how the magnitude of the angular rate changes and goes close to

zero. It can be seen that it takes about two orbital periods detumble the satellite.

Figure 5.5 Rate of change of magnetic field

Page 71: Amrit Thesis

54

Figure (5.5) shows the rate of change of magnetic field with respect to tie. The beat

phenomenon occurs due to the cyclic change of attitude and the magnetic field.

Figure 5.6 Magnitude of rate of change of magnetic field

Figure 5.7 Required magnetic moment

Above figure shows the required magnetic moment which is truncated at 0.03 A.m2 due

to the limitation of the torque coils.

Page 72: Amrit Thesis

55

5.2 Maneuvering Mode

Once the attitude is acquired, the satellite needs to be prepared for various operational

modes. Hence, it is required to take the satellite to Sun pointing Mode where it can save

power for further payload operations. In our case, sun pointing means making the

satellite’s diagonal along the sun direction where maximum power can be obtained. So,

it is first required to get the sun pointing direction in the body frame of reference. As

we already have the attitude quaternion from ECI to body frame, we just need to find

the sun vector in the ECI frame.

5.2.1 Sun vector determination

We know that the vector pointing from earth centre to sun centre rotates uniformly

about the Z axis of EI (Ecliptic Inertial) frame once every year. We also know that this

vector is along the X axis of the EI frame on 21st March of every year. So, we can write

this vector as

(5.6)

where

is the unit vector along the line joining from the centre of earth to the centre of sun

is the angle made by the line joining from the centre of earth to the centre of sun and

the X axis of the EI frame and can be written as

(5.7)

where

is the angular rate of earth around sun

is the at the beginning of maneuvering operation

is the time corresponding to 21st March of the current year

To transform the sun vector from the EI frame to ECI frame, a rotation matrix

corresponding to 23.5o about the negative X axis has to be pre multiplied with it. This

rotation matrix is the transform matrix between the EI frame and the ECI frame as

explained earlier. So, we can write

(5.8)

where

Page 73: Amrit Thesis

56

5.2.2 Algorithm description and analysis

Once we have the sun vector in ECI frame, we can transform it the body frame by pre-

multiplying it with the rotation matrix corresponding to the attitude quaternion from

ECI frame to body frame.

So, let us assume that we have the unit sun vector in the body frame and we call it as

. For 3U cubesat the body diagonal vector can be written as

(5.9)

Now, the angle between these two vectors can be calculated as

(5.10)

is the total angle by which the satellite has to be rotated during the maneuvering

operation.

(sun vector)

Figure 5.8 Sun vector in body frame

Page 74: Amrit Thesis

57

The unit vector along the axis of rotation can be found out as

(5.11)

Let is the maximum rate at which satellite can be rotated about the axis . There

satellite’s angular momentum can be written as

(5.12)

(5.13)

(5.14)

where

(5.15)

Since, the angular momentum of the wheel is limited, is also limited to its maximum

value as

(5.16)

where

is a limiting coefficient

is the maximum angular momentum of the wheel

Similarly, the angular acceleration along the axis of rotation would be

(5.17)

where

is a limiting coefficient

is the maximum torque capacity of the wheel

5.2.2.1 Generating the commanded profile:

Now, we have three parameters; , and . Depending on the relation among

these three parameters, profile is generated. It is desired that the total maneuvering

time is minimum. In order to do so, the satellite has to be rotated with maximum

possible angular acceleration. Once it reaches the maximum angular rate, it keeps the

rate constant and starts retarding after a predefined time so that it finally reaches its

commanded angle with zero angular rate. It is possible that the final commanded

Page 75: Amrit Thesis

58

angular rate is not zero as in case of the maneuvering to the Earth Pointing Mode which

will be discussed later. But, we’ll stick to zero initial and final angular rates to keep the

analysis simple. So, the expected profile will be as shown in the following figure

From the above figure it is clear that

First, the time for which the satellite accelerates is calculated as follows

(5.18)

and, from the above figure, it can be seen that

(5.19)

(5.20)

(5.21)

When this situation arises, follows the path along and does not reach

. In this case total time taken for maneuvering can be written as

(5.22)

Figure 5.9 Commanded angular rate profile for maneuvering

Page 76: Amrit Thesis

59

In this case, can be written as

(5.23)

Now, the total time can be divided in two equal zones.

For

(5.24)

(5.25)

(5.26)

For

(5.27)

(5.28)

(5.29)

On the other hand, if , follows the path along . In this case,

(5.30)

(5.31)

(5.32)

Here, is same as calculated in Equation (5.16)

Now, the total time taken for the maneuvering operation can be divided into three parts.

For

(5.33)

(5.34)

Page 77: Amrit Thesis

60

(5.35)

For

(5.36)

(5.37)

(5.38)

For

(5.39)

(5.40)

(5.41)

5.2.2.2 Control Law

Sun

Tracking

System

Quaternion

Processing

PD Controller

Quaternion

Propagation

X

X

Wheel

momentum

Estimation

Figure 5.10 Control law for the Maneuvering mode

Page 78: Amrit Thesis

61

Now, we have , and profiles with us. These are the commanded angular

position, angular rate and angular acceleration respectively. We can use these

commanded profiles as references to develop the control law and correct the error

during maneuvering operation.

It is assumed that just before starting maneuvering, attitude has been acquired with very

high accuracy and the accuracy can be well maintained during the process just by

propagating the state vector. No measurement update is required during this operation.

The attitude of the commanded frame with respect to the initial body reference frame

can be written as

(5.42)

Similarly, attitude quaternion of the commanded frame with respect to inertial frame

can be written as

(5.43)

where is the attitude quaternion of the initial body reference frame with respect to

the inertial frame.

Now, we can write the commanded angular rate and angular acceleration of the satellite

in the commanded frame as

(5.44)

(5.45)

We can write the attitude quaternion of the body frame with respect to inertial frame at

any instant as

(5.46)

where is the estimated quaternion and is expected to be of high accuracy.

So, the error quaternion from the commanded frame to the body frame can be written as

(5.47)

Page 79: Amrit Thesis

62

The rotation matrix from commanded frame to the body reference frame can be written

as which is a function of the error quaternion. Now, the error in angular rate can

be written as

(5.48)

where is the estimated angular rate of the body reference frame with respect to

inertial frame.

Now the angular error corresponding to the error quaternion can be written as

(5.49)

where

is the vector part of the error quaternion

is the scalar part of the error quaternion

Before writing the expression for the control torque, we need to define some of the

parameters to obtain different gain values. For our control we set the following

parameters as

(5.50)

(5.51)

where

is the orbital period of the satellite

is the damping coefficient

is the reciprocal of the systems natural frequency

The proportional gain and the derivative gain can be written as

(5.52)

(5.53)

Now, the total control torque can be written as the combination of the following

torques.

Opposite of gyric torque is given by

(5.54)

Similarly, feed forward torque is given by

(5.55)

Page 80: Amrit Thesis

63

Proportional torque can be written as

(5.56)

And derivative torque can be written as

(5.57)

So, the total control torque is

(5.58)

This control torque is provided by the reaction wheels fixed in the body frame of

reference. Following section describes the scheme used to achieve this desired control

torque.

5.2.3 Implementation of four reaction wheels

In the implementation of the reaction wheels to control the attitude of the satellite, three

assumptions are made. They are

i. The attitude and angular rate of the satellite are exactly known. This is

because the maneuvering operation starts only after the Kalman filter state

vector is estimated with very high accuracy.

ii. The disturbance torque acting on the system is zero. This is a valid

assumption as the magnitude of the disturbance torque is negligible as

compared to the magnitude of the control torque.

iii. The angular acceleration of the satellite is constant over the time step

considered for the propagation of the state vector.

We can write the total angular momentum of the satellite as

(5.59)

where

is the inertial tensor of the whole satellite including the reaction wheels

is the angular rate of the satellite

is the spin angular momentum of the reaction wheels

It has to be noted here that is a vector and can be simply written as

(5.60)

This notation is correct if there are only three reaction wheels in the three orthogonal

directions of the body reference frame. In the current work, four reaction wheels are

used; three along the three orthogonal directions and one along the skew direction

equally inclined to all the three orthogonal axes of the body frame of reference. This is

Page 81: Amrit Thesis

64

done to introduce redundancy in the system. Thus, it will be possible to control the

satellite even if one of the reaction wheels fails.

Now, let us write the angular rates of all the four reaction wheels in the wheel frame as

(5.61)

Since the moments of inertial of all the reaction wheels are same, we can write the spin

angular momentum of the wheels in the wheel frame as

(5.62)

where

is the moment of inertial of each reaction wheel

It has to be noted that is a vector. So, the transformation matrix from the

wheel frame to the body frame can be written as

(5.63)

The number comes from the cosine of the angle made by the skew direction with

any of the three orthogonal axes in the body frame of reference.

Now, the spin angular momentum of the wheels in the body frame of reference as

(5.64)

Here, is a vector.

Sometimes it is required to go to the wheel frame from the body frame to in order to get

the required control torque. Since, the transformation matrix from the wheel frame to

the body frame is not a square matrix; its inverse can be obtained as

(5.65)

Page 82: Amrit Thesis

65

Now, Equation (5.59) can be differentiated to obtain

(5.66)

(5.67)

But, we have assumed that the disturbance torque acting on the satellite is zero.

Therefore, Equation (5.67) becomes

(5.68)

(5.69)

(5.70)

where

(5.71)

So, the rate of change of spin angular momentum in the body frame of reference can be

written as

(5.72)

Now this can be transformed to the wheel frame as

(5.73)

(5.74)

(5.75)

(5.76)

During the maneuvering operation, we get the reaction wheel speeds from the inbuilt

Hall sensors. The reaction wheels used in the current work are speed controlled. Hence,

the required control torque has to be converted into wheel speed for the next time step.

The speed required speed at the next time step is then converted into the speed pin

voltage and the corresponding duty cycle of the PWM supply and then fed to the motor

electronics.

Page 83: Amrit Thesis

66

We know that the state vector has already been estimated with very high accuracy

before starting the maneuvering process. Since during this process, only control torque

is acting on the satellite and we have its exact value from the Hall sensor readings, we

can say that the attitude and angular rate of the satellite are known with high accuracy

at any instant of time during this operation. We also have the commanded attitude and

angular rate profiles generated as mentioned in Section 5.2.2.1. Using these values, the

control torque is generated for particular time step.

5.2.4 True state propagation

Consider the situation at time

Using the estimated and commanded attitude and angular rates, the control torque is

calculated for the time duration . This control torque is then transformed

to angular accelerations of the reaction wheels in the wheel frame. We have assumed

that the angular acceleration of the satellite remains constant during a time step. So, we

can write

(5.77)

where

is the predicted angular speeds of the reaction wheels at

is the measured angular speeds of reaction wheels at

is the calculated angular accelerations of the reaction wheels at

The duty cycle of the PWM supply corresponding to is then fed to the motor

electronics.

After time , control torque is again calculated for the next step using the actual and

commanded state vectors at time .

Page 84: Amrit Thesis

67

(5.78)

Using this actual control torque, the actual attitude and angular rates are calculated at

time .

During the above analysis, if at any time the commanded torque or angular rate of the

reaction wheel come out to be more than their maximum limits, their values are reset to

those limits.

In the above analysis, all the four reaction wheels are used to generate the control

torque. However, in general only the three orthogonal reaction wheels are used to

generate the control torque. The fourth reaction wheel is kept at constant speed so that

the operating speeds of the orthogonal reaction wheels do not come close to zero. The

fourth reaction wheel is used to generate control torque only if any of the three

orthogonal reaction wheels fails.

Page 85: Amrit Thesis

68

5.2.5 Flowchart

Following flowchart explains the algorithm used in maneuvering mode.

Start

Set the mode as

Maneuvering_SP Mode

Check if reaction wheels are

capable (for avoiding saturation)NO

Start Momentum

Dumping

YES

Check if there is enough

power for maneuveringNO

Wait for battery

charging

Get sun_vector in

the body frame

Calculate ac, phi_c,

w_c, ws_c, t_total

Calculate g_ff,

g_p, g_d

Get ws for

next time step

Convert ws to Duty cycle of the

PWM supply for the speed pin

Supply power to reaction

wheels for required speed

Check if time is

greater than t_totalNO

YES

Stop

Log message:

Maneuvering_SPMode completed

Figure 5.11 Maneuvering mode flowchart

Page 86: Amrit Thesis

69

5.2.6 Use Case diagram

Following is the use case diagram for maneuvering mode which shows the

interdependency of different satellite modules during this mode.

Maneuvering Mode (Sun-pointing)

Sun tracking

processing

Commanded profile

generation

Control torque

generation through reaction

wheels

Propagartion of

estimated state vector

OBC2Reaction wheels

*

*

* **

*

*

*

*

*

*

*

Figure 5.12 Maneuvering mode use case diagram

Table 5.2 Use case diagram description for Maneuvering mode

Sl. No. Actor / Use Case Description

1 OBC2

Does the necessary processing to find out the

control torque with the help of necessary

feedback

2 Reaction wheels Provide the required control torque

3 Maneuvering mode This mode orients the satellite in the desired

attitude

4 Sun tracking processing Generates the unit vector along the direction of

the sun from the orbit propagation mode

5 Commanded profile generation Gives the commanded angular position and rate

of the satellite

6 Propagation of estimated state

vector

Gets the actual wheel rotation from the inbuilt

Hall sensors of the reaction wheels and uses them to propagate the true state vector

Page 87: Amrit Thesis

70

5.2.7 Maneuvering Mode Results

Following plots show the results for a total maneuvering angle of 123o.

Figure 5.13 Angular rate of the satellite

Above figure shows how the angular rate first increases, then remains constant and then

decreases again.

Figure 5.14 Angle rotated by the satellite during maneuvering

Page 88: Amrit Thesis

71

Figure (5.14) shows the angle rotated by the satellite. It is clear that this angle

overshoots. That is why it is required to implement a PID loop at the end of

maneuvering.

Figure 5.15 Actual and target quaternion during maneuvering

Figure 5.16 Reaction wheel speeds during maneuvering

Page 89: Amrit Thesis

72

Above figure shows the reaction wheel speeds during the maneuvering mode. It can be

seen that the speed along X and Y axis increases to more than 5000 rpm.

Following figure show the total control torque and its components. It can be seen that

the feed forward torque is the most dominating one and is acting on the satellite at the

beginning and at the end of maneuvering process.

Figure 5.17 Total control torque acting on the satellite

Page 90: Amrit Thesis

73

Figure 5.18 Proportional torque acting on the satellite

Figure 5.19 Derivative torque acting on the satellite

Page 91: Amrit Thesis

74

Figure 5.20 Feed forward torque acting on the satellite

Figure 5.21 Gyric torque acting on the satellite

Page 92: Amrit Thesis

75

5.3 PID Stabilization Mode

As we can see from the simulation results of the Maneuvering mode, the final attitude

of the satellite at the end of the maneuvering process deviates from the desired attitude.

This error comes from many sources such as the errors in the sensors causing error in

the attitude estimation which is being used in deriving the control torques. Apart from

this, the assumption of zero disturbance torque during maneuvering process also

introduces some error. So, it is required to correct the attitude at the end of each

maneuvering process to fine point the payloads and achieve high pointing accuracy.

5.3.1 Algorithm description and analysis

This mode implements two control laws depending upon the error in the attitude

quaternion. Those are

i. PD control

ii. PID control

If the error in the satellite’s attitude and the desired attitude is larger than a particular

threshold value then PD control is implemented, otherwise PID control is implemented.

In the current work, this threshold value is set to be 5o.

The method for getting the errors in attitude and angular rate has already been

discussed in the Section 5.2. Unlike the control torque in maneuvering mode, there is

no feed forward torque involved in this mode.

Page 93: Amrit Thesis

76

5.3.1.1 Control law

For the PD control part the total control torque can be written as

The total control torque when angular error is more than 5o can be written as

(5.79)

where

Gyric torque

Proportional torque:

Derivative torque:

and the gain value are

(5.80)

(5.81)

(5.82)

(5.83)

where is the inertia tensor.

Similarly, when angular error is less than 5o, control torque can be written as

Sun

Tracking

System

Quaternion

Processing

PID

Controller

Quaternion

Propagation

X

X

Wheel

momentum

Estimation

Figure 5.22 Control law for the PID stabilization mode

Page 94: Amrit Thesis

77

(5.84)

where

Gyric torque:

Proportional torque:

Derivative torque:

Integral torque:

and

(5.85)

(5.86)

(5.87)

with gain parameters as

(5.88)

(5.89)

(5.90)

The PID mode stops itself after the errors are below a certain predefined threshold

value or after crossing a particular time threshold.

Page 95: Amrit Thesis

78

5.3.2 Flowchart

Following flowchart describes the algorithm use in PID stabilization mode.

Start PID

Stabilization Mode

End of Maneuvering

Mode

Update the state vector by

taking magnetometer readings

Calculated the angular error

between the estimated

quaternion and the target

quaternion

Check if error >

theta_thresholdYES

Set control mode

as: PD Mode

Calculate proportional

and derivative torques

Propagate the

estimated state vector

NO

Set control mode

as: PID Mode

Calculate proportional,

derivative and integral torques

Propagate the

estimated state vector

Figure 5.23 PID stabilization mode flowchart

Page 96: Amrit Thesis

79

5.3.3 Use Case diagram

Following is the use case diagram for PID stabilization mode which describes how this

mode is dependent on other satellite modules.

PID Stabilization Mode

Sun tracking / Earth

pointing processing

State Vector update

using magnetometer

readings

Control torque

generation through reaction

wheels

Propagartion of

estimated state vector

OBC2 Reaction wheels

3 Axis Magnetometer

Error calculation

processing

OBC1

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

Select Mode: PD or

PID

*

*

Figure 5.24 PID stabilization mode use case diagram

Table 5.3 Use case diagram description for PID stabilization mode

No. Actor / Use Case Description

1 OBC1

Sends command to magnetometer, gets the

magnetic field readings and sends them to OBC2 for State Vector Update

2 OBC2 Does all the attitude estimation calculation part

3 Tri Axis Magnetometer Measures Earth’s magnetic field in the body

frame of reference

4 Reaction wheels

Sends the status of the running Estimation

algorithm status (convergency) back to Earth

through Beacon

Page 97: Amrit Thesis

80

5 PID stabilization Mode Provides pointing accuracy at the end of maneuvering mode.

6 Sun tracking/Earth pointing

processing

Generates the unit vector along the direction of

the sun from the orbit propagation mode

7 State Vector Update using magnetometer readings

Updates the estimated state vector based on earlier readings

8 Error calculation processing Self explanatory

9 Mode selection: PD or PID Self explanatory

10 Control torque generation through reaction wheels

Generates the control torque based on torque calculations

11 Propagation of estimated state vector

Gets the actual wheel rotation from the inbuilt

Hall sensors of the reaction wheels and uses

them to propagate the true state vector

5.3.4 Simulation results

Following figure shows the simulation results of the PID stabilization mode followed

just after the maneuvering mode described in Section 5.2.

Figure 5.25 Angular rate of the satellite

It can be seen from the above figure that the angular rate of the satellite remains at zero

after the PID mode is implemented.

Page 98: Amrit Thesis

81

Figure 5.26 Angle rotated by the satellite during PID stabilization mode

Above figure shows how the total angle after maneuvering and PID mode settles at the

target value of 123o.

Figure 5.27 Actual and target quaternion of the satellite

Above figure shows how the attitude quaternion approaches the target quaternion after

PID mode is implemented.

Page 99: Amrit Thesis

82

Figure 5.28 Reaction wheel speeds during PID stabilization mode

Following figures shows the total control torque and its component during PID mode. It

has to be noted that the two pulses in the total control torque are feed forward torques

from the maneuvering mode. There is no feed forward torque in PID mode.

Figure 5.29 Total control torque acting on the satellite

Page 100: Amrit Thesis

83

Figure 5.30 Proportional torque acting on the satellite

Figure 5.31 Integral torque acting on the satellite

Page 101: Amrit Thesis

84

Figure 5.32 Derivative torque acting on the satellite

Figure 5.33 Gyric torque acting on the satellite

Page 102: Amrit Thesis

85

Figure 5.34 Feed forward torque acting on the satellite

Page 103: Amrit Thesis

86

5.4 Momentum Dumping Mode

This mode is responsible for keeping the speeds of the reaction wheels around their

nominal values so that they can be used for any maneuvering process if required.

During maneuvering and PID stabilization modes, satellite experiences some external

disturbance torques. These torques generally come from air drag, solar radiation

pressure and gravity gradient. These external disturbance torques are responsible for

increasing the overall angular momentum of the system. However, the ADCS control

algorithm is so designed that it transfers this extra angular momentum to the reaction

wheels keeping the satellite stable enough to perform different payload operations,

power tracking operations and housekeeping tasks. So, the speeds of the reaction

wheels keep increasing and after some time they become saturated. Once saturation of

the reaction wheels occurs, they are no longer capable of taking the excess angular

momentum coming from the external disturbance torques. Hence, all the excess angular

momentum is absorbed by the satellite and it starts tumbling. Apart from this, if an

immediate maneuvering is required, the wheels are no longer capable of performing

that. So, it is required to dump this excess angular momentum and bring down the

speeds of the reaction wheels. This is done by using the torque coils fixed on the body

frame.

5.4.1 Algorithm description and analysis

The controller used for momentum dumping is known as Bang-bang controller. This is

a non-linear controller which uses the magnetic moment of the torque coils to its

maximum capacity. It should be noted that the satellite is already in PID stabilization

mode when momentum dumping is carried out. So, along with the external torque due

to magnetic field, there will be some control torque coming from the reaction wheels.

But, as the control torque is an internal torqu, it does not change the overall angular

momentum of the system. The external magnetic torque is solely responsible for

reducing the angular momentum of the system.

Now, the dynamic equation of the satellite can be written as

(5.91)

where

is the gyric torque

Page 104: Amrit Thesis

87

is the control torque which comes from the PID algorithm

is the external torque

The external torque consists of three parts.

Gravity gradient torque

External disturbance torque estimated by the Extended Kalman filter

External magnetic torque which helps in dumping excess angular momentum

Out of the above three torque, disturbance torque is estimated by the Extended Kalman

Filter continuously. Gravity gradient torque is a function of the orientation of the

satellite in the LVLH frame. The external magnetic torque is the real controlling torque

acting in this mode. Following analysis shows the method to generate the required

magnetic torque.

Let us assume that the wheel speeds are higher than their nominal values and are about

to saturate. So, the wheel speeds are needed to be brought down using the external

magnetic torque.

The wheel speed vector can be written as

(5.92)

Now, the angular momentum of each wheel putting in a single vector can be written as

(5.93)

Let the nominal speed of each wheel be . Therefore the excess angular momentum of

each wheel putting in a single vector can be written as

(5.94)

This excess spin angular momentum can be transferred from the wheel frame to the

body frame by using the transformation matrix derived in the Section 5.2.3.

(5.95)

Now the required magnetic moment can be written as

(5.96)

Page 105: Amrit Thesis

88

where

is the maximum magnetic moment capacity along each axis

is earth’s magnetic field in the body reference frame, calculated from the IGRF

model and the estimated attitude quaternion

Therefore, the external magnetic torque can be written as

(5.97)

Momentum dumping mode stops once the spin rates of all the wheels are below a

certain threshold value.

5.4.1.1 Control law

Sun

Tracking

System

Quaternion

Processing

PID

Controller

X

X

Wheel

momentum

Estimation

Quaternion

Propagation

Figure 5.35 Control law for the Momentum dumping mode

Page 106: Amrit Thesis

89

5.4.2 Flowchart

Following flowchart describes the algorithm used in momentum dumping mode.

Check if wheel rpm

> threshold rpm

PID Stabilization

Mode

YES

Check for power

availability

YES

NO

Wait for 1 minute

Start Momentum

Dumping

Calculate excess spin

angular momentum of the

wheels in the wheel frame

Transform it to body frame

and take cross product with

the Magnetic field vector

Calculate the magnetic

moment required

Calculate the generated

external magnetic torque

Update the state vector by

taking magnetometer readings

Add the calculated

PID torques

Propagate the

estimated state vector

Check if time >

t_threshold

Check if wheel rpm >

threshold rpm

YES

Stop Momentum

Dumping

NO

NO

YES

Log error message:

Could not dump

momentum

Momentum

Dumping Mode

Failed

Figure 5.36 Momentum dumping mode flowchart

Page 107: Amrit Thesis

90

5.4.3 Use Case diagram

Following use case diagram shows the dependency of different satellite modules during

momentum dumping mode.

Momentum Dumping Mode

Sun tracking / Earth

pointing processing

State Vector update

using magnetometer

readings

Control torque

generation through reaction

wheels

Propagartion of

estimated state vector

OBC2

Reaction wheels

3 Axis Magnetometer

Error calculation

processing

OBC1

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

Select Mode: PD or

PID

*

*

Calculation of excess

wheel spin momentum

Generation of external

magnetic torque through

torque coils

Torque coils

*

*

*

*

*

*

Figure 5.37 Momentum dumping mode use case diagram

Page 108: Amrit Thesis

91

Table 5.4 Use case diagram description for Momentum dumping mode

No. Actor / Use Case Description

1 OBC1 Sends command to magnetometer, gets the magnetic field readings and sends them to

OBC2 for State Vector Update

2 OBC2 Does all the attitude estimation and control

command generation

3 Tri Axis Magnetometer Measures Earth’s magnetic field in the body

frame of reference

4 Torque coils Generates required external magnetic torque

5 Reaction wheels Provides required control torque

6 Momentum dumping mode

This mode dumps excess spin momentum of

the reaction wheels and brings down their

speed

7 Sun pointing/Earth pointing processing

Generates the unit vector along the direction of the sun from the orbit propagation mode

8 State vector update using

magnetometer readings

Corrects the last propagated/estimated state

vector using the current magnetometer readings

9 Error calculation processing Self explanatory

10 Mode selection: PD or PID Self explanatory

11 Calculation of excess wheel spin

momentum Self explanatory

12 Generation of external magnetic torque through torque coils

Self explanatory

13 Control torque generation through

reaction wheels Self explanatory

14 Propagation of estimated state vector

Propagates the state vector elements using the dynamic equations

Page 109: Amrit Thesis

92

5.4.4 Simulation results

Following figures show the simulation result of the momentum dumping mode. Here,

the initial wheel speeds are about 2000 rpm about Y axis and the skew axis. The other

two reaction wheel speeds are smaller and lie near the nominal zone of 500 rpm.

Figure 5.38 Reaction wheel speeds during Momentum dumping mode

From the above figure, it can be seen that the final wheels speeds after momentum

dumping are 148 rpm, 114 rpm, 490 rpm and 131 rpm along the X, Y, Z and the skew

axis respectively.

Following two figures show the required magnetic moment and the magnetic torque

acting on the satellite during momentum dumping mode. The magnetic moment is

either positive or negative 0.03 A.m2. It is a non linear controller which uses the

maximum capacity of the torque coils. The torque acting on the satellite is a

superposition of the discontinuous magnetic moment and continuous magnetic field.

Page 110: Amrit Thesis

93

Figure 5.39 Required magnetic moment during Momentum dumping mode

Figure 5.40 Magnetic torque acting on the satellite

Page 111: Amrit Thesis

94

5.5 Earth Pointing Mode

Most of the satellite’s payload operation and communication require the attitude of the

satellite to be earth pointing. For example, during imaging and GPS functioning, it is

required that the Z axis of the satellite should be pointing towards the centre of earth.

During Earth pointing mode, satellite’s Z axis points towards the centre of earth and the

satellite rotates about its pitch axis with an angular rate equal to the orbital rate of the

satellite. This mode is a combination of ‘Maneuvering Mode’ and ‘PID Stabilization

Mode’. The difference is that unlike Sun Pointing Maneuvering Mode, here the final

angular rate of the satellite is not zero.

5.5.1 Algorithm description and analysis

Let current attitude quaternion in the LVLH frame be

Objective is to make

(5.98)

Depending on the time at which earth pointing is required, target is found using

the orbit model explained in Appendix A.

Then, the target can found out as

(5.99)

If the current attitude quaternion in the inertial frame is , the rotation quaternion

to be maneuvered can be written as

(5.100)

rotation quaternion, the algorithm proceeds as explained in the Maneuvering Mode and

the PID Stabilization Mode. Here, the target angular rate is same as the orbital angular

rate.

Page 112: Amrit Thesis

95

5.5.2 Simulation results

Following figures show the simulation results of the earth pointing mode.

In earth pointing mode, satellite’s body frame needs to be aligned with the LVLH

frame. Hence, the vector part of the attitude quaternion with respect to the LVLH frame

should go to zero and the scalar part should be one. Following figure clearly shows the

same.

Figure 5.41 Attitude quaternion w.r.t. LVLH frame

The LVLH frame rotates about its negative Y axis once in one orbital period and the

satellite is also aligned with LVLH frame. Therefore, satellite’s angular rate should also

be equal to the orbital angular rate. For a low earth orbit of altitude 700 Km, the orbital

angular rate is about 0.001 rad/s. From the following figure, it can be seen that the X

and Z components of the angular rate goes to zero while the Y component settles at

-0.001 rad/s.

Page 113: Amrit Thesis

96

Figure 5.42 Angular rate of the satellite

Figure 5.43 Reaction wheel speeds during Earth pointing mode

Page 114: Amrit Thesis

97

Figure 5.44 Total control torque acting on the satellite

Above figure shows the control torque needed for the earth pointing mode. It has to be

noted that there four torque pulses for each axis shown in the figure. The first two

corresponds to the maneuvering mode discussed earlier. The second two pulses

correspond to the control torque needed for earth pointing mode.

Page 115: Amrit Thesis

98

Chapter 6

Hardware Specification

6.1 Sensor

After going through the specifications of different available sensor options, it was

decided to go for HMR2300 digital Tri Axis Magnetometer. Its size, mass, power

consumption, cost and measurement resolution makes it best suitable for nanosatellites.

Following is a brief description of HMR 2300.

Figure 6.1 HMR2300 digital Tri axis magnetometer

Page 116: Amrit Thesis

99

Specifications:

• High Accuracy Over ±1 gauss, <0.5% Full Scale

• Range of ±2 gauss, <70 μgauss Resolution

• Three Axis (X, Y, Z) Digital Outputs

• 10 to 154 Samples Per Second, Selectable

• RS-232 or RS-485 Serial Data Interfaces

• PCB or Aluminum Enclosure Options

• 6-15 volt DC Unregulated Power Supply Interface

6.2 Actuators

Nanosatellite ‘Jugnu’ has an imaging payload which requires a minimum pointing

accuracy of 3o. Communication system also needs the satellite to be three axis

stabilized for uninterrupted data transfer in the communication window. It is also

required to keep the satellite stable in the sun pointing direction to have maximum solar

power incidence. Reaction wheels are the best suitable for achieving such fine pointing

accuracy and stabilization. Apart from this, it was decided to use torque coils to

detumble the satellite and desaturate the reaction wheels. Following is a description of

the design of the torque coils and arrangement of reaction wheels used in the present

nanosatellite.

6.2.1 Design and analysis of torque coils

Torque coils are basically a bunch of conducting loops placed in a manner so that the

area vector of the loops point along the orthogonal axis of the body reference frame.

These loops can be made by winding copper wire about the three cross-sections of the

Cubesat. However, a simpler technique has been used in the current work to fabricate

these loops. The Cubesat considered in the current work, has PCB based solar panels

on its three orthogonal faces. These PCBs have copper loops embedded in them and

they can produce the required magnetic moments just as efficiently as conventional

torque coils. Following is a brief analysis of the magnetic moment capacity of these

torque coils.

Page 117: Amrit Thesis

100

Let

be the number of turns in one layer of PCB

be the length of the outermost turn

be the breadth of the outermost turn

be width of the wire used

be inner wire spacing

Starting from the first turn

(6.1)

(6.2)

(6.3)

.

.

.

(6.4)

Now, the total magnetic moment can be written as

(6.5)

(6.6)

After a bit of algebra, above summation can be written as

(6.7)

Since there are two layers

(6.8)

Above expression can also be written as

(6.9)

Where

is the potential drop across the coil

is the total resistance of the circuit

Total resistance can be written as

Page 118: Amrit Thesis

101

(6.10)

Where

is the resistance of the coil

is the resistance of the electronic circuit

The total coil resistance can be calculated by the following method.

(6.11)

Where

is the resistance of the first turn

is the resistivity of the coil material (copper)

is the depth of the copper layer

Similarly the resistances of the other turns can be written as

(6.12)

.

.

.

(6.13)

Now, the total resistance of the coil can be written as

(6.14)

(6.15)

(6.16)

Since the two layers are connected in parallel, total resistance of the two layers will be

(6.17)

This resistance value can be put in the expression for magnetic moment to get it

completely as function of number of turns, coil dimensions and material resistivity.

Page 119: Amrit Thesis

102

In the present work, the Cubesat considered has face dimensions of 100 X 300 mm2,

100 X 300 mm2 and 100 X 100 mm

2. Based on structural design, simulations and above

calculations, following specifications have been finalized.

Axis Area

Mm2

No of

PCBs

m

required

in Am2

Voltage

available

(V)

Voltage

supplied

(V)

m

achieved

in Am2

Power

consumed

in Watt

X 100 x

300

1 0.03 3.3 1 0.065 0.045

Y 100 x

300

2 0.03 3.3 0.6 0.064 0.035

Z 100 x

100

2 0.03 3.3 1 0.070 0.115

Table 6.1 Torque coil design specifications

Figure 6.2 PCB based torque coils

Page 120: Amrit Thesis

103

6.2.2 Reaction wheels arrangement

Conventionally, reaction wheels are large in size and very heavy. They are generally

not suitable for nanosatellites. However, use of just a motor without any wheel

connected its shaft can serve the purpose where the satellite inertia is small enough to

be controlled by the rotor inertia of the motor. Maxon Motors Ltd. provides such small

motors. The motor chosen for present work is known as ‘EC 20 Flat’. It is a brushless

DC motor and has the following specifications.

Rotor diameter = 20 mm

Rotor inertia = 3.84 gcm2

Maximum speed = 15000 rpm

Maximum continuous torque = 3.91 mNm

Supplied Voltage = 9 V

As mentioned earlier, there are four reaction wheels used to include redundancy. Three

are fixed along three orthogonal directions of the body frame and one along the skew

axis equally inclined to the three orthogonal axes. Following is picture showing the

reaction wheel arrangement in the satellite.

Figure 6.3 Arrangement of four reaction wheels

Page 121: Amrit Thesis

104

Chapter 7

Conclusion

The ADCS are responsible for the estimation and control of the attitude of the satellite.

The accuracy with which these functions can be performed has been estimated by

performing simulations. This section lists out the various performance accuracy

parameters got through simulation.

Post-launch, the tumbling rate of the satellite has to be reduced from over 10 deg/s

second to as low as possible. The torque coils used in the ADCS of Jugnu reduce the

tumbling rate from over 10 deg/s to 0.1 deg/s. The duration of this detumbling is less

than twice the orbital period of Jugnu.

The functional relevance of the main payload of Jugnu – the near IR camera – depends

on the attitude control by the ADCS. The attitude control is also important for functions

like attaining the sun-pointing mode and testing of the GPS module. Simulations show

that the estimation accuracy limit of the attitude of the satellite is 1 degree. The

accuracy of the PID stabilization of the attitude has been found, by simulation, to be 2

degrees. Therefore, the overall pointing accuracy of the satellite that can be achieved is

3 degrees. The time taken for the estimation has been found to be less than one orbital

period.

The other major function of the ADCS is to dump the excess spin angular momenta of

the reaction wheels. The torque coils are employed to dump the angular momentum out

of the satellite. With the specifications of Jugnu, it will be possible to reduce the speeds

of the reaction wheels from over 2000 rpm to less than 500 rpm within a period of 1000

seconds.

From the above, it can be concluded that the ADCS of Jugnu are equipped to estimate

and control the attitude of Jugnu within the required limits of accuracy. Functional

redundancy has been incorporated wherever possible, for instance, there are four

reaction wheels. These ensure that the ADCS is a reliable system and the results of the

Page 122: Amrit Thesis

105

simulations ensure that all the functions of the ADCS are dispensed effectively, thus

contributing to the successful implementation of the mission objectives of Jugnu.

Scope of future work

The system developed to determine and control the attitude of Jugnu is competent to

fulfill the desired functions within accepted levels of accuracy. However, the

experience of having surveyed the literature and worked on various aspects of the

development of the system points to a few avenues with scope of improvement in the

future.

Efforts can be focused on building an integrated simulator, software which includes

modeling of all the hardware used, so that it becomes a single simulator sufficient for

all the attitude related simulations to be done.

Use of sun sensor and star tracker can be looked upon for attitude determination. The

ADCS of Jugnu did not feature a star tracker due to constraints of computational

requirements. A little more room with regard to the computational power will allow

improvement of the ADCS by a significant amount.

In Jugnu, propulsive thrusters were not used for attitude control as they only allow

coarse pointing due to large thrust impulse value of available thrusters. If a

technological step-up can lead to the development of thrusters for nanosatellites in the

near future, the relevance of their use can be looked upon. Similarly, use of Memes

based gyros can also be considered.

The above developments will help improve on the ADCS of Jugnu and will therefore

help in making a more efficient Attitude determination and control system for

nanosatellites.

Page 123: Amrit Thesis

106

References

[1] L. K. Herman; The history, definition and peculiarities of the Earth Centered

Inertial (ECI) Coordinate frame and the scales that measure time; 1994.

[2] Peter C. Hughes; Spacecraft Attitude Dynamics; Dover publications,1st edition,

1986.

[3] Luke Stras, Daniel D. Kekez, G. James Wells, Tiger Jeans, Robert E. Zee,

Freddy Pranajaya, Daniel Foisy; The Design and Operation of The Canadian

Advanced Nanospace eXperiment (CanX-1); 2003.

[4] WH Steyn, Y Hashida, V Lappas; An attitude control system and

commissioning results of the SNAP-1 nanosatellite; 2000.

[5] Hari B. Hablani; Design of a Payload Pointing Control System for Tracking

Moving Obects; Journal of Guidance, AIAA, Vol. 12, No. 3 May-June,1989.

[6] Mark L. Psiaki; Magnetic Torquer Attitude Control via Asymptotic Periodic

Linear Quadratic Regulation; Journal of Guidance, Control and Dynamics, Vol.

24, No. 2, March-April 2001.

[7] B. Wie, H. Weiss and A. Arapostathis, Quaternion Feedback Regulator for

Spacecraft Eigenaxis Rotations, Journal of Guidance, Vol. 12, No. 3, May-June

1989.

[8] M. S. Challa, G. A. Natanson, D.F. Baker and J. K. Deutschmann; Advantages

of Estimating Rate Corrections During Dynamic Propagation of Spacecraft

Rates – Applications to Real-Time Attitude Determination of SAMPEX, 1994.

[9] M. D. Shuster and S. D. Oh; Three-Axis Altitude Determination from Vector

Observations; Journal of Guidance and Control, Vol. 4, No. 1, 1981.

[10] Mark. L. Psiaki, Francois Martel and Parimal K. Pal; Three-axis Attitude

Determination via Kalman Filtering of Magnetometer Data; Journal of

Guidance, Vol. 13, No. 3, May-June,1990.

[11] Matthias Wiegand; Autonomous Satellite Navigation via Kalman Filtering of

Magnetometer Data; Acta Astronautica Vol. 38, Nos 4-8, pp 395-403, 1996.

[12] Peter J. Camillo and F. L. Markley; Orbit-Averaged Behavior of Magnetic

Control Laws for Momentum Unloading; Journal of Guidance and Control, Vol.

3, No. 6, Nov-Dec, 1980.

[13] Todd Edwin Humphreys; Attitude Determination for Small Satellites with

Modest Pointing Constraints; Master of Science thesis, Utah State University,

2003.

Page 124: Amrit Thesis

107

[14] Kristian Svartveit; Attitude determination of the NCUBE satellite; Master of

Science thesis, Norwegian University of Science and Technology, 2003.

[15] Wikipedia: (online), Available: http://en.wikipedia.org/wiki/Orbital_parameters

[16] Dr. T. S. Kelso, (2007). (Online),

Available: http://celestrak.com/NORAD/elements/

Page 125: Amrit Thesis

108

Appendix A

Two Line Element description

A two line element set (TLE) is a group of numbers provided in two lines and separated

by spaces, that specify the orbital parameters (elements) for a satellite, spent booster

rocket, or other man-made satellites. The text file for a particular satellite generally has

three lines. First line has a 24 character length satellite name which comes from the

NORAD satellite catalogue. The other two lines contain the actual orbit and position

information of the satellite.

Following is the format description of Line 1

Field Column Description

1.1 1 Line Number of Element Data

1.2 3 - 7 Satellite Number

1.3 8 Classification

1.4 10 - 11 International Designator (Last two digits of launch year)

1.5 12 - 14 International Designator (Launch number of the year)

1.6 15 - 17 International Designator (Piece of the launch)

1.7 19 - 20 Epoch Year (Last two digits of year)

1.8 21 - 32 Epoch (Day of the year and fractional portion of the day)

1.9 34 - 43 First Time Derivative of the Mean Motion

1.10 45 - 52 Second Time Derivative of Mean Motion (decimal point

assumed)

1.11 54 - 61 BSTAR drag term (decimal point assumed)

1.12 63 Ephemeris type

1.13 65 - 68 Element number

1.14 69 Checksum (Modulo 10)

(Letters, blanks, periods, plus signs = 0; minus signs = 1)

Page 126: Amrit Thesis

109

Similarly, the format description of Line 2

Field Column Description

2.1 1 Line Number of Element Data

2.2 3 - 7 Satellite Number

2.3 9 - 16 Inclination [Degrees]

2.4 18 - 25 Right Ascension of the Ascending Node [Degrees]

2.5 27 - 33 Eccentricity (decimal point assumed)

2.6 35 - 42 Argument of Perigee [Degrees]

2.7 44 - 51 Mean Anomaly [Degrees]

2.8 53 - 63 Mean Motion [Revs per day]

2.9 64 - 68 Revolution number at epoch [Revs]

2.10 69 Checksum (Modulo 10)

In case of small satellites, only the six orbit parameters and one epoch year are needed

for orbit propagation. All the other terms are used in higher order orbit models where

high accuracy is required.

Page 127: Amrit Thesis

110

Appendix B

Quaternion Kinematics

Conventionally, rotation matrices are used to represent the attitude of one reference

frame with respect to another frame. These rotation matrices are functions of the Euler

angles and the sequence in which they have been used to rotate the frame. It can be

proved that the relation between any two frames can be represented by one single axis

of rotation and some definite angle about that axis. The rotation angle and the axis of

rotation are found in the following manner.

Let the rotation matrix between two frames be

(B.1)

Now, the angle of rotation and the axis of rotation can be written as

(B.2)

(B.3)

Trace of the rotation matrix is 3 iff the matrix is a unit matrix. In that case the rotation

angle is an integral multiple of and the axis of rotation does not have any

significance. However, if the trace is -1, the rotation angle becomes an odd integral

multiple of . In this case, the axis of rotation becomes undefined if calculated using

Equation (B.3). Therefore, it is calculated using the following alternative method.

(B.4)

(B.5)

(B.6)

The sign ambiguities are resolved using following equations.

(B.7)

(B.8)

Page 128: Amrit Thesis

111

(B.9)

It has to be noted that all the four components of a quaternion are not independent.

They are bound by the relation

(B.10)

which means

(B.11)

Like rotation matrix, a quaternion also has its inverse given by

(B.12)

The rotation matrix corresponding to a quaternion can be written as

(B.13)

The above equation can also be written as

(B.14)

where

(B.15)

The multiplication between two quaternions is given by

(B.16)

where

(B.17)

Finally, the rate of change of quaternion can be written as

(B.18)

where

(B.19)