{'fraction_non_alphanumeric': 0.031210513014910287, 'fraction_numerical': 0.007834217841799343, 'mean_word_length': 4.629445234708393, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Construction and Analysis of Adaptive Fuzzy Linear Quadratic Regulator

The paper proposes a formulation and solution of the LQR control problem based on adaptive fuzzy logic. The designs of regulators are considered. The results of analysis of the quality of transients in control systems with adaptive fuzzy LQR controllers are presented. It is shown that the proposed adaptive fuzzy LQR controller provides a shorter transition time and rise time compared to traditional LQR controllers.


Introduction
Due to the active improvement of technology and software of various computer systems, there are many automatic control systems (ACS), complexes of devices designed to change one or more control parameters of the object in order to establish the required mode of operation. This made it possible to perform automatically what was previously performed manually by a person. Currently, the theory of automatic control has begun to pay close attention to linear-quadratic controllers (LQR, Linear Quadratic controller) [1], fuzzy logic controllers (FLC, Fuzzy Logic Controller) [2]. No less attention is drawn to combined controllers, which include fuzzy logic controllers or fuzzy controllers. In this paper, we propose a formulation and solution of the LQR control problem based on adaptive fuzzy logic. The designs of regulators are considered. The results of analysis of the quality of transients in control systems with adaptive fuzzy LQR controllers are presented.

Statement of the LQR control problem and its classical solution
The classical LQR controller is based on the method of solving the matrix Riccati equation. Let there be a linear continuous object that can be described by a vector-matrix equation of the following form [1]: then in the equation y(t), the matrix A is the system matrix, B is the input matrix, C is the control matrix, and D is the end-to-end matrix. An example of a classic LQR controller implemented in the MATLAB-Simulink software environment is shown in figure 1 [3]. The optimality criterion for LQR control is the expression where Q and R are symmetric positive semidefinite matrices using the state vector x and the input vector u, respectively. In this case, LQR is an algorithm that minimizes the optimality criterion (3) in the presence of an equality-type constraint the object model (2).
To obtain a matrix of optimal feedback coefficients it is necessary to solve the Riccati matrix equation that is, to determine the optimal value of S* of a square positive definite symmetric matrix S. Then the optimal control can be set as follows:

Selecting a control object
As a control object, a training stand "Thermal object" was selected for research and study of heat exchange processes [4]. The main purpose of control in the training stand is to maintain the set temperature in the control object. It should be noted that in the considered thermal object, two disturbing effects can be distinguishedchanges in the power of the heating element and the fan speed.

Conducting an active experiment
To determine the transfer function of the object and further calculate the LQR coefficients of the controller, an active experiment should be conducted, the main idea of which is to step-change the power of the heating lamp in the training stand "Thermal object" from 0 to 100% and measure the temperature changing over time (acceleration curve) at the initial temperature in the thermal object equal to 24.63°C and the temperature at the last step of measurement of the active experiment equal to 58.24°C. The transfer function calculated by the Simoyu area method [5] according to data using the program from the book [5], has the form

Description and implementation of the LQR controller in MATLAB-Simulink
Let's build the LQR controller scheme in MATLAB (Fig. 2), containing the object (State-Space) described by the system of equations in the state space, and the traditional LQR controller. Use program to find the coefficient K [3]. When applying a stepwise disturbance and running the control model in the Scope window in Fig. 3, we get a solid line graph of the transition process of the LQR controller with the state space object.

Description and implementation of adaptive fuzzy LQR controller in MATLAB-Simulink
Let's start building an adaptive fuzzy LQR controller. Let's start with a brief description of the fuzzy controller used, shown in figure 4. Fuzzy discrete controller has two inputs: the control error e(k) and its change de(k) = e(k) − e(k − 1) and one output -control u(k) at time points kdt, k = 1, 2, ..., N, where dt is the sampling step [6].
where E θ , dE θ , dU θ are fuzzy sets that have term sets Te, Tde, Tdu with elements that characterize the values of the corresponding variables ê, dê, и dû. The output defazzyfication operation Def converts the fuzzy output U to a normalized value û  [L, −L], L= 1, 2, which is multiplied by the coefficient Kdu turns into a real u.
In this paper, we used gauss2mf type membership functions (MF). Figure 5 shows the scheme of an adaptive fuzzy LQR controller consisting of a subsystem with fuzzy logic Fuzzy System and adaptive -Adaptive System. For further comparisons, add the traditional LQR controller to the adaptive fuzzy LQR controller scheme (Fig. 6).  Figure 6. Scheme of adaptive fuzzy LQR controller with traditional LQR controller.
Let's open the first subsystem ( Fig. 7) with fuzzy logic Fuzzy System, which consists of Gain blocks with coefficients Ke = 1, Kde = 1, Ki = 1, fuzzy Logic Controller with Ruleviewer block containing the update parameter of the block Refresh rate = 10 s and the main configuration of fuzzy logic parameters FIS structure -Fuzzy3. It is worth noting that the Gain block with the Kdu coefficient can be changed as follows: the higher the coefficient value, the shorter the transient processor time of the adaptive fuzzy controller. In this case, a value equal to 5 is selected, since it shows the best result of the speed of the controller response. In the FIS Editor Untitled window of the Fuzzy Logic Controller with Ruleviewer block, use the Edit, Rules command to set the rules, as shown in Fig. 8. It is worth noting that for such a large number of rules, it is necessary to use sufficiently productive computing resources of a personal computer. Let's open the second subsystem (Fig. 9) of the Adaptive System, which consists of the Product3 multiplier block and the Gain coefficient K for calculating the LQR parameters of the controller.  Next, configure the State-Space block by setting variables A and B in the Parameters field of the Block Parameters: State-Space window, corresponding to the values of the system matrix and the input matrix. For the control matrix C, enter the value eye (1). This is important for the calculation in the Program 1. In the field of the end-to-end matrix D, enter the value [0], respectively (Fig. 11).   In the third experiment, set the coefficient Kdu = 5. Run the Run simulation and open the oscilloscope window (Fig. 14). In the fourth experiment, set the coefficient Kdu = 10. Run the Run simulation and open the oscilloscope window (Fig. 15).

Conclusion
The paper proposes the formulation and solution of the LQR problem of process control based on adaptive fuzzy logic. Designs and layout schemes of adaptive fuzzy LQR controllers are considered. The results of the analysis of the quality assessment of transients of the proposed regulators in control systems are presented. Based on the results obtained (table 1), it can be seen that an adaptive fuzzy LQR controller with a gain of Kdu = 10 provides a short transition time and rise time. It follows that when switching from a simulation model to a real system for automatic control of the temperature of a thermal object, it is advisable to use this type of controller, since it has the shortest response time compared to traditional controllers.