chapter 5 fuzzy logic for attitude...
TRANSCRIPT
104
CHAPTER 5
FUZZY LOGIC FOR ATTITUDE CONTROL
5.1 INTRODUCTION
Fuzzy control is one of the most active areas of research in the
application of fuzzy set theory, especially in complex control tasks, which do
not lend themselves to control by conventional methods, because of lack of
quantitative data regarding input-output relations (Driankov and Hellendoorn
1995). It involves the use of expert’s knowledge in order to accomplish the
control task.
The present interest in fuzzy logic control is largely due to the
successful application of it to a variety of consumer products and industrial
systems. Basically, fuzzy logic is a generalization of binary logic. Fuzzy sets,
membership functions and rules are three primary elements of a fuzzy logic
system. In the IF – THEN rules (which are logical statements), linguistic
terms are used to incorporate vagueness and ambiguity. This logical inference
using fuzzy set is known as fuzzy logic.
Fuzzy logic is much closer in spirit to human thinking and natural
language than the traditional logical systems. It provides an effective means
of capturing the approximate, inexact nature of the real world. It is the
generalization of the classical logic in which there is a smooth transition from
TRUE to FALSE (Bart 1992).
105
Development of fuzzy logic for the attitude controller of micro
satellites is dealt in this chapter.
5.2 FLC SYSTEM FOR SATELLITE ATTITUDE CONTROL
Fuzzy control is one of the expanding application fields of fuzzy set
theory. It is an expanding field in space technology (Chiang and Jang 1994).
Fuzzy controllers differ from classical math-model controller. Fuzzy
controllers do not require a mathematical model of how control outputs
functionally depend on control inputs and therefore especially suited for
situations where the system is too complex to model. Fuzzy controllers also
differ in the type of uncertainty they represent.
5.3 IMPLEMENTATION
In this section fuzzy controller is designed for detumbling with
initial spin up, spin rate control and spin axis orientation control with the help
of Fuzzy Toolbox, Matlab.
5.3.1 Detumbling with Initial Spin Up Controller
The input variables for the fuzzy controllers are the measured state
variables of the satellite and the estimated control torques. This choice of
input variables will make it possible to regulate the state variables while
considering the control torque constraints. The torques can be estimated using
a cross product between moment and magnetic field.
The intention of this controller design is to define a set of control
rules and to implement them in such a way as to make boundaries between
them less strict, resulting in a system that cover a large universe of discourse
with a relatively small rule base. A block diagram of the proposed fuzzy
controller is shown in Figure 5.1. The controller consists of three fuzzy
106
control laws, one for each magneto-torquer (Mx, My, and Mz coils). Each
control law embodies a fuzzy rule base to decide on the control desirability
and output level when using the corresponding torquer (Steyn 1996).
Figure 5.1 Block diagram of the fuzzy controller
5.3.1.1 Inputs
A total of six inputs were used, they are as given below:
X1 = ωx, angular rate about x axis
X2 = ωy, angular rate about y axis
X3 = k (ωz - ωspin), rate error
X4 = Nx, estimated control torque about x axis
X5 = Ny, estimated control torque about y axis
X6 = Nz, estimated control torque about z axis
5.3.1.2 Membership functions
These variables are then mapped into fuzzy sets (ex. for positive for
negative). The fuzzy set values are obtained from membership functions e.g.:
X1 mP(X1) and X 4 mN(X4) (5.1)
107
These values then act accordingly to choose the torquer polarity.
The membership functions for each input variable are shown in Figures 5.2,
5.3 and 5.4 respectively. The reasons for choosing the functions in this
specific format are a need to limit the number of fuzzy sets and to obtain a
linear mapping in the normal operating region of the system.
Figure 5.2 Membership function for variables X1, X2, X3
Figure 5.3 Membership function for variables X4, X5
Figure 5.4 Membership function for variable X6
108
The amount of overlap between the different fuzzy sets is optimised
through simulation. The saturation point of each input variable is set using an
engineering knowledge of the system and optimised using simulation trails.
In the detumbling mode both the transverse rates and estimated
control torques are given as a input to Mz controller. A set of intuitive rules is
used to describe the Mz controller. In the initial spin up mode the polarity of
the constant current that is passed to Mx and My coils are solely determined
from the sign and magnitude of the transverse earth’s magnetic field
component.
5.3.1.3 Rules
Rules for spin axis controller and transverse axes controller are
given in the Tables 5.1 and 5.2 respectively.
Table 5.1 Mz fuzzy variable control rule
Rule X1 X2 X4 X5 U
R1 P - P - - 1
R2 P - N - + 1
R3 N - N - + 1
R4 N - N - - 1
R5 - P - P - 1
R6 - P - N + 1
R7 - N - P + 1
R8 - N - N - 1
109
Table 5.2 Mx, My fuzzy variable control rule
Rule X1 X2 X3 X4 X5 X6 U R1 P - - P - Z -1 R2 P - - N - Z +1
R3 N - - P - Z +1 R4 N - - N - Z - 1
R5 - P - - P Z - 1
R6 - P - - N Z + 1 R7 - N - - P Z + 1
R8 - N - - N Z - 1
R9 - - P - - P +1 R10 - - P - - N - 1
R11 - - N - - P -1
R12 - - N - - N +1
Rule evaluation is performed using correlation-product encoding, i.e
the conjunctive (AND) combination of the antecedent fuzzy sets. For example
rule 1:
R1: µ1 = mP(X1).mP(X2).mZ(X3) (5.2)
where mi are the membership functions.
The truth-value obtained is then used to scale the output:
R1 : y1 =1 .U (5.3)
When the result of all the rules is known, the final value is obtained by
disjunctively (OR) combining the rule values:
110
N
1i
iN
1i
ii y,1minysgn)y(y (5.4)
The disjunction method can be described as a kind of signed
Lukasiewicz OR logic. It is chosen to maximally negatively correlate the rule
outputs. For example, opposing rule outputs (different in sign) cancel each
other to deliver a small rule base output.
Above said detumbling with initial spin up controller is developed
using FIS Editor, Fuzzy logic Toolbox, Matlab.
5.3.2 Spin Rate Controller
The spin rate control is done to keep the satellite spinning at
constant rate, even when there is a disturbance. During normal mission of the
spacecraft, spin rate along maximum moment of inertia axis i.e. spin axis is
required to be maintained within the specified band.
The transverse axes torquers are actuated till the specified spin rate
is reached. Current polarities of the torquers in transverse axes are:
Current polarity My = (sign of Bx)
Current polarity Mx = (sign of By)
where +, - sign depends on whether it is spin up or spin down mode.
Fuzzy spin rate controller basically consists of two Single Input
Single Output (SISO) controllers. Spin rate control involves two modes, spin
up and spin down.
111
By Mx
Bx My
Figure 5.5 Block diagram of fuzzy spin rate controller
The input variables for this fuzzy controller are transverse
component of earth’s magnetic field By and Bx respectively. For increasing
the rate, fuzzy logic controller gives the same sign as its input magnetic field
for My controller, while the polarity given by Mx controller is directly
opposite to its input magnetic field sign. The implementation process is
explained in the Figure 5.5.
For spin up, the rules are:
If Bx is negative then My is negative
If Bx is positive then My is positive.
Also for Mx controller:
If By is negative then Mx is positive
If By is positive then Mx is negative
Similarly for spinning down the rules are slightly modified. In this
Mx controller follows the same sign as it input magnetic field, while other
follows opposite to that of input. Rule evaluation is performed using
correlation product encoding i.e conjunctive (AND) combination of the
antecedent fuzzy sets. The membership function for input variable is shown in
SISO FLC
SISO FLC
112
Figure 5.6. The overlapping is made minimum to sharply define a boundary
for the polarity that could be applied to the torquers.
Figure 5.6 Membership function for variables By, Bx
5.3.3 Spin Axis Orientation Controller
The attitude control for this mode fuzzy is implemented by direct
mapping of torquer values to the given magnetic field.
For this research work, the magnetic field along transverse axes is
taken as input and required torque is produced along the transverse axes.
Input Output
X1 – By Y1 – Torque value along y axis
X2 – Bx Y2 – Torque value along z axis
Thirteen membership functions (2 trapezoidal membership,
11 triangular membership functions) are used for inputs By and Bx. In the
output 13 triangular membership functions are used to represent the linguistic
terms. A scale mapping is performed using triangular membership function,
which transfers the range of input variable into corresponding universe of
113
discourse. An element of each set is mapped on to the domain corresponding
to the linguistic variable.
Knowledge to perform deductive reasoning is called inference. The
truth-value for each premise of every rule is computed. Inference mechanism
helps to draw conclusion from the rule base, which can produce an output
from the collection of If-Then rules. In the present work the inference
mechanism is designed using Mamdani (Min – Max) method.
The resulting fuzzy set must be converted to a number that can be
sent to the process as a control signal. This operation is called
“defuzzification”. In this work, centroid method of defuzzification is used.
All the rule outputs are then combined disjunctively (OR) to obtain
the crisp rule base output:
iN
1i
i y,1minysgny (5.5)
In short the simulation steps to be performed are the following:
i) Obtain the magnetometer measurement of the geomagnetic
field vector B.
ii) Compute the attitude and attitude error (from desired attitude)
iii) Maps the entire fuzzy input variable into their fuzzy set.
iv) Evaluate the fuzzy rule to get Mx for generate the required
torque.
v) Compute attitude and attitude error for the influence made on
satellite dynamics due to generated torque.
vi) Repeat steps 2, 3 and 4 till attitude error is zero.
114
The optimality and performance (control response time) of the
controller are therefore solely dependent on the choice of membership
function.
5.4 SIMULATION RESULTS
Attitude control is an area of concern for a variety of applications
ranging from autonomous vehicles to spacecraft. Accurate attitude control of
spacecraft and other vehicles is crucial to the success of their mission.
However, due to the high degree of non-linearity, it is very difficult to ensure
performance or stability without a significant amount of effort and luck. This
work provides a new methodology for developing controllers in a faster and
more cost effective manner. Because of its flexibility or generic nature the
fuzzy attitude controller, which utilizes fuzzy logic and angular estimate
feedback, can be easily ported to other systems.
The performance of the proposed fuzzy controller is evaluated
through simulation. Also disturbance torque is added to the simulation, to
show the robustness of the fuzzy controller.
5.4.1 Satellite Configuration
The proposed micro-satellite has only diagonal elements in inertial
matrix and there are no other elements in off diagonal matrix.
442010.1000338694.1000255427.1
I (5.6)
115
The moment of inertia along x, y and z-axes are given below:
Ix = 1.255427 kg-m2
Iy = 1.338694 kg-m2
Iz = 1.442010 kg-m2
5.4.2 Initial Rates
Since the beginning of each simulation, an initial angular rate of
6 degree per second for each axis is maintained and these rates are decided
according to the specification given by the launch vehicle team.
ωx = 6 deg/sec
ωy = 6 deg/sec
ωz = 6 deg/sec
5.4.3 Detumbling With Initial Spin Up Response
The response of the controller is shown in the Figure 5.7. This
shows that the transverse rates are found to be decaying within
1.5 orbits. An orbit takes a time period of 6500 seconds. Also the desired spin
rate of 8±0.5 rpm is achieved in five orbits with a torquer capacity of 9 Am2
in spin axis and 4.5 Am2 in transverse axes respectively. The value of gain in
rate error equation is found to be 14.9 through numerous simulation trials. A
manual tuning is employed to find such gain. A compromise between the
shape, size of membership function and the rate error gain is made to obtain a
better performance, even in presence of erroneous magnetometer
measurements.
116
Figure 5.7 Detumbling with initial spin up fuzzy controller response
5.4.4 Spin Rate Controller Response
The significance of spin rate controller is to maintain angular rate
about the spin axis within a specified band (80.5rpm), even in the presence
of external disturbances. Since spin stabilized satellites necessitates a constant
angular rate about spin axis for its own stabilization. The performance of spin
rate controller in both, spin up mode and spin down mode are given in
Figures 5.8 and 5.9 respectively.
z (
deg/
sec)
x (de
g/se
c)
y (
deg/
sec)
Time (in orbits)
Time (in orbits)
Time (in orbits)
117
Figure 5.8 Spin rate controller response -spin up
Figure 5.9 Spin rate controller response -spin down
z (
deg/
sec)
x (de
g/se
c)
y (
deg/
sec)
x (de
g/se
c)
z (
deg/
sec)
y (de
g/se
c)
Time (in orbits)
Time (in orbits)
Time (in orbits)
Time (in orbits)
Time (in orbits)
Time (in orbits)
118
5.4.5 Spin Axis Orientation Controller Response
The fuzzy controller response for spin axis orientation controller in
orbit normal position is given in Figure 5.10. The input is taken in the form of
samples. Two samples are taken per second so the settling time is obtained by
dividing the sample by 2.
Figure 5.10 Spin axis orientation controller response – orbit normal
5.4.6 Effects of Disturbances
The universe is not an ideal place and things like uncertainties or
disturbances are constantly present. Disturbances in space come in a variety
of forms. Currently there are 6,650 known objects (debris) weighing
approximately 3,000,000 kilograms orbiting the earth. The debris are
composed of paint flecks, refuse, waste, solid rocket effluent, etc. There are
also millions of smaller (fewer than 10 cm) untraceable objects with velocities
Dec
linat
ion
(deg
)
Samples
119
of the order of 10 km/sec. Other disturbances are due to magnetic flux, solar
winds and solar radiation pressure torque (approximately 1 10-5 Nm).
In order to test the robustness and flexibility of the proposed
scheme, the controller has been simulated offline with various external
environmental disturbances. Through out the simulation, initial conditions
were set to the same value as mentioned earlier. Magnitude of various
disturbances: aerodynamic drag (3.23810-12Nm), gravity gradient torque
(3.01610-7 N-m) and solar pressure (2.78310-7Nm) are included in the
simulation, which still shows similar results. This explains flexibility and
robustness of the controller.
The response of the controller to a disturbance is obtained as shown
in the Figure 5.11 in the detumbling with initial spin up mode.
Figure 5.11 Detumbling with initial spin up fuzzy controller response
along with external disturbance
z (
deg/
sec)
x (de
g/se
c)
y (
deg/
sec)
Time (in orbits)
Time (in orbits)
Time (in orbits)
120
The response of the controller to a disturbance is obtained for spin
rate controller in the spin up and spin down modes as shown in the
Figures 5.12 and 5.13. The SAOC controller response for declination to
reduce from 140 deg to 0 deg is given in Figure 5.14.
Figure 5.12 Spin rate controller response-spin up along with external
disturbance
z (
deg/
sec)
x (de
g/se
c)
y (
deg/
sec)
Time (in orbits)
Time (in orbits)
Time (in orbits)
121
Figure 5.13 Spin rate controller response-spin down along with external
disturbance
Figure 5.14 Spin axis orientation control – orbit normal along with
external disturbance
z (
deg/
sec)
x (de
g/se
c)
y (
deg/
sec)
Time (in orbits)
Time (in orbits)
Time (in orbits)
Dec
linat
ion
(deg
)
Samples
122
The response of the controller to an external disturbance up to many
a times of the worst case disturbance torque has been simulated. The response
of the controller is almost the same and the controller is insensitive to external
disturbances of the order of 20 times the worst-case external disturbance
torque. This sensitivity analysis proves the robustness of the fuzzy controller.
5.5 CONCLUSION
In this chapter the satellite attitude controller was designed using
fuzzy controller for both the detumbling with initial spin up and spin rate
control modes. Here the application of fuzzy logic to the proposed satellite
(ANUSAT) is explained. The design is implemented in Matlab using fuzzy
toolbox and the responses are plotted for various attitude modes. The settling
time taken for detumbling with initial spin-up is around 37,202 s and that of
SAOC is 28,525 s. The robustness of the controller has been proved by
simulating the response of the satellite’s attitude in the presence of external
disturbances. The disturbances for which the sensitivity of the controller is
tested are for many times of the order of worst cases external torques. The
responses prove that the controller is less sensitive to twenty times of external
disturbances torques. The results are given in the form of responses and were
plotted using Matlab. The fuzzy controller was also simulated for three
torquer capacities to analyze its effect on the satellite attitude. Figures 5.15
through 5.18 shows the effect of torquer capacities on the settling time for
various modes of the attitude control system.
123
Figure 5.15 Effect of torquer capacity on settling time – detumbling with
initial spin up
Figure 5.16 Effect of torquer capacity on settling time – spin rate control
(spin up)
Sett
ling
time
(sec
)
Magnetic torquer capacity (Am2)
Settl
ing
time
(sec
)
Magnetic torquer capacity (Am2)
124
Figure 5.17 Effect of torquer capacity on settling time – spin rate control
(spin down)
Figure 5.18 Effect of torquer capacity on settling time – spin axis
orientation control (orbit normal)
Settl
ing
time
(sec
)
Magnetic torquer capacity (Am2)
Settl
ing
time
(sec
)
Magnetic torquer capacity (Am2)
125
The inference from the simulation results are that the time taken for
settling increases as the torquer capacity is decreased and decreases if the
torquer capacity is increased. This shows that the use of fuzzy control, an
intelligent control, does not have any impact on the power system of the
satellite and is just a control technique effective in improving the response of
the system. The time taken for settling can be improved by optimizing the
parameters of the fuzzy controller and can be an effective control technique
than the conventional controllers.