Keywords

1 Introduction

Modern control systems of technical objects are characterized by the introduction of intelligent technologies in the control process. There are a large number of methods for the synthesis of fuzzy, neural network and neuro-fuzzy controllers. The trend towards the intellectualization of technical systems is associated with the broader capabilities of such controllers in processing the task signals, parrying disturbances and ensuring the best indicators of the quality of transients. In particular, fuzzy controllers endow the system with robust properties and help reduce overshoot and regulation time in the control process of technical objects.

The process of developing fuzzy controllers is in some way creative and is carried out with the involvement of experts who are well aware of the properties and behavior of a technical object. There are several problems that arise when creating fuzzy controllers. Firstly, there are difficulties in determining the type, number, and parameters of the membership functions of linguistic variables. Triangular membership functions are most commonly used because of the reduction in computational costs when determining degrees of membership. The number of terms in linguistic variables term-sets is recommended to choose in the range from 5 to 7. This is due to the complexity of the further development of the rule base by the expert. Indeed, if the fuzzy controller input linguistic variables will contain a term-set with 11 terms, then the full fuzzy rule base must contain 11 × 11 = 121 rules. It will be difficult for an expert to make such a rule base and not to be mistaken.

Secondly, the fuzzy rule base must satisfy the property of completeness. The expert needs to carefully draw up a rule base so that there are no duplicate rules, which will lead to its redundancy. At the same time, it is necessary to track that there are no rules in the database with the same antecedent, but different sequential, which leads to uncertainty. Incomplete rule bases can be used in the control of a technical object in the case of complete confidence that there will not be a situation in which for the input signals of a fuzzy controller, there will be no rule in its base.

This paper discusses the method of synthesis of fuzzy controllers without the involvement of experts, based on measurements of input and control signals in the control system of a technical object. It is shown how to synthesize a fuzzy controller with higher control quality indicators using measurements of signals in a system with a classical controller. At the same time, the fuzzy rule base is formed automatically and reduced in case of its redundancy. The main advantage of the presented method is independence from the number of input and output controller signals and the power of linguistic variables term-sets. The parameters of the membership functions are determined automatically during the synthesis of the controller.

2 Literature Review

The interest of the world community to intellectual control technologies is constantly increasing. Consider the main publications related to the automation of fuzzy controllers synthesis process and determine the main directions of research in this area.

In [1], a method of control rules automatic generation for a fuzzy controller (FC) was proposed for solving classification problems on the basis of a statistical sample containing objects numerical attributes of certain classes. A distinctive feature of the method is the ability to generate the minimum number of rules needed to effectively solve the tasks. This is achieved by analyzing the importance of individual rules with the subsequent assignment to them of appropriate weights and combining with similar in meaning, already existing rules.

In [2], a method of the FC rule base generation based on a genetic algorithm (GA) was proposed. The statistical dataset used in the synthesis of a fuzzy controller is similar to that used in [1]. A distinctive feature of the method is the use of the integral fitness function for a genetic algorithm, which allows a comprehensive assessment of the FC parameters and the accuracy of its work. Compared to the results of [1], the number of fuzzy rules is reduced several times (3 vs 8) while simultaneously increasing the accuracy of work.

In [3], as in [2], GA was used for the synthesis of a fuzzy controller. A distinctive feature of the proposed method is the absence of the need to preliminarily determine the FC parameters by the user and the use of a modified data clustering algorithm.

In [4], a method of control rule base generation for a fuzzy controller based on cluster analysis and a genetic algorithm was proposed. A distinctive feature of the method is that it is possible to control the process of adjusting FC parameters in order to prevent the phenomenon of retraining.

[5] is close in its content to [2,3,4]. Its main difference lies in the used type of the genetic algorithm fitness function and the method of chromosome formation based on the FC parameters.

In [6], a method of the FC parameters optimizing was proposed, which allows reducing the number of applied control rules. Its main idea is to reduce the term-sets of FC linguistic variables (LV) to a simpler form (decrease in number) with the subsequent verification performed transformation efficiency. In the event that a new type of LV is more preferable a situation is possible when several rules become the same and can be combined into one.

In [7], a method of FC synthesis based on the classical controllers working results such as PID, PI, PD, etc. was proposed. The idea of the method is to create a training sample of the input-output type of the classical controller and use it to train the Takagi-Sugeno fuzzy model. The proposed method involves human participation in the term-sets forming process of FC LV.

