Attitude Control and Parameter Optimization A Stud

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

MEASUREMENT SCIENCE REVIEW, 23, (2023), No.

4, 146-153

Journal homepage: https://content.sciendo.com

Attitude Control and Parameter Optimization:


A Study on Hubble Space Telescope
Emre Sayin, Rahman Bitirgen, Ismail Bayezit*
Faculty of Aeronautics and Astronautics, Istanbul Technical University, Maslak, 34469, Istanbul, Turkiye,
[email protected]

Abstract: In this work, we build a satellite attitude Proportional-Integral-Derivative (PID) controlled system by using the Hubble Space
Telescope (HST) parameters as a reference and tune its controller parameters using various tuning methods. First, we give the equations for
the motion of a satellite. We elaborate the control structure as controller, actuator, dynamics, and kinematics subsystems and construct an
external disturbance model. We use a reaction wheel assembly used in the HST with the same configuration as the actuator. We evaluate the
performance of the linearization by comparing it with the nonlinear model output. By working on the linearized model, we tune the PID
controller parameters using two different methods: "Model-Based Root Locus Tuning” and "Genetic Algorithm Based Tuning". First, we
obtain the controller parameters by manipulating the poles on the root locus plot of the linearized system. In addition, we use genetic
algorithms to find the optimized controller values of the system. Finally, we compare the performances of the two methods based on their
cost function values and find that the Genetic Algorithm-based tuned parameters are more fruitful in terms of the cost function value than
the parameters obtained by the Root Locus-based tuning. However, it is found that the Root Locus-based tuning performs better in
disturbance rejection.

Keywords: Spacecraft attitude control, controller parameter optimization, reaction wheel actuation, quaternion error feedback, Hubble Space
Telescope.

1. INTRODUCTION a torque of 0.8 Nm at a maximum speed of 3000 rpm and a


The advancement of technology has undergone a rotor moment of inertia of 0.84 kgm2 per wheel [3]. The
significant transformation since the first satellite was moment of inertia of the HST can be found in [4].
launched into space. Presently, the Earth is surrounded by a As with any satellite that has an attitude control system, a
multitude of over 2000 satellites [1]. Among them, the control structure must be built to align the spacecraft to a
Hubble Space Telescope (HST) stands as a notable orbiting desired angle. To build the model-based control structure, a
spacecraft, devised by NASA to serve as the pioneering space mathematical model of the spacecraft must be created and
telescope for observing the cosmos from Earth's orbital simulated in the computational environment.
vantage point [2]. Proportional-Integral-Derivative (PID) control is still the
The HST has a crucial component known as the pointing most popular control strategy, used in 90-95% of industrial
system, which facilitates the alignment of the satellite with a applications [5]. One of the critical issues in the development
fixed position in space. Since the primary objective of the of PID controllers is the selection of the proper controller
HST is to observe celestial objects located at great distances, parameters (Kp, Ki and Kd). Numerous studies have been
achieving exceptional pointing accuracy is essential. conducted on controller parameter tuning, such as classical
Consequently, the HST was engineered to have a pointing Ziegler-Nichols Tuning [6], Cohen-Coon Method [7], Relay
accuracy exceeding 0.01 arc seconds. This remarkable Based Tuning [8], Self-Tuning [9], Reinforcement Learning
precision is achieved through the use of four Reaction Wheel Neural Network Based Tuning. [10], Particle Swarm
Assemblies (RWA) as attitude control mechanisms, Optimization (PSO) Based Tuning [11], and Genetic
alongside four Magnetorquer Bars (MTBs), which are Algorithm Based Tuning [12]-[14].
responsible for both momentum management and In this paper, we use both model-based root locus tuning
deceleration of the reaction wheels. For this work, the MTBs and genetic algorithm to find the proper controller gains.
are ignored because they contribute little to the momentum Several studies have been conducted in the literature that
change of the HST. The reaction wheels of the HST produce covers satellite attitude control with PID tuning methods

DOI: 10.2478/msr-2023-0019 *Corresponding author: [email protected] (I. Bayezit)

146
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

