The effect of the number of inference rules of a fuzzy controller on the quality of control of a mobile robot

The application of intelligent control algorithms in the field of autonomous mobile robotics enables effective control of mobile robots with a minimal possible error. At present, most of commonly used systems to control an autonomous mobile robot are, however, too complicated to design. Our goal was to design a fuzzy controller with an optimal number of inference rules in a way to achieve the best possible level of quality of mobile robot control. The proposed controller was implemented in the mobile robot EN20, where the time of regulation and the absolute and the quadratic control surface were used to evaluate quality parameters. The analysis of the quality of control was performed with the use of a fuzzy controller with 9, 25 and 49 inference rules. We found from the results of modelling that the greatest influence on the quality of control of a mathematical model of the mobile robot had the number of inference rules of the fuzzy controller. Mathematical and graphical dependence of the quality of control on the number of inference rules was calculated from the parameters of the quality of control. The results of the research are equations of the curves of the individual parameters of control of quality, which show that for the control of the autonomous mobile robot EN 20, that the optimal fuzzy controller has 49 inference rules, triangular functions of the pertinence of individual linguistic values and it is defuzzificated by Centroid method.


Introduction
Currently, one of the most demanding areas of robotics is the control of mobile robots in a defined environment with a certain degree of autonomy [1]. The main challenge of the autonomous navigation of mobile robots is the quickest possible and the most precise reaching of the target position. One of the most commonly used solution for local navigation, global navigation, path planning, steering control and rate control of a mobile robot is the fuzzy logic [2].
Many researchers used fuzzy logic to investigate its behaviour and characteristics in the field of controlling autonomous mobile robots [1,3,4,5,6,7].
The fuzzy logic is increasingly adapted to problem-solving in the field of unstructured, dynamically changing environments, the description of which by mathematical equations is difficult [2]. Its biggest advantage is the fact, that this method is capable of controlling several variables simultaneously. The quality of mobile robot control is mainly influenced by the number of input variables and fuzzy sets [7].
This article deals with the influence of the number of inference rules of fuzzy controller on the quality of control of a mobile robot. The quality of control will be compared using 9, 25 and 49 inference rules. Their optimal value will be determined according to the time of regulation and the absolute and quadratic regulation area of fuzzy control, while the mathematical dependence of the quality of control on the number of inference rules will be calculated.

Material and Methods
When designing the fuzzy controller, it was necessary to derive the relationships necessary for the calculation of the quantities, with which it would operate. The inputs for the controller are the deflection angle from the target position δ (± 90 °) and the distance from the target position D (0 ÷ 2 m). These values are fuzzified by Λ (triangular) functions. When the deflection angle is beyond the range of ± 90 °, then the fuzzy controller is overridden and the robot rotates clockwise. If the distance of the robot from the target position is longer than 2 m, the input value is reduced to 2 m. The decision rules are defined as a set of function pertinences for individual terms of the output linguistic variables that have to be assigned to a sharp value of the action quantity within the permissible range [7]. The action quantities are the multiples of the maximum rpm of the right and left motor (0 to 1). The meaning of the described input values of the fuzzy controller is shown in Fig. 1. The relation for calculation of the distance of the mobile robot from the target position is the following [6]: where D is the distance of the mobile robot from the target position (m); x TARGET and y TARGET are the x and y coordinates of the target (m); x and y are the x and y coordinates of the point of reference (m).
The deflection angle from the target position has to be determined by the angle of the target point in respect to the mobile robot´s point of reference as follows [6]: where Θ TARGET is the angle of the target point in respect to the point of the mobile robot´s reference (°).
The outputs are coefficients of multiples of the maximal values of the right and left motor rpm. These values are determined using the following equations [6]: where ω P and ω L are the rpm of the right and the left motor (%); k ωp and k ωL are the multiples of the right and left motor´s rpm within the range from 0-1; ω Pmax and ω Lmax are the maximal rpm of the right and left motor (%).
When assessing the quality of control, we focused on three quantitative indicators. The first is the time of regulation, during which the mathematical model of the mobile robot reaches its target position with a tolerance of 10 cm. Next indicators were the absolute and the quadratic regulation area. In our case, these areas were delimited by the calculated path of the mobile robot and the connecting line between the starting and the target point [1,6].