In [8], the proposed GA allows you to automatically create a base of FC control rules. The main difference of the method from analogs [3,4,5,6, 11] is the use of a special metric characterizing the degree of inconsistency of the control rules. The use of this metric as one of the evaluation function components of the generated solutions makes the final result more optimal.

In [9], a method of FC control rules number optimizing is presented. Its main idea is the identification and subsequent unification of conflicting rules, i.e. having the same parts conditions and different conclusions. The method does not improve the efficiency of the FC in any way and this is its main drawback.

In [10], a method for solving the problem of synthesizing the fuzzy controller rule base with its subsequent analysis and optimization based on GA is presented. The method differs from the previously considered using two ways of encoding FC parameters and, accordingly, the structure of the resulting chromosomes. The way of correction for conflicting rules used in the method is similar to that described in [9] and has similar disadvantages.

In [12], an automatic synthesis method of a fuzzy controller parameters based on a genetic algorithm is presented. A distinctive feature of the method lies in the evaluation function of the generated solutions, which consists of two parts. The first characterizes the degree of model error and is calculated as the difference between the desired and actual values. This makes it necessary to have a priori information about the desired quality of FC work, expressed as a specific numerical value. The second part is designed to control the tuning term-sets process of LV, making it more orderly.

In [13], a method of search and removing incorrect control rules of a fuzzy controller is presented. The idea of the method lies in the fact that each rule is assigned a certain weight, which determines the degree of its fallacy (inconsistency). When analyzing the base of control rules, the specified weight is adjusted. When it reaches a certain threshold, the rules are removed.

In [14], a method of reducing the number of fuzzy controller control rules was proposed. The principle of removing conflicting rules is similar to that stated in [13]. Also, the method is able to detect and combine control rules similar to each other.

In [15], a method of the FC automated synthesis from a numerical data set was proposed. A distinctive feature of the method is the ability to find a stable balance between accuracy, correctness, number and logical transparency of the generated control rules. As in [13, 14], the optimization of the FC rules base is carried out on the basis of the value of a special weighting coefficient, called the redundancy index, which characterizes the measure of difference between the rules from each other, as well as their effect on the final result.

As can be seen from the review of the articles, there are several automatic synthesis areas of fuzzy controllers that are associated with the use of genetic algorithms, clustering methods and their hybridization. The use of genetic algorithms allows to obtain good results in the synthesis of fuzzy controllers, but using this approach to supplement and expand already existing rule bases in the operation real mode of the control system, as well as supplementing the existing input samples is difficult. In addition, when changing the parameters of the membership functions, correction of fuzzy controller synthesis algorithms may be required.

In contrast to genetic algorithms, the use of clustering methods allows obtaining results for different source data and when changing the parameters of linguistic variables. Modern clustering methods allow to form clusters according on statistical data, regardless of a given number of clusters, or even define them yourself. It should also be noted the high speed of fuzzy controllers automatic synthesis methods using clustering methods.

3 The Proposed Method

This paper uses the results obtained by the authors as a result of research on the development of the theoretical foundations and methods for automatically setting the parameters of intelligent control systems for technical objects with a priori uncertainty [16,17,18]. Consider the implementation stages of the proposed method for the fuzzy controllers synthesis, the sequence of which is shown in Fig. 1.

Fig. 1.
figure 1

Stages of the fuzzy controllers synthesis method

Obtaining source data of input and output control signals in a system with a classic controller. These data can either be removed from the real object in the process of its operation, or to develop a mathematical model of the control system and get them in the simulation process. In this paper, studies were performed using a mathematical model of a control system developed in the MatLab Simulink environment. The simulation scheme is shown in Fig. 2.

Fig. 2.
figure 2

Control system simulation scheme

The simulation scheme contains two identical control objects, one of which is controlled by a classic controller, and the second – a fuzzy controller. The input of the system receives a setting effect. The input and output data of the classical controller during the simulation are written to the DataBase.mat file.

Clusters formation and membership functions parameters determination for the linguistic variable. As a result of stage 1, data series Rd for the input and output signals of the classical controller have been obtained. For each data series, a linguistic variable Lv is introduced, which is characterized by the set:

$$ Lv = \left\langle {N,T,X} \right\rangle , $$
(1)

where N is a name of linguistic variable; \( {\text{T}} = \left\{ {\text{Ti}} \right\}\;\left( {{\text{i}} = \left\{ {1,2, \ldots ,{\text{m}}} \right\}} \right) \) is a term-set of linguistic variable; X is a domain of elements from T (base set).