using various methods similar to ours. Wang et al. designs a spacecraft, 𝜔 is the angular velocity vector of the spacecraft,
flexible spacecraft attitude control simulation using a PID and 𝑁𝑒 is the external torque acting on the spacecraft.
control algorithm. They optimize the control parameters Equation (1) can be divided into two parts: the spacecraft
using PSO and compare them with the trial-and-error method, and the reaction wheel. For the spacecraft, the angular
which can be described as a time-consuming method for momentum can be defined as 𝐼𝑠 𝜔. Then (1) becomes:
complex systems [11]. Khoshrooz et al. design a reaction
𝑑
wheel actuated satellite attitude control system. They design (𝐼𝑠 ω) + ℎ̇𝑤 = 𝑁𝑒 − ω × 𝐼𝑠 ω − ω × ℎ𝑤 (2)
𝑑𝑡
a PD controller and optimize the PD parameters using
Genetic Algorithm and PSO methods. They compare two where ℎ𝑤 is the angular momentum generated by the reaction
optimized variants with an LQR controller and verify them wheels and 𝐼𝑠 is the moment of inertia matrix of the
with a Hardware-in-the-Loop testbed [13]. Daw et al. design spacecraft. It is also known that the control torque vector 𝑁𝑐
a geostationary satellite attitude control system using PID is related to the rate of change of the angular momentum
controllers. They tune the parameters of the controller using vector of the satellite as:
experimental Ziegler-Nichols, a fairly generic tuning
technique, and a genetic algorithm. At the end of their study ℎ̇𝑤 = −𝑁𝑐 (3)
they compare the performance of the two techniques [14]. Jia
and Yang design a nonlinear adaptive PD controller for than (2) becomes [16]:
attitude control of a rigid spacecraft to compensate for
spacecraft uncertainties such as inertia variation. An adaptive ω̇ = 𝐼𝑠−1 (−𝑆(ω)𝑰𝒔 𝝎 − 𝑆(ω)ℎ𝑤 + 𝑁𝑐 + 𝑁𝑒 ) (4)
part is added to the nonlinear PD controller and the
parameters are determined using a genetic algorithm. where 𝑆 is the skew-symmetric matrix given as:
However, no comparison has been made with other tuning
methods [12]. 0 −𝜔3 𝜔2
In this work, we present a structure for satellite attitude [ 𝜔3 0 −𝜔1 ] (5)
control using PID controllers. We elaborate the design using −𝜔2 𝜔1 0
the physical parameters of the HST. Then we tune the
controller parameters using the model-based root locus Kinematics
method and the genetic algorithm. We simulate and compare To create kinematic equations, a quaternion representation
the results in a commercial software environment. can be used. A quaternion is a representation with three vector
The outline of the paper is as follows: in Section A, the and one scalar element as [17]:
satellite equations of motion are constructed as dynamics,
kinematics, and actuator subsystems. Also, the linearized 𝑞 = 𝑖𝑞1 + 𝑗𝑞2 + 𝑘𝑞3 + 𝑞4 (6)
equations of motion are shared. The attitude control structure
is constructed in Section B, and a comparison between Equation (6) can be rewritten in terms of its vector and
nonlinear and linear models is performed to show that the scalar elements as:
linearized model is reliable to use instead of the nonlinear
model in terms of linear model-based tuning and faster 𝑞 ≡ (𝑔, 𝑞4 ) (7)
computation process. In Section C, the controller parameters
are tuned to meet the time domain requirements using Root It is also possible to indicate the kinematic equations by
Locus and Genetic Algorithm-based methods. Section 3 using the Euler angles, which can be defined as rotations
compares the performance of tuning with respect to cost around the body axis of the spacecraft:
function values. In Section 4, conclusions and the advantages 𝜙: Roll angle (rotation around the x-axis)
and disadvantages of both methods are discussed and future 𝜃: Pitch angle (rotation around the y-axis)
research aspects are explored. 𝜓: Yaw angle (rotation around the z-axis)

2. METHODS

A. Satellite equations of motion


In this section, the equations of motion of the HST are
given with dynamics, kinematics, and actuator subsystem
equations.

Dynamics
Spacecraft dynamics with reaction wheels as actuators can
be calculated using the dynamics equations based on
Newton’s second law as given below [15]:

ℎ̇𝑡𝑜𝑡 = 𝑁𝑒 − ω × ℎ𝑡𝑜𝑡 (1)

where ℎ𝑡𝑜𝑡 is the total angular momentum acting on the Fig. 1. An illustration of the HST with defined axes.

147
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

