leo satellites: dynamic modelling, simulations and … · in this thesis nonlinear control method...
TRANSCRIPT
LEO SATELLITES: DYNAMIC MODELLING, SIMULATIONS AND SOME
NONLINEAR ATTITUDE CONTROL TECHNIQUES
A THESIS SUBMITTED TO
THE GRADUATE SCHOOL OF NATURAL AND APPLIED SCIENCES
OF
MIDDLE EAST TECHNICAL UNIVERSITY
BY
SONER KARATAŞ
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE DEGREE OF MASTER OF SCIENCE
IN
ELECTRICAL AND ELECTRONICS ENGINEERING
APRIL 2006
ii
Approval of the Graduate School of Natural and Applied Sciences.
Prof. Dr. Canan ÖZGEN
Director
I certify that this thesis satisfies all the requirements as a thesis for the degree of
Master of Science.
Prof. Dr. İsmet ERKMEN
Head of Department
This is to certify that we have read this thesis and that in our opinion it is fully
adequate, in scope and quality, as a thesis for the degree of Master of Science
Prof. Dr. Erol KOCAOĞLAN
Supervisor
Examining Committee Members
Prof. Dr. Kemal LEBLEBİCİOĞLU (METU,EE)
Prof. Dr. Erol KOCAOĞLAN (METU,EE)
Prof. Dr. Mübeccel DEMİREKLER (METU,EE)
Prof. Dr. Aydan ERKMEN (METU,EE)
Gökhan YÜKSEL M.Sc. (BILTEN)
iii
I hereby declare that all information in this document has been obtained and
presented in accordance with academic rules and ethical conduct. I also declare
that, as required by these rules and conduct, I have fully cited and referenced
all material and results that are not original to this work.
Name, Last name : Soner KARATAŞ
Signature :
iv
ABSTRACT
LEO SATELLITES: DYNAMIC MODELLING, SIMULATIONS AND SOME
NONLINEAR ATTITUDE CONTROL TECHNIQUES
KARATAŞ, Soner
Msc., Department of Electrical and Electronics Engineering
Supervisor : Prof. Dr. Erol KOCAOĞLAN
April 2006, 95 pages
In this thesis nonlinear control method techniques are investigated to control the
attitude of Low Earth Orbit satellites. Nonlinear control methods are compared with
linear control methods. Simulations are done using Matlab and Simulink software
and BILSAT-1 parameters are used in the simulations. Reaction wheels are used as
the actuator.
Keywords: Attitude Control, Satellite, LEO, BILSAT-1
v
ÖZ
ALÇAK YÖRÜNGE UYDULARI : DİNAMİK MODELLEME,
SİMÜLASYONLAR VE KİMİ DOĞRUSAL OLMAYAN KONUM DENETİM
TEKNİKLERİ
KARATAŞ, Soner
Yüksek Lisans, Elektrik-Elektronik Mühendisliği Bölümü
Tez Yöneticisi : Prof. Dr. Erol KOCAOĞLAN
Nisan 2006, 95 sayfa
Bu tezde düşük yörüngeli bir uydunun davranış hareketini kontrol etmek amacıyla
doğrusal olmayan denetleçlerin sistem üzerindeki etkisi incelenmiştir. Bu bağlamda
elde edilen doğrusal olmayan denetleçlerin performansları doğrusal denetleçler
kullanılarak elde eldilenlerle karşılaştırılmıştır. Benzetimler Matlab ve Simulink
yazılımları ile yapılmış olup BILSAT-1 uydusunun parametreleri uygulanmıştır.
Tetikleyici olarak tepki tekerleri kullanılmıştır.
Anahtar Kelimeler: Davranış Denetimi, Uydu, Düşük Yörünge Uydusu, BILSAT-1
vi
ACKNOWLEDGEMENTS
The author wishes to express his deepest gratitude to his supervisor Prof. Dr. Erol
KOCAOĞLAN and Gökhan YUKSEL (M.Sc., BILTEN-TUBITAK) for their
guidance, advices, criticism, encouragements and insight throughout the study.
vii
TABLE OF CONTENTS
PLAGIARISM…………………………………………………………………… iii
ABSTRACT……………………………………………………………………… iv
ÖZ………………………………………………………………………………… v
ACKNOWLEDGEMENTS……………………………………………………... vi
TABLE OF CONTENTS………………………………………………………... vii
LIST OF TABLES………………………………………………………............. x
LIST OF FIGURES……………………………………………………............... xi
GLOSSARY……………………………………………………………………… xiii
ABBREVIATIONS……………………………………………………………… xiv
CHAPTER 1)- INTRODUCTION
1.1 Background.............………………………….…………………....…………. 1
1.2 Literature Survey..…..................…………………………………...……….. 2
1.3 BILSAT-1…………………………………….…………………....…………. 2
1.4 This Report..................................…………………………………...……….. 5
1.5 Contributions Of This Thesis …..………......…………………....…………. 5
1.6 Outline Of The Thesis.................…………………………………...……….. 6
1.7 Tools.....................…………………………………………………...……….. 6
CHAPTER 2)- SENSORS AND ACTUATORS OF BILSAT-1
2.1 Sensors….....………………………………….…………………....…………. 8
2.1.1 Sun Sensor…...…………….……….………………….……………. 8
2.1.2 Magnetometer….………….………….………….………..………… 8
2.1.3 Star Camera…………………………...….…..………….…...……... 9
2.1.4 Gyroscope………………...……………….…………...……............. 10
2.1.5 Sensor Summary………………………….…………...…….............. 10
2.2 Actuators….………………………………………………………...… ........... 11
2.2.1 Reaction Wheels ...……….………………….……….…….….......... 11
viii
2.2.2 Magnetic Torquers……….………….….…………….….…………. 11
2.2.3 Gravity Gradient Boom….………….….…………….….…….……. 12
2.2.4 Actuator Summary……….………….….…………….….…………. 13
CHAPTER 3)- DEFINITIONS AND NOTATIONS
3.1 Reference Frames…...……………………………………………....……….. 14
3.1.1 Earth Centered Inertia Frame…...………………………….……… 14
3.1.2 Earth Centered Earth Fixed Frame……………………….………... 15
3.1.3 Orbit Frame…………………….……….………………....………. 16
3.1.4 Body Frame……………………………………………...……........ 16
3.2 Rotation Matrix ………………………..........……………………...….......... 17
3.3 Angular Velocity….…………………..........…...…………………...……….. 18
3.4 Attitude Representation…...…………..........……………………...………... 19
3.4.1 Euler Angles ..................…….…….……………………...……….. 20
3.4.2 Unit Quaternions………………………………………….……….. 22
3.5 The Inertia Matrix…............…………..........……………………...….......... 24
CHAPTER 4)- MATHEMATICAL MODELLING
4.1 Satellite Model…………….………….…………….……………...………… 25
4.1.1 Dynamics For Satellite Model……………...….………….………. 25
4.1.2 Kinematics For Satellite Model….………...………….....…........... 28
4.2 Magnetic Torque……..…………………………….……………....…........... 29
4.3 Reaction Wheel Torque..………………………….……………....…........... 30
4.4 Gravity Gradient Torque ………..…………….….……………................... 31
4.5 Disturbance Torques...……….…………..……….….………….................... 33
4.5.1 Solar Radiation………………….…………………………............. 33
4.5.2 Aerodynamic Torque…….…….….……………………...……….. 34
4.6 Reference Model ………..………………...…….….……………................... 34
CHAPTER 5)- MODELLING OF REACTION WHEELS
5.1 Control Allocation.............…………………………………………............... 36
5.2 Control Allocation For Satellite ……........…………………………………. 37
ix
5.3 Configuration Of Reaction Wheels …...................................………………. 38
CHAPTER 6)- CONTROLLER DESIGN AND SIMULATIONS
6.1 Quaternion Feedback Controller ……………………………..…………… 41
6.1.1 Stabilization Analysis………......…………………………............. 42
6.1.2 Energy Considerations…...…….….…………...................………..42
6.1.2.1 Kinetic Energy…….....................……………..................... 42
6.1.2.2 Potential Energy …...……...…………..................………...42
6.1.2.3 Total Energy …...……...……………....................………...43
6.2 Sliding Mode Regulator ……………………………..………........................ 45
6.3 Simulations…….…………………….…………............................................. 48
6.3.1 Quaternion Feedback Controller………….………………............. 48
6.3.2 Sliding Mode Regulator…..…….........................................………. 54
6.3.3 Actual Results Taken From Tübitak-Bilten For BILSAT-1…….... 62
CHAPTER 7)- CONCLUSIONS AND FUTURE WORK ….....……...……… 64
REFERENCES…………………………………………………………………... 67
APPENDIX A – SIMULINK DIAGRAMS.................................……………… 69
APPENDIX B – MATLAB SOURCE CODES.........................…………......... 84
APPENDIX C – TETRAHEDRAL CONFIGURATION ANGLE................... 94
x
LIST OF TABLES
Table – 2.1 Comparison table of attitude determination sensors............................ 10
Table – 2.2 Comparison table of attitude control actuators ……………………… 13
Table – 3.1 Comparison table of attitude representation …..……......................… 20
Table – 4.1 Effect of nω on system response……………....……......................….35
Table – 6.1 General BILSAT-1 parameters……………………........................… 48
Table – 6.2 Simulation parameters of Quaternion Feedback Controller.............… 48
Table – 6.3 Simulation parameters of the Sliding Mode Regulator....................… 54
Table – 6.4 Time and command table for the BILSAT-1...................................… 62 Table – 7.1 Simulation result of controllers……………....................................… 65
xi
LIST OF FIGURES
Figure – 1.1 Project team of BILSAT-1 …..........................................................3
Figure – 1.2 General view of BILSAT-1……………...………………………… 3
Figure – 1.3 BILSAT-1 was launched in Russia ….…………………...………... 3
Figure – 1.4 Block diagram of BILSAT-1…..……..……….........……………… 4
Figure – 1.5 Block diagram of ADCS .................................................................... 4
Figure – 1.6 Image of BILSAT-1 from Manyas Lake , Ulubat Lake
Bandirma Turkey …………….……………………………………………………5
Figure – 2.1 Block diagram of ADCS .........…………………………………….. 7
Figure – 2.2 Processing unit of star camera ......................………………………. 9
Figure – 2.3 Star camera head .......................................……………………….... 9
Figure – 2.4 Reaction Wheels in a tetrahedral configuration ..............………….. 11
Figure – 2.5 Slewing about pitch axis ..........................…….……………………. 11
Figure – 2.6 Stowed Boom ...................................................................………….. 12
Figure – 2.7 Deployed Boom .......................................…….……………………. 12
Figure – 3.1 Earth-Centered Inertial (ECI) frame …....…………………………. 15
Figure – 3.2 ECEF and ECI frames …...................………….…………………… 15
Figure – 3.3 Orbit frame …...................................………….…………………… 16
Figure – 3.4 Body frame …...........………………………….……………………16
Figure – 3.5 Euler Angles…...........………………………….……………………21
Figure – 4.1 Translational Motion……………..............…………….…………… 28
Figure – 4.2 Gravity gradient parameters……..............…………….…………… 31
Figure – 5.1 General Control Design For Reaction Wheels.................………….. 36
Figure – 5.2 Tetrahedral Configuration Of Reaction Wheels................................ 38
Figure – 6.1 Functions.…………………………………..…………………...….. 47
Figure – 6.2 System response of QFC without noise.………………………...….. 49
xii
Figure – 6.3 Output from regulator and wheels without noise ……...…………… 49
Figure – 6.4 System response for QFC with noise…………………………...…... 50
Figure – 6.5 Output from regulator and wheels with noise.……………...…...….. 50
Figure – 6.6 System response for the QFC without noise and reaction Wheel-2 was
disabled ……………………………………………………………………………51
Figure – 6.7 Output from regulator and wheels without noise and reaction Wheel-2
was disabled......................................................................................................…... 51
Figure – 6.8 System response for the QFC without noise and reaction wheels-2, 4
were disabled……………………………………………………………………… 52
Figure – 6.9 Output from regulator and wheels without noise and reaction wheels-2,
4 were disabled...............................................................................................…... 52
Figure – 6.10 System response for the QFC without noise and desired euler angles
are φ θ ψ = 0 30 0 ……..……..…………………………………..…… 53
Figure – 6.11 Output from regulator and wheels without noise desired euler angles
are φ θ ψ = 0 30 0 ...........................................................................…... 53
Figure – 6.12 System response for the SMR without noise……………...…...….. 55
Figure – 6.13 Output from regulator and wheels without noise………………….. 55
Figure – 6.14 System response for the sliding mode regulator with noise............. 56
Figure – 6.15 Output from regulator and wheels with noise ………..…………… 56
Figure – 6.16 System response for the SMR without noise and reaction Wheel-2 was
disabled.............................................................................................................…... 57
Figure – 6.17 Output from regulator and wheels without noise and reaction Wheel-2
was disabled………………...……………………………………..……………… 57
Figure – 6.18 System response for the sliding mode regulator without noise and
reaction wheel-2, 4 were disabled.....................................................................…... 58
Figure – 6.19 Output from regulator and wheels without noise and reaction Wheel-2,
4 were disabled...............................................................................................…... 58
Figure – 6.20 System response for the sliding mode regulator without noise and
desired euler angles are φ θ ψ = 0 30 0 ..........................................…... 59
Figure – 6.21 Output from regulator and wheels without noise desired euler angles
are φ θ ψ = 0 30 0 ...........................................................................…... 59
Figure – 6.22 System response of SMR without aerodynamic torque.................... 60
xiii
Figure – 6.23 Output from regulator and wheels without aerodynamic torque... 60
Figure – 6.24 System response of SMR with ×= 3 32 *1K …….......................... 61
Figure – 6.25 Output from regulator and wheels with ×= 3 32 *1K ...................... 61
Figure – 6.26 Actual pitch axis maneuver of BILSAT-1 ……………………… 62
Figure – 6.27 Actual pitch axis maneuver of BILSAT-1 (Zoomed)…………… 63
xiv
GLOSSARY
Space Terminology
• Apogee is the point at which a satellite in orbit around the Earth reaches its
farthest distance from the Earth.
• Attitude of a spacecraft is its orientation in a certain coordinate system.
• Center of Mass is a point in an isolated system that moves at a constant velocity
in accordance to Newton's laws of motion
• Eclipse is a transit of the Earth in front of the Sun, blocking all or a significant
part of the Sun's radiation.
• Ecliptic is the mean plane of the Earth's orbit around the Sun.
• Ellipse is a shape that looks like a squashed circle that is produced by cutting a
cone at an angle.
• Gravity is a property of matter which produces a mutual attraction between all the
bodies present.
• Latitude is the angular distance on the Earth measured north or south of the
equator along the meridian of a satellite location.
• Longitude is the angular distance measured along the Earth's equator from the
Greenwich meridian to the meridian of a satellite location.
• Orbit is the path that an astronomical body follows as it moves around another
astronomical body.
• Orbital rate is the mean angular velocity of the satellite rotation about the Earth.
• Roll, Pitch and Yaw are the angles describing satellite attitude. Roll is referred to
the rotation about the x-axis of a reference coordinate system, pitch to the y-axis, and
yaw to the z-axis.
• Perigee is the point at which a satellite in orbit around the Earth most closely
approaches the Earth.
• Vernal Equinox is the point where the ecliptic crosses the Earth equator going
from South to north.
xv
ABBREVIATIONS
ACS Attitude Control Subsystem
ADCS Attitude Determination Control System
BILTEN Information Technologies and Electronics Research Institute
CS Coordinate System
COBAN Imaging system developed and added as payload to BILSAT-1 by
BILTEN.
DEM Digital Elevation Map
ECI Earth Centered Inertial Frame
ECEF Earth Centered Earth Fixed Frame
GEZGIN Image Compression and Data Processing Card produced by BILTEN
GPS Global Positioning System
IAGA International Association of Geomagnetism and Aeronomy
IGRF International Geomagnetic Reference Field
LEO Low Earth Orbit
METU Middle East Technical University
NTNU Norwegian University of Science and Technology
OBC On-Board Computer
QFC Quaternion Feedback Controller
SMR Sliding Mode Regulator
SSDR Solid State Data Recorder
SSTL Surrey Satellite Technology Limited
TUBITAK The Scientific And Technological Research Council Of Turkey
UHF Ultra High Frequency
VHF Very High Frequency
rpm Revolutions Per Minute
w.r.t With Respect To
1
CHAPTER 1
INTRODUCTION
In this chapter, information about satellites ADCS systems, literature survey on
attitude controller types and information about BILSAT-1 satellite are briefly
introduced. Properties of BILSAT-1 project are presented. Furthermore, the work
done in this Master thesis is introduced. Finally, the outline of the thesis is given.
1.1 Background
Attitude control is required for nearly all space missions. Mission objectives of
satellites may be severely disrupted without correct attitude control. The attitude
control consists of two areas called attitude stabilization and attitude maneuver
control. The first is the process of maintaining an existing orientation, while the latter
has to do with controlling the reorientation of the spacecraft from one attitude to
another.
This thesis describes the design, analysis and development of attitude control
systems for the Low Earth Orbit (LEO) satellites. The purpose of this thesis is to
apply nonlinear control methods to control the attitude maneuver of a Low Earth
Orbit (LEO) satellite using reaction wheels and compare their performance with
those of linear controller. The nonlinear mathematical model of a satellite is derived,
and BILSAT-1’s parameters are used in this model in realizing the simulations.
In recent years there has been an increasing interest in space-related activities in
Turkey. It is hoped that this thesis will contribute to increase the already existing
knowledge and interest in satellites.
2
1.2 Literature Survey
This section presents the recent literature on attitude dynamics and control of
satellites. Wertz, Hughes (1986) and Wie (1998) are standard references on
spacecraft dynamics. Concerning attitude control of spacecraft, Wie, Weiss and
Arapostathis (1989) show that a PD controller stabilizes a spacecraft. Hall (2000) has
studied spacecraft attitude control using several reaction wheels as actuators. The use
of Euler parameters or unit quaternions in attitude control problems is treated by
Fjellstad and Fossen (1994), but the results are applied to underwater vehicles.
Derman (1999) has developed PD controller and linear state feedback controller for
the TURKSAT-1B using thrusters. Based on the methods of Musser and Ebert, and
Wisniewski, magnetic control laws using both a proportional-derivative controller
and linear quadratic regulator have been developed by Makovec, (2001). Ytrehus
(2003) has investigated linear and non-linear control techniques on NSAT when
reaction wheels were chosen as actuator. Fauske (2003) has studied feedback
stabilization of the attitude. A time varying periodic controller has been proposed for
the angular velocity stabilization problem by Fauske. Topland (2004) has developed
linear and nonlinear controller methods of ESEO spacecraft using thrusters and
reaction wheels. Three of four nonlinear controllers rely on cancellation of system
nonlinearities, while the fourth is a sliding mode controller. Overby (2004) has
developed energy based controllers and linear quadratic controller methods of
NCUBE satellite using magnetic coils. The stability analysis of the nonlinear
controller was performed using energy considerations and Lyapunov methods by
Overby. Uslu (1997), Bak (1999), Ose (2004) and Svartveit (2003) have worked on
attitude determination of the satellites.
1.3 BILSAT-1
BILSAT-1 is the first Low Earth Orbit (LEO) satellite of Turkey. Project was
started in August 2001 within the framework of an agreement between Surrey
Satellite Technology Limited (SSTL) and The Scientific and Technological Research
Council of Turkey (TUBITAK-BILTEN). The BILSAT-1 microsatellite was
launched from Russia on September 27, 2003, into an orbit of 686km distance from
the surface of the Earth. The spacecraft is a highly optimized satellite with a mass
of 129 kg. BILSAT-1 has an average orbit period of about 97.7 minutes. This orbit
3
gives the Turkish ground station and the satellite a contact time of about 10 minutes
per pass, with an average of four passes per day.
BILSAT-1 project had many aims. They are design, manufacture and launch of
one Enhanced SSTL microsatellite platform, one engineering model for use in
Turkey and the training of engineers in all aspects of the spacecraft design.
Remote sensing is the main mission of the BILSAT-1. To prepare a Digital
Elevation Map (DEM) of Turkey is one of the aims of the project team. To realize
this mission objective, it is aimed to take as many pictures of Turkey as possible.
Figure-1.1: Project team of BILSAT-1 Figure-1.2: General view of BILSAT-1
Figure-1.3: BILSAT-1 was launched from Russia
4
The spacecraft consists of different units. Imager unit is the main payload and
is used for remote sensing. For this aim BILSAT-1 uses two imagers, Pan-chromatic
and Multispectral imagers. The multispectral imager is composed of four individual
cameras with a ground sampling distance of 26 m. The panchromatic camera has a
ground sampling distance of 12 m. Attitude Determination and Control Subsystem
(ADCS) unit includes sun sensors, rate sensors, magnetometers, GPS receiver and
star trackers for attitude determination, gravity gradient boom, torque rods and
reaction wheels for attitude control. UHF/VHF system and an S-band system
constitute the communication unit of BILSAT-1. On-Board Computers (OBC) unit
consists of three main components. They are one Intel 80186 based OBC (16 MB of
memory) and two Intel 80386 based OBC (32 MB of memory each). Two solid state
data recorders (SSDRs) are used for storing large amounts of data on board. Body-
mounted solar panels supply the needed power of BILSAT-1. To connect different
subsystems of the spacecraft CAN (Control Array Network) network is used.
Figure-1.4: Block diagram of BILSAT-1 Figure-1.5: Block diagram of ADCS
The pictures taken from the satellite are used for study in miscellaneous areas
like disaster monitoring, monitoring the urban areas and vegetation. BILSAT-1 also
accommodates a store and forward type communications payload. As a part of the
know how training and transfer (KHTT) programme, a multi spectral camera
(COBAN) and a real time JPEG2000 image compression DSP (Digital Signal
Processing) card (GEZGIN) were developed by Turkish engineers to be
accommodated on the satellite.
5
Figure-1.6: Image of BILSAT-1 from Manyas Lake, Ulubat Lake Bandirma Turkey
Further information on BILSAT-1 can be found in references [1] and [2].
1.4 This Report
Attitude control (angular orientation) is needed so that the optical system covers
the programmed ground area at all times. However, the satellite tends to change its
orientation due to torque produced by the environment (drag of the residual
atmosphere on the solar array, solar radiation pressure, etc.) or by itself (due to
movement of mechanical parts, etc.). In this thesis some nonlinear controller
methods which are suitable for BILSAT-1 are studied. Applications of nonlinear
control methods are given and the results obtained are compared with linear method
which is presented in the Ceren Kaplan’s master thesis [20]. Finally conclusion of
the thesis is given and suggestions for future work are presented.
1.5 Contributions of this Thesis
• An extensive list of references on the subject of attitude determination and control
of satellites are compiled. This will serve as an excellent starting point for further
study.
• An other contribution of this thesis is the complete design, implementation and
test of an attitude control system for a low orbit satellite.
• Attitude dynamics of LEO satellites are investigated.
• Simulations codes are developed to simulate the maneuver performance of the
BILSAT-1 satellite using reaction wheels.
6
1.6 Outline of the Thesis
BILSAT-1 uses different sensors for attitude determination and actuators for
attitude control. In chapter 2 all these sensors and actuators are described. Also
comparison tables of these sensors and actuators are given.
Definitions and notations used in studying satellites are described in chapter 3.
The chapter also gives the mathematical background on which the mathematical
modelling of the following chapter is based.
Mathematical modelling of the satellite is given in chapter 4. Mathematical model
of both the dynamics of the satellite and its kinematics is derived here. Also
satellite’s environmental conditions and disturbing torques are mentioned in this
section.
In chapter 5 mathematical model of reaction wheels is derived. Information about
tetrahedral configuration is given and allocation problem is expressed in detail.
Chapter 6 covers nonlinear control methods which are used in the simulations.
Matlab and Simulink simulation results are given using BILSAT-1 parameters.
For future work, some suggestions and recommendations are presented in chapter
7 together with conclusions.
1.7 Tools
This thesis is written in Microsoft Word 2002. Also MathType Editor 5.2c is used
for mathematical equations. The controllers are designed and simulated in
Simulink6.0R14 and Matlab7.0R14.
7
CHAPTER 2
SENSORS and ACTUATORS of BILSAT-1
The attitude determination subsystem of BILSAT-1 is composed of four sun
sensors, four rate sensors, two magnetometers and two star cameras. Four reaction
wheels, three torque rods and a gravity gradient boom constitute the attitude
controller actuators. Figure-2.1 shows the block diagram of ADCS. In this chapter
all of these sensors and actuators are described in detail. Furthermore accuracy,
advantages and disadvantages of these sensors and actuators are given in the
comparison tables.
Figure-2.1: Block diagram of ADCS
8
2.1 Sensors
There are basically two classes of sensors commonly used in attitude
determination of satellites [5].
� Reference Sensors
� Inertial Sensors
Reference sensors measure the direction of a known vector e.g. the Sun
pointing vector. The vector measurement is a function of spacecraft attitude,
making it attractive for attitude determination. Minimum two measurements are
required for complete attitude information. Sun sensors, magnetometers and star
cameras are the reference sensors of BILSAT-1.
Inertial sensors measure rotational and/or translational acceleration
relative to an inertial frame. The sensors are subject to drift and bias errors and
errors are not bounded. In order to provide an absolute attitude, regular updates
are performed, based on references such as the Sun, stars or the Earth. Rate
sensors of BILSAT-1 are known as inertial sensors.
2.1.1 Sun Sensor
Sun sensors are the most widely used sensor type; one or more varieties
have flown on nearly every satellite. There are three basic classes of sun sensors
[3].
• Analogue sensors have an output signal that is a continuous function of the
Sun angle.
• Sun presence sensors provide a constant output signal whenever the Sun is
in the fields of view.
• Digital sensors provide an encoded, discrete output which is a function of
the Sun angle.
2.1.2 Magnetometer
The magnetometer measures the strength and direction of the Earth’s magnetic
field with its three orthogonal sensor elements. Magnetic field is strong and well
modelled in orbits close to earth. Therefore magnetometers are mostly used in
9
the Low Earth Orbit (LEO) satellites. There are different models to compute the
Earth’s magnetic field. International Geomagnetic Reference Field (IGRF) created
by the IAGA (International Association of Geomagnetism and Aeronomy) is the
common and wide-spread model for this aim. Every fifth year it is revised by
IAGA. Magnetometers accuracy is affected by three factors [5].
• Disturbance fields due to spacecraft electronics
• Modelling errors in the reference field model
• External disturbances such as ionospheric currents
Producers release different types of magnetometers. However main principles and
missions are the same for all of these types. The different types are;
• Induction Coil Magnetometer
• Fluxgate Magnetometer
• Squid Magnetometer
• Magnetoresistive Gaussmeter
2.1.3 Star Camera
Star camera produces an image of the stars and this image is compared
with an on board catalogue of the starry sky to determine the attitude. The location
of two or more stars in the sensors field of view is enough to determine the
attitude of the satellite. It is the most accurate attitude sensor on the satellites,
with accuracies down to a few thousands of a degree. However it is heavy and
big for small satellites.
Figure-2.2: Processing unit of star camera Figure-2.3: Star camera head
10
2.1.4 Gyroscope
Gyroscope is an instrument which uses a rapidly spinning mass to sense and
respond to changes in the inertial orientation of its spin axis. There are three basic
classes of gyroscopes [3].
• Rate Gyros (RG) measure spacecraft angular rates and are frequently part of
a feedback system for either spin rate control or attitude stabilization.
• Rate Integrating Gyros (RIG) measure spacecraft angular displacement
directly.
• Control Moment Gyros (CMG) are used to generate attitude control torque.
Therefore they are not attitude sensors like RGs or RIGs.
Due to drift in the gyroscopes it is necessary to use attitude sensors to compensate
for this effect and to determine precise attitude.
2.1.5 Sensor Summary
As it is mentioned above, BILSAT-1 uses four types of attitude determination
sensors. Among these sensors, magnetometers have low accuracy properties.
Furthermore sun sensors are the most widely used sensor type because of its
cheapness and enough accuracy. Star cameras are the most accurate sensors.
Heaviness and expensiveness are the main disadvantages of star cameras for the
small satellites. Due to drift and bias errors gyroscopes need some other sensors.
In the table given below, accuracies, properties and constraints of sensors are
demonstrated [4].
Table-2.1: Comparison table of attitude determination sensors
Sensor Accuracy [degree]
Properties Constraints
Sun Sensor 0.1 Cheap, simple, reliable
No measurement in eclipse
Magnetometer 1 Cheap, continuous coverage
Low altitude only
Star camera 0.001 Very accurate Expensive, heavy complex
Gyroscope 0.01/hour High bandwidth Expensive, drifts with time
11
2.2 Actuators
2.2.1 Reaction Wheels
Reaction wheels use the rotational variant of Newton’s third law. If the
motion speeds up a wheel which is inside the satellite, the satellite speeds up just
as much in the opposite direction. Normally, three reaction wheels are used to
control a satellite, with the wheel axes aligned with the body principal axes.
Using redundant fourth wheel is also a common practice in some satellites.
Reaction wheels are the most accurate attitude control actuator for satellites. On
the other hand, large weight is main disadvantage of reaction wheels.
Figure-2.4: Reaction Wheels in a Figure-2.5: Slewing about
tetrahedral configuration pitch axis
2.2.2 Magnetic Torquers
Magnetic torquers are used to generate magnetic dipole moment for attitude
control. They apply a torque on the satellite by producing a magnetic field which
interacts with the earth’s magnetic field. Magnetic torquers are generally a long
copper wire, winded up into a coil or a piece of metal with very high permeability.
12
Magnetic torquers produce a momentum which is given in [6] as;
,µ= × × i N AT B M = B
where
• B : Earths magnetic field
• i : Current in the coil
• N : Number of windings in the coil
• µ : Permeability
• A : Area spanned by the coil.
2.2.3 Gravity Gradient Boom
Gravity gradient boom is deployed from the satellite when passive control is
needed. While a boom with a tip mass is deployed from the satellite, the innermost of
two masses is in a lower orbit and pull on the outermost [4]. Thus it is possible to
control the attitude of the satellite pointing nadir surface. Deployment and
construction are the difficulties of the boom.
Figure-2.6: Stowed Boom Figure-2.7: Deployed Boom
13
2.2.4 Actuator Summary
Three types of attitude control actuators are mentioned above. Among them,
reaction wheels are the most accurate actuators. But they have the disadvantages
because of their heaviness. Furthermore, magnetic torquer’s response is slow and
accuracy is better than gravity-gradient boom. On the other hand; gravity gradient
booms do not need any energy for attitude control (passive control). Deployment
and construction are the difficulties of the boom. In the table given below,
accuracies, properties and constraints of actuators are demonstrated [4].
Table-2.2: Comparison table of attitude control actuators
Actuator Accuracy [degree]
Properties Constraints
Gravity gradient boom
1-5 Passive, simple Cheap Central body oriented
Magnetic torquers 1-2 Cheap Slow, lightweight, LEO only
Reaction Wheels 0.001-1 Expensive, precise, faster slew
Weight
14
CHAPTER 3
DEFINITIONS AND NOTATIONS
The orientation of the satellite and its mathematical model can be derived in
different frames. This chapter presents some definitions and notations used
throughout the thesis. The expressions used are based on [6], [7], [8] and [9].
3.1 Reference Frames
Several coordinate frames are described to determine and control the attitude
in three dimensional spaces. Rotation from one frame to another frame must be well
defined. Therefore concept of frame is described in detail in this section. Reference
frame is denoted by Fa , where the index a denotes which system is considered.
3.1.1 Earth-Centered Inertial (ECI) Frame
The Earth Centered Inertial (ECI) frame is a non-rotating reference frame in
which the laws of Newton apply. This frame is fixed in space and the origin of the
frame is located at the center of the earth. The i
x -axis points towards vernal
equinox, ϒ , the i
y axis is o90 east in the equatorial plane, and the i
z axis extends
through the North Pole. It can be seen in Figure 3-1. The frame is denoted by Fi.
15
Figure3-1: Earth-Centered Inertial (ECI) frame, Fi
3.1.2 Earth-Centered Earth Fixed (ECEF) Frame
The Earth Centered Earth Fixed (ECEF) frames origin is also located at the
center of the earth. However the e
x and e
y axes rotate with the hemisphere relative
to the ECI frame. e
z axis extends through the North Pole and the rotation is about
the e
z axis. The e
x axis points toward the intersection between the Greenwich
meridian and the Equator, which is at 0o longitude and 0o latitude. The e
y axis
completes the right handed system. The ECEF frame is denoted Fe and Fe rotates
relative to Fi with a constant angular velocity 57.2921*10 /ω −=e
rad s due to the
daily rotation of the earth.
Figure3-2: ECEF and ECI frames, Fe - Fi
16
3.1.3 Orbit Frame
The origin of orbit frame coincides with the center of mass of the satellite. The
oz axis is always nadir pointing (center of earth). The ox axis points in the direction
of motion tangentially to the orbit and also ox is perpendicular to oz . The oy axis
completes the right hand system, as shown in Figure 3-3. The Orbit frame is denoted
by Fo.
Figure3-3: Orbit frame, Fo
3.1.4 Body Frame
The origin of body frame also coincides with the center of mass of the
satellite. This frame is fixed with the satellite body. The nadir side of the satellite is in
the bz axis direction; bx axis and by axis coincide with the orbit frames axes when
the satellite has an attitude of 0o in roll, pitch and yaw. This frame is denoted Fb.
Figure3-4: Body frame
17
3.2 Rotation Matrix
Rotation matrix is a description of the rotational relationship between
two reference frames. Rotation matrix (direction cosine matrix) has three
statements [8]:
• Rotates a vector within a reference frame.
• Transforms vectors represented in one reference frame to another.
• Describes the mutual orientation between two coordinate frames, where
the column vectors are cosines of the angles between the two frames.
The rotation matrix R from frame a to b is denoted b
aR . Rotation of a
vector from one frame to another frame can be given using b
aR as;
to to from
from=v R v (3.1)
Rotational matrices belongs to the set of matrices denoted by SO(3) [6],
which is defined as
3 33 3 3 3(3) {R | R , R R=1 det R=1 }×
× ×= ∈ TSO R and (3.2)
Here 3 3×R is the set of all 3 3× matrices with real elements, 3 31 × is the 3 3×
identity matrix.
The orientation of the satellite is described using a rotation matrix B
OR , which
is denoted as
11 12 13
21 22 23
31 32 33
=
B
O
c c c
R c c c
c c c
(3.3)
Each of the elements ij
c is named directional cosines and column vectors can
be arranged as;
11
1 21
31
c
c c
c
=
12
2 22
32
c
c c
c
=
13
3 23
33
c
c c
c
=
(3.4)
18
Moreover, rotation matrix B
OR is orthogonal and because of the orthogonality
1c , 2c and 3c are orthonormal. Therefore below equations are valid for
column vectors.
1 2 3c c c× = 2 3 1c c c× = 3 1 2× =c c c (3.5)
The rotation matrix satisfies the following properties;
1( ) ( ) .−= =A B B T
B A AR R R (3.6)
3 3R R 1 ×=A B
B A (3.7)
3.3 Angular Velocity
Angular velocity, ω A
AB is defined as the rate at which a rotation matrix
changes. It is used to study the angular displacements that occur over time. Angular
velocities are dependent on the reference frames and ω A
AB indicates the angular
velocity of Fa relative to Fb in Fa.
When the angular velocities are in the same reference frame, they can be added.
For example, the following relation is valid
ω ω ω= +B B B
BI BO OI (3.8)
If angular velocities are in the different reference frames, rotation matrix is used for
addition. Equation 3.9 shows addition in the different reference frames.
ω ω ω= +B B B O
BI BO O OIR (3.9)
To establish the angular velocity, its relationship with the rotation matrix and the
time derivative of the rotation matrix are considered the following. Equation 3.7
is differentiated yielding
R R R R 0+ =� �A B A B
B A B A (3.10)
19
By defining a new matrix S as;
R R= � A B
B AS (3.11)
and inserting S matrix into equation 3.10, the expression turns into
0+ =TS S and = − TS S (3.12)
Skew symmetric form of the vector ω ω ω ω= 1 2 3
TAAB is written as:
ω ω
ω ω ω
ω ω
−
= − −
3 2
3 1
2 1
0
( ) 0 ,
0
AABSSSS (3.13)
Thus equation 3.11 can be expressed using ω A
AB
( ) R (R )ω = �A A A T
AB B BS (3.14)
Postmultiplying both sides of above equation by R A
B gives the relationship
between angular velocity and rotation matrix, and its derivative:
R ( )Rω=� A A A
B AB BS (3.15)
3.4 Attitude Representation
There are many ways to represent the attitude of the satellite in a reference
frame. But frequently Euler angles and Unit Quaternions are used in many
applications. We will introduce both of them but we will use unit quaternions
representation in our simulations. Main reason of this is the singularity problem
of the Euler angles.
Euler angles are generally used in analytical studies. However unit
quaternions are widely used in simulations and data processing. In the table given
below, characteristics and applications of euler angles, unit quaternions can be
found [5].
20
Table-3.1: Comparison table of attitude representation
Attitude
Representation
Para
meter Characteristics Applications
Euler Angles 3
- Minimal Set
- Clear Physical
interpretation
- Trigonometric functions in
rotation matrix
- No simple composition rule
- Singular for certain
rotations
- Trigonometric functions in
kinematic relation
-Theoretical physics,
spinning spacecraft
and attitude
maneuvers.
- Used in analytical
studies.
Unit
Quaternions 4
- Easy orthogonality of
rotation matrix
- Bilinear composition rule
- Not singular at any rotation
- Linear kinematic equations
- No clear physical
interpretations
- One redundant parameter
- Simple kinematic relation
- Widely used in
simulations and data
processing.
- Preferred attitude
representation for
attitude control
systems.
3.4.1 Euler Angles
Using roll ( )φ , pitch ( )θ and yaw ( )ψ angles the attitude can be
represented by three parameters. The angles φ , θ and ψ represent the
rotations about the x, y and z axis respectively in a rotation from one frame to
another. These angles are called the Euler Angles.
φ
θ
ψ
Θ =
(3.16)
The rotation matrices are given as follows:
21
,
1 0 0
0 cos sin
0 sin cosφ φ φ
φ φ
= −
xR (3.17)
,
cos 0 sin
0 1 0
sin 0 cosθ
θ θ
θ θ
= −
yR (3.18)
,
cos sin 0
sin cos 0
0 0 1ψ
ψ ψ
ψ ψ
− =
zR (3.19)
The rotation matrix O
BR is described by a rotation ψ (yaw) about the z axis,
then a rotation θ (pitch) about the y axis and finally a rotation φ (roll) about
the x axis (Figure3-5). The elements (.)c and (.)s can be used as an
abbreviation for the trigonometric expressions cos(.) and sin(.) , respectively. As
a result, the rotation matrix O
BR becomes
c c s c c s s s s c c s
( ) ( ) ( ) s c c c s s s c s s c s
s c s c c
ψ θ ψ φ ψ θ φ ψ φ ψ φ θ
ψ θ φ ψ θ ψ φ ψ θ φ ψ φ ψ φ θ
θ θ φ θ φ
− + + = = + − + −
O
B z y xR R R R (3.20)
Figure3-5: Euler Angles
22
3.4.2 Unit Quaternions
Unit quaternions are the other way for the attitude representation. They were first
described by the Irish mathematician Sir William Rowan Hamilton in 1843 and
applied to mechanics in three-dimensional space. Usually unit quaternions are used
in computations to overcome the singularity problem.
Quaternions have 4 dimensions (each quaternion consists of 4 scalar numbers),
one real dimension and 3 imaginary dimensions. Each of these imaginary dimensions
has a unit value of the square root of -1, but they are different square roots of -1 all
mutually perpendicular to each other, known as i,j and k. So a quaternion can be
represented as follows:
a + i b + j c + k d (3.21)
While the complex numbers are obtained by adding the element i to the real
numbers which satisfies = −2 1i , the quaternions are obtained by adding the
elements i, j and k to the real numbers which satisfy the following relations.
2 2 2i = j = k = -1 (3.22)
× ×
× ×
× ×
i j = -(j i) = k
j k = -(k j) = i
k i = -(i k) = j
(3.23)
They have four parameters, one real part η , and three imaginary parts ε .
Unit quaternions are defined by
( )( )( )
ηε ϕ
εϕη ε ε ϕ
εε ϕ
ε
= = =
1 x1
2 y2
3 z3
k sin 2
cos , = k sin 2 ,2
k sin 2
q
(3.24)
and represent a rotation about a unit vector ( )x y zk ,k ,k through an angle ϕ . The
unit quaternions satisfy 1=Tq q which also means that 2 2 2 2
1 2 3η + ε + ε + ε =1 (3.25)
23
Transformation from Euler angles to quaternion can be calculated as;
1
2
3
cos( 2) cos( 2)cos( 2) sin( 2)sin( 2)sin( 2)
sin( 2)cos( 2)cos( 2) sin( 2)cos( 2)sin( 2)
cos( 2)sin( 2)cos( 2) sin( 2)cos( 2)sin( 2)
cos( 2)cos( 2)sin( 2) sin( 2)sin( 2) cos( 2)
η φ θ ψ φ θ ψ
ε φ θ ψ φ θ ψ
ε φ θ ψ φ θ ψ
ε φ θ ψ φ θ ψ
+ − = +
−
(3.26)
Transformation from quaternion to Euler angles can be calculated as;
( ) ( )( )( )( )
( ) ( )( )
2 2 2 22 3 1 1 2 3
1 3 2
2 2 2 21 2 3 1 2 3
atan 2 q q q , q q q
asin -2 q q q
atan 2 q q q , +q q -q
φ η η
θ η
ψ η η
= + − − +
= −
= + −
(3.27)
The rotation matrix can be expressed in quaternions as:
1η ε η ε ε×= = + + 2
, 3 3( ) 2 ( ) 2 ( )OBR q R S S
(3.28)
Using equation 3.28, the rotation matrix OBR can be written as:
ε ε ε ε ε η ε ε ε η
ε ε ε η ε ε ε ε ε η
ε ε ε η ε ε ε η ε ε
− + − +
= + − + − − + − +
2 22 3 1 2 3 1 3 2
2 21 2 3 1 3 2 3 1
2 21 3 2 2 3 1 1 2
1 2( ) 2( ) 2( )
2( ) 1 2( ) 2( )
2( ) 2( ) 1 2( )
OBR
(3.29)
More frequently the rotation matrix in the opposite direction is used and according to
equation 3.6 and 3.29, OBR is obtained as;
ε ε ε ε ε η ε ε ε η
ε ε ε η ε ε ε ε ε η
ε ε ε η ε ε ε η ε ε
− + + −
= = − − + + + − − +
2 22 3 1 2 3 1 3 2
2 21 2 3 1 3 2 3 1
2 21 3 2 2 3 1 1 2
1 2( ) 2( ) 2( )
( ) 2( ) 1 2( ) 2( )
2( ) 2( ) 1 2( )
B O TO BR R
(3.30)
Now, rotation matrix OBR can be expressed using column vectors as;
= 1 2 3
B B B BOR c c c
(3.31)
where T
B B B Bi ix iy izc = c c c are column vectors (directional cosines). ,B B
1 2c c and B
3c
are the projections of the ,x yo o and zo axes in the body frame.
ε ε
ε ε ε η
ε ε ε η
− +
= − +
2 22 3
1 1 2 3
1 3 2
1 2( )
2( )
2( )
Bc
ε ε ε η
ε ε
ε ε ε η
+
= − + −
1 2 3
2 22 1 3
2 3 1
2( )
1 2( )
2( )
Bc
ε ε ε η
ε ε ε η
ε ε
−
= + − +
1 3 2
3 2 3 1
2 21 2
2( )
2( )
1 2( )
Bc
(3.32)
24
3.5 The Inertia Matrix
The inertia matrix ×∈�3 3oI about O (arbitrary origin) is defined according to [16]
and [9]:
oI
− −
= − − − −
I I Ix xy xz
I I Iyx y yz
I I Izx zy z
(3.33)
In this equation , and I I Ix y z are the moments of inertia about the
- axes, and zb b bx y and = = =, ,I I I I I Ixy yx xz zx yz zy are the products of inertia
defined as:
ρ= +∫2 2( )x m
V
I y z dV ; ρ= = ∫I Ixy yx m
V
xy dV (3.34)
ρ= +∫2 2( )y m
V
I x z dV ; ρ= = ∫I Ixz zx m
V
xz dV (3.35)
ρ= +∫2 2I ( ) ;z m
V
x y dV ; ρ= = ∫I Iyz zy m
V
yz dV (3.36)
If the axes of the body frame coincide with the principal axes of inertia, the inertia
matrix reduces to:
0 0
0 0
0 0
=
Ix
Iy
Iz
I (3.37)
BILSAT-1 inertia matrix parameters are Ixx=9,8194 kgm2 ; Ixy=Iyx=0.071 kgm2 ;
Ixz=Izx=0,2892 kgm2 ; Iyy=9,7030 kgm2 ; Iyz=Izy= 0,1011 kgm2 ; Izz=9,7309 kgm2.
Diagonal terms of inertia matrix (Ixx, Iyy, Izz) are larger than other components of I.
Throughout this thesis we neglect the off diagonal terms.
25
CHAPTER 4
MATHEMATICAL MODELLING
Mathematical model of dynamics and kinematics of satellite are derived in this
chapter. Also satellite’s environment is described in detail. The expressions are based
on [6], [18] and [19].
4.1 Satellite Model
4.1.1 Dynamics for Satellite Model
The satellite is modeled as a rigid body and its dynamic model is derived
using the Newton-Euler formulation. In this formulation angular momentum
changes related to applied torque. General mathematical dynamic model of the
satellite is obtained after some calculations.
Given the momentum p and the position vector r , the angular momentum h is
= ×h r p (4.1)
Derivation of angular momentum can be done using Newton’s second law
together with × =0v v and =p mv [4].
δ δ δ
τδ δ δ
= × + × = × + × = × =h r p r p v mv r ma r Ft t t
(4.2)
where v is the velocity vector and τ is the vector of all torques applied on the
satellite. The angular momentum can alternatively be defined by the moment of
inertia I , and the angular velocity ω of the satellite as;
ω=h I (4.3)
26
In equation 4.3, angular momentum was given in the Fi (ECI) frame. Dynamic
equation can be expressed in different frames. By using the rotation matrix, the
equations given below can be derived.
ω=B B BBIh I (4.4)
ω=I B I B BB B BIR h R I (4.5)
ω=I I B BB BIh R I (4.6)
ω=I I B B IB I BIh R I R (4.7)
=I I B BB II R I R (4.8)
After differentiating equation (4.6) and applying the time derivatives of the
rotation matrix, the following equation is obtained;
ω ω ω ω ω= + = +� � � �( )I I B B I B B B I B B I B BB BI B BI BI B BI B BIh R I R I S R I R I (4.9)
In the Body frame (Fb), this is expressed by postmultiplying both sides of
above equation by BIR
ω ω ω ω ω ω= + = +� � �( ) ( )B I B B I B B B I B B B B I B B B BI I BI B BI I B BI I BI B BI BIR h R S R I R R I R S R I I (4.10)
Merging the equation in 4.10 with 4.2 gives;
ω ω ω τ= + =� �( )B B I B B B B BI BI BI BIh S R I II II II I (4.11)
Finally general mathematical dynamic model of the satellite is obtained as;
ω ω ω τ τ+ × = =∑� ( )B B B B B B BBI BI BI k
k
I II II II I (4.12)
In the above equations;
I : is the moment of inertia,
ωBBI : is the angular velocity of the body frame with respect to the inertial
frame in the body frame,
τ Bk : are the torques acting on the satellite in body frame
The torques τ Bk are the sum of both internal torques and external torques on the
satellite. Usually internal effects like fuel sloshing and thermal deformations are not
27
accounted when using a rigid body model. Therefore internal torques are not taken
into consideration. The external torques τe can be separated into two groups as
disturbance torques and control torques. Disturbance torques are caused by
environmental effects such as gravity gradient torque, solar radiation, aerodynamic
drag and etc. Control torques are intentionally applied torques from control devices
such as reaction wheels, magnetic torquers and etc. Generally gravity gradient
torque, magnetic torque and reaction wheel torque are considered for the total torque.
τ τ τ τ= + +B B B Bg m r (4.13)
τ Bg : is the gravitational torque working on the satellite body.
τ Bm : is the torque applied by the magnetic torquer.
τ Br : is the torque applied by the reaction wheel.
In our simulations we will consider mainly gravity gradient torque and reaction
wheel torque for the maneuver of satellite. τ τ τ= +B B Bg r
Satellite dynamic equation in 4.12 can be alternatively expressed by using
the skew-symmetric operator.
ω ω ω τ+ =� )B B B B B BBI BI BII S( II S( II S( II S( I (4.14)
The angular velocity of the satellite ωBBI relative to the inertial frame is
expressed in the body frame as the sum of two angular velocities,
ω ω ω ω ω= + = +B B B B B O
BI BO OI BO O OIR (4.15)
where ω ω= − 0 0O TOI o is the known angular velocity of the orbit frame relative
to the ECI frame, expressed in Orbit frame. Then,
ω
ω ω ω ω
ω
= = −
2
x
B BBI y BO o
z
c with
ε ε ε η
ε ε
ε ε ε η
+
= − + −
1 2 3
2 22 1 3
2 3 1
2( )
1 2( )
2( )
c (4.16)
is obtained.
28
4.1.2 Kinematics For Satellite Model
The satellite's orientation can be described by the kinematics. The kinematic
is derived by integrating the angular velocity.
Figure4-1: Translational Motion
Translational motion of a particle of mass m is derived using Newton’s second
law.
=��mr f (4.17)
= = �p mv mr (4.18)
= = =� ���p mv mr f (4.19)
=�p
rm
(4.20)
Here r is the position vector of the particle relative to an inertial origin O, p is
the linear momentum of the particle and f is the force acting on the particle.
=� /r p m is known as the kinematic differential equation for the translational
motion and describes how position changes for a given velocity.
For the translational motion kinematic differential equation is simple to express
but for the rotational motion it is not so simple to express.
The differential equations, as given in reference [6], are;
η ε ω= −�1
2
T BBO (4.21)
[ ]1ε η ε ω×= +�3 3
1( )
2
BBOS (4.22)
29
Hence, another way of representing Equations 4.21 and 4.22 becomes;
η ε
ωε η ε×
− = = +
��
�3 3
1
1 ( )2
TBBOq
S (4.23)
4.2 Magnetic Torque
The magnetic torquers use natural torque caused by Earth’s magnetic field
interacting with a magnet. The magnetic torquer produces a magnetic dipole
moment when currents flow through its windings. This current is proportional to
the ampere-turns and the area enclosed by the torquer.
Magnetic torques together with a gravity gradient torque can be used to
obtain full three-axis stabilization. The main purpose of the actuators effect is to
place the satellite in its right attitude using the magnetic field.
In the following equations; modelling of the magnetic torquers is derived
[18].Magnetic torque on a coil element in the magnetic field is given by
d idτ = ×m s B (4.24)
On the coil element, magnetic dipole moment can be defined as dm id≅ s and
from a coil with windings the total dipole moment can be found by integrating over
the entire coil area S as:
m dm≅ ∫S
N (4.25)
where N is the number of windings. Finally torque on a magnetic coil can be
written as
τ = × = ×∫S
N B Bm ids m (4.26)
which can be written relative to the body frame as
B m Bτ
−
= × = = − −
m ( )
B Bz y y z
B B B B B B Bm x z z x
B By z x y
B m B m
B m B m
B m B m
S (4.27)
In the above equation;
τ Bm : is the torque which is generated by the magnetic torquer,
Bm : is the magnetic dipole moment generated by the torquer,
= B B B B
x y xB B B B : is the geomagnetic field vector.
30
The total torque generated on the satellite by the magnetic torquers is given by
the sum of all the partial torques from all the magnetic torquers.
m
= =
x x x x
By y y y
z z z z
N i A m
N i A m
N i A m
(4.28)
where kN is the number of windings in the torquer on the axis in the k direction,
ki is the torquer current and kA is the span area of the torquer, = , ,k x y z .
Magnetic torquers were used during settling to orbit of BILSAT-1. In this thesis
we are interested in maneuver of BILSAT-1. Therefore, magnetic torque from
magnetic torquer is not taken into consideration in our simulations.
4.3 Reaction Wheel Torque
The main advantage of reaction wheels, compared with magnetic torquers, is the
independency of satellites location for the control of the satellite. Nevertheless,
weight and expenses are disadvantage of the reaction wheels. The reaction wheel
equation is expressed in [23] as;
d
dtτ ω τ
= + × −
BB B Brr BI r friction
hh (4.29)
where τ Br is the torque produced by reaction wheels in the body frame,
ω = = T
r rx ry rz r rh h h h I is the angular momentum of the reaction wheels and
τ Bfriction is friction. The frictional torques τ B
friction is neglected in our simulations.
According to energy conservation principle, a torque rotating the reaction wheels
produces a torque of the same magnitude but in different direction on the satellite. It
is expressed by
ω ω= −� � Br r BII I (4.30)
Using ω ω ω ω = TB
BI x y z in equation 4.29, the equations of reaction wheel
torques are expressed as:
d
dt
ω ωτ
τ ω τ ω ω
τ ω ω
+ −
= + × = = + − + −
�
�
�
rx rz y ry zrxBB Brr BI r ry ry rx z rz x
rz rz ry x rx y
h h hh
h h h h
h h h
(4.31)
31
4.4 Gravity Gradient Torque
Gravity gradient torque exists due to the variation in the gravitational field.
Gravitational force varies with the inverse square of the distance from the Earth.
Therefore, closer to the Earth, gravitational force is greater.
Figure4-2: Gravity gradient parameters
The force working on a mass element in the satellite is given by the gravitational
law of Newton [11] as:
3
Rdf dm
Rµ= −
�
(4.32)
where µ is the Earth's gravitational coefficient constant and equals to µ =GM , G is
the universal gravitational constant and M is the mass of the Earth. =�
R R is the
distance from the center of the Earth to the mass element dm .
Numerical values of the constants mentioned above are:
= 245.9742 *10M kg (4.33)
−= 11 2 26.6720 *10 /G Nm kg (4.34)
µ = 14 23.986 *10 /Nm kg (4.35)
The gravitational torque around the centre of mass of a rigid spacecraft is given by;
3g
B B
rr df dmτ µ
×= × = −∫ ∫
�� R
R (4.36)
where r r=�
is the distance from the center of mass in the satellite to the mass
element dm . Here, it can be seen from figure4-2 that � � �
cR = R + r
32
Binomial series expansion of the expression -3R is given in reference [18] by
23( . )1
r rO
− +
��-3 -3
c 2 2c c
R = RR R
cR (4.37)
Inserting the above equation into 4.36 gravitational torque turns into
τ µ ×
= − −
∫� �� �
3( )1g
B
r rdmg
c c3 2c c
R R
R R (4.38)
µ µ
τ
= × − ×
∫ ∫� � �� ��3g g
B B
rdm rrdmg c c c3 5c c
R R RR R
(4.39)
3
B
rrdmµ
τ
= − ×
∫� ���
g c c3c
R RR
(4.40)
The expression B
rrdm∫��
is a part of the expression of the inertial torque of the
body, represented by
( )21r rr dm≅ −∫��
B
I (4.41)
By defining
Oσ =
�c
c
R
R (4.42)
the gravitational torque for the satellite becomes
µ
τ σ σ ω σ σ= × = ×2
3
3I 3 Ig O O O O O
cR (4.43)
According to [11], ωo is the speed of the spacecraft in a circular orbit of radius
oR . It can be said that ωo represents the angular velocity of the orbit frame Fo
about its yo axis. The gravity gradient written in the body frame is
Iµ
τ ω ω= × =2 23 3 3
3 ( ) ,B B Bg o o
c
c cR
(4.44)
where 3Bc comes from the rotation matrix B
OR and transforms the zb axis to the zo
axis. As given before, 3Bc is:
33
ε ε ηε
ε ε ηε
ε ε
−
= + − +
1 3 2
3 2 3 1
2 21 2
2( )
2( )
1 2( )
c (4.45)
Another representation of the gravitational torque is;
( )( )
( )
( )( ) ( )( )( )( ) ( )( )
( )( )( )
ε ε ηε ε ε
τ ω ω ε ε ηε ε ε
ε ε ηε ε ε ηε
− + − + − = − = − − − + − − − +
2 22 3 1 1 2
23 33
2 2 2 233 13 1 3 2 1 2
13 23 1 3 2 2 3 1
2 1 2
3 3 2 1 2
4
z yz y
Bg o x z o x z
y x y x
I II I c c
I I c c I I
I I c c I I
(4.46)
4.5 Disturbance Torques
Several disturbance torques affects satellites. The main effective disturbance
torques for satellites are described in this section. Further information can be found in
reference [11].
4.4.1 Solar Radiation
Solar radiation pressure produces a force on the satellite related to its
distance to the sun. Solar radiation has more effect at high altitudes. Therefore
solar radiation effect is ignored in our simulations for BILSAT-1. The surface area
of the satellite which faces the Sun is essential when determining the resulting
acceleration caused by solar radiation.
Equation 4.47 gives the force of solar pressure;
−= = = ××
26 2
8
1353 /4.51 10 /
3 10 /SR
SF W mp N m
c m s (4.47)
SF : is the solar radiation constant = 21353 /SF W m (4.48)
c : is the speed of the light 83 10 /c m s= × (4.49)
The torque due to the solar radiation is given by:
τ = − −�* * * ( )solarradiation SR R psr gp c A c c (4.50)
where �A is the exposed area to the Sun, Rc is the reflectivity, psrc is the
estimated center of pressure and gc is the center of gravity.
34
4.5.2 Aerodynamic Torque
At low altitude, satellites will be influenced by the air density. The effect is
dependent on the area and shape of the surface. This effect may reduce the velocity
of the satellite. The aerodynamic torque is given as:
τ ρ= × − =c c 21( ( )) ,
2aero aero v pa g aero d incF F V C Auuuu (4.51)
where:
ρ Atmospheric density 3( / )kg m
incA Area perpendicular to uv 2( )m
vuuuu Unit vector in velocity direction
dC Drag coefficient
V Velocity of satellite ( / )m s
pac Center of pressure
gc Center of gravity
4.6 Reference Model
Reference model generates the smooth reference trajectory for the control system
to use. It operates on the reference signal so that a step in the reference will be
filtered into a smooth curve. Controller than tries to follow this smooth curve. A
second order or third order filter is appropriate for this aim. We simulated second
order and third order filters and we saw that third order filter responds better than
second order filter.
Reference vector is denoted by rq and desired vector is denoted by dq .Transfer
function from desired reference to filtered reference was chosen as:
( )( )
{ }ω
ω ζω ω= ∈
+ + +
3
2 2, 1,2,3,4
2i
i
d n
r n n n
qi
q s s (4.52)
The damping ratio is chosen as 1ζ = for the critical damping output from reference
model. The undamped natural frequency nω is adjusted depending on the system
requirements. We gave different value to nω in our simulations. Then we saw that if
we increase the nω , settling time decreases. Nevertheless the system overshoots and
required torque increases. We prefer the long settling time and low torque rather than
35
short settling time because of the energy consumption. In the satellite operations,
energy consumption is main determining factor while designing design sub
components of the satellites. In Table-4.1, the effect of nω to the system response is
tabulated for two different values of nω when the controller is Sliding Mode
Regulator (SMR).
Table-4.1: Effect of nω on system response
Parameter ω = 0.022n (SMR) ω = 2n (SMR)
Settling Time 0.09 orbits 0.01 orbits
Max. Output Torque from Regulator 4e-4 Nm 0.6 Nm
Max. Output Torque from Reaction wheel 3e-4 Nm 0.5 Nm
Response Overdamp Overshoot
36
CHAPTER 5
MODELLING of REACTION WHEELS
Mathematical model of reaction wheels is derived in this chapter. Information
about tetrahedral configuration is given and equations of tetrahedral configuration
are derived. Allocation problem and its solution are expressed in detail. Further
information can be found in the references [3], [16] and [19]. The derivations are
based on [19].
5.1 Control Allocation
Figure-5.1: General Control Design For Reaction Wheels
In our simulations for the BILSAT-1, dimension of the controller output is 3=n .
Nevertheless input of the actuator (reaction wheel) has the dimension 4=r .
Therefore generalized force vector τ is distributed to input vector. According to [16]
and [19] relation between force vector and input vector is given as:
�( ) ,τ α=f
T Ku (5.1)
where ∈�ru and α ∈� p are defined as
[ ]1 1,..., ,...,α α α = = T T
p ru u u (5.2)
37
In equation 5.1, f is defined as force vector and = ∈�rf Ku , here K is diagonal
force coefficient matrix ×∈�r rK , { }1,...,= rK diag K K .
Allocation matrix ( )αT is defined as ( )α ×∈�n rT , ∈�n
it and ( ) [ ]1,...,α = rT t t .
Generalized force vector τ is distributed to the input vector u by minimizing the
force =f Ku . Minimization problem is solved as shown by equations stated below,
using reference [16] and [19].
{ }min= TJ f Wf (5.3)
0τ − =Tf (5.4)
( )†
11 1T T
T
f W T TW T
ω
τ−− −=
�������� (5.5)
( )1† 1 1
ω
−− −= T TT W T TW T (5.6)
For the case where W is a unity matrix
( )1†
ω
−
= T TT T TT (5.7)
Then, the actuator input vector is found as:
1 †ωτ−=u K T (5.8)
We used “alloc” command for the control allocation in the Matlab. “alloc” command
was formed by Fossen and Matlab GNC Toolbox was used in our simulation sfor
“alloc” command.
( ), , ,=u alloc K T W tau (5.9)
5.2 Control Allocation for Satellite
For the satellite, allocation problem is between the euler angles 3=n (roll, pitch,
yaw) and actuators 4=r (reaction wheels). Allocation matrix T consists of four
column vectors. Each column vector represents the distribution of the reaction wheel
torques to each axis of rotation of the satellite. Allocation matrix for the satellite with
four reaction wheels is given as
[ ]1, 2, 3, 4,
1 2 3 4 1, 2, 3, 4,
1, 2, 3, 4,
= =
x x x x
y y y y
z z z z
r r r r
T t t t t r r r r
r r r r
(5.10)
38
5.3 Configuration of Reaction Wheels
The reaction wheels of BILSAT-1 are arranged in a tetrahedral configuration.
Tetrahedral configuration is used for the robust control and continuity of the control
operation during failure in the any reaction wheel. The other advantage of tetrahedral
configuration comes from the geometry of the location of wheels. That’s, wheel
assembly is capable to deliver the satellite twice as much of the maximum torque that
a single wheel can supply.
Figure-5.2: Tetrahedral Configuration of Reaction Wheels
Allocation matrix for the tetrahedral configuration can be found using equation
5.10. Equations given below are valid for each axis in equation 5.10.
1, 2, 3, 4, 0+ + + =x x x x
r r r r (5.11)
1, 2, 3, 4, 0+ + + =y y y y
r r r r (5.12)
1, 2, 3, 4, 0+ + + =z z z z
r r r r (5.13)
39
These equations imply that in all axes total moment is zero. Each column vector is
the unity vector, i.e.
( ) ( ) ( )22 2
, , , 1, 1, 2,3,4.+ + = =i x i y i z
r r r i (5.14)
Angle between all vectors is ( )1 o2cos 1/ 3 109.47ϕ −= = . Thus the scalar product
between the two vectors is cosϕ=i j i j
t t t t where 1= =i j
t t and ϕ is the angle
between the vectors.
1t , the first column of T , is replaced along the z axis as [ ]1 0 0 1= −t . From the
equation 5.13 2, 3, 4,= =z z z
r r r are found as 2, 3, 4,
1
3= = =
z z zr r r . Then the preliminary
matrix becomes
2, 3, 4,
2, 3, 4,
0
0
1 1 11
3 3 3
= −
x x x
y y y
r r r
T r r r (5.15)
For finding 2t , 2, 0=x
r is considered and equation 5.14 is solved for 2=i
( ) ( )2
22
2,
10 1
3
+ + =
y
r (5.16)
2
2,
11
3
= ± −
y
r (5.17)
2,
22
3= ±
yr (5.18)
If 2,
22
3= −
yr is chosen as one of the possible solutions, application of equation
5.12 results in 3, 4,
12
3= =
y yr r . Thus the temporary tetrahedral matrix becomes
3, 4,0 0
2 1 10 2 2 2
3 3 31 1 1
13 3 3
= − −
x xr r
T (5.19)
40
For finding 3t and 4t , equation 5.14 is solved for 3,4=i
( )2 2
2
,
1 12 1
3 3
+ + =
i xr (5.20)
2 2
,
1 11 2
3 3
= ± − −
i x
r (5.21)
,
16
3= ±
i xr for 3,4=i (5.22)
Choosing 3,
16
3=
xr and 4,
16
3= −
xr (5.23)
Final tetrahedral allocation (distribution) matrix T is found as;
1 10 0 6 6
3 32 1 1
0 2 2 23 3 31 1 1
13 3 3
−
= − −
T (5.24)
41
CHAPTER 6
CONTROLLER DESIGN and SIMULATIONS
In this chapter quaternion feedback controller and sliding mode regulator for the
maneuver of a small satellite using reaction wheels are described. After that their
simulations in the matlab and simulink are given. Finally, the comments and
discussions on the obtained responses are given.
6.1 Quaternion Feedback Controller (PD)
In quaternion feedback, attitude is controlled by calculating the attitude deviation.
Suppose that the desired orientation of the body is given by a rotation matrix dR and
actual orientation is given by a rotation matrix R . In the case of rotation matrices, it
does not make sense to subtract dR from R as the result would not be a valid
rotation matrix for the attitude deviation. Deviation between the desired and the
actual orientation is described by the rotation matrix ∈ (3)R SO defined by
� TdR R R . = � *( ) ( ) ( ) ( ) ( )T
d dR q R q R q R q R q where dq is the desired quaternion,
*dq is the complex conjugate of dq , q is actual quaternion and q is the actual error
according to references [6] and [19]. Successive rotations in quaternion
representation are expressed as = ⊗* *( ) ( ) ( )d dR q R q R q q , where ⊗ is the quaternion
product operator. Then error in unit quaternions can be written as [6], [19]
η ε η η ε ε
ε η ε η ε ηε ε ε×
+= ⊗ = =
− − − − ×
3 3
*
1 ( )
T Td d d d
d
d d d d d d
q q q qS
(6.1)
The attitude error quaternion vector consists of the last three elements of q .
ε η ε ηε ε ε= − − ×d d d (6.2)
42
and derivative of this error is calculated as;
ε η ε η ε ηε ηε ε ε ε ε= + − − − × − ×� � � � � � �d d d d d d (6.3)
Nonlinear proportional and derivational (PD) controller is constituted using 6.2 and
6.3.
ε ε= − − � p du K K (6.4)
where u is the torque vector pK is positive definite proportional gain constant and
dK is positive definite derivative gain constant. Notice that, although it is a PD
controller in terms of quaternion and its derivative, it is a nonlinear controller in
terms of Euler angles which are the actual variables that are controlled.
6.1.1 Stability Analysis
Stability analysis of the quaternion feedback controller is based on the
Lyapunov candidate function (LCF). The total energy of the satellite can be
chosen as the LCF. Energy equations and lyapunov analysis are given below.
6.1.2 Energy Considerations
The total energy of the satellite can be divided into kinetic and potential
energy. Kinetic energy of the satellite is a result of the rotation in the orbit
frame. On the other hand gravity gradient and gyro effects due to revolution
about the Earth are the main sources of the potential energy.
6.1.2.1 Kinetic Energy
The kinetic energy is given in body frame with respect to the orbit frame as
ω ω=
1( )
2
B T Bkin BO BOE I
(6.5)
6.1.2.2 Potential Energy
Equation 6.6 represents the potential energy due to the gravity gradient and
equation 6.7 represents the potential energy due to revolution of the satellite about
the Earth.
ω= −23 3
3(( ) )
2
B T Bgg o zE Ic Ic (6.6)
ω= −21 1
1( ( ) )
2
B T Bgyro o xE I c Ic (6.7)
43
6.1.2.3 Total Energy
Total energy of the satellite is computed as the sum of kinetic and potential
energy.
tot kin gg gyroE E E E= + + (6.8)
Distinct form of equation 6.8 is:
ω ω ω ω= + − + −2 2
3 3 1 1
1 3 1( ) (( ) ) ( ( ) )
2 2 2
B T B B T B B T Btot BO BO o z o xE I II c Ic c Ic
(6.9)
Using = 1 2 3
TB B B Bi i i ic c c c and = + +2 2 2
1 2 3( )B T Bi i x i y i z ic Ic I c I c I c (6.10)
equation 6.9 turns into the following:
ω ω ω
ω
= + + + − +
+ + −
2 2 2 213 23 33
2 2 2 231 21 11
1 3( ) ( ( 1))
2 21
( ( 1))2
B T Btot BO BO o x y z
o z y x
E I c I c I c
I c I c I c
I
(6.11)
In chapter 3 equation 3.5 states that BOR is orthogonal. This means that:
+ + =2 2 211 21 31 1c c c and + + =2 2 2
13 23 33 1c c c (6.12)
Using above identities in equation 6.11, one gets
2 2 213 23
2 2 221 31
1 3( ) (( ) ( ) )
2 21
(( ) ( ) )2
B T Btot BO BO o x z y z
o x y x z
E I I I I
I I I I
ω ω ω
ω
= + − + − +
− + −
I c c
c c (6.13)
as the total energy. The Lyapunov candidate function is chosen as
( ) totV x E= (6.14)
In this equation totE satisfies the properties given below:
(0) 0V = (6.15)
( ) 0 0V x x> ∀ ≠ (6.16)
From equation 6.13 it is clear that
21 31 13 23, , , ,TB
BOx c c c cω = (6.17)
and if 0x = then ( )0 0V = .
For ensuring that the energy function is positive definite ( ) 0 0V x x> ∀ ≠ , inertial
constraint required is x y zI I I> > . In BILSAT-1 this constraint is not satisfied.
However, when we have investigated the energy function using Matlab, we have
seen that energy function was positive definite. Therefore we have used total energy
44
function to show stability analysis of quaternion feedback controller.
The derivative of the Lyapunov function is given in [9] and [19] as
ω τ=� ( )B T BBOV (6.18)
Refreshing the fact that quaternion feedback controller was
ε ε= − − � p du K K (6.19)
with u being the torque applied to the system, �V becomes;
ω τ ω ε ε= = − − �� ( ) ( ) ( )B T B B TBO r BO p dV K K (6.20)
Using equations 6.2 and 6.3 in equation 6.20, the new expression given below is
obtained.
ω η ε ηε ε ε
η ε η ε ηε ηε ε ε ε ε
= − − − ×
− + − − − × − ×
�
� � � � � �
( ) ( ( )
( ))
B TBO p d d d
d d d d d d d
V K
K (6.21)
Making use of kinematic equations of the satellite, derivative of the energy function
can be expressed as;
ω η ε ηε ε ε η ε η η ε ω
ε ω ε ηε ε ε ε η ε ω
= − − − × − + +
− − − − × − × +
� �
� �
1( ) ( ( ) ( ( ( 1 ( )) )
21 1
( ) ( ( 1 ( )) )))2 2
B T BBO p d d d d d d BO
T B BBO d d d d BO
V K K S
S
(6.22)
Using skew symmetric matrix expression for the cross products in equation 6.22, one
gets
ω η ε ηε ε ε η ε η η ε ω
ε ω ε ηε ε ε ε η ε ω
= − − − − + +
− − − − − +
� �
� �
1( ) ( ( ( ) ) ( ( ( 1 ( )) )
21 1
( ) ( ) ( )( ( 1 ( )) )))2 2
B T BBO p d d d d d d BO
T B BBO d d d d BO
V K S K S
S S S
(6.23)
From equation 6.23 it is not easy to predict that <� 0V . Some steps for further
simplification should be taken.
For the sake ofsimplicity, if reference is taken as zero, equation 6.20 changes into
ω ε ε= − −� �( ) ( )B TBO p dV K K (6.24)
By adding a new term to Lyapunov function in equation 6.9 one gets
ω ω ω
ω ε ε η
= + − +
− + + −
23 3
2 21 1
1 3( ) (( ) )
2 21
( ( ) ) ( (1 ) )2
B T B B T BBO BO o z
B T B To x p
V I c Ic I
I c Ic K
(6.25)
where ε ε η+ − 2( (1 ) )TpK is the new added term. By using the property ε ε η+ =2 1T
45
this new term can be further simplified as:
ε ε η η η+ − + = −2( 1 2 ) 2 (1 )Tp pK K (6.26)
Derivative of this equation is;
η− �2 pK (6.27)
From equation 4.21 η� expression is added, and this results in;
ε ωT Bp BOK (6.28)
After that, the derivative of the new Lyapunov function can be expressed as;
ω τ ε= +� ( ) ( )B T BBO r pV K (6.29)
Putting torque expression τ Br for the zero reference results in;
ω ε ε ε= − − +� �( ) ( )B TBO p d pV K K K (6.30)
ω ε= −� �( ) ( )B TBO dV K (6.31)
Now it is required to show that equation 6.31 is negative definite. Inserting equation
4.22 for the ε� term gives;
ω η ε ω×= − +�3 3
1( ) ( ( ( 1 ( )))
2
B T BBO d BOV K S (6.32)
Then, with zero reference, it is seen that the system will be stable provided that
η ε× +3 3( 1 ( ))S term is positive definite. For positive definiteness of this ×3 3 matrix,
the leading principal minors should be positive. i.e. η η ε> + >2 230 , 0 and
η η ε ε ε+ + + >2 2 2 21 2 3( ) 0 . This shows that �V is negative definite provided that η > 0 .
In equation 3.24 η was given as ϕ
η = cos2
, therefore ϕ must be in an interval
π ϕ π− < < for it to be positive. So, as a result, one can state that the method works
properly, provided the inertial constraints stated are satisfied. Once the stability is
guaranteed, one can choose proper pK and dK values for better system performance.
6.2 Sliding Mode Regulator
The sliding mode regulator idea is based on bringing the system states to a
manifold or surface where the states stay for all time. The sliding manifold is
designed such that once the system states are on the sliding manifold, states will
converge to the desired states. Sliding mode controller has the ability to deal with
parameter variations in the original nonlinear system (Robustness).
46
Satellite dynamic model was given in equation 4.12 as
ω ω ω τ= − × +� ( )B B B B B BBO BO BOI II II II I (6.33)
By defining a new matrix ( )M q as
η ε×= +3 3( ) 1 ( )M q S (6.34)
η ε ε
ε η ε
ε ε η
−
= − −
3 2
3 1
2 1
( )M q (6.35)
the kinematic equations in 4.23 can be rewritten as:
η ε ω= −�1
2
T BBO (6.36)
ε ω=�1
( )2
BBOM q (6.37)
The task of the sliding mode controller is formulated as to bring the limit of the norm
of quaternion error to zero. ε ε ε= −( ) ( ) ( )e dt t t
ε ε→∞
− =lim ( ) ( ) 0dt
t t (6.38)
where ε ( )d t is the desired quaternion, ε ( )t is the actual quaternion and ε ( )e t is the
quaternion error. According to reference [22], a suitable sliding manifold σ is
chosen such that it is reached in finite time and is maintained thereafter.
σ ε ε ε= + =�( ) 0e eK (6.39)
where K is a diagonal positive matrix and
ε ε ε= −� � �e d (6.40)
Using equation 6.37 in 6.40 one gets
ε ε ω= −� �1
( )2
Be d BOM q (6.41)
Derivative of sliding manifold, as derived in reference [22], is given as:
( )σ ε ηω ω ω τ ε− − = − + − + �� � �� 1 11 1 1
2 2 2
B B B Bd BO BO BO eMI S I MI K (6.42)
Lyapunov candidate function is chosen as:
σ σ−= >110
2TV IM and σ σ−=� �11
2TV IM (6.43)
where −1IM is a symmetric positive definite matrix. Then, �V becomes
( )σ ηω ω ω ε ε τ σ− − − −= − + + + − +� �� �� �1 1 1 11 1 1
2 2 2[ ]T B B B B
BO BO BO d eV IM S I IM IM K IM (6.44)
47
Control law is chosen as τ ρ σ= + ( )equ sign where proper control torque equ cancels
out all the terms in the derivative of V, and ρ σ( )sign guarantees that it is less than
zero at all times. After the substitution, the derivative of V being negative definite
shows the existence of a sliding mode controller that is asymptotically stable.i.e
( )ηω ω ω ε ε σ− − − −= − + + + + �� �� �1 1 1 12 2 2B B Beq BO BO BO d eu IM S I IM IM K IM (6.45)
σ ρ σ σ ρ σ=
= − = − ∑�3
1
( )T Ti
i
V sign ( ρ > 0 ) (6.46)
eqU is costly for implementation and the sign function causes chattering problem, To
overcome these difficulties discontinuous control law is implemented satisfying all
requirements for stability with the following discontinuous control law .
σ
τ = =
Φ max 1,2,3i
i iu sat i (6.47)
where Φ is the sliding boundary layer (thickness) and
ρ≥ +max
eqi iu u , ρ >( 0) (6.48)
maxiu was taken as maximum torque of reaction wheels and equation 6.47 was
realized as controller torque in our simulations. Saturation function is used to help
mediate the chattering problem that occurs with the sign function. Saturation
function ( )( ).sat is given as
σ
σ σσ
σ
> Φ
= ≤ Φ Φ Φ
− < −Φ
1
1
i
i ii
i
for
sat for
for
(6.49)
The saturation function becomes the sign function when sliding boundary layer
approaches zero.
The sign function The saturation function The hyperbolic tangent function
Figure-6.1: Functions
48
6.3 Simulations
Based on the information and derivations done in previous chapters controllers
are designed and simulated using Matlab and Simulink software. General BILSAT-1
parameters which are used in the simulations are given in the table below.
Table-6.1: General BILSAT-1 parameters Parameter Value Weight 120 kg Inertia Moment = = = 29.8194 , 9.7030 , 9.7309x y zI I I kgm
Orbit 686 km Orbit Period 97.7 Min 6.3.1 Quaternion Feedback Controller (PD)
Quaternion feedback controller is investigated for the BILSAT-1 satellite.
Reaction wheels are considered as actuator for maneuver of the satellite.
Simulation parameters are as shown in table below.
Table-6.2: Simulation parameters of Quaternion Feedback Controller
Initial Angular Velocity: ω = 0 0 0B TBO
Initial Euler Angles: φ θ ψ = 0 0 0
Proportional Gain Parameter Kp: 0.5
Derivative Gain Parameter Kd: 2.5
Desired Euler Angles: φ θ ψ = 20 40 60
Max Torque of Wheels: 1 Nm
Aerodynamic Torque: 3.4245e-7
Kp and Kd values are chosen empirically (trial and error) regarding best tuning. It
is noticed that if Kp is decreased, the frequency of oscillations decreases. If Kd is
increased, the system damps faster. Simulations in this section are repeated for
several cases. In all cases aerodynamic torque is taken into consideration.
49
In case 1, four reaction wheels are applied as the actuators and noise effect is not
considered.
Figure-6.2: System response of QFC without noise
The system is overdamped with long rise time and settling time. Rise time is 0.04
orbits and settling time is 0.09 orbits. The angles reach their final value at 0.1 orbits.
Figure-6.3: Output from regulator and wheels without noise
The upper graph in Figure-6.3 shows the output torque of the controller before the
allocation process. The (3x1) output matrix is converted to the (4x1) reaction wheel
torque matrix by the allocation command and the lower graph in Figure-6.3 shows
this output matrix. The output of the reaction wheels reaches to zero after 0.11 orbits.
50
In case 2, four reaction wheels are applied as the actuators and uniformly distributed
noise effect is considered.
Figure-6.4: System response for QFC with noise
Noise does not affect the euler angle response and angular velocity too much. Using
reference model for the filtering is the main reason of this response.
Figure-6.5: Output from regulator and wheels with noise
Compared to case 1, noise affects the torque obtained from the controller output. The
affected output from regulator causes the torque coming from reaction wheels to
oscillate as it behaves as the input of the allocation process. Output of the reaction
wheel does not converge to zero completely but this does not affect the behavior of
the overall system.
51
In case3, the second reaction wheel is disabled in order to show that system still
works in case of loss of one reaction wheel. Noise effect is not considered.
Figure-6.6: System response for the QFC without noise and reaction Wheel-2 was
disabled
Disabling the 2nd wheel doesn’t effect either settling time or rise time of the satellite
euler angles. This is mainly because of the tetrahedral configuration of the reaction
wheels.
Figure-6.7: Output from regulator and wheels without noise and reaction Wheel-2
was disabled
As can be seen from Figure-6.7 the second reaction wheel is inactive thus produces
no torque.
52
In case 4, the second and fourth reaction wheels are disabled in order to investigate
the performance of the system in the case of a loss of two reaction wheels. Noise
effect is not considered.
Figure-6.8: System response for the QFC without noise and reaction wheels-2, 4
were disabled
As can be seen from the Figure-6.8, the disabling of the two wheels results in not
being able to obtain the desired angles. None of the angles reaches the desired
values. It can be concluded that tetrahedral configuration does not compensate for the
loss of 2 wheels, but at least the system does not become unstable.
Figure-6.9: Output from regulator and wheels without noise and reaction wheels-2, 4
were disabled
53
In case 5, Maneuvering of the small satellite in one direction (pitch axis) is
simulated. Desired pitch angle is taken as 30o. Noise effect is not considered.
Figure-6.10: System response for the QFC without noise and desired euler angles are
φ θ ψ = 0 30 0
Rise time is 0.04 orbits and settling time is 0.09 orbits. The pitch angle reaches its
final value at 0.1 orbits.
Figure-6.11: Output from regulator and wheels without noise desired euler angles are
φ θ ψ = 0 30 0
54
6.3.2 Sliding Mode Regulator
Sliding mode regulator is investigated for the BILSAT-1 satellite. Reaction
wheels are considered as actuator for maneuver of the satellite.
Simulation parameters are taken as shown in table below.
Table-6.3: Simulation parameters of the Sliding Mode Regulator
Initial Angular Velocity: ω = 0 0 0B TBO
Initial Euler Angles: φ θ ψ = 0 0 0
K: ×3 30.2 *1
:Φ 0.002
Desired Euler Angles: φ θ ψ = 20 40 60
Max Torque of Wheels: 1 Nm
Aerodynamic Torque: 3.4245e-7
Sliding boundary layer (thickness) Φ was chosen empirically. In case 7, effect of K
was investigated. In this case it was seen that if K is increased, oscillation is
constituted in the output. Simulations in this section are repeated for several cases as
done in previous section. In all cases aerodynamic torque is taken into consideration
without case 6.
55
In case 1, four reaction wheels are applied as the actuators and noise effect is not
considered.
Figure-6.12: System response for the SMR without noise
The system responds faster than QFC. Rise time is 0.04 orbits and settling time is
0.07 orbits. The angles reach their final value at 0.08 orbits.
Figure-6.13: Output from regulator and wheels without noise
The upper graph in Figure-6.13 shows the output torque of the controller before the
allocation process. The (3x1) output matrix is converted to the (4x1) reaction wheel
torque matrix by the allocation command and the lower graph in Figure-6.13 shows
this output matrix. The output of the reaction wheels reaches to zero after 0.08 orbits.
56
In case 2, four reaction wheels are applied as the actuators, noise effect is considered.
Figure-6.14: System response for the sliding mode regulator with noise
Like QFC, noise does not affect the euler angle response and angular velocity too
much.
Figure-6.15: Output from regulator and wheels with noise
Noise effects the torque obtained from the controller output. The affected output
from regulator causes the torque coming from reaction wheels to oscillate as it
behaves as the input of the allocation process. The output reaction wheel does not
converge to zero completely but this does not affect the behavior of the overall
system. SMR shows better performance than QFC as it can be seen from the
comparison of Figure-6.15 and Figure-6.5.
57
In case 3, the second reaction wheel is disabled in order to show that system still
works in case of loss of one reaction wheel. Noise effect is not considered.
Figure-6.16: System response for the SMR without noise and reaction wheel-2 was
disabled
Disabling the 2nd wheel doesn’t effect either settling time or rise time of the satellite
euler angles. This is mainly because of the tetrahedral configuration of the reaction
wheels.
Figure-6.17: Output from regulator and wheels without noise and reaction Wheel-2
was disabled
As can be seen from figure-6.17 the second reaction wheel is inactive thus produces
no torque.
58
In case 4, the second and fourth reaction wheels are disabled in order to investigate
the performance of the system in the case of a loss of two reaction wheels. Noise
effect is not considered.
Figure-6.18: System response for the sliding mode regulator without noise and
reaction wheel-2, 4 were disabled
As can be seen from the Figure-6.18, the disabling of the two wheels results in not
being to not to able to obtain the desired angles. None of the angles reaches the
desired values. It can be concluded that tetrahedral configuration does not
compensate for the loss of 2 wheels, but at least the system does not become
unstable.
Figure-6.19: Output from regulator and wheels without noise and reaction Wheel-2,
4 were disabled
59
In case 5, maneuvering of the small satellite in one direction (pitch axis) is simulated.
Desired pitch angle is taken as 30o. Noise effect is not considered.
Figure-6.20: System response for the sliding mode regulator without noise and
desired euler angles are φ θ ψ = 0 30 0
Rise time is 0.04 orbits and settling time is 0.07 orbits. The pitch angle reaches its
final value at 0.08 orbits.
Figure-6.21: Output from regulator and wheels without noise desired euler angles are
φ θ ψ = 0 30 0
60
In case 6, four reaction wheels are applied as the actuators, noise effect and
aerodynamic torque are not considered. Effect of aerodynamic torque on controller
can be seen in this case.
Figure-6.22: System response of SMR without aerodynamic torque
It can be seen from Figure-6.22 that magnitude of aerodynamic torque is very small
(3.4245e-7) regarding to output torque from regulator (5.0e-4). Therefore
aerodynamic torque does not change the total torque substantially. Euler angles and
angular velocity results without aerodynamic torque almost identically with the case
1. Nonetheless aerodynamic torque is considered to simulate space conditions in all
case simulations except case 6.
Figure-6.23: Output from regulator and wheels without aerodynamic torque
61
In case 7, four reaction wheels are applied as the actuators, noise effect is not
considered. Effect of K value used for calculation of sliding manifold is investigated
in this case. K is taken as ×3 32 *1 instead of ×3 30.2 *1 .
Figure-6.24: System response of SMR with ×= 3 32 *1K
Increasing the value of K effects response of SMR in desired values. SMR does not
approach to desired value. Therefore in our simulations value of K was chosen as
×3 30.2 *1 after giving different value to K.
Figure-6.25: Output from regulator and wheels with ×= 3 32 *1K
62
6.3.3 Actual Results Taken from BILSAT-1
We used the actual results taken from Tübitak-Bilten for BILSAT-1 in pitch
direction to compare our results with actual response of BILSAT-1. Data taken from
Tübitak-Bilten is obtained according to time and command given in table 6.4
Table-6.4: Time and command table for the BILSAT-1
20 March 2006 02:22:00 UTC Pitch=+30 degree command 20 March 2006 02:37:00 UTC Pitch=0 degree command
20 March 2006 02:52:00 UTC Pitch=+30 degree command 20 March 2006 03:07:00 UTC Pitch=0 degree command
20 March 2006 04:02:00 UTC Pitch=-30 degree command 20 March 2006 04:17:00 UTC Pitch=0 degree command
20 March 2006 04:32:00 UTC Pitch=-30 degree command 20 March 2006 04:47:00 UTC Pitch=0 degree command
20 March 2006 05:37:00 UTC Pitch=-30 degree command 20 March 2006 05:52:00 UTC Pitch=0 degree command
20 March 2006 06:07:00 UTC Pitch=+30 degree command 20 March 2006 06:22:00 UTC Pitch=0 degree command
According to commands in table 6.4 obtained response of BILSAT-1 is given in
figure 6.26. In this figure horizontal axis denotes time and vertical axis denotes pitch
axis. Zoom is required to investigate behavior of BILSAT-1. 06:00:00 UTC -
06:25:00 UTC time segment is chosen and result is plotted in figure 6.27.
Figure-6.26: Actual pitch axis maneuver of BILSAT-1
63
Pitch=+30o degree command is given at 06:07:00 UTC and BILSAT-1 reaches
desired value at 06:19:00 UTC. If we express the horizontal axis in orbit domain,
settling time is 0.124 orbits for BILSAT-1. It can be said that this result is very close
to our simulation results.
Figure-6.27: Actual pitch axis maneuver of BILSAT-1 (Zoomed)
64
CHAPTER 7
CONCLUSIONS and FUTURE WORK
In this chapter brief summary and conclusions on the results obtained in previous chapters
are given. Controllers used in this thesis are compared with those of reference [20].
Recommendations and suggestions are given for future work.
In this thesis, nonlinear attitude control techniques for Low Earth Orbit small satellites are
investigated. Sensors which are used for attitude determination and actuators which are used
for attitude control are briefly introduced. Nonlinear mathematical model of a satellite is
derived and BILSAT-1’s parameters are applied in the model used for simulations.
Firstly, literature on attitude dynamics and control of satellite are studied. Nonlinear
control techniques are chosen as the scope of this thesis. On the other hand linear control
techniques are studied in reference [20]. Quaternion Feedback Controller (PD) and Sliding
Mode Regulator are simulated for maneuver of satellite in our work. Reaction wheels are
considered as actuators in attitude maneuver mode. These controllers are also examined in [8],
[19] and [22]. Instead of Euler angle representation, unit quaternions are selected for attitude
representation. Thus singularity problem is prevented. Gravity gradient torque and
aerodynamic torque are taken into consideration in our simulations. Tetrahedral configuration
is used in locating the reaction wheels. So that in case one of the reaction wheels is disabled,
attitude control process continues without any problem. An other reason of using tetrahedral
configuration is that twice the value of the torque that can be obtained from one reaction
wheel can be obtained along any of the three directions. In stabilization analysis of
Quaternion Feedback Controller, total energy of the satellite is chosen as Lyapunov candidate
function. For the Sliding Mode Regulator, Lyapunov candidate function is chosen according
to the suggestions of references [19] and [22]. The simulation results for both the Quaternion
65
Feedback Controller and Sliding Mode Regulator are given in Chapter 6.
In reference [20], linear controller is applied for the attitude maneuvering by the use of
reaction wheels as actuators. When we compare our results with those of reference [20], it can
be said that sliding mode results are similar with linear controller results. In both simulations
when the all reaction wheels are enabled, settling time is 0.07 orbits, rise time is 0.04 orbits
and euler angles reach their desired value nearly at about 0.08 orbits. In case that two reaction
wheels are disabled, linear controller response is better than sliding mode controller.
However, linear controller needs more torque than sliding mode regulator. When we compare
nonlinear Quaternion Feedback Controller (PD) with linear controller, Euler angles reach
their desired value at about 0.1 orbits in nonlinear QFC controller. This means that QFC
spends more time than other controllers to reach desired values. The controller parameters of
QFC can be changed to obtain shorter settling time. But this operation increases power
consumption of the satellite. Also we compared the simulation results taken from Tübitak-
Bilten for BILSAT-1 in pitch direction with our results. BILSAT-1 reaches to the desired
value at about 0.124 orbits and it can be said that this result is very close to our simulation
results.
Table-7.1: Simulation result of controllers
Rise Time Settling Time Max Torque QFC 0.04 orbits 0.09 orbits 4e-4 SMR 0.04 orbits 0.07 orbits 8e-4 LR 0.04 orbits 0.07 orbits 12e-4 BILSAT-1 0.06 orbits 0.12 orbits Not applicable*
* Not applicable as they use a different method in applying torques.
Uniformly distributed noise (10% noise of torque) was applied to actuator torque to
observe behaviour of controllers. QFC and SMR successfully tolerated noise. It was seen that
noise effected torques output from controller and reaction wheels. Nonetheless it didn’t affect
Euler angles and angular velocity too much. Magnitude of noise was increased and deviation
of Euler angles from desired angles was seen. As a conclusion, it can be said that QFC and
SMR are robust controller for the acceptable range of noise (10% noise of torque).
For future work, it is suggested to design nonlinear controller using magnetic torquer for
attitude stabilization of the satellite. Moreover, different allocation methods for reaction
wheel torques can be investigated. Inertia matrix is taken in diagonal form in our thesis. The
effect of using a nondiagonal inertia matrix on the system performance for different
66
controllers used is also worth studying.
67
REFERENCES
[1] http://www.bilten.metu.edu.tr/bilsat
[2] L.M. Gomes, G. Yuksel, A.S. Curiel, A. Bradford, M. Sweeting. BILSAT: Advancing
Small-Sat Capabilities, SS C03-VI-4, 17th AIAA/USU Conference on Small Satellites
[3] J.R. Wertz, and W.J. Larson, (editors). Space mission analysis and design. Kluwer
academic publishers, 1999
[4] K. Svartveit. Attitude determination of the NCUBE satellite. Department of
engineering cybernetics, NTNU, 2003
[5] T. Bak. Spacecraft Attitude Determination- a Magnetometer Approach. Ph.D. thesis.
Aalborg University, Denmark, 2002
[6] Egeland, Olav and Gravdahl, J. Tommy. Modeling and simulation for control.
Department of Engineering Cybernetics, NTNU, 2001
[7] S. Ose. Attitude determination for the Norwegian student satellite nCube,
Department of Engineering Cybernetics, NTNU, 2004
[8] O. Hegrenes. Attitude control by means of explicit model predictive control, via
multi-parametric quadratic programming, Department of Engineering Cybernetics,
NTNU, 2004
[9] J. E. Overby. Attitude control for the Norwegian student satellite nCube, Department
of Engineering Cybernetics, NTNU, 2004
[10] F. M. Indergaard. Design and implementation of a gravity boom for the Norwegian
nano satellite NCUBE.Master Thesis,NTNU 2003
[11] P. C. Hughes. Spacecraft Attitude Dynamics.USA:John Wiley & Sons. Inc. 1986
[12] R. Wisniewski. Satellite Attitude Control Using Only Electromagnetic Actuation.
Ph.D. Thesis, Department Of Control Engineering. Aalborg University.Denmark. 1996
[13] B. E. Busterud. Orienteringsregulering av microsatelliter. Master Thesis, NTNU
2003
[14] H. K. Khalil. Nonlinear Systems. Upper Saddle River, New Jersey, USA. 2000
[15] M. Vidyasagar. Nonlinear Systems Analysis. Prentice-Hall, Inc. 1993
[16] T. I. Fossen. Marine Control Systems. Trondheim, Norway. Marine Cybernetics.
2002
68
[17] S. Skogestad and I.Poslethwaite. Multivariablefeedback control. (1996)
[18] R. Kristiansen. Attitude Control Of a Microsatellite. Master Thesis, Department of
Engineering Cybernetics, NTNU, 2000
[19] G. Ytrehus. Styring av mikrosatellitt med reaksjonshjul i tetraeder. Master thesis,
NTNU 2003
[20] C. Kaplan. LEO Satellite, Attitude determination and control components, some
linear control methods, MSc. thesis, METU 2006
[21] K. L. Makovec. A nonlinear magnetic controller for three axis stability of
nanosatellites. Master thesis, Virginia 2001
[22] J. H. McDuffie and Y. B. Shtessel. A de-coupled Sliding Mode Controller and
observer for satellite attitude control. IEEE 29th symposium on system theory. March 9-
11. 1997 pg-92.
[23] M. H. Kaplan. Modern spacecraft dynamics and control. John Wiley & Sons, New
York (1976)
[24] C. D. Hall, P. Tsiotras, H. Shen. Tracking rigid body motion using thrusters and
momentum wheels. Journal of the Astronautical Sciences, Vol. 50, No. 3, 2002.
[25] http://www.sstl.co.uk
[26] O. Uslu. Orbit dynamics, attitude dynamics and control investigation into possible
application to TURKSAT, MSc. Thesis in Aeronautical Engineering. Middle East Technical
University, Ankara, 1997.
[27] H. O. Derman. 3-Axis attitude control of a geostationary satellite, MSc. Thesis in
Aeronautical Engineering, Middle East Technical University, Ankara, 1999.
69
APPENDIX A – SIMULINK DIAGRAMS
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
APPENDIX B – MATLAB SOURCE CODES
%euler2q.m %********************************************************************* %File euler2q.m %Function that transforms Euler angles to quaternion parameters %Written by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* function q_0 = euler2q(e) e1=0.5*e(1,:); e2=0.5*e(2,:); e3=0.5*e(3,:); u(1)=sin(e1); u(2)=sin(e2); u(3)=sin(e3); u(4)=cos(e1); u(5)=cos(e2); u(6)=cos(e3); q0=(u(1)*u(2)*u(3))+(u(4)*u(5)*u(6)); q1=(-u(2)*u(3)*u(4))+(u(1)*u(5)*u(6)); q2=(u(1)*u(5)*u(3))+(u(2)*u(4)*u(6)); q3=(u(3)*u(4)*u(5))-(u(1)*u(2)*u(6)); q_0=[q0;q1;q2;q3]; end
85
%********************************************************************* %figures. m %A file to plot euler,w_b_bo,tau_regulator and tau_reactionwheel %Writteb by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* global euler time t_o %Plotting the simulated trajectories t=time/t_o; figure(1); plot(t,euler(:,1),'b-', t,euler(:,2),'r--', t,euler(:,3),'g:'); grid; legend('\phi','\theta','\psi'); xlabel('time [orbit] '); ylabel('[degree]'); Title('Satellite Euler Angles'); figure(2); plot(t,w_b_bo(1,:),'b-', t,w_b_bo(2,:),'r--', t,w_b_bo(3,:),'g:'); grid; legend('\omega_x','\omega_y','\omega_z'); xlabel('time [orbit] '); ylabel('[rad/s]'); Title('Satellite Angular Velocity (Body)'); figure(3); plot(t,tau_regulator(1,:),'b-', t,tau_regulator(2,:)... ,'r--', t,tau_regulator(3,:),'g:'); grid; legend('\tau_1','\tau_2','\tau_3'); xlabel('time [orbit] '); ylabel('torque[Nm]'); Title('Output From Regulator'); figure(4); plot(t,tau_reactionwheel(:,1),'b-'... ,t,tau_reactionwheel(:,2),'k--'... ,t,tau_reactionwheel(:,3),'r-.'... ,t,tau_reactionwheel(:,4),'g:'); grid; legend('T_1','T_2','T_3','T_4'); xlabel('time [orbit] '); ylabel('torque[Nm]'); Title('Output From Reaction Wheel');
86
%********************************************************************* %Rquat.m %A file to transform quaternion matrix to rotation matrix %Written modified by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* function R = Rquat(q) n=q(1,:); e1=q(2,:); e2=q(3,:); e3=q(4,:); d11=(n^2+e3^2-e2^2-e1^2); d12=2*(e1*e2+n*e3); d13=2*(e1*e3-n*e2); d21=2*(e1*e2-n*e3); d22=(n^2-e3^2+e2^2-e1^2); d23=2*(e2*e3+n*e1); d31=2*(e1*e3+n*e2); d32=2*(e2*e3-n*e1); d33=(n^2-e3^2-e2^2+e1^2); R=[d11,d12,d13;d21,d22,d23;d31,d32,d33]; end
87
%********************************************************************* %sat_non_dyn.m %A file to calculate the nonlinear satellite dynamic equations %Written by Geir Ytrehus , modified by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* function xdot = sat_non_dyn(input) global I w_o TD I_o K1 % The state space variables q = input(1:4); w_b_bi = input(5:7); % The system input from the controller after actuator allocation u = input(8:11) % Normalizing the quaternions - necessary due to numerical inaccuracy q = q/(q'*q); eta = q(1) ; epsilon = q(2:4); % Transforming from w_b_ib to w_b_ob for use in the dynamical model update r_o_b = Rquat(q); r_b_o = r_o_b'; c2 = r_b_o(: ,2); w_b_bo = w_b_bi+w_o *c2; %w_b_bo = w_b_bi+w_o *c2; % Reaction wheels in a tetrahedral T = TD %T(1,:) = zeros(1,3); % Disabling wheel 1 %T(2,:) = zeros(1,3); % Disabling wheel 2 %T(3,:) = zeros(1,3); % Disabling wheel 3 %T(4,:) = zeros(1,3); % Disabling wheel 4 %u(1) = 0; %Disabling wheel 1 %u(2) = 0; %Disabling wheel 2 %u(3) = 0; %Disabling wheel 3 %u(4) = 0; %Disabling wheel 4 % Maximum torque available is 0.01 [Nm] % u_max = 0.01; u_max = 1; for i = 1:4 if abs(u(i))>u_max u(i)= sign(u(i))*u_max; end; end;
88
tau = T'*K1*u; % Uniformly distributed noise % The expression sign((2*rand(2)-1)) ensures that the noise is either % area -1 or 1 of the actuator torque because rand(1) gives numbers in % the area [0.0 1.0]. Multiplying with a percentage of the produced torque % gives a realistic disturbance effect. %p = 0.4; % 40% noise added to the actuator torque %noise=p*(sign(2*rand(1)-1))*[tau(1); tau(2); tau(3)]; %tau = tau + r_b_o*(noise) ; % Gravity gradient torque g_B = Smtrx(3*w_o^2*r_b_o(:,3))*I*r_b_o(:,3); % Aerodynamic torque t_aero = 3.4245e-7; % The dynamical equations eta_dot = -(1/2)*epsilon'*w_b_bo; epsilon_dot = (1/2)*(eta*eye(3) + Smtrx(epsilon))*w_b_bo; w_b_bi_dot = inv(I)*(tau + g_B + t_aero - Smtrx(w_b_bi)*(I*w_b_bi)); xdot = [eta_dot; epsilon_dot; w_b_bi_dot;u];
89
%********************************************************************* %Simulationsetup.m %A file to setup the MATLAB/Simulink BILSAT-1 reaction wheel simulation %For linear,nonlinear and sliding mode controllers. %Written by Geir Ytrehus , modified by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* clear all; global I w_o TD K I_o K1 W %********************************************************************* %Inertia Matrix %********************************************************************* Ixx = 9.8194; Ixy = 0.0721; Ixz = 0.2893; Iyx = 0.0721; Iyy = 9.7030; Iyz = 0.1011; Izx = 0.2892; Izy = 0.1011; Izz = 9.7309; %BILSAT-1 inertia matrix InertialMatrix=[Ixx 0 0; 0 Iyy 0; 0 0 Izz]; %InertialMatrix=[Ixx Ixy Ixz; Iyx Iyy Iyz; Izx Izy Izz]; I=InertialMatrix; % Some useful definitions kx = (Iyy - Izz)/Ixx; ky = (Ixx - Izz)/Iyy; kz = (Iyy - Ixx)/Izz; % Tetrahedral distribution matrix % All reaction wheels are taken as identical if desired % they can be scaled by the motor gains TD = [0 0 -1; 0 -sqrt(6*3*4)/9 sqrt(4)/6; 1/6*sqrt(6*4) sqrt(6*3*4)/18 sqrt(4)/6; -1/6*sqrt(6*4) sqrt(6*3*4)/18 sqrt(4)/6 ] %force matrix k1 = 1; k2 = 1; k3 = 1; k4 = 1; K1 = [k1 0 0 0 0 k2 0 0 0 0 k3 0 0 0 0 k4]
90
%weight matrix w1 = 1; w2 = 1; w3 = 1; w4 = 1; W = [w1 0 0 0 0 w2 0 0 0 0 w3 0 0 0 0 w4] %********************************************************************* %Initial Values %********************************************************************* m = 120; % [kg] Mass of Satellite M = 5.9742e24; % [kg] Mass of Earth gamma = 6.6720e-11; % [] Gravity constant my_g = gamma*M; % [kg] Earth gravity constant re_e = 6.378137e6; % [m] Equatorial radius of Earth rp_e = 6.356752e6; % [m] Polar radius of Earth eccentricity = sqrt(1- (rp_e/re_e)^2); % Eccentricity of the ellipsoid h_s = 600e3; % [m] Satellite orbit r_total = re_e + h_s; % [m] Distance from satellite to %Earth center t_e = round (8.6164130e4); % [s] Integer length of sidereal day w_e = 2*pi/(t_e); % [rad/s] Earth Angular Velocity w_o = sqrt( my_g/( r_total^3)); % [rad/s] Satellite Angular Velocity t_o = 2*pi/w_o; % [s] Satellite Orbit Period v_o = h_s*w_o; % [m/s] Satellite Velocity %********************************************************************* %Reference Model Parameters %********************************************************************* w_n = 0.022; zeta =1; %********************************************************************* % Initial attitude in Euler angles %********************************************************************* deg_0 = (pi/180)* [0; 0; 0] ; % Initial attitude in Euler parameters (quaternions) q_0 = euler2q(deg_0); %********************************************************************* % Transforming from w_B_BO to w_B_BI %*********************************************************************
91
r_o_b = Rquat(q_0); r_b_o = r_o_b'; c2 = r_b_o(:,2); w_b_bo = [0; 0; 0] ; w_b_bi = w_b_bo - w_o*c2; % The initial state vector x0 = [q_0(1); q_0(2); q_0(3); q_0(4); w_b_bi(1); w_b_bi(2); w_b_bi(3)]; %********************************************************************* % The linearized system matrices %********************************************************************* A = [0 1 0 0 0 0; -4*kx*w_o^2 0 0 0 0 (1 - kx)*w_o; 0 0 0 1 0 0; 0 0 -3*ky*w_o^2 0 0 0; 0 0 0 0 0 1; 0 -(1 - kz)*w_o 0 0 -kz*w_o^2 0 ]; B = [0 0 0 1/(2*Ixx) 0 0; 0 0 0; 0 1/(2*Iyy) 0; 0 0 0; 0 0 1/(2*Izz) ]; C = [1 0 0 0 0 0; 0 0 1 0 0 0; 0 0 0 0 1 0 ];
92
%Smtrx.m %********************************************************************* %File Smtrx.m %Function that takes skew symmetric matrix of input %Written by Ceren KAPLAN and Soner KARATAS %December 2005 %i denotes the input matrix %********************************************************************* function S = Smtrx(i) S =[0 -i(3) i(2) i(3) 0 -i(1) -i(2) i(1) 0];
93
%********************************************************************* %t_aero.m %A file to calculate the aerodynamic torque %Written by Ceren KAPLAN and Soner KARATAS %December 2005 %********************************************************************* function torque = t_aero % torque = [(1/2)*rho*Cd*A*v*v]*rt; % torque = F_aero*rt; % F_aero=[(1/2)*rho*Cd*A*v*v] MU=3.986e14; %MU [m^3/s^2]:gravitational parameter for the central body re_e = 6.378137e6; %re_e [m]:Equatorial radius of Earth h_s = 686e3; %h_s [m]:Satellite orbit r=re_e+h_s; %r [m]:Distance from satellite to Earth center a=r; %a [m]:semimajor axis of the orbit %when the orbit was taken circular v = sqrt((2*MU/r) - (MU/a)); %v [m/s]:the velocity of the spacecraft %(velocity at perigee) rho=2.89*10^-13; %rho [kg/m^3]:Atmospheric density Cd=2; %Cd :the coefficient of drag on the spacecraft A=0.42; %A [m^2]:Projection area F_aero = (1/2)*rho*Cd*A*v*v; %F_aero [N]:aerodynamic drag force rt=0.05; %rt [m]:(c_pa-c_g)the moment arm for the drag force %(center of pressure -center of mass) torque = F_aero*rt; % aerodynamic torque [N*m]
94
APPENDIX C – TETRAHEDRAL CONFIGURATION ANGLE
Figure C.1 shows the general form of the tetrahedral configuration.
Figure C.1 : Tetrahedral Configuration.
Using the model given in equation C.1 tetrahedral configuration angle can be calculated.
By using cosine theorem, the relationship between a and b sides can be derived as,
)120cos(2 02222 bbba −+= (C.1)
Then,
3
)2
11(2 22 a
bba =⇒+= (C.2)
Also,
3
2
3
222222
aha
ahabh =⇒−=⇒=+ (C.3)
Figure C.2 shows the geometric relationship between the angle ϕ and the sides of the
tetrahedral configuration (a, b, h and x).
ϕ
Figure C.2: Geometric Relationship between the Angle ϕ and sides.
G
b
a x
h-x
x h
a
b b
h a a
95
Following equations are derived according to Figure C.2,
222 )( xhbx −+= (C.4)
Then,
h
hbx
2
22 += (C.5)
Equations C.2 and C.3 are applied to C.5, and x can be found as,
8
3
3
22
32
3
22
ax
a
aa
x =⇒+
= (C.6)
Again using cosine law,
2222 cos2 axxx =−+ ϕ (C.7)
Equation C.6 to Equation C.7 are applied, and the angle ϕ is found as,
o47.109)3
1(cos
3
1cos 1 =⇒−=⇒−= − ϕϕϕ (C.8)