Open access peer-reviewed chapter

On the Computational Analysis of the Genetic Algorithm for Attitude Control of a Carrier System

By Hadi Jahanshahi and Naeimeh Najafizadeh Sari

Submitted: December 3rd 2017Reviewed: January 17th 2018Published: August 29th 2018

DOI: 10.5772/intechopen.74121

Downloaded: 238

Abstract

This chapter intends to cover three main topics. First, a fuzzy-PID controller is designed to control the propulsion vector of a launch vehicle, accommodating a CanSaT. Then, the genetic algorithm (GA) is employed to optimize the controller’s performance. Finally, through adjusting the algorithm parameters, their effect on the optimization process is examined. In this regard, the motion vector control is programmed based on the governing system’s dynamic equations of motion for payload delivery in the desired altitude and flight-path angle. This utilizes one single input and one preference fuzzy inference engine, where the latter acts to avoid the system instability in high angles for the propulsion vector. The optimization objective functions include the deviations of the thrust vector and the system from the stability path, which must be met simultaneously. Parameter sensitivity analysis of the genetic algorithm involves examining nine different cases and discussing their effect on the optimization results.

Keywords

  • fuzzy-PID controller
  • CanSat
  • genetic algorithm
  • parameter sensitivity analysis

1. Introduction

Due to costly space projects, affordable flight models and test prototypes are of incomparable importance in academic and research applications, such as data acquisition and subsystems testing. In this regard, CanSat could be used as a low-cost, high-tech, and light-weight model; this makes it popular in academia. CanSat is constituted from the words “can” and “sat,” which collectively means a satellite that is embeddable in a soda can [1]. In these apparatuses, an electronic payload is placed into a container dimensionally comparable to a soda can; it is then launched into space with a rocket or balloon [2]. The attained altitude is a few thousand meters, which is much lower than the altitude of sounding rockets [3].

The concept of fuzzy logic was introduced by Zadeh in 1965; it has been improved by several researchers, forming a potent tool for a variety of applications [4]. For example, Precup and Hellendoorn [5] and Larsen [6] have used fuzzy logic in controllers for various industrial and research applications. The control area has attracted the most significant studies on fuzzy systems [715]. Petrov et al. have used fuzzy-PID controllers to control systems with different nonlinear terms [16]. Hu and colleagues proposed a new and simple method for fuzzy-PID controller design based on fuzzy logic and GA-based optimization [17]. Juang et al. have used triangular membership functions in fuzzy inference systems along with a genetic algorithm to tune parameters or fuzzy-PID controllers [18]. Operating fuzzy-PID controllers and online adjustment of fuzzy parameters were the main output of Resnick et al. researches [19].

In 1950, Alan Turing proposed a “learning machine” which would parallel the principles of evolution [20]. Genetic algorithms (GAs) are stochastic global search and optimization methods that mimic the metaphor of natural biological evolution [21]. GAs consider the principle of survival of the fittest to produce better generations out of a population. Although genetic algorithms cannot always provide the optimal solution, it has its own advantages [22] and is a powerful tool for solving complex problems. GA is an effective strategy and had successfully been used in the offline control of systems by a number of studies. Krishnakumar and Goldberg [23] have shown the efficiency of genetic optimization methods in deriving controller structures in aerospace applications compared to traditional methods such as LQR and Powell’s gain set design. Porter and Mohamed [24] have taken initiative and by the use of GA have offered a simple and applicable eigenstructure assignment solution which is applied to the design of multivariable flight-control system of an aircraft. Others have denoted how to use GA to choose control structures [25].

Heuristic methods are highly dependent on their agents and parameters. Therefore, GA properties (mainly population size and crossover ratio) are of high importance in finding optimum points which are usually found by sensitivity analysis. These parameters are defined for a better acquaintance of readers in the following.

This chapter focuses on designing a GA-based fuzzy-PID controller. A two-termed cost function containing path and thrust vector deviations is fed into GA code to be optimized. The code adjusts the parameters. Nine different combinations with relative optimality are discussed. The chapter is dissected into following sections:

  • “CanSaT carrier system” which presents a simple model of the carrier system

  • “Fuzzy-PID controller” that describes controller design and its parameters

  • “Optimization” which describes the optimization process

  • “Results and discussion” that clarify results and comparisons

  • “Conclusion”

  • “References”