The defined x, y, and z axes for the HST are shown in To convert the RWA to the SBC system, a transformation
Fig. 1. In addition, Euler angles can be converted to matrix 𝐴 must be created. Multiplying the transformation
quaternions using the following transformation: matrix by the torque vector of the RWA (𝑻𝑹𝑾𝑨 ) results in the
total torque vector in the SBC system (𝑻𝑺𝑩𝑪 ):
𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
𝑠( )𝑐( )𝑐( ) − 𝑐( )𝑠( )𝑠( )
𝑞1
2 2 2 2 2 2 TSBC = [A]TRWA (12)
𝜙 𝜃 𝜓 𝜙𝜓 𝜃
𝑞2 𝑐( )𝑠( )𝑐( ) + 𝑠( )𝑐( )𝑠( )
2 2 2 2 2 2
[𝑞 ] = 𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
(8) The transformation matrix 𝐴 can be written as:
3
𝑐( )𝑐( )𝑠( ) − 𝑠( )𝑠( )𝑐( )
𝑞4 2 2 2 2 2 2
−𝑠(20)𝑐(45) 𝑠(20)𝑐(45) 𝑠(20)𝑐(45) −𝑠(20)𝑐(45)
𝜙 𝜃 𝜓 𝜙 𝜃 𝜓
[𝑐 ( ) 𝑐 ( ) 𝑐 ( ) + 𝑠 ( ) 𝑠 ( ) 𝑠 ( )]
2 2 2 2 2 2
Ω(𝜔) ≡ [−𝑐(20)𝑐(45) −𝑐(20)𝑐(45) 𝑐(20)𝑐(45) 𝑐(20)𝑐(45) ]
𝑠(45) 𝑠(45) 𝑠(45) 𝑠(45)
where 𝑐 stands for cosine and 𝑠 stands for sine. Moreover, (13)
quaternions can be converted to Euler angles using (9):
For the RWA configuration of the HST, the total torque
2𝑞 𝑞 +2𝑞 𝑞 vector in the SBC system can be obtained by substituting the
tan−1 4 1 2 22 3
𝜙 1−2(𝑞1 +𝑞2 ) obtained transformation matrix into (12).
[𝜃] = sin−1 (2𝑞4 𝑞2 − 2𝑞3 𝑞1 ) (9) Moreover, the torque vector in the SBC system can also be
𝜓 −1 2𝑞4 𝑞3 +2𝑞1 𝑞2
tan converted to a RWA torque vector. To do this, the pseudo-
[ 1−2(𝑞22 +𝑞32 ) ] inverse of the transformation matrix, 𝐴† , must be substituted
into the equation[19]:
In this paper, the kinematic equations are represented using
quaternions because singularities occur in high-angle 𝑇𝑅𝑊𝐴 = [𝑨† ]𝑇𝑆𝐵𝐶 (14)
maneuvers, called gimbal lock, when Euler angles are used to
represent the kinematics. The use of quaternions is also For simplicity, a reaction wheel can be assumed to be a
advantageous in terms of fast computational power. Permanent Magnet DC (PMDC) motor. Since not all
Furthermore, the kinematic equations can be represented as parameters of the HST RWA are publicly available, a
[16]: commercial PMDC motor was chosen (PBLH60AS115-430)
that meets the requirements of the HST RWA, which are
1 0.8 Nm torque capability and 3000 rpm speed [3].
𝑞̇ = Ω(ω)𝑞 (10)
2 It is possible to explain the response of a PMDC motor by
where: using a set of linear equations [20]:
𝑑𝑖𝑎 (𝑡) 1
0 𝜔3 −𝜔2 𝜔1 = [𝑒𝑎 (𝑡) − 𝑅𝑎 𝑖𝑎 (𝑡) − 𝐾𝑏 ω𝑚 (𝑡)] (15)
𝑑𝑡 𝐿𝑎
−𝜔3 0 𝜔1 𝜔2
Ω(𝜔) = [ ] (11)
𝜔2 −𝜔1 0 𝜔3 𝑑ω𝑚 (𝑡)
=
1
[𝐾𝑖 𝑖𝑎 (𝑡) − 𝑇𝐿 (𝑡) − 𝐵𝑚 ω𝑚 (𝑡)] (16)
−𝜔1 −𝜔2 −𝜔3 0 𝑑𝑡 𝐽𝑚

By using kinematic equations, it is possible to obtain the where 𝑖𝑎 is the armature current, 𝑒𝑎 is the input voltage, 𝜔𝑚
quaternion elements of a spacecraft from its angular velocity is the motor angular velocity, 𝑇𝐿 is the load torque, 𝑅𝑎 is the
elements. The angular velocity vector can be obtained by armature resistance, 𝐿𝑎 is the armature inductance, 𝐾𝑖 is the
integrating the rate of change of the angular velocity vector torque constant, 𝐾𝑏 is the back-emf constant, 𝐽𝑚 is rotor
into the dynamic equations. inertia, and 𝐵𝑚 is the viscous-friction coefficient.
By combining dynamic and kinematic equations, the From (15) and (16), the resulting angular velocity of a
PMDC motor can be derived as an output by using the voltage
orientation of a satellite can be determined from the forces
as an input. The angular velocity of the RWA in the body
acting on it, i.e., the external torque and the torque generated
frame can be converted to the torque generated by the RWA
by the reaction wheels. In this work, it is assumed that there using the ideal reaction wheel equation [16]:
are no external torques acting on the HST. Also, an actuator
model must be built to calculate the torque generated by the ḣ =
d
Jωw = Tw (17)
RWA. dt

