Fuzzy controller synthesis algorithm with complete data on the object state

. The application of the classical control theory to nonlinear and linear objects control problems in some cases may not give e ﬀ ective results. Due to this, fuzzy controller synthesis methods for objects controlling have been developed based on fuzzy sets and fuzzy logic methods. A suggested method makes it possible to construct a fuzzy system without the help from human experts. The algorithm for this method consists of three steps: on step 1 the known input data ranges are determined and divided into fuzzy regions to form membership functions; on step 2 the data pairs are formed and then used to generate a fuzzy rules table; on step 3 the membership functions are scaled for speciﬁc values, so the fuzzy system works more correct. The method has shown it’s good performance in the underwater vehicle stabilization problem with complete data on the object state.

Abstract.The application of the classical control theory to nonlinear and linear objects control problems in some cases may not give effective results.Due to this, fuzzy controller synthesis methods for objects controlling have been developed based on fuzzy sets and fuzzy logic methods.A suggested method makes it possible to construct a fuzzy system without the help from human experts.The algorithm for this method consists of three steps: on step 1 the known input data ranges are determined and divided into fuzzy regions to form membership functions; on step 2 the data pairs are formed and then used to generate a fuzzy rules table; on step 3 the membership functions are scaled for specific values, so the fuzzy system works more correct.The method has shown it's good performance in the underwater vehicle stabilization problem with complete data on the object state.

Introductions
Fuzzy systems synthesis method consists in fuzzification of input and output data, formation of fuzzy rules table by human experts in the field of the problem being solved and its subsequent use, fuzzy data processing with the resulting fuzzy system and its defuzzification [1,2,7,8,11,12].
This paper is devoted to the solving of fuzzy controller synthesis problem with complete data on the object state in the stabilization of an underwater vehicle problem.The solution is based on the algorithm of the generating rules from the known numerical data method, which makes it possible to construct a set of fuzzy rules [3].

Statement of the problem
An underwater vehicle moving in a vertical plane at a constant longitudinal travel speed [4,5] is considered as a control object (see figure 1).
The position of the underwater vehicle is characterized by a state vector consisting of three coordinates x(t) = ω(t), ψ(t), δ(t) T .The control is carried out through one channel.
The task here is to find the control u(t, x) and its corresponding trajectories of motion x(t), that ensure the object bringing to a horizontal position for any initial conditions from a given set of initial states.
One of the possible solutions to this problem is to minimize the quadratic criterion The procedure of finding the controller is reduced to finding a positive definite solution to the algebraic Riccati equation [4].As a result, the coefficients of the controller K 1 , K 2 , K 3 are found.
Let's consider the problem solution using fuzzy logic: we have to synthesize a fuzzy controller with three input variables and one output variable ψ, δ, ω using the method of generating fuzzy rules based on known data.

The algorithm of generating fuzzy rules from known data method Step 1. Setting fuzzy variables and their fuzzy values
For each variable, we define the domain intervals in which its values will probably lie during the control system functioning.Each domain interval is then divided into N generally intersecting regions for input variables ω, ψ, δ and into M regions for the output variable u, and each region is assigned with a triangular or trapezoidal fuzzy membership function (figures 2(a)-(d)).The membership function determines the corresponding linguistic meaning [10]: P1 (Psy 1), . . ., PN (Psy N), D1 (Delta 1), . . ., DN (Delta N), O1 (Omega 1), . . ., ON (Omega N) for the input variables C1 (Control 1), . . ., CM (Control M) for the output variable.

Step 2. Generating fuzzy rules from given data pairs
To apply the generating fuzzy rules method, the known data must be represented as pairs, where the first element of the pair is the state vector, and the second is the value of con-  [3,6,9].The values corresponding to the vertices of the membership functions and determining the linguistic values of the coordinates are selected as possible values for each coordinate of the state vector.To form fuzzy rules, all possible combinations of these values are fed to the input of the fuzzy system, and the control value is calculated for each of these combinations.Then the values of the corresponding membership functions are found, and the largest of them is selected.The found highest value corresponds to a certain linguistic meaning of control.If the values of two neighboring membership functions are equal, if the corresponding membership functions lie to the left of zero, the value corresponding to the right membership function and the left one in the opposite case is selected.Thus, one linguistic rule is assigned to each data pair.
2.1.Forming data pairs 2.1.1.To generate data pairs, the values of the state vector variables corresponding to the vertices of the membership functions are taken and all possible combinations are composed.
2.1.2.The values of the control u corresponding to each combination are calculated.Thus, data pairs, where the first element of the pair is the state vector, and the second element of the pair is the control value u are formed.
2.1.3.The obtained values of the variables are written into separate ordered sets, where the ordinal numbers of the elements of the set correspond to the ordinal number of the data pairs obtained on step 2.1.2.

Computing the values of membership functions for each data pair
The calculation of the values of the membership functions is iterative.At each iteration: 2.2.1.The values of each membership function are calculated for each value of the state vector and control from the corresponding sets created on step 2.1, and then written into separate ordered sets.The values of the membership functions are calculated sequentially, in accordance with their ordinal numbers j.Writing to a set occurs in the same order.
2.2.2.The maximum value among the values of the control membership functions from the obtained set is calculated.Then the ordinal number of the membership function with the maximum value is written into the set to generate the rules.After that, the set with already calculated the membership functions values is cleared to write new values for the next iteration.

Forming the rule tables according to the principle: IF
The j numbers of linguistic values correspond to the ordinal numbers of the membership functions.When compiling the rules, the sets obtained on step 2.2 are used, where the ordinal numbers of the elements of each set coincide with the number of the rule.
Since there are usually lots of data pairs, and each data pair generates one rule, it is highly possible that there will be some conflicting rules, i.e., rules that have the same "if" part but a different "then" parts [3].One way to resolve this conflict is to assign a degree to each of the conflicting rules.In practice the additional information about the data pair utility is known, i.e., it is known which data pairs are very useful and generate advice rules and which data pairs are unlikely to be used for generating rules.In this case we can assign a weight coefficient to every conflicting data pair, representing our confidence in generated rule correctness.In this way, we'll get a fuzzy set, where every data pair belongs to this set with a chosen weight coefficient.Thus in case in case of conflict a rule that has a maximum degree is accepted, and the other ones are deleted.
Since there are three input variables, the rule table can be presented as a parallelepiped.For ease of use, it is convenient to present it in the form of flat sections sequence, i.e. the obtained linguistic rules are ordered in the form of a set of two-dimensional tables with fixed

Step 3. Scaling membership functions
After the table of linguistic rules is compiled, it is saved and remains unchanged for any combination of initial conditions belonging to the specified neighborhoods around the base values.However, the parameters of the membership functions constructed in step 1 of the algorithm must be scaled for specific values taken by the input and output variables during the operation of the system (figures 4(a)-(d)).The problem was solved numerically using an optimal linear controller and using a synthesized fuzzy controller (figure 5).The fuzzy inference system was implemented using FuzzyLogicToolbox in the MATLAB computer mathematics system, the "min" rule was used to find the intersection of the sets, the "max" rule was used for combining, the "min" rule was used for the implication, and the "centroid" method was used for defuzzification.