**1. Introduction**

Intelligent control techniques are gaining traction and increased focus and are being used in a wide variety of engineering applications. Fuzzy logic control is one such intelligent non-linear control technique that provides significant benefits in terms of design flexibility, universal approximator attribute and the ability to couple with optimization algorithms such as genetic algorithm (GA) for tuning its parameters. When coupled with the ability to capture expert or heuristic knowledge, and the ability to tune behavior in local envelopes of the operating space, fuzzy logic can be an indispensable control design tool in many applications. Fuzzy logic control also possesses inherent robustness due to having knowledge-based properties,

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

making them good candidates for stochastic systems. One of the main challenges facing fuzzy logic control designers is the tuning of the membership functions and the heuristics involved. GA is used in this study to provide an autonomous guided search of the design space to develop a more optimized solution in accordance with the design requirements.

Fuzzy System (GFS). In a GFS, GA tunes the parameters of the FLS to minimize a cost function that is carefully chosen such that minimizing it provides the desired behavior of the system. Such GFSs have been developed with much success for clustering and task planning [10], aircraft conflict resolution [11], simulated air-to-air combat [12], collaborative control of UAVs, etc. Since fuzzy logic systems are made up of a set of membership functions that define the inputs and a set of linguistic rules that define the relationship between the inputs and the outputs, it is more interpretable compared to other machine learning techniques like neural networks and support vector machines. Since it is trained using GA, differentiable cost functions such as integral squared error is not required. So, as long as the mission requirement can be defined as a mathematical cost function, we do not need to have ground truth data available. GA will traverse the search space looking for the optimal set of membership functions and rulebase that minimizes the cost function, which makes it a form of reinforcement learning. Reinforcement learning is a branch of machine learning where an agent is trained to

Development of a Genetic Fuzzy Controller and Its Application to a Noisy Inverted Double…

http://dx.doi.org/10.5772/intechopen.78786

The objective is to design two fuzzy logic controllers that control the torques at the two joints to bring the double pendulum to its inverted position from any initial condition as shown in

the fuzzy membership functions as well as the rule base to come up with the best possible solution, which settles at *θ<sup>1</sup>* = *0*, *θ<sup>2</sup> = 0*, in minimum time. The position of the masses m1

are the torques applied by the controller at the joints. GA is used to tune

<sup>1</sup> *sinθ*<sup>1</sup> (1)

<sup>1</sup> *cosθ*<sup>1</sup> (2)

and

29

take the optimal control action to maximize a reward.

**3. Problem formulation**

and *T2*

*x*<sup>1</sup> = *l*

*y*<sup>1</sup> = *l*

**Figure 1.** Double pendulum schematic with controllers at the joints.

**Figure 1**. *T1*

are given by

m2