where ℎ is the angular momentum vector, 𝐽 is the moment of


Actuator
inertia vector, 𝜔𝑤 is the angular velocity vector of the RWA,
The HST uses four reaction wheels and magnetorquers to and 𝑇𝑤 is the torque vector generated by the RWA.
stabilize the attitude of the spacecraft. The RWA consists of
two pairs. The pairs are spaced 90 degrees apart. Also, the External disturbance
elements of each pair are tilted ±20 degrees from the defined It is known that there are two dominant external
yz plane [18]. disturbances acting on the HST: the gravity gradient and the
Since the Satellite Body Coordinate (SBC) axis and the aerodynamic torques.
reaction wheel axes in the HST are not identical, the torques The gravity gradient torque is the main external force
generated by the RWA must be converted to the SBC system. acting on the HST [21]. Since the HST is not symmetrical,

148
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

the gravitational force acting on different points of the HST begins to rotate continuously around the roll axis. This
spacecraft changes and generates a disturbance torque. This is expected because the reaction wheel generates a control
torque can be approximated as a linear equation [22]: torque at the beginning of the movement, then there is no
3𝜇
torque produced to stop the spacecraft.
𝐺𝑥 = (𝐼𝑧𝑧 − 𝐼𝑦𝑦 )𝜙
𝑅3

3𝜇
𝐺𝑦 = (𝐼𝑧𝑧 − 𝐼𝑥𝑥 )𝜃 (18)
𝑅3

𝐺𝑧 = 0

where 𝜇 is the gravitational parameter of the Earth and 𝑅 is


the orbital radius for circular orbits. The HST has a nearly
circular orbit with an eccentricity of 0.0003 [23].
The other disturbance torque is the aerodynamic torque.
Since the HST is orbiting in the Low Earth Orbit (LEO), it is
subjected to a drag force due to the air present at these
altitudes. The drag force 𝐹𝑑 acting on the spacecraft can be
calculated using a well-known equation [22]:

Fd = 0.5𝜌𝑣 2 𝑐𝐷 𝐴 (19)
Fig. 3. Model output for 3 volts input of the reaction wheel.
where 𝜌 is the air density, 𝑣 is the linear velocity vector of the
spacecraft, 𝑐𝐷 is the drag coefficient, and 𝐴 is the reference Linearization of equations of motion
area facing the air. The total disturbance torque can be
constructed using the gravity gradient and the aerodynamic For a linear controller, it is important to have a linear
torques acting on the HST, which are the dominant system in order to adjust the controller parameters to the
disturbances. For the HST, the total disturbance torque varies behavior of the system. Since the attitude control model of
between 0-0.25 Nm, as given in [24]. To represent the total the HST is nonlinear, the equations of motion must be
torque, which varies between 0-0.25 Nm, a band-limited linearized.
white noise with a noise power of 5e-6 and sampling time of Assuming that the external torque is zero, the linear state
0.001 seconds was used. Fig. 2 shows the generated white space equation of a spacecraft can be expressed as [16]:
noise. The values greater than 0.25 Nm represent the
remaining external torques. 𝑥̇ (𝑡) = 𝐴(𝑡)𝑥(𝑡) + 𝐵𝑢 (𝑡)𝑁𝑐 (𝑡) (20)
where as,
𝐼𝑠−1 𝐴𝜔,𝜔 0 𝐼𝑠−1 𝐴𝜔,ℎ
1
A(t) = [ 𝐼 0 0 ] (21)
2 3×3
0 0 0

Elements of matrix 𝐴(𝑡) are:

Aω,ω = [𝐴𝜔,1 𝐴𝜔,2 𝐴𝜔,3 ] (22)

0
Aω,1 = [−𝜔3 𝐼𝑧𝑧 + 𝜔3 𝐼𝑥𝑥 + ℎ3 ] (23)
𝜔2 𝐼𝑦𝑦 − 𝜔2 𝐼𝑥𝑥 − ℎ2