The considered method of fuzzy controller synthesis does not involve experts, so the input linguistic variables will automatically name as Inp1, Inp2, …, InpM, and the output as Out1, Out2, …OutK according to the number of data series.

The term-set of a linguistic variable is also automatically defined as T = {“1”, “2”, …, “m”}, in accordance with a given terms number.

A universal set is determined from a data series, for example, for the InpI input linguistic variable, the universal set is:

$$ X = \left[ {\hbox{min} \left( {R_{d} \left( {\text{InpI}} \right)} \right),\hbox{max} \left( {R_{d} \left( {\text{inpI}} \right)} \right)} \right] = \left[ {x_{iMin} ,x_{iMax} } \right]. $$
(2)

Let determine the values of the linguistic variable N from the term-set T using fuzzy variables Nv:

$$ Nv = \left\langle {T_{i} ,X,\mu_{i} } \right\rangle , $$
(3)

where Ti is a name of fuzzy variable; μi is a fuzzy set.

In this paper will consider the triangular membership functions described by the formula [19]:

$$ \mu \left( {x,a,b,d} \right) = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {if\;x \le a;} \hfill \\ {\frac{x - a}{d - a},} \hfill & {if\,a < x \le d;} \hfill \\ {\frac{b - x}{b - d},} \hfill & {if\,d < x \le b;} \hfill \\ {0,} \hfill & {if\,x > b.} \hfill \\ \end{array} } \right. $$
(4)

As can be seen from (4), require the definition of parameters a, b, d for each membership function μ. If i = 1, a = c, and if i = m, b = d and if the intersection point of the neighboring membership functions at μ = 0,5, then the term-set T will have the form shown in Fig. 3.

Fig. 3.
figure 3

Term-set T

It is required to match the data from Rd with the elements of the term-set T. To do this, select the cluster cj ∈ C in the universal set X. Let the number of clusters be determined by the number of terms in the term-set of the linguistic variable. Then the cluster size dc can be determined by the formula:

$$ d_{c} = \frac{{x_{iMax} - x_{iMin} }}{m - 1}, $$
(5)

and the cluster intervals by the formula:

$$ \begin{array}{*{20}l} {c_{1} = \left[ {x_{iMin} ,\;\;x_{iMin} + d_{c} /2} \right),} \hfill \\ {c_{j} = \left[ {\hbox{max} \left( {c_{j - 1} } \right),\hbox{max} \left( {c_{j - 1} } \right) + d_{c} } \right),\;\left( {j = 2,3, \ldots m - 1} \right),} \hfill \\ {c_{m} = \left[ {\hbox{max} \left( {c_{j - 1} } \right),\hbox{max} \left( {c_{j - 1} } \right) + d_{c} /2} \right].} \hfill \\ \end{array} $$
(6)

Knowing the clusters intervals it is not difficult to determine the centers of clusters cd and the a, b, d parameters of the membership functions:

$$ \begin{array}{*{20}l} {c_{d1} = \hbox{min} \left( {c_{1} } \right),\;\;a_{1} = \hbox{min} \left( {c_{1} } \right),\;\;b_{1} = \hbox{min} \left( {c_{1} } \right),\;\;d_{1} = c_{d1} ,} \hfill \\ {c_{dj} = \frac{{\hbox{max} \left( {c_{j} } \right) - \hbox{min} \left( {c_{j} } \right)}}{2},\;\;a_{j} = c_{{d\left( {j - 1} \right)}} ,\;\;b_{j} = c_{dj} ,\;\;d_{j} = c_{{d\left( {j + 1} \right)}} ,\;\;j = 2,3, \ldots ,m - 1,} \hfill \\ {c_{dm} = \hbox{max} \left( {c_{m} } \right),\;\;a_{m} = c_{{d\left( {m - 1} \right)}} ,\;\;b_{m} = c_{dm} ,\;\;d_{m} = c_{dm} .} \hfill \\ \end{array} $$
(7)

In the case of other membership functions, for example, trapezoidal [20] with

$$ \mu \left( {x,a,b,d,e} \right) = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {if\,x \le a;} \hfill \\ {\frac{x - a}{b - a},} \hfill & {if\,a < x \le b;} \hfill \\ {1,} \hfill & {if\,b < x \le d;} \hfill \\ {\frac{e - x}{e - d},} \hfill & {if\,d < x \le e;} \hfill \\ {0,} \hfill & {if\,e \le x.} \hfill \\ \end{array} } \right. $$
(8)

the calculated expressions will be:

