# Intelligent Systems Applied to the Control of an Industrial Mixer

Marcio Mendonça, Douglas Matsumoto, Lucia R. Arruda, Elpinik I.

Papageorgiou

► To cite this version:

Marcio Mendonça, Douglas Matsumoto, Lucia R. Arruda, Elpinik I. Papageorgiou. Intelligent Systems Applied to the Control of an Industrial Mixer. 9th Artificial Intelligence Applications and Innovations (AIAI), Sep 2013, Paphos, Greece. pp.537-546, 10.1007/978-3-642-41142-7_54. hal-01459645

HAL Id: hal-01459645

https://inria.hal.science/hal-01459645

Submitted on 7 Feb 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Intelligent Systems Applied to the Control of an
Industrial Mixer

Marcio Mendonça¹, Douglas Mastumoto¹, Lucia V. R. Arruda², Elpinik Papageorgiou³

¹Parana Federal Technological University, Department of Electrical Engineering, Cornélio Procópio, Brazil

mendonca@utfpr.edu.br, douglas.matsumoto@gmail.com

²Parana Federal Technological University, CPGEI, Curitiba, Brazil

lvrarruda@utfpr.edu.br

³Technological Education Institute of Lamia, Department of Informatics and Computer Technology, Lamia, Greece

epapageorgiou@teilam.gr

**Abstract.** This paper presents the application of intelligent techniques to control an industrial mixer. Control design is based on hebbian evolution of fuzzy cognitive maps. In this context, this paper develops a dynamical fuzzy cognitive map (D-FCM) based on Hebbian Learning algorithms. Two strategies to update FCM weights are derived. Finally, the D-FCM is used to control an industrial mixer. Simulation results of this control are presented. Additionally, results are provided extending some of the algorithms into the Arduino platform in order to acknowledge the performance of the codes reported in this paper.

**Keywords:** fuzzy cognitive maps, hebbian learning, Arduino platform, process control, fuzzy logic.

# 1 Introduction

Artificial Intelligence (AI) has applications in various areas of knowledge, such as mathematical biology, neuroscience, computer science and others. The research area of intelligent computational systems aims to develop methods that try to mimic or approach the capabilities of humans to solve problems. These news methods are looking for emulate human's abilities to cope with very complex processes, based on inaccurate and/or approximated information. However, this information can be obtained from the expert's knowledge and/or operational data or behavior of an industrial system [1].

In this context, Fuzzy Cognitive Map (FCM) is a tool for modeling the human knowledge. It can be obtained through linguistic terms, inherent to fuzzy systems, but with a structure similar to the Neural Networks (NN), which facilitates data processing, and has capabilities for training and adaptation. FCM is a technique based on the knowledge that inherits characteristics of Cognitive Maps and Artificial Neural Networks [2], [3], [4], with applications in different areas of knowledge [5], [6], [7], [8], [9]. Besides the advantages and characteristics inherited from these primary tech-
niques, FCM was originally proposed as a tool to build models or cognitive maps in various fields of knowledge. It makes the tool easier to abstract the information necessary for modeling complex systems, which are similar in the construction to the human reasoning. Thus, FCM aggregates benefits of the acquisition, processing and adaptability from data and information system to be modeled, with a capacity for intelligent decision making due to its heuristic nature. However, FCM has some limitations, especially in time modeling, restricting for applications where the causes and effects occur simultaneously.

In order to circumvent these drawbacks, dynamical fuzzy cognitive maps (D-FCM), can be developed which have the capability to model and manage behaviors of non-linear time-dependent system and often in real time. Examples of different D-FCMs can be found in the recent literature, as examples, we can cite [10], [11], [12], [13].

Specifically, the work of Mendonça and collaborators [10] presents a type of D-FCM, which aggregates the occurrence of events and other facilities that makes appropriate this type of cognitive map, for the development of intelligent control and automation in an industrial environment.