𝜔3 𝐼𝑧𝑧 − 𝜔3 𝐼𝑦𝑦 − ℎ3
Fig. 2. Generated noise as external torque. Aω,2 = [ 0 ] (24)
−𝜔1 𝐼𝑥𝑥 − 𝜔1 𝐼𝑦𝑦 + ℎ1
Model validation
The model was created in a commercial software −𝜔2 𝐼𝑦𝑦 + 𝜔2 𝐼𝑧𝑧 + ℎ2
environment. To validate the model, 3 volts are applied to the Aω,3 = [ 𝜔1 𝐼𝑥𝑥 − 𝜔1 𝐼𝑧𝑧 − ℎ1 ] (25)
roll DC motor in the SBC system, which represents the 0
reaction wheel of the spacecraft, neglecting the external
0 𝜔3 −𝜔2
disturbance. Since the voltage is given in the SBC, the
Aω,h = [−𝜔3 0 𝜔1 ] (26)
spacecraft is expected to perform only roll motion. The output
𝜔2 −𝜔1 0
of the Euler angles is shown in Fig. 3. As shown in Fig. 3, the

149
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

𝐼𝑠−1 Comparison of nonlinear and linear models


𝐵𝑢 = [ 0 ] (27) To test the precision of the linearization, the same random
−𝐼3×3 PID parameters were used for both the nonlinear and
linearized models. First, the PID parameters and filter
The moment of inertia vector of the satellite is taken as coefficient were set to 52.995, 2.488, 132.442, and 4.748,
Is = diag (Ixx, Iyy, Izz) = diag (31.046, 77.217, 78.754) [4] and respectively. Then, for the roll, pitch, and yaw angles, the
the state space vector is: responses of the nonlinear and linearized models were
𝑇 examined for different angle commands. To find the
𝑥 = (𝜔
̃1 , 𝜔 ̃3 , 𝑔̃1 , 𝑔̃2 , 𝑔̃3 , ℎ̃1 , ℎ̃2 , ℎ̃3 )
̃2 , 𝜔 (28)
difference between the nonlinear and linearized models, the
with the elements of the angular velocity vector of the root mean square error (RMSE) method was used. RMSE
spacecraft as 𝜔̃1 , 𝜔
̃2 , and 𝜔
̃3 ; the first three (vector) elements values for different inputs for the roll, pitch, and yaw angle
of the quaternion vector as 𝑔̃1, 𝑔̃2 , and 𝑔̃3 ; the elements of the commands are given in Table 1.
angular momentum vector as ℎ̃1 , ℎ̃2 , and ℎ̃3. In addition, responses of the nonlinear and linear models
Consequently, with knowledge of the satellite’s angular were compared for corresponding angle inputs. An angle
velocity, angular momentum, and moment of inertia vector, command with 3 degrees of roll and 15 degrees of yaw was
it is possible to obtain a linear approximation of the attitude input to the system for arbitrary PID coefficients (same for
of the spacecraft using the linearized equations. nonlinear and linear systems). The angle responses of the
system are shown in Fig. 5 and Fig. 6, with closer views
B. Attitude control structure inside. As shown in Fig. 5 and Fig. 6, it is evident that for 3
degrees of roll input, the response of the nonlinear system is
A general attitude control diagram consists of a controller,
nearly identical to that of the linearized system. However, at
an actuator, and the satellite system, which consists of the
15 degrees of yaw input, it can be seen that the difference
equations for the dynamics and kinematics of the spacecraft.
The block diagram for the simulation of the attitude control between the nonlinear and linearized models becomes larger,
system of the HST is shown in Fig. 4. The HST is exposed to which is to be expected since linear models are mostly valid
gravity gradient, and aerodynamic and solar-array for small angle maneuvers. Consequently, it can be said that
disturbances in orbit [24], [25]. For simplicity, it was the linearized model is fairly reliable and can be used instead
assumed that there are no external and internal disturbances of the nonlinear model in determining the optimal controller
in the system and no errors in the attitude determination parameters for small-angle maneuvers.
sensors.
Table 1. RMSE values for different angle commands (in degrees).
In the case of the HST, PID controllers were used as
controllers, a RWA consisting of four reaction wheels of the 𝐴𝑛𝑔𝑙𝑒𝑐𝑚𝑑 𝑅𝑀𝑆𝐸𝑟𝑜𝑙𝑙 𝑅𝑀𝑆𝐸𝑝𝑖𝑡𝑐ℎ 𝑅𝑀𝑆𝐸𝑦𝑎𝑤
HST as actuators, and equations for the dynamics and 03 6.365e-4 7.893e-4 7.878e-4
kinematics of the satellite as the plant. The main purpose is to 08 0.014 0.016 0.0153
dampen the error between the desired angle and the output 15 0.089 0.113 0.102
angle with a stable response. This purpose is achieved by 25 0.396 0.656 0.499
changing the voltage input of the actuators using PID 35 1.0219 2.696 1.434
controllers.
In the work, a quaternion error vector between the output C. Controller tuning
quaternion and the desired quaternion was calculated as an
Developing the controller for a system involves two tasks:
error vector to be used as input to the controller. Then, the
determining the structure of the controller and tuning the
voltage command generated by the controller is used for the
controller parameter/s. The behavior of the system can be
PMDC motors of the actuator. The angular momentum and
changed by manipulating its controller parameters. The
torque vector generated by the RWA is used by the satellite
dynamics in order to calculate the corresponding satellite controller structure can guarantee stability and convergence,
angular velocity. Finally, the satellite angular velocity is used but without proper tuning of the controller parameters, the
by the kinematics subsystem to calculate the resulting system may not be in the best shape to meet the required or
quaternion, which is sent for error calculation. To visualize desired time-domain characteristics. For a PID-controlled
the angle response, the quaternion vector is converted to Euler system, there are several methods to obtain optimal PID
angles using (9). values. In this paper, we present a tuning method based on
A linear control structure was also built using the linearized genetic algorithm optimization and compare it with a well-
equations of motion. The linearized model also uses 3 PID known, well-established tuning method: Root Locus-based
controllers to control movement in the yaw, roll, and pitch tuning.
axes. They generate voltage commands for the actuators and We tune the parameters to control the roll axis of the
finally the torque vector generated by the actuators is spacecraft. The time domain requirements for the system are
converted to vector elements of the quaternion. Since the determined as the desired time constant is 1.5 seconds and the
scalar element of the quaternion vector can be assumed to be desired percentage overshoot for one degree of angle input is
‘1’ for small-angle maneuvers, it is assumed to be 1 for the 2%. This robust behavior is preferred because the spacecraft
linearized model. components are very sensitive to sudden motion.

