Skip to Content

Fuzzy Control Optimization using Cross-Entropy: Tuning the Membership Functions and Rules’ Weight to Control a UAV for See and Avoid

*paper submitted to the ICRA 2014*

Abstract - Define and tune a controller is a hard task to accomplish. Soft-Computing based controllers are little bit easier because they can be defined without knowing the model of the system to control. These type of controllers are defined using heuristic information, or based on expert knowledge. Classical method of optimization and definition are presented in the literature, as neural networks or genetic algorithms. The recently developed Cross-Entropy (CE) optimization method is a general Monte-Carlo approach to combinatorial and continuous multi-extremal optimization and importance sampling. This work presents a novel approach of this method to tune Fuzzy Logic Controllers (FLC). The control system to optimize is a vision based heading controller of an unmanned aerial vehicle (UAV) for See and avoid. The optimization process is focused on modify the size and the position of the membership functions’ sets of each variable and the rules’ weight to adapt the control system for this specific task. This has done in a simulated environment developed using Matlab. Two optimized controllers at different stages were tested in indoor tests with an AR.Drone at different speeds. The obtained results show the powerful performance of this technique to be apply for Fuzzy controller optimization. Not only the behavior of the controller was improved in few iterations, but also a big reduction of the Fuzzy controller’s rules was obtained.

The detection and avoidance of the obstacle is done using a visual algorithm based on augmented reality (AR) marker detection. This algorithm is based on a developed library of augmented reality using OpenCV named ArUco ( The extracted information of the visual algorithm gives the location of the target in the image. With this information the developed control system generates the desired yaw command to modify the trajectory of the UAV in order to keep the object at constant relative bearing.

Evolution of the error for the different optimized controller for the avoiding task under the simulator environment. 

Example of the detection of the ArUco code for the avoiding task.


Membership optimization with a cancelation of 2 sets on the second and third inputs.

After the membership functions optimization phase, the optimization process continue with the rules weight optimization. Now the numbers of rules is reduced from 125 to 45. As well as the membership functions, the rules are also symmetric, in the sense that the output of the rules for avoiding an obstacle on the right are the same that when the obstacle is on the left, but with opposite direction of the move. So it is possible to modify the weight of one rule and its opposite at the same time. For this reason the number of rules to optimize is reduced from 45 to 23. The initial value for each weight is equal to 0:5, and the maximum value is 1. After the optimization process all the rules with a weight lower than 0:01 are cancelled. After this optimization process the number of rules are reduced from 23 to 14. So, the final controller has 31 rules.

Evolution of the probability density functions of the Membership functions (output variable).



*paper submitted to the ICRA 2014*