In this paper, we use the same D-FCM proposes in [10] to control an industrial mixing tank. Different from [10], we use a hebbian algorithm to dynamically adapt the D-FCM weights. In order to validate our D-FCM controller, we compared its performance with a fuzzy logic controller. This comparison is carried out with simulated data. Moreover, to show the control portability, we embedded the D-FCM controller into a low cost platform based on Arduino.

## 2 Development

To demonstrate the evolution of the proposal technique (D-FCM) we will use a case study well known in the literature as seen in [3], [14] and [15] to test level controllers. This case was selected to illustrate the need for refinement of a model based on FCM built exclusively with knowledge. The process shown in Figure 1 consists of a tank with two inlet valves for different liquids, a mixer, an outlet valve for removal of liquid produced by mixing and density meter that measures the quality of the produced liquid.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Mixer Tank (Source: adapted from Stylios, Groumpos, Georgopoulos, 1999)</figcaption></figure>
Valves (V₁) and (V₂) insert two different liquids in the tank. During the reaction of the two liquids, a new liquid characterized by its density value is produced. At this time the valve (V₃) empties the tank in accordance with a campaign output flow, but the liquid mixture should be in the specified levels.

Although relatively simple, this process is a TITO (two inputs two outputs) type with coupled variables. To establish the quality of the control system of the produced fluid, a weighting machine placed in the tank measures the (specific gravity) produced liquid.

When the value of the measured variable G (liquid mass) reaches the range of values between the maximum and minimum [Gmin, Gmax] specified, the desired mixed liquid is ready. The removal of liquid is only possible when the volume (V) is in a specified range between the values [Vmin and Vmax]. The control consists to keep these two variables in their operating ranges, as,

$$V_{\min} < V < V_{\max} \qquad (1)$$

and

$$G_{\min} < G < G_{\max}. \qquad (2)$$

In this study we tried to limit these values from 800 to 850 [mg] for the mass and 850 to 900 [ml] for the volume. According to Papageorgiou et al. [16], through the observation and analysis of operation of the process is possible for experts to define a list of key concepts related to physical quantities involved. The concepts and cognitive model is based on a known FCM model [16], having the following concepts and structure:

* Concept 1 - State of the valve 1 (closed, open or partially open).

* Concept 2 - State of the valve 2 (closed, open or partially open).

* Concept 3 - State of the valve 3 (closed, open or partially open).

* Concept 4 - quantity of fluid (volume) in the tank, which depends on the operational state of the valves V1, V2 and V3.

* Concept 5 - value measured by the G sensor for the density of the liquid.

Considering the initial proposed evolution for FCM we will use a D-FCM to control the mixer which should maintain levels of volume and mass within specified limits.

The process model uses the mass conservation principle to derive a set differential equations representing the process used to test the D-FCM controller. As a result the tank volume is the volume over the initial input flow of the intake valves V1 and V2 minus the outflow valve V3. Similarly, the mass of the tank follows the same principle as shown below. The values used for m₁ and m₂ were 1.0 and 0.9, respectively.

$$V_{\text{tank}} = V_i + V_1 + V_2 - V_3 \qquad (3)$$

$$Weight_{\text{tank}} = M_i + (V_1 m_{e1}) + (V_2 m_{e2}) - M_{\text{out}} \qquad (4)$$
The development of the D-FCM is accomplished through two distinct stages. First the D-FCM is developed as a classic FCM where concepts and causal relationships are identified. The concepts can be variables and/or control actions, as already mentioned. However, the heuristic is related to the control condition of volume or weight of the mixture increase, where the inlet valves are closed, thus making it possible to assign inverse causal relationship between the concepts of levels and outlet valves. The output valve defines a positive relationship, when the output flow increases, according to a desired campaign. The flow of the intake valves also increases proportionally. The initial setting is done by using an algorithm based on heuristic optimization method of Simulated Annealing [17], in which an initial solution is cast as an initial guess and then solutions with a certain degree of randomness is tested systematically, until the system get the desired response. The figure 2 shows the schematic graph of a D-FCM controller.

<figure><img src="image_3.png" /><figcaption>Fig. 2. D-FCM Controller</figcaption></figure>