150
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

Fig. 4. Satellite attitude control system block diagram.

manipulation area for the given time domain requirements.


The settling time restriction is chosen to be lower than 6
seconds and the percent overshoot is lower than 2%. By
manipulating the poles on the root locus to the desired points,
a satisfactory output was obtained for the given requirements.
The optimal PID parameters for the roll angle determined by
the root locus method are 113.554, 0.006, 260.942, and
14.626 for P, I, D, and N coefficients, respectively.

Genetic algorithm based tuning


Genetic Algorithm (GA) is an optimization-based method
that can be used for tuning controller parameters. The tuning
process of the GA is as follows:
The objective function is chosen as:

𝐽 = |τ − τ𝑑 | + 𝑤𝑂𝑆 (𝑂𝑆) (19)


Fig. 5. Responses of the models to 3 degrees of roll input.
where 𝜏 is the time constant and 𝑤𝑜𝑠 is the weight of
overshoot in the cost function. The function is optimized for
the PID controller coefficients 𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑 , and 𝑁. The PID
structure is as follows:
1 𝑁𝑠
𝐾𝑝 + 𝐾𝑖 ( ) + 𝐾𝑑 ( ) (19)
𝑠 𝑠+𝑁

The optimization procedure is shown in Fig. 7. It can be


described as follows:
1. The first generation is created, i.e., values for 𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑 ,
and 𝑁 (search variables) are selected. Initialization of
the population.
2. The cost function value for each search variable is
calculated.
3. The next generation is created based on crossover
mutation functions.
4. Step 2 and Step 3 are repeated until the minimum value
Fig. 6. Responses of the models to 15 degrees of yaw input. for the cost function is reached.
The optimization procedure is run several times with
Root locus-based tuning different 𝑤𝑜𝑠 ranging from 100 to 1. Since the overshoot
To execute this method, the root locus of the linearized condition is less than 2% and the time constant part of the cost
system was plotted by using the "Control System Designer" function takes values close to 1, it is decided that the best
tool in the MATLAB/Simulink environment. This Simulink suited value for 𝑤𝑜𝑠 is 1.
method updates the response of the system at each time for The genetic algorithm is a global optimization method with
the corresponding root locus change and is able to restrict the benefits of being derivative free, suitable for complex, non-

151
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

convex problems. However, this does not necessarily mean 4. CONCLUSIONS AND DISCUSSION
that whenever an optimization problem is constructed with All subsystems are built as controller, actuator, and plant
GA, the algorithm will yield the global optimum values. By using equations of motion. Linearization has been performed
its nature, GA has the ability not to converge to the local and it has been shown that the linearized model can be used
optimum, but this is possible with crossover and especially to determine the controller parameters both mathematically
mutation parameters. In several runs of this specific PID and visually. The PID parameters are obtained by two
tuning problem, some of the results did not yield a better cost methods and their performance is compared in terms of cost
function value than the Root Locus-based tuning method. To function values. It is shown that the GA parameters perform
overcome this situation, the population number is increased better in terms of the corresponding cost function values.
so that the coverage of each generation is increased. The However, it is found that in the presence of disturbance, the
mutation rate is adjusted using the trial-and-error method. root locus-tuned parameters perform better in terms of
When the mutation rate is increased, the population deviates disturbance rejection as depicted in Fig. 8.
from the previously known minima, which preferably leads
to finding new minima. The final tuned values of the
controller using GA are 48.894, 0.071, 106.046, and 1.427 for
P, I, D, and N coefficients, respectively.

