Sandro Gonzalez-Gonzalez, Luis Serpa-Andrade (2022). Development of a virtual assistant chatbot based on Artificial Intelligence to control and supervise a process of 4 tanks which are interconnected. In: Artificial Intelligence and Social Computing. AHFE Open Access, vol. 28, pp. 206–213. https://doi.org/10.54941/ahfe1001464
1 Research Group on Artificial Intelligence and Assistive Technologies– GIIATa, Universidad Politécnica Salesiana, Cuenca, Ecuador ↗
2 Research Group on Artificial Intelligence and Assistive Technologies– GIIATa Universidad Politécnica Salesiana, Cuenca, Ecuador; Research Group on Applied Embedded Hardware – GIHEA, Universidad Politécnica Salesiana Cuenca, Ecuador ↗
This article presents the gathering of works related to the usage of virtual assistants into the 4.0 industry in order to stablish the parameters and essential characteristics to define the creation of a ‘chatbot’ virtual assistant. This device should be applicable to a process of 4 tanks which are interconnected with a robust multivariable PID control with the aim of controlling and supervising this process using a mobile messaging application from a smartphone by sending key words in text messages which will be interpreted by the chatbot and this will be capable of acting depending on the message it receives; it can be either a consultation of the status of the process and the tanks which will be answered with a text message with the required information, or a command which will make it work starting or stopping the process. This system is proposed as a solution in the case of long-distance supervision and control during different processes. With this, an option to optimize the execution of actions such as security, speed, reliability of data, and resource maximization can be implemented, which leads to a better general performance of an industry
In recent decades there has been an accelerated evolution of technology and with it all the areas that demand an electronic system for its correct operation have more and more requirements in order to speed up and optimize time and quality in their service, attention and production (Romero, Casadevante and Montoro, 2020), (Martínez, 2021).
Faced with such technological progress, new tools arise, and they faci- litate the execution of several actions within a work environment. Among these, it stands out the Chatbot that is a computer program or also called
virtual assistant with which you can hold a conversation, obtain informa- tion, generate a request, per-form some type of action, and many other applications (Romero, Casadevante and Montoro, 2020), (Martínez, 2021), (Rivas, 2021).
Although in recent years the idea of a virtual assistant is being implemen- ted in several areas of daily life and work, it could make you think that it is a modern conception. Nonetheless, the concept of virtual assistant is not a recent invention since its origins are linked to psychology and more specifi- cally with ELIZA that was the first conversational bot or chatbot in history created by Joseph Weizenbaum in 1966. It is a bot that was designed to answer questions automatically pretending to be a psychotherapist (Rivas, 2021), (Garibay, 2020), (Vallejo, 2015). Since then, the idea of chatbot sea has been improving, this can be demonstrated thanks to the applications in which it is implemented and range from the most basic as solving doubts in customer service to more sophisticated applications such as sales, therapeutic assistants, medical assistants, language learning assistant, among other speci- fic applications (Garibay, 2020), (Vallejo, 2015), (García, 2018). It is worth mentioning some of the best performing virtual assistant: Amazon’s Alexa, launched in 2014, Cortana, the Windows assistant launched in 2015, Google Assistant from 2016 and Woebot, developed in 2017 by psychologist Alison Darcy that helps reduce symptoms of depression (Martinez, 2019), (Herrero, 2018).
RELATED WORKS In recent years, various companies have shown interest in developing proces- ses aimed at optimizing their production in several aspects, including the use of virtual assistants of various types. Therefore, this section presents a brief review of projects carried out in this area and their results.
In this context students of the Universidad Técnica del Norte (Ibarra), have developed the “implementación de un sistema de control automático con asi- stente virtual para el control de presión de un proceso de recirculación de líquido”„ which aims to implement an automatic control system to regulate the pressure of a liquid recirculation process, making use of a virtual assi- stant, which allows to receive, store and report through voice commands, the status of an industrial process in real time to increase the efficiency of the pro- cess. The students managed to implement a friendly interface that was able to inform and monitor the circulation of liquids by successfully completing the objectives they set (Benavides, 2017).
With the desire to explore the possibilities that open up when integrating a robotic arm for industrial use to the field of Artificial Intelligence, students of Universidad de la Salle Bajío, División de Ingenierías de la Campus Sala- manca, Mexico propose an intelligent virtual assistant that allows to redefine the interaction and communication capabilities to offer user solutions within any scenario in Industry 4.0. The process was carried out at the simulation level where it is concluded that the use of a virtual assistant can improve seve- ral of the aspects within the interaction that operators have with the industry, among which it is necessary to:
208 González-González and Serpa-Andrade
Improves communication and operator control over a process.
Create a fully interconnected collaborative and intelligent environment.
Emerging technologies are applied and integrated.
The in-process scalability option opens (Figueroa, Vázquez and Castro, 2020).
Focused on the use of a virtual assistant type Chatbot, students of the Master in Marketing in the city of Lima in the year of 2018 launched a busi- ness plan to determine the path of the development of a virtual sales assistant based on achatbot, which will allow to serve potential customers who need online attention for their purchases, seeking in this way to offer a more effe- ctive service and with greater speed. The analysis is carried out in the textile retail trade of Gamarra in Lima, where it is known that there are personnel dedicated to performing the functions that the chatbot can carry out, thus improving response time and grouping all its functions in the same chatbot, concluding that the investment is considerable but that it is amortized in a year in an average trade but that shows a high growth in sales for being able to reach more people in less time (Anampa, Door, Llamoja and Santa, 2018).
METHODOLOGY
In the present work, the management and supervision of the “System of four interconnected tanks with robust multivariable PID control” is proposed, which is a functional plant at the laboratory level that is available, in which through a chat-bot based on AI and implemented in a messaging system of free and free access, in this case TELEGRAM, the operator can make inquiries or take action on the aforementioned process.
The first stage of the project includes the creation of the chatbot in Tele- gram and its interaction in Node-Red, for which it is necessary to program the texts of the messages that will be received and the responses that will be sent by these means.
The second stage includes establishing the interaction between the chatbot and the process controlled by the programmable automaton, for which the Raspberry board is used as the interlocutor and making use of the Node-Red software implemented in it, both the actions of emission and reception of messages are programmed, as well as the actions of information requirement or control actions towards the PLC.
Finally, the system undergoes 4 types of verification tests, in which, the first with the system without operation consult on the status of the process, the second, with the system running and in a normal process consult the status of each of the tanks, the third which is the start-up and stop of the system, and finally the fourth which is to introduce disturbances in the system so that automatically an error message is received in the messaging application on the mobile in the system. These tests are carried out with the aim of validating its functionality and reliability to obtain data for analysis and conclusions.
According to the outline the project can by analyzed in stages, where the first corresponds to the operator of the process interacting with Tele- gram Messenger is a free messaging service over the internet, where
Development of a Virtual Assistant Chatbot 209
Figure 1: Outline of the project proposal.Figure 2: Outline of the programming.
making use of @BotFather which is an intuitive management bot has created the virtual assistant chatbot type, which is an automated text- type program capable of interacting naturally with a specific script and solving the user’s requirements (Anampa, Door, Llamoja and Santa, 2018), (Gonzalez and Sanchez, 2017).
The second stage includes the integration of the chatbot in Telegram with Node-RED that is a software that works as a broker or interlocutor betw- een an external software in this case Telegram with a hardware in this case a PLC S7-1200 of Siemens, this platform was chosen because it has a confi- gurable connection for the type of PLC that is going to be used, within the function block in Node-RED, the responses that the chatbot will use to inte- ract with the operator were programmed, considering the characteristics that the chatbot must accomplish to be functional (Muñoz, 2021).
As a third and last stage, the link is created between the PLC called also Programmable Automata and the plant to be supervised, that is why within the range of Programmable Automata the Siemens S7-1200 was chosen, since it has the laboratory for its use and has 2 analog inputs that will be useful to measure the levels of liquid in the tanks, in addition to digital inputs and outputs that will be useful for programming the start and stop of the process (Cortes, 2021).
210 González-González and Serpa-Andrade
Figure 3: Chatbot on Telegram.
RESULTS
The general objective of the project is that the chatbot system can be coupled to any type of process, in this case to the system of 4 interconnected tanks that is in normal operation and it does not use a Programmable Automata for its normal activity, for this the system has been adapted so that it has 2 types of start-up and stoppage, one manual that is the original and another in parallel through the digital outputs of the PLC, that is why the first test of consultation of operating states is to make a measurement of the state of these outputs that may or may not be activated according to the state of the process.
Accuracy of Measured Data It refers to how real are the data measured and sent with respect to the real level value of the tanks, it must be considered that the tanks have a capacitive type of sensor of 320mm in length inside the tank, with a voltage output of 0 to 5VDC, so when the tank does not contain liquid it is at the 0VDC output and with the tank to the maximum you have 5VDC.
For this, 10 tests were done at different levels of a single tank, since, the 4 tanks have the same operation, and the percentage measurement error was calculated.
The formula for measuring error: Vr −Vm
Equation reproduced from the original PDF.
∗100% (1)
Equation reproduced from the original PDF.
Vm = measured value It can be said that having an error average of 0.10% of 10 samples is an acceptable value for the type of system read, since it is quite accurate, this because the sensor output was coupled to the analog input of the PLC and making use of programming in the TIA Portal software the voltage value was scaled to the size of the tank and this value is read from Node-RED every 0.5 seconds.
Development of a Virtual Assistant Chatbot 211
Table 1. Accuracy of measured data.
Table available in the original PDF paper.
Attempt Value in the tank Value received on mobile Error (%) Reading and sending level
Table 2. Data of the execution time of an action in the PLC and response.
Table available in the original PDF paper.
Sending data from your mobile Execution of the action and sending of response Shipment Average response time (ms) 1 22.151 2 14.598 3 3.233 4 7.963 5 5.909 6 6.127 7 8.249 8 21.038 9 23.303 10 17.844 Average 13.042ms
Latency It refers to the speed with which a packet of information is delivered and recei- ved, the action is performed on the final recipient and a response is received on the mobile from which the request was made, in this case 10 tests of sen- ding data from a mobile phone to the PLC were made, in each test 4 packages of 64 Bytes are sent to the PLC address and what is recorded in the table is the average of those 4 shipments and corresponding receipt.
CONCLUSION
It can be concluded that the implementation of this virtual assistant to the plant of 4 interconnected tanks favors the operation of this in several aspects such as: The monitoring of the operation of the plant and the levels of liquid in the tanks from anywhere with internet connection and with the use of Telegram
212 González-González and Serpa-Andrade
since the chatbot created is public for any user of this messaging system that can have access to the bot of the plant.
Speed in the consultation of the functions in general of the plant, since the time recorded in which the data reaches the mobile application in on average 13.04ms, which for human perception is almost immediate, turning the chatbot into a tool that saves the operator time by preventing it from moving to the site of the operation.
Veracity in the data, since the chatbot will emit the value read by the sensor removing room for doubt that according to the results there is a +-10.0% error in the value of the measured data.
Receiving an error notification on the mobile phone of an event that occur- red in the plant without the need to be in the presence of this can help the operator to control and avoid serious damage, for this it depends on the operation of the plant since within Node-red a message with the error noti- fication can be issued whenever, for example, the level of a tank rises above or falls below a set limit.
As for the level sensor reading, the most efficient way is to have the data al- ways present in Node-red, for this in the programming of S7 nodes it is done so that every 0.5 seconds the data is read and stored In a global variable of Node-red, so that it can be consulted directly in this space, this time to refresh the reading was chosen because by default it is the shortest time, since, in tests with a shorter cycle there are read errors.
According to the bibliographic review in section [9] it is established that coupling a virtual assistant that works with voice commands to a process is beneficial since it can be motorized in real time and the veracity of the data is genuine, in addition to the fact that demonstrates innovation by using a type of control different from the conventional, in section [11] the feasibility of integrating a virtual assistant to a common economic activity is evidenced, with the benefit that interacting with a virtual assistant generates encouraging results- In terms of speed and ease for the user, in the same way in section [10] the integration of a virtual assistant to various fields of a process can be observed, highlighting the human interaction with the devices and the coupling of multiple technologies to the same process seeking to improve it; It can be concluded that in this project it was possible to integrate each of the revised characteristics, focused on the inter-action through a natural and friendly environment in the chatbot generated regardless of the ambient noise or external conditions since the only requirement to control the plant is have access to the internet and telegram, in addition to achieving a response in really short time (13ms) in terms of querying data re-motely and executing the start-up and stop actions, in reading data with minimal error (+ -0.10%) and with the total opening for the scalability of the project.
This type of technology can be applied in several processes at an industrial level, since, as could be seen in this project, the chatbot system was coupled to the already functional plant without the need to intervene in the program- ming or operation of this thanks to the great features of both Node-Red and the PLC itself.
Development of a Virtual Assistant Chatbot 213
REFERENCES
Anampa, K., Door, C., Llamoja, R., Santa, M. , 2018. Business plan to determine the feasibility of developing a virtual sales assistant (Chatbot): Gamarra case. Repos. Inst. - UESAN, no. 1606536, p. 280. Benavides, N., Torres, B., (2017), Virtual assistant for the pressure control of a liquid
recirculation process. EIEI ACOFI, Colombia. Cortes, J. A., 2011, Sequential Control of an Electroneumetic Circuit Through a Plc, Sci. Tech., vol. 2, no. 48, pp. 191–195, Universidad Tecnológica de Pereira Faculty of Mechanical, Electronic and Biomedical Engineering Villavicencio, Colom-
bia. Figueroa, Mi. An., Vázquez, R. G., and Castro, J. O., (2020). Proposal of Virtual Assistant based on Artificial Intelligence in the Integration of a Robotic Arm for Applications in the Industry 4.0. Res. Comput. Sci., vol. 149, no. 8, pp. 353–364, México. García Reina, L. F., (2018). Virtual Assistant Type Chatbot. UCatolica Repository,
Catholic University of Bogotá. Garibay, F. A. (2020). Design and Implementation of a Virtual Assistant (Chatbot) To Offer Attention to The Customers of a Mexican Airline Through Its Conversational Channels, Infotec Posgrados, p. 63. Gonzalez, E., Sanchez, P., 2017. Bot Mentor Bot to help the student in the platform
to Telegram, Faculty of Informatics, Complutense University of Madrid. Herrero, P., Varona, David, (2018). Uso de chatbots para automatizar la información en los medios españoles, El profesional de la información, v. 27, n. 4, pp. 742–749. Martínez, M.J., (2021). DEVELOPMENT OF AN AUTOMATIC SYSTEM FOR
THE GENERATION OF REPORTS FROM A CHATBOT Martinez Carpio, J. A., (2019). Development of a virtual assistant (chatbot) for the automation of customer service, UNIVERSITY OF GUAYAQUIL, FACULTY OF MATHEMATICAL AND PHYSICAL SCIENCES CAREER OF ENGINEERING IN COMPUTER SYSTEMS. Muñoz, C., (2021). Design and simulation of a monitoring system for a tempera-
ture control process using PLC and IoT for the company Educatia, Universidad Antonio Nariño Rivas, L.: (2021). Proposal for improvement in the management of customer service through a chatbot-type virtual assistant to strengthen the performance of the service of the continuing education project at the Caribbean headquarters of the University of Costa Rica, Angewandte Chemie International Edition, 6(11), 951–952. Romero M., Casadevante C., Montoro H. (2020). HOW TO CREATE A PSYCHOLOGIST-CHATBOT, Psychologist Papers, 2020 Vol. 41(1), pp. 27–34 Vallejo, I. (2015), Virtual Assistant (Chatbot) for the website of the Faculty of
Informatics, UNIVERSIDAD COMPLUTENSE DE MADRID
LISTED IN THE AHFE DIGITAL BOOKSTORE CATALOGUE
Explore the complete digital volume
Artificial Intelligence and Social Computing
Read this individual research paper free through the original publisher, or explore the full digital proceedings book.
ISBN 978-1-958651-04-9
Explore this ISBN in the AHFE Bookstore ↗Listed in the July 2026 bookstore catalogue; search by ISBN to confirm current availability · Digital book purchase optional