The second stage of development of the D-FCM is responsible for tuning or refinement of the model for dynamic response of the controller. In this case, when a change of output set-point in the campaign occurs, the weights of the causal relationships are tuned. In this paper two options are showed. First, the switching of the causal relationships in different operating points (set-points). It is shown in Table 1 and require different settings offline. One classic genetic algorithm used for tune off-line with 20 individuals, simple crossing and 1% of mutation, however obtained results similar to the method cited. The second option is online and is in accordance with equations 6-11. These equations are based on Hebb learning that increments or decrements the causal relations in accordance with changes in their associated concepts. To perform this function a new kind of concept and relations were included in the cognitive model. The relation selection assigns rules event-driven, which in this case was the change of set-point, levels of volume and weight of the liquid mixture.

The D-FCM uses the concept of selection for switching the set of causal relations according to the basic rules of relation selection. D-FCM works similarly to a DT-FCM (Decision Tree - FCM) [5], in another way, the D-FCM resembles a hybrid tool between a FCM and a temporal cyclic state machine, for example the work of
Acampora and Loia [18], and switched by triggering events. The results of the weight of the causal relations by experts through observation of the dynamic behavior of the system by changing the cause and effect of causal relationships are shown in Table 1.

<table><caption>**Table 1.** Casual relationship weights</caption><thead><tr><th>State/Rules (D-FCM)</th><th>W13</th><th>W14</th><th>W23</th><th>W24</th><th>W53</th><th>W54</th></tr></thead><tbody><tr><td>Initial value</td><td>-0.35</td><td>-0.40</td><td>-0.35</td><td>-0.40;</td><td>0.00</td><td>0.00</td></tr><tr><td>Rule 1<br>(Weight&gt;850 mg)</td><td>-0.65</td><td>-0.65</td><td>-0.65</td><td>-0.65</td><td>0.10</td><td>0.10</td></tr><tr><td>Rule 2<br>(Weight&lt;840 mg)</td><td>-0.35</td><td>-0.40</td><td>-0.35</td><td>-0.40</td><td>0.20</td><td>0.20</td></tr><tr><td>Rule 3<br>(Weight&lt;820 mg)</td><td>-0.35</td><td>-0.45</td><td>-0.35</td><td>-0.45</td><td>0.68</td><td>0.68</td></tr></tbody></table>

In order to establish a correlation and a future comparison between techniques of intelligent systems, a fuzzy controller was also developed. The fuzzy rule base implements weights assignment using the same heuristic control strategy.

As a result, both controllers fuzzy and D-FCM can be run under equal conditions supporting performance comparisons. As an example, we can mention some rules extracted from rule base established by experts:

If VOLUME is HIGH, then V1 is LOW, V2 is LOW;
If VOLUME is MEDIAN, then V1 is MEDIAN, V2 is MEDIAN;
If WEIGHT is LOW, then V1 is HIGH, V2 is HIGH;

In order to dynamically adapt the D-FCM weights we used the hebbian learning algorithm for FCM that is an adaptation of the classic hebbian method [2]. Different proposals and variations of this method applied in tuning or in learning for FCM are known in the literature [12]. In this paper, the method is used to update the intensity of causal relationships in a deterministic way according to the variation or error in the intensity of the concept or input variable. Specifically, the application of Hebb learning provides control actions as follows: if the weight or volume of the liquid mix increases, the intake valves have a causal relationship negatively intensified and tend to close more quickly. Conversely, if the volume or weight mixture decreases, the intake valves have a causal relationship positively intensified. The mathematical equation is presented in (5).

$$W_i(k) = W_{ij}(k-1) \pm \gamma \Delta A_i \quad (5)$$

$\Delta A_i$ is the concept variation resulting from causal relationship, and it is given by $\Delta A_i = A_i(k) - A_i(k-1)$, $\gamma$ is the learning rate at iteration k.

Causal relationships that have negative causality have negative sign similarly to positive causal relationships. Equations 6-11 show the implementation of the proposal.

$$W_{51} = W_{51}(k-1) - 0.7\Delta A_i \times k_p \quad (6)$$
$$W_{52} = W_{52}(k-1) - 0.7\Delta A_i \times k_p \quad (7)$$

