# A Bilevel Optimization Approach for Tuning a Neuro-Fuzzy Controller
## 5 Experiments and Results
The disturbances are generated by agents that are external to the process or by failures in the system itself. They normally cannot be measured and are unknown. Figure 7 shows an upward and abrupt change in the reactor temperature at 5000 s, which is rejected by the proposed controller. In the simulation, it is interpreted as an external source described by a step function, which is added to the output of the system's transfer function. According to the process described in Figure 6, this increase in temperature may have originated, for instance, because the system was operating on a very hot day combined with a failure in the operation of the valve responsible for supplying water and steam, which opened for an instant to its maximum capacity. It \begin{table}
\begin{tabular}{c c} \hline
**Run** & **Optimization Function Values** \\ \hline
1 & 4824.6 \\
2 & 4949.8 \\
3 & 4785.3 \\
4 & 4918.3 \\
5 & 4877.5 \\
6 & 5081.2 \\
7 & 4804.4 \\
8 & 4878.1 \\
9 & 4799.0 \\
10 & 4961.8 \\ \hline Average & 4888.0 \\ \hline Standard deviation & 92.6 \\ \hline \end{tabular}
\end{table} 
Table 3: Objective function values using five membership functions. Figure 7: Dynamics of the reactor temperature using the NFC with the best parameters found in this work (configuration with five membership functions, NFC-5), as reported in [13] using seven membership functions (NFC-7), and as reported in [14] with a PID controller. could also be caused by more than one factor. Designing a controller that can respond to a disturbance is essential in optimizing the performance of production processes. Figure 8 presents a brief example of how the control signal exerted on the manipulated variable of the system can be interpreted. It shows the control signal produced by the proposed controller (NFC-5), which in turn generates the corresponding dynamic presented in Figure 7 along with the results from other proposals in the literature. It should be noted that this corresponds to the case study presented in [14], which entails the restrictions mentioned in that work. However, it allows us to clarify the inherent and important relationship of the control action with the elements and components of a real system. According to the control action, it should be noted that the stabilization of the system and its fast convergence occur due to the dynamic process of the system where the control action signal is divided into two parts. The first one refers to the heating of the reactor, in this case, governed by a control valve that allows the passage of water and steam to the tank jacket. The second part refers to a cooling process through a natural action of the system to dissipate heat due to its design characteristics or by a subsystem. For example, a cooling tower lowers the temperature of the service water for water supply to the reactor jacket through a valve alignment process, which initiates a reverse action in the control signal. The ability of a system to achieve the conditions found in a simulation will depend exclusively on the design characteristics of the system. However, this does not mean that the control actions cannot be achieved. It may even involve a process of reengineering or modifying the current process to optimize the industrial process. In the literature on automatic control theory, it is possible to find a wide variety of approaches and techniques aimed at solving theoretical problems with real-world applications. An approach that relies on human experience and can adapt over time to different operating conditions, considering the environment in which it is situated, could represent a desirable situation for its implementation.