$$ \begin{array}{*{20}l} {c_{dj} = \frac{{\hbox{max} \left( {c_{j} } \right) - \hbox{min} \left( {c_{j} } \right)}}{2},\;\;\forall j,} \hfill \\ {a_{1} = \hbox{min} \left( {c_{1} } \right),\;\;b_{1} = \hbox{min} \left( {c_{1} } \right),\;\;d_{1} = \hbox{max} \left( {c_{1} } \right),\;\;e_{1} = c_{d2} ,} \hfill \\ {a_{j} = c_{{d\left( {j - 1} \right)}} ,\;\;b_{j} = \hbox{min} \left( {c_{j} } \right),\;\;d_{j} = \hbox{max} \left( {c_{j} } \right),\;\;e_{j} = c_{{d\left( {j + 1} \right)}} ,} \hfill \\ {a_{m} = c_{{d\left( {m - 1} \right)}} ,\;\;b_{m} = \hbox{min} \left( {c_{m} } \right),\;\;d_{m} = \hbox{max} \left( {c_{m} } \right),\;\;e_{m} = \hbox{max} \left( {c_{m} } \right).} \hfill \\ \end{array} $$
(9)

For other types of membership functions, their parameters are determined according to the same principle.

Creating a rule base. After determining the cluster parameters and membership functions, the Rd analysis is performed in order to determine whether the signal values belong to a particular cluster. To do this, the cycles iterate over the values of the data series and the elements of the set C and determine whether the data falls into clusters, as shown in Fig. 4.

Fig. 4.
figure 4

Determining whether source data belongs to clusters

After all data series have been determined to belong to clusters, the formation of a rule base is performed in several stages.

At first the cluster tables of all input and output variables are combined into a single table, as presented in the Table 1.

Table 1. Combined cluster table

Then, the table is searched for identical rows, one of which is left, and the rest are deleted to eliminate duplication of rules.

Thus, at this stage, a rule base is formed. It should be borne in mind that she may be insufficient or excessive. An insufficient rule base may be due to the small dimension of the Rd source data series or with a large number of linguistic variables terms. The redundant rule base may be due to the presence of rules in the table, in which the antecedent is the same and the sequential is different. In this case, the rule base reduction will be required.

Rule base reduction. The reduction of the rule base is aimed at eliminating its redundancy due to the rules with the same antecedent but different sequential. Consider the reduction procedure by example. Let the controller with three input and one output signals in the table of rules have redundant rules presented in the Table 2.

Table 2. Redundant rules in the rule base

Find the cm consequents clusters centers of redundant rules. Looking for the arithmetic mean:

$$ s = \frac{{\sum\limits_{j = 1}^{p} {c_{mj} } }}{p}, $$
(10)

where p is the number of redundant rules with the same antecedent.

Then determine the belonging of s to the cluster from Cout and set its number to the consequent in one of the redundant rules, and delete the rest. It should be noted here that if there are two redundant rules and their consequents correspond to adjacent terms, then the use of expression (10) leads to uncertainty. For this case, it is necessary to enter an additional term with parameters into the output linguistic variable term-set (see Fig. 5):

Fig. 5.
figure 5

Combining redundant rules in a rule base

$$ a_{j} = c_{d(j - 1)} ,\;\;b_{j} = s,\;\;d_{j} = c_{d(j + 1)} , $$
(11)

where j − 1, j + 1 are cluster centers that form the consequent membership functions of redundant rules.

Performing this procedure for all sets of redundant rules obtain a reduced rule base.

4 Results

The study of the proposed synthesis method of fuzzy controllers was carried out in MatLab environment, in accordance with the scheme in Fig. 2. As a control object, a DC motor with a mathematical model in the form of a transfer function was chosen:

$$ W\left( s \right) = \frac{15.4}{{\left( {0.03s + 1} \right)\left( {0.2s + 1} \right)}}. $$
(12)

B The PI controller with the parameters KP = 0.221, KI = 1.1 was used as a traditional controller.

The signal given at the system input is shown in Fig. 6.

Fig. 6.
figure 6

Input signal for the control system

With its use, a data series from the PI controller was obtained, presented in Table 3.

Table 3. Source data

The study was performed for input linguistic variables with five terms and an output with nine terms. For each signal, linguistic variables were generated with the following parameters:

  • Lv1 = 〈“Inp1”, {“1”, “2”, “3”, “4”, “5”}, [−0.5, 0.8]⟩;

  • Lv2 = 〈“Inp2”, {“1”, “2”, “3”, “4”, “5”}, [0.0, 0.0597]⟩;

  • Lv3 = 〈“Out”, {“1”, “2”, “3”, “4”, “5”, “6”, “7”, ”8”, “9”}, [−0.0484, 0.1809]⟩;