$$W_{41} = W_{41}(k-1) - 0.7\Delta A_i \times k_p \quad (8)$$

$$W_{42} = W_{42}(k-1) - 0.7\Delta A_i \times k_p \quad (9)$$

$$W_{31} = W_{31}(k-1) + 0.1\Delta A_i \times k_p \quad (10)$$

$$W_{32} = W_{32}(k-1) + 0.1\Delta A_i \times k_p \quad (11)$$

Two variations of the Hebbian learning will be presented. In the first case, a global error is assumed as the sum of the variation only of the volume concept. In the second case, the variation of volume, weight and output valve affect the causal relationships (fig. 2), for example, $W_{51}$ and $W_{52}$ are tuned according to the weight variation $\Delta A_i=V_3(k)-V_3(k-1)$. All values of forgetting factor $\gamma$ were empirical. Finally, so that variations of the weights had the dynamics needed, any errors or variations of A were multiplied by a factor 20 concerning the gain value.

## 3 Experimental Results

The results of D-FCM by Hebbian learning with only the volume parameter variation are shown in Fig. 3, which shows the behavior of the controlled variables within the predetermined range for the volume and the weight of the mixture. It is noteworthy that the controller keeps the variables in the control range and pursues a trajectory according to a campaign where output flow is also predetermined. In this initial experiment, a campaign with a sequence of values ranging from 7, 5 and 10 ml/min can be seen as a set-point output flow (outlet valve). Fig. 4 shows the evolution of the weights of the causal relationships during the process.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Inputs and outputs valves, Volume and weight (HL global variation).</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Fig. 4. Causal Relationships in the process (HL global variation).</figcaption></figure>

The fig. 5 shows the results of Hebbian learning algorithm for FCM considering the variations $\Delta A_i$ of the concepts concerning volume, weight and outlet valve, while in the fig. 6 is displayed the weights of the causal relationship in the process.

<figure><img src="image_6.png" /><figcaption>Fig. 5. - Inputs and outputs valves, Volume and weight (HL punctual variation)</figcaption></figure>
<figure><img src="image_7.png" /><figcaption>Fig. 6. Causal Relationships in the process (HL punctual variation).</figcaption></figure>

In order to extend the applicability of this work, the developed D-FCM controller is embedded into an Arduino platform which ensures the portability of the FCM generated code. Arduino is an open-source electronics prototyping platform which uses ATMega series microcontrollers.

<figure><img src="image_8.png" /><figcaption>Fig. 7. Cycle and image of the communication Matlab - Arduino</figcaption></figure>

The equations for level and weight are calculated by Matlab simulating the process. Through a Serial communication established with Arduino, Matlab sends the current values of Volume, Weight and output valve to Arduino that receives these data, calculates the values of the concept 1 (valve 1) and concept 2 (valve 2) and then returns these data to Matlab. After this, new values of Volume and Weight are recalculated.

Fig. 8 shows the results obtained with the Arduino platform providing data of the actuators Valve 1 and Valve 2 with Matlab performing data acquisition. The algorithm switches the sets of causal relations that operate similarly to a DT-FCM (decision tree - FCM), where the activation rules and weights are shown in Table 1.

Similarly, fig. 9 shows the results obtained with the Hebbian learning algorithm for FCM with the three parameters of $ΔA_i$.
<figure><img src="image_9.png" /><figcaption>Fig. 8. - Inputs and outputs valves, Volume and weight (DT, Arduino)</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 9. - Inputs and outputs valves, Volume and weight (HL, Arduino)</figcaption></figure>

## 4 Conclusions

Performing a comparison of the results, we see a decrease in the control range in the cases where there is variation in causal relationships by Hebbian learning algorithms. Figures 7 and 8 show results.

From the data obtained from Arduino by the variations of the D-FCM embedded in the platform, it is observed that the controlled variables are in well behaved ranges, which suggests that the D-FCM codes have low computational complexity due to the simplicity of mathematical processing compared with the classical fuzzy logic, for example. Thus, we can emphasize the portability and the possibility of developing D-FCM controllers on low cost platforms.