2. CanSaT carrier system

The dynamic equations of a CanSaT carrier system is derived from the Newtonian law. It should be added that in the separation stage, the projection of satellite velocity vector must be tangent to the horizontal plane. Figure 1 shows a simplified model of a launch vehicle in which θis the angle of the longitudinal vector of the vehicle in the perpendicular direction (toward the ground) and φis the angle of its propulsion with body centerline.

Figure 1.

Carrier system scheme.

The dynamics of the system can be summarized in

MCM=E1

in which MCMis the moment around the center of mass, Iis the inertial moment, and Iis the angular acceleration about an axis perpendicular to the plane. Eq. (1) can be expanded to (2)

l2×Fn=Iθ¨E2

In the notation lis used for the length of the vehicle, Ffor the propulsion force, and Fnfor its projection perpendicular to the longitudinal direction of launch vehicle. It is known that the vehicle moves along the vertical axis with acceleration of. Therefore, Newton equation for that axis is rearranged as below:

Fz=maE3

in which Fzand mare, respectively, the force along the vertical axis and the mass of the launch vehicle. Eq. (3) can be rewritten as below:

mg+Ftcosθ=maE4

Meanwhile, geometric relations dictate the following equations in the vertical plane:

Fn=FsinφE5
Ft=FcosφE6

By substituting (6) in (4), we have

F=ma+gcosφcosθE7

Insertion of (5) into (2) in a similar pattern yields to

θ¨=12IlFsinφE8

with considering θ=0and substitution of (7) in (8) results in

θ¨=12Imla+gtanφE9

By substituting 12Imla+gby band tanφby ut, the dynamic equation of the system leads to

θ¨=butE10

in which utis the control parameter. Therefore, equations of system states take the following form:

ẋ1t=x2tẋ2t=butyt=x1tE11

where θand θ̇are, respectively, represented by x1tand x2t. The measurable state vector is notated by X=x1x2T.

3. Fuzzy controller design

Two types of fuzzy inference motors are utilized in the proposed fuzzy controller [26]. The first type is single input fuzzy inference motor (SIFIM). The second inference motor type is the preferred fuzzy inference motor (PFIM) that represents the control priority order of each norm block output.

SIFIMi:Rij:ifxi=Aijthenui=Cijj=1mE12

The SIFIMipoints to single input inference motors which accepts the ithinput, and Rijis the jthrule of the ithsingle input inference motor. Also, Aijand Cijare relevant membership functions. Each input item usually has a different role in the implementation of control. In order to express the different effects of implementing each input item in the system, single input fuzzy inference motor defines a dynamic importance degree (wiD) for each input item as (13)

wiD=wi+Bi×wiE13

where wi, Bi, and wiare control parameters described by fuzzy rules. SIFIMiblock calculates fias follows:

fi=NBi×f1+Zi×f2+PBi×f3NBi+Zi+PBiE14

The membership functions of SIFIMs are shown in Figure 2. As mentioned before f1, f2,and f3, the SIFIM fuzzy rules are extracted from Table 1.

Figure 2.

Membership functions of SIFIMs (note: NB = negative big; Z = zero; PB = positive big).

IfThen
NBif1=1
Zif2=0
PBif3=1

Table 1.

Fuzzy rules of SIFIMs.

The other type of fuzzy inference motors (PFIMs) guarantees satellite control system performance using desired values in one or more axes of the coordinate system. PFIM-i calculates wias follows:

w1=w2=w3=w1×DS+w2×DM+w3×DLDS+DM+DLE15

The membership functions of PFIMs are shown in Figure 3, while their fuzzy rules are tabulated in Table 2.

Figure 3.

Membership functions of PFIM (note: DS = distance short; DM = distance medium; DL = distance long).

IfThen
θDSw1=1
θDMw2=0.5
θDLw3=1

Table 2.

Fuzzy rules of PFIMs.

By calculating fiand wi∆Wi, it is possible to define fuzzy-PID controller as (16)