3. RESULTS
The controllers obtained by two different methods can be
compared in terms of their performance. For this purpose, we
use the cost function values of two different tuning methods.
By inserting PID values obtained by two methods, it is
possible to get a cost function value that is used as a
performance criterion to be minimized.
For the Root Locus-based tuning method, we obtained a
cost function value of 0.7215, while the cost function value
for the GA-based tuning is 0.5129. Since the cost function
value obtained from the GA is lower than Root Locus-Based
Tuning, it can be said that the PID values calculated by the Fig. 8. Comparing tuning methods including external disturbance.
GA are suitable for the control system. To obtain more
realistic results, it is also crucial to compare the results in the The genetic algorithm is able to optimize complex cost
presence of a disturbance. To achieve this, the disturbance functions, considering the saturations of actuating signals,
explained in Section 2.A. was included in the system roll nonlinear, non-convex phenomena acting in the problem
angle. The output of the roll angle for a custom signal input itself. If desired, there is no need to linearize or simplify the
is shown in Fig. 7. system, unlike linear or modern control theory applications.
This comes with the cost of being computationally expensive
and time-consuming. When optimized tuning is advantageous
and even required for a task such as spacecraft control, where
pointing accuracy is quite significant, the time and
computation burden can be neglected.

ACKNOWLEDGMENT
This project was financially supported by the Istanbul
Technical University (ITU) Scientific Research Projects
Coordination Unit Research Start Fund with Project ID:
ITUBAP 40957 and Project Code: MAB-2017-40957.

REFERENCES
[1] Lohani, S., Joshi, R. (2020). Satellite network security.
In 2020 International Conference on Emerging Trends
in Communication, Control and Computing (ICONC3).
IEEE, 1-5.
https://doi.org/10.1109/ICONC345789.2020.9117553
[2] Shiga, D. (2010). Happy birthday Hubble: The
telescope that almost wasn’t. New Scientist, 206 (2756),
26-27. https://doi.org/10.1016/S0262-4079(10)60938-4
[3] Dougherty, H., Rodoni, C., Tompetrini, K., Nakashima,
A. (1983). Space telescope pointing control. IFAC
Proceedings Volumes, 16 (11), 15-24.
Fig. 7. Genetic algorithm based PID tuning chart. https://doi.org/10.1016/S1474-6670(17)62184-0

152
MEASUREMENT SCIENCE REVIEW, 23, (2023), No. 4, 146-153