Future studies address a comparison with classical PID controllers, weighted Fuzzy controller or other intelligent controller. Finally, our work will be directed to the application of a real mixer controller into a real data environment.
5 References

1. Passino, M. K.; Yourkovich, S. Fuzzy control. Menlo Park: Addison-Wesley, 1997.

2. Kosko, B. Fuzzy cognitive maps. International Journal Man-Machine Studies, v. 24, n. 1, p.65-75, 1986.

3. Glykas M. Fuzzy Cognitive Maps: Advances in Theory, Methodologies, Tools and Appli-
cations. Springer-Velarg Berlin Heidelberg, 2010.

4. Kosko, B. Neural networks and fuzzy systems: a dynamical systems approach to machine
intelligence. New York: Prentice Hall, 1992.

5. Dickerson, J. A.; Kosko, B. Virtual Worlds as Fuzzy cognitive maps. Presence, v. 3, n. 2, p. 173-189, 1994.

6. Lee, K. C.; Lee, S. A cognitive map simulation approach to adjusting the design factors of the electronic commerce web sites. Expert Systems with Applications, v. 24, n. 1, p. 1-11, 2003.

7. Papageorgiou, E.; Stylios, C.; Groumpos, P. Novel for supporting medical decision mak-
ing of different data types based on Fuzzy Cognitive Map Framework. proceedings of the
29th annual international conference of the IEEE embs cité internationale, Lyon, France
August, p. 23-26, 2007.

8. Papageorgiou, E.; Stylios, C.; Groumpos, P. A. Combined Fuzzy cognitive map and decision trees model for medical decision making. Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology Society, v. 1, p. 6117-6120, 2006.

9. Huang, Y. C.; Wang, X. Z. Application of Fuzzy causal networks to waste water treatment plants. Chemical Engineering Science, v. 54, n. 13/14, p. 2731-2738, 1999.

10. Mendonça, M.; Angélico, B.; Arruda, L.V.R.; Neves, F. A dynamic fuzzy cognitive map applied to chemical process supervision. Engineering Applications of Artificial Intelligence, v. 26, p. 1199-1210, 2013.

11. Miao, Y.; Liu, Z. Q.; Siew, C. K.; Miao, C. Y. Transformation of cognitive maps. IEEE Transactions on Fuzzy Systems, v. 18, n. 1, p. 114-124, 2010.

12. Papageorgiou, E. Learning Algorithms for Fuzzy Cognitive Maps. IEEE Transactions on Systems and Cybernetics. Part C: Applications and Reviews, v. 42, p. 150-163. 2012.

13. Miao, Y.; Liu, Z. Q.; Siew, C. K.; Miao, C. Y. Dynamical cognitive network - an Exten-
sion of fuzzy cognitive. IEEE Trans. on Fuzzy Systems, Vol. 9, no. 5, pp. 760-770, 2001.

14. Axelrod, R. Structure of decision: the cognitive maps of political elites. New Jersey: Prince-ton University Press, 1976.

15. Stylios C. D.; Groumpos P. P.; Georgopoulos V. C. An Fuzzy Cognitive Maps Approach to Process Control Systems J. Advanced Computational Intelligence, n. 5, p. 1-9, 1999.

16. Papageorgiou, E. I.; Parsopoulos, K. E.; Stylios, C. S.; Groumpos, P. P.; Vrahatis, M. N. Fuzzy cognitive maps learning using particle swarm optimization. Journal of Intelligent Information Systems, v. 25, p. 95-121, 2005.

17. Ghazanfari, M.; Alizadeh, S.; Fathian, M.; Koulouriotis, D.E. Comparing simulated annealing and genetic algorithm in learning fcm. Applied Mathematics and Computation, p. 56-68, 2007.

18. Acampora, G.; Loia, V. On the Temporal Granularity in Fuzzy Cognitive Maps, IEEE Transactions on Fuzzy Systems, vol.19, no.6, p. 1040-1057, 2011.