ufuzzyPID=K̂θ̂dt+K̂θ̂+K̂dθ̂dtE16

where uFuzzyPIDis the control action and θ̂dt, θ̂, and dθ̂dtare, respectively, the fuzzy forms of θdt, θ, and dtand should be obtained from SIFIM. In other words, we have θ̂dt=f1, θ̂=f2, and dθ̂dt=f3. Parameters of K̂, K̂and K̂in (7) are fuzzy variables calculated by following equations:

K̂=Kb+KrW1E17
K̂=Kb+KrW2E18
K̂=Kb+KrW3E19

in which Kb, Kθb,and Kbare the base variables and Kr, Kθr, and Krare regulation variables. While it is possible to find these variables by trial and error, the best way to find them is using optimization approaches like evolutionary algorithms, especially genetic algorithm (GA).

4. Optimization

GA is an approach for solving optimization problems based on biological evolution via repeatedly modifying a population of individual solutions. At each level, individuals are chosen randomly from the current population (as parents) and then employed to produce the children for the next generation. In this chapter, the following operators are implemented for optimization of the fuzzy-PID controller:

  • Population size (PS): Increasing the population size enables GA to search more points and thereby obtain a better result. However, the larger the population size, the longer it takes for the GA to compute each generation.

  • Crossover options: Crossover options specify how GA combines two individuals, or parents, to form a crossover child for the next generation.

  • Crossover fraction (CF): Crossover fraction specifies the fraction of each population, other than elite children, that are made up of crossover children.

  • Selection function: Selection function specifies how GA chooses parents for the next generation.

  • Migration options: Migration options determine how individuals move between subpopulations. Migration occurs if the population size is set to be a vector of length greater than 1. When migration occurs, the best individuals from one subpopulation replace the worst individuals in another subpopulation. Individuals that migrate from one subpopulation to another are copied. They are not removed from the source subpopulation.

  • Stopping criteria options: Stopping criteria options specify the causes of terminating the algorithm.

In this chapter, the configuration of GA is set at the values given in Table 3.

ParameterValue
CF0.4, 0.6, 0.8
PS90, 200, 500
Selection functionTournament
Mutation functionConstraint dependent
Crossover functionIntermediate
Migration directionForward
Migration fraction0.2
Migration interval20
Stopping criteriaFitness limit to 10−4

Table 3.

GA configuration parameters.

Furthermore, the multi-objective optimization of the proposed fuzzy-PID controller is done with respect to six design variables and two objective functions (OFs). The base values [Kb, Kb, Kb] and regulation values [Kr, Kr, Kr] are the design variables. The system’s angle of deviation from equilibrium point and the thrust vector’s angle of deviation are, respectively, defined as OF1 and OF2:

OF1=θdtE20
OF2=ΦdtE21

5. Results and discussion

In this section, by regarding two aforementioned OFs, the effect of two parameters of PS and CF is measured in the optimization. Figure 4 represents Pareto fronts of these two functions after optimization. Meanwhile, Figure 5 shows the system’s position under performance of the designed controller. The angle of propulsion vector of the CanSaT carrier system is demonstrated in Figure 6. Tables 46 display the magnitude of design variables. OF1 and OF2 are shown for optimum points of Ai, Bi, and Ciin Tables 79. The best values satisfying the two OFs with the constraints of minimum settling time and overshoot are presented. The relevant magnitude of PS and CF to each figure is brought in its legend. The points Aii=129, Bii=129, and Cii=129are, respectively, the best for the first, the second, and both OFs.

Figure 4.

Pareto front by Objectives 1 and 2 corresponds to the (a) PS = 90 and CF = 0.4, (b) PS = 90 and CF = 0.6, (c) PS = 90 and CF = 0.8, (d) PS = 200 and CF = 0.4, (e) PS = 200 and CF = 0.6, (f) PS = 200 and CF = 0.8, (g) PS = 200 and CF = 0.4, (h) PS = 200 and CF = 0.6, and (i) PS = 200 and CF = 0.8.

Figure 5.