The following cluster intervals are determined:

  • C1 = {[−0.5, −0.3375], [−0.3375, −0.0125], [−0.0125, 0.3125], [0.3125, 0.6375], [0.6375, 0.8]};

  • C2 = {[0, 0.0075], [0.0075 0.0224], [0.0224, 0.0373], [0.0373, 0.0522], [0.0522, 0.0597]};

  • C3 = {[−0.0484, −0.0340], [−0.0340, −0.0054], [−0.0054, 0.0233], [0.0233, 0.0519], [0.0519, 0.0806], [0.0806, 0.1093], [0.1093, 0.1379], [0.1379, 0.1666], [0.1666, 0.1809]}.

As a result of source data clustering, a rule base was compiled, which is presented in Table 4.

Table 4. Rule base

The last column of Table 4 lists four groups of redundant rules, therefore, the rule base requires reduction. As a result of the reduction procedure described above, a reduced rule base is obtained, presented in the Table 5.

Table 5. Reduced rule base

As you can see, the resulting rule base does not contain redundant rules. It should be noted that it is incomplete, as it must contain 25 rules. Based on the obtained data, the FIS structure is generated and opened in the Fuzzy Logic Toolbox of MatLab environment, the parameters of which are shown in Fig. 7.

Fig. 7.
figure 7

Parameters of the generated fuzzy controller

As can be seen from the results, the automatic generation of a fuzzy controller was successful. The generated structure was connected in the simulation circuit (see Fig. 2) and the whole system was simulated. The simulation results in comparison of fuzzy and PI-controller are presented in Fig. 8.

Fig. 8.
figure 8

Simulation results

5 Discussion

The simulation results show that in the case of the controller synthesis with a non-reduced rule base, the transients occur with overshoot, and in the third stage, with an input effect of 0.5, they are unsatisfactory. After reduction, the rule base was reduced from 20 to 12 rules and two additional terms 5* and 7* were added (see Table 5) in the term-set of the output variable to eliminate uncertainty. After reduction, the synthesized fuzzy controller provides a transition process without overshoot and with less control time compared to the classical controller.

The authors’ experiments showed a slight improvement in the control quality indicators with an increase in the number of terms in linguistic variables term-sets. In addition, with an increase in the number of terms, situations may arise where some clusters do not contain source data and are empty. That is, the membership functions based on the parameters of empty clusters will not get into the rule base a priori. Experiments with large samples of the initial data (2000 and more values for each input signal) showed that the duration of a fuzzy controller synthesis in the MatLab environment is no more than 10 s. It should also be noted that the resulting rule base (see Table 5) is incomplete and, therefore, the fuzzy controller will function effectively with a step input signal of the type shown in Fig. 5.

To obtain a complete rule base, it is necessary to remove the source data from the control system with a more diverse input signal covering all possible combinations of membership functions in antecedents of fuzzy rules.

6 Conclusion

A distinctive feature of the developed method of fuzzy controller synthesis is the ability to automatically generate fuzzy rules on the measured data from the real control system or its model. In the synthesis process, the expert sets only the number of linguistic variables terms, and all other procedures are performed automatically.

The calculated clusters intervals are recalculated in the membership functions parameters of linguistic variables and allow to analyze the source data in order to identify membership in a particular cluster. The proposed procedure of reducing the rule base allows eliminating redundancy and inconsistency of data.

It should be noted the possible practical application of the proposed method of the fuzzy controllers synthesis:

  • using as a standalone tool to automatically create fuzzy controllers. At the same time, experts are involved only at the stage of specifying the type of membership functions and the number of terms in the term-sets.

  • using as a tool to help experts to create fuzzy rule bases. At the same time, experts have the opportunity to expand the generated rule base and supplement it with missing rules.

  • using as a tool for the research of technical systems control principles. Using the proposed approach, fuzzy controllers are synthesized based on the Mamdani algorithm, so the expert can study the generated rule base and deal with the peculiarities of the control system.

The advantage of the proposed approach is that it allows you to formalize and synthesize fuzzy controllers on the basis of input signals that are difficult to formalize for experts. For example, experts can easily synthesize fuzzy controllers on the basis of error signals and its derivative, but the error integral is hardly formalized with the help of expert knowledge.

Future research by the authors is aimed at developing an algorithm for automatically determining the type and number of linguistic variables membership functions, as well as at studying clustering methods for clusters with unset boundary intervals.