[4] Nurre, G. S., Sharkey, J. P., Nelson, J. D., Bradley, A. [15] Sidi, M. J. (1997). Spacecraft Dynamics and Control: A
J. (1995). Preservicing mission, on-orbit modifications Practical Engineering Approach, Cambridge
to Hubble Space Telescope pointing control system. Aerospace Series No. 7. Cambridge University Press,
Journal of Guidance Control Dynamics, 18 (2), 222– ISBN 978-0521550727.
229. https://doi.org/10.2514/3.21373 [16] Blanke, M., Larsen, M. B. (2010). Satellite Dynamics
[5] Borase, R. P., Maghade, D., Sondkar, S., Pawar, S. and Control in a Quaternion Formulation (2nd edition).
(2021). A review of PID control, tuning methods and Technical Report, Technical University of Denmark,
applications. International Journal of Dynamics and Department of Electrical Engineering.
Control, 9 (2), 818-827. https://backend.orbit.dtu.dk/ws/portalfiles/portal/9859
https://doi.org/10.1007/s40435-020-00665-4 4729/Satdyn_mb_2010f.pdf
[6] Mohammed, L., Ahmed, M. M. (2014). Spacecraft [17] Yang, Y. (2012). Spacecraft attitude determination and
pitch pid controller tunning using Ziegler Nichols control: Quaternion based method. Annual Reviews in
method. IOSR Journal of Electrical and Electronics Control, 36 (2), 198-219.
Engineering, 9 (6), 62-67. https://doi.org/10.1016/j.arcontrol.2012.09.003
https://www.iosrjournals.org/iosr-jeee/Papers/Vol9- [18] Hasha, M. D. (1987). Passive isolation/damping system
issue6/Version-1/I09616267.pdf for the Hubble Space Telescope reaction wheels. In
[7] Joseph, E. A., Olaiya, O. O. (2017). Cohen-Coon PID NASA-Lyndon B. Johnson Space Center, The 21st
tuning method: A better option to Ziegler-Nichols PID Aerospace Mechanisms Symposium, 211-226.
tuning method. International Journal of Recent https://ntrs.nasa.gov/citations/19870020440
Engineering Research and Development (IJRERD), 2 [19] Wertz, J. R. (ed.) (1978). Spacecraft Attitude
(11), 141-145. http://www.ijrerd.com/papers/v2- Determination and Control (Astrophysics and Space
i11/29-IJRERD-B576.pdf
Science Library, 73). ISBN 978-9027712042.
[8] Wilson, D. I. (2005). Relay-based PID tuning.
[20] Shahgholian, G., Shafaghi, P. (2010). State space
Automation and Control, 10-12.
modeling and eigenvalue analysis of the permanent
[9] Gawthrop, P. (1986). Self-tuning PID controllers:
magnet DC motor drive system. In 2010 2nd
Algorithms and implementation. IEEE Transactions on
International Conference on Electronic Computer
Automatic Control, 31 (3), 201-209.
https://doi.org/10.1109/TAC.1986.1104241 Technology. IEEE, 63-67.
[10] Park, D., Yu, H., Xuan-Mung, N., Lee, J., Hong, S. K. https://doi.org/10.1109/ICECTECH.2010.5479987
(2019). Multicopter pid attitude controller gain [21] Thienel, J. K., Sanner, R. M. (2007). Hubble Space
autotuning through reinforcement learning neural Telescope angular velocity estimation during the
networks. In Proceedings of the 2019 2nd International robotic servicing mission. Journal of Guidance,
Conference on Control and Robot Technology. New Control, and Dynamics, 30 (1), 29-34.
York, US: Association for Computing Machinery, 80- https://doi.org/10.2514/1.20591
84. https://doi.org/10.1145/3387304.3387327 [22] De Guia, N. (2012). Investigating various propulsion
[11] Wang, Y., Xiong, J., Lu, Z., Zhang, Y. (2019). The systems for an external attachment for a controlled
optimization of spacecraft attitude control parameters manual de-orbit of the Hubble Space Telescope.
based on improved particle swarm algorithm. In 2019 https://digitalcommons.calpoly.edu/aerosp/63/
IEEE 3rd Advanced Information Management, [23] Lee, D., Springmann, J., Spangelo, S., Cutler, J. (2011).
Communicates, Electronic and Automation Control Satellite dynamics simulator development using lie
Conference (IMCEC). IEEE, 1691-1694. group variational integrator. In AIAA Modeling and
https://doi.org/10.1109/IMCEC46724.2019.8983855 Simulation Technologies Conference. AIAA 2011-
[12] Jia, Y., Yang, X. (2016). Optimization of control 6430. https://doi.org/10.2514/6.2011-6430
parameters based on genetic algorithms for spacecraft [24] Hur-Diaz, S., Wirzburger, J., Smith, D. (2008). Three
attitude tracking with input constraints. axis control of the Hubble Space Telescope using two
Neurocomputing, 177, 334-341. reaction wheels and magnetic torquer bars for science
https://doi.org/10.1016/j.neucom.2015.11.022 observations. In F. Landis Markley Astronautics
[13] Khoshrooz, A. R., Vahid, D. M., Mirshams, M., Symposium.
Homaeinezhad, M. R., Ahadi, A. H. (2012). Novel https://ntrs.nasa.gov/citations/20080023343
method on using evolutionary algorithms for pd optimal [25] Foster, C. L., Tinker, M. L., Nurre, G. S., Till, W. A.
tuning. Applied Mechanics and Materials, 110-116, (1995). Solar-array-induced disturbance of the Hubble
4977-4984. Space Telescope pointing system. Journal of Spacecraft
https://doi.org/10.4028/www.scientific.net/AMM.110- and Rockets, 32 (4), 634-644.
116.4977 https://doi.org/10.2514/3.26664
[14] Daw, M. S., Zayed, A. S., Allafi, N. I., Husain, R. A.
(2017). Genetic algorithm based PID controller for
attitude control of geostationary satellite. In Received August 11, 2022
International Conference & Exhibition for Geospatial Accepted March 28, 2023
Technologies – Libya GeoTec 2, 318-330.
https://www.lrsgis.org.ly/libyageotec2/ar/paper/34-21-
B5-Eng-rev.pdf

153

You might also like