Time response of the CanSaT carrier system’s position for (a) A1, B1, and C1; (b) A2, B2, and C2; (c) A3, B3, and C3; (d) A4, B4, and C4; (e) A5, B5, and C5; (f) A6, B6, and C6; (g) A7, B7, and C7; (h) A8, B8, and C8; and (i) A9, B9, and C9 as the optimum points.

Figure 6.

Time response of the thrust angle of CanSaT carrier system for (a) A1, B1, and C1; (b) A2, B2, and C2; (c) A3, B3, and C3; (d) A4, B4, and C4; (e) A5, B5, and C5; (f) A6, B6, and C6; (g) A7, B7, and C7; (h) A8, B8, and C8; and (i) A9, B9, and C9 as the optimum points.

Design variablePoint PS = 90/CF = 0.4ValuePoint PS = 90/CF = 0.6ValuePoint PS = 90/CF = 0.8Value
KbA1−0.0094A20.0050A30.013
Kθb2.832.712.93
Kb0.360.300.35
Kr0.36−0.036−0.25
Kθr0.463.170.68
Kr0.951.940.83
KbB1−0.0075B20.044B3−0.039
Kθb−0.00230.00019−0.0069
Kb2.902.312.11
Kr0.0220.021−0.036
Kθr−0.022−0.260.39
Kr1.683.191.71
KbC1−0.0094C20.033C30.036
Kθb2.832.482.33
Kb0.360.310.36
Kr0.360.0250.044
Kθr0.463.0830.34
Kr0.952.051.022

Table 4.

Design variables for Ai, Bi, and Ci (i = 1, 2, 3).

Design variablePoint PS = 200/CF = 0.4ValuePoint PS = 200/CF = 0.6ValuePoint PS = 200/CF = 0.8Value
KbA40.015A5−0.0025A6−0.01061
Kθb2.792.592.7385
Kb0.350.330.3856
Kr−0.600.130.4005
Kθr1.760.630.8030
Kr0.92−0.17−1.1440
KbB4−0.088B5−0.15B60.01091
Kθb−0.000200.00170.000345
Kb2.842.483.2541
Kr−0.00460.0550.009406
Kθr0.450.64−0.08872
Kr2.970.781.5818
KbC40.093C50.016C60.009348
Kθb2.752.232.7109
Kb0.400.330.3817
Kr0.0560.160.3722
Kθr1.940.680.5992
Kr0.53−0.055−0.4311

Table 5.

Design variables for Ai, Bi, and Ci (i = 4, 5, 6).

Design variablePoint PS = 500/CF = 0.4ValuePoint PS = 500/CF = 0.6ValuePoint PS = 500/CF = 0.8Value
KbA70.0018A8−0.013A9−0.014
Kθb2.552.562.71
Kb0.310.350.36
Kr0.0400.480.61
Kθr0.521.301.29
Kr1.500.32−0.57
KbB7−0.011B8−0.17B9−0.040
Kθb0.000130.0300.0064
Kb2.431.260.77
Kr−0.00150.0270.012
Kθr0.0580.860.16
Kr2.841.420.36
KbC70.0017C8−0.013C9−0.00073
Kθb2.552.562.60
Kb0.310.350.38
Kr0.0400.480.52
Kθr0.521.300.54
Kr1.500.32−0.45

Table 6.

Design variables for Ai, Bi, and Ci (i = 7, 8, 9).

Objective functionPoint PS = 90/CF = 0.4ValuePoint PS = 90/CF = 0.6ValuePoint PS = 90/CF = 0.8Value
OF1A10.029A20.030A30.030
OF20.0420.0450.045
OF1B10.40B20.40B30.40
OF20.0000170.0000110.000079
OF1C10.029C20.030C30.000079
OF20.0420.0390.034

Table 7.

Objective functions for Ai, Bi, and Ci (i = 1, 2, 3).

Objective functionPoint PS = 200/CF = 0.4ValuePoint PS = 200/CF = 0.6ValuePoint PS = 200/CF = 0.8Value
OF1A40.029A50.030A60.029
OF20.0420.0420.040
OF1B40.40B50.40B60.40
OF20.00000370.0000350.0000073
OF1C40.032C50.032C60.030
OF20.0370.03590.039