Results
For the analysis of the effect of the number of inference rules, fuzzy controllers with 9, 25 and 49 inference rules were designed. In addition to the designed controllers, it was necessary to measure the magnitude of the quantitative indicators of the quality of control, according to which an optimal number of inference rules was determined by regression.

Setup of a fuzzy controller with 9 inference rules
When setting up a fuzzy controller, it is necessary to define first the linguistic values for the input and output variables D, δ, k ωp and k ωL , which are shown in Fig. 2. The result of the defined pertinence functions, the linguistic quantities and the inference rules are the regulation areas for the multiples of the maximum right and left motor rpm, which are shown in Fig. 3. When assessing the quality of control, we used the defuzzification method of the centroid type, when three quantitative indicators (time of regulation and absolute and quadratic regulation area surface) were evaluated. On the basis of the measured values, we set the time of regulation t reg , the absolute regulation area I AE and the quadratic regulation area I SE as the average of all values. Fuzzy controllers with 25 and 49 inference rules were designed by the same method. The measured values of the given parameters for the controllers with 9, 25 and 49 inference rules are presented in Table 1.

Determination of the equations of the quality parameters
From the measured values, it is evident, that the number of inference rules of the fuzzy controller has the most significant influence on the quality of control of the mathematical model of the mobile robot. The disadvantage is the fact that with the increasing number of inference rules, the robustness of the fuzzy controller also increases, while the difference in the quality of control is not anymore so distinct. In order to find out how the increase o the number of inference rules affected the measured values, we determined the equation of curves for individual dependences by regression. The equation of curves created by regression through a power function takes the following form: b y=ax +c (4) where y is the parameter of the quality of control; a, b, c are coefficients of the equation; x is the number of inference rules.
The coefficients a, b, c for the values of the time of regulation, absolute and quadratic regulation area are presented in Table 2. Using calculated coefficients, it is possible to determine the values of parameters of the quality of control for fuzzy controllers with 81 and 121 inference rules. The effect of increasing the number of inference rules is shown in Fig. 4.   Fig. 4. Influence of increasing the number of inference rules on the quality of control.
From Fig. 4 it is obvious, that continuous increase of the number of inference rules causes improvement in the parameters of quality. However, this improvement has an exponential character, so it is evident that in the case of 49 inference rules and 81 inference rules the difference between the parameters is on average 4.404%. In the case of an increase to 121 inference rules, the average change of parameters in comparison to the previous figure is 1.763%, which means that the values of the parameters of quality control are close to the limit values. The influence of the number of inference rules on the quality of control can also be proven using the paths of the autonomous mobile robot. The change in the path of the mathematical model of an autonomous mobile robot during an increase in the number of inference rules is shown in Fig. 5. The method of calculating parameters of quality control from the curve equation allows us to determine an optimal number of inference rules, by which we ensure the optimal quality of control and the smallest possible complexity of the fuzzy controller.

Conclusions
The main objective of this paper was to find the optimal parameters for a fuzzy controller ensuring that the deviation of the mathematical model of the mobile robot from the target position was as low as possible. The deviation from the target position is described by parameters of the quality control. The evaluated parameters were the control time and the absolute and quadratic regulated area. Analysis of the control quality was performed using a fuzzy regulator with 9, 25 and 49 inference rules. The dependence of the parameters on the number of inference rules was determined by regression of their average values. Our research indicates an improvement of the values of parameters of quality due to an increase in the number of inference rules. However, this change in values has an exponential character, which can be proved by the average difference between the parameters of the control quality. In the case of 49 inference rules and 81 inference rules, the difference between the parameters is 4.404% on average. With an increase to 121 inference rules, the average change of parameters in comparison to the previous values is 1.763%, which means that the values of parameters of the quality control are close to the limit values. The continuous increase in the number of inference rules increases the quality of control and also the complexity of the system and, it is, therefore, important to determine an optimal number of inference rules in order to ensure an optimal control quality together with the smallest possible complexity of the fuzzy controller. In our case, it is the use of a fuzzy controller with 49 inference rules, because any next increase brings only a minimal change of parameters of the quality control.