Table 8.

Objective functions for Ai, Bi, and Ci (i = 4, 5, 6).

Objective functionPoint PS = 500/CF = 0.4ValuePoint PS = 500/CF = 0.6ValuePoint PS = 500/CF = 0.8Value
OF1A70.030A80.030A90.029
OF20.0400.0380.041
OF1B70.40B80.39B90.40
OF20.00000210.000120.000065
OF1C70.030C80.030C90.030
OF20.0400.0380.037

Table 9.

Objective functions for Ai, Bi, and Ci (i = 7, 8, 9).

Further, as seen in Figure 4, points Ai and Ciare in a near proximity in which in some cases a coincidence occurs. It is mainly due to non-convergence of CanSaT carrier launch vehicle points with points far from Ai. A similar behavior is observed from Pareto fronts of the situation, angular velocity, and angle of the propulsion vector for the launch vehicle.

To analyze the effects of each parameter in GA, Figures 712 are produced. Figure 7 shows the dependency of OF1 (at points Ai) to nine different combination forms of GA parameters. The figure shows that the minimum area under “situation of launch vehicle” curve is obtainable for PS = 200 and CF = 0.8. It is also inferred that for better results, parameters PS and CF must be increased simultaneously. For low PS, increasing CF helps to improve first OF, but with more magnitudes of PS, higher CFs yield better results.

Figure 7.

GA parameters versus OF1 for the best points from the viewpoint of OF1.

Figure 8.

GA parameters versus OF2 for the best points from the viewpoint of OF1.

Figure 9.

GA parameters versus OF1 for the best points from the viewpoint of OF2.

Figure 10.

GA parameters versus OF2 for the best points from the viewpoint of OF2.

Figure 11.

GA parameters versus OF1 for the best points from the viewpoint of OF1 and OF2.

Figure 12.

GA parameters versus OF2 for the best points from the viewpoint of OF1 and OF2.

Figure 8 represents dependency of OF2 (at points Ai) to nine different forms of combinations of GA parameters. The figure shows the least area below the deviation angle of the thrust curve for CanSaT carrier system when PS = 500 and CF = 0.6. Figures 9 and 10 propose that the smallest magnitude for the first and second OFs (pertaining to Bi) is achievable for, respectively, PS = 500 and CF = 0.6 and PS = 500 and CF = 0.4. In Figures 11 and 12, magnitudes of the first and second objective functions in Ci Points are represented, respectively. The first OF proposed the point C1 with PS = 90 and CF = 0.4. Meanwhile, the second function insists on the point with PS = 90 and CF = 0.8.

6. Conclusion

This chapter represents a design of a fuzzy controller based on a GA code for the purpose of controlling propulsion vector of a launch vehicle which carries CanSaT. Minimizing the errors initiated by system deviation from equilibrium state and propulsion thrust deviation are two objectives for optimizing this controller. This is done by manipulating GA parameters in nine different combination forms to satisfy each objective function and also both of them simultaneously. Further it is examined how these parameters affect the optimal points.

By observing constraints of minimum settling time and overshoot, the results show that the optimal points proposed by the first OF are in proximity with the ones from both OFs which in some cases end in coincidence. Finally, by comparing magnitudes of OFs for various combinations of GA parameters, the optimum points and their relevant parameters are introduced.

Conflict of interest

The authors declare that there is no conflict of interest.

© 2018 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Hadi Jahanshahi and Naeimeh Najafizadeh Sari (August 29th 2018). On the Computational Analysis of the Genetic Algorithm for Attitude Control of a Carrier System, Intelligent System, Chatchawal Wongchoosuk, IntechOpen, DOI: 10.5772/intechopen.74121. Available from:

chapter statistics

238total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Multiagent Intelligent System of Convergent Sensor Data Processing for the Smart&Safe Road

By Alexey Finogeev, Alexandr Bershadsky, Anton Finogeev, Ludmila Fionova and Michael Deev

Related Book

First chapter

Introductory Chapter: 2D Materials

By Yotsarayuth Seekaew and Chatchawal Wongchoosuk

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us