131 83 90MB
English Pages 720 [706] Year 2021
Ana I. Pereira · Florbela P. Fernandes · João P. Coelho · João P. Teixeira · Maria F. Pacheco · Paulo Alves · Rui P. Lopes (Eds.)
Communications in Computer and Information Science
1488
Optimization, Learning Algorithms and Applications First International Conference, OL2A 2021 Bragança, Portugal, July 19–21, 2021 Revised Selected Papers
Communications in Computer and Information Science Editorial Board Members Joaquim Filipe Polytechnic Institute of Setúbal, Setúbal, Portugal Ashish Ghosh Indian Statistical Institute, Kolkata, India Raquel Oliveira Prates Federal University of Minas Gerais (UFMG), Belo Horizonte, Brazil Lizhu Zhou Tsinghua University, Beijing, China
1488
More information about this series at https://link.springer.com/bookseries/7899
Ana I. Pereira · Florbela P. Fernandes · João P. Coelho · João P. Teixeira · Maria F. Pacheco · Paulo Alves · Rui P. Lopes (Eds.)
Optimization, Learning Algorithms and Applications First International Conference, OL2A 2021 Bragança, Portugal, July 19–21, 2021 Revised Selected Papers
Editors Ana I. Pereira Instituto Politécnico de Bragança Bragança, Portugal
Florbela P. Fernandes Instituto Politécnico de Bragança Bragança, Portugal
João P. Coelho Instituto Politécnico de Bragança Bragança, Portugal
João P. Teixeira Instituto Politécnico de Bragança Bragança, Portugal
Maria F. Pacheco Instituto Politécnico de Bragança Bragança, Portugal
Paulo Alves Instituto Politécnico de Bragança Bragança, Portugal
Rui P. Lopes Instituto Politécnico de Bragança Bragança, Portugal
ISSN 1865-0929 ISSN 1865-0937 (electronic) Communications in Computer and Information Science ISBN 978-3-030-91884-2 ISBN 978-3-030-91885-9 (eBook) https://doi.org/10.1007/978-3-030-91885-9 © Springer Nature Switzerland AG 2021 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
The volume CCIS 1488 contains the refereed proceedings of the International Conference on Optimization, Learning Algorithms and Applications (OL2A 2021), an event that, due to the COVID-19 pandemic, was held online. OL2A 2021 provided a space for the research community on optimization and learning to get together and share the latest developments, trends, and techniques as well as develop new paths and collaborations. OL2A 2021 had more than 400 participants in an online environment throughout the three days of the conference (July 19–21, 2021), discussing topics associated to areas such as optimization and learning and state-of-the-art applications related to multi-objective optimization, optimization for machine learning, robotics, health informatics, data analysis, optimization and learning under uncertainty, and the Fourth Industrial Revolution. Four special sessions were organized under the following topics: Trends in Engineering Education, Optimization in Control Systems Design, Data Visualization and Virtual Reality, and Measurements with the Internet of Things. The event had 52 accepted papers, among which 39 were full papers. All papers were carefully reviewed and selected from 134 submissions. All the reviews were carefully carried out by a Scientific Committee of 61 PhD researchers from 18 countries. July 2021
Ana I. Pereira
Organization
General Chair Ana Isabel Pereira
Polytechnic Institute of Bragança, Portugal
Organizing Committee Chairs Florbela P. Fernandes João Paulo Coelho João Paulo Teixeira M. Fátima Pacheco Paulo Alves Rui Pedro Lopes
Polytechnic Institute of Bragança, Portugal Polytechnic Institute of Bragança, Portugal Polytechnic Institute of Bragança, Portugal Polytechnic Institute of Bragança, Portugal Polytechnic Institute of Bragança, Portugal Polytechnic Institute of Bragança, Portugal
Scientific Committee Ana Maria A. C. Rocha Ana Paula Teixeira André Pinz Borges Andrej Košir Arnaldo Cândido Júnior Bruno Bispo Carmen Galé B. Rajesh Kanna C. Sweetlin Hemalatha Damir Vranˇci´c Daiva Petkeviciute Diamantino Silva Freitas Esteban Clua Eric Rogers Felipe Nascimento Martins Gaukhar Muratova Gediminas Daukšys Glaucia Maria Bressan Humberto Rocha José Boaventura-Cunha José Lima Joseane Pontes Juani Lopéz Redondo
University of Minho, Portugal University of Trás-os-Montes and Alto Douro, Portugal Federal University of Technology – Paraná, Brazil University of Ljubljana, Slovenia Federal University of Technology – Paraná, Brazil Federal University of Santa Catarina, Brazil University of Zaragoza, Spain Vellore Institute of Technology, India Vellore Institute of Technology, India Jozef Stefan Institute, Slovenia Kaunas University of Technology, Lithuania University of Porto, Portugal Federal Fluminense University, Brazil University of Southampton, UK Hanze University of Applied Sciences, The Netherlands Dulaty University, Kazakhstan Kauno Technikos Kolegija, Lithuania Federal University of Technology – Paraná, Brazil University of Coimbra, Portugal University of Trás-os-Montes and Alto Douro, Portugal Polytechnic Institute of Bragança, Portugal Federal University of Technology – Ponta Grossa, Brazil University of Almeria, Spain
viii
Organization
Jorge Ribeiro José Ramos Kristina Sutiene Lidia Sánchez Lino Costa Luís Coelho Luca Spalazzi Manuel Castejón Limas Marc Jungers Maria do Rosário de Pinho Marco Aurélio Wehrmeister Mikulas Huba Michał Podpora Miguel Ángel Prada Nicolae Cleju Paulo Lopes dos Santos Paulo Moura Oliveira Pavel Pakshin Pedro Luiz de Paula Filho Pedro Miguel Rodrigues Pedro Morais Pedro Pinto Rudolf Rabenstein Sani Rutz da Silva Sara Paiva Sofia Rodrigues Sławomir St˛epie´n Teresa Paula Perdicoulis Toma Roncevic Vitor Duarte dos Santos Wojciech Paszke Wojciech Giernacki
Polytechnic Institute of Viana do Castelo, Portugal NOVA University Lisbon, Portugal Kaunas University of Technology, Lithuania University of León, Spain University of Minho, Portugal Polytecnhic Institute of Porto, Portugal Marche Polytechnic University, Italy University of León, Spain Université de Lorraine, France University of Porto, Portugal Federal University of Technology – Paraná, Brazil Slovak University of Technology in Bratislava, Slovakia Opole University of Technology, Poland University of León, Spain Technical University of Iasi, Romania University of Porto, Portugal University of Trás-os-Montes and Alto Douro, Portugal Nizhny Novgorod State Technical University, Russia Federal University of Technology – Paraná, Brazil Catholic University of Portugal, Portugal Polytechnic Institute of Cávado e Ave, Portugal Polytechnic Institute of Viana do Castelo, Portugal Friedrich-Alexander-University of Erlangen-Nürnberg, Germany Federal University of Technology – Paraná, Brazil Polytechnic Institute of Viana do Castelo, Portugal Polytechnic Institute of Viana do Castelo, Portugal Poznan University of Technology, Poland University of Trás-os-Montes and Alto Douro, Portugal University of Split, Croatia NOVA University Lisbon, Portugal University of Zielona Gora, Poland Poznan University of Technology, Poland
Contents
Optimization Theory Dynamic Response Surface Method Combined with Genetic Algorithm to Optimize Extraction Process Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Laires A. Lima, Ana I. Pereira, Clara B. Vaz, Olga Ferreira, Márcio Carocho, and Lillian Barros Towards a High-Performance Implementation of the MCSFilter Optimization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Leonardo Araújo, Maria F. Pacheco, José Rufino, and Florbela P. Fernandes
3
15
On the Performance of the OrthoMads Algorithm on Continuous and Mixed-Integer Optimization Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Marie-Ange Dahito, Laurent Genest, Alessandro Maddaloni, and José Neto
31
A Look-Ahead Based Meta-heuristics for Optimizing Continuous Optimization Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thomas Nordli and Noureddine Bouhmala
48
Inverse Optimization for Warehouse Management . . . . . . . . . . . . . . . . . . . . . . . . . . Hannu Rummukainen Model-Agnostic Multi-objective Approach for the Evolutionary Discovery of Mathematical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alexander Hvatov, Mikhail Maslyaev, Iana S. Polonskaya, Mikhail Sarafanov, Mark Merezhnikov, and Nikolay O. Nikitin A Simple Clustering Algorithm Based on Weighted Expected Distances . . . . . . . Ana Maria A. C. Rocha, M. Fernanda P. Costa, and Edite M. G. P. Fernandes
56
72
86
Optimization of Wind Turbines Placement in Offshore Wind Farms: Wake Effects Concerns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 José Baptista, Filipe Lima, and Adelaide Cerveira A Simulation Tool for Optimizing a 3D Spray Painting System . . . . . . . . . . . . . . . 110 João Casanova, José Lima, and Paulo Costa
x
Contents
Optimization of Glottal Onset Peak Detection Algorithm for Accurate Jitter Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Joana Fernandes, Pedro Henrique Borghi, Diamantino Silva Freitas, and João Paulo Teixeira Searching the Optimal Parameters of a 3D Scanner Through Particle Swarm Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 João Braun, José Lima, Ana I. Pereira, Cláudia Rocha, and Paulo Costa Optimal Sizing of a Hybrid Energy System Based on Renewable Energy Using Evolutionary Optimization Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Yahia Amoura, Ângela P. Ferreira, José Lima, and Ana I. Pereira Robotics Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot . . . . 171 Hugo Mendonça, José Lima, Paulo Costa, António Paulo Moreira, and Filipe Santos Multiple Mobile Robots Scheduling Based on Simulated Annealing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Diogo Matos, Pedro Costa, José Lima, and António Valente Multi AGV Industrial Supervisory System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Ana Cruz, Diogo Matos, José Lima, Paulo Costa, and Pedro Costa Dual Coulomb Counting Extended Kalman Filter for Battery SOC Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Arezki A. Chellal, José Lima, José Gonçalves, and Hicham Megnafi Sensor Fusion for Mobile Robot Localization Using Extended Kalman Filter, UWB ToF and ArUco Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Sílvia Faria, José Lima, and Paulo Costa Deep Reinforcement Learning Applied to a Robotic Pick-and-Place Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Natanael Magno Gomes, Felipe N. Martins, José Lima, and Heinrich Wörtche Measurements with the Internet of Things An IoT Approach for Animals Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Matheus Zorawski, Thadeu Brito, José Castro, João Paulo Castro, Marina Castro, and José Lima
Contents
xi
Optimizing Data Transmission in a Wireless Sensor Network Based on LoRaWAN Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Thadeu Brito, Matheus Zorawski, João Mendes, Beatriz Flamia Azevedo, Ana I. Pereira, José Lima, and Paulo Costa Indoor Location Estimation Based on Diffused Beacon Network . . . . . . . . . . . . . 294 André Mendes and Miguel Diaz-Cacho SMACovid-19 – Autonomous Monitoring System for Covid-19 . . . . . . . . . . . . . . 309 Rui Fernandes and José Barbosa Optimization in Control Systems Design Economic Burden of Personal Protective Strategies for Dengue Disease: an Optimal Control Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Artur M. C. Brito da Cruz and Helena Sofia Rodrigues ERP Business Speed – A Measuring Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Zornitsa Yordanova BELBIC Based Step-Down Controller Design Using PSO . . . . . . . . . . . . . . . . . . . 345 João Paulo Coelho, Manuel Braz-César, and José Gonçalves Robotic Welding Optimization Using A* Parallel Path Planning . . . . . . . . . . . . . . 357 Tiago Couto, Pedro Costa, Pedro Malaca, Daniel Marques, and Pedro Tavares Deep Learning Leaf-Based Species Recognition Using Convolutional Neural Networks . . . . . . . 367 Willian Oliveira Pires, Ricardo Corso Fernandes Jr., Pedro Luiz de Paula Filho, Arnaldo Candido Junior, and João Paulo Teixeira Deep Learning Recognition of a Large Number of Pollen Grain Types . . . . . . . . 381 Fernando C. Monteiro, Cristina M. Pinto, and José Rufino Predicting Canine Hip Dysplasia in X-Ray Images Using Deep Learning . . . . . . 393 Daniel Adorno Gomes, Maria Sofia Alves-Pimenta, Mário Ginja, and Vitor Filipe Convergence of the Reinforcement Learning Mechanism Applied to the Channel Detection Sequence Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 André Mendes
xii
Contents
Approaches to Classify Knee Osteoarthritis Using Biomechanical Data . . . . . . . 417 Tiago Franco, P. R. Henriques, P. Alves, and M. J. Varanda Pereira Artificial Intelligence Architecture Based on Planar LiDAR Scan Data to Detect Energy Pylon Structures in a UAV Autonomous Detailed Inspection Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 Matheus F. Ferraz, Luciano B. Júnior, Aroldo S. K. Komori, Lucas C. Rech, Guilherme H. T. Schneider, Guido S. Berger, Álvaro R. Cantieri, José Lima, and Marco A. Wehrmeister Data Visualization and Virtual Reality Machine Vision to Empower an Intelligent Personal Assistant for Assembly Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 Matheus Talacio, Gustavo Funchal, Victória Melo, Luis Piardi, Marcos Vallim, and Paulo Leitao Smart River Platform - River Quality Monitoring and Environmental Awareness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 Kenedy P. Cabanga, Edmilson V. Soares, Lucas C. Viveiros, Estefânia Gonçalves, Ivone Fachada, José Lima, and Ana I. Pereira Health Informatics Analysis of the Middle and Long Latency ERP Components in Schizophrenia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Miguel Rocha e Costa, Felipe Teixeira, and João Paulo Teixeira Feature Selection Optimization for Breast Cancer Diagnosis . . . . . . . . . . . . . . . . . 492 Ana Rita Antunes, Marina A. Matos, Lino A. Costa, Ana Maria A. C. Rocha, and Ana Cristina Braga Cluster Analysis for Breast Cancer Patterns Identification . . . . . . . . . . . . . . . . . . . 507 Beatriz Flamia Azevedo, Filipe Alves, Ana Maria A. C. Rocha, and Ana I. Pereira Overview of Robotic Based System for Rehabilitation and Healthcare . . . . . . . . . 515 Arezki A. Chellal, José Lima, Florbela P. Fernandes, José Gonçalves, Maria F. Pacheco, and Fernando C. Monteiro Understanding Health Care Access in Higher Education Students . . . . . . . . . . . . . 531 Filipe J. A. Vaz, Clara B. Vaz, and Luís C. D. Cadinha
Contents
xiii
Using Natural Language Processing for Phishing Detection . . . . . . . . . . . . . . . . . . 540 Richard Adolph Aires Jonker, Roshan Poudel, Tiago Pedrosa, and Rui Pedro Lopes Data Analysis A Panel Data Analysis of the Electric Mobility Deployment in the European Union . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 Sarah B. Gruetzmacher, Clara B. Vaz, and Ângela P. Ferreira Data Analysis of Workplace Accidents - A Case Study . . . . . . . . . . . . . . . . . . . . . . 571 Inês P. Sena, João Braun, and Ana I. Pereira Application of Benford’s Law to the Tourism Demand: The Case of the Island of Sal, Cape Verde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 Gilberto A. Neves, Catarina S. Nunes, and Paula Odete Fernandes Volunteering Motivations in Humanitarian Logistics: A Case Study in the Food Bank of Viana do Castelo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 Ana Rita Vasconcelos, Ângela Silva, and Helena Sofia Rodrigues Occupational Behaviour Study in the Retail Sector . . . . . . . . . . . . . . . . . . . . . . . . . 617 Inês P. Sena, Florbela P. Fernandes, Maria F. Pacheco, Abel A. C. Pires, Jaime P. Maia, and Ana I. Pereira A Scalable, Real-Time Packet Capturing Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 630 Rafael Oliveira, João P. Almeida, Isabel Praça, Rui Pedro Lopes, and Tiago Pedrosa Trends in Engineering Education Assessing Gamification Effectiveness in Education Through Analytics . . . . . . . . 641 Zornitsa Yordanova Real Airplane Cockpit Development Applied to Engineering Education: A Project Based Learning Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 José Carvalho, André Mendes, Thadeu Brito, and José Lima Azbot-1C: An Educational Robot Prototype for Learning Mathematical Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Francisco Pedro, José Cascalho, Paulo Medeiros, Paulo Novo, Matthias Funk, Albeto Ramos, Armando Mendes, and José Lima
xiv
Contents
Towards Distance Teaching: A Remote Laboratory Approach for Modbus and IoT Experiencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 José Carvalho, André Mendes, Thadeu Brito, and José Lima Evaluation of Soft Skills Through Educational Testbed 4.0 . . . . . . . . . . . . . . . . . . 678 Leonardo Breno Pessoa da Silva, Bernado Perrota Barreto, Joseane Pontes, Fernanda Tavares Treinta, Luis Mauricio Martins de Resende, and Rui Tadashi Yoshino Collaborative Learning Platform Using Learning Optimized Algorithms . . . . . . . 691 Beatriz Flamia Azevedo, Yahia Amoura, Gauhar Kantayeva, Maria F. Pacheco, Ana I. Pereira, and Florbela P. Fernandes Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
Optimization Theory
Dynamic Response Surface Method Combined with Genetic Algorithm to Optimize Extraction Process Problem Laires A. Lima1,2(B) , Ana I. Pereira1 , Clara B. Vaz1 , Olga Ferreira2 , M´ arcio Carocho2 , and Lillian Barros2 1 Research Center in Digitalization and Intelligent Robotics (CeDRI), Instituto Polit´ecnico de Bragan¸ca, Campus de Santa Apol´ onia, 5300-253 Bragan¸ca, Portugal {laireslima,apereira,clvaz}@ipb.pt 2 Centro de Investiga¸ca ˜o de Montanha (CIMO), Instituto Polit´ecnico de Bragan¸ca, Campus de Santa Apol´ onia, 5300-253 Bragan¸ca, Portugal {oferreira,mcarocho,lillian}@ipb.pt
Abstract. This study aims to find and develop an appropriate optimization approach to reduce the time and labor employed throughout a given chemical process and could be decisive for quality management. In this context, this work presents a comparative study of two optimization approaches using real experimental data from the chemical engineering area, reported in a previous study [4]. The first approach is based on the traditional response surface method and the second approach combines the response surface method with genetic algorithm and data mining. The main objective is to optimize the surface function based on three variables using hybrid genetic algorithms combined with cluster analysis to reduce the number of experiments and to find the closest value to the optimum within the established restrictions. The proposed strategy has proven to be promising since the optimal value was achieved without going through derivability unlike conventional methods, and fewer experiments were required to find the optimal solution in comparison to the previous work using the traditional response surface method. Keywords: Optimization
1
· Genetic algorithm · Cluster analysis
Introduction
Search and optimization methods have several principles, being the most relevant: the search space, where the possibilities for solving the problem in question are considered; the objective function (or cost function); and the codification of the problem, that is, the way to evaluate an objective in the search space [1]. Conventional optimization techniques start with an initial value or vector that, iteratively, is manipulated using some heuristic or deterministic process c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 3–14, 2021. https://doi.org/10.1007/978-3-030-91885-9_1
4
L. A. Lima et al.
directly associated with the problem to be solved. The great difficulty to deal with when solving a problem using a stochastic method is the number of possible solutions growing with a factorial speed, being impossible to list all possible solutions of the problem [12]. Evolutionary computing techniques operate on a population that changes in each iteration. Thus, they can search in different regions on the feasible space, allocating an appropriate number of members to search in different areas [12]. Considering the importance of predicting the behavior of analytical processes and avoiding expensive procedures, this study aims to propose an alternative for the optimization of multivariate problems, e.g. extraction processes of highvalue compounds from plant matrices. In the standard analytical approach, the identification and quantification of phenolic compounds require expensive and complex laboratory assays [6]. An alternative approach can be applied using forecasting models from Response Surface Method (RSM). This approach can maximize the extraction yield of the target compounds while decreasing the cost of the extraction process. In this study, a comparative analysis between two optimization methodoloR software gies (traditional RSM and dynamic RSM), developed in MATLAB (version R2019a 9.6), that aim to maximize the heat-assisted extraction yield and phenolic compounds content in chestnut flower extracts is presented. This paper is organized as follows. Section 2 describes the methods used to evaluate multivariate problems involving optimization processes: Response Surface Method (RSM), Hybrid Genetic Algorithm, Cluster Analysis and Bootsrap Analysis. Sections 3 and 4 introduce the case study, consisting of the optimization of the extraction yield and content of phenolic compounds in extracts of chestnut flower by two different approaches: Traditional RSM and Dynamic RSM. Section 5 includes the numerical results obtained by both methods and their comparative evaluation. Finally, Sect. 6 presents the conclusions and future work.
2
Methods Approaches and Techniques
Regarding optimization problems, some methods are used more frequently (traditional RSM, for example) due to their applicability and suitability to different cases. For the design of the dynamic RSM, the approach of conventional methods based on Genetic Algorithm combined with clustering and bootstrap analysis was made to evaluate the aspects that could be incorporated into the algorithm developed in this work. The key concepts for dynamic RSM are presented below. 2.1
Response Surface Method
The Response Surface Method is a tool introduced in the early 1950s by Box and Wilson, which covers a collection of mathematical and statistical techniques useful for approximating and optimizing stochastic models [11]. It is a widely used optimization method, which applies statistical techniques based on special factorial designs [2,3]. Its scientific approach estimates the ideal conditions for
Dynamic RSM Combined with GA to Optimize Extraction Process Problem
5
achieving the highest or lowest required response value, through the design of the response surface from the Taylor series [8]. RSM promotes the greatest amount of information on experiments, such as the time of experiments and the influence of each dependent variable, being one of the largest advantages in obtaining the necessary general information on the planning of the process and the experience design [8]. 2.2
Hybrid Genetic Algorithm
The genetic algorithm is a stochastic optimization method based on the evolutionary process of natural selection and genetic dynamics. The method seeks to combine the survival of the fittest among the string structures with an exchange of random, but structured, information to form an ideal solution [7]. Although they are randomized, GA search strategies are able to explore several regions of the feasible search space at a time. In this way, along with the iterations, a unique search path is built, as new solutions are obtained through the combination of previous solutions [1]. Optimization problems with restrictions can influence the sampling capacity of a genetic algorithm due to the population limits considered. Incorporating a local optimization method into GA can help overcome most of the obstacles that arise as a result of finite population sizes, for example, the accumulation of stochastic errors that generate genetic drift problems [1,7]. 2.3
Cluster Analysis
Cluster algorithms are often used to group large data sets and play an important role in pattern recognition and mining large arrays. k-means and k-medoids strategies work by grouping partition data into a k number of mutually exclusive clusters, demonstrated in Fig. 1. These techniques assign each observation to a cluster, minimizing the distance from the data point to the average (k-means) or median (k-medoids) location of its assigned cluster [10].
Fig. 1. Mean and Medoid in 2D space representation. In both figures, the data are represented by blue dots, being the rightmost point an outlier and the red point represents the centroid point found by k-mean or k-medoid methods. Adapted from Jin and Han (2011) (Color figure online).
6
2.4
L. A. Lima et al.
Bootstrap Analysis
The idea of bootstrap analysis is to mimic the sampling distribution of the statistic of interest through the use of many resamples replacing the original sample elements [5]. In this work, the bootstrap analysis enables the handling of the variability of the optimal solutions derived from the cluster method analysis. Thus, the bootstrap analysis is used to estimate the confidence interval of the statistic of interest and subsequently, comparing the results obtained by traditional methods.
3
Case Study
This work presents a comparative analysis between two methodologies for optimizing the total phenolic content in extracts of chestnut flower, developed in R software. The natural values of the dependent variables in the MATLAB extraction - t, time in minutes; T, temperature in ◦ C; and S, organic solvent content in %v/v of ethanol - were coded based on Central Composite Circumscribed Design (CCCD) and the result was based on extraction yield (Y, expressed in percentage of dry extract) and total phenolic content (Phe, expressed in mg/g of dry extract) as shown in Table 1. The experimental data presented were cordially provided by the Mountain Research Center - CIMO (Bragan¸ca, Portugal) [4]. The CCCD design selected for the original experimental study [4] is based on a cube circumscribed to a sphere in which the vertices are at α distance from the center, with 5 levels for each factor (t, T, and S ). In this case, the α values vary between −1.68 and 1.68, and correspond to each factor level, as described in Table 2.
4
Data Analysis
In this section, the two RSM optimization methods (traditional and dynamic) will be discussed in detail, along with the results obtained from both methods. 4.1
Traditional RSM
In the original experiment, a five-level Central Composite Circumscribed Design (CCCD) coupled with RSM was build to optimize the variables for the male chestnut flowers. For the optimization, a simplex method developed ad hoc was used to optimize nonlinear solutions obtained by a regression model to maximize the response, described in the flowchart in Fig. 2. Through the traditional RSM, the authors approximated the surface response to a second-order polynomial function [4]: Y = b0 +
n i=1
bi X i +
n n−1 i=1 j=2 j>1
bij Xi Xj +
n i=1
bii Xi2
(1)
Dynamic RSM Combined with GA to Optimize Extraction Process Problem
7
Table 1. Variables and natural values of the process parameters for the extraction of chestnut flowers [4]. t (min) T (◦ C) S (%EtOH) Yield (%R) Phenolic cont. (mg.g−1 dry weight) 40.30
37.20
20.30
38.12
36.18
40.30
37.20
79.70
26.73
11.05
40.30
72.80
20.30
42.83
36.66
40.30
72.80
79.70
35.94
22.09
99.70
37.20
20.30
32.77
35.55
99.70
37.20
79.70
32.99
8.85
99.70
72.80
20.30
42.55
29.61
99.70
72.80
79.70
35.52
11.10
120.00
55.00
50.00
42.41
14.56
20.00
55.00
50.00
35.45
24.08
70.00
25.00
50.00
38.82
12.64
70.00
85.00
50.00
42.06
17.41
70.00
55.00
0.00
35.24
34.58
70.00
55.00
100.00
15.61
12.01
20.00
25.00
0.00
22.30
59.56
20.00
25.00
100.00
8.02
15.57
20.00
85.00
0.00
34.81
42.49
20.00
85.00
100.00
18.71
50.93
120.00
25.00
0.00
31.44
40.82
120.00
25.00
100.00
15.33
8.79
120.00
85.00
0.00
34.96
45.61
120.00
85.00
100.00
32.70
21.89
70.00
55.00
50.00
41.03
14.62
Table 2. Natural and coded values of the extraction variables [4]. Natural variables Coded value ◦ t (min) T ( C) S (%) 20.0
25.0
0.0
−1.68
40.3
37.2
20.0
−1.00
70
55
50.0
0.00
99.7
72.8
80.0
1.00
100.0
1.68
120
85
8
L. A. Lima et al.
Fig. 2. Flowchart of traditional RSM modeling approach for optimal design.
where, for i = 0, ..., n and j = 1, ..., n, bi stand for the linear coefficients; bij correspond to the interaction coefficients while bii are the quadratic coefficients; and, finally, Xi are the independent variables, associated to t, T and S, being n the total number of variables. In the previous study, the traditional RSM, Eq. 1 represents coherently the behaviour of the extraction process of the target compounds from chestnut flowers [4]. In order to compare the optimization methods and to avoid data conflict, the estimation of the cost function was done based on a multivariate regression model. 4.2
Dynamic RSM
For the proposed optimization method, briefly described in the flowchart shown in Fig. 3, the structure of the design of the experience was maintained, as well as the imposed restrictions on the responses and variables to elude awkward solutions.
Fig. 3. Flowchart of dynamic RSM integrating genetic algorithm and cluster analysis to the process.
R The dynamic RSM method was build in MATLAB using a programming code developed by the authors coupled with pre-existing functions from the statistical and optimization toolboxes of the software. The algorithm starts by generating a set of 15 random combinations between the levels of combinatorial analysis. From this initial experimental data, a multivariate regression model is calculated, being this model the objective function of the problem. Thereafter, a built-in GA-based solver was used to solve the optimization problem. The optimal combination is identified and it is used to define the objective function. The process stops when no new optimal solution is identified.
Dynamic RSM Combined with GA to Optimize Extraction Process Problem
9
Considering the stochastic nature of this case study, clustering analysis is used to identify the best candidate optimal solution. In order to handle the variability of the achieved optimal solution, the bootstrap method is used to estimate the confidence interval at 95%.
5
Numerical Results
The study using the traditional RSM returned the following optimal conditions for maximum yield: 120.0 min, 85.0 ◦ C, and 44.5% of ethanol in the solvent, producing 48.87% of dry extract. For total phenolic content, the optimal conditions were: 20.0 min, 25.0 ◦ C and S = 0.0% of ethanol in the solvent, producing 55.37 mg/g of dry extract. These data are displayed in Table 3. Table 3. Optimal responses and respective conditions using traditional and dynamic RSM based on confidence intervals at 95%. Method Extraction yield (%)
t (min)
T (◦ C)
Traditional RSM 120.0 ± 12.4 85.0 ± 6.7 Dynamic RSM
118.5 ± 1.4
Total phenolics (Phe) Traditional RSM 20.0 ± 3.7 Dynamic RSM
20.4 ± 1.5
S (%)
Response
44.5 ± 9.7
48.87
84.07 ± 0.9 46.1 ± 0.85 45.87 25.0 ± 5.7
0.0 ± 8.7
55.37
25.1 ± 1.97 0.05 ± 0.05 55.64
For the implementation of dynamic RSM in this case study, 100 runs were carried out to evaluate the effectiveness of the method. For the yield, the estimated optimal conditions were: 118.5 min, 84.1 ◦ C, and 46.1% of ethanol in the solvent, producing 45.87% of dry extract. In this case, the obtained optimal conditions for time and temperature were in accordance with approximately 80% of the tests. For the total phenolic content, the optimal conditions were: 20.4 min, 25.1 ◦ C, and 0.05% of ethanol in the solvent, producing 55.64 mg/g of dry extract. The results were very similar to the previous report with the same data [4]. The clustering analysis for each response variable was performed considering the means (Figs. 4a and 5a) and the medoids (Figs. 4b and 5b) for the output population (optimal responses). The bootstrap analysis makes the inference concerning the results achieved and are represented graphically in terms of mean in Figs. 4c and 5c, and in terms of medoids in Figs. 4d and 5d.
10
L. A. Lima et al.
The box plots of the group of optimal responses from dynamic RSM displayed in Fig. 6 shows that the variance within each group is small, given that the difference between the set of responses is highly narrow. The histograms concerning the set of dynamic RSM responses and the bootstrap distribution of the mean (1000 resamples) are shown in Figs. 7 and 8.
(a) Extraction yield responses and k-means
(b) Extraction yield responses and k-medoids
(c) Extraction yield bootstrap output and (d) Extraction yield bootstrap output and k-means k-medoids
Fig. 4. Clustering analysis of the outputs from the extraction yield optimization using dynamic RSM. The responses are clustered in 3 distinct groups
Dynamic RSM Combined with GA to Optimize Extraction Process Problem
11
(a) Total phenolic content responses and k-means
(b) Total phenolic content responses and k-medoids
(c) Total phenolic content bootstrap output and k-means
(d) Total phenolic content bootstrap output and k-medoids
Fig. 5. Clustering analysis of the outputs from the total phenolic content optimization using dynamic RSM. The responses are clustered in 3 distinct groups
Fig. 6. Box plot of the dynamic RSM outputs for the extraction yield and total phenolic content before bootstrap analysis, respectively.
12
L. A. Lima et al.
Fig. 7. Histograms of the extraction data (extraction yield) and the bootstrap means, respectively.
Fig. 8. Histograms of the extraction data (total phenolic content) and the bootstrap means, respectively.
The results obtained in this work are satisfactory since they were analogous for both methods, although dynamic RSM took 15 to 18 experimental points to find the optimal coordinates. Some authors use the design of experiments involving traditional RSM containing 20 different combinations, including the repetition of centroid [4]. However, in studies involving recent data or the absence of complementary data, evaluations about the influence of parameters and range are essential to obtain consistent results, making it necessary to make about 30 experimental points for optimization. Considering these cases, the dynamic RSM method proposes a different, competitive, and economical approach, in which fewer points are evaluated to obtain the maximum response. Genetic algorithms have been providing their efficiency in the search for optimal solutions in a wide variety of problems, given that they do not have some limitations found in traditional search methodologies, such as the requirement of the derivative function, for example [9]. GA is attractive to identify the global solution of the problem. Considering the stochastic problem presented in this work, the association of genetic algorithm with the k-methods as clustering algorithm obtained satisfactory results. This solution can be used for problems involving small-scale data since GA manages to gather the best data for opti-
Dynamic RSM Combined with GA to Optimize Extraction Process Problem
13
mization through its evolutionary method, while k-means or k-medoids make the grouping of optimum points. In addition to clustering analysis, bootstrapping was also applied, in which the sample distribution of the statistic of interest is simulated through the use of many resamples with replacement of the original sample, thus enabling to make the statistical inference. Bootstrapping was used to calculate the confidence intervals to obtain unbiased estimates from the proposed method. In this case, the confidence interval was calculated at the 95% level (two-tailed), since the same percentage was adopted by Caleja et al. (2019). It was observed that the Dynamic RSM approach also enables the estimation of confidence intervals with less margin of error than the Traditional RSM approach, conducting to define more precisely the optimum conditions for the experiment.
6
Conclusion and Future Work
For the presented case study, applying dynamic RSM using Genetic Algorithm coupled with clustering analysis returned positive results, in accordance with previous published data [4]. Both methods seem attractive for the resolution of this particular case concerning the optimization of the extraction of target compounds from plant matrices. Therefore, the smaller number of experiments required for dynamic RSM can be an interesting approach for future studies. In brief, a smaller set of points was obtained that represent the best domain of optimization, thus eliminating the need for a large number of costly laboratory experiments. The next steps involve the improvement of the dynamic RSM algorithm and the application of the proposed method in other areas of study. Acknowledgments. The authors are grateful to FCT for financial support through national funds FCT/MCTES UIDB/00690/2020 to CIMO and UIDB/05757/2020. M. Carocho also thanks FCT through the individual scientific employment programcontract (CEECIND/00831/2018).
References 1. Beasley, D., Bull, D.R., Martin, R.R.: An overview of genetic algorithms: Part 1, fundamentals. Univ. Comput. 2(15), 1–16 (1993) 2. Box, G.E.P., Behnken, D.W.: Simplex-sum designs: a class of second order rotatable designs derivable from those of first order. Ann. Math. Stat. 31(4), 838–864 (1960) 3. Box, G.E.P., Wilson, K.B.: On the experimental attainment of optimum conditions. J. Roy. Stat. Soc. Ser. B (Methodol.) 13(1), 1–38 (1951) 4. Caleja C., Barros L., Prieto M. A., Bento A., Oliveira M.B.P., Ferreira, I.C.F.R.: Development of a natural preservative obtained from male chestnut flowers: optimization of a heat-assisted extraction technique. In: Food and Function, vol. 10, pp. 1352–1363 (2019) 5. Efron, B., Tibshirani, R.J.: An introduction to the Bootstrap, 1st edn. Wiley, New York (1994)
14
L. A. Lima et al.
6. Eftekhari, M., Yadollahi, A., Ahmadi, H., Shojaeiyan, A., Ayyari, M.: Development of an artificial neural network as a tool for predicting the targeted phenolic profile of grapevine (Vitis vinifera) foliar wastes. Front. Plant Sci. 9, 837 (2018) 7. El-Mihoub, T.A., Hopgood, A.A., Nolle, L., Battersby, A.: Hybrid genetic algorithms: a review. Eng. Lett. 11, 124–137 (2006) 8. Geiger, E.: Statistical methods for fermentation optimization. In: Vogel H.C., Todaro C.M., (eds.) Fermentation and Biochemical Engineering Handbook: Principles, Process Design, and Equipment, 3rd edn, pp. 415–422. Elsevier Inc. (2014) 9. H¨ ardle, W.K., Simar, L.: Applied Multivariate Statistical Analysis, 4th edn. Springer, Heidelberg (2019) 10. Jin, X., Han, J.: K-medoids clustering. In: Sammut, C., Webb, G.I. (eds.) Encyclopedia of Machine Learning, pp. 564–565. Springer, Boston (2011) 11. S ¸ enaras, A.E.: Parameter optimization using the surface response technique in automated guided vehicles. In: Sustainable Engineering Products and Manufacturing Technologies, pp. 187–197. Academic Press (2019) 12. Schneider, J., Kirkpatrick, S.: Genetic algorithms and evolution strategies. In: Stochastic Optimization, vol. 1, pp. 157–168, Springer-Verlag, Heidelberg (2006)
Towards a High-Performance Implementation of the MCSFilter Optimization Algorithm Leonardo Ara´ ujo1,2 , Maria F. Pacheco2 , Jos´e Rufino2 , and Florbela P. Fernandes2(B) 1
2
Universidade Tecnol´ ogica Federal do Paran´ a, Campus de Ponta Grossa, Ponta Grossa 84017-220, Brazil Research Centre in Digitalization and Intelligent Robotics (CeDRI), Instituto Polit´ecnico de Bragan¸ca, 5300-252 Bragan¸ca, Portugal [email protected], {pacheco,rufino,fflor}@ipb.pt
Abstract. Multistart Coordinate Search Filter (MCSFilter) is an optimization method suitable to find all minimizers – both local and global – of a non convex problem, with simple bounds or more generic constraints. Like many other optimization algorithms, it may be used in industrial contexts, where execution time may be critical in order to keep a production process within safe and expected bounds. MCSFilter was first implemented in MATLAB and later in Java (which introduced a significant performance gain). In this work, a comparison is made between these two implementations and a novel one in C that aims at further performance improvements. For the comparison, the problems addressed are bound constraint, with small dimension (between 2 and 10) and multiple local and global solutions. It is possible to conclude that the average time execution for each problem is considerable smaller when using the Java and C implementations, and that the current C implementation, though not yet fully optimized, already exhibits a significant speedup.
Keywords: Optimization Performance
1
· MCSFilter method · MatLab · C · Java ·
Introduction
The set of techniques and principals for solving quantitative problems known as optimization has become increasingly important in a broad range of applications in areas of research as diverse as engineering, biology, economics, statistics or physics. The application of the techniques and laws of optimization in these (and other) areas, not only provides resources to describe and solve the specific problems that appear within the framework of each area but it also provides the opportunity for new advances and achievements in optimization theory and its techniques [1,2,6,7]. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 15–30, 2021. https://doi.org/10.1007/978-3-030-91885-9_2
16
L. Ara´ ujo et al.
In order to apply optimization techniques, problems can be formulated in terms of an objective function that is to be maximized or minimized, a set of variables and a set of constraints (restrictions on the values that the variables can assume). The structure of the these three items – objective function, variables and constraints –, determines different subfields of optimization theory: linear, integer, stochastic, etc.; within each of these subfields, several lines of research can be pursued. The size and complexity of optimization problems that can be dealt with has increased enormously with the improvement of the overall performance of computers. As such, advances in optimization techniques have been following progresses in computer science as well as in combinatorics, operations research, control theory, approximation theory, routing in telecommunication networks, image reconstruction and facility location, among other areas [14]. The need to keep up with the challenges of our rapidly changing society and its digitalization means a continuing need to increase innovation and productivity and improve the performance of the industry sector, and places very high expectations for the progress and adaptation of sophisticated optimization techniques that are applied in the industrial context. Many of those problems can be modelled as nonlinear programming problems [10–12] or mixed integer nonlinear programming problems [5,8]. The urgency to quickly output solutions to difficult multivariable problems, leads to an increasing need to develop robust and fast optimization algorithms. Considering that, for many problems, reliable information about the derivative of the objective function is unavailable, it is important to use a method that allows to solve the problem without this information. Algorithms that do not use derivatives are called derivative-free. The MCSFilter method is such a method, being able to deal with discontinuous or nondifferentiable functions that often appear in many applications. It is also a multilocal method, meaning that it finds all the minimizers, both local and global, and exhibits good results [9,10]. Moreover, a Java implementation was already used to solve processes engineering problems [4]. Considering that, from an industrial point of view, execution time is of utmost importance, a novel C reimplementation, aimed at increased performance, is currently under way, having reached a stage at which it is already able to solve a broad set of problems with measurable performance gains over the previous Java version. This paper presents the results of a preliminary evaluation of the new C implementation of the MCSFilter method, against the previously developed versions (in MATLAB and Java). The rest of this paper is organized as follows: in Sect. 2, the MCSFilter algorithm is briefly described; in Sect. 3 the set of problems that are used to compare the three implementations and the corresponding results are presented and analyzed. Finally, in Sect. 4, conclusions and future work are addressed.
2
The Multistart Coordinate Search Filter Method
The MCSFilter algorithm was initially developed in [10], with the aim of finding multiple solutions of nonconvex and nonlinear constrained optimization problems of the following type:
Towards a High-Performance Implementation of the MCSFilter
min f (x) subject to gj (x) ≤ 0, j = 1, ..., m li ≤ xi ≤ ui , i = 1, ..., n
17
(1)
where f is the objective function, gj (x), j = 1, ..., m are the constraint functions and at least one of the functions f, gj : Rn −→ R is nonlinear; also, l and u are the bounds and Ω = {x ∈ Rn : g(x) ≤ 0 , l ≤ x ≤ u} is the feasible region. This method has two main different parts: i) the multistart part, related with the exploration feature of the method, and ii) the coordinate search filter local search, related with the exploitation of promising regions. The MCSFilter method does not require any information about the derivatives and is able to obtain all the solutions, both local and global, of a given nonconvex optimization problem. This is an important asset of the method since, in industry problems, it is often not possible to know the derivative functions; moreover, a large number of real-life problems are nonlinear and nonconvex. As already stated, the MCSFilter algorithm relies on a multistart strategy and a local search repeatedly called inside the multistart. Briefly, the multistart strategy is a stochastic algorithm that applies more than once a local search to sample points aiming to converge to all the minimizers, local and global, of a multimodal problem. When the local search is repeatedly applied, some of the minimizers can be reached more than once. This leads to a waste of time since these minimizers have already been determined. To avoid these situations, a clustering technique based on computing the regions of attraction of previously identified minimizers is used. Thus, if the initial point belongs to the region of attraction of a previously detected minimizer, the local search procedure may not be performed, since it would converge to this known minimizer. Figure 1 illustrates the influence of the regions of attraction. The red/magenta lines between the initial approximation and the minimizer represent a local search that has been performed; the red line represents the first local search that converged to a given minimizer; the white dashed line between the two points represents a discarded local search, using the regions of attraction. Therefore, this representation intends to show the regions of attraction of each minimizer and the corresponding points around each one. These regions are dynamic in the sense that they may change every time a new initial point is used [3]. The local search uses a derivative-free strategy that consists of a coordinate search combined with a filter methodology in order to generate a sequence of approximate solutions that improve either the constraint violation or the objective function relatively to the previous approximation; this strategy is called Coordinate Search Filter algorithm (CSFilter). In this way, the initial problem is previously rewritten as a bi-objective problem (2): min (θ(x), f (x)) x∈Ω
(2)
18
L. Ara´ ujo et al. 13 12 11 10 9
8 7
6 5
4 3 3
4
5
6
7
8
9
10
11
12
13
Fig. 1. Illustration of the multistart strategy with regions of attraction [3].
aiming to minimize, simultaneously, the objective function f (x) and the nonnegative continuous aggregate constraint violation function θ(x) defined in (3): θ(x) = g(x)+ 2 + (l − x)+ 2 + (x − u)+ 2
(3)
where v+ = max{0, v}. For more details about this method see [9,10]. Algorithm 1 displays the steps of the MSCFilter method. The stopping condition of CSFilter is related with the step size α of the method (see condition (4)): α < αmin
(4)
with αmin < 1 and close to zero. The main steps of the MCSFilter algorithm for finding global (as well as local) solutions to problem (1) are shown in Algorithm 2. The stopping condition of the MCSFilter algorithm is related to the number of minimizers found and to the number of local searches that were applied in the multistart strategy. Considering nl as the number of local searches used nm (nm + 1) . The and nm as the number of minimizers obtained, then Pmin = nl (nl − 1) MCSFilter algorithm stops when condition (5) is reached: Pmin <
(5)
where < 1. In this preliminary work, the main goal is to compare the performance of MCSFilter when bound constraint problems are addressed, using different
Towards a High-Performance Implementation of the MCSFilter
19
Algorithm 1. CSFilter algorithm Require: x and parameter values, αmin ; set x ˜ = x, xinf = x, z = x ˜; F n u −l 1: Initialize the filter; Set α = min{1, 0.05 i=1n i i }; 2: repeat ˜ + αei , for all ei ∈ D⊕ ; 3: Compute the trial approximations zai = x 4: repeat 5: Check acceptability of trial points zai ; 6: if there are some zai acceptable by the filter then 7: Update the filter; ˜, x ˜ = zabest ; update xinf if appropriate; 8: Choose zabest ; set z = x F 9: else 10: Compute the trial approximations zai = xinf F + αei , for all ei ∈ D⊕ ; 11: Check acceptability of trial points zai ; 12: if there are some zai acceptable by the filter then 13: Update the filter; ˜, x ˜ = zabest ; update xinf if appropriate; 14: Choose zabest ; Set z = x F 15: else 16: Set α = α/2; 17: end if 18: end if 19: until new trial zabest is acceptable 20: until α < αmin
implementations of the algorithm: the original implementation in MATLAB [10], a follow up implementation in Java (already used to solve problems from the Chemical Engineering area [3,4,13]), and a new implementation in C (evaluated for the first time in this paper).
3
Computational Results
In order to compare the performance of the three implementations of the MCSFilter optimization algorithm, a set of problems was chosen. The definition of each problem (a total of 15 bound constraint problems) is given below, along with the experimental conditions under which they were evaluated, as well as the obtained results (both numerical and performance-related). 3.1
Benchmark Problems
The collection of problems was taken from [9] (and the references therein) and all the fifteen problems in study are listed below. The problems were chosen in such a way that different characteristics were addressed: they are multimodal problems with more than one minimizer (actually, the number of minimizers varies from 2 to 1024); they can have just one global minimizer or more than one global minimizer; the dimension of the problems varies between 2 and 10.
20
L. Ara´ ujo et al.
Algorithm 2. MCSFilter algorithm Require: Parameter values; set M ∗ = ∅, k = 1, t = 1; 1: Randomly generate x ∈ [l, u]; compute Bmin = mini=1,...,n {ui − li }; 2: Compute m1 = CSFilter(x), R1 = x − m1 ; set r1 = 1, M ∗ = M ∗ ∪ m1 ; 3: while the stopping rule is not satisfied do 4: Randomly generate x ∈ [l, u]; 5: Set o = arg minj=1,...,k dj ≡ x − mj ; 6: if do < Ro then 7: if the direction from x to yo is ascent then 8: Set prob = 1; 9: else do , ro ); 10: Compute prob = φ( R o 11: end if 12: else 13: Set prob = 1; 14: end if 15: if ζ ‡ < prob then 16: Compute m = CSFilter(x); set t = t + 1; 17: if m − mj > γ ∗ Bmin , for all j = 1, . . . , k then 18: Set k = k + 1, mk = m, rk = 1, M ∗ = M ∗ ∪ mk ; compute Rk = x − mk ; 19: else 20: Set Rl = max{Rl , x − ml }; rl = rl + 1; 21: end if 22: else 23: Set Ro = max{Ro , x − mo }; ro = ro + 1; 24: end if 25: end while
– Problem (P1 )
2 5.1 2 5 1 min f (x) ≡ x2 − 2 x1 + x1 − 6 + 10 1 − cos(x1 ) + 10 4π π 8π s.t. −5 ≤ x1 ≤ 10, 0 ≤ x2 ≤ 15 • known global minimum f ∗ = 0.39789. – Problem (P2 )
x41 + min f (x) ≡ 4 − x21 + x1 x2 − 4(1 − x22 )x22 3 s.t. −2 ≤ xi ≤ 2, i = 1, 2 2.1x21
• known global minimum: f ∗ = −1.03160. – Problem (P3 ) min f (x) ≡
n i=1
s.t.
sin(xi ) + sin
2xi 3
3 ≤ xi ≤ 13, i = 1, 2
Towards a High-Performance Implementation of the MCSFilter
• known global minimum: f ∗ = −2.4319. – Problem (P4 ) 1 4 x − 16x2i + 5xi 2 i=1 i 2
min f (x) ≡ s.t.
−5 ≤ xi ≤ 5, i = 1, 2
• known global minimum: f ∗ = −78.3323. – Problem (P5 ) 1 4 x − 16x2i + 5xi min f (x) ≡ 2 i=1 i 3
s.t.
−5 ≤ xi ≤ 5, i = 1, · · · , 3
• known global minimum: f ∗ = −117, 4983. – Problem (P6 ) 1 4 x − 16x2i + 5xi 2 i=1 i 4
min f (x) ≡ s.t.
−5 ≤ xi ≤ 5, i = 1, · · · , 4
• known global minimum: f ∗ = −156, 665. – Problem (P7 ) 1 4 x − 16x2i + 5xi 2 i=1 i 5
min f (x) ≡ s.t.
−5 ≤ xi ≤ 5, i = 1, · · · , 5
• known global minimum: f ∗ = −195, 839. – Problem (P8 ) 1 4 x − 16x2i + 5xi 2 i=1 i 6
min f (x) ≡ s.t.
−5 ≤ xi ≤ 5, i = 1, · · · , 6
• known global minimum: f ∗ = −234, 997. – Problem (P9 ) 1 4 x − 16x2i + 5xi 2 i=1 i 8
min f (x) ≡ s.t.
−5 ≤ xi ≤ 5, i = 1, · · · , 8
21
22
L. Ara´ ujo et al.
• known global minimum: f ∗ = −313, 3287. – Problem (P10 ) 1 4 x − 16x2i + 5xi 2 i=1 i 10
min f (x) ≡ s.t.
−5 ≤ x1 ≤ 5, i = 1, · · · , 10
• known global minimum: f ∗ = −391, 658. – Problem (P11 ) min f (x) ≡ (1 + (x1 + x2 + 1)2 (19 − 14x1 + 3x21 − 14x2 + 6x1 x2 + 3x22 )) × (30 + (2x1 − 3x2 )2 (18 − 32x1 + 12x21 + 48x2 − 36x1 x2 + 27x22 )) s.t.
−2 ≤ xi ≤ 2, i = 1, 2
• known global minimum: f ∗ = 3. – Problem (P12 ) min f (x) ≡
5
5 i cos((i + 1)x1 + i) i cos((i + 1)x2 + i)
i=1
s.t.
−10 ≤ xi ≤ 10, i = 1, 2
i=1
• known global minimum: f ∗ = −186, 731. – Problem (P13 ) x1 x22 + 1 −1 ≤ x2 ≤ 1
min f (x) ≡ cos(x1 ) sin(x2 ) − s.t.
−1 ≤ x1 ≤ 2,
• known global minimum: f ∗ = −2, 0. – Problem (P14 ) min f (x) ≡ (1.5 − x1 (1 − x2 ))2 + (2.25 − x1 (1 − x22 ))2 + (2.625 − x1 (1 − x32 ))2 s.t.
−4.5 ≤ xi ≤ 4.5, i = 1, · · · , 2
• known global minimum: f ∗ = 0. – Problem (P15 ) min f (x) ≡ 0.25x41 − 0.5x21 + 0.1x1 + 0.5x22 s.t. −2 ≤ xi ≤ 2, i = 1, · · · , 2 • known global minimum: f ∗ = −0, 352386.
Towards a High-Performance Implementation of the MCSFilter
3.2
23
Experimental Conditions
The problems were evaluated in a computational system with the following relevant characteristics: CPU - 2.3/4.3 GHz 18-core Intel Xeon W-2195, RAM 32 GB DDR4 2666 MHz ECCR, OS - Linux Ubuntu 20.04.2 LTS, MATLAB - version R2020a, JAVA - OpenJDK 8, C Compiler - gcc version 9.3.0 (-O2 option). Since the MCSFilter algorithm has a stochastic component, 10 runs were performed for each problem. The execution time of the first run was ignored and so the presented execution times are averages of the remaining 9 executions. All three implementations (MATLAB, Java and C) ran using the same parameters, namely, the ones related to the stopping conditions. For the local search CSFilter, αmin = 10−5 was considered in condition (4), as in previous works. For the stopping condition of MCSFilter = 10−2 was considered in condition (5). 3.3
Analysis of the Results
Tables 1, 2 and 3 show the results obtained for each implementation. In all the tables the first column (Prob) has the name of each problem; the second column (minavg ) presents the average number of minimizers obtained in the 9 executions; in the third column (tavg ) the average execution time (in seconds) of 9 runs is shown; the last column (best f ∗ ) shows the best value achieved for the global minimum. One important feature visible in the results of all three implementations is that the global minimum is always achieved, in all problems. Table 1. Results obtained using MATLAB. Prob minavg nfavg
tavg (s)
best f ∗
P1
3
5684,82
0,216
0,398
P2
6
8678,36
0,289
−1,032
P3
4
4265,55
0,178
−2,432
P4
4
4663,27
0,162
−78,332
P5
8
15877,09
0,480
−117,499
P6
16
51534,64
1,438
−156,665
P7
32
145749,64
3,898
−195,831
P8
64
391584,00
10,452
−234,997
P9
256
2646434,55
71,556
−313,329
P10
1023,63 15824590,64 551,614 −391,662
P11
4
39264,73
1,591
3,000
P12
64,36
239005,18
6,731
−186,731
P13
2,45
4653,18
0,160
−2,022
P14
2,27
52964,09
2,157
0,000
P15
2
2374,91
0,135
−0,352
24
L. Ara´ ujo et al.
For the MATLAB implementation, looking at the second column of Table 1 it is possible to state that all the minimizers are found for all the problems except problems P10 , P12 , P13 , P14 . Nevertheless, it is important to note that P10 has 1024 minimizers and an average of 1023,63 were found, and P12 has 760 minimizers and an average of 64,36 minimizers were discovered. P13 is the problem where MCSFilter exhibits the worst behaviour, shared by other algorithms. It is also worth to remark that problem P10 has 10 variables and, taking into account the structure of the CSFilter algorithm, such leads to a large number of function evaluations. This, of course, impacts the execution time and, therefore, problem P10 has the highest execution time of all the problems, taking an average 551,614 s per each run. Table 2. Results obtained using JAVA. Prob minavg nfavg
tavg (s) best f ∗
P1
3
9412,64
0,003
0,3980
P2
6
13461,82
0,005
−1,0320
P3
4
10118,73
0,006
−2,4320
P4
4
10011,91
0,005
−78,3320
P5
8
32990,73
0,013
−117,4980
P6
16
98368,73
0,038
−156,6650
P7
32
274812,36
0,118
−195,8310
P8
64
730754,82
0,363
−234,9970
P9
256
4701470,36
2,868
−313,3290
P10
1024
27608805,73 20,304 −391,6620
P11
4
59438,18
0,009
3,0000
P12
46,45
99022,91
0,035
−186,7310
P13
2,36
6189,09
0,003
−2,0220
P14
2,54
62806,64
0,019
0,0000
P15
2
5439,18
0,002
−0,3520
Considering now the results produced by the Java implementation (Table 2), it is possible to observe a behaviour similar to the MATLAB version, regarding to the best value of the global minimum. This value is always achieved, in all runs, as well as the known number of minimizers – except in problems P12 , P13 and P14 . It is noteworthy that using Java, all the 1024 minimizers were obtained. If the fourth column of Tables 1 and 2 are compared, it is possible to point out that in Java the algorithm clearly takes less time to obtain the same solutions.
Towards a High-Performance Implementation of the MCSFilter
25
Finally, Table 3 shows the results obtained by the new C-based implementation. It can be observed that the numerical behaviour of the algorithm is similar to that observed in the Java version: both implementations find, approximately, the same number of minimizers. However, comparing the execution times of the C version with those of the Java version (Table 2), the C version is clearly faster. Table 3. Results obtained using C. Prob minavg nfavg
tavg (s) best f ∗
P1
3
3434,64
0,001
0,3979
P2
6
7809,73
0,002
−1,0316
P3
4
5733,36
0,002
−2,4320
P4
4
6557,54
0,002
−78,3323
P5
8
17093,64
0,007
−117,4985
P6
16
51359,82
0,023
−156,6647
P7
32
162219,63
0,073
−195,8308
P8
64
403745,91
0,198
−234,9970
P9
255,18
2625482,73
1,600
−313,3293
P10
1020,81 15565608,53 14,724 −391,6617
P11
4
8723,34
0,004
3,0000
P12
38,81
43335,73
0,027
−186,7309
P13
2
2345,62
0,001
−2,0218
P14
2,36
24101,18
0,014
0,0000
P15
2
3334,53
0,002
−0,3524
In order to make discernible the differences in the computational performance of the three MCSFilter implementations, the execution times of all problems considered in this study are represented, side-by-side, in two different charts, accordingly with the order of magnitude of the execution times in the MATLAB version (the slowest one). The average execution times for problems P1 − P5 , P13 and P15 , are represented in Fig. 2; in MATLAB, all these problems executed in less than half a second. For the remaining problems, the execution times are represented in Fig. 3: these include problems P6 − P12 , and P14 , which took between ≈1,5 s to ≈10,5 s to execute in MATLAB, and whose execution times are represented against the primary (left) vertical axis; and also include problems P9 and P10 , whose executions times in MATLAB were ≈71 s and ≈551 s, respectively, and are represented against the (right) secondary axis.
26
L. Ara´ ujo et al.
Fig. 2. Average execution time (s) for problems P1 − P5 , P13 , P15 .
Fig. 3. Average execution time (s) for problems P6 − P12 , P14 .
A quick overview of Fig. 2 and Fig. 3 is enough to conclude that the new C implementation is faster than the previous Java implementation, and much faster than the original MATLAB version of the MCSFilter algorithm (note that logarithmic scales were used in both figures due the different order of magnitude of the various execution times; also, in Fig. 3 different textures were used for
Towards a High-Performance Implementation of the MCSFilter
27
problems P9 and P10 once their execution times are represented against the right vertical axis). It is also possible to observe that, in general, there is a direct proportionality between the execution times of the three code bases: when changing the optimization problem, if the execution time increases or decreases in one version, the same happens in the other versions. To quantify the performance improvement of a version of the algorithm, over a preceding implementation, one can calculate the Speedups (accelerations) achieved. Thus, the speedup of the X version of the algorithm against the Y version of the same algorithm is simply given by S(X, Y ) = T (Y )/T (X) where T (Y ) and T (X) are the average execution times of the Y and X implementations. The relevant speedups in the context of this study are represented in Table 4. Another perspective on the capabilities of the three MCSFilter implementations herein considered builds on the comparison of their efficiency (or effectiveness) in discovering all known optimizers of the optimization problems at stake. A simple metric that yields such efficiency is E(X, Y ) = minavg (X)/minavg (Y ). Table 5 shows the relative optima search efficiency for several pairs of MCSFilter implementations. For all but three problems, the MATLAB, JAVA and C implementations are able to find exactly the same number of optimizers (and so their relative efficiency is 1 or 100%). For problems P12 , P13 and P14 , however, the search efficiency may vary a lot. Compared to the MATLAB version, both the Java and C versions are unable to find as much optimizers for problems P12 and P13 ; for problem P14 , however, the Java version is able to find 12% more optimizers than the MATLAB version, and the C version still lags behind Table 4. Speedups of the execution time. Problem S(Java, MATLAB) S(C, Java) S(C, MATLAB) P1
71,8
2,7
197,4
P2
57,9
2,1
122,3
P3
29,6
3,2
94,5
P4
32,3
2,0
64,7
P5
36,9
1,7
64,5
P6
37,8
1,6
61,2
P7
33,0
1,6
53,2
P8
28,8
1,8
52,7
P9
24,9
1,8
44,7
P10
27,2
1,4
37,5
P11
176,8
2,4
417,9
P12
192,3
1,3
252,3
P13
53,3
2,4
126,3
P14
113,5
1,3
150,4
P15
67,6
1,2
84,4
28
L. Ara´ ujo et al. Table 5. Optima search eficiency. Problem E(Java, MATLAB) E(C, Java) E(C, MATLAB) P1
1
1
1
P2
1
1
1
P3
1
1
1
P4
1
1
1
P5
1
1
1
P6
1
1
1
P7
1
1
1
P8
1
1
1
P9
1
1
1
P10
1
1
1
P11
1
1
1
P12
0,72
0,75
0,54
P13
0,96
0,85
0,81
P14 P15
1,12 1
0,79 1
0,88 1
(finding only 88% of the optimizers found by MATLAB). Also, compared to the Java version, the C version currently shows an inferior search efficiency regarding problems P12 , P13 and P14 , something to be tackled in future work. A final analysis is provided based on the data of Table 6. This table presents, for each problem Y , and for each MCSFilter implementation X, the precision achieved by that implementation as P (X, Y ) = |f ∗ (Y ) − bestf ∗ (X)|, that is, the modulus of the distance between the known global minimum of problem Y and the best value achieved for the global minimum by implementation X. The following conclusions may be derived: in all the problems the best f ∗ is closer to the global minimum known in the literature since the measure used is close to zero; moreover, in the new implementation (using C) there are six problems for which this implementation overcomes the previous two; in five other problems all the implementations obtained the same precision for the best f ∗ .
Towards a High-Performance Implementation of the MCSFilter
29
Table 6. Global optima precision. Problem P(MATLAB) P(Java)
4
P(C)
P1
1,1E − 04
1,1E − 04
P2
4,0E − 04
4,0E − 04 0,0E + 00
1,0E − 05
P3
1,0E − 04
1,0E − 04 1,0E − 04
P4
3,0E − 04
3,0E − 04 0,0E + 00
P5
7,0E − 04
3,0E − 04 2,0E − 04
P6
0,0E + 00
0,0E + 00 3,0E − 04
P7
8,0E − 03
8,0E − 03 8,2E − 03
P8
0,0E + 00
0,0E + 00 0,0E + 00
P9
3,0E − 04
3,0E − 04 6,0E − 04
P10
4,0E − 03
4,0E − 03 3,7E − 03
P11
0,0E + 00
0,0E + 00 0,0E + 00
P12
0,0E + 00
0,0E + 00 1,0E − 04
P13
2,2E − 02
2,2E − 02 2,2E − 02
P14
0,0E + 00
0,0E+00
P15
3,9E − 04
3,9E − 04 1,4E − 05
0,0E + 00
Conclusions and Future Work
The MCSFilter algorithm was used to solve bound constraint problems with different dimensions, from two to ten. The algorithm was originally implemented in MATLAB and the results initially obtained were considered very promising. A second implementation was later developed in Java, which increased the performance considerably. In this work, the MCSFilter algorithm was re-coded in the C language and a comparison was made between all three implementations, both performance-wise and regarding search efficiency and precision. The evaluation results show that, for the set of problems considered, the novel C version, even though it is still a preliminary version, already surpasses the performance of the Java implementation. The search efficiency of the C version, however, must be improved. Regarding precision, the C version matched the previous in 6 problems and brought improvements on 5 other problems, in a total of 15 problems. Besides tackling the numerical efficiency and precision issues that still persist, future work will include testing the C code with other problems (including higher dimension and harder problems), and refining the code in order to improve its performance. In particular, and most relevant for the problems that still take a considerable amount of execution time, parallelization strategies will be exploited as a way to further accelerate the execution of the MCSFilter algorithm. Acknowledgements. This work has been supported by FCT - Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/05757/2020.
30
L. Ara´ ujo et al.
References 1. Abhishek, K., Leyffer, S., Linderoth, J.: FilMINT: an outer-approximation-based solver for convex mixed-integer nonlinear programs. INFORMS J. Comput. 22(4), 555–567 (2010) 2. Abramson, M., Audet, C., Chrissis, J., Walston, J.: Mesh adaptive direct search algorithms for mixed variable optimization. Optim. Lett. 3(1), 35–47 (2009). https://doi.org/10.1007/s11590-008-0089-2 3. Amador, A., Fernandes, F.P., Santos, L.O., Romanenko, A., Rocha, A.M.A.C.: Parameter estimation of the kinetic α-Pinene isomerization model using the MCSFilter algorithm. In: Gervasi, O., et al. (eds.) ICCSA 2018, Part II. LNCS, vol. 10961, pp. 624–636. Springer, Cham (2018). https://doi.org/10.1007/978-3-31995165-2 44 4. Amador, A., Fernandes, F.P., Santos, L.O., Romanenko, A.: Application of MCSFilter to estimate stiction control valve parameters. In: International Conference of Numerical Analysis and Applied Mathematics, AIP Conference Proceedings, vol. 1863, pp. 270005 (2017) 5. Belotti, P., Kirches, C., Leyffer, S., Linderoth, J., Mahajan, A.: Mixed-Integer Nonlinear Optimization. Acta Numer. 22, 1–131 (2013) 6. Bonami, P., et al.: An algorithmic framework for convex mixed integer nonlinear programs. Discrete Optim. 5(2), 186–204 (2008) 7. Bonami, P., Gon¸calves, J.: Heuristics for convex mixed integer nonlinear programs. Comput. Optim. Appl. 51(2), 729–747 (2012) 8. D’Ambrosio, C., Lodi, A.: Mixed integer nonlinear programming tools: an updated practical overview. Ann. Oper. Res. 24, 301–320 (2013). https://doi.org/10.1007/ s10479-012-1272-5 9. Fernandes, F.P.: Programa¸ca ˜o n˜ ao linear inteira mista e n˜ ao convexa sem derivadas. PhD thesis, University of Minho, Braga (2014) 10. Fernandes, F.P., Costa, M.F.P., Fernandes, E.M.G.P., et al.: Multilocal programming: a derivative-free filter multistart algorithm. In: Murgante, B. (ed.) ICCSA 2013, Part I. LNCS, vol. 7971, pp. 333–346. Springer, Heidelberg (2013). https:// doi.org/10.1007/978-3-642-39637-3 27 11. Floudas, C., et al.: Handbook of Test Problems in Local and Global Optimization. Kluwer Academic Publishers, Boston (1999) 12. Hendrix, E.M.T., T´ oth, B.G.: Introduction to Nonlinear and Global Optimization. Springer, New York (2010). https://doi.org/10.1007/978-0-387-88670-1 13. Romanenko, A., Fernandes, F.P., Fernandes, N.C. P.: PID controllers tuning with MCSFilter. In: AIP Conference Proceedings, vol. 2116, pp. 220003 (2019) 14. Yang, X.-S.: Optimization Techniques and Applications with Examples. Wiley, Hoboken (2018)
On the Performance of the ORTHOMADS Algorithm on Continuous and Mixed-Integer Optimization Problems Marie-Ange Dahito1,2(B) , Laurent Genest1 , Alessandro Maddaloni2 , and Jos´e Neto2 1
Stellantis, Route de Gisy, 78140 V´elizy-Villacoublay, France {marieange.dahito,laurent.genest}@stellantis.com 2 Samovar, Telecom SudParis, Institut Polytechnique de Paris, 19 place Marguerite Perey, 91120 Palaiseau, France {alessandro.maddaloni,jose.neto}@telecom-sudparis.eu
Abstract. ORTHOMADS is an instantiation of the Mesh Adaptive Direct Search (MADS) algorithm used in derivative-free and blackbox optimization. We investigate the performance of the variants of ORTHOMADS on the bbob and bbob-mixint, respectively continuous and mixed-integer, testbeds of the COmparing Continuous Optimizers (COCO) platform and compare the considered best variants with heuristic and non-heuristic techniques. The results show a favourable performance of ORTHOMADS on the low-dimensional continuous problems used and advantages on the considered mixed-integer problems. Besides, a generally faster convergence is observed on all types of problems when the search phase of ORTHOMADS is enabled. Keywords: Derivative-free optimization · Blackbox optimization · Benchmarking · Mesh Adaptive Direct Search · Mixed-integer blackbox
1
Introduction
Derivative-free optimization (DFO) and blackbox optimization (BBO) are branches of numerical optimization that have known a fast growth in the past years, especially with the growing need to solve real-world application problems but also with the development of methods to deal with unavailable or numerically costly derivatives. DFO focuses on optimization techniques that make no use of derivatives while BBO deals with problems where the objective function is not analytically known, that is it is a blackbox. A regular blackbox objective is the output of a computer simulation: for instance, at Stellantis, the crash or acoustic outputs computed by the finite element simulation of a vehicle. The problems addressed in this paper are of the form: c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 31–47, 2021. https://doi.org/10.1007/978-3-030-91885-9_3
32
M.-A. Dahito et al.
minimize x∈X
f (x),
(1)
where X is a bounded domain of either Rn or Rc × Zi with c and i respectively the number of continuous and integer variables. n = c + i is the dimension of the problem and f is a blackbox function. Heuristic and non-heuristic techniques can tackle this kind of problems. Among the main approaches used in DFO are direct local search methods. The latter are iterative methods that, at each iteration, evaluate a set of points in a certain radius that can be increased if a better solution is found or decreased if the incumbent remains the best point at the current iteration. The Mesh Adaptive Direct Search (MADS) [1,4,5] is a famous direct local search method used in DFO and BBO that is an extension of the Generalized Pattern Search (GPS) introduced in [28]. MADS evolves on a mesh by first doing a global exploration called the search phase and then, if a better solution than the current iterate is not found, a local poll is performed. The points evaluated in the poll are defined by a finite set of poll directions that is updated at each iteration. The algorithm is derived in several instantiations available in the Nonlinear Optimization with the MADS algorithm (NOMAD) software [7,19] and its performance is evaluated in several papers. As examples, a broad comparison of DFO optimizers is performed on 502 problems in [25] and NOMAD is used in [24] with a DACE surrogate and compared with other local and global surrogate-based approaches in the context of constrained blackbox optimization on an automotive optimization problem and twenty two test problems. Given the growing number of algorithms to deal with BBO problems, the choice of the most adapted method for solving a specific problem still remains complex. In order to help with this decision, some tools have been developed to compare the performance of algorithms. In particular, data profiles [20] are frequently used in DFO and BBO to benchmark algorithms: they show, given some precision or target value, the fraction of problems solved by an algorithm according to the number of function evaluations. There also exist suites of academic test problems: although the latter are treated as blackbox functions, they are analytically known, which is an advantage to understand the behaviour of an algorithm. There are also available industrial applications but they are rare. Twenty two implementations of derivative-free algorithms for solving boxconstrained optimization problems are benchmarked in [25] and compared with each other according to different criteria. They use a set of 502 problems that are categorized according to their convexity (convex or nonconvex), smoothness (smooth or non-smooth) and dimensions between 1 and 300. The algorithms tested include local-search methods such as MADS through NOMAD version 3.3 and global-search methods such as the NEW Unconstrained Optimization Algorithm (NEWUOA) [23] using trust regions and the Covariance Matrix Adaptation - Evolution Strategy (CMA-ES) [16] which is an evolutionary algorithm. Simulation optimization deals with problems where at least some of the objective or constraints come from stochastic simulations. A review of algorithms to solve simulation optimization is presented in [2], among which the NOMAD software. However, this paper does not compare them due to a lack of standard comparison tools and large-enough testbeds in this optimization branch.
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
33
In [3], the MADS algorithm is used to optimize the treatment process of spent potliners in the production of aluminum. The problem is formalized as a 7–dimensional non-linear blackbox problem with 4 inequality constraints. In particular, three strategies are compared using absolute displacements, relative displacements and the latter with a global Latin hypercube sampling search. They show that the use of scaling is particularly beneficial on the considered chemical application. The instantiation ORTHOMADS is introduced in Ref. [1] and consists in using orthogonal directions in the poll step of MADS. It is compared to the initial LTMADS, where the poll directions are generated from a random lower triangular matrix, and to GPS algorithm on 45 problems from the literature. They show that MADS outperforms GPS and that the instantiation ORTHOMADS competes with LTMADS and has the advantage that its poll directions cover better the variable space. The ORTHOMADS algorithm, which is the default MADS instantiation used in NOMAD, presents variants in the poll directions of the method. To our knowledge, the performance of these different variants has not been discussed in the literature. The purpose of this paper is to explore this aspect by performing experiments with the ORTHOMADS variants. This work is part of a project conducted with the automotive group Stellantis to develop new approaches for solving their blackbox optimization problems. Our contributions are first the evaluations of the ORTHOMADS variants on continuous and mixed-integer optimization problems. Besides, the contribution of the search phase is studied and shows a general deterioration of the performance when the search is turned off. The effect however decreases with increasing dimension. Two from the best variants of ORTHOMADS are identified on each of the used testbeds and their performance is compared with other algorithms including heuristic and non-heuristic techniques. Our experiments exhibit particular variants of ORTHOMADS performing best depending on problems features. Plots for analyses are available at the following link: https://github.com/DahitoMA/ResultsOrthoMADS. The paper is organized as follows. Section 2 gives an overview of the MADS algorithm and its ORTHOMADS variants. In Sect. 3, the variants of ORTHOMADS are evaluated on the bbob and bbob-mixint suites that consist respectively of continuous and mixed-integer functions. Then, two from the best variants of ORTHOMADS are compared with other algorithms in Sect. 4. Finally, Sect. 5 discusses the results of the paper.
2
MADS and the Variants of ORTHOMADS
This section gives an overview of the MADS algorithm and explains the differences among the ORTHOMADS variants. 2.1
The MADS Algorithm
MADS is an iterative direct local search method used for DFO and BBO problems. The method relies on a mesh Mk updated at each iteration and determined
34
M.-A. Dahito et al.
by the current iterate xk , a mesh parameter size δk > 0 and a matrix D whose columns consist of p positive spanning directions. The mesh is defined as follows: Mk := {xk + δk Dy : y ∈ Np },
(2)
where the columns of D form a positive spanning set {D1 , D2 , . . . , Dp } and N stands for natural numbers. The algorithm proceeds in two phases at each iteration: the search and the poll. The search phase is optional and similar to a design of experiment: a finite set of points Sk , stemming generally from a surrogate model prediction and a Nelder-Mead (N-M) search [21], are evaluated anywhere on the mesh. If the search fails at finding a better point, then a poll is performed. During the poll phase, a finite set of points are evaluated on the mesh in the neighbourhood of the incumbent. This neighbourhood is called the frame Fk and has a radius of Δk > 0 that is called the poll size parameter. The frame is defined as follows: Fk := {x ∈ Mk : x − xk ∞ ≤ Δk b},
(3)
where b = max{d∞ , d ∈ D} and D ⊂ {D1 , D2 , . . . , Dp } is a finite set of poll directions. The latter are such that their union over iterations grows dense on the unit sphere. The two size parameters are such that δk ≤ Δk and evolve after each iteration: if a better solution is found, they are increased and otherwise decreased. As the mesh size decreases more drastically than the poll size in case of an unsuccessful iteration, the choice of points to evaluate during the poll becomes greater with unsuccessful iteration. Usually, δk = min{Δk , Δ2k }. The description of the MADS algorithm is given in Algorithm 1 and inspired from [6]. Algorithm 1: Mesh Adaptive Direct Search (MADS) Initialize k = 0, x0 ∈ Rn , D ∈ Rn×p , Δ0 > 0, τ ∈ (0, 1) ∩ Q, stop > 0 1. Update δk = min{Δk , Δ2k } 2. Search If f (x) < f (xk ) for x ∈ Sk then xk+1 ← x, Δk+1 ← τ −1 Δk and go to 4 Else go to 3 3. Poll Select Dk,Δk such that Pk := {xk + δk d : d ∈ Dk,Δk } ⊂ Fk If f (x) < f (xk ) for x ∈ Pk then xk+1 ← x, Δk+1 ← τ −1 Δk and go to 4 Else xk+1 ← xk and Δk+1 ← τ Δk 4. Termination If Δk+1 ≥ stop then k ← k + 1 and go to 1 Else stop
2.2
ORTHOMADS Variants
MADS has two main instantiations called ORTHOMADS and LTMADS, the latter being the first developed. Both variants are implemented in the NOMAD
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
35
software but as ORTHOMADS is to be preferred for its coverage property in the variable space, it was used for the experiments of this paper with NOMAD version 3.9.1. The NOMAD implementation of ORTHOMADS provides 6 variants of the algorithm according to the number of directions used in the poll or according to the way that the last poll direction is computed. They are listed below. ORTHO N + 1 NEG computes n + 1 directions among which n are orthogonal and the (n + 1)th direction is the opposite sum of the n first ones. ORTHO N + 1 UNI computes n + 1 directions among which n are orthogonal and the (n + 1)th direction is generated from a uniform distribution. ORTHO N + 1 QUAD computes n + 1 directions among which n are orthogonal and the (n+1)th direction is generated from the minimization of a local quadratic model of the objective. ORTHO 2N computes 2n directions that are orthogonal. More precisely each direction is orthogonal to 2n − 2 directions and collinear with the remaining one. ORTHO 1 uses only one direction in the poll. ORTHO 2 uses two opposite directions in the poll. In the plots, the variants will respectively be denoted using Neg, Uni, Quad, 2N, 1 and 2.
3
Test of the Variants of ORTHOMADS
In this section, we try to identify potentially better direction types of ORTHOMADS and investigate the contribution of the search phase. 3.1
The COCO Platform and the Used Testbeds
The COmparing Continuous Optimizers (COCO) platform [17] is a benchmarking framework for blackbox optimization. In this respect, several suites of standard test problems are provided and are declined in variants, also called instances. The latter are obtained from transformations in variable and objective space in order to make the functions less regular. In particular, the bbob testbed [13] provides 24 continuous problems for blackbox optimization, each of them available in 15 instances and in dimensions 2, 3, 5, 10, 20 and 40. The problems are categorized in five subgroups: separable functions, functions with low or moderate conditioning, ill-conditioned functions, multi-modal functions with global structure and multi-modal weakly structured functions. All problems are known to have their global optima in [−5, 5]n , where n is the size of a problem. The mixed-integer suite of problems bbob-mixint [29] derives the bbob and bbob-largescale [30] problems by imposing integer constraints on some variables. It consists of the 24 functions of bbob available in 15 instances and in dimensions 5, 10, 20, 40, 80 and 160. COCO also provides various tools for algorithm comparison, notably Empirical Cumulative Distribution Function (ECDF) plots (or data profiles) that are
36
M.-A. Dahito et al.
used in this paper. They show the empirical runtimes, computed as the number of function evaluations to reach given function target values, divided by the dimension. A function target value is defined as ft = f ∗ + Δft , where f ∗ is the minimum value of a function f and Δft is a target precision. For the bbob and bbob-mixint testbeds, the target precisions are 51 values between 10−8 and 102 . Thus, if a method reaches 1 in the ordinate axis of an ECDF plot, it means 100% of function target values have been reached, including the smallest one f ∗ + 10−8 . The presence of a cross on an ECDF curve indicates when the maximal budget of function evaluations is reached. After the cross, COCO estimates the runtimes: it is called simulated restarts. For bbob, an artificial solver called best 2009 is present on the plots and is used as reference solver. Its data comes from the BBOB-2009 workshop1 comparing 31 solvers. The statistical significance of the results is evaluated in COCO using the rank-sum test. 3.2
Parameter Setting
In order to test the performance of the different variants of ORTHOMADS, the bbob and bbob-mixint suites of COCO were used, in particular the problems that have a dimension lower than or equal to 20. This limit in the dimensions has two main reasons: the first one is the computational cost required for the experiments and, with the perspective of solving real-world problems, 20 is already a high dimension in this expensive blackbox context. Only the first 5 instances of each function were used, that is a total of respectively 600 and 360 problems used from bbob and bbob-mixint. A maximal function evaluation budget of 2 × 103 × n was set, with n being the dimension of the considered problem. To see the contribution of the search phase, the experiments on the variants were divided in two subgroups: the first one using the default search of ORTHOMADS and the second one where the search phase is disabled. The latter is obtained by setting the four parameters NM SEARCH, VNS SEARCH, SPECULATIVE SEARCH and MODEL SEARCH of NOMAD to the value no. In the plots, the label N oSrch is used when the search is turned off. The search notably includes the use of a quadratic model and of the N-M method. The minimal mesh size was set to 10−11 . Experiments were run with restarts allowed for unsolved problems when the evaluation budget is not reached. This may happen due to internal stopping criteria of the solvers. The initial points used are suggested by COCO through the method initial solution proposal(). 3.3
Results
Continuous Problems. As said previously, the contribution of the search phase was studied. The results aggregated on all functions in dimensions 5, 10 1
https://coco.gforge.inria.fr/doku.php?id=bbob-2009-results.
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
37
and 20 on the bbob suite are depicted on Fig. 1. They show that enabling the search step in NOMAD generally leads to an equivalent or higher performance of the variants and this improvement can be important. Besides, using one or two directions with or without search is often far from being competitive with the other variants. In particular, 1 NoSrch is often the worst or among the worsts, except on Discus which is an ill-conditioned quadratic function, where it competes with the variants that do not use the search. As mentioned in Sect. 1, the plots depicting the results described in the paper are available online. Looking at the results aggregated on all functions for ORTHO 2N, ORTHO N + 1 NEG, ORTHO N + 1 QUAD and ORTHO N + 1 UNI, the search increases the success rate from nearly 70%, 55% and 40% up to 90%, 80% and 65% respectively in dimensions 2, 3 and 5, as shown in Fig. 1a for dimension 5. From dimension 10, the advantage of the search decreases and the performance of ORTHO N + 1 UNI visibly stands out from the other three variants mentioned above since it decreases with or without the search, as illustrated in Figs. 1b and 1c. Focusing on some families of functions, Neg NoSrch seems slightly less impacted than the other NoSrch variants by the increase of the dimension. On ill-conditioned problems, the variants using search are more sensitive to the increase of the dimension. Considering multi-modal functions with adequate global structure, 2N NoSrch solves 15% more problems than the other NoSrch variants in 2D. In this dimension, the variants using search have a better success rate than the best 2009 up to a budget of 200 function evaluations. From 10D, all curves are rather flat: all ORTHOMADS variants tend to a local optimum. With increasing dimension, Neg is competitive or better than the others on multi-modal problems without global structure, followed by 2N. In particular, in dimension 20 both variants are competitive and outperform the remaining variants that use search on the Gallagher’s Gaussian 101–me peaks function, and Neg outperforms them with a gap of more than 20% in their success rate on the Gallagher’s Gaussian 21–hi peaks function which is also ill-conditioned. Since Neg and 2N are often among the best variants on the considered problems and have an advantage on some multi-modal weakly structured functions, they are chosen for comparison with other solvers. Mixed-Integer Problems. The experiments performed on the mixed-integer problems also show a similar or improved performance of the ORTHOMADS variants when the search step is enabled in NOMAD, as illustrated in Fig. 2 in dimensions 5, 10 and 20. Looking at Fig. 2a for instance, in the given budget of 2 × 103 × n, the variant denoted as 2 solves 75% of the problems in dimension 5 against 42% for 2 NoSrch. However, it is not always the case: the only use of the poll directions is sometimes favourable. It is notably the case on the Schwefel function in dimension 20 where the curve Neg NoSrch solves 43% of the problems, which is the highest success rate when the search and non-search settings are compared together.
38
M.-A. Dahito et al.
(a) 5D
(b) 10D
(c) 20D
Fig. 1. ECDF plots: the variants of ORTHOMADS with and without the search step on the bbob problems. Results aggregated on all functions in dimensions 5, 10 and 20.
When the search is disabled, ORTHO 2N seems preferable in small dimension, namely here in 5D as presented in Fig. 2a. In this dimension, it is sometimes the only variant that solves all the instances of a function in the given budget: it is the case for the step-ellipsoidal function, the two Rosenbrock functions (original and rotated), the Schaffer functions, and the Schwefel function. It also solves all the separable functions in 5D and can therefore solve the different types of problems. Although the difference is less noticeable with the search step enabled, this variant is still a good choice, especially on multi-modal problems with adequate global structure. On the whole, looking at Fig. 2, ORTHO 1 and ORTHO 2 solve less problems than the other variants and the gap in performance with the other direction types increases with the dimension, whether using the search phase or not. Although the use of the search helps solving some functions in low dimension such as the sphere or linear slope functions in 5D, both variants perform poorly in dimension 20 on second-order separable functions, even if the search enables the solution of linear slope which is a linear function. Among these two variants, using 2 poll directions also seems better than only one, especially in dimension 10 where ORTHO 2 solves more than 23% and 40% of problems respectively without and with use of search, against 16% and 31% for ORTHO 1 as presented in Fig. 2b. Among the four remaining variants, ORTHO N + 1 UNI reaches equivalent or less targets than the others whether considering the setting where the search is available or when only the poll directions are used, as depicted in Fig. 2. In particular, in dimension 5, the four variants using more than n+1 poll directions solve more than 85% of the separable problems with or without search. But when the dimension increases, ORTHO N + 1 UNI has a disadvantage on the Rastrigin functions where the use of the search does not noticeably help the convergence of the algorithm. Focusing on the different function types, no algorithm among the variants ORTHO 2N, ORTHO N + 1 NEG and ORTHO N + 1 QUAD seem to particularly outperform the others in dimensions 10 and 20. A higher success rate is however noticeable on multimodal weakly structured problems with search available for ORTHO N + 1 NEG in comparison with ORTHO N + 1 QUAD and for the latter in comparison with
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
39
ORTHO 2N. Besides, Neg reaches more targets on problems with low or moderate conditioning. For these reasons, ORTHO N + 1 NEG was chosen for comparison with other solvers. Besides, the mentioned slight advantage of ORTHO N + 1 QUAD over ORTHO 2N, its equivalent or better performance on separable and ill-conditioned functions compared with the latter variant, makes it a good second choice to represent ORTHOMADS.
(a) 5D
(b) 10D
(c) 20D
Fig. 2. ECDF plots: the variants of ORTHOMADS with and without the search step on the bbob-mixint problems. Results aggregated on all functions in dimensions 5, 10 and 20.
4
Comparison of ORTHOMADS with other solvers
The previous experiments showed the advantage of using the search step in ORTHOMADS to speed up convergence. They also revealed the effectiveness of some variants that are used here for comparisons with other algorithms on the continuous and mixed-integer suites. 4.1
Compared Algorithms
Apart from ORTHOMADS, the other algorithms used for comparison on bbob are first, three deterministic algorithms: the quasi-Newton Broyden-FletcherGoldfarb-Shanno (BFGS) method [22], the quadratic model-based NEWUOA and the adaptive N-M [14] that is a simplicial search. Stochastic methods are also used among which a Random Search (RS) algorithm [10] and three populationbased algorithms: a surrogate-assisted CMA-ES, Differential Evolution (DE) [27] and Particle Swarm Optimization (PSO) [11,18]. In order to perform algorithm comparisons on bbob-mixint, data from four stochastic methods were collected: RS, the mixed-integer variant of CMA-ES, DE and the Tree-structured Parzen Estimator (TPE) [8] that is a stochastic model-based technique. BFGS is an iterative quasi-Newton linesearch method that uses approximations of the Hessian matrix of the objective. At iteration k, the search direction pk solves a linear system Bk pk = −∇f (xk ), where xk is the iterate, f the
40
M.-A. Dahito et al.
objective function and Bk ≈ ∇2 f (xk ). The matrix Bk is then updated according to a formula. In the context of BBO, the derivatives are approximated with finite differences. NEWUOA is the Powell’s model-based algorithm for DFO. It is a trust-region method that uses sequential quadratic interpolation models to solve unconstrained derivative-free problems. The N-M method is a heuristic DFO method that uses simplices. It begins with a non degenerated simplex. The algorithm identifies the worst point among the vertices of the simplex and tries to replace it by reflection, expansion or contraction. If none of these geometric transformations of the worst point enables to find a better point, a contraction preserving the best point is done. The adaptive N-M method uses the N-M technique with adaptation of parameters to the dimension, which is notably useful in high dimensions. RS is a stochastic iterative method that performs a random selection of candidates: at each iteration, a random point is sampled and the best between this trial point and the incumbent is kept. CMA-ES is a state-of-the art evolutionary algorithm used in DFO. Let N (m, C) denote a normal distribution of mean m and covariance matrix C. It can be represented by the ellipsoid x C −1 x = 1. The main axes of the ellipsoid are the eigenvectors of C and the square roots of their lengths correspond to the associated eigenvalues. CMA-ES iteratively samples its populations from multivariate normal distributions. The method uses updates of the covariance matrices to learn a quadratic model of the objective. DE is a meta-heuristic that creates a trial vector by combining the incumbent with randomly chosen individuals from a population. The trial vector is then sequentially filled with parameters from itself or the incumbent. Finally the best vector between the incumbent and the created vector is chosen. PSO is an archive-based evolutionary algorithm where candidate solutions are called particles and the population is a swarm. The particles evolve according to the global best solution encountered but also according to their local best points. TPE is an iterative model-based method for hyperparameter optimization. It sequentially builds a probabilistic model from already evaluated hyperparameters sets in order to suggest a new set of hyperparameters to evaluate on a score function that is to be minimized. 4.2
Parameter Setting
To compare the considered best variants of ORTHOMADS with other methods, the 15 instances of each function were used and the maximal function evaluation budget was increased to 105 × n, with n being the dimension. For the bbob problems, the data used for BFGS, DE and the adaptive N-M method comes from the experiments of [31]. CMA-ES was tested in [15], the data of NEWUOA is from [26], the one of PSO is from [12] and RS results come from [9]. The comparison data of CMA-ES, DE, RS and TPE used on
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
41
the bbob-mixint suite comes from the experiments of [29]. All are accessible from the data archives of COCO with the cocopp.archives.bbob and cocopp.archives.bbob mixint methods. 4.3
Results
Continuous Problems. Figures 3 and 4 show the ECDF plots comparing the methods on the different function types and on all functions, respectively in dimensions 5 and 20 on the continuous suite. Compared with BFGS, CMA-ES, DE, the adaptive N-M method, NEWUOA, PSO and RS, ORTHOMADS often performs in the average for medium and high dimensions. For small dimensions 2 and 3, it is however among the most competitive. Considering the results aggregated on all functions and splitting them over all targets according to the function evaluations, they can be divided in three parts. The first one consists of very limited budgets (about 20 × n) where NEWUOA competes with or outperforms the others. After that, BFGS becomes the best for an average budget and CMA-ES outperforms the latter for high evaluation budgets (above the order of 102 × n), as shown in Figs. 3f and 4f. The obtained performance restricted to a low budget is an important feature relevant to many applications for which each function evaluation may last hours or even days. On multi-modal problems with adequate structure, there is a noticeable gap between the performance of CMA-ES, which is the best algorithm on this kind of problems, and the other algorithms as shown by Figs. 3d and 4d. ORTHOMADS performs the best in the remaining methods and competes with CMA-ES for low budgets. It is even the best method up to a budget of 103 × n in 2D and 3D while it competes with CMA-ES in higher dimensions for budgets lower than the order of 102 × n. RS is often the worse algorithm to use on the considered problems. Mixed-Integer Problems. Figures 5 and 6 show the ECDF plots comparing the methods on the different function types and on all functions, respectively in dimensions 5 and 20 on the mixed-integer suite. The comparisons of NEG and QUAD with CMA-ES, DE, RS and TPE show an overall advantage of these ORTHOMADS variants over the other methods. A gap is especially visible on separable and ill-conditioned problems, respectively depicted in Figs. 5a and 6a and Figs. 5c and 6c in dimensions 5 and 20, but also on moderately conditioned problems as shown in Figs. 5b and 6b in 5D and 20D. On multi-modal problems with global structure, ORTHOMADS is to prefer only in small dimensions: from 10D its performance highly deteriorates and CMA-ES and DE seem to be better choices. On multi-modal weakly structured functions, the advantages of ORTHOMADS compared to the others emerge when the dimension increases. Besides, although the performance of all algorithms decreases with increasing dimensions, ORTHOMADS seems less sensitive to that. For instance, for a budget of 102 × n, ORTHOMADS reaches 15% more targets than CMA-ES and TPE that are the second best algorithms until this budget, and in dimension 20 this gap increases to 18% for CMA-ES and 25% for TPE.
42
M.-A. Dahito et al.
(a) Separable
(b) Moderately conditioned
(c) Ill-conditioned
(d) Multi-modal
(e) Weakly structured
(f) All functions
Fig. 3. ECDF plots: comparison of the two variants ORTHO 2N and ORTHO N + 1 NEG of ORTHOMADS with BFGS, NEWUOA, adaptive N-M, RS, CMA-ES, DE and PSO on the bbob problems. Results aggregated on the function types and on all functions in dimension 5.
(a) Separable
(b) Moderately conditioned
(c) Ill-conditioned
(d) Multi-modal
(e) Weakly structured
(f) All functions
Fig. 4. ECDF plots: comparison of the two variants ORTHO 2N and ORTHO N + 1 NEG of ORTHOMADS with BFGS, NEWUOA, adaptive N-M, RS, CMA-ES, DE and PSO on the bbob problems. Results aggregated on the function types and on all functions in dimension 20.
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
43
On the overall picture, presented in Figs. 5f and 6f, RS performs poorly. The budget allocated to TPE, which is only 102 × n, is way smaller than the ones allocated to the other methods. In this limited budget, TPE competes with CMA-ES in 5D and is better or competitive with DE in 10D and 20D. The latter competes with ORTHOMADS after a budget in the order of 103 × n. Thus, after 5 × 103 function evaluations, only DE competes with ORTHOMADS in 5D where both methods reach 70% of function-target pairs. Finally, CMA-ES competes with ORTHOMADS when the budget approaches 104 × n function evaluations. Hence, restricted budgets seem to favour the direct local search method while expensive budgets favour the evolutionary algorithms CMA-ES and DE.
(a) Separable
(b) Moderately conditioned
(c) Ill-conditioned
(d) Multi-modal
(e) Weakly structured
(f) All functions
Fig. 5. ECDF plots: comparison of the two variants ORTHO N + 1 NEG and ORTHO N + 1 QUAD of ORTHOMADS with RS, CMA-ES, DE and TPE on the bbob-mixint problems. Results aggregated on the function types and on all functions in dimension 5.
44
M.-A. Dahito et al.
(a) Separable
(b) Moderately conditioned
(c) Ill-conditioned
(d) Multi-modal
(e) Weakly structured
(f) All functions
Fig. 6. ECDF plots: comparison of the two variants ORTHO N + 1 NEG and ORTHO N + 1 QUAD of ORTHOMADS with RS, CMA-ES, DE and TPE on the bbob-mixint problems. Results aggregated on the function types and on all functions in dimension 20.
5
Conclusion
This paper investigates the performance of the different poll direction types available in ORTHOMADS on continuous and mixed-integer problems from the literature in a blackbox context. On these two types of problems, ORTHO N + 1 NEG competes with or outperforms the other variants of the algorithm whereas using only 1 or 2 directions is often far from being competitive. On the continuous functions considered, the best poll direction types identified are ORTHO N + 1 NEG and ORTHO 2N, especially on multi-modal weakly structured problems. ORTHOMADS is advantageous in small dimensions and achieves mean results for medium and high dimensions compared to the other algorithms. It also performs well on multi-modal problems with global structure where it competes with CMA-ES for limited budgets. For very limited budgets, the trust-region method NEWUOA is favourable on continuous problems, followed by the linesearch method BFGS for a medium budget and finally the evolutionary algorithm CMA-ES for a high budget. The results on the mixed-integer suite show that, among the poll direction types, ORTHO 2N is preferable in small dimension. Otherwise, ORTHO N + 1 NEG and ORTHO N + 1 QUAD are among the best direction types. Comparing them to other methods show that ORTHOMADS often outperforms the compared algorithms and seems more resilient to the increase of the dimension. For limited budgets, ORTHOMADS seems a good choice among the other considered algorithms to solve unconstrained mixed-integer blackbox problems. This is notably interesting
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
45
regarding real-world application problems and, in particular, the mixed-integer optimization problems of Stellantis, where the number of allowed blackbox evaluations is often limited to a few hundreds. In the latter case, the variables are typically the thicknesses of the sheet metals, considered as continuous, and the materials that are categorical variables encoded as integers. Finally, studying the contribution of the search step of ORTHOMADS shows that disabling it generally leads to a deteriorated performance of the algorithm. Indeed, the default search sequentially executes a N-M search and a quadratic model search that enable a global exploration and accelerate the convergence. However, this effect softens when the dimension increases.
References 1. Abramson, M.A., Audet, C., Dennis, J.E., Jr., Le Digabel, S.: OrthoMADS: a deterministic MADS instance with orthogonal directions. SIAM J. Optim. 20(2), 948–966 (2009). https://doi.org/10.1137/080716980 2. Amaran, S., Sahinidis, N.V., Sharda, B., Bury, S.J.: Simulation optimization: a review of algorithms and applications. 4OR 12(4), 301–333 (2014). https://doi. org/10.1007/s10288-014-0275-2 3. Audet, C., B´echard, V., Chaouki, J.: Spent potliner treatment process optimization using a MADS algorithm. Optim. Eng. 9(2), 143–160 (2008). https://doi.org/10. 1007/s11081-007-9030-2 4. Audet, C., Dennis, J.E., Jr.: Mesh adaptive direct search algorithms for constrained optimization. SIAM J. Optim. 17(1), 188–217 (2006). https://doi.org/10.1137/ 040603371 5. Audet, C., Dennis, J.E., Jr.: A progressive barrier for derivative-free nonlinear programming. SIAM J. Optim. 20(1), 445–472 (2009). https://doi.org/10.1137/ 070692662 6. Audet, C., Hare, W.: Derivative-Free and Blackbox Optimization. SSORFE, Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68913-5 7. Audet, C., Le Digabel, S., Tribes, C.: NOMAD user guide. Technical Report G-2009-37, Les cahiers du GERAD (2009). https://www.gerad.ca/nomad/ Downloads/user guide.pdf 8. Bergstra, J., Bardenet, R., Bengio, Y., K´egl, B.: Algorithms for hyperparameter optimization. In: Advances in Neural Information Processing Systems, vol. 24 (2011). https://proceedings.neurips.cc/paper/2011/file/ 86e8f7ab32cfd12577bc2619bc635690-Paper.pdf 9. Brockhoff, D., Hansen, N.: The impact of sample volume in random search on the bbob test suite. In: Proceedings of the Genetic and Evolutionary Computation Conference Companion, GECCO 2019, pp. 1912–1919. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3319619.3326894 10. Brooks, S.H.: A discussion of random methods for seeking maxima. Oper. Res. 6(2), 244–251 (1958). https://doi.org/10.1287/opre.6.2.244 11. Eberhart, R., Kennedy, J.: A new optimizer using particle swarm theory. In: MHS 1995. Proceedings of the Sixth International Symposium on Micro Machine and Human Science, pp. 39–43. IEEE (1995). https://doi.org/10.1109/MHS.1995. 494215
46
M.-A. Dahito et al.
12. El-Abd, M., Kamel, M.S.: Black-box optimization benchmarking for noiseless function testbed using particle swarm optimization. In: Proceedings of the 11th Annual Conference Companion on Genetic and Evolutionary Computation Conference: Late Breaking Papers, GECCO 2009, pp. 2269–2274. Association for Computing Machinery, New York (2009). https://doi.org/10.1145/1570256.1570316 13. Finck, S., Hansen, N., Ros, R., Auger, A.: Real-parameter black-box optimization benchmarking 2009: presentation of the noiseless functions. Technical Report 2009/20, Research Center PPE (2009) 14. Gao, F., Han, L.: Implementing the Nelder-Mead simplex algorithm with adaptive parameters. Comp. Optim. Appl. 51, 259–277 (2012). https://doi.org/10.1007/ s10589-010-9329-3 15. Hansen, N.: A global surrogate assisted CMA-ES. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2019, pp. 664–672. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/ 3321707.3321842 16. Hansen, N., Auger, A.: Principled design of continuous stochastic search: from theory to practice. In: Borenstein, Y., Moraglio, A. (eds.) Theory and Principled Methods for the Design of Metaheuristics. NCS, pp. 145–180. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-33206-7 8 17. Hansen, N., Auger, A., Ros, R., Mersmann, O., Tuˇsar, T., Brockhoff, D.: COCO: a platform for comparing continuous optimizers in a black-box setting. Optim. Meth. Softw. 36(1), 114–144 (2021). https://doi.org/10.1080/10556788.2020.1808977 18. Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proceedings of the IEEE International Conference on Neural Networks, vol. 4, pp. 1942–1948. Citeseer (1995) 19. Le Digabel, S.: Algorithm 909: NOMAD: nonlinear optimization with the MADS algorithm. ACM Trans. Math. Softw. 37(4), 44:1–44:15 (2011). https://doi.org/ 10.1145/1916461.1916468 20. Mor´e, J.J., Wild, S.M.: Benchmarking derivative-free optimization algorithms. SIAM J. Optim. 20(1), 172–191 (2009). https://doi.org/10.1137/080724083 21. Nelder, J.A., Mead, R.: A simplex method for function minimization. Comput. J. 7(4), 308–313 (1965). https://doi.org/10.1093/comjnl/7.4.308 22. Nocedal, J., Wright, S.J.: Numerical Optimization. Springer, New York (2006). https://doi.org/10.1007/978-0-387-40065-5 23. Powell, M.J.D.: The NEWUOA software for unconstrained optimization without derivatives. In: Di Pillo, G., Roma, M. (eds.) Large-Scale Nonlinear Optimization, pp. 255–297. Springer, Boston (2006). https://doi.org/10.1007/0-387-30065-1 16 24. Regis, R.G.: Constrained optimization by radial basis function interpolation for high-dimensional expensive black-box problems with infeasible initial points. Eng. Optim. 46(2), 218–243 (2014). https://doi.org/10.1080/0305215X.2013.765000 25. Rios, L.M., Sahinidis, N.V.: Derivative-free optimization: a review of algorithms and comparison of software implementations. J. Glob. Optim. 56(3), 1247–1293 (2013). https://doi.org/10.1007/s10898-012-9951-y 26. Ros, R.: Benchmarking the NEWUOA on the BBOB-2009 function testbed. In: Proceedings of the 11th Annual Conference Companion on Genetic and Evolutionary Computation Conference: Late Breaking Papers, GECCO 2009, pp. 2421–2428. Association for Computing Machinery, New York (2009). https://doi.org/10.1145/ 1570256.1570338 27. Storn, R., Price, K.: Differential evolution-A simple and efficient heuristic for global optimization over continuous spaces. J. Glob. Optim. 11(4), 341–359 (1997). https://doi.org/10.1023/A:1008202821328
ORTHOMADS on Continuous and Mixed-Integer Optimization Problems
47
28. Torczon, V.: On the convergence of pattern search algorithms. SIAM J. Optim. 7(1), 1–25 (1997). https://doi.org/10.1137/S1052623493250780 29. Tuˇsar, T., Brockhoff, D., Hansen, N.: Mixed-integer benchmark problems for singleand bi-objective optimization. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2019, pp. 718–726. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3321707.3321868 30. Varelas, K., et al.: A comparative study of large-scale variants of CMA-ES. In: Auger, A., Fonseca, C.M., Louren¸co, N., Machado, P., Paquete, L., Whitley, D. (eds.) PPSN 2018. LNCS, vol. 11101, pp. 3–15. Springer, Cham (2018). https:// doi.org/10.1007/978-3-319-99253-2 1 31. Varelas, K., Dahito, M.A.: Benchmarking multivariate solvers of SciPy on the noiseless testbed. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2019, pp. 1946–1954. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3319619.3326891
A Look-Ahead Based Meta-heuristics for Optimizing Continuous Optimization Problems Thomas Nordli and Noureddine Bouhmala(B) University of South-Eastern Norway, Kongsberg, Norway {thomas.nordli,noureddine.bouhmala}@usn.no http://www.usn.no
Abstract. In this paper, the famous kernighan-Lin algorithm is adjusted and embedded into the simulated annealing algorithm and the genetic algorithm for continuous optimization problems. The performance of the different algorithms are evaluated using a set of well known optimization test functions. Keywords: Continuous optimization problems Genetic algorithm · Local search
1
· Simulated annealing ·
Introduction
Several types of meta-heuristics methods have been designed for solving continuous optimization problems. Examples include genetic algorithms [8,9] artificial immune systems [7], and taboo search [5]. Meta-heuristics can be divided into two different classes. The first class refers to single-solution search algorithms. A notable example that belongs to this class is the popular simulated annealing algorithm (SA) [12], which is a random search that avoids getting stuck in local minima. In addition to solutions corresponding to an improvement in objective function value, SA also accepts those corresponding to a worse objective function value using a probabilistic acceptance strategy. The second class of algorithms refer to population based algorithms. Algorithms of this class applies the principle of survival of the fittest to a population of potential solutions, iteratively improving the population. During each generation, pairs of solutions called individuals are generated to breed a new generation using operators borrowed from natural genetics. This process is repeated until a stopping criteria has been reached. Genetic algorithm is one among many that belongs to this class. The following papers [1,2,6] provide a review of the literature covering the use of evolutionary algorithms for solving continuous optimization problems. In spite of the advantages that meta-heuristics offer, they still suffer from the phenomenon of premature convergence. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 48–55, 2021. https://doi.org/10.1007/978-3-030-91885-9_4
A Look-Ahead Based Meta-heuristics for Continuous Optimization
49
Recently, several studies combined meta-heuristics with local search methods, resulting in more efficient methods with relatively faster convergence, compared to pure meta-heuristics. Such hybrid approaches offer a balance between diversification—to cover more regions of a search space, and intensification – to find better solutions within those regions. The reader might refer to [3,14] for further reading on hybrid optimization methods. This paper introduces a hybridization of genetic algorithm and simulated annealing with the variable depth search (VDS) Kernighan-Lin algorithm (KL) (which was firstly presented for graph partitioning problem in [11]). Compared to simple local search methods, KL allows making steps that worsens the quality of the solution on a short term, as long as the result gives an improvement in a longer run. In this work, the search for one favorable move in SA, and one two-point cross-over in GA, are replaced by a search for a favorable sequence of moves in SA and a series of two-point crossovers using the objective function to guide the search. The rest of this paper is organized as follows. Section 2 describes the combined simulated annealing and KL heuristic, while Sect. 3 explains the hybridization of KL with the genetic algorithm. Section 4 lists the functions used in the benchmark while Section 5 shows the experimental results. Finally, Sect. 6 concludes the paper with some future work.
2
Combining Simulated Annealing with Local Search
Previously, SA in combination with KL, was applied for the Max-SAT problem in [4]. SA iteratively improves a solution by making random perturbations (moves) to the current solution—exploring the neighborhood in the space of possible solutions. It uses a parameter called temperature to control the decision whether to accept bad moves or not. A bad move is a solution that decreases the value of the objective function. The algorithm starts of with a high temperature, when that almost all moves are accepted. For each iteration, the temperature decreases, the algorithm becomes selective, giving higher preference for better solutions. Assuming an objective function f is to be maximized. The algorithm starts computing the initial temperature T, using a procedure similar to the one described in [12]. The temperature is computed such that the probability of accepting a bad move is approximately equal to a given probability of acceptance P r. First, a low value of is chosen as the initial temperature. This temperature is used during a number of moves. If the ratio of accepted bad moves is less than P r, the temperature is multiplied by two. This continues until the observed acceptance ratio exceeds P r. A random starting solution is generated and its value is calculated. An iteration of the algorithm starts by performing a series of so-called KL perturbations or i where i denotes the moves to the solution Sold leading to a new solution Snew number of consecutive moves. The change in the objective function called gain is
50
T. Nordli and N. Bouhmala
computed for each move. The goal of KL perturbation is to generate a sequence of objective function scores together with their corresponding moves. KL is supposed to reach convergence if the function scores of five consecutive moves are k bad moves. The subset of moves having the best cumulative score BCS(SA+KL) is identified. The identification of this subset is equivalent to choosing k so that k in Eq. 1 is maximum, BCS(SA+KL) k BCS(SA+KL) =
k
i gain(Snew )
(1)
i=1
where i represents the ith move performed, k the number of a moves, and i i i−1 ) = f (Snew ) − f (Snew ) denotes the resultant change of the objective gain(Snew th k > 0, the solution function when i move has been performed. If BCS(SA+KL) is updated by taking all the perturbations up to the index k and the best soluk ≤ 0), the simulated acceptance test is tion is always recorded. If (BCSSA+KL restricted to only the resultant change of the first perturbation. A number from the interval (0,1) is drawn by a random number generator. The move is accepted ff the drawn number is less than exp−δf /T . The process of proposing a series of perturbations and selecting the best subset of moves is repeated for a number of iterations before the temperature is updated. A temperature reduction function is used to lower the temperature. The updating of the temperature is done using a geometric cooling, as shown in Eq. 2 Tnew = α × Told , where α = 0.9.
3
(2)
Combining Genetic Algorithm with Local Search
Genetic Algorithm (GA) belong to the group of evolutionary algorithms. It works on a set of solutions called a population. Each of these members, called chromosomes or individuals, is given a score (fitness), allowing the assessing of its quality. The individuals of the initial population are in most cases generated randomly. A reproduction operator selects individuals as parents, and generates off-springs by combining information from the parent chromosomes. The new population might be subject to a mutation operator introducing diversity to the population. A selection scheme is then used to update the population—resulting in a new generation. This is repeated until the convergence is reached—giving an optimal or near optimal solution. The simple GA as described in [8] is used here. It starts by generating an initial population represented by floating point numbers. Solutions are temporary converted to integers when bit manipulation is needed, and resulting integers are converted back to floating point representation for storage. A roulette function is used for selections. The implementation and based on the one described in section IV of [10], where more details can be found. The purpose of KL-Crossover is to perform the crossover operator a number of times generating a sequence of fitness function scores together with their corresponding crossover. Thereafter, the subset of consecutive crossovers having the
A Look-Ahead Based Meta-heuristics for Continuous Optimization
51
k best cumulative score BCS(GA−KL) is determined. The identification of this subk set is the same as described in SA-KL. GA-KL chooses k so that BCS(GA+KL) in Eq. 4 is maximum, where CRi represents the ith crossover performed on two individuals, Il and Im , k the number of allowed crossovers, and gain(Il , Im )CRi denotes the resulting change in the fitness function when the ith crossover CRi has been performed calculated shown in Eq. 3.
gain(Il , Im )CRi = f (Il , Im )CRi − f (Il , Im )CRi−1 ,
(3)
where CR refers to the chosen pair of parents before applying the crossover operator. KL-crossover is supposed to reach convergence if the gain of five consecutive cross-overs is negative. Finally, the individuals that are best fit are allowed to move to the next generation while the other half is removed and a new round is performed. 0
k BCS(GA+KL)
= M ax
k
gain(Individuall , Individualm )CRi .
(4)
i=1
4
Benchmark Functions and Parameter Setting
The stopping criterion for all four algorithms (SA, SA-Look-Ahead, GA, GALook-Ahead) is supposed to be reached if the best solution has not been improved during 100 consecutive iterations for (SA, SA-Look-Ahead) or 10 generations for (GA, GA-Look-Ahead). The starting temperature for (SA, Look-Ahead-SA) is set to 0.8 (i.e., a bad move has a probability of 80% for being accepted). In the inner loop of (SA, Look-Ahead-SA), the equilibrium is reached if the number of accepted moves is less than 10%. The ten following benchmark functions were retrieved from [13] and tested.
1: Drop Wave 2: Griewangk 3: Levy Function 4: Rastrigin 5: Sphere Function 6: Weighted Sphere Function 7: Sum of different power functions 8: Rotated hyper-ellipsoid 9: Rosenbrock’s valley 10: Three Hump Camel Function
1+cos(12 x2 +y 2 ) 1 (x2 +y 2 )+2 2 n n x 1 √i f (x) = i=1 − i=1 cos( i ) + 1 4000 f (x, y) = −
sin2 (3πx) + (x − 1)2 [1 + sin2 (3πy)] + (y − 1)2 [1 + sin2 (2πy)] n 2 i=1 (xi − 10 cos 2πxi ) n 2 f (x) = x i=1 i f (x) = 10n +
f (x, y) = x2 + 2y 2 n i+1 i=1 |xi | n i 2 f (x) = i=1 j=1 xj n−1 2 2 f (x) = [100(xi+1 − x2 i ) + (1 − xi ) ] i=1 6 f (x, y) = x2 − 1.05x4 + x + xy + y 2 6 f (x) =
52
T. Nordli and N. Bouhmala
Fig. 1. Functions 1–6: GA vs. GA-KL
5
Experimental Results
The results are visualized in Fig. 1, 2 and 3, where both the mean and the best solution over 100 runs are plotted. The X-axis shows the number of generations (for GA and GA-KL—Fig. 1 and 2) or the iterations (for SA and SA-KL—Fig. 3), while the Y-axis gives the absolute error (i.e. the excess of deviation from the optimal solution). Figures 1 and 2 compares GA against GA-KL (GA-Look-Ahead). Looking at the mean solution, GA delivers on average lower absolute error solutions on almost 9 cases out of 10. The average percentage change error reduction in favor of GA is 5% for function 1, 12% for function 2, 43% for function 4, within 1% for functions 5, 6, 7 and 8, 14% for function 9 and finally 2% for 10. Function
A Look-Ahead Based Meta-heuristics for Continuous Optimization
53
Fig. 2. Functions 7–10: GA vs. GA-KL
3 was the only test case where GA-Look-Ahead wins with an average percentage change error reduction of 26%. On the other hand, comparing the curves representing the evolution of the (best solution) fittest individual produced by the two algorithms, GA-Look-Ahead is capable of reaching solutions of higher precision when compared to GA (10−8 versus 10−6 for function 2, 10−11 versus 10−6 for function 3, 10−19 versus 10−10 for function 5, 10−15 versus 10−9 for function 6, 10−21 versus 10−12 for function 7, 10−16 versus 10−6 for function 8, 10−14 versus 10−10 for function 10. The diversity of the population produced by GA-Look-Ahead enables GA from premature convergence phenomenon leading GA to continue for more generations before convergence is reached. GA-LookAhead performed 69% more generations compared to GA for function 3, 82% for function 5, 57% for function 6, and 25% for function 10. Figure 3 shows the results for SA and SA-KL (SA-Look-Ahead). Looking at the evolution of the mean, both methods produce similar quality of results while SA is showing insignificantly lower absolute error on few cases. However, when comparing the best versus the best, SA-Look-Ahead delivers solutions of better precision than SA. The precision rate is 10−10 versus 10−8 for function 1, 10−11 versus 10−6 for function 4, 10−15 versus 10−9 for function 7, and 10−7 versus 10−4 for function 9.
54
T. Nordli and N. Bouhmala
Fig. 3. Functions 1, 4, 7, 9: SA vs. SA-KL
6
Conclusion
Meta-heuristics global optimization algorithms have become widely popular for solving global optimization problems. In this paper, both SA and GA have been combined for the first time with the popular Kernighan-Lin heuristic used for the graph partitioning problem. The main idea is to replace the search for one possible perturbation in SA or one typical crossover in GA by a search for favorable sequence of perturbations or crossovers using the objective function to be optimized to guide the search. The results presented in this paper show that the proposed scheme enables both SA and GA to reach solutions of higher accuracy which is the significant result of the present study. In addition, the proposed scheme enables GA to maintain the diversity of the population for a longer period preventing GA from reaching premature convergence which still remains a serious defect in GA when applied to both continuous and discrete optimization. With regard to the future, we believe that the performance of the strategy could be further improved by selecting the type of perturbations to be processed by introducing a probability of acceptance at the level of the Kernighan-Lin heuristic whenever a bad move is to be selected.
A Look-Ahead Based Meta-heuristics for Continuous Optimization
55
References 1. Ardia, D., Boudt, K., Carl, P., Mullen, K., Peterson, B.G.: Differential evolution with DEoptim: an application to non-convex portfolio optimization. R J. 3(1), 27–34 (2011) 2. Ardia, D., David, J., Arango, O., G´ omez, N.D.G.: Jump-diffusion calibration using differential evolution. Wilmott 2011(55), 76–79 (2011) 3. Arun, N., Ravi, V.: ACONM: A Hybrid of Ant Colony Optimization and NelderMead Simplex Search. Institute for Development and Research in Banking Technology (IDRBT), India (2009) 4. Bouhmala, N.: Combining simulated annealing with local search heuristic for MAXSAT. J. Heuristics 25(1), 47–69 (2019). https://doi.org/10.1007/s10732-018-93869 5. Chelouah, R., Siarry, P.: Tabu search applied to global optimization. Eur. J. Oper. Res. 123(2), 256–270 (2000) 6. Chelouah, R., Siarry, P.: Genetic and Nelder-mead algorithms hybridized for a more accurate global optimization of continuous multiminima functions. Eur. J. Oper. Res. 148(2), 335–348 (2003) 7. De Castro, L.N., Von Zuben, F.J.: Learning and optimization using the clonal selection principle. IEEE Trans. Evol. Comput. 6(3), 239–251 (2002) 8. Goldberg, D.E.: Genetic algorithms in search. Optimization, and Machine Learning (1989) 9. Holland John, H.: Adaptation in Natural and Artificial Systems. University of Michigan Press, Ann Arbor (1975) 10. Jensen, B., Bouhmala, N., Nordli, T.: A novel tangent based framework for optimizing continuous functions. J. Emerg. Trends Comput. Inf. Sci. 4(2), 239–247 (2013) 11. Kernighan, B.W., Lin, S.: An efficient heuristic procedure for partitioning graphs. Bell Syst. Tech. J. 49(2), 291–307 (1970) 12. Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983) 13. Surjanovic, S., Bingham, D.: Virtual library of simulation experiments: Test functions and datasets. http://www.sfu.ca/∼ssurjano 14. Tank, M.: An ant colony optimization and Nelder-mead simplex search hybrid algorithm for unconstrained optimization (2009)
Inverse Optimization for Warehouse Management Hannu Rummukainen(B) VTT Technical Research Centre of Finland, P.O. Box 1000, 02044 Espoo, Finland [email protected] Abstract. Day-to-day operations in industry are often planned in an ad-hoc manner by managers, instead of being automated with the aid of mathematical optimization. To develop operational optimization tools, it would be useful to automatically learn management policies from data about the actual decisions made in production. The goal of this study was to investigate the suitability of inverse optimization for automating warehouse management on the basis of demonstration data. The management decisions concerned the location assignment of incoming packages, considering transport mode, classification of goods, and congestion in warehouse stocking and picking activities. A mixed-integer optimization model and a column generation procedure were formulated, and an inverse optimization method was applied to estimate an objective function from demonstration data. The estimated objective function was used in a practical rolling horizon procedure. The method was implemented and tested on real-world data from an export goods warehouse of a container port. The computational experiments indicated that the inverse optimization method, combined with the rolling horizon procedure, was able to mimic the demonstrated policy at a coarse level on the training data set and on a separate test data set, but there were substantial differences in the details of the location assignment decisions. Keywords: Multi-period storage location assignment problem · Class-based storage · Inverse optimization · Mixed-integer linear programming
1
Introduction
Many industrial management and planning activities involve effective use of available resources, and mathematical optimization algorithms could in principle be applied to make better decisions. However, in practice such activities are often planned manually, using computers only to track and communicate information without substantially automating the decision making process itself. The reasons for the limited use of optimization include the expense of customising optimization models, algorithms and software systems for individual business needs, and the complexity of real-world business processes and operating environments. The larger the variety of issues one needs to consider in the planning, c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 56–71, 2021. https://doi.org/10.1007/978-3-030-91885-9_5
Inverse Optimization for Warehouse Management
57
the more complex an optimization model is needed, which can make it very challenging to find a satisfactory solution in reasonable time, whether by generic optimization algorithms or case-specific customized heuristics. Moreover, the dynamic nature of business often necessitates regular updates to any decision support tools as business processes and objectives change. To make it easier to develop industrial decision support tools, one potential approach is to apply machine learning methods to data from existing planning processes. The data on actual decisions can be assumed to indicate the preferences of competent decision makers, who have considered the effects of all relevant factors and operational constraints in each decision. If a general control policy can be derived from example decisions, the policy can then be replicated in an automated decision support tool to reduce the manual planning effort, or even completely automate the planning process. There would be no need to explicitly model the preferences of the operational management at a particular company. Ideally the control policy learned from data is generalisable to new planning situations that differ from the training data, and can also be explained in an understandable manner to business managers. In addition to implementing tools for operational management, machine learning of management policies could also be a useful tool when developing business simulation models for strategic decision support. The goal of this case study was to investigate whether inverse optimization would be a suitable machine learning method to automate warehouse management on the basis of demonstration data. In the study, inverse optimization was applied to the problem of storage location assignment, i.e. where to place incoming packages in a large warehouse. A mixed-integer model and a column generation procedure were formulated for dynamic class-based storage location assignment, with explicit consideration for the arrival and departure points of goods, and possible congestion in warehouse stocking and picking activities. The main contributions of the study are 1) combining the inverse optimization approach of Ahuja and Orlin [1] with a cutting plane algorithm in the first known application of inverse optimization to a storage location assignment problem, and 2) computational experiments on applying the estimated objective function in a practical rolling horizon procedure with real-world data.
2
Related Work
A large variety of analytical approaches have been published for warehouse design and management [6,8,12,21]. Hausman et al. [10] presented an early analysis of basic storage location assignment methods including random storage, turnover-based storage in which highest-turnover products are assigned to locations with the shortest transport distance, and class-based storage in which products are grouped into classes that are associated with areas of the warehouse. The location allocation decisions of class-based storage policies may be based on simple rules such as turnover-based ordering, or an explicit optimization model as in [18].
58
H. Rummukainen
Goetschalckx and Ratliff [7] showed that information about storage durations of arriving units can be used in a duration-of-stay-based (DOS-based) shared storage policy that is more efficient than an optimal static dedicated (classbased or product-based) storage policy. Kim and Park [13] used a subgradient optimization algorithm for location allocation, assuming full knowledge of storage times and amounts over the planning interval. Chen et al. [5] presented a mixed-integer model and heuristic algorithms to minimize the peak transport load of a DOS-based policy. In the present study, more complex DOS-based policies are considered, with both dynamic class-based location assignment and congestion costs. Updating class-based assignments regularly was proposed by Pierre et al. [20], and further studied by Kofler et al. [14], who called the problem multi-period storage location assignment. Their problem was quite similar to the present study, but both Pierre et al. and Kofler et al. applied heuristic rules without an explicit mathematical programming model, and also included reshuffling moves. The problem of yard planning in container terminals is closely related to warehouse management, and a number of detailed optimization models have been published. [17,24] Congestion constraints for lanes in the yard were already considered by Lee et al. [9,15] Moccia et al. [16] considered storage location assignment as a dynamic generalized assignment problem, in which goods could be relocated over time, but each batch of goods would have to be treated as an unsplittable unit. The present study does not address relocation, but is differentiated by class-based assignment, as well as the use of inverse optimization. Pang and Chan [19] applied a data mining algorithm as a component of a dynamic storage location assignment algorithm, but they did not use any external demonstration policy in their approach. Learning to replicate a control policy demonstrated by an expert has been studied by several computational methods, in particular as inverse optimization [1,3,22] and inverse reinforcement learning [2]. Compared to more generic supervised machine learning methods, inverse optimization and reinforcement learning methods have the advantage that they can take into account the future consequences of present-time actions. The author is not aware of any prior work in applying inverse optimization or inverse reinforcement learning to warehouse management problems. In a rolling horizon procedure, the plan is reoptimized regularly so that consecutive planning periods overlap. Troutt et al. [23] considered the problem of estimating the objective function of a rolling horizon optimization procedure from demonstrated decisions. They assumed that the initial state for each planning period could be fixed according to the demonstrated decisions, and then minimized the sum of decisional regret over the planning periods: the decisional regret of a planning period was defined as a function of objective function coefficients, and equals the gap between the optimal objective value and the objective value of the demonstrated decisions over the planning period. In the present study, the inverse optimization was performed on a model covering the full
Inverse Optimization for Warehouse Management
59
demonstration period, and the rolling horizon procedure was not explicitly considered in the inverse optimization at all.
3
Storage Location Assignment Model
Fig. 1. Schematics of the warehouse model structure. Left: small-scale example with all connections shown. Right: larger example, with cut down connections for clarity. Goods flow from arrival nodes (solid circles) to storage locations (outlined boxes) and later on to departure nodes (open circles). Locations are grouped into areas (shaded) for congestion modelling.
The basic structure of the storage location assignment model is illustrated in Fig. 1. The model covers a number of discrete storage locations with limited capacity. Goods arrive to storage in discrete packages from one or more arrival nodes, and leave through departure nodes: the nodes may represent e.g. loading/unloading points of different transport modes, or manufacturing cells at a factory. The storage locations are grouped into areas for the purpose of modelling congestion: simultaneous stocking and picking operations on the same area may incur extra cost. In a typical warehouse layout an area would represent a single aisle, as illustrated on the right in Fig. 1. Goods are divided into distinct classes, and one location can only store one class of packages simultaneously. For each arriving package, the decision maker is assumed to know a probability distribution on arrival nodes and departure nodes, as well as the expected storage duration in discrete time units. The decision maker must choose a storage location for each package. The parametric objective function is based on distance parameters between arrival and departure nodes and locations, per-area congestion levels per time step, and cost of storage location allocation. Each location has a fixed capacity, representing available storage volume. Packages are assumed to stay in one location for their entire stay, i.e. relocation actions are not considered. In this study, a mixed-integer linear programming model was developed for storage location assignment over a set of discrete time steps T . The packages to be stored over the planning period were assumed to be known deterministically
60
H. Rummukainen
in advance. Although the model was intended to be applicable in a relatively short-term rolling-horizon procedure, in the inverse optimization method a linear relaxation of the model was used on historical data over a longer period. 3.1
Definitions
Let K be the index set of packages to be stored. There are qk capacity units of packages of kind k ∈ K, stored over time interval Tk ⊆ T . The begin and end time of interval Tk together form the set Tk ⊆ Tk . Denoting the set of arrival and departure nodes by N , packages of kind k ∈ K are assumed to arrive via node n ∈ N by probability πnk and depart via node n by probability πkn . The amount qk is split proportionally between the nodes, so that the amounts of arrivals and departures via n ∈ N are given by πnk qk and πkn qk ; effectively, the optimization objective is the expected cost of the location assignment. The set of storage locations L is grouped into distinct areas A, which are identified with subsets of L. Location l ∈ L can hold Cl capacity units. In order to define piecewise linear area congestion costs, flows to/from areas are specified in R pieces of D capacity units, for a total maximum flow of RD capacity units. For purposes of class-based location assignment, the package kinds K are grouped into distinct classes B, identified with subsets of K. At each time step, the subset of locations occupied by packages of one class is called a pattern. Let P denote the set of patterns, i.e. feasible subsets of L; although the set P is in principle exponential in the number of locations, it is constructed incrementally in a column generation procedure. In rolling horizon planning, the warehouse already contains initial stock at the beginning of the planning period. Let Qtl denote the amount of initial stock remaining at time t ∈ T in location l ∈ L, and Qta be the amount of initial stock transported at time t ∈ T from area a ∈ A. 3.2
Location Assignment Model
The location assignment mixed-integer program includes the following decision variables: xkl ≥ 0 fraction of kind k ∈ K assigned to location l ∈ L, zbpt ∈ {0, 1} assignment of class b ∈ B to location pattern p ∈ P at time t ∈ T , ytar ≥ 0 flow at time t ∈ T from/to area a ∈ A at discretisation level r ∈ {1, . . . , R}. The corresponding objective function coefficients are independent of time: ckl cost of assigning packages of kind k ∈ K to location l ∈ L cbp cost per time step of using pattern p ∈ P for class b ∈ B car transfer cost from/to area a ∈ A at flow discretisation level r ∈ {1, . . . , R} The piecewise linear flow costs must be convex so that the model can be formulated without any additional integer variables. Specifically, the car coefficients must be increasing in r, that is car ≤ car for all a ∈ A and r < r .
Inverse Optimization for Warehouse Management
The location assignment mixed-integer program is: min cbp zbpt + ckl xkl + car ytar b∈B, p∈P, t∈T
k∈K, l∈L
61
(1)
t∈T, a∈A, r=1,...,R
zbpt = 1
∀b ∈ B, t ∈ T
(2)
zbpt ≤ 1
∀t ∈ T, l ∈ L
(3)
∀b ∈ B, k ∈ b, t ∈ Tk , l ∈ L
(4)
∀k ∈ K
(5)
∀t ∈ T, l ∈ L
(6)
∀t ∈ T, a ∈ A
(7)
∀t ∈ T, a ∈ A, r = 1, . . . , R
(8)
p∈P
b∈B, pl
xkl −
zbpt ≤ 0
pl
xkl = 1
l∈L
qk xkl ≤ Cl − Qtl
k∈K: Tk t
ytar −
r=1,...,R
qk xkl = Qta
k∈K: Tk t, l∈a
ytar ≤ D
The objective function (1) is the sum of class-pattern assignment costs, kindlocation assignment costs, and piecewise linear area congestion costs. The constraints (2) require each class of goods to be assigned to a unique location pattern on each time step, and the constraints (3) require that two different classes of goods cannot be at the same location at the same time. The constraints (4) disallow kind-location choices xkl that are inconsistent with the class-pattern choices zbpt . The constraints (5) require all goods to be assigned to some location. The constraints (6) bound storage volumes by storage capacity. The constraints (7) link the area flows ytar to the kind-location choices xkl and flows of initial stocks Qta , and the constraints (8) bound feasible flow volumes. 3.3
Cost Model
The cost coefficients cbp , ckl , clm , car are defined in terms of the following cost parameters, which are treated as variables in the inverse optimization. dnl ≥ 0 transfer cost per capacity unit from node n ∈ N to location l ∈ L dln ≥ 0 transfer cost per capacity unit from location l ∈ L to node n ∈ N γl ≥ 0 cost per time step of allocating location l ∈ L δ ≥ 0 cost per distance unit per time step, based on the diameter of an allocation pattern (The diameter of a pattern is the maximum distance between two locations in the pattern.) αr ≥ 0 marginal cost per capacity unit for area flow level r
62
H. Rummukainen
The above parameters have nominal values, indicated by superscript 0, which are set a priori before inverse optimization. For the nominal transfer costs d0nl and d0ln , the physical distance between node n and location l was used. The nominal cost γl0 was set proportionally to the capacity of location l, and the nominal pattern diameter cost δ 0 was set 0. The nominal marginal flow costs αr0 were set 0 below an estimated flow capacity bound, and a high value above that. Additionally, d0ll is used to denote the physical distance between locations l, l ∈ L. The cost model can now be stated as: γl + δ max d0ll (9) cbp = l,l ∈p
l∈p
ckl = qk
(πnk dnl + πkn dln )
(10)
n∈N r
car =
αj
(11)
j=1
Note that (11) is defined as a sum to ensure that the cost coefficients car are increasing in r. 3.4
Dual Model
Let us associate dual variables with the constraints of the location assignment model as follows: ψbt ∈ R for (2), φtl ≥ 0 for (3), ξktl ≥ 0 for (4), μk ∈ R for (5), λtl ≥ 0 for (6), ηta ∈ R for (7), and θtar ≥ 0 for (8). The dual of the linear relaxation of the location assignment model (1)–(8) can now be formulated: ψbt − φtl + μk − (Cl −Qtl )λtl + Qta ηta − Dθtar (12) max b∈B, t∈T
t∈T, l∈L
ψbt −
l∈p
−
t∈Tk
ξktl + μk −
t∈Tk
k∈K
t∈T, l∈L
φtl +
ξktl ≤ cbp
t∈T, a∈A, r=1,...,R
∀b ∈ B, p ∈ P, t ∈ T (13)
k∈b: Tk t, l∈p
qk λtl −
qk ηta ≤ ckl
∀k ∈ K, l ∈ L (14)
t∈Tk a∈A: l∈a
ηta − θtar ≤ car 3.5
t∈T, a∈A
∀t ∈ T, a ∈ A, r = 1, . . . , R (15)
Pattern Generation
To find a solution to the location assignment model (1)–(8), a column generation procedure was applied to its linear relaxation, then the set of patterns P was fixed, and the problem was finally resolved as a mixed-integer program. This is a heuristic that does not guarantee optimality for the mixed-integer problem.
Inverse Optimization for Warehouse Management
63
Potentially profitable patterns can be found by detecting violations of dual constraint (13). Specifically, the procedure seeks p ⊆ L, b ∈ B and t ∈ T that maximize, and reach a positive value for the expression ψbt − φtl + ξktl − cbp = ψbt − (φtl + γl − ξktl ) − δ max d0ll , l∈p
k∈b: Tk t, l∈p
l∈p
k∈b: Tk t
l,l ∈p
where the definition (9) of cbp has been expanded. Let us denote by Vlbt the parenthesized expression on the right-hand side, and by qbt = k∈b: Tk t qk the amount of class b goods at time t. The column generation subproblem for given b and t is defined in terms of the following decision variables: ul ∈ {0, 1} indicates whether location l ∈ L belongs in the pattern, vlk ≥ 0 indicates ordered pairs of locations l, k ∈ L that both belong in the pattern, and s ≥ 0 represents the diameter of the pattern. The subproblem is formulated as a mixed-integer program: min Vlbt ul + δs (16) l∈L
CMl ul ≥ qbt
(17)
l∈L
s − d0lk vlk ≥ 0 vlk − ul − uk ≥ −1
∀l, k ∈ L, l < k ∀l, k ∈ L, l < k
(18) (19)
The constraint (17) ensures that the selected locations together have sufficient capacity to be feasible in the location assignment problem. The constraints (18) bound s to match the pattern diameter, and (19) together with the minimization objective ensure that vlk = ul uk for all l, k ∈ L. In the column generation procedure, the problem (16)–(19) is solved iteratively by a mixed-integer solver for all classes b ∈ B and time steps t ∈ T , and whenever the objective is smaller than ψbt , the pattern defined by the corresponding solution is added to the set of patterns P . After all b and t have been checked, the linear program (1)–(8) is resolved with the updated P , and the column generation procedure is repeated with newly obtained values of (ψ, φ, ξ). If no more profitable patterns are found or the algorithm runs out of time, the current patterns P are fixed and finally the location assignment problem (1)–(8) is resolved as a mixed-integer program. Note that cbp is a submodular function of p. Kamiyama [11] presented a polynomial-time approximation algorithm for minimizing a submodular function with covering-type constraints (which (17) is), but in this study it was considered simpler to use a mixed-integer solver.
4
Inverse Optimization Method
The location assignment decisions demonstrated by the human decision makers are assumed to form a feasible solution (z, x, y) to the location assignment model
64
H. Rummukainen
(1)–(8). The goal of the presented inverse optimization method is to estimate the parameters of the cost model in the form (9)–(11), so that the demonstrated solution (z, x, y) is optimal or near-optimal for the costs c. The demonstrated solution is not assured to be an extreme point, and may be in the relative interior of the feasible region. Moreover, with costs restricted to the form (9)–(11), non-trivial (unique) optimality may be impossible for even some boundary points of the primal feasible region. Because of these issues, in contrast with the inverse linear optimization method of Ahuja and Orlin [1], complementary slackness conditions are not fully enforced, and the duality gap between the primal (1) and dual (12) objectives is minimized as an objective. To make sure that the inverse problem is feasible with nontrivial c, none of the dual constraints (13)–(15) is tightened to strict equality by complementary slackness. Nevertheless, the following additional constraints on the dual solution (ψ, φ, ξ, μ, λ, η, θ) are enforced on the basis of complementary slackness with the fixed primal solution (z, x, y): ∀t ∈ T, l ∈ L : (20) φtl = 0 b∈B, pl zbpt < 1 ∀b ∈ B, k ∈ b, t ∈ T, l ∈ L : xkl − pl zbpt < 0 (21) ξktl = 0 λtlm = 0
∀t ∈ T, l ∈ L, m = 1, . . . , Ml : wtlm < C
(22)
θtar = 0
∀t ∈ T, a ∈ A, , r = 1, . . . , R : ytar < D
(23)
The duality gap that is to be minimized is given by Γ = cbp zbpt + ckl xkl + clm wtlm + car ytar b∈B, p∈P, t∈T
−
ψbt +
b∈B, t∈T
k∈K, l∈L
φtl −
t∈T, l∈L
k∈K
t∈T, l∈L, m=1,...,Ml
μk +
t∈T, a∈A, r=1,...,R
(Cl − Qtl )λtl −
t∈T, l∈L
Qta ηta +
t∈T, a∈A
Dθtar .
(24)
t∈T, a∈A, r=1,...,R
Note that Γ ≥ 0 because (z, x, y) is primal feasible and (ψ, φ, ξ, μ, λ, η, θ) is dual feasible. Similarly to Ahuja and Orlin [1], the cost estimation is regularized by penalising deviations from nominal cost values, but in a more specific formulation. The deviation objective term is defined as follows, weighting cost model parameters approximately in proportion to their contribution to the primal objective: k∈b: T t qk maxl,l ∈L d0ll 0 0 k γl − γl + δ−δ Δ= 2 l∈L CMl l∈L t∈T b∈B qk 0 0 + πnk dnl − dnl + πkn dln − dln |L| n∈N k∈K l∈L R r αj − αj0 (25) 2qk + k∈K
r=1 j=1
As this is a minimization objective, the standard transformation of absolute value terms to linear programming constraints and variables applies [4, p. 17].
Inverse Optimization for Warehouse Management
65
The inverse problem is obtained by substituting the cost model (9)–(11) in the dual constraints (13)–(15), with the additional constraints (20)–(23), and the objective of minimizing gΔ + Γ , where g is a weighting coefficient in units of storage capacity. The decision variables are the dual variables (ψ, φ, ξ, μ, λ, η, θ) and the cost model parameters (d, γ, δ, α). The inverse problem is a linear program with an exponential number of constraints (13). The problem can be solved iteratively by first solving the linear program with a limited set of patterns P , then applying the algorithm of Sect. 3.5 to detect violations of constraints (13) and to update the set P accordingly, and repeating. In other words, the primal column generation procedure of Sect. 3.5 can be applied as a dual cutting plane algorithm. The algorithm can be stopped on timeout with a suboptimal solution.
5
Computational Experiments
A warehouse management case was kindly provided by the company Steveco Oy, a container port operator in Finland. One of the services provided by Steveco is warehousing of export goods, allowing manufacturers to reduce lead time on deliveries to their foreign customers. The goods in the port warehouses can be shipped either as break-bulk or stuffed in containers at short notice. The case involves the management of inventory in one such port warehouse. Goods are stored in the warehouse for a period ranging from a day or two up to several weeks. Goods may arrive by either rail or truck, which are usually received on opposite sides of the warehouse. The warehouse is split into grid squares of different sizes. Different goods are classified based on manufacturerprovided order identifiers, such that two classes cannot be stored in the same grid square simultaneously. The warehouse management typically receives advance information of deliveries 12–24 h in advance of arrival in the warehouse. A warehouse foreman allocates grid squares for each class of goods, taking into account the transport mode (rail or truck), whether the goods are likely to be stuffed in a container or transported on a rolltrailer directly to a quay, and importantly, simultaneously transported goods must be split between aisles of the warehouse so that multiple loaders can access the goods at different aisles without interfering with each other. Currently the management of the warehouse is a manual procedure, which requires time and effort from experienced foremen. Computational experiments were performed using a 92-day time series of actual storage decisions provided by Steveco. The data described the arrival and departure times, storage locations and classification of each individual package. The data was split into a 46-day training data set, and a 46-day test data set. The model time step was 1 h. There were arrival or departure events on 942 h of the 2208 h period, and a total of 66000 packages in 99 orders (classes of goods). The warehouse had 8 aisles (areas) with a total of 83 grid squares (locations). Arrivals and departures were associated with 8 arrival nodes (6 locations along a spur rail, and truck unloading on 2 sides of the warehouse) and 3 departure nodes (1 quay and 2 truck).
66
H. Rummukainen
To simulate usage of the model in operational planning, the storage location assignment model of Sect. 3.2 was applied in a rolling horizon procedure: For every hour of simulation time, the mixed-integer model was solved for the following 24-hour period, the decisions of the first hour were fixed, and the procedure was repeated with the planning period shifted by one hour forward. The inverse optimization was computed for the entire 46-day training period at once, without regard to rolling horizon planning. Thus there was no guarantee that the cost parameters computed by the inverse optimization would allow the rolling horizon procedure to accurately replicate the demonstrated decisions. The following cases are reported in the results: Example. Demonstrated decisions of warehouse foremen. Learned/post. A posteriori optimization over the entire data period, using the estimated objective function in a linear relaxation of the model of Sect. 3.2. This result is what the inverse optimization method actually aims to match with the demonstration solution, and is only included for comparison. This method cannot be used in operational planning. Nominal/rolling. Rolling horizon planning using the nominal objective function, which corresponds to pure transport distance minimization, along with high aisle congestion cost above estimated loader capacity. Learned/rolling. Rolling horizon planning using the estimated objective function, with the aim of replicating the example behaviour. The experiments were run on a server with two 18-core 2.3 GHz Intel Xeon E5-2699v3 processors and 256 GB RAM, using the IBM ILOG CPLEX 20.1 mixed-integer programming solver. The inverse optimization time was limited to 12 h, and each rolling horizon step took 0–5 min. To compare the optimization results with the demonstrated decisions, two numerical measures were defined at different aggregation levels. Let xkl represent the solution of one of the four cases above, and x◦kl the demonstrated solution of the Example case. The measure DIFFA indicates how closely the volumes assigned to each aisle match the demonstrated solution over time: ◦ DIFFA = 100% · qk xkl − qk xkl 2qk |Tk | . (26) a∈A k∈K: Tk t k∈K: Tk t k∈K t∈T
l∈a
l∈a
The measure DIFFB indicates how closely the volumes of each class of goods assigned to each aisle match the demonstrated solution over time: DIFFB = 100% · qk xkl − qk x◦kl 2qk |Tk | . (27) b∈B, a∈A, k∈b: Tk t k∈b: Tk t k∈K t∈T
l∈a
l∈a
These measures range from 0% indicating perfect replication, to 100% indicating that no goods are assigned to the same aisles in the two solutions.
Inverse Optimization for Warehouse Management
Fig. 2. Training results: capacity usage over time for each aisle.
Fig. 3. Test results: capacity usage over time for each aisle.
67
68
H. Rummukainen
Table 1. Differences in capacity usage between the optimization results and demonstrated decisions. DIFFA indicates differences in per-aisle capacity usage, and DIFFB differences in per-aisle capacity usage of each class of goods; both are relative to the total volume of goods in storage Case
DIFFA Training Test
Example
0.0%
Learned/post
6.6%
DIFFB Training Test
0.0%
0.0%
15.8%
0.0%
9.9%
55.6%
Nominal/rolling 32.3%
26.2% 43.3%
68.1%
Learned/rolling 18.5%
17.2% 32.7%
62.5%
Table 2. Total transport distance of the packages, relative to the demonstrated example solution, on the training and test periods. The comparison includes distances from arrival node to storage location to departure node.
5.1
Case
Training Test
Example
100.0%
100.0%
Learned/post
99.7%
91.6%
Nominal/rolling
86.9%
84.2%
Learned/rolling
97.2%
93.0%
Results
Graphs of capacity usage over time in different aisles are shown in Figs. 2 and 3. The graphs give an overview of how well the demonstrated aisle choices could be matched. Note that the differences between these graphs and the Example case are precisely summarized by the DIFFA measure. The numerical values of the measures DIFFA and DIFFB are shown in Table 1. The total transport distance of the packages in the different cases, compared to the demonstrated solution, is shown in Table 2. In 12 h the inverse optimization method ran for 21 iterations, on which it generated a total of 2007 patterns. In the last 3 h, there were only negligible improvements to the objective value of the inverse problem. 5.2
Discussion
On the training data set the inverse optimization method worked, as can be seen in Fig. 2: the continuous optimization results (Learned/post) match the demonstrated decisions (Example) relatively well. However, the rolling horizon procedure with learned costs (Learned/rolling) diverged substantially from the results of the continuous optimization (Learned/post), possibly due to the short 24 h planning horizon. Nevertheless, as indicated by the numerical measures in
Inverse Optimization for Warehouse Management
69
Table 1, the results of the rolling horizon procedure were closer to the demonstrated decisions after the inverse optimization (Learned/rolling) than before (Nominal/rolling). On the test data set, as seen in Fig. 3 and Table 1, the continuous optimization results (Learned/post) diverged further from the demonstrated decisions (Example) than in the training data set. The results of the rolling horizon procedure however appeared to follow the demonstrated decisions somewhat better than on the training data set, both visually and by the DIFFA measure. Again, the results of the rolling horizon procedure were closer to the demonstrated decisisions after the inverse optimization (Learned/rolling) than before (Nominal/rolling). Replicating the demonstrated decisions in more detail than at the level of peraisle capacity usage was unsuccessful so far. As shown by the DIFFB measure in Table 1, classes of goods were largely assigned to different aisles than in the demonstrated decisions. A particular difficulty in the case study was that there was no machine-readable data on the properties of the classes beyond an opaque order identifier. Besides the difficulties at the level of classes of goods, comparing the assignments at the level of individual locations was also fruitless. The preliminary conclusion was that since most of the goods would flow through the warehouse aisles from one side to another, choosing one grid square or another in the same aisle would not make a substantial difference in the total work required. Although matching the demonstrated decisions by inverse optimization had limited success so far, the storage location assignment model of Sect. 3 was found to be valuable. In the Nominal/rolling case, in which the objective was to minimize transport distances with congestion penalties, the total transport distance of the packages was reduced by 13–15% compared to manual planning, as can be seen in Table 2. Based on the computational experiments, the model has the potential to be useful for warehouse management on realistic scale. While the algorithm appeared to converge in 12 h with the 46-day training data set, this was at the limit of the current capabilities of the method. In an abandoned attempt to use a 50% larger training data set, the algorithm progressed over 10 times slower than in the presented runs. In particular the size of the location assignment model is sensitive to the size of the set K, i.e. the number of kinds of packages.
6
Conclusion
The inverse optimization approach of Ahuja and Orlin [1] was applied to the linear relaxation of a mixed-integer storage location assignment problem, and a solution method based on a cutting plane algorithm was presented. The method was tested on real-world data, and the estimated objective function was used in the mixed-integer model in a practical short-term rolling-horizon procedure. The inverse optimization method and the rolling-horizon procedure were able to coarsely mimic a demonstrated storage location assignment policy on the
70
H. Rummukainen
training data set, as well as on a separate test data set. However, the demonstrated assignments of specific classes of goods could not be replicated well, possibly due to the limitations of the inverse optimization method or due to the nature of the case study. Further research is needed to more accurately follow the demonstrated location assignment policy.
References 1. Ahuja, R.K., Orlin, J.B.: Inverse optimization. Oper. Res. 49(5), 771–783 (2001) 2. Arora, S., Doshi, P.: A survey of inverse reinforcement learning: challenges, methods and progress (2020). arXiv:1806.06877 3. Aswani, A., Shen, Z.J., Siddiq, A.: Inverse optimization with noisy data. Oper. Res. 66(3), 870–892 (2018) 4. Bertsimas, D., Tsitsiklis, J.N.: Introduction to Linear Optimization. Athena Scientific, Belmont (1997) 5. Chen, L., Riopel, D., Langevin, A.: Minimising the peak load in a shared storage system based on the duration-of-stay of unit loads. Int. J. Shipp. Transp. Logist. 1(1), 20–36 (2009) 6. De Koster, R., Le-Duc, T., Roodbergen, K.J.: Design and control of warehouse order picking: a literature review. Eur. J. Oper. Res. 182(2), 481–501 (2007) 7. Goetschalckx, M., Ratliff, H.D.: Shared storage policies based on the duration stay of unit loads. Manage. Sci. 36(9), 1120–1132 (1990) 8. Gu, J., Goetschalckx, M., McGinnis, L.F.: Research on warehouse operation: a comprehensive review. Eur. J. Oper. Res. 177, 1–21 (2007). https://doi.org/10. 1016/j.ejor.2006.02.025 9. Han, Y., Lee, L.H., Chew, E.P., Tan, K.C.: A yard storage strategy for minimizing traffic congestion in a marine container transshipment hub. OR Spectr. 30, 697–720 (2008). https://doi.org/10.1007/s00291-008-0127-6 10. Hausman, W.H., Schwarz, L.B., Graves, S.C.: Optimal storage assignment in automatic warehousing systems. Manage. Sci. 22(6), 629–638 (1976) 11. Kamiyama, N.: A note on submodular function minimization with covering type linear constraints. Algorithmica 80, 2957–2971 (2018) 12. Kar´ asek, J.: An overview of warehouse optimization. Int. J. Adv. Telecommun. Electrotech. Sig. Syst. 2(3), 111–117 (2013) 13. Kim, K.H., Park, K.T.: Dynamic space allocation for temporary storage. Int. J. Syst. Sci. 34(1), 11–20 (2003) 14. Kofler, M., Beham, A., Wagner, S., Affenzeller, M.: Robust storage assignment in warehouses with correlated demand. In: Borowik, G., Chaczko, Z., Jacak, W., L uba, T. (eds.) Computational Intelligence and Efficiency in Engineering Systems. SCI, vol. 595, pp. 415–428. Springer, Cham (2015). https://doi.org/10.1007/9783-319-15720-7 29 15. Lee, L.H., Chew, E.P., Tan, K.C., Han, Y.: An optimization model for storage yard management in transshipment hubs. OR Spectr. 28, 539–561 (2006) 16. Moccia, L., Cordeau, J.F., Monaco, M.F., Sammarra, M.: A column generation heuristic for dynamic generalized assignment problem. Comput. Oper. Res. 36(9), 2670–2681 (2009). https://doi.org/10.1016/j.cor.2008.11.022 17. Monaco, M.F., Sammarra, M., Sorrentino, G.: The terminal-oriented ship stowage planning problem. Eur. J. Oper. Res. 239, 256–265 (2014)
Inverse Optimization for Warehouse Management
71
18. Muppani, V.R., Adil, G.K.: Efficient formation of storage classes for warehouse storage location assignment: a simulated annealing approach. Omega 36, 609–618 (2008) 19. Pang, K.W., Chan, H.L.: Data mining-based algorithm for storage location assignment in a randomised warehouse. Int. J. Prod. Res. 55(14), 4035–4052 (2017). https://doi.org/10.1080/00207543.2016.1244615 20. Pierre, B., Vannieuwenhuyse, B., Domnianta, D., Dessel, H.V.: Dynamic ABC storage policy in erratic demand environments. Jurnal Teknik Industri 5(1), 1–12 (2003) 21. Rouwenhorst, B., Reuter, B., Stockrahm, V., van Houtum, G.J., Mantel, R.J., Zijm, W.H.M.: Warehouse design and control: framework and literature review. Eur. J. Oper. Res. 122, 515–533 (2000) 22. Schaefer, A.J.: Inverse integer programming. Optim. Lett. 3, 483–489 (2009) 23. Troutt, M.D., Pang, W.K., Hou, S.H.: Behavioral estimation of mathematical programming objective function coefficients. Manage. Sci. 52(3), 422–434 (2006) 24. Zhen, L., Xu, Z., Wang, K., Ding, Y.: Multi-period yard template planning in container terminals. Transp. Res. Part B 93, 700–719 (2016)
Model-Agnostic Multi-objective Approach for the Evolutionary Discovery of Mathematical Models Alexander Hvatov(B) , Mikhail Maslyaev, Iana S. Polonskaya, Mikhail Sarafanov, Mark Merezhnikov, and Nikolay O. Nikitin NSS (Nature Systems Simulation) Lab, ITMO University, Saint-Petersburg, Russia {alex hvatov,mikemaslyaev,ispolonskaia, mik sar,mark.merezhnikov,nnikitin}@itmo.ru
Abstract. In modern data science, it is often not enough to obtain only a data-driven model with a good prediction quality. On the contrary, it is more interesting to understand the properties of the model, which parts could be replaced to obtain better results. Such questions are unified under machine learning interpretability questions, which could be considered one of the area’s raising topics. In the paper, we use multi-objective evolutionary optimization for composite data-driven model learning to obtain the algorithm’s desired properties. It means that whereas one of the apparent objectives is precision, the other could be chosen as the complexity of the model, robustness, and many others. The method application is shown on examples of multi-objective learning of composite models, differential equations, and closed-form algebraic expressions are unified and form approach for model-agnostic learning of the interpretable models. Keywords: Model discovery · Multi-objective optimization Composite models · Data-driven models
1
·
Introduction
The increasing precision of the machine learning models indicates that the best precision model is either overfitted or very complex. Thus, it is used as a black box without understanding the principle of the model’s work. This fact means that we could not say if the model can be applied to another sample without a direct experiment. Related questions such as applicability to the given class of the problems, sensitivity, and the model parameters’ and hyperparameters’ meaning arise the interpretability problem [7]. In machine learning, two approaches to obtain the model that describes the data are existing. The first is to fit the learning algorithm hyperparameters and the parameters of a given model to obtain the minimum possible error. The second one is to obtain the model structure (as an example, it is done in neural c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 72–85, 2021. https://doi.org/10.1007/978-3-030-91885-9_6
Multi-objective Discovery of Mathematical Models
73
architecture search [1]) or the sequence of models that describe the data with the minimal possible error [12]. We refer to obtaining a set of models or a composite model as a composite model discovery. After the model is obtained, both approaches may require additional model interpretation since the obtained model is still a black box. For model interpretation, many different approaches exist. One group of approaches is the model sensitivity analysis [13]. Sensitivity analysis allows mapping the input variability to the output variability. Algorithms from the sensitivity analysis group usually require multiple model runs. As a result, the model behavior is explained relatively, meaning how the output changes with respect to the input changing. The second group is the explaining surrogate models that usually have less precision than the parent model but are less complex. For example, linear regression models are used to explain deep neural network models [14]. Additionally, for convolutional neural networks that are often applied to the image classification/regression task, visual interpretation may be used [5]. However, this approach cannot be generalized, and thus we do not put it into the classification of explanation methods. All approaches described above require another model to explain the results. Multi-objective optimization may be used for obtaining a model with desired properties that are defined by the objectives. The Pareto frontier obtained during the optimization can explain how the objectives affect the resulting model’s form. Therefore, both the “fitted” model and the model’s initial interpretation are achieved. We propose a model-agnostic data-driven modeling method that can be used for an arbitrary composite model with directed acyclic graph (DAG) representation. We assume that the composite model graph’s vertices (or nodes) are the models and the vertices define data flow to the final output node. Genetic programming is the most general approach for the DAG generation using evolutionary operators. However, it cannot be applied to the composite model discovery directly since the models tend to grow unexpectedly during the optimization process. The classical solution is to restrict the model length [2]. Nevertheless, the model length restriction may not give the best result. Overall, an excessive amount of models in the graph drastically increases the fitting time of a given composite model. Moreover, genetic programming requires that the resulting model is computed recursively, which is not always possible in the composite model case. We refine the usual for the genetic programming cross-over and mutation operators to overcome the extensive growth and the model restrictions. Additionally, a regularization operator is used to retain the compactness of the resulting model graph. The evolutionary operators, in general, are defined independently on a model type. However, objectives must be computed separately for every type of model. The advantage of the approach is that it can obtain a datadriven model of a given class. Moreover, the model class change does not require significant changes in the algorithm.
74
A. Hvatov et al.
We introduce several objectives to obtain additional control over the model discovery. The multi-objective formulation allows giving an understanding of how the objectives affect the resulting model. Also, the Pareto frontier provides a set of models that an expert could assess and refine, which significantly reduces time to obtain an expert solution when it is done “from scratch”. Moreover, the multi-objective optimization leads to the overall quality increasing since the population’s diversity naturally increases. Whereas the multi-objective formulation [15] and genetic programming [8] are used for the various types of model discovery separately, we combine both approaches and use them to obtain a composite model for the comprehensive class of atomic models. In contrast to the composite model, the atomic model has single-vector input, single-vector output, and a single set of hyperparameters. As an atomic model, we may consider a single model or a composite model that undergoes the “atomization” procedure. Additionally, we consider the Pareto frontier as the additional tool for the resulting model interpretability. The paper is structured as follows: Sect. 2 describes the evolutionary operators and multi-objective optimization algorithms used throughout the paper, Sect. 3 describes discovery done on the same real-world application dataset for particular model classes and different objectives. In particular, Sect. 3.2 describes the composite model discovery for a class of the machine learning models with two different sets of objective functions; Sect. 3.3 describes the closed-form algebraic expression discovery; Sect. 3.4 describes the differential equation discovery. Section 4 outlines the paper.
2
Problem Statement for Model-Agnostic Approach
The developed model agnostic approach could be applied to an arbitrary composite model represented as a directed acyclic graph. We assume that the graph’s vertices (or nodes) are the atomic models with parameters fitted to the given data. It is also assumed that every model has input data and output data. The edges (or connections) define which models participate in generating the given model’s input data. Before the direct approach description, we outline the scheme Fig. 1 that illustrates the step-by-step questions that should be answered to obtain the composite model discovery algorithm. For our approach, we aim to make Step 1 as flexible as possible. Approach application to different classes of functional blocks is shown in Sect. 3. The realization of Step 2 is described below. Moreover, different classes of models require different qualitative measures (Step 3), which is also shown in Sect. 3. The cross-over and mutation schemes used in the described approach do not differ in general from typical symbolic optimization schemes. However, in contrast to the usual genetic programming workflow, we have to add regularization operators to restrict the model growth. Moreover, the regularization operator allows to control the model discovery and obtain the models with specific properties. In this section, we describe the generalized concepts. However, we note
Multi-objective Discovery of Mathematical Models
75
Fig. 1. Illustration of the modules of the composite models discovery system and the particular possible choices for the realization strategy.
that every model type has its realization details for the specific class of the atomic models. Below we describe the general scheme of the three evolutionary operators used in the composite model discovery: cross-over, mutation, and regularization shown in Fig. 2.
Fig. 2. (Left) The generalized composite model individual: a) individual with models as nodes (green) and the dedicated output node (blue) and nodes with blue and yellow frames that are subjected to the two types of the mutations b1) and b2); b1) mutation with change one atomic model with another atomic model (yellow); b2) mutation with one atomic model replaced with the composite model (orange) (right) The scheme of the cross-over operator green and yellow nodes are the different individuals. The frames are subtrees that are subjected to the cross-over (left), two models after the cross-over operator is applied (right) (Color figure online)
76
A. Hvatov et al.
The mutation operator has two variations: node replacement with another node and node replacement with a sub-tree. Scheme for the both type of the mutations are shown in Fig. 2(left). The two types of mutation can be applied simultaneously. The probabilities of the appearance of a given type of mutation are the algorithm’s hyperparameters. We note that for convenience, some nodes and model types may be “immutable”. This trick is used, for example, in Sect.3.4 to preserve the differential operator form and thus reduce the optimization space (and consequently the optimization time) without losing generality. In general, the cross-over operator could be represented as the subgraphs exchange between two models as shown in Fig. 2(right). In the most general case, in the genetic programming case, subgraphs are chosen arbitrarily. However, since not all models have the same input and output, the subgraphs are chosen such that the inputs and outputs of the offspring models are valid for all atomic models. In order to restrict the excessive growth of the model, we introduce an additional regularization operator shown in Fig. 3. The amount of described dispersion (as an example, using the R2 metric) is assessed for each graph’s depth level. The models below the threshold are removed from the tree iteratively with metric recalculation after each removal. Also, the applied implementation of the regularization operator can be task-specific (e.g., custom regularization for composite machine learning models [11] and the LASSO regression for the partial differential equations [9]).
Fig. 3. The scheme of the regularization operator. The numbers are the dispersion ratio that is described by the child nodes as the given depth level. In the example model with dispersion ratio 0.1 is removed from the left model to obtain simpler model to the right.
Unlike the genetic operators defined in general, the objectives are defined for the given class of the atomic models and the given problem. The class of the models defines the way of an objective function computation. For example, we consider the objective referred to as “quality”, i.e., the ability of the given composite model to predict the data in the test part of the dataset. Machine learning models may be additionally “fitted” to the data with a given composite model structure. Fitting may be used for all models simultaneously or consequently for every model. Also, the parameters of the machine learning models may not
Multi-objective Discovery of Mathematical Models
77
be additionally optimized, which increases the optimization time. The differential equations and the algebraic expressions realization atomic models are more straightforward than the machine learning models. The only way to change the quality objective is the mutation, cross-over, and regularization operators. We note that there also may be a “fitting” procedure for the differential equations. However, we do not introduce variable parameters for the differential terms in the current realization. In the initial stage of the evolution, according to the standard workflow of the MOEA/DD [6] algorithm, we have to evaluate the best possible value for each of the objective functions. The selection of parents for the cross-over is held for each objective function space region. With a specified probability of maintaining the parents’ selection, we can select an individual outside the processed subregion to partake in the recombination. In other cases, if there are candidate solutions in the region associated with the weights vector, we make a selection among them. The final element of MOEA/DD is population update after creating new solutions, which is held without significant modifications. The resulting algorithm is shown in Algorithm 1. Data: Class of atomic models T = {T1 , T2 , ... Tn }; (optional) define subclass of immutable models; objective functions Result: Pareto frontier Create a set of weight vectors w = (w1 , ..., wn weights ), wi = (w1i , ..., wni eq+1 ); for weight vector in weights do Select K nearest weight vectors to the weight vector; Randomly generate a set of candidate models & divide them into non-dominated levels; Divide the initial population into groups by subregion, to which they belong; for epoch = 1 to epoch number do for weight vector in weights do Parent selection; Apply recombination to parents pool and mutation to individuals inside the region of weights (Fig. 2); for offspring in new solutions do Apply regularization operator (Fig. 3); Get values of objective functions for offspring; Update population;
Algorithm 1: The pseudo-code of model-agnostic Pareto frontier construction
To sum up, the proposed approach combines classical genetic programming operators with the regularization operator and the immutability property of selected nodes. The refined MOEA/DD and refined genetic programming operators obtain composite models for different atomic model classes.
78
3
A. Hvatov et al.
Examples
In this section, several applications of the described approach are shown. We use a common dataset for all experiments that are described in the Sect. 3.1. While the main idea is to show the advantages of the multi-objective approach, the particular experiments show different aspects of the approach realization for different models’ classes. Namely, we want to show how different choices of the objectives reflect the expert modeling. For the machine learning models in Sect. 3.2, we try to mimic the expert’s approach to the model choice that allows one to transfer models to a set of related problems and use a robust regularization operator. Almost the same idea is pursued in mathematical models. Algebraic expression models in Sect. 3.3 are discovered with the model complexity objective. More complex models tend to reproduce particular dataset variability and thus may not be generalized. To reduce the optimization space, we introduce immutable nodes to restrict the model form without generality loss. The regularization operator is also changed to assess the dispersion relation between the model residuals and data, which has a better agreement with the model class chosen. While the main algebraic expressions flow is valid for partial differential equations discovery in Sect. 3.4, they have specialties, such as the impossibility to solve intermediate models “on-fly”. Therefore LASSO regularization operator is used. 3.1
Experimental Setup
The validation of the proposed approach was conducted for the same dataset for all types of models: composite machine learning models, models based on closed-form algebraic expression, and models in differential equations. The multi-scale environmental process was selected as a benchmark. As the dataset for the examples, we take the time series of sea surface height were obtained from numerical simulation using the high-resolution setup of the NEMO model for the Arctic ocean [3]. The simulation covers one year with the hourly time resolution. The visualization of the experimental data is presented in Fig. 4. It is seen from Fig. 4 that the dataset has several variability scales. The composite models, due to their nature, can reproduce multiple scales of variability. In the paper, the comparison between single and composite model performance is taken out of the scope. We show only that with a single approach, one may obtain composite models of different classes. 3.2
Composite Machine Learning Models
The machine learning pipelines’ discovery methods are usually referred to as automated machine learning (AutoML). For the machine learning model design, the promising task is to control the properties of obtained model. Quality and robustness could be considered as an example of the model’s properties. The
Multi-objective Discovery of Mathematical Models
79
Fig. 4. The multi-scale time series of sea surface height used as a dataset for all experiments.
proposed model-agnostic approach can be used to discover the robust composite machine learning models with the structure described as a directed acyclic graph (as described in [11]). In this case, the building blocks are regression-based machine learning models, algorithms for feature selection, and feature transformation. The specialized lagged transformation is applied to the input data to adapt the regression models for the time series forecasting. This transformation is also represented as a building block for the composite graph [4]. The quality of the composite machine learning models can be analyzed in different ways. The simplest way is to estimate the quality of the prediction on the test sample directly. However, the uncertainty in both models and datasets makes it necessary to apply the robust quality evaluation approaches for the effective analysis of modeling quality [16]. The stochastic ensemble-based approach can be applied to obtain the set of predictions Yens for different modeling scenarios using stochastic perturbation of the input data for the model. In this case, the robust objective function fi (Yens ) can be evaluated as follows: k j ) + 1, μens = k1 j=1 (Yens 2 k 1 i )−μ fi (Yens ) = μens k−1 i=1 (fi (Yens ens ) + 1
(1)
In Eq. 1 k is the number of models in the ensemble, f - function for modelling error, Yens - ensemble of the modelling results for specific configuration of the composite model. The robust and non-robust error measures of the model cannot be minimized together. In this case, the multi-objective method proposed in the paper can be used to build the predictive model. We implement the described approach as a part of the FEDOT framework1 that allow building various ML-based composite models. The previous implementation of FEDOT allows us to use multi-objective 1
https://github.com/nccr-itmo/FEDOT.
80
A. Hvatov et al.
optimization only for regression and classification tasks with a limited set of objective functions. After the conducted changes, it can be used for custom tasks and objectives. The generative evolutionary approach is used during the experimental studies to discover the composite machine learning model for the sea surface height dataset. The obtained Pareto frontier is presented is Fig. 5.
Fig. 5. The Pareto frontier for the evolutionary multi-objective design of the composite machine learning model. The root mean squared error (RMSE) and mean-variance for RMSE are used as objective functions. The ridge and linear regressions, lagged transformation (referred as lag), k-nearest regression (knnreg) and decision tree regression (dtreg) models are used as a parts of optimal composite model for time series forecasting.
From Fig. 5 we obtain an interpretation that agrees with the practical guidelines. Namely, the structures with single ridge regression (M1 ) are the most robust, meaning that dataset partition less affects the coefficients. The single decision tree model, on the contrary, the most dependent on the dataset partition model. 3.3
Closed-Form Algebraic Expressions
The class of the models may include algebraic expressions to obtain better interpretability of the model. As the first example, we present the multi-objective algebraic expression discovery example. As the algebraic expression, we understand the sum of the atomic functions’ products, which we call tokens. Basically token is an algebraic expression with
Multi-objective Discovery of Mathematical Models
81
a free parameters (as an example T = (t; α1 , α2 , α3 ) = α3 sin(α1 t + α2 ) with free parameters set α1 , α2 , α3 ), which are subject to optimization. In the present paper, we use pulses, polynomials, and trigonometric functions as the tokens set. For the mathematical expression models overall, it is helpful to introduce two groups of objectives. The first group of the objectives we refer to as “quality”. For a given equation M , the quality metric || · || is the data D reproduction norm that is represented as Q(M ) = ||M − D||
(2)
The second group of objectives we refer to as “complexity”. For a given equation M , the complexity metric is bound to the length of the equation that is denoted as #(M ) C(M ) = #(M )
(3)
As an example of objectives, we use rooted mean squared error (RMSE) as the quality metric and the number of tokens present in the resulting model as the complexity metric. First, the model’s structure is obtained with a separate evolutionary algorithm to compute the mean squared error. In details it is described in [10]. To perform the single model evolutionary optimization in this case, we make the arithmetic operations immutable. The resulting directed acyclic graph is shown in Fig. 6. Thus, the third type of nodes appears - immutable ones. This step is not necessary, and the general approach described above may be used instead. However, it reduces the search space and thus reduces the optimization time without losing generality.
Fig. 6. The scheme of the composite model, generalizing the discovered differential equation, where red nodes are the nodes, unaffected by mutation or cross-over operators of the evolutionary algorithm. The blue nodes represent the tokens that evolutionary operators can alter. (Color figure online)
The resulting Pareto frontier for the class of the described class of closed-form algebraic expressions is shown in Fig. 7.
82
A. Hvatov et al.
Fig. 7. The Pareto frontier for the evolutionary multi-objective design of the closedform algebraic expressions. The root mean squared error (RMSE) and model complexity are used as objective functions.
Since the origin of time series is the sea surface height in the ocean, it is natural to expect that the closed-form algebraic expression is the spectra-like decomposition, which is seen in Fig. 7. It is also seen that as soon as the complexity rises, the additional term only adds information to the model without significant changes to the terms that are present in the less complex model. 3.4
Differential Equations
The development of a differential equation-based model of a dynamic system can be viewed from the composite model construction point of view. A tree graph represents the equation with input functions, decoded as leaves, and branches representing various mathematical operations between these functions. The specifics of a single equation’s development process were discussed in the article [9]. The evaluation of equation-based model quality is done in a pattern similar to one of the previously introduced composite models. Each equation represents a trade-off between its complexity, which we estimate by the number of terms in it and the quality of a process representation. Here, we will measure this process’s representation quality by comparing the left and right parts of the equation. Thus, the algorithm aims to obtain the Pareto frontier with the quality and complexity taken as the objective functions. We cannot use standard error measures such as RMSE since the partial differential equation with the arbitrary operator cannot be solved automatically. Therefore, the results from previous sections could not be compared using the quality metric.
Multi-objective Discovery of Mathematical Models
83
Fig. 8. The Pareto frontier for the evolutionary multi-objective discovery of differential equations, where complexity objective function is the number of terms in the left part of the equation, and quality is the approximation error (difference between the left and right parts of the equation).
Despite the achieved quality of the equations describing the process, presented in Fig. 8, their predictive properties may be lacking. The most appropriate physics-based equations to describe this class of problems (e.g., shallow-water equations) include spatial partial derivatives that are not available in processing a single time series.
4
Conclusion
The paper describes a multi-objective composite models discovery approach intended for data-driven modeling and initial interpretation. Genetic programming is a powerful tool for DAG model generation and optimization. However, it requires refinement to be applied to the composite model discovery. We show that the number of changes required is relatively high. Therefore, we are not talking about the genetic programming algorithm. Moreover, the multi-objective formulation may be used to understand how the humanformulated objectives affect the optimization, though this basic interpretation is achieved. As the main advantages we note: – The model and basic interpretation are obtained simultaneously during the optimization – The approach can be applied to the different classes of the models without significant changes – Obtained models could have better quality since the multi-objective problem statement increases diversity which is vital for evolutionary algorithms
84
A. Hvatov et al.
As future work, we plan to work on the unification of the approaches, which will allow obtaining the combination of algebraic-form models and machine learning models, taking best from each of the classes: better interpretability of mathematical and flexibility machine learning models. Acknowledgements. This research is financially supported by The Russian Science Foundation, Agreement #17-71-30029 with cofinancing of Bank Saint Petersburg.
References 1. Elsken, T., Metzen, J.H., Hutter, F., et al.: Neural architecture search: a survey. J. Mach. Learn. Res. 20(55), 1–21 (2019) 2. Grosan, C.: Evolving mathematical expressions using genetic algorithms. In: Genetic and Evolutionary Computation Conference (GECCO). Citeseer (2004) 3. Hvatov, A., Nikitin, N.O., Kalyuzhnaya, A.V., Kosukhin, S.S.: Adaptation of nemolim3 model for multigrid high resolution arctic simulation. Ocean Model. 141, 101427 (2019) 4. Kalyuzhnaya, A.V., Nikitin, N.O., Vychuzhanin, P., Hvatov, A., Boukhanovsky, A.: Automatic evolutionary learning of composite models with knowledge enrichment. In: Proceedings of the 2020 Genetic and Evolutionary Computation Conference Companion, pp. 43–44 (2020) 5. Konforti, Y., Shpigler, A., Lerner, B., Bar-Hillel, A.: Inference graphs for CNN interpretation. In: Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M. (eds.) ECCV 2020, Part XXV. LNCS, vol. 12370, pp. 69–84. Springer, Cham (2020). https:// doi.org/10.1007/978-3-030-58595-2 5 6. Li, K., Deb, K., Zhang, Q., Kwong, S.: An evolutionary many-objective optimization algorithm based on dominance and decomposition. IEEE Trans. Evol. Comput. 19(5), 694–716 (2014) 7. Lipton, Z.C.: The mythos of model interpretability: in machine learning, the concept of interpretability is both important and slippery. Queue 16(3), 31–57 (2018) 8. Lu, Q., Ren, J., Wang, Z.: Using genetic programming with prior formula knowledge to solve symbolic regression problem. Comput. Intell. Neurosci. 2016, 1–17 (2016) 9. Maslyaev, M., Hvatov, A., Kalyuzhnaya, A.V.: Partial differential equations discovery with EPDE framework: application for real and synthetic data. J. Comput. Sci. 53, 101345 (2021). https://doi.org/10.1016/j.jocs.2021.101345, https://www. sciencedirect.com/science/article/pii/S1877750321000429 10. Merezhnikov, M., Hvatov, A.: Closed-form algebraic expressions discovery using combined evolutionary optimization and sparse regression approach. Procedia Comput. Sci. 178, 424–433 (2020) 11. Nikitin, N.O., Polonskaia, I.S., Vychuzhanin, P., Barabanova, I.V., Kalyuzhnaya, A.V.: Structural evolutionary learning for composite classification models. Procedia Comput. Sci. 178, 414–423 (2020) 12. Olson, R.S., Moore, J.H.: TPOT: a tree-based pipeline optimization tool for automating machine learning. In: Workshop on Automatic Machine Learning, pp. 66–74. PMLR (2016) 13. Saltelli, A., Annoni, P., Azzini, I., Campolongo, F., Ratto, M., Tarantola, S.: Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index. Comput. Phys. Commun. 181(2), 259–270 (2010)
Multi-objective Discovery of Mathematical Models
85
14. Tsakiri, K., Marsellos, A., Kapetanakis, S.: Artificial neural network and multiple linear regression for flood prediction in mohawk river, New York. Water 10(9), 1158 (2018) 15. Vu, T.M., Probst, C., Epstein, J.M., Brennan, A., Strong, M., Purshouse, R.C.: Toward inverse generative social science using multi-objective genetic programming. In: Proceedings of the Genetic and Evolutionary Computation Conference, pp. 1356–1363 (2019) 16. Vychuzhanin, P., Nikitin, N.O., Kalyuzhnaya, A.V., et al.: Robust ensemble-based evolutionary calibration of the numerical wind wave model. In: Rodrigues, J.M.F. (ed.) ICCS 2019, Part I. LNCS, vol. 11536, pp. 614–627. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-22734-0 45
A Simple Clustering Algorithm Based on Weighted Expected Distances Ana Maria A. C. Rocha1(B) , M. Fernanda P. Costa2 , and Edite M. G. P. Fernandes1 1
2
ALGORITMI Center, University of Minho, Campus de Gualtar, 4710-057 Braga, Portugal {arocha,emgpf}@dps.uminho.pt Centre of Mathematics, University of Minho, Campus de Gualtar, 4710-057 Braga, Portugal [email protected]
Abstract. This paper contains a proposal to assign points to clusters, represented by their centers, based on weighted expected distances in a cluster analysis context. The proposed clustering algorithm has mechanisms to create new clusters, to merge two nearby clusters and remove very small clusters, and to identify points ‘noise’ when they are beyond a reasonable neighborhood of a center or belong to a cluster with very few points. The presented clustering algorithm is evaluated using four randomly generated and two well-known data sets. The obtained clustering is compared to other clustering algorithms through the visualization of the clustering, the value of the DB validity measure and the value of the sum of within-cluster distances. The preliminary comparison of results shows that the proposed clustering algorithm is very efficient and effective. Keywords: Clustering analysis distance
1
· Partitioning algorithms · Weighted
Introduction
Clustering is an unsupervised machine learning task that is considered one of the most important data analysis techniques in data mining. In a clustering problem, unlabeled data objects are to be partitioned into a certain number of groups (also called clusters) based on their attribute values. The objective is that objects in a cluster are more similar to each other than to objects in another cluster [1–4]. In geometrical terms, the objects can be viewed as points in a a-dimensional space, where a is the number of attributes. Clustering partitions these points into groups, where points in a group are located near one another in space. This work has been supported by FCT – Funda¸ca ˜o para a Ciˆencia e Tecnologia within the R&D Unit Project Scope UIDB/00319/2020. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 86–101, 2021. https://doi.org/10.1007/978-3-030-91885-9_7
A Simple Clustering Algorithm Based on Weighted Expected Distances
87
There are a variety of categories of clustering algorithms. The most traditional include the clustering algorithms based on partition, the algorithms based on hierarchy, algorithms based on fuzzy theory, algorithms based on distribution, those based on density, the ones based on graph theory, based on grid, on fractal theory and based on model. The basic and core ideas of a variety of commonly used clustering algorithms, a comprehensive comparison and an analysis of their advantages and disadvantages are summarized in an interesting review of clustering algorithms [5]. The most used are the partitioning clustering methods, being the K-means clustering the most popular [6]. K-means clustering (and other Kmeans combinations) subdivide the data set into K clusters, where K is specified in advance. Each cluster is represented by the centroid (mean) of the data points belonging to that cluster and the clustering is based on the minimization of the overall sum of the squared errors between the points and their corresponding cluster center. While partition clustering constructs various partitions of the data set and uses some criteria to evaluate them, hierarchical clustering creates a hierarchy of clusters by combining the data points into clusters, and after that these clusters are combined into larger clusters and so on. It does not require the number of clusters in advance. However, once a merge or a split decision have been made, pure hierarchical clustering does not make adjustments. To overcome this limitation, hierarchical clustering can be integrated with other techniques for multiple phase clustering. Linkage algorithms are agglomerative hierarchical methods that considers merging clusters based on the distance between clusters. For example, the single-link is a type of linkage algorithm that merges the two clusters with the smallest minimum pairwise distance [7]. K-means clustering easily fails when the cluster forms depart from the hyper spherical shape. On the other hand, the single-linkage clustering method is affected by the presence of outliers and the differences in the density of clusters. However, it is not sensitive to shape and size of clusters. Model-based clustering assumes that the data set comes from a distribution that is a mixture of two or more clusters [8]. Unlike K-means, the model-based clustering uses a soft assignment, where each point has a probability of belonging to each cluster. Since clustering can be seen as an optimization problem, well-known optimization algorithms may be applied in the cluster analysis, and a variety of them have been combined with the K-means clustering, e.g. [9–11]. Unlike K-means and pure hierarchical clustering, the herein proposed partitioning clustering algorithm has mechanisms that dynamically adjusts the number of clusters. The mechanisms are able to add, remove and merge clusters depending on some pre-defined conditions. Although for the initialization of the algorithm, an initial number of clusters to start the points assigning process is required, the proposed clustering algorithm has mechanisms to create new clusters. Points that were not assigned to a cluster (using a weighted expected distance of a particular center to the data points) are gathered in a new cluster. The clustering is also able to merge two nearby clusters and remove the clusters that have a very few points. Although these mechanisms are in a certain way similar to others in the literature, this paper gives a relevant contribution
88
A. M. A. C. Rocha et al.
to the object similarity issue. Similarity is usually tackled indirectly by using a distance measure to quantify the degree of dissimilarity among objects, in a way that more similar objects have lower dissimilarity values. A probabilistic approach is proposed to define the weighted expected distances from the cluster centers to the data points. These weighted distances rely on the average variability of the distances of the points to each center with respect to their estimated expected distances. The larger the variability, the smaller the weighted distance. Therefore, weighted expected distances are used to assign points to clusters (that are represented by their centers). The paper is organized as follows. Section 2 briefly describes the ideas of a cluster analysis and Sect. 3 presents the details of the proposed weighted distances clustering algorithm. In Sect. 4, the results of clustering four sets of data points with two attributes, one set with four attributes, and another with thirteen attributes are shown. Finally, Sect. 5 contains the conclusions of this work.
2
Cluster Analysis
Assume that n objects, each with a attributes, are given. These objects can also be represented by a data matrix X with n vectors/points of dimension a. Each element Xi,j corresponds to the jth attribute of the ith point. Thus, given X, a partitioning clustering algorithm tries to find a partition C = {C1 , C2 , . . . , CK } of K clusters (or groups), in a way that similarity of the points in the same cluster is maximum and points from different clusters differ as much as possible. It is required that the partition satisfies three conditions: 1, . . . , K; 1. each cluster should have at least one point, i.e., |Ck | = 0, k = 2. a point should not belong to two different clusters, i.e., Ck Cl = ∅, for k, l = 1, . . . , K, k = l; K 3. each point should belong to a cluster, i.e., k=1 |Ck | = n; where |Ck | is the number of points in cluster Ck . Since there are a number of ways to partition the points and maintain these properties, a fitness function should be provided so that the adequacy of the partitioning is evaluated. Therefore, the clustering problem could be stated as finding an optimal solution, i.e., partition C ∗ , that gives the optimal (or near-optimal) adequacy, when compared to all the other feasible solutions.
3
Weighted Distances Clustering Algorithm
Distance based clustering is a very popular technique to partition data points into clusters, and can be used in a large variety of applications. In this section, a probabilistic approach is described that relies on the weighted distances (WD) of each data point Xi , i = 1, . . . , n relative to the cluster centers mk , k = 1, . . . , K. These WD are used to assign the data points to clusters.
A Simple Clustering Algorithm Based on Weighted Expected Distances
3.1
89
Weighted Expected Distances
To compute the WD between the data point Xi and center mk , we resort to the distance vectors DVk , k = 1, . . . , K, and to the variations V ARk , k = 1, . . . , K, the variability in cluster center mk relative to all data points. Thus, let DVk = (DVk,1 , DVk,2 , . . . , DVk,n ) be a n-dimensional distance vector that contains the distances of data points X1 , X2 , . . . , Xn (a-dimensional vectors) to the cluster center mk ∈ Ra , where DVk,i = Xi − mk 2 (i = 1, . . . , n). The componentwise total of the distance vectors, relative to a particular data point Xi , is given by: Ti =
K
DVk,i .
k=1
The probability of mk being surrounded and having a good centrality relative to all points in the data set is given by n i=1 DVk,i pk = . (1) n i=1 Ti Therefore, the expected value for the distance vector component i (relative to point Xi ) of the vector DVk is E[DVk,i ] = pk Ti . Then, the WD is defined for each component i of the vector DVk , W D(k, i), using W D(k, i) = DVk,i /V ARk
(2)
(corresponding to the weighted distance assigned to data point Xi by the cluster center mk ), where the variation V ARk is the average amount of variability of the distances of the points to the center mk , relative to the expected distances: V ARk =
n
1 2 (DVk,i − E[DVk,i ]) n i=1
1/2 .
The larger the V ARk , the lower the weighted distances W D(k, i), i = 1, . . . , n of the points relative to that center mk , when compared to the other centers. A larger V ARk means that in average the difference between the estimated expected distances and the real distances, to that center mk , is larger than to the other centers. 3.2
The WD-Based Algorithm
Algorithm 1 presents the main steps of the proposed weighted expected distances clustering algorithm. For initialization, a problem dependent number of clusters is provided, e.g. K, so that the algorithm randomly selects K points from the data set to initialize the cluster centers. To determine which data points are assigned to a cluster, the algorithm uses the WD as a fitness function. Each point Xi has a WD relative to a cluster center mk , the above defined W D(k, i).
90
A. M. A. C. Rocha et al.
The lower the better. The minimization of W D(k, i) relative to k takes care of the local property of the algorithm, assigning Xi to cluster Ck . Algorithm 1. Clustering Algorithm Require: data set X ≡ Xi,j , i = 1, . . . , n, j = 1, . . . , a, Itmax , Nmin 1: Set initial K; It = 1 2: Randomly select a set of K points from the data set X to initialize the K cluster centers mk , k = 1, . . . , K, 3: repeat 4: Based on mk , k = 1, . . . , K, assign the data points to clusters and eventually add a new cluster, using Algorithm 2 5: Compute ηD using (4) 6: Based on ηD , eventually remove clusters by merging two at a time, and remove clusters with less than Nmin points, using Algorithm 3 7: Set m ¯ k ← mk , k = 1, . . . , K 8: Compute improved values for the cluster centers, mk , k = 1, . . . , K using Algorithm 4 9: Set It = It + 1 ¯ k − mk 2 ≤ 1e − 3 10: until It > Itmax or maxk=1,...,K m ∗ }. 11: return K ∗ , mk , k = 1, . . . , K ∗ and optimal C ∗ = {C1∗ , C2∗ , . . . , CK
Thus, to assign a point Xi to a cluster, the algorithm identifies the center mk that has the lowest weighted distance value to that point, and if W D(k, i) is inferior to the quantity 1.5ηk , where ηk is a threshold value for the center mk , the point is assigned to that cluster. On the other hand, if W D(k, i) is between 1.5ηk and 2.5ηk a new cluster CK+1 is created and the point is assigned to CK+1 ; otherwise, the W D(k, i) value exceeds 2.5ηk and the point is considered ‘noise’. Thus, all points that have a minimum weighted distance to a specific center mk between 1.5ηk and 2.5ηk are assigned to the same cluster CK+1 , and if the minimum weighted distances exceed 2.5ηk , the points are ‘noise’. The goal of the threshold ηk is to define a bound to border the proximity to a cluster center. The limit 1.5ηk defines the region of a good neighborhood, and beyond 2.5ηk the region of ‘noise’ is defined. Similarity in the weighted distances and proximity to a cluster center mk is decided using the threshold ηk . For each cluster k, the ηk is found by using the average of the W D(k, .) of the points which are in the neighborhood of mk and have magnitudes similar to each other. The similarity between the magnitudes of the W D is measured by sorting their values and checking if the consecutive differences remain lower that a threshold ΔW D . This value depends on the number of data points and the median of the matrix W D values (see Algorithm 2 for the details): ΔW D =
n−1 median[W D(k, i)]k=1,...,K, i=1,...,n . n
(3)
During the iterative process, clusters that are close to each other, measured by the distance between their centers, may be merged if the distance between
A Simple Clustering Algorithm Based on Weighted Expected Distances
91
their centers is below a threshold, herein denoted as ηD . This parameter value is defined as a function of the search region of the data points and also depends on the current number of clusters and number of attributes of the data set: ηD =
minj=1,...,a {maxi Xi,j − mini Xi,j } . K(a − 1)
(4)
Furthermore, all clusters that have a relatively small number of points, i.e., all clusters that verify |Ck | < Nmin , where Nmin = min{50, max{2, 0.05n}}, are removed, their centers are deleted, and the points are coined as ‘noise’ (for the current iteration), see Algorithm 3.
Algorithm 2. Assigning Points Algorithm Require: mk for k = 1, . . . , K, data set Xi,j , i = 1, . . . , n, j = 1, . . . , a 1: Compute each component i of the vector DVk , i = 1, . . . , n (k = 1, . . . , K) 2: Compute matrix of W D as shown in (2) 3: Compute ΔW D using (3) 4: for k = 1, . . . , K do 5: W Dsort(k) ← sort(W D(k, :)) 6: end for 7: for k = 1, . . . , K do 8: for i = 1, . . . , n − 1 do 9: if (W Dsort(k, i + 1) − W Dsort(k, i)) > ΔW D then 10: break 11: end if 12: end for i W Dsort(k,l) 13: Compute ηk = l=1 i 14: end for 15: for i = 1, . . . , n do 16: Set k = arg mink=1,...,K W D(k, i) 17: if W D(k, i) < 1.5ηk then 18: Assign point Xi to the cluster Ck 19: else 20: if W D(k, i) < 2.5ηk then 21: Assign point Xi to the new cluster CK+1 22: else 23: Define point Xi as ‘noise’ (class Xnoise ) 24: end if 25: end if 26: end for 27: Compute center mK+1 as the centroid of all points assigned to CK+1 28: Update K 29: return K, mk , Ck , for k = 1, . . . , K, and Xnoise .
Summarizing, to achieve the optimal number of clusters, the Algorithm 1 proceeds iteratively by:
92
A. M. A. C. Rocha et al.
– adding a new cluster whose center is represented by the centroid of all points that were not assigned to any cluster according to the rules previously defined; – defining points ‘noise’ if they are not in an appropriate neighborhood of the center that is closest to those points, or if they belong to a cluster with very few points; – merging clusters that are sufficiently close to each other, as well as removing clusters with very few points. On the other hand, the position of each cluster center can be iteratively improved, by using the centroid of the data points that have been assigned to that cluster and the previous cluster center [12,13], as shown in Algorithm 4.
Algorithm 3. Merging and Removing Clusters Algorithm Require: K, mk , Ck , k = 1, . . . , K, ηD , Nmin , Xnoise 1: for k = 1 to K − 1 do 2: for l = k + 1 to K do 3: Compute Dk,l = mk − ml 2 4: if Dk,l ≤ ηD then 1 (|Ck |mk + |Cl |ml ) 5: Compute mk = |Ck |+|C l| 6: Assign all points X ∈ Cl to the cluster Ck 7: Delete ml (and remove Cl ) 8: Update K 9: end if 10: end for 11: end for 12: for k = 1, . . . , K do 13: if |Ck | < Nmin then 14: Define all X ∈ Ck as points ‘noise’ (add to class Xnoise ) 15: Delete mk (remove Ck ) 16: Update K 17: end if 18: end for 19: return K, mk , Ck for k = 1, . . . , K, and Xnoise .
Algorithm 4. Update Cluster Centers Algorithm Require: mk , Ck , k = 1, . . . , K, 1: Update all cluster centers: ⎞ ⎛ 1 ⎝ Xl + mk ⎠ for k = 1, . . . , K mk = |Ck | + 1 X ∈C l
2: return mk , k = 1, . . . , K
k
A Simple Clustering Algorithm Based on Weighted Expected Distances
4
93
Computational Results
In this section, some preliminary results are shown. Four sets of data points with two attributes, one set with four attributes (known as ‘Iris’) and one set with thirteen attributes (known as ‘Wine’) are used to compute and visuR . alize the partitioning clustering. The algorithms are coded in MATLAB The performance of the Algorithm 1, based on Algorithm 2, Algorithm 3 and Algorithm 4, depends on some parameter values that are problem dependent and dynamically defined: initial K = min{10, max{2, 0.01n}}, Nmin = min{50, max{2, 0.05n}}, ΔW D > 0, ηk > 0, k = 1, . . . , K, ηD > 0. The clustering results were obtained for Itmax = 5, except for ‘Iris’ and ‘Wine’ where Itmax = 20 was used. 4.1
Generated Data Sets
The generator code for the first four data sets is the following: Problem 1. ‘mydata’1 with 300 data points and two attributes. Problem 2. 2000 data points and two attributes. mu1 = [1 2]; Sigma1 = [2 0; 0 0.5]; mu2 = [-3 -5]; Sigma2 = [1 0; 0 1]; X = [mvnrnd(mu1,Sigma1,1000); mvnrnd(mu2,Sigma2,1000)]; Problem 3. 200 data points and two attributes. X = [randn(100,2)*0.75+ones(100,2);
randn(100,2)*0.5-ones(100,2)];
Problem 4. 300 data points and two attributes. mu1 = [1 2]; sigma1 = [3 .2; .2 2]; mu2 = [-1 -2]; sigma2 = [2 0; 0 1]; X = [mvnrnd(mu1,sigma1,200); mvnrnd(mu2,sigma2,100)]; In Figs. 1, 2, 3 and 4, the results obtained for Problems 1–4 are depicted: – the plot (a) is the result of assigning the points (applying Algorithm 2) to the clusters based on the initialized centers (randomly selected K points of the data set); – the plot (a) may contain a point, represented by the symbol ‘’, which identifies the position of the center of the cluster that is added in Algorithm 2 with the points that were not assigned (according to the previously referred rule) to a cluster; – plots (b) and (c) are obtained after the application of Algorithm 4 to update the centers that result from the clustering obtained by Algorithm 2 and Algorithm 3, at an iteration; 1
available at Mostapha Kalami Heris, Evolutionary Data Clustering in MATLAB (URL: https://yarpiz.com/64/ypml101-evolutionary-clustering), Yarpiz, 2015.
94
A. M. A. C. Rocha et al.
– the final clustering is visualized in plot (d); – plots (a), (b), (c) or (d) may contain points ‘noise’ identified by the symbol ‘×’; – plot (e) shows the values of the Davies-Bouldin (DB) index, at each iteration, obtained after assigning the points to clusters (according to the previously referred rule) and after the update of the cluster centers; – plot (f) contains the K-means clustering when K = K ∗ is provided to the algorithm. The code that implements the K-means clustering [14] is used for comparative purposes, although with K-means the number of clusters K had to be specified in advance. The performances of the tested clustering algorithms are measured in terms of a cluster validity measure, the DB index [15]. The DB index aims to evaluate intra-cluster similarity and inter-cluster differences by computing DB =
K Sk + Sl 1 max l=1,...,K, l=k K dk,l
(5)
k=1
where Sk (resp. Sl ) represents the average of all the distances between the center mk (resp. ml ) and the points in cluster Ck (resp. Cl ) and dk,l is the distance between mk and ml . The smallest DB index indicates a valid optimal partition. The computation of the DB index assumes that a clustering has been done. The values presented in plots (a) (on the x-axis), (b), (c) and (d) (on the y-axis), and (e) are obtained out of the herein proposed clustering (recall Algorithm 2, Algorithm 3 and Algorithm 4). The values of the ‘DB index(m,X)’ and ‘CS index(m,X)’ (on the y-axis) of plot (a) come from assigning the points to clusters based on the usual minimum distances of points to centers. The term CS index refers to the CS validity measure and is a function of the ratio of the sum of within-cluster scatter to between-cluster separation [13]. The quantity ‘Sum of Within-Cluster Distance (WCD)’ (in plots (b), (c) and (d) (on the x-axis)) was obtained out of our proposed clustering process. In conclusion, the proposed clustering is effective, very efficient and robust. As it can be seen, the DB index values that result from our clustering are slightly lower than (or equal to) those registered by the K-means clustering. 4.2
‘Iris’ and ‘Wine’ Data Sets
The results of our clustering algorithm, when solving Problems 5 and 6 are now shown. To compare the performance, our algorithm was run 30 times for each data set. Problem 5. ‘Iris’ with 150 data points. It contains three categories (types of iris plant) with 4 attributes (sepal length, sepal width, petal length and petal width) [16]. Problem 6. ‘Wine’ with 178 data points. It contains chemical analysis of 178 wines derived from 3 different regions, with 13 attributes [16].
A Simple Clustering Algorithm Based on Weighted Expected Distances Assign+Delete+Update centroids, at iteration 1 Cluster 1 Cluster 2 Cluster 3 Cluster 4
5
BD index after updating centroids = 0.96515
DB index(m,X) = 1.6035; CS index(m,X) = 1.2197
Random selection of centers+Assign 6
4 3 2 1 0 -1 -2
Cluster 1 Cluster 2 Cluster 3
6 5 4 3 2 1 0 -1 -2
-2
0
2
4
6
8
-2
DB index = 1.4783
0
2
4
6
8
Sum of Within-Cluster Distance (WCD) = 589.0572
(a) Assign after initialization
(b) 1st. iteration
Assign+Delete+Update centroids, at iteration 2
Assign+Delete+Update centroids, at iteration 5
Cluster 1 Cluster 2 Cluster 3
6
BD index after updating centroids = 0.59976
BD index after updating centroids = 0.6342
95
5 4 3 2 1 0 -1 -2
Cluster 1 Cluster 2 Cluster 3
6 5 4 3 2 1 0 -1 -2
-2
0
2
4
6
8
-2
Sum of Within-Cluster Distance (WCD) = 379.0274
(c) 2nd. iteration
4
6
8
Kmeans, # clusters = 3 / DB index = 0.60831 / 5 iterations
DB index (After Update Centroids) DB index (of Assign)
1.4
2
(d) final clustering (5th iteration)
Evaluation of new Updated Centers by DB index
1.5
0
Sum of Within-Cluster Distance (WCD) = 374.6869
Cluster 1 Cluster 2 Cluster 3
6
1.3
5
1.2
4
1.1
3
1
2
0.9 1 0.8 0 0.7 -1 0.6 -2 0.5 1
1.5
2
2.5
3
3.5
4
4.5
5
-2
0
2
4
6
8
Iterations
(e) DB index plot
(f) K-means with K = 3
Fig. 1. Clustering process of Problem 1
The results are compared to those of [17], that uses a particle swarm optimization (PSO) approach to the clustering, see Table 1. When solving the ‘Iris’ problem, our algorithm finds the 3 clusters in 77% of the runs (23 successful
96
A. M. A. C. Rocha et al. Assign+Delete+Update centroids, at iteration 1 4
BD index after updating centroids = 2.2919
DB index(m,X) = 1.8226; CS index(m,X) = 1.7192
Random selection of centers+Assign 4
2
0
-2
Cluster 1 Cluster 2 Cluster 3 Cluster 4 Cluster 5 Cluster 6 Cluster 7 Cluster 8 Cluster 9 Cluster 10
-4
-6
-8
2
0 Cluster 1 Cluster 2 Cluster 3 Cluster 4 Cluster 5 Noise
-2
-4
-6
-8 -8
-6
-4
-2
0
2
4
6
-8
DB index = 1.8608
-6
(a) Assign after initialization
-2
0
2
4
6
(b) 1st. iteration
Assign+Delete+Update centroids, at iteration 2
Assign+Delete+Update centroids, at iteration 5 4
BD index after updating centroids = 0.37506
4
BD index after updating centroids = 1.2168
-4
Sum of Within-Cluster Distance (WCD) = 2891.6719
2
0 Cluster 1 Cluster 2 Cluster 3
-2
-4
-6
-8
2
0 Cluster 1 Cluster 2
-2
-4
-6
-8 -8
-6
-4
-2
0
2
4
6
-8
Sum of Within-Cluster Distance (WCD) = 2474.8877
(c) 2nd. iteration
-4
-2
0
2
4
6
(d) final clustering (5th iteration)
Evaluation of new Updated Centers by DB index
2.5
-6
Sum of Within-Cluster Distance (WCD) = 2645.2442
Kmeans, # clusters = 2 / DB index = 0.37506 / 5 iterations 4
DB index (After Update Centroids) DB index (of Assign)
2
2
0 1.5
Cluster 1 Cluster 2
-2 1 -4 0.5 -6
-8
0 1
1.5
2
2.5
3
3.5
4
4.5
5
-8
-6
-4
-2
0
2
4
6
Iterations
(e) DB index plot
(f) K-means with K = 2
Fig. 2. Clustering process of Problem 2
runs out of 30). When solving the problem ‘Wine’, 27 out of 30 runs identified the 3 clusters. Table 1 shows the final value of a fitness function, known as Sum of WithinCluster Distance (WCD) (the best, the average (avg.), the worst and the stan-
A Simple Clustering Algorithm Based on Weighted Expected Distances Assign+Delete+Update centroids, at iteration 1
2.5
BD index after updating centroids = 0.8258
DB index(m,X) = 4.6524; CS index(m,X) = 1.6856
Random selection of centers+Assign
2 1.5 1 0.5 0 -0.5 Cluster 1 Cluster 2 Cluster 3 Noise
-1 -1.5
Cluster 1 Cluster 2 Noise
2.5 2 1.5 1 0.5 0 -0.5 -1 -1.5
-2
-2 -2
-1
0
1
2
3
-2
-1
DB index = 7.2298
0
1
2
3
Sum of Within-Cluster Distance (WCD) = 211.878
(a) Assign after initialization
(b) 1st. iteration
Assign+Delete+Update centroids, at iteration 2
Assign+Delete+Update centroids, at iteration 5
Cluster 1 Cluster 2
2.5
BD index after updating centroids = 0.62417
BD index after updating centroids = 0.68398
97
2 1.5 1 0.5 0 -0.5 -1 -1.5 -2
Cluster 1 Cluster 2
2.5 2 1.5 1 0.5 0 -0.5 -1 -1.5 -2
-2
-1
0
1
2
3
-2
Sum of Within-Cluster Distance (WCD) = 165.2711
(c) 2nd. iteration
1
2
3
Kmeans, # clusters = 2 / DB index = 0.62418 / 5 iterations
DB index (After Update Centroids) DB index (of Assign)
7
0
(d) final clustering (5th iteration)
Evaluation of new Updated Centers by DB index
8
-1
Sum of Within-Cluster Distance (WCD) = 157.7905
Cluster 1 Cluster 2
2.5 2
6
1.5 1
5
0.5
4
0 3 -0.5 2
-1
1
-1.5 -2
0 1
1.5
2
2.5
3
3.5
4
4.5
5
-2
-1
0
1
2
3
Iterations
(e) DB index plot
(f) K-means with K = 2
Fig. 3. Clustering process of Problem 3
dard deviation (St. Dev.) values over the successful runs). The third column of the table has the WCD that results from our clustering, i.e., after assigning the points to clusters (according to the above described rules based on the WD – Algorithm 2), merging and removing clusters if appropriate (Algorithm 3) and
98
A. M. A. C. Rocha et al. Assign+Delete+Update centroids, at iteration 1 6 Cluster 1 Cluster 2 Cluster 3 Cluster 4
4
BD index after updating centroids = 0.98561
DB index(m,X) = 1.2146; CS index(m,X) = 1.7295
Random selection of centers+Assign 6
2
0
-2
-4
-6
-4
-2
0
2
4
6
Cluster 1 Cluster 2 Noise
4
2
0
-2
-4
8
-6
DB index = 1.2733
-4
(a) Assign after initialization
0
2
4
6
8
(b) 1st. iteration
Assign+Delete+Update centroids, at iteration 2
Assign+Delete+Update centroids, at iteration 5
6
6 Cluster 1 Cluster 2 Noise
4
BD index after updating centroids = 0.84801
BD index after updating centroids = 0.91049
-2
Sum of Within-Cluster Distance (WCD) = 546.8942
2
0
-2
-4
-6
-4
-2
0
2
4
6
Cluster 1 Cluster 2 Noise
4
2
0
-2
-4
8
-6
Sum of Within-Cluster Distance (WCD) = 528.8877
(c) 2nd. iteration
-2
0
2
4
6
8
(d) final clustering (5th iteration)
Evaluation of new Updated Centers by DB index
1.3
-4
Sum of Within-Cluster Distance (WCD) = 507.6508
Kmeans, # clusters = 2 / DB index = 0.86305 / 5 iterations 6
DB index (After Update Centroids) DB index (of Assign)
1.25
Cluster 1 Cluster 2
4
1.2 1.15
2 1.1 1.05
0
1 0.95
-2
0.9 -4
0.85 0.8 1
1.5
2
2.5
3
3.5
4
4.5
5
-6
-4
-2
0
2
4
6
8
Iterations
(e) DB index plot
(f) K-means with K = 2
Fig. 4. Clustering process of Problem 4
updating the centers (Algorithm 4), ‘WCDW D ’. The number of points ‘noise’ at the final clustering (of the best run, i.e., the run with the minimum value of ‘WCDW D ’), ‘# noise’, the number of iterations, It, the time in seconds, ‘time’, and the percentage of successful runs, ‘suc.’, are also shown in the table. The
A Simple Clustering Algorithm Based on Weighted Expected Distances
99
Table 1. Clustering results for Problems 5 and 6 Algorithm 1 Problem ‘Iris’
Best
107.89
Avg.
108.21
Worst
109.13
St. Dev. ‘Wine’
Results in [17]
‘WCDW D ’ # noise It Time suc. ‘WCD’ 0
5
0.051 77%
‘WCD’
Time
100.07
97.22 0.343
8.7 0.101
100.17
97.22 0.359
12 0.156
100.47
97.22 0.375
0.56
0.18
Best
17621.45
Avg.
19138.86
9.1 0.335
17621.12 16530.54 2.944
Worst
20637.04
13 1.132
19274.45 16530.54 3.000
St. Dev.
0
6
1249.68
0.167 90% 16330.19 16530.54 2.922
1204.04
Table 2. Results comparison for Problems 5 and 6 Algorithm 1 ‘WCDD ’ # noise It
Problem ‘Iris’
Best Avg. St. Dev.
97.20 0 97.21 0.01
‘Wine’
Best 16555.68 0 Avg. 17031.79 St. Dev. 822.08
4 8.7
K-means K-NM-PSO Time suc. ‘WCD’ ‘WCD’ 0.096 63% 0.204
97.33 106.05 14.11
96.66 96.67 0.008
6 0.159 90% 16555.68 16292.00 10.3 0.319 18061.00 16293.00 793.21 0.46
column identified with ‘WCD’ contains values of WCD (at the final clustering) using X and the obtained final optimal cluster centers to assign the points to the clusters/centers based on the minimum usual distances from each point to the centers. For the same optimal clustering, the ‘WCD’ has always a lower value than ‘WCDW D ’. When comparing the ‘WCD’ of our clustering with ‘WCD’ registered in [17], our obtained values are higher, in particular the average and the worst values, except the best of the results ‘WCD’ for problem ‘Wine’. The variability of the results registered in [17] and [18] (see also Table 2) are rather small but this is due to the type of clustering based on the PSO algorithm. The clustering algorithm K-NM-PSO [18] is a combination of K-means, the local optimization method Nelder-Mead (NM) and the PSO. In contrast, our algorithm finds the optimal clustering much faster than the PSO clustering approach in [17]. This is a point in favor of our algorithm, an essential requirement when solving large data sets. The results of our algorithm shown in Table 2 (third column identified with ‘WCDD ’) are based on the designed and previously described Algorithms 1, 2, 3 and 4, but using the usual distances between points and centers for the assigning process (over the iterative process). These values are slightly better
100
A. M. A. C. Rocha et al.
than those obtained by the K-means (available in [18]), but not as interesting as those obtained by the K-NM-PSO (reported in [18]).
5
Conclusions
A probabilistic approach to define the weighted expected distances from the cluster centers to the data points is proposed. These weighted distances are used to assign points to clusters, represented by their centers. The new proposed clustering algorithm relies on mechanisms to create new clusters. Points that are not assigned to a cluster, based on the weighted expected distances, are gathered in a new cluster. The clustering is also able to merge two nearby clusters and remove the clusters that have very few points. Points are also identified as ‘noise’ when they are beyond a limit of a reasonable neighbourhood (as far as weighted distances are concerned) and when they belong to a cluster with very few points. The preliminary clustering results, and the comparisons with the K-means and other K-means combinations with stochastic algorithms, show that the proposed algorithm is very efficient and effective. In the future, data sets with non-convex clusters, clusters with different shapes, in particular those with non-spherical blobs, and sizes will be addressed. Our proposal is to integrate a kernel function into our clustering approach. We aim to further investigate the dependence of the parameter values of the algorithm on the number of attributes, in particular, when highly dimensional data sets should be partitioned. The set of tested problems will also be enlarged to include large data sets with clusters of different shapes and non-convex. Acknowledgments. The authors wish to thank three anonymous referees for their comments and suggestions to improve the paper.
References 1. Jain, A.K., Murty, M.N., Flynn, P.J.: Data clustering: a review. ACM Comput. Surv. 31(3), 264–323 (1999) 2. Greenlaw, R., Kantabutra, S.: Survey of clustering: algorithms and applications. Int. J. Inf. Retr. Res. 3(2) (2013). 29 pages 3. Ezugwu, A.E.: Nature-inspired metaheuristics techniques for automatic clustering: a survey and performance study. SN Appl. Sci. 2, 273–329 (2020) 4. Mohammed, J.Z., Meira, W., Jr.: Data Mining and Machine Learning: Fundamental Concepts and Algorithms, 2nd edn. Cambridge University Press, Cambridge (2020) 5. Xu, D., Tian, Y.: A comprehensive survey of clustering algorithms. Ann. Data Sci. 2(2), 165–193 (2015) 6. MacQueen, J.B.: Some methods for classification and analysis of multivariate observations. In: Le Cam, L.M., Neyman, J. (eds.) Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, vol. 1, pp. 281–297. University of California Press (1967) 7. Manning, C.D., Raghavan, P., Sch¨ utze, H.: Introduction to Information Retrieval. Cambridge University Press, Cambridge (2008)
A Simple Clustering Algorithm Based on Weighted Expected Distances
101
8. Fraley, C., Raftery, A.E.: Model-based clustering, discriminant analysis and density estimation. J. Am. Stat. Assoc. 97(458), 611–631 (2002) 9. Kwedlo, W.: A clustering method combining differential evolution with K-means algorithm. Pattern Recogn. Lett. 32, 1613–1621 (2011) 10. Patel, K.G.K., Dabhi, V.K., Prajapati, H.B.: Clustering using a combination of particle swarm optimization and K-means. J. Intell. Syst. 26(3), 457–469 (2017) 11. He, Z., Yu, C.: Clustering stability-based evolutionary K-means. Soft. Comput. 23, 305–321 (2019) 12. Sarkar, M., Yegnanarayana, B., Khemani, D.: A clustering algorithm using evolutionary programming-based approach. Pattern Recogn. Lett. 18, 975–986 (1997) 13. Chou, C.-H., Su, M.-C., Lai, E.: A new cluster validity measure and its application to image compression. Pattern Anal. Appl. 7, 205–220 (2004) 14. Asvadi, A.: K-means Clustering Code. Department of ECE, SPR Lab., Babol (Noshirvani) University of Technology (2013). http://www.a-asvadi.ir/ 15. Davies, D.L., Bouldin, D.W.: A cluster separation measure. IEEE Trans. Pattern Anal. Mach. Intell. PAMI-1(2), 224–227 (1979) 16. Dua, D., Graff, C.: UCI Machine Learning Repository. University of California, School of Information and Computer Science, Irvine, CA (2019). http://archive. ics.uci.edu/ml 17. Cura, T.: A particle swarm optimization approach to clustering. Expert Syst. Appl. 39, 1582–1588 (2012) 18. Kao, Y.-T., Zahara, E., Kao, I.-W.: A hybridized approach to data clustering. Expert Syst. Appl. 34, 1754–1762 (2008)
Optimization of Wind Turbines Placement in Offshore Wind Farms: Wake Effects Concerns Jos´e Baptista1,2(B) , Filipe Lima1 , and Adelaide Cerveira1,2 1
School of Science and Technology, University of Tr´ as-os-Montes and Alto Douro, 5000-801 Vila Real, Portugal {baptista,cerveira}@utad.pt, [email protected] 2 UTAD’s Pole, INESC-TEC, 5000-801 Vila Real, Portugal
Abstract. In the coming years, many countries are going to bet on the exploitation of offshore wind energy. This is the case of southern European countries, where there is great wind potential for offshore exploitation. Although the conditions for energy production are more advantageous, all the costs involved are substantially higher when compared to onshore. It is, therefore, crucial to maximize system efficiency. In this paper, an optimization model based on a Mixed-Integer Linear Programming model is proposed to find the best wind turbines location in offshore wind farms taking into account the wake effect. A case study, concerning the design of an offshore wind farm, were carried out and several performance indicators were calculated and compared. The results show that the placement of the wind turbines diagonally presents better results for all performance indicators and corresponds to a lower percentage of energy production losses. Keywords: Offshore wind farm
1
· Wake effect · Optimization
Introduction
In the last two decades, wind energy has been a huge investment for almost all developed countries, with a strong bet on onshore wind farms (WF). It is expected that investments will be directed towards the energy exploration in the sea, where offshore wind farms (OWFs) are a priority. Recently, the European Union has highlighted the enormous unexplored potential in Europe’s seas, intending to multiply offshore wind energy by 20 to reach 450 GW, to meet the objective of decarbonizing energy and achieving carbon neutrality by 2050 [6]. An OWF has enormous advantages over onshore, with reduced visual impact and higher efficiency, where the absence of obstacles allow the wind to reach a higher and more constant speed. However, the installation costs are substantially higher [10]. So, it is very important to optimize the efficiency of these c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 102–109, 2021. https://doi.org/10.1007/978-3-030-91885-9_8
Optimization of WT Placement in OWF: Wake Effects Concerns
103
WFs, wherein the location of wind turbines (WTs) is one of the most important factors to consider, taking into account the wake effect impact on the energy production of each one. To achieve this goal new models related to WF layout optimization should be investigated. Several authors addressed the topic using models based on genetic algorithms (GA) as is the case of Grady et al. [7]. In [12], a mathematical model based in a particle swarm optimization (PSO) algorithm which includes the variation of both wind direction and wake deficit is proposed. A different approach is addressed in [13], where a modular framework for the optimization of an OWF using a genetic algorithm is presented. In [14] a sequential procedure is used for global optimization consisting of two steps: i) a heuristic method to set an initial random layout configuration, and ii) the use of nonlinear mathematical programming techniques for local optimization, which use the random layout as an initial solution. Other authors address the topic of WF optimization, focusing on optimizing the interconnection between the turbines, known as cable routing optimization. Cerveira et al. in [5] proposes a flow formulation to find the optimal cable network layout considering only the cable infrastructure costs. In [3,4,11] Mixed-Integer Linear Programming (MILP) models are proposed to optimize the wind farm layout in order to obtain the greater profit of wind energy, minimizing the layout costs. Assuming that the ideal position of the turbines has already been identified, the most effective way of connecting the turbines to each other and to the substations, minimizing the infrastructure cost and the costs of power losses during the wind farm lifetime is considered. The main aim of this paper is to optimize the location of the WTs to minimize the single wake effect and so to maximize energy production. In order to achieve this target, a MILP optimization model is proposed. A case study is considered and performance indicators were computed and analyzed obtaining guidelines for the optimal relative position of the WTs. The paper is organized as follows. In Sect. 2 the wind power model is addressed and in Sect. 3 the MILP model to optimize the WTs placement is presented. Section 4 presents the case study results. Finally, Sect. 5 highlights some conclusions remarks.
2
Wind Farm Power Model
A correct evaluation of the wind potential for power generation must be based on the potential of the wind resource and various technical and physical aspects that can affect energy production. Among them, the wind speed probability distribution, the effect of height, and the wake effect are highlighted. 2.1
Power in the Wind
The energy available for a WT is kinetic energy associated with an air column traveling at a uniform and constant speed u, in m/s. The power available in the wind, in W , is proportional to the cube of the wind speed, given by Eq. (1), P =
1 1 (ρAv)v 2 = ρAv 3 2 2
(1)
104
J. Baptista et al.
where A is the swept area by the rotor blades, in m2 , v is the wind speed, in m/s, and ρ is the air density, usually considered as constant during the year, with standard value being equal to 1.225 kg/m3 . The power availability significantly depends on the wind speed, so, it is very important to place the turbines where the wind speed is high. Unfortunately, the total wind power cannot be recovered in a WT. According to Betz law [2], it is only allowed to convert, at most, 59.3% of the kinetic energy in mechanical energy to be used through the turbine. Typically, turbines’ technical is provided by manufacturers. This is the case of the power curve which gives the electrical power output, Pe (v), as a function of the wind speed, v. Knowing the wind profile and the turbine power curve, it is possible to determine the energy Ea produced by the conversion system, vmax Ea = 8760 f (v)Pe (v)dv. (2) v0
2.2
The Jensen Model for Wake Effect
The power extraction of turbines from the wind depends on the wind energy content, which differs in its directions. The downstream wind (the one that comes out of the turbine) has less energy content than the upstream wind. The wake effect is the effect of upstream wind turbines on the speed of the wind that reaches downstream turbines. In a WF where there are several WTs, it is very likely that the swept area of a turbine is influenced by one or more turbines that are before, this effect can be approached by the Jensen model proposed in 1983 by N. O. Jensen [8] and developed in 1986 by Katic et al. [9]. The initial diameter of the wake is equal to the diameter of the turbine and expands linearly as a function of wind. Similarly, the downstream wind deficit declines linearly with the distance to the turbine. The simple wake model consists of a linear expression of the wake diameter and the decay of the speed deficit inside the wake. The downstream wind speed (vd ) of the turbine can be obtained by (3), where v0 represents the upstream wind speed. ⎛ ⎞ 2 N
2a ⎜ ⎟ v d = v0 ⎝ 1 − (3) ⎠ αx 2 (1 + ) r1 i=1 Where: the wake radius r1 is given by r1 = αx + rr , in which rr is the radius of the upstream turbine; x is the distance that meets the obstacle; α is a scalar that determines how quickly the wake expands, which is given by α = 2 ln1 z , where z0
z is the hub height and z0 is the surface roughness that in the water is around 0.0002 m, although it may√increase with sea conditions; a is the axial induction factor given by a = (1 − 1 − CT )/2, and the turbine thrust coefficient CT is determined by the turbine manufacturer according to Fig. 1.
Optimization of WT Placement in OWF: Wake Effects Concerns
3
105
Optimization Model
This section presents a MILP model to determine the optimal location of WT to maximize energy production, taking into account the wake effect. It is given a set of possible locations for WTs and a maximum number of WTs to install. Consider the set N = {1, . . . , n} of all possible locations to install WTs and, for each i ∈ N , let Ei be the energy generated by the WT installed at the location i without considering the wake effect, Eq. (2). Let Iij be the interference (loss of energy produced) at a WT installed on location j by the WT installed at location i, with i, j ∈ N . Those values are computed using the Jensen’s model, Sect. 2.2. It is considered that Ijj = 0. The following decision variables are considered: binary variables xi that assumes the value 1 if a WT is installed in the location i and 0 otherwise; non-negative variables wi that represents the interference at a WT installed on location i by all WT installed in the WF, for each i ∈ N : . If a WT is installed at locationi, wi is the summation of the interference caused by all WT. Therefore: wi = j∈N Iij xj if xi = 1 and wi = 0 if xi = 0. So, if a WT is installed on location i, the produced energy is given by Ei −Ei wi , and the objective is to maximize i∈N (Ei xi − wi Ei ) . To set variable w as just been described, the following constraint will be included, where M is a big number, Iij xj ≤ wi + M (1 − xi ) (4) j∈N
In fact, if xi = 0, by inequality (4), it holds j∈N Iij xj ≤ wi + M , and so there are no lower bound on the value of wi . However, as the coefficient of wi is negative in a maximization model, wi will assume the smallest possible value in the optimal solution which, in this case, is zero. Furthermore, if xi = 1, it holds ij xj ≤ wi and wi will assumes the smallest possible value which, in this j∈N I case, is j∈N Iij xj , as expected. The optimization model to determine the WTs location is denoted by WTL model and can be written as follows: max (5) i∈N (Ei xi − wi Ei ) subject to x ≤ U (6) i∈N i I x ≤ wi + M (1 − xi ) , i ∈ N (7) ij j j∈N xi ∈ {0, 1}, wi ≥ 0 i∈N (8) The objective function (5) corresponds to the maximization of the energy produced, taking into account the losses due to the wake effect. Constraint (6) imposes a limit U on the number of turbines (this bound is often associated with the available capital). Constraints (7) relate variables x and w, assuring that wi = 0 if xi = 0 and wi = j∈N Iij if xi = 1. Finally, constraints (8) are signal constraints on the variables. To strengthen constraints (7), the value considered for the big constant was M = U − 1.
106
4
J. Baptista et al.
Case Study and Results
In this section, a case study will be described and the results are presented and discussed. The WT used was Vestas v164-8.0 [15] with the power curve provided by the manufacturer shown in Fig. 1. The site chosen for the WT installation is approximately 20 km off the coast of Viana do Castelo, Portugal, location currently used by the first Portuguese OWF. To achieve the average annual wind speed there was used the Global wind Atlas [1] data. The average annual wind speed considered at the site was 8 m/s collected at 150 m of height. Prandtl Law was used to extrapolate the wind speed at the turbine hub height, around 140 m. Subsequently, the annual frequency of occurrence is calculated for various wind speeds, in the range between 4 m/s and 25 m/s (according to the WT power curve), using the Rayleigh distribution. The occurrence of these wind speeds is shown in the bar chart of Fig. 2a. Figure 2b shows the annual energy production of a WT at each wind speeds considered. Adding all energy values, the total yearly energy production for this WT will be 29.1 GWh.
Fig. 1. Power and thrust coefficient curve for WT Vestas V164-8.0.
(a) Number of hours wind speeds occur.
(b) Annual energy produced by a WT.
Fig. 2. Wind distribution and annual energy production.
There are 36 possible locations for WT, distributed over six rows, each one of them having six possible locations, as shown in Fig. 3a. The horizontally and vertically distance between two neighbored locations is 850 m and the predominant wind direction is marked with an arrow.
Optimization of WT Placement in OWF: Wake Effects Concerns
(a) Possible location of WTs.
107
(b) Energy production in each row with wake effect.
Fig. 3. Wind farm layout and annual energy production
According to Sect. 2.2, the Jensen model for the wake effect was used to calculate the speed behind each WT. Note that not all WTs receive the same amount of wind and for this reason do not will produce the same amount of energy. Figure 3b shows the total energy produced in each row. The wake effect leads a reduction in the energy production around 3.5% in each row. Two situations where considered in which it is intended to select a maximum of U = 22 and U = 24 WTs. The WTL model was constructed using FICO Xpress Mosel (Version 4.8.0) and then it was solved using the interfaces provided by these packages to the Optimizer. The CPU-time for all tested instances were less than 1 s and the model has 31 constraints and 66 variables. When not considering the wake effect, for U = 22 the expected electricity produced annually is 636.3 GWh and for U = 24 it is 692.8 GWh. Figures 4a and b show the optimal solutions for the distribution of the WTs, by solving WTL model for both situations. It turns out that when U = 22 the maximum expected production of energy for the 22 turbines is 639.6 GWh, per year. When U = 24 the maximum expected energy production by the 24 WTs is 698.3 GWh. It is observed that when considering the wake effect, with 22 turbines, there is a decrease of 3.6 GWh of energy produced, which corresponds to a reduction of 0.56%. With 24 WTs, there was a decrease of approximately 5.3 GWh of energy produced, which corresponds to a reduction of 0.72%. For a more complete analysis, some performance indicators were calculated, Equivalent f ull load (h) = Capacity F actor (%) =
Energy P roduction T otal installed power
Energy P roduction 8760 · T otal installed power
Specif ic energy production (M W h/m2 ) =
Energy P roduction T otal Blades swept area
(9) (10)
(11)
The values of these indicators, for both situations, are presented in Table 1.
108
J. Baptista et al.
(a) Case U = 22.
(b) Case U = 24.
Fig. 4. Optimal WTs location. Table 1. Energy calculation and performance indicators, equations (9)–(11). 22 turbines With
24 turbines Without
With
Without
Wake effect Wake effect Wake effect Wake effect Energy production (MWh)
636000
639600
693000
698300
Total installed power (MW)
176
176
192
192
Area swept by the blades (m2 )
464728
464728
506976
506976
Equivalent full load (h)
3613.64
3634.09
3609.38
3635.42
Capacity factor (%)
41.25
41.49
41.20
41.50
1.38
1.37
1.38
Specific energy production (MWh/m2 ) 1.37
Analyzing the indicators in Table 1, the solution with the WTs placed diagonally (22 turbines) presents better results, with a Equivalent Full Load around 3614 h, a Capacity Factor of 41.25% and a Specific energy production of 1.37 MWh/m2 , which confirms that placing the turbines on diagonal lines results in greater gains for OWFs.
5
Conclusions
In this work, after having addressed mathematical models for wind characterization, a MILP model is proposed to obtain the optimal distribution of a given number of turbines in an OWF location, with the objective of maximizing energy production. Two very important conclusions can be drawn from the obtained results. The first conclusion is that the relative position of the WTs has an influence on the amount of energy produced by each of them. In fact, the placement of the WTs diagonally presents better results for all performance indicators and has a lower percentage of energy production losses. The second conclusion refers to the size of the wind farm, as the results show, for larger OWFs it results in a lower percentage of energy production losses. In the case of 22 turbines, there is an annual decrease of 3.6 GWh of energy produced, representing 0.56%.
Optimization of WT Placement in OWF: Wake Effects Concerns
109
The results obtained show that the optimization model based on MILP is able to achieve, with low processing times, exact optimal solutions allowing to significantly increase the efficiency of OWFs. For future work, it is possible to complement this method by carrying out a more detailed study with regard to energy losses due to the wake effect taking into account also the non-predominant wind directions, and to incorporate in the optimization model the cost of the connection network between turbines taking into account the construction costs and energy losses over its lifetime.
References 1. Global Wind Atlas. https://globalwindatlas.info. Accessed May 2021 2. Bergey, K.H.: The lanchester-betz limit. J. Energy 3, 382–384 (1979) 3. Cerveira, A., Baptista, J., Pires, E.J.S.: Wind farm distribution network optimization. Integr. Comput.-Aided Eng. 23(1), 69–79 (2015) 4. Cerveira, A., de Sousa, A., Solteiro Pires, E.J., Baptista, J.: Optimal cable design of wind farms: the infrastructure and losses cost minimization case. IEEE Trans. Power Syst. 31(6), 4319–4329 (2016) 5. Cerveira, A., Baptista, J., Pires, E.J.S.: Optimization design in wind farm dis´ et al. (eds.) International Joint Conference tribution network. In: Herrero, A., SOCO’13-CISIS’13-ICEUTE’13. AISC, vol. 239, pp. 109–119. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-01854-6 12 6. E.Commission: An EU Strategy to harness the potential of offshore renewable energy for a climate neutral future. COM(2020) 741 final (2020) 7. Grady, S., Hussaini, M., Abdullah, M.M.: Placement of wind turbines using genetic algorithms. Renew. Energy 30(2), 259–270 (2005) 8. Jensen, N.O.: A Note on Wind Generator Interaction, pp. 1–16. Riso National Laboratory, Roskilde (1983) 9. Katic, I., Hojstrup, J., Jensen, N.O.: A simple model for cluster efficiency. In: Wind Energy Association Conference EWEC 1986, vol. 1, pp.407–410 (1986) 10. Manzano-Agugliaro, F., S´ anchez-Calero, M., Alcayde, A., San-Antonio-G´ omez, C., Perea-Moreno, A., Salmeron-Manzano, E.: Wind turbines offshore foundations and connections to grid. Inventions 5, 1–24 (2020) 11. Fischetti, M., Pisinger, D.: Optimizing wind farm cable routing considering power losses. Eur. J. Oper. Res. 270, 917–930 (2017). https://doi.org/10.1016/j.ejor.2017. 07.061 12. Hou, P., Hu, W., Soltani, M., Chen, Z.: Optimized placement of wind turbines in large-scale offshore wind farm using particle swarm optimization algorithm. IEEE Trans. Sustain. Energy 6(4), 1272–1282 (2015) 13. Pillai, A.C., Chick, J., Johanning, L., Khorasanchi, M., Barbouchi, S.: Optimisation of offshore wind farms using a genetic algorithm. Int. J. Offshore Polar Eng. 26(3), 1272–1282 (2016) 14. P´erez, B., M´ınguez, R., Guanche, R.: Offshore wind farm layout optimization using mathematical programming techniques. Renew. Energy 53, 389–399 (2013) 15. Vestas: Wind-turbine-models. https://en.wind-turbine-models.com/turbines/318vestas-v164-8.0. Accessed May 2021
A Simulation Tool for Optimizing a 3D Spray Painting System Jo˜ao Casanova1(B) , Jos´e Lima2,3(B) , and Paulo Costa1,3(B) 1
3
Faculty of Engineering, University of Porto, Porto, Portugal {up201605317,paco}@fe.up.pt 2 Research Centre of Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Braganza, Portugal [email protected] INESC-TEC - INESC Technology and Science, Porto, Portugal
Abstract. The lack of general robotics purposed, accurate open source simulators is a major setback that limits the optimized trajectory generation research and general evolution of the robotics field. Spray painting is a particular case that has multiple advantages in using a simulator for exploring new algorithms, mainly the waste of materials and the dangers associated with a robotic manipulator. This paper demonstrates an implementation of spray painting on a previously existing simulator, SimTwo. Several metrics for optimization that evaluate the painted result are also proposed. In order to validate the implementation, we conducted a real world experiment that serves both as proof that the chosen spray distribution model translates to reality and as a way to calibrate the model parameters.
Keywords: Spray painting
1
· Simulator · Trajectory validation
Introduction
Spray painting systems have been widely used in industry, becoming increasingly more competitive. Throughout the years several technologies have been developed and adopted in order to improve optimization and quality of the painting process. In this work we address the problem of simulating spray paint optimization. This is a vital tool since it allows the user to analyse the quality of the paint produced by different trajectories without additional costs or dangers. In this work a 3D spray painting simulation system is proposed. This system has realistic spray simulation with sufficient accuracy to mimic real spray painting. The simulation has 3D CAD or 3D scanned input pieces and produces a realistic visual effect that allows qualitative analyses of the painted product. It is also presented an evaluation metric that scores the painting trajectory based on thickness, uniformity, time and degree of coverage. This new simulation system, provides an open source implementation that is capable of real time spray simulation with validated experimental results. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 110–122, 2021. https://doi.org/10.1007/978-3-030-91885-9_9
A Simulation Tool for Optimizing a 3D Spray Painting System
2
111
Literature Review
Spray painting simulation is an important part of automated spray painting systems since it provides the possibility to predict the end result without any cost. Furthermore, virtual simulations allow quality metrics such as paint thickness uniformity or paint coverage to be easily measured and optimized. This section analyse the basis to simulate spray painting, including painting methods and several approaches on the spray simulation, such as computational fluid dynamics (CFD), spray simulation applied to robotics and commercial simulators. 2.1
Painting Methods
Paint application has been used for centuries, for most of this time the main methods consisted in spreading paint along the desired surface with tools like a brush or a roller. Nowadays however, their popularity and use are decreasing since they are slow methods with low efficiency, and the resulting quality highly depends on the quality of the materials and tools. Consequently new techniques were developed such as dipping and flow coating, that are best applied to small components and protective coatings, and spray painting that is more suitable for industry. The main industrial painting methods are: air atomized spray application, high volume low pressure (HVLP) spray application, airless spray application, air-assisted airless spray application, heated spray application and electrostatic spray application [19]. The conventional spray application method is air atomized spray. In this method the compressed air is mixed with the paint in the nozzle and the atomized paint is propelled out of the gun. HVLP is an improvement on the conventional system and is best suited for finishing operations. The paint is under pressure and the atomization occurs when it contacts with the high volume of low pressure air resulting in the same amount of paint to be propelled at the same rate but with lower speeds. This way a high precision less wasteful spray is produced, since the paint doesn’t miss the target and the droplets don’t bounce back. Airless spray application is a different method, that uses a fluid pump to generate high pressure paint. The small orifice in the tip atomizes the pressurized paint. The air resistance slows down the droplets and allows for a good amount to adhere to the surface, but still in a lower extent than HVLP [14]. Air-assisted airless spray application is a mixture of the airless and conventional methods with the purpose of facilitating the atomization and decreasing the waste of paint. Heated spray application can be applied to the other methods and it consists in pre-heating the paint, making it less viscous requiring lower pressures. This also reduces drying time and increases efficiency. Electrostatic spray application can also be applied with the other techniques and consists in charging the paint droplets as they pass through an electrostatic field. The surface to be painted is grounded in order to attract the charged particles [18]. At last, the conditions at which the paint is applied have a direct impact on the paint job quality and success. This way, painting booths are usually used,
112
J. Casanova et al.
because it is easier to control aspects such as temperature, relative humidity and ventilation. Lower temperatures increase drying time, while high moisture in the air interferes with adhesion and can cause some types of coating not to cure. Also the ventilation decreases initial drying time and allows the workspace to be safer for the workers. 2.2
Computational Fluid Dynamics (CFD)
In order to simulate the spray painting process as accurately as possible, it is necessary to understand the physical properties that dictate droplets trajectories and deposition. Computational fluid dynamics (CFD) allows for a numerical approach that can predict flow fields using the Navier-Stokes equations [15]. An important step that CFD still struggles to solve is the atomization process. It is possible to skip the atomization zone by using initial characteristics that can be approximated by measures of the spray [16]. Another alternative is to allow some inaccuracies of the model in the atomization zone by simulating completed formed droplets near the nozzle. This allows for simpler initialization while maintaining accurate results near the painted surface [21]. The Fig. 1 shows a CFD result that compared with the experimental process reveals similar thickness [22]. Despite these advantages, CFD isn’t used in industrial applications [11]. This is due to the fact that CFD requires a high computation cost and the precision that it produces isn’t a requirement for many applications. On the other hand, with the current technological advances this seems to be a promising technique that enables high precision even on irregular surfaces [20].
Fig. 1. CFD results with the calculated velocity contours colored by magnitude (m/s) in the plane z = 0 [22].
A Simulation Tool for Optimizing a 3D Spray Painting System
113
Fig. 2. On the left side is presented a beta distribution for varying β [11]. On the right side is presented an asymmetrical model (ellipse) [11].
2.3
Spray Simulation Applied to robotics
In robotics, it is common to use explicit functions to describe the rate of paint deposition at a point based on the position and orientation of the spray gun. Depending on the functions used, it is conceivable to create finite and infinite range models [11]. In infinite range models the output approaches zero as the distance approaches infinity. The most usually used distributions are Cauchy and Gaussian. Cauchy is simpler, allowing for faster computation while Gaussian is rounder and closer to reality [10,17]. It is also possible to use multiple Gaussian functions in order to obtain more complex and accurate gun models [24]. If the gun model is considerably asymmetrical, an 1D Gaussian with an offset revolved around an axis summed with a 2D Gaussian provides a 2D deposition model [13]. In finite range models the value of deposition outside a certain distance is actually zero. Several models have been developed such as trigonometric, parabolic, ellipsoid and beta [11]. The most used model is the beta distribution model that, as the beta increases, changes from parabolic to ellipsoid and even the Gaussian distribution can be modelled, as shown in Fig. 2 [9]. It is also useful to use two beta distributions that best describe the gun model, as was done with infinite range models, Fig. 2 exemplifies an asymmetrical model [23]. 2.4
Commercial Simulators
The growing necessity of an user friendly software that provides a fast and risk free way of programming industrial manipulators led to the development of dedicated software by the manipulators manufacturers and by external software companies. Most of them include essential features such as support for several robots, automatic detection of axis limits, collisions and singularities and cell components positioning.
114
J. Casanova et al.
RoboDK is a software developed for industrial robots that works as an offline programming and simulation tool [3]. With some simple configurations it’s possible to simulate and program a robotic painting system, however the simulation is a simple cone model and the programming is either entered manually or a program must be implemented [4]. This is a non trivial task for the end user but a favorable feature for research in paint trajectory generation. The advantages of this system are mainly the possibility to create a manual program and experiment it without any danger of collisions or without any waste of paint. RobCad paint, by Siemens, also works as an offline programming and simulation tool and also presents features as paint coverage analysis and paint databases [7]. It also includes some predefined paths that only require the user to set a few parameters. This simulator is one of the oldest in the market being used by many researchers to assess their algorithms. OLP Automatic by Inropa is a system that uses 3D scanning to automatically produce robot programs [1]. A laser scanner is used to scan parts that are placed on a conveyor and the system can paint every piece without human intervention. Although there are no available information about the created paths, the available demonstrations only paint simple pieces like windows and doors. Delfoi Paint is an offline programming software that besides the simulation and thickness analysis tools has distinctive features such as pattern tools that create paths based on surface topology and manual use of the 3D CAD features [2]. RoboGuide PaintPRO by FANUC, on the other hand is specifically designed to generate paths for FANUC robots [8]. The user selects the area to be painted and chooses the painting method and R Paint PowerPac by the path is generated automatically. Lastly, RobotStudio ABB is purposely developed for ABB robots and doesn’t have automatically generated paths. Its main benefit is the fast development of manual programs for multiple simultaneous robots.
3
Simulator Painting Add-On
The simulation was developed as an additional feature on an already existing robotics simulator, SimTwo. SimTwo is robot simulation environment that was designed to enable researchers to accurately test their algorithms in a way that reflected the real world. SimTwo uses The Open Dynamics Engine for simulating rigid body dynamics and the virtual world is represented using GLScene components [5], these provide a simple implementation of OpenGL [6]. In order to simulate the spray painting, it is taken the assumption that the target model has regular sized triangles. As this is rarely the case, a preprocess phase is required, where the CAD model is remeshed using an Isotropic Explicit Remeshing algorithm that repeatedly applies edge flip, collapse, relax and refine
A Simulation Tool for Optimizing a 3D Spray Painting System
115
Fig. 3. On top is presented the car hood model produced by the modeling software. On the bottom is presented the same model after the Isotropic Explicit Remeshing.
to improve aspect ratio and topological regularity. This step can be held by the free software MeshLab [12] and the transformation can be observed in Fig. 3 with a CAD model of a car hood as an example. The importance of the preprocess lies in the fact that from thereafter the triangle center describes a triangle location, since the triangles are approximately equilateral. Another important result emerges from the fact that every triangle area is identical and small enough so that each triangle constitutes an identity for the mesh supporting a pixel/vortex like algorithm.
116
J. Casanova et al.
Fig. 4. Simulation example with marked Spray gun origin (S), piece Center (C) and example point (P).
In order to achieve a fast runtime without compromising on the realism of the simulation, the paint distribution model adopted is a Gaussian function limited to the area of a cone. The parameters that describe the paint distribution as well as the cone’s angle are dependent on the spray gun and its settings. The general equation that calculates the paint quantity per angle pqα based on the painting rate pr , time step of the simulation Δt , standard deviation σ and angle α is presented in the Eq. 1. pqα = pr .Δt .
1 −α 2 1 √ e− 2 σ σ∗ 2∗π
(1)
The principle of the simulation consists in iterating every triangle in the target model, and for each one calculating the respective paint thickness that’s being added. For this, let us define the following variables that are available −−→ from the scene: C piece Center; Sp , Spray gun position; Sd ≡ Sp C, Spray gun direction; Pp the center of an example triangle position and Pn the triangle normal. With these the angle between the Spray gun direction and the vector formed between the spray gun position and the triangle center position can be calculated as expressed on Eq. 2. −−−→ Sp Pp • S d ) (2) α = arccos( −−−→ Sp Pp Sd
A Simulation Tool for Optimizing a 3D Spray Painting System
117
This angle, α, determines the limit of the cone that defines the area that is painted while also allowing to calculate the amount of paint that the triangle should receive as modeled by the Gaussian function. In order to obtain the paint quantity per triangle, pq , the fraction between the spray cone solid angle and the triangle solid angle Ω is used. The triangle solid angle calculation is presented on Eq. 3 and the paint quantity per triangle is presented on Eq. 4. Considering that the angle of the cone is δ, the vectors A, B, C are the 3 vertices of the triangle −−→ −−→ −−→ and the vectors a = Sp A, b = Sp B and c = Sp C. Ω = 2 arctan(
|abc| ) a b c + (a • b) c + (a • c) b + (b • c) a pq = pqα
Ω (2 ∗ π ∗ (1 − cos( 2δ ))
(3)
(4)
At last the added paint thickness Pt can be calculated by dividing the paint quantity by the area of the triangle At , Eq. 5. Pt =
pq At
(5)
As this analysis doesn’t avoid painting the back part of the piece, an extra condition can be added based on the angle β (Eq. 6) between the Spray gun direction and the triangle normal since its absolute value must always be larger than π2 to guarantee that the considered triangle is on the upper side of the piece. Pn • Sd ) (6) β = arccos( Pn Sd Some calculations such as the area and center of the triangles and which vertices correspond to each triangle occur every iteration (as long as the triangle is accumulating paint). As these values aren’t dynamic, they can be calculated only once, when the paint target CAD is loaded, and stored in arrays of records reducing the complexity of the algorithm to O(N).
4
Results
In order to determine the paint quality several metrics were implemented. Establishing which part of the paint target model is indeed supposed to be painted is a problem that is outside of the scope of this work as it would either involve a development of a graphical tool to select the parts to be painted or resort to simple plane intersections or even some kind of CAD model coloring that would limit the format abstraction. For this reasons a compromise solution is to calculate a dual version of each metric that only considers the painted triangles
118
J. Casanova et al.
as triangles to be painted. These measurements aren’t as accurate as the others and should only be used when the painting algorithm is clearly doing what it was meant to do and paying close attention to the coverage ratio. In this regard the average spray thickness, the standard deviation of the spray thickness, the positive average of the spray thickness, the positive standard deviation of the spray thickness, the max spray thickness, the minimum spray thickness and the positive minimum spray thickness function have been made available for any trajectory or sets of trajectories. In order to validate the simulation results, a real life experiment was made, using a regular spray painting gun with a servo controlling the trigger position in order to guarantee coherence among the results. The inside of the assembly can be observed in Fig. 5.
Fig. 5. Spray gun used during experiments, without the front cover (with a servo motor to control the trigger).
The spray gun was mounted in a Yaskawa MH50 machining robot, alongside the spindle and several loose paper sheets were used as sample painting targets. The full system is presented in Fig. 6. For the sake of reproducibility and meaningful analysis, an imaging processing pipeline was developed to extract the paint distribution function from the painted sheets scans. As the images were obtained with controlled conditions, no extensive preprocessing is necessary to clean them. This way the first step is
A Simulation Tool for Optimizing a 3D Spray Painting System
119
Fig. 6. Robotic painting system used during experiments.
converting the image to grayscale. Then a simple threshold followed by a single step erosion segments the majority of the paint. Since the spray pattern is circular, the center of the segmentation is the same as the center of the paint, the region of interest is thus defined by a circle, with this center and a slightly larger radius than half the segmentation bounding box. From this region the image intensity along several lines is averaged and the standard deviation is calculated to validate the assumption that the pattern is indeed circular symmetric. The size of the paper sheet used is known as is the amount of paint spent during the experiment, considering that the paint didn’t saturate, we can consider the amount of paint proportional to the pixel intensity as a reasonable assumption. The last step is to fit the curve to the Gaussian equation used in the simulation 1. The least mean squares is used for optimization, obtaining the optimal values for the Gaussian function parameters (the sum of the squared residuals is minimized). The pipeline and the calculated plots can be observed in Fig. 7. This tool allows us not only to validate the purposed simulation but also to easily calibrate the spray parameters, this is a great advantage since every spray painting gun has different parameters and even the same gun with different configurations can have a variety of spray patterns.
120
J. Casanova et al.
Fig. 7. Imaging processing pipeline: original image, converted to grayscale image, thresholded image, eroded image, image with the circle delimiting the region of interest, and an example of the selected lines. Imaging processing plots: the 3D plot of the paint distribution across the image, average paint intensity of the lines and the respective standard deviation and the fitting curve of the Gaussian function with the obtained paint distribution.
5
Conclusion and Future Work
This work developed a simulation tool that enables optimized trajectory generation algorithms for industrial spray painting applications. The advantages of this simulation tool include fast and easy testing of on development algorithms, optimization without paint, energy and pieces being wasted, availability of qualitative and quantitative metrics without real world hassles. The simulations accuracy and
A Simulation Tool for Optimizing a 3D Spray Painting System
121
validity was tested with several experiments and an image processing pipeline that facilitates the tuning of the spray parameters was developed. Future work includes occlusion algorithms in order to allow the simulation to work with more complex parts that have cavities. Acknowledgements. This work is financed by National Funds through the Portuguese funding agency, FCT - Funda¸ca ˜o para a Ciˆencia e a Tecnologia within project UIDB/50014/2020.
References 1. Automatic scanning and programming of robots. www.inropa.com/fileadmin/ Arkiv/Dokumenter/Produktblade/OLP automatic.pdf 2. Delfoi PAINT - Software for painting and coating. https://www.delfoi.com/delfoirobotics/delfoi-paint/ 3. Examples - RoboDK. https://robodk.com/examples#examples-painting 4. Getting Started - RoboDK Documentation. https://robodk.com/doc/en/GettingStarted.html#Station 5. GLScene. http://glscene.sourceforge.net/wikka/ 6. OpenGL. https://www.opengl.org/ 7. Robcad Robotics and automation workcell simulation, validation and off-line programming. www.siemens.com/tecnomatix 8. Robust ROBOGUIDE Simulation Software. FANUC America. https:// www.fanucamerica.com/products/robots/robot-simulation-software-FANUCROBOGUIDE 9. Andulkar, M.V., Chiddarwar, S.S.: Incremental approach for trajectory generation of spray painting robot. Ind. Robot. (2015). https://doi.org/10.1108/IR-10-20140405 10. Antonio, J.K.: Optimal trajectory planning for spray coating. In: Proceedings of the IEEE International Conference on Robotics and Automation (1994). https:// doi.org/10.1109/robot.1994.351125 11. Chen, Y., Chen, W., Li, B., Zhang, G., Zhang, W.: Paint thickness simulation for painting robot trajectory planning: a review (2017). https://doi.org/10.1108/IR07-2016-0205 12. Cignoni, P., Callieri, M., Corsini, M., Dellepiane, M., Ganovelli, F., Ranzuglia, G.: MeshLab: an open-source mesh processing tool. In: Scarano, V., Chiara, R.D., Erra, U. (eds.) Eurographics Italian Chapter Conference. The Eurographics Association (2008). https://doi.org/10.2312/LocalChapterEvents/ItalChap/ ItalianChapConf2008/129-136 13. Conner, D.C., Greenfield, A., Atkar, P.N., Rizzi, A.A., Choset, H.: Paint deposition modeling for trajectory planning on automotive surfaces. IEEE Trans. Autom. Sci. Eng. (2005). https://doi.org/10.1109/TASE.2005.851631 14. Fleming, D.: Airless spray-practical technique for maintenance painting. Plant Eng. (Barrington, Illinois) 31(20), 83–86 (1977) 15. Fogliati, M., Fontana, D., Garbero, M., Vanni, M., Baldi, G., Dond`e, R.: CFD simulation of paint deposition in an air spray process. J. Coat. Technol. Res. 3(2), 117–125 (2006) 16. Hicks, P.G., Senser, D.W.: Simulation of paint transfer in an air spray process. J. Fluids Eng. Trans. ASME 117(4), 713–719 (1995). https://doi.org/10.1115/1. 2817327
122
J. Casanova et al.
17. Persoons, W., Van Brussel, H.: CAD-based robotic coating of highly curved surfaces. In: 24th International Symposium on Industrial Robots, Tokyo, pp. 611–618 (November 1993). https://doi.org/10.1109/robot.1994.351125 18. Rupp, J., Guffey, E., Jacobsen, G.: Electrostatic spray processes. Met. Finish. 108(11–12), 150–163 (2010). https://doi.org/10.1016/S0026-0576(10)80225-9 19. Whitehouse, N.R.: Paint application. In: Shreir’s Corrosion, pp. 2637–2642. Elsevier (January 2010). https://doi.org/10.1016/B978-044452787-5.00142-6 20. Ye, Q.: Using dynamic mesh models to simulate electrostatic spray-painting. In: High Performance Computing in Science and Engineering 2005 - Transactions of the High Performance Computing Center Stuttgart, HLRS 2005 (2006). https:// doi.org/10.1007/3-540-29064-8-13 21. Ye, Q., Domnick, J., Khalifa, E.: Simulation of the spray coating process using a pneumatic atomizer. Institute for Liquid Atomization and Spray Systems (2002) 22. Ye, Q., Pulli, K.: Numerical and experimental investigation on the spray coating process using a pneumatic atomizer: influences of operating conditions and target geometries. Coatings (2017). https://doi.org/10.3390/coatings7010013 23. Zhang, Y., Huang, Y., Gao, F., Wang, W.: New model for air spray gun of robotic spray-painting. Jixie Gongcheng Xuebao/Chin. J. Mech. Eng. (2006). https://doi. org/10.3901/JME.2006.11.226 24. Zhou, B., Zhang, X., Meng, Z., Dai, X.: Off-line programming system of industrial robot for spraying manufacturing optimization. In: Proceedings of the 33rd Chinese Control Conference, CCC 2014 (2014). https://doi.org/10.1109/ChiCC.2014. 6896426
Optimization of Glottal Onset Peak Detection Algorithm for Accurate Jitter Measurement Joana Fernandes1,2 , Pedro Henrique Borghi3,4 , Diamantino Silva Freitas2 , and Jo˜ ao Paulo Teixeira5(B) 1
Research Centre in Digitalization and Intelligent Robotics (CeDRI), Instituto Politecnico de Braganca (IPB), 5300 Braganca, Portugal [email protected] 2 Faculdade de Engenharia da Universidade do Porto (FEUP), 4200-465 Porto, Portugal [email protected] 3 Instituto Politecnico de Braganca (IPB), 5300 Braganca, Portugal 4 Federal University of Technology - Parana (UTFPR), Cornelio Procopio 86300-000, Brazil [email protected] 5 Research Centre in Digitalization and Intelligent Robotics (CeDRI), Applied Management Research Unit (UNIAG), Instituto Politecnico de Braganca (IPB), 5300 Braganca, Portugal [email protected]
Abstract. Jitter is an acoustic parameter used as input for intelligent systems for the diagnosis of speech related pathologies. This work has the objective to improve an algorithm that allows to extract vocal parameters, and thus improve the accuracy measurement of absolute jitter parameter. Some signals were analyzed, where signal to signal was compared in order to try to understand why the values are different in some signal between the original algorithm and the reference software. In this way, some problems were found that allowed to adjust the algorithm, and improve the measurement accuracy for those signals. Subsequently, a comparative analysis was performed between the values of the original algorithm, the adjusted algorithm and the Praat software (assumed as reference). By comparing the results, it was concluded that the adjusted algorithm allows the extraction of the absolute jitter with values closer to the reference values for several speech signals. For the analysis, sustained vowels of control and pathological subjects were used.
Keywords: Jitter Acoustic analysis
· Algorithm · Optimization · Speech pathologies ·
This work was supported by Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/05757/2020. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 123–137, 2021. https://doi.org/10.1007/978-3-030-91885-9_10
124
1
J. Fernandes et al.
Introduction
Speech pathologies are relatively common and can be found in different stages of evolution and severity, affecting approximately 10% of the population [1]. These pathologies directly affect vocal quality, as they alter the phonation process and have increased dramatically in recent times, mainly due to harmful habits, such as smoking, excessive consumption of alcoholic beverages, persistent inhalation of dust-contaminated air and abuse of voice [2]. There are a variety of tests that can be performed to detect pathologies associated with the voice, however, they are invasive becoming uncomfortable for patients and are time-intensive [3]. Auditory acoustic analyzes, performed by professionals, lack objectivity and depend on the experience of the physician who makes the assessment. Acoustic analysis allows non-invasively to determine the individual’s vocal quality. It is a technique widely used in the detection and study of voice pathologies, since it allows to measure properties of the acoustic signal of a recorded voice where a speech or vowels are said in a sustained way [4,5]. This analysis is able to provide the sound wave format allowing the evaluation of certain characteristics such as frequency disturbance measurements, amplitude disturbance measurements and noise parameters. Jitter is one of the most used parameters as part of a voice exam and is used by several authors Kadiri and Alku 2020 [6], Teixeira et al. 2018 [7], Sripriya et al. 2017 [8], Teixeira and Fernandes 2015 [9] to determine voice pathologies. Jitter is the measure of the cycle to cycle variations of the successive glottic cycles, being possible to measure in absolute or relative values. Jitter is mainly affected by the lack of control in the vibration of the vocal folds. Normally, the voices of patients with pathologies tend to have higher values of jitter [10]. This work intends to improve the algorithm developed by Teixeira and Gon¸calves [10,11] to obtain the jitter parameter, to later be used in a complementary diagnostic system and obtain realiable jitter values. As a means of reference, to ensure reliable values of the algorithm, Praat is used as a reference for comparison, as this software is accepted by the scientific community as an accurate measure and is open software. This software is developed by Paul Boersma and David Weenink [12], from the Institute of Phonetic Sciences at the University of Amsterdam. This article is organized as follows: Sect. 2 describes the determination of the absolute jitter, the pathologies and the database used, as well as the number of subjects used for the study; Sect. 3 describes some of the problems found in some signals in the Teixeira and Gon¸calves algorithms [10,11], as well as the description and flowchart of the adjusted algorithm; Sect. 4 describes the studies carried out, the results obtained and the discussion. Finally, in Sect. 5 the conclusions are presented.
Optimization of Glottal Onset Peak Detection
2
125
Methodology
In Fig. 1, the jitter concept is illustrated, where it is possible to perceive that jitter corresponds to the measure of the variation of the duration of the global periods.
Fig. 1. Jitter representation in a sustained vowel /a/.
2.1
Jitter
Jitter is defined as a measure of glottal variation between cycles of vibration of the vocal cords. Subjects who cannot control the vibration of the vocal cords tend to have higher values of jitter [11]. Absolute jitter (jitta) is the variation of the glottal period between cycles, that is, the average absolute difference between consecutive periods, expressed by Eq. 1. N
jitta =
1 |Ti − Ti−1 | N − 1 i=2
(1)
In Eq. 1 Ti is the size of the glottal period i and N is the total number of glottal periods. 2.2
Database
The German Saarbrucken Voice Database (SVD) was used. This database is available online by the Institute of Phonetics at the University of Saarland [13]. The database consists of voice signals of more than 2000 subjects with several disease and controls/healthy subjects. Each person has the recording of phonemes /a/, /i/ and /u/ in the low, normal and high tones, swipe along tones, and the
126
J. Fernandes et al.
German phrase “Guten Morgen, wie geht es Ihnen?” (“Good morning, how are you?”). The size of the sound files is between 1 and 3 s and have a sampling frequency of 50 kHz. For the analysis it was used a sub-sample of 10 control subjects (5 male and 5 female) and 5 patient subjects (2 male and 3 female), of 3 diseases. Of these, 2 subjects had chronic laryngitis, one of each gender, 2 subjects with vocal cord paralysis, one of each gender and 1 female with vocal cord polyps.
3 3.1
Development Comparative Analysis Between the Signals Themselves
Teixeira and Gon¸calves in [11] reported the results of the algorithm using groups of 9 healthy and 9 pathological male and female subject. The authors compared the average measures of the algorithm and Praat software, over the groups of 9 subjects. The comparison shows generally slightly higher values measured by the algorithm, but with difference lower than 20 µs except for the female pathological group. 20 µs corresponds to only one speech signal sample at 50 kHz sampling frequency. Authors claim a difference lower than 1 speech sample in average. Anyhow, in a particular speech file it was found very high differences between the algorithm measures and the Praat measures. In order to try to understand why the jitter measure in some particular speech files of the Teixeira and Gon¸calves 2016 [11] algorithm are so different from the reference values, we proceeded to a visual comparison of the signals in the reference software and in the Teixeira and Gon¸calves 2016 algorithm. In this way, we took the signals in which the values for absolute jitter were very different and it was noticed that for a particular shapes of the signal the algorithm do not find the peaks in a similar way as Praat did. In a female control signal, the reference value for absolute jitter was 10.7 µs and the algorithm value was 478.6 µs. When the signal was observed, it was realized that one of the reasons that led to this difference was the fact that the algorithm was selecting the maximum peaks to make the measurement, while the reference software was using the minimum peaks. This led us to try to understand why the algorithm is selecting the maximum peaks, instead of selecting the minimums. The conclusion observed in Fig. 2 was reached. As it can be seen in Fig. 2, the algorithm is finding two maximum values for the same peak. This first search of peaks is taken in a initial phase of the algorithm to decide to use the maximum or minimum peaks. This two close peaks leads the algorithm to erroneously choose the peaks it will use to make the measurement, since it does not satisfy the condition of the algorithm (number of maximum peaks = 10, in a 10 glottal periods length part of speech). This problem occurs in more signals. Correcting this error, for this signal, the absolute jitter value went from 478.6 µs to 39.3 µs. In another signal, also from a control subject, in which the reference value for the absolute jitter is 9.6 µs and the value of the algorithm was 203,1 µs.
Optimization of Glottal Onset Peak Detection
127
Fig. 2. Problem 1 - finding peaks in a short window for decision for use the maximum or minimum peaks.
When observing the signal, it was also noticed that the algorithm was using the maximum peaks to make the measurement, while the reference software used the minimum peaks. Looking at Fig. 3 (presenting the speech signal and the identification of the right minimum peaks), it is possible to see why that algorithm selected the maximum peaks instead of the minimum peaks.
Fig. 3. Problem 2 - selection of maximum/minimum peaks (in red the position of the minimum peaks). (Color figure online)
As it is possible to observe in Fig. 3 the length of the window used, defined in global periods, comprises 11 minimum peaks. Taking into account the conditions of the algorithm to select the maximum or minimum peaks, for later measurement, the fact of having more than 10 minimum peaks leads the algorithm to select the maximum. When the window correction was made, for this signal in question, it started to select only 10 minimum peaks and the algorithm starts to select the minimum peaks for measurement. Thus, the jitter absolute value went from 203.1 µs to 32.3 µs. In two pathological signals, one female and one male, in which the reference value for absolute jitter is 8.0 µs and the value of the algorithm is 68.6 µs for female signal. For the male, the absolute jitter in reference software is 28.7 µs and that of the algorithm is 108.0 µs. When the signal of each of them was observed,
128
J. Fernandes et al.
it was noticed that the choice between selecting the maximum/minimum was well done, however, this type of signal have two peaks very close in same period that alternatively have the minimum/maximum value. Once the algorithm takes always the minimum/maximum value, the selection of the first and second peak changes along the signal, making the measure of the jitter inconsistent. In Figs. 4 and 5 it is possible to observe the problems found in these two signals. These figures present the speech signal in blue line, the moving average in red line and the marked peaks with red circle.
Fig. 4. Problem 3 - variation along the signal of the moving average minimum peak. (Color figure online)
Fig. 5. Problem 4 - variation along the signal of the signal minimum peak. (Color figure online)
As it is possible to observe in Figs. 4 and 5 the fact that there are 2 peaks (minimum peaks in these examples) in the same glottal period, sometimes the maximum peak is the first, other times it is the second, which leads to increase the absolute jitter determined.
Optimization of Glottal Onset Peak Detection
3.2
129
Algorithm Adjustments
The main purpose of the present work is to present the optimizations applied to the algorithm proposed in [11], since it was mainly observed the inability to deal with some recordings, both in the control group and those who have some type of pathology. Thus, a recap of the steps in [11] is proposed in order to contextualize each improvement developed. It must be emphasised the importance of the exact identification of the position of each onset time of the glottal periods, for an accurate measure of the Jitter values. The onset time of the glottal periods are considered as the position of the peaks in the signal. According to [11], the process of choosing the references for calculating the Jitter parameter can be better performed by analyzing the signal from its central region. There it is expected to find high stationarity. In addition, it was concluded that a window of 10 fundamental periods contains enough information to determine the reference of the length of the fundamental period and the selection between the minimums or maximums. On this window, the moments that occur the positive and negative peaks of each glottal period are determined, as well as the amplitude module of the first cycle. The step between adjacent cycles is based on the peak position of the previous cycle plus a fundamental period. Focusing on this point, the position of the posterior peak is determined by searching for the maximum (or minimum) over a two-third window of the fundamental period. Finally, in an interval of two fifths of fundamental period, around each peak, the search for other peaks corresponding to at least 70% of its amplitude is carried out. The reference determination is made considering the positive and negative amplitudes of the first module cycle and the count of positive and negative peaks in the interval of 10 cycles. Basically, the measure of amplitude directs the decision to the parameter with the greatest prominence, since it is expected to have isolated peaks for the one with the greatest amplitude. On the other hand, the count of cycles indicates the number of points and oscillations close to the peaks, which may eventually prevail over these. The occurrence of these behaviors may or may not be something characteristic of the signal, in a way that it was observed that for cases in which this rarely occurred, a slight smoothing should be sufficient to readjust the signal. In [11], when the peak count exceeded the limit of 10 for both searches, a strong smoothing was applied over the signal that sometimes de-characterized it. Based on the mentioned amplitude parameters and the peaks count, a decision-making process is carried out, which concludes with the use of maximums or minimums of the original signal or its moving average, to determine all glottal periods. In Fig. 6 the flowchart of the proposed algorithm is presented.
130
J. Fernandes et al.
Fig. 6. Algorithm flowchart.
The rules of the decision process are described below, where the limit parameter n = 13 is defined as the maximum peak count accepted for the use of the original signal or for the application of light straightening. • If the maximum amplitude is greater than the minimum amplitude in module and the maximum peak count is in the range [10, n], or, the minimum peak count is greater than n and the maximum peak count is in [10, n]: ◦ If the maximum count is equal to 10, the search for peaks is performed on the original signal using the maximum as a cycle-by-cycle search method; ◦ Else, a moving average with a Hanning window of equal length to a ninth of a fundamental period is applied to the signal and the search for peaks in this signal is carried out through the maximum of each cycle. Figure 7 shows the comparison between the original signals, the moving
Optimization of Glottal Onset Peak Detection
131
average MA1 and the moving average MA2 . The peak marking was performed within this rule, that is, starting from MA1 and using maximum method. It is noted that the slight smoothing applied keeps the peak marking close to the real one and maintains, in a way, the most significant undulations of the signal, whereas MA2 , in addition to shifting the position of the peaks more considerably, their undulations are composed of the contribution of several adjacent waves. This can reduce the reliability of marking signals that have peaks’ side components with high amplitude in modulus.
Fig. 7. Comparison between the original signal, the signal after moving average with Hanning window of length N0 /9 (MA1 ) and the signal after moving average with Hanning window of length N0 /3 (MA2 ). The peaks of glotal periods are shown in black and were detected through maximum method over MA1 . Recording excerpt from a healthy subject performing /i/ low. Normalized representation.
• Else, if the minimum amplitude in module is greater than the maximum amplitude and the minimum peak count is in the range [10, n], or, the maximum peak count is greater than n and the minimum peak count is in [10, n]: ◦ If the minimum count is equal to 10, the search for peaks is performed on the original signal using the minimum as a cycle-by-cycle search method; ◦ Else, a moving average with a Hanning window of equal length to a ninth of a fundamental period is applied to the signal and the search for peaks in this signal is carried out through the minimum of each cycle. Figure 8 shows an example of the path taken through this rule. Here, the generated MA1 signal proves to be much less sensitive than the MA2 (generated for comparison) since in this one, the wave that contains the real peak is strongly attenuated by the contribution of the previous positive amplitude to the averaging. In this way, the application of smoothing
132
J. Fernandes et al.
contributes to eliminates rapid oscillations in the samples close to the minimum, but preserves the amplitude behavior of signals that do not need a strong smoothing.
Fig. 8. Comparison between the original signal, the signal after moving average with Hanning window of length N0 /9 (MA1 ) and the signal after moving average with Hanning window of length N0 /3 (MA2 ). The peaks of glotal periods are shown in black and were detected through minimum method over MA1 . Recording excerpt from a pathological subject performing /a/ high. Normalized representation.
• Else, a moving average with a Hanning window of equal length to a third of the fundamental period is applied to the signal. On the result, linear trends are removed and a new analysis is performed in the central region of the signal. In this analysis, an interval of 10 fundamental periods is evaluated cycle by cycle about the maximum, minimum peaks and their adjacent peaks greater than 75% of their amplitude: ◦ If, in the first cycle, the maximum amplitude is greater than the minimum amplitude in module, and the maximum count is equal to 10 or, the minimum count is greater than 10 and the maximum count is equal to 10, the search for peaks is made on the moving average signal using the maximum as a method of inspection cycle by cycle. Figure 9 demonstrates the case in which this rule is followed. It is possible to observe, by comparing the original signal, MA1 and MA2 , that the determination of the peaks of the global periods is only possible when a heavy smoothing is applied, since the region with the greatest positive amplitude and energy, can only be highlighted with a single peak approaching a context long enough to avoid the two adjacent peaks in the original signal. It is also noted that MA1 reduces the high frequencies but keeps the maximum point undefined, varying between the left and right along the signal;
Optimization of Glottal Onset Peak Detection
133
Fig. 9. Comparison between the original signal, the signal after moving average with Hanning window of length N0 /9 (MA1 ) and the signal after moving average with Hanning window of length N0 /3 (MA2 ). The peaks of glotal periods are shown in black and were detected through maximum method over MA2 . Recording excerpt from a pathological subject performing /a/ normal. Normalized representation.
◦ Else, the search for peaks is done on the moving average signal using the minimum as a method of inspection cycle by cycle. In all cases, the inspection of the peaks cycle by cycle of every signal is carried out with steps of a fundamental period from the reference point (maximum or minimum) and then an interval of one third of the fundamental period is analyzed. The reduction in the length of this interval from two thirds (used in [11]) to one third makes the region of analysis more restricted to samples close to one step from the previous peak. With this it is expected to guarantee that the analysis is always carried out in the same region of the cycles, avoiding the exchange between adjacent major peaks. However, in the cases where there is a shift in the fundamental frequency over time, the use of a fixed parameter as a step between cycles, as done in [11] and in this work, can cause inevitable errors in the definition of the search interval. The maximum or minimum points of each cycle are used as a source for determining the parameters Jitter according to Eqs. 1.
4
Results and Discussion
In this section, the results of some analyzes made will be reported, as well as their discussion. A comparative analysis was made for the values of absolute jitter between the values obtained by the algorithm developed by Teixeira and Gon¸calves 2016 [11], the reference software [12] and the adjusted algorithm, in order to try to understand if the adjusted algorithm values are closer to the values of the
134
J. Fernandes et al.
reference software. Praat software was used as a reference, although the exact values of jitter cannot be known. For 10 control subjects and 5 pathological subjects, the absolute jitter was extracted and averaged by tone and vowel. Table 1 shows the results of this analysis for control subjects and Table 2 for pathological subjects. Table 1. Average absolute jitter (in microseconds) for each vowel and tone for control subjects. Vowel Tone
Praat
Teixeira and Gon¸calves 2016 Adjusted
a
High 14.673 26.795 Low 27.614 80.084 Normal 24.916 50.091
25.890 34.105 32.016
i
High 16.092 Low 23.805 Normal 18.593
23.617 26.378 23.900
u
High 13.361 23.422 Low 29.077 60.089 Normal 18.376 23.759
23.621 26.246 23.909
23.857 37.140 23.755
Table 2. Average absolute jitter (in microseconds) for each vowel and tone for pathological subjects. Vowel Tone
Praat
Teixeira and Gon¸calves 2016 Adjusted
a
High 32.817 56.447 Low 39.341 82.316 Normal 36.462 139.866
i
High 39.774 Low 35.512 Normal 25.611
u
High 33.606 45.489 Low 40.751 65.752 Normal 52.168 323.279
62.280 48.347 33.921
56.379 82.316 103.326 62.284 48.347 33.916 45.489 65.745 103.322
Through the data in Tables 1 and 2 it is possible to see that the adjusted algorithm obtains jitter measures closer to the reference than the Teixeira and Gon¸calves 2016 algorithm, since, for example, in the vowel /a/ low tone, for the control subjects, with the algorithm obtained an improvement of 46 µs. After the average evaluation an analysis of the individual values per subject was made. Thus, the vowel /a/ normal tone was selected for control and pathological subjects for further analysis. In Fig. 10 it is possible to observe the results
Optimization of Glottal Onset Peak Detection
135
of absolute jitter for the 10 control subjects and in Fig. 11 the results of absolute jitter for the 5 pathological subjects.
Fig. 10. Comparison of the absolute jitter values for the 10 control subjects.
Fig. 11. Comparison of absolute jitter values for the 5 pathological subjects.
Through Figs. 10 and 11 it is possible to observe that comparing the values of the Teixeira and Gon¸calves 2016 algorithm with the adjusted algorithm, the adjusted algorithm has closer values to the reference for more subjects. In control subjects, comparing the reference values with the Teixeira and Gon¸calves algorithm, 2016, the difference is less than 16.8 µs. Now comparing the reference values with the adjusted algorithm, the difference is less than 7.1 µs. For pathological subjects, the difference between reference values and Teixeira and
136
J. Fernandes et al.
Gon¸calves algorithm, 2016, is less than 57.9 µs and the difference with the corrected algorithm is less than 29.4 µs. Therefore, it can be concluded that the adjusted algorithm obtains values closer to the reference values. It should also be mentioned that an interpolation procedure of the speech signal was also experimented with interpolations of several order between 2 and 10. The objective was to increase the resolution of the peak position. The interpolation procedure didn’t improve the accuracy of the absolute jitter determination, and was discarded.
5
Conclusion
The objective of this work was to improve the algorithm developed by Teixeira and Gon¸calves 2016 in some particular signals subjected to inconsistencies finding the onset glottal periods. In order to try to increase the accuracy of the absolute jitter, some adjustments were made in the algorithm, where the detection of the peaks was improved. In order to understand if these corrections obtained improvements in the detection of the absolute jitter, an analysis was made of the averages of the values obtained from the absolute jitter of 10 control subjects and 5 pathological ones. In this analysis it was noticed that the values obtained through the corrections were closer to the reference values. In order to understand how the adjusted algorithm behaves compared to the reference value another analysis was carried out comparing, for one vowel, the 10 control subjects and the 5 pathological subjects. Thus, it was noticed that the adjusted algorithm measures the absolute jitter with values closer to the reference values for more subjects. The algorithm still measure absolute jitter with slightly higher values than Praat. In control subjects, the difference in absolute jitter measurements was reduced from 16.8 to 7.1 µs, and for pathological subjects, the difference was reduced from 57.9 to 29.4 µs.
References 1. Martins, A.l.H.G., Santana, M.F., Tavares, E.L.M.: Vocal cysts: clinical, endoscopic, and surgical aspects. J. Voice 25(1), 107–110 (2011) 2. Godino-Llorente, J., Gomez-Vilda, P., Blanco-Velasco, M.: Dimensionality reduction of a pathological voice quality assessment system based on gaussian mixture models and short-term cepstral parameters. IEEE Trans. Biomed. Eng. 53(10), 1943–1953 (2006) 3. Teixeira, J.P., Alves, N., Fernandes, P.O.: Vocal acoustic analysis: ANN versos SVM in classification of dysphonic voices and vocal cords paralysis. Int. J. EHealth Med. Commun. (IJEHMC) 11(1), 37–51 (2020) 4. Sataloff, R.T., Hawkshawe, M.J., Sataloff, J.B.: Common medical diagnoses and treatments in patients with voice disorders: an introduction and overview. In: Vocal Health and Pedagogy: Science, Assessment and Treatment, p. 295 (2017) 5. Godino-Llorente, J., G´ omez-Vilda, P.: Automatic detection of voice impairments by means of short-term cepstral parameters and neural network based detectors. IEEE Trans. Biomed. Eng. 51(2), 380–384 (2004)
Optimization of Glottal Onset Peak Detection
137
6. Kadiri, S., Alku, P.: Analysis and detection of pathological voice using glottal source features. IEEE J. Sel. Top. Signal Process. 14(2), 367–379 (2020) 7. Teixeira, J.P., Teixeira, F., Fernandes, J., Fernandes, P.O.: Acoustic analysis of chronic laryngitis - statistical analysis of sustained speech parameters. In: 11th International Conference on Bio-Inspired Systems and Signal Processing, BIOSIGNALS 2018, vol. 4, pp. 168–175 (2018) 8. Sripriya, N., Poornima, S., Shivaranjani, R., Thangaraju, P.: Non-intrusive technique for pathological voice classification using jitter and shimmer. In: International Conference on Computer, Communication and Signal Processing (ICCCSP), pp. 1–6 (2017) 9. Teixeira, J.P., Fernandes, P.: Acoustic analysis of vocal dysphonia. Procedia Comput. Sci. 64, 466–473 (2015) 10. Teixeira, J.P., Gon¸calves, A.: Accuracy of jitter and shimmer measurements. Procedia Technol. 16, 1190–1199 (2014) 11. Teixeira, J.P., Gon¸calves, A.: Algorithm for jitter and shimmer measurement in pathologic voices. Procedia Comput. Sci. 100, 271–279 (2016) 12. Boersma, P., Weenink, D.: Praat: doing phonetics by computer [Computer program]. Version 6.0.48, 15 April 2019 (1992–2019). http://www.praat.org/ 13. Barry, W., P¨ utzer, M.: Saarbruecken Voice Database. Institute of Phonetics at the University of Saarland (2007). http://www.stimmdatenbank.coli.uni-saarland.de. Accessed 15 Apr 2021
Searching the Optimal Parameters of a 3D Scanner Through Particle Swarm Optimization Jo˜ ao Braun1,2(B) , Jos´e Lima2,3 , Ana I. Pereira2 , Cl´ audia Rocha3 , and Paulo Costa1,3 1
3
Faculty of Engineering, University of Porto, Porto, Portugal [email protected] 2 Research Centre in Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal {jbneto,jllima,apereira}@ipb.pt INESC-TEC - INESC Technology and Science, Porto, Portugal [email protected]
Abstract. The recent growth in the use of 3D printers by independent users has contributed to a rise in interest in 3D scanners. Current 3D scanning solutions are commonly expensive due to the inherent complexity of the process. A previously proposed low-cost scanner disregarded uncertainties intrinsic to the system, associated with the measurements, such as angles and offsets. This work considers an approach to estimate these optimal values that minimize the error during the acquisition. The Particle Swarm Optimization algorithm was used to obtain the parameters to optimally fit the final point cloud to the surfaces. Three tests were performed where the Particle Swarm Optimization successfully converged to zero, generating the optimal parameters, validating the proposed methodology. Keywords: Nonlinear optimization scan · IR sensor
1
· Particle swam optimization · 3D
Introduction
The demand for 3D scans of small objects has increased over the last few years due to the availability of 3D printers for regular users. However, the solutions are usually expensive due to the complexity of the process, especially for sporadic users. There are several approaches to 3D scanning, with the application, in general, dictating the scanning system’s requirements. Thus, each of them can differ concerning different traits such as acquisition technology, the structure of the system, range of operation, cost, and accuracy. In a more general way, these systems can be classified as contact or non-contact, even though there are several sub-classifications inside these two categories, which the reader can find with more detail in [2]. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 138–152, 2021. https://doi.org/10.1007/978-3-030-91885-9_11
Optimal Parameters of a 3D Scanner Through PSO
139
Two common approaches for reflective-optical scanning systems are triangulation and time-of-flight (ToF). According to [6], the range and depth variation in triangulation systems are limited, however, they have greater precision. In contrast, ToF systems have a large range and depth variation at the cost of decreased precision. The triangulation approach works, basically, by projecting a light/laser beam over the object and capturing the reflected wave with a digital camera. After that, the distance between the object and the scanning system can be computed with trigonometry, as the distance between the camera and the scanning system is known [6]. On the other hand, the accuracy of ToFbased systems is mainly determined by the sensor’s ability to precisely measure the round-trip time of a pulse of light. In other words, by emitting a pulse of light and measuring the time that the reflected light takes to reach the sensor’s detector, the distance between the sensor and the object is measured. Besides, still regarding ToF-based systems, there is another approach to measure the distance between the sensor and the object based on the Phase-Shift Method, which essentially compares the phase shift between the emitted and reflected electromagnetic waves. Each approach has its trade-offs, which a common one is between speed and accuracy in these types of scanning systems. By increasing the scanning speed of the system, the accuracy will decrease, and vice-versa. This is mitigated by having expensive rangefinders with higher sampling frequencies. In addition, accuracy during acquisition can be heavily affected by light interference, noise, and the angle of incidence of the projected beam in the object being much oblique. Therefore, a controlled environment, and a high-quality sensor and circuit must be used to perform quality scans. However, the angle of incidence is less controllable since it depends on the scanning system and the object (trade-off of the system’s structure). In general, these types of 3D scanning systems are very expensive, especially when even the cheaper ones are considered costly by the regular user. A particular example includes a low-cost imagery-based 3D scanner for big objects [18]. A low-cost 3D scanning system that uses a triangulation approach with an infra-red distance sensor targeting small objects, therefore having limited range and requiring large accuracy, was proposed and validated both in simulation [5] and real scenarios, where the advantages and disadvantages of this architecture were also addressed. Although the proposed system already has good accuracy, it is possible to make some improvements with a multivariable optimization approach. This is possible because the system makes some assumptions to perform the scan that, although are true in simulation, do not necessarily hold in a real scenario. One example is the object not being exactly centered on the scanning platform. The assumptions, as well as the problem definition, are described in Subsect. 4.1. The reasons why PSO was chosen instead of other approaches are addressed in Subsect. 4.2. The paper is structured as follows: a brief state of the art is presented in Sect. 2. Section 3 describes the 3D scanning system and how it works. The optimization problem is defined, and a solution is proposed in Sect. 4. The results are described in Sect. 5. Finally, the last section presents the conclusion and future works.
140
2
J. Braun et al.
State of the Art
As the field of optimization is vast, there are works in several fields of knowledge. Therefore, in this section, the objective is to give a brief literature review on multivariable optimization. Thus, some recent examples follow below. Regarding optimization for shape fitting, [9] proposed a 3D finite-element (FE) modeling approach to obtain models that represent the shape of grains adaptively. According to the authors, the results show that the proposed approach supports the adaptive FE modeling for aggregates with controllable accuracy, quality, and quantity, which indicates reliable and efficient results. Moreover, authors in [11], proposed an approach that combined an optimizationbased method with a regression-based method to get the advantages of both approaches. According to the authors, model-based human pose estimation is solved by either of these methods, where the first leads to accurate results but is slow and sensitive to parameter initialization, and the second is fast but not as accurate as of the first, requiring huge amounts of supervision. Therefore, they demonstrated the effectiveness of their approach in different settings in comparison to other state-of-the-art model-based pose human estimation approaches. Also, a global optimization framework for 3D shape reconstruction from sparse noisy 3D measurements, that usually happens in range scanning, sparse featurebased stereo, and shape-from-X, was proposed in [13]. Their results showed that their approach is robust to noise, outliers, missing parts, and varying sampling density for sparse or incomplete 3D data from laser scanning and passive multiview stereo. In addition, there are several works in multivariable optimization for mechanical systems. For instance, the characteristics, static and dynamic, of hydrostatic bearings were improved with controllers that were designed for the system with the help of a multivariable optimization approach for parameter tuning [16]. The authors proposed a control approach that has two inputs, a PID (Proportional Integral Derivative) sliding mode control and feed-forward control, where the parameters of the first input, were optimized with Particle Swarm Optimization (PSO). Their results performed better compared with results from the literature which had PID control. In addition, a system that consists of multi-objective particle swarm optimized neural networks (MOPSONNS) was proposed in [8] to compute the optimal cutting conditions of 7075 aluminum alloys. The system uses multi-objective PSO and neural networks to determine the machining variables. The authors concluded that MOPSONNS is an excellent optimization system for metal cutting operations where it can be used for other difficultto-machine materials. The authors in [20] proposed a multi-variable Extremum Seeking Control as a model-free real-time optimizing control approach for operation of cascade air source heat pump. They used for the scenarios of power minimization and coefficient of performance maximization. Their approach was validated through simulation which their results showed good convergence performance for both steady-state and transient characteristics. The authors in [7] applied two algorithms, continuous ant colony algorithm (CACA) and multivariable regression, to calculate optimized values in back analysis of several
Optimal Parameters of a 3D Scanner Through PSO
141
geomechanical parameters in an underground hydroelectric power plant cavern. The authors found that the CACA algorithm showed better performance. To improve the thermal efficiency of a parabolic trough collector, authors in [1] presented a multivariate inverse artificial neural network (ANNim) to determine several optimal input variables. The objective function was solved using two meta-heuristic algorithms which are Genetic Algorithm (GA) and PSO. The authors found that although ANNim-GA runs faster, ANNim-PSO has better precision. The authors stated that the two presented models have the potential to be used in intelligent systems. Finally, there are optimization approaches in other areas such as control theory, chemistry, and telecommunication areas. Here are some examples. In control theory, by employing online optimization, a filtering adaptive tracking control for multivariable nonlinear systems subject to constraints was proposed in [15]. The proposed control system maintains tracking mode if the constraints are not violated, if not, it switches to constraint violation avoidance control mode by solving an online constrained optimization problem. The author showed that the switching logic avoids the constraints violation at the cost of tracking performance. In chemistry, artificial neural networks were trained under 5 different learning algorithms to evaluate the influence of several input variables to predict the specific surface area of synthesized nanocrystalline NiO-ICG composites, where the model trained with the Levenberg-Marquardt algorithm was chosen as the optimum algorithm for having the lowest root means square error [17]. It was found that the most influential variable was the calcination temperature. At last, in telecommunications, Circular Antenna Array synthesis with novel metaheuristic methods, namely Social Group Optimization Algorithm (SGOA) and Modified SGOA (MSGOA), was presented in [19]. The authors performed a comparative study to assess the performance of several synthesis techniques, where SGOA and MGSOA had good results. As there aren’t any related works similar to our approach, the contribution of this work is to propose a procedure to find the optimal parameters (deviations) of a 3D scanner system through PSO, guaranteeing a good fit for point clouds over their respective scanned objects.
3
3D Scanning System
The scanning system works basically in two steps. First, the object is scanned and the data, in spherical coordinates, is saved in a point cloud file. After this, a software program performs the necessary transformations to cartesian coordinates and generates STL files that correspond to the point clouds. The flowchart of the overall STL file generation process is presented in Fig. 1a. A prototype of the low-cost 3D scanner, illustrated in Fig. 1b, was developed to validate the simulated concept in small objects [5]. The architecture regarding the components and the respective communication protocols of the 3D scanning system can be seen in Fig. 2.
142
J. Braun et al.
Fig. 1. Generation of an object’s STL file: (a) flowchart of the overall process, and (b) prototype of the low cost 3D scanner.
The system is composed of a rotating structure supporting the object that is going to be scanned and another articulated structure supporting the sensor that performs the data acquisition. The rotating structure is actuated by a stepper motor that precisely rotates it continuously until the end of one cycle, corresponding to 360◦ . An articulated part whose rotating axis is aligned with the center of the rotating structure, having attached an optical sensor that measures the distance to the object, is also actuated with a stepper motor which moves in steps of 2◦ (configurable). The proposed optical sensor was selected since it is a combination of a complementary metal-oxide-semiconductor image sensor and an infrared light-emitting diode (IR-LED) that allow a reduced influence by the environment temperature and by the object’s reflectivity. Both stepper motors used on this approach are the well-known NEMA17, controlled by the DRV8825 driver. Moreover, a limit switch sensor was added to be a reference to the position of 0◦ . Over a cycle, the sensor obtains 129 measurements, each one taking 50 ms. The rotating plate’s speed is approximately 55◦ /s (configurable). The system is controlled by a low-cost ESP32 microcontroller, transferring to the PC, by serial or Wi-Fi, the measured distance to the object, the angle between the sensor and the rotating structure’s angle.
Fig. 2. Diagram illustrating the components of the system and the respective communication protocols used.
Optimal Parameters of a 3D Scanner Through PSO
143
The dynamics of the 3D scanner is illustrated throughout a flowchart, which can be seen in Fig. 3. The rotating structure keeps rotating until it finishes one cycle of 360◦ . After this, the system increments the sensor’s angle by 2◦ . This dynamic keeps repeating until the sensor’s angle reaches 90◦ . Afterward, the data, in spherical coordinates, is saved to a point cloud file. The data conversion to Cartesian coordinates is explained in detail in Sect. 4. The algorithm that generates the STL files is outside of the scope of this work, for further information the reader is referred to [5].
Fig. 3. 3D scanner dynamics flowchart.
4
Methodology
The notation used in this work to explain the system considers spherical coordinates, (l, θ, ϕ). The scanning process starts by placing the object on the center of the rotating plate (P = (0, 0, hp )), which is directly above the global reference frame. The system is represented in Fig. 4, from an XZ plane view. First, the slope’s angle measured from the X axis to the Z axis, with range [0, π/2] rad, is θ. Also, ϕ is the signed azimuthal angle measured from the X axis, in the XY plane, with range [0, 2π]. The parameter hp represents the distance from the rotating plate to the arm rotation point, and hs is the perpendicular distance from the arm to the sensor. The parameter l defines the length of the mechanical arm and d represents the distance from the sensor to the boundary of the object which is located on the rotating plate. The position of the sensor s (red circle of Fig. 4) Xs = (xs , ys , zs ), in terms of the parameters (l, θ, ϕ), can be defined as follows, assuming the reference origin at the center of the rotating base: ⎧ ⎨ xs = (l cos(θ) − hs sin(θ)) cos(ϕ) ys = (l cos(θ) − hs sin(θ)) sin(ϕ) (1) ⎩ zs = l sin(θ) + hs cos(θ) − hp Therefore, Xp = (xp , yp , zp ), which is the position of a scanned point in a given time in relation to the rotating plate reference frame, is represented by a translation considering ||Xs || and d. Thus, it is possible to calculate Xp as:
144
J. Braun et al.
Fig. 4. Mechanical design of the proposed system. XZ plane view. Red circle represents the sensor and the dotted line represents its beam.
Xp = 1 − where ||Xs || = (xs , ys , zs ). 4.1
d ||Xs ||
Xs
(2)
x2s + ys2 + zs2 , which represents the euclidean norm of
Problem Definition
The described calculations to obtain the position of a given scanned point Xp made several assumptions that, although always true in a simulated scenario, do not necessarily hold in real environments. If these assumptions would not be met, the coordinate transformations would not hold, and, therefore the point cloud and its mesh would become distorted. These assumptions, and consequently the optimization problem, are going to be described in this subsection. First, there may exist an offset in θ (arm’s rotation angle), denoted by θoffset , because the resting position of the arm can be displaced from the initial intended position. Following the same reasoning, an offset in ϕ, represented by ϕoffset , is also possible, as the rotating plate can be displaced at the beginning of the scanning procedure. Finally, the scanned object may be displaced from the center of the rotating plate. This offset can be taken into account as an offset in the x and y coordinates constituting the sensor’s position, xoffset and yoffset respectively, as the effect would be the same as applying an offset to the object’s position. Thus, Eq. (1) is updated to Eq. (3) according with these offsets: ⎧ ⎨ xs = (l cos(θ ) − hs sin(θ )) cos(ϕ ) + xoffset ys = (l cos(θ ) − hs sin(θ )) sin(ϕ ) + yoffset (3) ⎩ zs = l sin(θ ) + hs cos(θ ) − hp where θ = θ + θoffset and ϕ = ϕ + ϕoffset . Finally, in theory, the sensor must be orthogonal to the rotating arm. However, the sensor may become rotated γoffset degrees during the assembly of the real system. Thus, θ = θ + γoffset . This behaviour is better understood in
Optimal Parameters of a 3D Scanner Through PSO
145
Fig. 5, where it is possible to see that if there is no offset in the sensor’s rotation, θ = θ .
Fig. 5. Updated mechanical design of the proposed system with offsets. XZ plane view.
Finally, to take into account θ and the object’s offset in the coordinate transformations, it is necessary to make some modifications to the calculations computing Xp . Therefore, two 2D rotations are made in θ and ϕ to direct an unit vector, Xt = (xt , yt , zt ), according to the sensor beam direction: ⎧ ⎨ xt = cos(ϕ )xu − sin(ϕ )zt yt = sin(ϕ )xu + cos(ϕ )zt (4) ⎩ zt = − sin(θ ) where xu = − cos(θ ). After the rotations, the unit vector is scaled by d to obtain the distance of the boundary of the object to the sensor in relation to the center of the plate. At last, Xp is given by the sum of the sensor’s position, Xs , and the scaled rotated unit vector: Xp = Xs + dXt
(5)
So, it is intent to optimize the following problem min
n i=1
||Xp i − Xi ||2
(6)
where Xp , as previously mentioned, represents the scanned points in relation to the center of the support plate, X = (x, y, z) is the nearest point of the original object boundary, and n the number of point on the cloud. 4.2
Optimization
To solve the optimization problem defined on (6), Particle Swarm Optimization (PSO) algorithm was used. This algorithm belongs to Swarm Intelligence
146
J. Braun et al.
class of algorithms inspired by natural social intelligent behaviors. Developed by Kennedy and Eberhart (1995) [10], this method consists on finding the solution through the exchange of information between individuals (particles) that belong to a swarm. The PSO is based on a set of operations that promote the movements of each particle to promising regions in the search space [3,4,10]. This approach was chosen because it has several advantages, according to [12], such as: – Easy in concept and implementation in comparison to other approaches. – Less sensitive to the nature of the objective function regarding to other methods. – Has limited number of hyperparameters in relation to other optimization techniques. – Less dependent of initial parameters, i.e., convergence from algorithm is robust. – Fast calculation speed and stable convergence characteristics with highquality solutions. However, every approach has its limitations and disadvantages. For instance, authors in [14] stated that one of the disadvantages of PSO is that the algorithm easily fall into local optimum in high-dimensional space, and therefore, have a low convergence rate in the iterative process. Nevertheless, the approach showed good results for our system.
5
Results
To test the approach three case objects were analyzed: Centered sphere, Sphere and Cylinder. The first and second case were spheres with radius of 0.05 m. The first sphere was centered on the rotating plate where the other had an offset of X,Y = [0.045, 0.045]m. Finally, the third object was a cylinder with h = 0.08 m and r = 0.06 m. Since PSO is a stochastic method, 20 independent runs were done to obtain more reliable results. The Table 1 presents the results obtained by PSO, describing the best minimum value obtained on the executed runs, the minimum average from all runs (Av) and their respective standard deviation (SD). To analyze the behavior of the PSO method, the results considering all runs (100%) and 90% of best runs are also presented. First, the results were very consistent for all the cases as can be verified by the standard deviations, average values, and minima being practically zero. This is also corroborated by comparing the results from all runs (100%) with 90% of the best runs, where the averages from (100%) matched the averages from (90%) of best runs and the standard deviations values maintained the same order of magnitude. Also, another way to look at the consistency is by comparing the best minimum value of executed runs with their respective averages, where all cases match. Still, the only case where the PSO algorithm suffered a little was the
Optimal Parameters of a 3D Scanner Through PSO
147
Table 1. PSO results for the three objects Minimum
100% Av
90% SD
Av
SD
Centered Sphere 7.117 × 10−8 7.117 × 10−8 5.8 × 10−14 7.117 × 10−8 6.06 × 10−14 Sphere
4.039 × 10−5 4.039 × 10−5 1.3 × 10−13 4.039 × 10−5 1.18 × 10−13
Cylinder
3.325 × 10−2 3.325 × 10−2 3.2 × 10−7
3.325 × 10−2 2.4 × 10−7
cylinder, where although the minimum tended to 0, it didn’t reached the same order of magnitude of the other cases. Therefore, we can confirm that the PSO achieved global optimum in the sphere cases, on the other hand, the cylinder case is dubious. There is also the possibility that the objective function for the cylinder case needs some improvements. In terms of minimizers, they are described in Table 2. It is possible to see that for the centered sphere, all the parameters are practically 0. This is expected, since the centered sphere did not have any offsets. The same can be said for the cylinder. Finally, for the sphere, it is possible to see that although the sphere had offsets of X, Y = [0.045, 0.045], the minimizers of X, Y are pratically zero. This is also expected since as the sphere was displaced on the rotating plate, the sensor acquired data points from the plate itself (on the center). Therefore, the portion of the points representing the sphere was already ”displaced” during the acquisition, i.e., the offsets in X, Y were already accounted for during acquisition. By consequence, during transformation to cartesian coordinates. Therefore, the only offset that was impactful on the transformation was the ϕoffset minimizer, where it accounts for a rotation in the Z axis (to rotate the point cloud to match the object). Of course, the other minimizers had their impact as well during transformation. Table 2. Minimizers obtained by PSO xoffset [m]
yoffset [m]
ϕoffset [rad]
θoffset [rad]
γoffset [rad]
Centered Sphere −4.704 × 10−7 −5.472 × 10−8 −5.031 × 10−6 +4.953 × 10−5 +2.175 × 10−5 Sphere
−7.579 × 10−3 8.087 × 10−2
Cylinder
5.055 × 10−4
1.566 × 10−1
−8.885 × 10−5 −1.661 × 10−4
−3.371 × 10−4 −2.862 × 10−1 5.046 × 10−2
1.057 × 10−1
The behavior of the PSO approach for the centered sphere, its representation in simulation, and its optimized point cloud over the original object can be seen, respectively, in Figs. 6, 7a, and 7b. As can be seen from the illustrations, and from Tables 1 and 2, the PSO managed to find the global optimum of the system’s parameters. Note that, in Fig. 6, the algorithm converged to the global minimum near iteration 15, nevertheless it ran for more than 70 iterations (note that these iterations are from the PSO algorithm itself, therefore they belong to just one run from the all
148
J. Braun et al.
Fig. 6. PSO behavior regarding the centered sphere case.
(a) Simulation system with centered sphere.
(b) Optimized point cloud of centered sphere plotted over the object’s original dimensions.
Fig. 7. Simulated system (left). Optimized point cloud (right).
20 executed runs). Thus, the generated point cloud fit perfectly to the original object, as can be seen in Fig. 7b. In the same reasoning, the behavior of the PSO approach for the cylinder, its system simulation, and its optimized point cloud over the original object can be seen, respectively, in Figs. 8, 9a, and 9b. It is possible to see in Fig. 8 that after 10 iterations the PSO algorithm converged to the minimum value displayed in Table 1, generating the parameters described in Table 2. The optimized point cloud, however, suffered a tiny distortion on its sides, where it can be seen in Fig. 9b. This probably happened because of rounding numbers. This distortion is mainly caused by the small values of θoffset and γoffset .
Optimal Parameters of a 3D Scanner Through PSO
149
Fig. 8. PSO behavior regarding the cylinder case.
(a) Simulation system with cylinder.
(b) Optimized point cloud of cylinder plotted over the object’s original dimensions.
Fig. 9. Simulated system (left). Optimized point cloud (right).
Finally, the behavior of the PSO approach for the sphere with offset, its system simulation, and its optimized point cloud over the original object can be seen, respectively, in Figs. 10, 11a, and 11b. Same as the centered sphere case, the point cloud fits perfectly over the object with the dimensions from the original object. This is expected, since the PSO managed to find the global optimum of the objective function near iteration 10, generating the optimal parameters for the system, as can be seen in Tables 1 and 2.
150
J. Braun et al.
Fig. 10. PSO behavior regarding the sphere with offset case.
(a) Simulation system with sphere with offset.
(b) Optimized point cloud of sphere with offset plotted over the object’s original dimensions.
Fig. 11. Simulated system (left). Optimized point cloud (right).
6
Conclusions and Future Work
This work proposed a solution to the imperfections that are introduced when assembling a 3D scanner, due to assumptions that do not typical hold in a real scenario. Some uncertainties associated with angles and offsets, which may arise during the assembly procedures, can be solved resorting to optimization techniques. The Particle Swarm Optimization algorithm was used in this work to estimate the aforementioned uncertainties, whose outputs allowed to minimize the error between the position and orientation of the object and the resulting
Optimal Parameters of a 3D Scanner Through PSO
151
final point cloud. The cost function considered the minimization of the quadratic error of the distances which were minimized close to zero in all three cases, validating the proposed methodology. As future work, this optimization procedure will be implemented on the real 3D scanner to reduce the distortions on the scanning process. Acknowledgements. The project that gave rise to these results received the support of a fellowship from ”la Caixa” Foundation (ID 100010434). The fellowship code is LCF/BQ/DI20/11780028. This work has also been supported by FCT - Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/05757/2020.
References 1. Ajbar, W., et al.: The multivariable inverse artificial neural network combined with ga and pso to improve the performance of solar parabolic trough collector. Appl. Thermal Eng. 189, 116651 (2021) 2. Arbutina, M., Dragan, D., Mihic, S., Anisic, Z.: Review of 3D body scanning systems. Acta Tech. Corviniensis Bulletin Eng. 10(1), 17 (2017) 3. Bento, D., Pinho, D., Pereira, A.I., Lima, R.: Genetic algorithm and particle swarm optimization combined with powell method. Numer. Anal. Appl. Math. 1558, 578– 581 (2013) 4. Bratton, D., Kennedy, J.: Defining a standard for particle swarm optimization. IEEE Swarm Intell. Sympo. (2007) 5. Braun, J., Lima, J., Pereira, A., Costa, P.: Low-cost 3d lidar-based scanning system for small objects. In: 22o International Conference on Industrial Technology 2021. ¯ IEEE proceedings (2021) 6. Franca, J.G.D.M., Gazziro, M.A., Ide, A.N., Saito, J.H.: A 3d scanning system based on laser triangulation and variable field of view. In: IEEE International Conference on Image Processing 2005. vol. 1, pp. I-425 (2005). https://doi.org/10. 1109/ICIP.2005.1529778 7. Ghorbani, E., Moosavi, M., Hossaini, M.F., Assary, M., Golabchi, Y.: Determination of initial stress state and rock mass deformation modulus at lavarak hepp by back analysis using ant colony optimization and multivariable regression analysis. Bulletin Eng. Geol. Environ. 80(1), 429–442 (2021) 8. He, Z., Shi, T., Xuan, J., Jiang, S., Wang, Y.: A study on multivariable optimization in precision manufacturing using mopsonns. Int. J. Precis. Eng. Manuf. 21(11), 2011–2026 (2020) 9. Jin, C., Li, S., Yang, X.: Adaptive three-dimensional aggregate shape fitting and mesh optimization for finite-element modeling. J. Comput. Civil Eng. 34(4), 04020020 (2020) 10. Kennedy, J., Eberhart, R.: Particle swarm optimization. IEEE International Conference on Neural Network, pp. 1942–1948 (1995) 11. Kolotouros, N., Pavlakos, G., Black, M.J., Daniilidis, K.: Learning to reconstruct 3d human pose and shape via model-fitting in the loop. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2252–2261 (2019) 12. Lee, K.Y., Park, J.B.: Application of particle swarm optimization to economic dispatch problem: advantages and disadvantages. In: 2006 IEEE PES Power Systems Conference and Exposition, pp. 188–192 (2006). https://doi.org/10.1109/PSCE. 2006.296295
152
J. Braun et al.
13. Lempitsky, V., Boykov, Y.: Global optimization for shape fitting. In: 2007 IEEE Conference on Computer Vision and Pattern Recognition, pp. 1–8 (2007). https:// doi.org/10.1109/CVPR.2007.383293 14. Li, M., Du, W., Nian, F.: An adaptive particle swarm optimization algorithm based on directed weighted complex network. Math. Probl. Eng. 2014 (2014) 15. Ma, T.: Filtering adaptive tracking controller for multivariable nonlinear systems subject to constraints using online optimization method. Automatica 113, 108689 (2020) 16. Rehman, W.U., et al.: Model-based design approach to improve performance characteristics of hydrostatic bearing using multivariable optimization. Mathematics 9(4), 388 (2021) 17. Soltani, S., et al.: The implementation of artificial neural networks for the multivariable optimization of mesoporous nio nanocrystalline: biodiesel application. RSC Advances 10(22), 13302–13315 (2020) 18. Straub, J., Kading, B., Mohammad, A., Kerlin, S.: Characterization of a large, low-cost 3d scanner. Technologies 3(1), 19–36 (2015) 19. Swathi, A.V.S., Chakravarthy, V.V.S.S.S., Krishna, M.V.: Circular antenna array optimization using modified social group optimization algorithm. Soft Comput. 25(15), 10467–10475 (2021). https://doi.org/10.1007/s00500-021-05778-2 20. Wang, W., Li, Y., Hu, B.: Real-time efficiency optimization of a cascade heat pump system via multivariable extremum seeking. Appl. Thermal Eng. 176, 115399 (2020)
Optimal Sizing of a Hybrid Energy System Based on Renewable Energy Using Evolutionary Optimization Algorithms ˆ Yahia Amoura1(B) , Angela P. Ferreira1 , Jos´e Lima1,3 , and Ana I. Pereira1,2 1
Research Centre in Digitalization and Intelligent Robotics (CeDRI), Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal {yahia,apf,jllima,apereira}@ipb.pt 2 Algoritmi Center, University of Minho, Braga, Portugal 3 INESC-TEC - INESC Technology and Science, Porto, Portugal
Abstract. The current trend in energy sustainability and the energy growing demand have given emergence to distributed hybrid energy systems based on renewable energy sources. This study proposes a strategy for the optimal sizing of an autonomous hybrid energy system integrating a photovoltaic park, a wind energy conversion, a diesel group, and a storage system. The problem is formulated as a uni-objective function subjected to economical and technical constraints, combined with evolutionary approaches mainly particle swarm optimization algorithm and genetic algorithm to determine the number of installation elements for a reduced system cost. The computational results have revealed an optimal configuration for the hybrid energy system. Keywords: Renewable energy · Hybrid energy system · Optimal sizing · Particle swarm optimisation · Genetic algorithm
1
Introduction
The depletion of fossil resources, impacts of global warming and the global awareness of energy-related issues have led in recent years to a regain of interest in Renewable Energy Sources (RES), these latter benefit from several advantages which enable them to be a key for the major energy problems. On the other hand, a remarkable part of the world’s population does not have access to electricity (approximately 13% of the population worldwide in 2016) [1], which creates an important limitation for their development. Nevertheless, these needs can be covered by a distributed generation provided by renewable energy systems with the implementation of insulated microgrids based on Hybrid Energy Systems (HES) offer a potential solution for sustainable, energy-efficient power supply, providing a solution for increasing load growth and they are a viable solution to c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 153–168, 2021. https://doi.org/10.1007/978-3-030-91885-9_12
154
Y. Amoura et al.
the electrification of remote areas. These microgrids can be exploited connected to the main grid, with the latter acting as an energy buffer, or in islanded mode. One of the most important benefits of the RES remains in their contribution to the solution of global warming problems by avoiding damaging effects such as greenhouse gas emissions (GHG), stratospheric ozone hole, etc. Despite technological advances and global development, renewable energy sources do not represent a universal solution for all current electricity supply problems. There are several reasons for this, for instance, the low efficiency compared to conventional sources. Economically, RES provides extra costs and their payback takes a longer period [2]. In addition, RES are in a large extent, unpredictable and intermittent due to the stochastic nature of, for instance, solar and wind sources. To overcome the mismatch between the demand and the availability of renewable energy sources, typically microgrids are based on the hybridization of two or more sources and/or the exploitation of storage systems [3]. By this way, the complementarity between different renewable energy sources, together with dispatchable conventional sources, gives the emergence of hybrid energy systems (HES) which represent an ideal solution for the indicated problems. Under the proposed concept of HES, in the event that renewable energy production exceeds the demand, the energy surplus is stored in system devices as chemical ones or hydrogen-based storage systems, or, in alternative, delivered to the grid [4]. To increase the interest and improve the reliability of hybrid energy systems, it is important to provide new solutions and address an essential problem consisting of their optimal sizing. To deal with this type of problem, researchers have often referred to optimization methods. For instance, in [5] researchers have used the Sequential Quadratic Programming (SQP) method. Navid et al. [6] have used the Mixed Integer Non-Linear Programming (MINLP) method, the stochastic discrete dynamic programming has been used on [7]. Kusakana et al. [8] have developed an optimal sizing of a hybrid renewable energy plant using the Linear Programming (LP) method. Among other approaches, in [9] metaheuristics have proved to be an ideal optimization tool for the resolution of sizing problems. The work presented in this paper presents a real case study addressing the optimal sizing of a hybrid energy system in the campus of Santa Apol´ onia located in Bragan¸ca, Portugal. The objective of the work is to determine the optimal number of renewable energy-based units: photovoltaic modules and wind conversion devices on the one hand, and the optimal number of batteries for storage on the other hand. The contribution of this article consists in the development of an optimal sizing software based on optimization approaches. Because of the stochastic effect of the problem that represents a random effect especially in terms of power produced by the renewable energies sources, it is proposed to deal with the optimization problem using metaheuristic algorithms, mainly, Particle Swarm Optimisation (PSO) algorithm and Genetic algorithm (GA). The PSO is a modern heuristic search approach focused on the principle of swarming and collective behavior in biological populations. PSO and GA belong to
Optimal Sizing of a Hybrid Energy System
155
the same category of optimization methods and they are both community-based search approaches that depend on knowledge sharing among population members to improve their search processes. Throughout this work, it is performed a comparison of the computational performance of the two approaches, i.e., which algorithm will allow achieving the most optimal configuration concerning the size of the hybrid energy system while satisfying the economic aspects and the technical constraints related to the problem. The remaining parts of the paper are organized as follows: Sect. 2 describes the configuration of the HES. In Sect. 3, the meteorological data used is presented. Section 4 presents the modeling of the proposed hybrid energy system. Section 5 define the sizing methodology adopted. The sizing problem is, then, formulated as a uni-objective optimization problem in Sect. 6. The achieved results are presented and discussed in Sect. 7. Finally, Sect. 8 concludes the study and proposes guidelines for future works.
2
HES Configuration Architecture
The HES to be developed comprises two main renewable energy sources: Photovoltaic and wind. In order to ensure the balance between the demand and the energy produced, and given that the non dispatchable behavior of those sources, the microgrid also includes a diesel generator and a battery bank. The HES is developed to operate off-grid. Figure 1 shows the architecture of the chosen configuration.
Fig. 1. Architecture of the hybrid energy system.
156
Y. Amoura et al.
The battery system is connected to the DC bus which will be connected bidirectionally to allow it operating in discharge when there is a shortage of energy and in charge when there is a surplus of energy. An AC bus connects the AC loads, the diesel generator, the wind turbine generators and a photovoltaic system. The energy circulates through a bi-directional converter. When there is an excess of energy in the AC bus, the converter acts as a rectifier to recharge the batteries. In addition, when there is an energy deficit, the converter acts as an inverter to transfer energy from the DC bus to the load. In cases when the demand is higher than the renewable energy production and batteries are below the minimum charging level, the bi-directional inverter can automatically start a backup diesel group. A control and energy management system guarantees the energy flow and the monitoring of the microgrid power quality.
3
Study Data
Meteorological data are an important point for the optimal conception of the hybrid energy system to avoid an under or oversizing. Nevertheless, the information of the solar and wind potential defined by the irradiation and the wind speed respectively are the key variables to identify the sources that constitute the HES. The sampling data were taken at the laboratory level of the Polytechnic Institute of Bragan¸ca (IPB), Portugal, Latitude: 41.8072, Longitude: −6.75919 41o 48’ 26” North, 6o 45’ 33” West with an elevation of 690 m. This section will describe the average solar and wind potential data for one year (from January 1, 2019, to December 31, 2019) as well as the average load data. The study data are presented in Fig. 2. In this work, the solar irradiation data were taken practically on-site using a pyranometer exposed on a 30◦ south-facing support. Figure 2a shows the daily average solar irradiation data. The values of the ambient temperature are indispensable for the prediction of photovoltaic power. The more the temperature rises, the more the cell voltage decreases, which leads to a decrease in the power of the module. In this study, the measurement process of the temperatures is evaluated every hour during the day by using a temperature sensor, thermocouple K-Type. Figure 2b shows the daily average temperature data for 2019 year. The sizing of a wind turbine system depends essentially on the knowledge of wind speeds. For this reason, a series of precise and local measurements at the study site were performed. In this work, the wind speed is measured through an anemometer placed at 10 m from the ground surface. Figure 2c shows the average wind speed data for the time span under consideration. All the average values of wind speed are very random and stochastic, this comes back to the nature of the wind which is unpredictable. A considerable amount of wind circulating is observed in the afternoon, from 12:00 to 20:00 during the measurement period. On average, it reaches its optimum at 15:00 for a value of 2.93 m/s. From the collected data, the wind turbine characteristics
Optimal Sizing of a Hybrid Energy System
(a) Average solar irradiation.
(b) Average temperature.
(c) Average wind speed.
(d) Average load profile.
157
Fig. 2. Study data.
(cut in speed, cut-off speed, and rated speed) are evaluated, to select the optimal type of wind turbine for the project, from the technical point of view. Besides the environmental data, necessary to select the renewable source units, the dimensioning of the back up systems (diesel group and battery bank) requires the characterization of the demand profile. The average load profile is measured in kWh. There is a significant activity of the load during working hours from 08:00 am, which reaches a peak consumption of 7.68 kWh at 11:00 am. On the other hand, during off-peak hours, there is a certain consumption considered as uninterruptible load. Figure 2d illustrates the average load profile.
4
System Modeling
The optimization of the synergy between different sources in a HES, while maintaining their best operational characteristics, requires the mathematical modeling of the energy sources’ behavior, which must reflect the system response during its operation, when exposed to all types of external environments. According to the potential present in the study site, the hybrid energy system uses a combination of renewable devices (photovoltaic and wind turbines), a conventional diesel group, as a back-up system, and an energy storage system consisting of a set of electrochemical batteries. This section presents the mathematical modeling of the different hybrid energy system sources as well
158
Y. Amoura et al.
as the characteristics of the device units adopted, taking into consideration the environmental data collected and presented in the previous section. 4.1
Photovoltaic Energy System
Considering the objectives of this work, the most suited model for the photovoltaic energy system conversion is the power model (input/output) [10], which has the advantage of estimating the energy produced by the photovoltaic apparatus from the global irradiation data and the ambient temperature on an inclined plane, as well as the manufacturer’s data for the photovoltaic module selected. The power output of a photovoltaic module can be calculated according to the following equation: Ppv (t) = ηSG
(1)
being η the instantaneous efficiency of the photovoltaic module, S the surface of the photovoltaic module and G the global irradiation on an inclined plane. The instantaneous efficiency is given by, η = ηr (1 − γ(Tc − T0 ))
(2)
where ηr is the reference efficiency of the photovoltaic module under standard 2 conditions (T0 = 25◦ C, G0 = 1000 W/m and AM = 1.5), γ is the temperature coefficient (◦ C) determined experimentally as the variation in module efficiency for a 1◦ C variation in cell temperature (it varies between 0.004 and 0.006◦ C), Tc is the temperature of the module that varies with the irradiance and the ambient temperature as follows: N OCT − 20 Tc = Ta + G (3) 800 being N OCT the nominal operating cell temperature and Ta the ambient temperature in (◦ C). t , is written Thus, the instantaneous total power of the photovoltaic array, Ppv as follows: t (t) = Ppv (t)Npv Ppv
(4)
where Npv is the number of modules to be used in the photovoltaic array. The main characteristics of the selected photovoltaic module are presented in [11]. 4.2
Wind Energy Conversion System
The power produced by a wind energy system at a given site depends on the wind speed at a hub height, the air density, and the specific characteristics of the turbine. The wind speed in (m/s) at any hub height can be estimated using the following law:
Optimal Sizing of a Hybrid Energy System
v = vi
h hi
159
λ (5)
being hi the height of the measurement point, generally taken at 10 m, vi is the speed measured at height hi (m/s) and λ is typically taken as 1/7. The modeling of the power produced by a wind energy system unit Pwt is selected as a linear model [12], as follows: ⎧ Pwt = 0, v < vd ⎪ ⎪ v ≥ vc , ⎨ v − vd Pwt = Pn (6) , vd ≤ v < vn ⎪ vn − v d ⎪ ⎩ Pwt = Pn , vn ≤ v < vc where Pn is the rated electrical power of the wind turbine unit, v is the value of the wind speed, vn is the rated speed of the wind turbine, vc is the cut-off speed and vd is the cut-in speed of the wind turbine. t , is given by The instantaneous total power produced by a wind farm, Pwt the number of wind energy units, Nwt , times the power of each unit, as follows: t Pwt (t) = Pwt (t)Nwt
(7)
The features of the selected module of the wind energy conversion system are presented in [13]. 4.3
Energy Storage System
The modeling of the energy storage system (ESS) is divided into two steps according to two operations. The first step consists of evaluating the total capacity of the battery bank for an autonomy duration determined by the required specifications. By this way it will be possible to determine the unit capacity of a battery unit and therefore the number of batteries for the required autonomy, without the intervention of other production sources. The second step will be the study of the batteries’ behavior in the chosen sizing configuration to assess the feasibility of the first step. Therefore, it will be possible to know the exact number of batteries that will be operating in parallel with the other production sources, mainly the photovoltaic and wind turbine systems, without any system interruption. Sizing the Capacity of the Battery Bank. The total rated capacity of the batteries, C, should satisfy the following formulation: C=
Nj Eneed P d Kt
(8)
being Nj the required autonomy in days, Eneed the daily energy, Pd the allowed depth of discharge and Kt the temperature coefficient of the capacity.
160
Y. Amoura et al.
Battery Energy Modelling. The battery energy modeling establishes an optimal energy storage management. This operation depends on the previous state of charge and the differential between the energy produced by the different types of generators, Epr , and the initial energy required by the load, Ed defined by: t Ed (t) = Eload (t) − (Epr (t))
(9)
where, t t Epr (t) = Epv (t) + Ewt (t)
and
(10)
⎧ ⎨
t t Epv (t) = Ppv (t)Δt t t Ewt (t) = Pwt (t)Δt ⎩ t t Eload (t) = Pload (t)Δt
(11)
knowing that Δt is the simulation step, defined as one-hour interval. Batteries state of charge can be evaluated according to two operation modes, described as follows. • Charging operating mode: If Epr ≥ Ed . The instantaneous energy storage capacity, E(t), is given by the following equation: Ed (t) E(t) = E(t − 1) + ηbat Epr (t)ηconv − ηconv
(12)
being ηbat the battery efficiency and ηconv the converter efficiency. • Discharging operating mode: If Epr < Ed . Now, the instantaneous storage energy capacity can be expressed as follows: E(t) = E(t − 1) +
1 ηbat
(Epr (t)ηconv − Ed (t))
(13)
The instantaneous state of the charge is given by: SOC(t) =
E(t) Etotal
(14)
In addition, the charging and discharging modes should guarantee that the state of the charge (SOC) of the energy storage system must satisfy the following condition: SOCmin ≤ SOC(t) ≤ SOCmax
(15)
being SOCmin and SOCmax the minimum and maximum state of charge of the energy storage system respectively. The specification of the proposed battery unit are described in [14].
Optimal Sizing of a Hybrid Energy System
4.4
161
Diesel Generator
The rated power of the diesel generator, Pdg , is chosen equal to the maximum power required by the load i.e., max (t) Pdg ≥ Pload
(16)
The operating mode of the diesel group is based on two possible scenarios: • The first scenario occurs when the power verifies the following relation: t t Ppv (t) + Pwt (t) +
E(t) ≥ Pload (t) Δt
(17)
In this case, it is not necessary to start the generator as the consumption is satisfied. • The second scenario occurs when the following relationship is verified: t t Ppv (t) + Pwt (t) +
E(t) < Pload (t) Δt
(18)
In this case, the generator starts up to cover all or part of the energy demand in the absence of enough power from the other sources. The technical specifications of the chosen diesel group are mentioned in [15].
5
Adopted Sizing Strategy
After performing load balance and evaluating the solar and wind potential presented earlier in Sect. 3, the renewable sources are designed to provide continuous power to the required demand, then, taking into account the autonomy of the load which is ensured by the storage system reaching 24 h. The latter will therefore be able to supply the energy necessary for the load without the presence of other renewable sources for 24 h. The procedure to be followed is shown in the flowchart by Fig. 3. First, the capacity of the battery bank is defined according to the overall load and the desired autonomy, by using the Eq. (8) presented in Sect. 4.3. This step allows obtaining the necessary number of batteries, if there are no renewable sources available, for a specific period of autonomy (24 h in this case). The diesel generator is the last resource back up system, able to satisfy the demand if there are no renewable energy available and the battery bank reaches its minimum state of charge. The intermittent nature of the renewables, makes the problem subject to stochastic treatment. To solve the optimization problem, two metaheuristic methods were used: Genetic Algorithm (GA) and Particle Swarm Optimisation (PSO) algorithms. So, after providing the main initial data (meteorological data, constraints and initial parameters) the values of the decisive variables obtained by the algorithmic computation represent the optimal number of renewable generators. The algorithm evaluates them recursively until the cost of the installation is in the most optimal value.
162
Y. Amoura et al.
Fig. 3. Flowchart of the sizing process
6
Problem Formulation
The sizing of the energy hybrid system is formulated as an optimisation problem, in fact, the objective function contains mainly the different power equations described in Sect. 4 to consider the technical problem constraints. On the other hand, the objective function also considers the economic criteria, i.e., the system purchase costs, maintenance costs and component replacement costs. The objective function aims at obtaining the optimal number of the hybrid system components while satisfying the technical-economical constraints. The overall cost, in euros, for the system lifespan, T, considered equal to 20 years, is given by: Ct (Npv , Nwt , Nb ) = Npv (Cpv + Cpv Kpv + T Mpv ) + Nwt (Cwt + Cwt Kwt + T Mwt ) +Nb (Cb + Cb Kb + (T − Kb − 1)Mb ) + Cdie + Cconv
where, Npv , Nwt , Nb are, respectively, the number of units of photovoltaic modules, wind turbines and batteries, Cpv , Cwt , Cb , Cdie , Cconv are respectively the purchase costs of renewable units (photovoltaic and wind), battery unit, diesel group and overall converters, Mpv , Mwt , Mb are, costs for the renewable energy systems (photovoltaic and wind systems) and also battery bank. Finally, Kpv , Kwt , Kb are, respectively, the number of equipment replacements during the system lifetime.
Optimal Sizing of a Hybrid Energy System
163
The sizing optimisation problem can be written as follows, min
Ct (Npv , Nwt , Nb )
s.t.
Ppv (t)Npv + Pwt (t)NW T + Pb (t) × Nb ≥ Pload (t) max 0 ≤ Npv ≤ Npv max 0 ≤ Nwt ≤ Nwt max 0 ≤ N b ≤ Nb
(Npv ,Nwt ,Nb )
(19)
The optimization problem will be solved by two metaheuristic algorithms, mainly, Particle Swarm Optimisation (PSO) algorithm and Genetic algorithm (GA). PSO and GA are populational methods, i.e., they depend on knowledge sharing among population members to improve their search processes.
7
Results and Discussions
This section presents the obtained results, from the optimization approach. After the optimal number of units is reached, a technical study is performed to analyze the reliability of the installation under the number of units (photovoltaic modules, wind turbines, batteries, and diesel group). Furthermore, an economical evaluation is presented for the overall system lifetime. 7.1
Optimisation Results
The sizing problem is implemented by using the M atlab programming platform. The optimisation procedure is solved based on the two evolutionary algorithms (PSO) and (GA), introduced above. The parameters of the selected PSO are: search dimension = 1, population size = 60, number of iteration = 100, c1 = 2, c2 = 2 and w = 0.9. Moreover, the choose parameters of GA with the same population size and iteration number with Mutation and crossover probabilities of 1 %, and 75% respectively. Considering the devices’ specifications previously introduced in Sect. 4, the optimisation results are presented in Table 1, for both algorithms considered. The optimal configuration, which corresponds to the lowest overall cost while satisfying the technical constraints consists in 50 photovoltaic modules, 3 wind turbines, a battery bank with 13 units. For 20 years of the HES lifespan, the total purchase, maintenance and replacement are estimated at 157 ke , Figure 4 illustrates the convergence diagram for the two optimisation algorithms, PSO and GA used to solve the optimization problem, defined in Eq. (19). According to Table 1 and Fig. 4, it’s remarkable that the PSO presented a superior efficiency over the GA, with the same stopping condition. The path to the optimum by using the Genetic Algorithm is much slower than the one
164
Y. Amoura et al. Table 1. Optimal configuration results. NP
Genetic algorithm
NW Nb Ndg Iterations CPU time (s) Error (%) Total price (e )
49.68 2.62 13
1
38
0.47
1
156310.38
Particle swarm optimisation 49.89 2.73 13
1
27
0.23
0.07
156670.61
1
-
-
-
157755.87
Optimal configuration
50
3
13
(a) PSO.
(b) GA.
Fig. 4. Convergence performances.
with PSO, i.e., the computational effort required by PSO for reaching the global optimality is less than the effort required to arrive at the same high-quality results by the GA. It should be noted that PSO principle search mechanism uses a lower number of function evaluations than the GA, which justifies this output. Besides, the effects of speed and implicit transition rules on particle movement led to a faster convergence by the PSO. In terms of accuracy, the PSO has shown more accurate values than the GA justified by its reduced relative error value. 7.2
Technical Validation
This section at verifying the optimality of the results obtained from the optimization algorithms, by considering the optimal number of devices obtained during the optimization procedure. With this in mind, the overall system is evaluated, from the technical point of view, in the time span of 24 h. Figure 5a shows the power output setpoints of the various HES generators. The balance constraint between production and demand is satisfied throughout the day since the sum of the power from the sources, including the battery bank, is equal or higher than the load, for every time steps. The photovoltaic system is operating during the day to supply the total demand including the charging of the energy storage system. When the solar irradiation decreases, in the presence of the wind that reaches the speed of the wind turbine system cut-in speed, this latter compensates the deficit of energy. In this case, the diesel generator does not start, because it is used only in the absence of the two renewable sources with the storage system having reached its minimum state of charge (SOCmin ).
Optimal Sizing of a Hybrid Energy System
165
To analyse the performance of the chosen diesel generator set in this microgrid, the system performance is analysed for 48 h, considering the hypothetical scenario of null production of the renewable sources in the proposed time span. According to Fig. 5b, the diesel generator is operational (working as back up system) after the minimal state of charge of the energy storage system has been reached, which justifies that the number Ndg = 1 is sufficient and optimal to feed the installation in case of a supply absence.
(a) Presence of all sources.
(b) Absence of renewable energies.
Fig. 5. Optimal power set-points describing the hybrid energy system behavior.
Figure 6a shows the evolution of the state of charge (SOC) of the battery bank when operating in parallel with the other HES sources, for the time span of 24 h. The energy of the batteries is used (discharged) mainly during the night to supply the loads while the charging process is ensured during the day by the surplus of the renewable sources, over the demand. Figure 6b represents the capacity of the battery bank to maintain a 24-hour autonomy adopting the Cycle Charge Strategy [16], while satisfying the needs of the load, i.e. if the renewable sources (photovoltaic and wind systems) are not available, the storage system will be able to provide the demand for 24 h, without any interruption of the power supply. The total discharge of the batteries contributes enormously to their life time their life span reduction. For this reason, the SOC of the batteries should never go below its minimum value. This constraint is thus verified since in this study case the SOC of the energy storage system after 24 h of usage did not sink the minimum state defined by 20% in the battery specification. Indeed, the number of storage batteries delivered by the optimization algorithm computations discussed above represents an optimal value.
166
Y. Amoura et al.
(a) SOC of the battery bank in parallel operation.
(b) SOC of the battery bank in autonomous operation.
Fig. 6. Storage system behavior
7.3
Economical Evaluation
In order to evaluate the economic benefit of the overall installation, it is analysed the profitability during its life cycle. The life time of the HES is 20 years, the total purchase, maintenance and replacement costs are 157755.87 e . The average power consumption during 24 h is 122.915 kWh, which is equivalent to a value of 898508.65 kWh within 20 years, without taking into account the extension of the load. Portugal has one of the most expensive electricity systems in Europe. According with eurostat data in 2020, the price of electricity averaged 0.2159 e /kWh including taxes [17]. The estimated cost of the energy bill is 195964.74 e . These values allow to highlight the amount saved by the customer, as well as the payback period. Figure 7 shows an economic estimation for the life time under consideration. The line in black shows the evolution of the energy bill according to conventional energy from the public grid. The line in red represents the evolution of the investment cost in the HES, this latter starts with an initial purchase cost that increases each year with the amount of maintenance of the different elements, every 4 years the batteries are replaced without taking into account the maintenance price of the batteries during the year of their replacement. The intersection of the final value of the investment cost with the conventional energy bill on the time axis represents the period when the customer recovers the amount invested in the HES, and from that moment until the end of the life of the HES all the money supposed to be spent on the energy bill of the installation will be saved. It can be seen that the cost of the investment in the HES will be repaid at the end of the 16th year, more precisely on October 2037 if it is considered that the system will be installed on 1 January 2021. In this case, the HES is more profitable than conventional energy and allows the customer to save a value of 35423.49 e .
Optimal Sizing of a Hybrid Energy System
167
Fig. 7. Economic evaluation during the system life-cycle.
8
Conclusions and Future Work
In this paper, the problem of the optimal sizing for a hybrid energy system (HES) configuration based on renewable energies was formulated as a uni-objective optimization problem under constraints. Two optimization approaches based on evolutionary algorithms have been considered: Particle Swarm Optimisation (PSO) and the genetic algorithm (GA). The PSO shows better performances in terms of accuracy and convergence speed. The obtained sizing results have been tested and from the technical point of view, the performance of the system guarantees the energy balance and the remaining constraints. In addition, a simplified economical approach indicates that the return of the investment is possible within the life time of the energy system. As future work, it is proposed to treat the problem in a multi-objective optimization formulation while introducing environmental and economical constraints, whose results would provide a set of scenarios for the optimal configuration of a given HES. On the other hand, it is intended to improve this software providing an interface suitable for all cases of study, allowing to identify the best sizing of a given HES, through a technical and economic analysis of the computational results. Acknowledgements. This work has been supported by FCT - Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope UIDB/05757/2020.
References 1. Ritchie, H., Roser, M.: Acces to energy. Our World in Data (2019). http://www. ourworldindata.org/energy-access 2. Ma, W., Xue, X., Liu, G.: Techno-economic evaluation for hybrid renewable energy system: application and merits, Energy. 385–409 (2018). https://doi.org/10.1016/ j.energy.2018.06.101
168
Y. Amoura et al.
3. Mamen, A., Supatti, U.: A survey of hybrid energy storage systems applied for intermittent renewable energy systems. In: 14th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (2017). https://doi.org/10.1109/ecticon.2017.8096342 4. Gupta, A., Saini, R., Sharma, M.P.: Modelling of hybrid energy system-Part I: problem formulation and model development, Renew. Energy, pp. 459–465 (2011). https://doi.org/10.1016/j.renene.2010.06.035 5. AlHajri, M.F., El-Hawary, M.E.: Optimal distribution generation sizing via fast sequential quadratic programming. IEEE Large Eng. Syst. Conf. Power Eng. (2007). https://doi.org/10.1109/LESCPE.2007.4437354 6. Ghaffarzadeh, N., Zolfaghari, M., Ardakani, F.J., Ardakan, A.J.: Optimal sizing of energy storage system in a micro grid using the mixed integer linear programming. Int. J. Renew. Energy Res. (IJRER). 2004–2016 (2017). https://doi.org/10.1037/ 0003-066X.59.1.29 7. Bakirtzis, A.G., Gavanidou, E.S.: Optimum operation of a small autonomous system with unconventional energy sources. Electr. Power Syst. Res., 93–102 (1992). https://doi.org/10.1016/0378-7796(92)90056-7 8. Kusakana, K., Vermaak, H.J., Numbi, B.P.: Optimal sizing of a hybrid renewable energy plant using linear programming. IEEE Power Energy Soc. Conf. Expos. Africa Intell. Grid Integr. Renew. Energy Resourc. PowerAfrica (2012). https:// doi.org/10.1109/PowerAfrica.2012.6498608 9. Sharafi, M., Tarek, E.Y.: Multi-objective optimal design of hybrid renewable energy systems using PSO-simulation based approach. Renew. Energy, 67–79 (2014). https://doi.org/10.1016/j.renene.2014.01.011 10. Adamo, F., Attivissimo, F., Nisio, D., Lanzolla, A., Spadavecchia, M.: Parameters estimation for a model of photovoltaic panels. In: XIX IMEKO World Congress Fundamental and Applied Metrology, pp. 6–11. Lisbon, Portugal (2009). https:// doi.org/10.1068/978-963-88410-0-1 11. Zytech Solar Modules Catalogue: Maximum Quality, Efficiency and Reliability. www.Zytech-solar.com 12. Hongxing, Y., Lu, L., Zhou, W.: A novel optimization sizing model for hybrid solar-wind power generation system. Solar Energy 76–84 (2007). https://doi.org/ 10.1016/j.solener.2006.06.010 13. Flex Pro: Series Eol Generator (EOL/3000) www.flexpro-industry.com 14. Ultracell: Solar Series (UCG250-48) ultracell.com 15. Leroy merlin: Hyndai (Hyundai Diesel Generator 12kva Mono And Tri Dhy12000xse-t) leroymerlin.fr ´ Morant, F., Aristizabal, A.: A 16. Banguero, E., Correcher, A., P´erez-Navarro, A., review on battery charging and discharging control strategies: application to renewable energy systems. Energies 1–15 (2018). https://doi.org/10.3390/en11041021 17. Eurostat: Electricity prices (including taxes) for household consumers, first half 2020. http://www.eurostat/statistics-explained, Accessed 18 Aug 2020
Robotics
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot Hugo Mendon¸ca1,2(B) , Jos´e Lima2,3 , Paulo Costa1,2 , Ant´ onio Paulo Moreira1,2 , and Filipe Santos2 1
3
Faculty of Engineering, University of Porto, Porto, Portugal {up201606204,paco,amoreira}@fe.up.pt 2 INESC-TEC - INESC Technology and Science, Porto, Portugal {hugo.l.mendonca,jose.lima,filipe.n.santos}@inesctec.pt Research Centre of Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal [email protected] Abstract. The COVID-19 virus outbreak led to the need of developing smart disinfection systems, not only to protect the people that usually frequent public spaces but also to protect those who have to subject themselves to the contaminated areas. In this paper it is developed a human detector smart sensor for autonomous disinfection mobile robot that use Ultra Violet C type light for the disinfection task and stops the disinfection system when a human is detected around the robot in all directions. UVC light is dangerous for humans and thus the need for a human detection system that will protect them by disabling the disinfection process, as soon as a person is detected. This system uses a Raspberry Pi Camera with a Single Shot Detector (SSD) Mobilenet neural network to identify and detect persons. It also has a FLIR 3.5 Thermal camera that measures temperatures that are used to detect humans when within a certain range of temperatures. The normal human skin temperature is the reference value for the range definition. The results show that the fusion of both sensors data improves the system performance, compared to when the sensors are used individually. One of the tests performed proves that the system is able to distinguish a person in a picture from a real person by fusing the thermal camera and the visible light camera data. The detection results validate the proposed system. Keywords: Smart sensor
1
· Human detection · Neural network
Introduction
The current pandemic situation that we live on, caused by the COVID-19 virus outbreak led to the need of giving safe conditions to people that share crowded spaces, especially closed environments, where the propagation of the virus is substantially more easy and therefore is considered a more dangerous situation to the society. Places such as hospitals, medical centers, airports, or supermarkets c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 171–186, 2021. https://doi.org/10.1007/978-3-030-91885-9_13
172
H. Mendon¸ca et al.
are among those that fit in the previous description and even though regular testing to the users may be one way to prevent the spread of the virus, the disinfection of public places is of great importance. Disinfection using chemical products is one of the most popular but also implies a lot of effort and risk by the user since they must submit themselves to the dangerous conditions of proximity to possibly infected places. One way to solve this problem is using an Automated Guided Vehicles (AGV) that can cover large spaces without the supervision of human operators. Disinfection with Ultraviolet Radiation is an alternative to the use of chemical products without losing efficiency. This method works by exposing the infected area for a few seconds to the UV radiation reducing the viral load that is present there. This method is particularly interesting since it allows the disinfection of a larger area in less time, and by using an AGV, this task can be programmed to be performed during the periods without the presence of people (as example airports and commercial areas). However, due to its danger for living organisms, it is necessary to develop a system that detects persons that may be close to the actuation zone. This paper addresses a developed system that uses multiple sensors to have a higher robustness of detecting humans without false positives and false negatives by fusing the sensors signals that are captured individually in a single algorithm, that will then communicate with the disinfection robot. False negatives have a bigger impact in the system performance, since the disinfection lights are not stopped when persons are near the robot. Results are very promising reaching 97% of accuracy. The remaining of the paper is organized as follows. After an introduction presented in Sect. 1, the Sect. 2 addresses the related work regarding the human detection approaches. Then in Sect. 3, the system architecture is presented where the thermal camera, the Raspberry pi camera and the LiDAR sensor to estimate the disinfection time based on the room area are stressed. Section 4 presents the results and its discussion. Finally, Sect. 5 presents the conclusions and points out the future work directions.
2
Related Work
When trying to detect people in a closed environment, a multi-sensor approach can be a good solution. Since it relies on the information of more than one sensor to give a final, more accurate result, this method is the focus of this article. The data gathered by the different cameras and other sensors are later fused and analyzed allowing the system to have one single output. The system uses two cameras, one visible light camera, and one thermal camera to run an active detection algorithm. On the other hand, there are also two other sensor types, a LiDAR that gives distance information on the direction where the cameras are pointing and a Passive Infrared (PIR) sensor that is used in home surveillance systems for motion detection [9,10,13]. This last type of sensor is also commonly used to locate the motion target in space when using multiple sensors pointing
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
173
in different directions allowing the system to pinpoint to a certain degree its position [5,15,17]. The most common LiDAR cannot distinguish what type of objects are close to the system where is used, which means it cannot be used as an active detection sensor. However the distance data can be used to allow the system a better comprehension of what is happening around it by mapping the environment [1] and working together with the cameras to improve the system performance [4,12]. In regards to active human detection applications using cameras, thermal cameras are a less indicative sensor of visual information since it only captures temperatures based on infrared sensors. However in situations of low light, as described in [3] and [16], this type of camera has more accurate detection results when compared to visible light cameras without infrared sensors. In [7] a comparison is made between two cameras, one with and the other without infrared modules and the first outperforms the second by far, thus making us believe that in low light conditions thermal cameras are more informative than visible light cameras. Since some thermal cameras are usually expensive, it is necessary to find one that meets our requirements but without compromising our budget. FLIR Lepton represents such case as proven in [11] showing a capability to detect specific temperatures of objects smaller than humans from long distances [3] in a compact, low weight sensor compatible with embedded devices such as the Raspberry Pi in our case. This model has two versions 2.x and 3.x where the first has an 80 × 60 resolution and the second a 160 × 120 resolution among other differences. The visible light camera detection relies on previously trained models to identify persons. This is commonly used in Internet of Things applications and more complex surveillance systems [7], that instead or in addition to the use of passive sensors such as PIR sensors also use computer vision and machine learning to more accurately identify persons. Even though PIR sensors are a good option in simple motion detection systems since they are cheap and easy to use. Sometimes it triggers false positives which lead to unnecessary preoccupation and false negatives when there is a person but it is not moving. The human detection can be achieved by using image processing through background subtraction plus face detection or head and shoulder detection [7], but also using machine learning through networks prepared for the task of identification such as Convolutional Neural Network (CNN) [14], DarkNET Deep Learning Neural Network [8] and others such as YOLO and its variants, SSD and CNN variants [2].
3
System Architecture
The goal of this paper is to develop a human detection system that can be used with an autonomous disinfection robot and it was developed to be a low-cost and low weight efficient solution. The system will be mounted on top of a robot equipped with a UVC light tower responsible for the disinfection procedure. The human detector is a stand-alone equipment that is powered by 24 V and can
174
H. Mendon¸ca et al.
communicate by WiFi of serial port. In the presented case study, a serial port connection is used to obtain information from the developed human detector module. Figure 1 presents the main architecture of the human detector and its integration.
LiDAR Raspberry Pi
dist
RGB cam Thermal cam
Sonar
M Stepper motor driver
Serial
PIR
ESP32
I/O 24V
PCB1
USB/Serial Auxiliar I/O
Robot PC
Fig. 1. System architecture scheme
The human detection system consists of two major parts: the upper part that is a rotating module and contains a Raspberry Pi, a LiDAR, a FLIR Lepton Thermal Camera, and a Raspberry Pi Camera Module v2; the down part has 4 PIR sensors to detect movement, only when the robot is not moving, and a control circuit board that contains an ESP32 micro-controller. It is used to control the stepper motor that couples the upper part, general purpose I/O and
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
175
a sonar to measure the distance to the building roof. This embedded system also sends information to the main system (Robot PC) by an USB serial connection. To minimize the number of cameras used by the system, the upper part is a rotating module and was developed so that a single pair of cameras would be able to sweep a full 360◦ rotation. A decision was made to have a non-continuous motion instead of stopping for a brief moment. After measuring both vertical apertures and considering that a vertical resolution is used to enhance the field of view captured by the system, the stops are made every 36◦ resulting in a total of 10 stops for each rotation, taking an average time of 10 s per rotation. A two-pulley approach is used to achieve the rotation motion with one of them being attached to a stepper motor that is controlled by the micro-controller situated in the down part of the system. The other pulley that is also used to hold the upper part of the system to the down part has a bearing that is fixed to the box and rotates accordingly to the stepper rotation with a certain transmission ratio. 3.1
Thermal Camera
A FLIR Lepton 3.5 with a FLIR Breakout Board v2 is used due to its 160 × 120 resolution which is 4 times larger than its predecessor of 80 × 60. It uses two types of communication: I2C to send SDK commands provided by FLIR that can be used to initialization, reboot, and/or system diagnosis; on the other hand, there are also Serial Peripheral Interface (SPI) lines to send the data from the camera to the listening device, in this case is the Raspberry Pi. By default, the camera sends 164-byte packets which contain a 4-byte header and 160 bytes of payload. Since the raw values of each pixel are 16-bit values the data of each pixel is sent in 2 bytes which means each packet only sends information of half a line of a frame. A frame is divided into 4 segments and each segment consists of 60 packets that can be identified in the header of the packet. The 20th packet also identifies the current segment, if the segment ID is 1, 2, 3, or 4 the packet is valid if the ID is 0 it means that is a discard packet. The raw values of 16 bits per pixel represent values between 0 and 65535. This however does not have a normal distribution in this range instead the raw values are temperatures in Kelvin multiplied by a factor of 100. Since it is desired to detect human range temperatures, we are interested in finding values that are around 306,15K (equal to 33 ◦ C) or the raw value 30615 which is the normal temperature of the human skin. In the end, we did not find major differences between using the human body temperature, that is around 37 ◦ C, and the human skin temperature as the reference value for the detection range, however, we found that for persons that are further away from the system is preferably better to use the skin temperature as a reference value or an even lower value, since the measured human temperature starts becoming an average between the human skin temperature and the human clothes temperature.
176
H. Mendon¸ca et al.
A range is set in the algorithm to consider a group of temperatures near this ideal human temperature value considering two factors: human temperature fluctuation and the camera precision of ±5 ◦ C. If the read value is situated within this range we consider a positive human detection, even though we need to consider other inputs, since there can be other objects in the range that have the same temperature as the human body. 3.2
RGB Camera
The RGB camera used is a Raspberry Pi Camera Module v2 due to its low cost and ease of use with the Raspberry Pi without compromising performance and image quality. The system uses a SSD Mobilenet model trained with COCO Dataset to detect and identify persons in real-time through the Raspberry Pi camera. The MobileNet was quantitized to a lower resolution (internal Neural Network weights are moved from floats to integers), using the Tensorflow framework to reduce the computational power requirement, and enable the use of this Neural Network on a Raspberry Pi. As said in [6], a Single Shot multibox Detector (SSD) is a rather different detection model from Region-CNN or Faster R-CNN. Instead of generating the regions of interest and classifying the regions separately, SSD does it simultaneously, in a “single-shot”. SSD framework is designed to be independent of the base network, and so it can run on top of other Convolutional Neural Networks (CNNs), including Mobilenet. The Mobilenet and Raspberry Pi are capable of detecting persons in the chosen vertical resolution with a of 2,5 frames per second. In this case we defined a threshold of 50% on MobileNet detection confidence to reduce the false positive detections. The network is quite robust, having the capacity of detecting persons in a different number of situations, like for example through a partial body image or simply a single hand image. 3.3
LiDAR
The detection system also includes a LiDAR sensor pointing in the same direction as the cameras that are continuously sending to the Raspberry Pi distance measurements. This information is useful for mapping applications recreating the surrounding environment of the sensor giving yet another way of detection to the system although is much less informative since it cannot distinguish different types of objects simply by using distance measurements. The disinfection time can be tuned based on this information. The used LiDAR is a TFMini Plus UART module, a low-cost, small-size, and low power consumption solution to promoting cost-effective LiDARs. The TFmini Plus LiDAR Modules emit modulation waves of near-infrared rays on a periodic basis, which will be reflected after contacting the object. The time of flight is then measured by the round-trip phase difference and then the relative range is calculated between the product and the detection object.
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
177
Distances are sent via UART from the LiDAR to Raspberry Pi at a constant pace via UART and are later sent from the Raspberry Pi to the ESP32 microcontroller that is responsible for the system and the robot communication for the mapping tasks. The connections and buses from the cameras and LiDAR to the Raspberry CPU are presented on Fig. 2.
3V3GND
MISO CLK
DC/DC Converter
5V
SCL
GND
SDA
FLIR Lepton 3.5
VSYNC CS
RaspberryPi
24V GND
Flat Cable RPi
Picamera
RX
ESP32/PCB
TX RX TX
LiDAR
Fig. 2. Human detection module architecture
3.4
Messaging Protocol
Since the two cameras have separate algorithms running in individual programs, there is a need to aggregate and compare the detections from each algorithm in a single program that will then send that information along with the LiDAR data that is running itself in another program. The ZMQ which is an asynchronous messaging library is used. It has a publisher/subscriber option where the detection algorithms and the LiDAR programs are used as publishers by continuously sending data to a specified port which will then be subscribed by a master control program that is used as a subscriber. This messaging method works by creating a socket on the publisher side and binding it to the chosen IP address and port and then send the data. On the subscriber side, a socket is also created and connected to the same IP address and port as the publisher and reading the data received in the socket. It is important to mention that each publisher needs to have a different port however the subscriber is able to read different ports at the same time.
178
H. Mendon¸ca et al.
After gathering all the relevant data to the system, this subscriber program also communicates via UART with the ESP32 micro-controller sending information about the detection state of each camera and also sensor fusion. The distance read by the LiDAR is also sent for other purposes of the robot. Finally, Fig. 3 presents the developed Module Prototype.
Fig. 3. Human detection module prototype
4
Results
The detection algorithms were tested by placing the system in a populated environment. Figure 4 is an example of the sequential images collected from the thermal camera in one rotation of 360◦ . We can see from those images that there are people in one part of the testing area and no persons on the other. This gives us a better understanding of how the systems reacts to populated areas versus nonpopulated areas. The goal was to see the individual performance of the cameras in person detection tasks and test their robustness by testing different scenarios where we knew a certain camera would fail individually. Some examples of this
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
179
are the detection of pictures instead of real persons in the visible light camera algorithm and the detection of human-like temperature devices when no human is present. Finally, we tested the algorithm that combines both data to see if the performance was better when compared to the previous tests using the cameras individually. A total of 1200 images were taken from each of the cameras. About 80% of the images are supposed to be classified as positive detections, the rest are images where no person was in the field of view of the system and therefore should not detect anything.
Fig. 4. Example of images captured from one rotation
An object detection classification method was used where the True Positive (TP) means situations where a person was present in the image and the algorithm detected it positively, whereas a False Positive (FP) means a person was not present in the image but the algorithm falsely detected it. In regards to the negative detections, a True Negative (TN) means that no person was present in the image and the algorithm correctly detected nothing and a False Negative (FN) means a person was not detected even though it was present. This results are presented in Table 1. With the True, False, Positive, Negative information we can then calculate the algorithm Precision, Recall, and F1 based on the equations below. Precision is a good measure to determine when the costs of False Positive are high, whereas Recall calculates how many of the actual Positives our model capture by labeling it as Positive (True Positive). Applying the same understanding, we know that Recall shall be the model metric we use to select our best model when there is
180
H. Mendon¸ca et al. Table 1. Detection classification Detection method
TP TN FP FN
Thermal camera 923 145 306 51 897 175 127 89 Visible Light camera Thermal + Visible Light 981 194 88 32
a high cost associated with False Negative. F1 Score is needed when you want to seek a balance between Precision and Recall. The results are presented in Table 2. P recision = Recall =
T rueP ositive T rueP ositive + F alseP ositive
T rueP ositive T rueP ositive + F alseN egative
F1 = 2 ×
P recision × Recall P recision + Recall
Table 2. Detection classification Detection method
Precision (%) Recall (%) F1
Thermal camera 75,18 87,59 Visible Light camera Thermal + Visible Light 91,77
94,76 90,97 96,84
0,8379 0,8925 0,9423
In Figs. 5 and 6, we have an example of a True Positive in each one of the cameras. The visible light detection algorithm detects two persons with more than 50% certainty which classifies as a positive detection, it is important to mention that the use of masks does not have a big impact on the identification of persons. The thermal camera detection algorithm has a total of 3545 pixels in the range of temperatures that are considered acceptable which means that the system also considers this image as a positive detection. Since both cameras consider these images as True positives it will result in a True Positive for the detection system. In Figs. 7 and 8, we tested a scenario where we knew it was possible that the Visible Light detection algorithm would falsely signal a detection. The idea was to place an image of a person in front of the camera even though there is no real person there. As we can see the visible algorithm detects the image as a True Positive but the Thermal detection algorithm did not, since no temperatures in the image were in the predefined range of human temperatures. Individually on algorithm classifies the scenario as positive and the other as negative resulting
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
Fig. 5. Example of true positive - visible light camera
Fig. 6. Example of true positive - thermal camera
181
182
H. Mendon¸ca et al.
in a system negative. This proves that the fusion of data from both sensors can improve the system’s performance.
Fig. 7. Example of false positive - visible light camera
There are also some cases where the detection could not be achieved by either of the cameras. As we can see in Fig. 9 there is a person in the image, however, the algorithm is not capable of detecting it because of the distance of the system to the person, the low light conditions and the low resolution of the Neural Network. The thermal sensor also has some problems when trying to detect persons that are too far from the sensor or when the environmental temperatures are too similar to the person’s temperature. As we see in Fig. 10, even though we can distinguish in the image the person, the chosen range of temperatures does not consider it as a positive detection. We could also expand the range of detection but that would make the sensor too sensible to other objects or/and environmental temperatures. Our measurements indicate that the system has a range of detection of at least 8 m in non-optimal conditions. In perfect light and temperature conditions, the system’s range increases even further.
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
Fig. 8. Thermal image in visible camera false positive example
Fig. 9. Example of false negative - visible light camera
183
184
H. Mendon¸ca et al.
Fig. 10. Example of false negative - thermal camera
5
Conclusions and Future Work
The developed system presented a high accuracy rate when detecting people in different light and weather conditions by using both thermal and visible light sensors as well as the PIR sensors. The data fusion algorithm allows the system to overcome situations where a determined sensor would not be able to perform as expected. The PIR sensor is the most simple sensor used in our system is good to detect persons in situations where there is movement, however, this method fails when a person is not moving but is still present. In this situation, we use the thermal and visible light camera to enhance the detection of people with the developed algorithms, using computer vision and temperature measurements. The thermal detection algorithm is susceptible to failure in situations where the environment temperature is similar to the human body temperature or when there are objects with similar temperatures. The visible light detection algorithm shows a lower performance in low light conditions and is not able to distinguish a real person from a picture of a human. Even though these two sensors are more capable than the PIR sensor, they still work together to improve the system performance as we showed in our tests. Since the cameras are spinning around central axis of the system, sometimes it fails to detect persons moving in the same direction as the camera. In this situations, the system relies on the data of the PIR sensors to accomplish the detection, even if it is not as reliable as the cameras data. Further work will consist of implementing the developed system into a disinfection AGV to test its reliability in a real-world scenario.
Human Detector Smart Sensor for Autonomous Disinfection Mobile Robot
185
The thermal detection algorithm can be improved by training a neural network to identify human bodies in a frame. This can be done in two ways, one of them is overlaying the RGB and the thermal image to create a new image where each pixel contains color plus temperature information thus being called RGB-T. The other way is using the thermal images to create a dataset of images to feed the network, the same approach used in the visible light detection algorithm. Acknowledgements. This work has been supported by FCT - Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/05757/2020.
References 1. Aijazi, A.K., Checchin, P., Trassoudaine, L.: Multi sensorial data fusion for efficient detection and tracking of road obstacles for inter-distance and anti-colision safety management. In: 2017 3rd International Conference on Control, Automation and Robotics, ICCAR 2017, pp. 617–621. Institute of Electrical and Electronics Engineers Inc., June 2017. https://doi.org/10.1109/ICCAR.2017.7942771 2. Alsing, O.: Mobile object detection using tensorflow lite and transfer learning (2018). http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-233775 3. Andraˇsi, P., Radiˇsi´c, T., Muˇstra, M., Ivoˇsevi´c, J.: Night-time detection of uavs using thermal infrared camera, vol. 28, pp. 183–190. Elsevier B.V., January 2017. https://doi.org/10.1016/j.trpro.2017.12.184 4. Chavez-Garcia, R.O., Aycard, O.: Multiple sensor fusion and classification for moving object detection and tracking. IEEE Trans. Intell. Transp. Syst. 17, 525–534 (2016). https://doi.org/10.1109/TITS.2015.2479925 5. Ha, K.N., Lee, K.C., Lee, S.: Development of PIR sensor based indoor location detection system for smart home, pp. 2162–2167 (2006). https://doi.org/10.1109/ SICE.2006.315642 6. Hung, P.D., Kien, N.N.: SSD-mobilenet implementation for classifying fish species. In: Vasant, P., Zelinka, I., Weber, G.-W. (eds.) ICO 2019. AISC, vol. 1072, pp. 399– 408. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-33585-4 40 7. Ivaˇsi´c-Kos, M., Pobar, M.: Human detection in thermal imaging using yolo. ACM (2019). https://doi.org/10.1145/3323933.3324076 8. Mitrea, C.A., Constantin, M.G., Stefan, L.D., Ghenescu, M., Ionescu, B.: Littlebig deep neural networks for embedded video surveillance, pp. 493–496. Institute of Electrical and Electronics Engineers (IEEE), October 2018. https://doi.org/10. 1109/iccomm.2018.8484765 9. Patel, P.B., Student, M.T., Choksi, V.M., Jadhav, S., Potdar, M.B.: ISSN: 22490868 Foundation of Computer Science FCS. Technical report 5 (2016). www.ijais. org 10. Pawar, Y., Chopde, A., Nandre, M.: Motion detection using PIR sensor. Int. Res. J. Eng. Technol. 1(5) (2018). www.irjet.net 11. Pestana, D.G., Mendonca, F., Morgado-Dias, F.: A low cost FPGA based thermal imaging camera for fault detection in PV panels. Institute of Electrical and Electronics Engineers Inc., August 2017. https://doi.org/10.1109/IoTGC.2017.8008976 12. Premebida, C., Ludwig, O., Nunes, U.: LIDAR and vision-based pedestrian detection system. J. Field Robot. 26(9), 696–711 (2009). https://doi.org/10.1002/rob. 20312, http://doi.wiley.com/10.1002/rob.20312
186
H. Mendon¸ca et al.
13. Sahoo, K.C., Pati, U.C.: IoT based intrusion detection system using PIR sensor. In: RTEICT 2017–2nd IEEE International Conference on Recent Trends in Electronics, Information and Communication Technology, Proceedings, vol. 2018-January, pp. 1641–1645. Institute of Electrical and Electronics Engineers Inc., July 2017. https://doi.org/10.1109/RTEICT.2017.8256877 14. Wei, H., Laszewski, M., Kehtarnavaz, N.: Deep learning-based person detection and classification for far field video surveillance. Institute of Electrical and Electronics Engineers Inc., January 2019. https://doi.org/10.1109/DCAS.2018.8620111 15. Yun, J., Lee, S.S.: Human movement detection and identification using pyroelectric infrared sensors. Sensors (Switzerland) 14(5), 8057–8081 (2014). https://doi.org/ 10.3390/s140508057 16. Yuwono, W.S., Sudiharto, D.W., Wijiutomo, C.W.: Design and implementation of human detection feature on surveillance embedded IP camera, pp. 42–47. Institute of Electrical and Electronics Engineers Inc., July 2018. https://doi.org/10.1109/ SIET.2018.8693180 17. Zhang, Z., Gao, X., Biswas, J., Jian, K.W.: Moving targets detection and localization in passive infrared sensor networks (2007). https://doi.org/10.1109/ICIF. 2007.4408178
Multiple Mobile Robots Scheduling Based on Simulated Annealing Algorithm Diogo Matos1(B) , Pedro Costa1,2 , Jos´e Lima1,3 , and Ant´ onio Valente1,4 1
4
INESC-TEC - INESC Technology and Science, Porto, Portugal [email protected] 2 Faculty of Engineering, University of Porto, Porto, Portugal [email protected] 3 Research Centre of Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal [email protected] Engineering Department, School of Sciences and Technology, UTAD, Vila Real, Portugal [email protected]
Abstract. Task Scheduling assumes an integral topic in the efficiency of multiple mobile robots systems and is a key part in most modern manufacturing systems. Advances in the field of combinatorial optimisation have allowed the implementation of algorithms capable of solving the different variants of the vehicle routing problem in relation to different objectives. However few of this approaches are capable of taking into account the nuances associated with the coordinated path planning in multi-AGV systems. This paper presents a new study about the implementation of the Simulated Annealing algorithm to minimise the time and distance cost of executing a tasks set while taking into account possible pathing conflicts that may occur during the execution of the referred tasks. This implementation uses an estimation of the planned paths for the robots, provided by the Time Enhanced A* (TEA*) to determine where possible pathing conflicts occur and uses the Simulated Annealing algorithm to optimise the attribution of tasks to each robot, in order to minimise the pathing conflicts. Results are presented that validate the efficiency of this algorithm and compare it to an approach that does not take into account the estimation of the robots paths.
Keywords: Task scheduling
1
· Multiple AGV · Time Enhanced A*
Introduction
Automated Guided Vehicles (AGV) have been more and more adopted not only by industry for the moving of products on the shop-floor but also in hospitals and distribution centres, as example. They can be an important help to the competitiveness of a company since a 24/7 h can be adopted, as well as, a reduction of costs. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 187–202, 2021. https://doi.org/10.1007/978-3-030-91885-9_14
188
D. Matos et al.
When the solution points out more than one AGV to transport the material, a new problem must be tackled: scheduling of multiple AGV. The coordination of a fleet of autonomous vehicles is a complex task and actually most available multi-robot systems rely on static and pre-configured movements [1]. The solution can be composed by a cooperative movement between all robots that are part of the system while avoiding mutual block. In fact, this problem of scheduling for multiple-robots can be compared to the well-known problem of the Travelling salesman problem applied with multiple salesman. However the problem of task scheduling in multiple-robots system has the added complexity that the path of one robot can interfere with the path of the other robots since they all must share the same resources. Based on this, an optimisation methodology is proposed in this paper so that it can solve the multi-robot scheduling, while taking into account the impact of the pathing conflicts in the overall efficiency of the system. This paper addresses an optimisation approach based on the estimation of the robots paths via the TEA* algorithm and the consequential optimisation of the scheduling of multiple AGV via the Simulated Annealing algorithm. 1.1
Problem Description
The order in which the tasks are attributed to each of the agents of the system can have a great impact in the overall efficiency of the system. Therefore, discovering the ideal order of tasks to assign to each of the robots, that are part of a multi AGV system, is a very important task. The main goal of this article is to create a module that is capable of optimising the task order that will be assigned to each of the robots. This optimisation process must be time sensible, since it must generate a good solution in the time interval that takes the control system of the multi AGV to execute its current assigned tasks. This module uses a path estimation generated by the TEA* path planning algorithm to calculate the cost of each solution taking into account the possible resource conflicts. Most task scheduling implementations do not take into account possible pathing conflicts, that can occur during the planning of the paths for the robots that comprise the system. These conflicts normally originate unpredicted increases in the time it takes the system so execute the tasks, since in order to solve these conflicts one more of the robots must either delay their movement or use a less efficient path to reach the target. Therefore, the overall objective of this optimisation is to make the system more efficient by using a path planning algorithm in the optimisation phase. The path planning algorithm will generate an estimation of the real paths of that the robots will take. The main idea behind this system is to use this estimations to calculate the value of each solution, therefore the minimisation of this value will be directly correlated to a decrease in the number of pathing conflicts. In most real industrial applications of multi AGV systems there are some restrictions associated with how the transport of cargo can be made, for example some tasks can only be executed by certain robots (due to the AGV characteristics) and some tasks have to be executed as
Multiple Mobile Robots Scheduling Based on Simulated Annealing
189
soon as possible having priority over others, this restrictions were also taken into account during the design of this module. This article represents the first step into developing a system capable of such optimisation. It presents the results of the study of the performance of one of the most commonly used optimisation methods, when it is applied in the scenario described above. This article also compares the performance of this method with the results obtained from the minimisation of the travelled distance without taking into consideration the path estimation. Since the purpose of this article is just to study the performance of the Simulated Annealing algorithm when it is apply to this case, the estimation of the AGV battery and the dynamic execution of tasks were not taken into account, however such features are planned in future iterations of this work. For the purposes of this study a task is considered as the movement the movement of the robot between two workstation. This implies that the robot must first move from its current position towards the starting workstation, in order to load the cargo, and then drop it at the final workstation. To execute this movements the robot must access shared resources, due to the physical dimensions of the robot and the operation space, it is considered that it is only possible to have one robot travelling on each edge of the graph, in order to avoid possible deadlock situations. This types of studies are of paramount importance as a possible solution to this optimisation problem may be based in a multi method based approach. The paper is organised as follows. After this brief introduction, Sect. 2 presents some related work on the scheduling problem. Section 3 addresses the system architecture whereas in Sect. 4 presents the optimisation methodology. On Sect. 5, the results of the proposed method are stressed and Sect. 6 concludes the paper and points out the future work direction.
2
State Art
Task scheduling defines and assigns the sequence of operations (while optimising) to be done, in order to execute a set of tasks. Examples of scheduling can be found in a huge number of processes, such as control air traffic control, airport gate management, allocate plant and machinery resources and plan production processes [2,4] among several others. The task scheduling can be applied to the presented problem on assigning the task for each agent on a multi-robot system. This problem can be considered a variant of the well known Travelling Salesman Problem (TSP) [3]. According to [12], algorithms between centralised and decoupled planning belong to three problem classes: 1) coordination along fixed, independent paths; 2) coordination along independent roadmaps; 3) general, unconstrained motion planning for multiple robots. Following 3), there are several approaches to solve the scheduling problems, from deterministic methods to heuristics procedures. Regarding the Heuristic procedures there are several ways such as Artificial Intelligence, Simulated Annealing (SA) and Evolutionary algorithms [5]. Classical optimisation methods can also be applied to the scheduling problem such as
190
D. Matos et al.
the Genetic Algorithm (GA) or Tabu Search [6]. Enhanced Dijkstra algorithm is applied to find the conflict-free routing task on the work proposed by [7]. The scheduling problem has been studied extensively in the literature. In the robotics domain, when considering each robot as an agent, some of these algorithms can be directly adapted. However, most of the existing algorithms can only handle single-robot tasks, or multi-robot tasks that can be divided into single-robot tasks. Authors from [8] propose an heuristics to address the multirobot task scheduling problem but at the coalition level, which hides the details of robot specifications. Scheduling problem can be solved resorting to several approaches, such as mixed integer program, which is a standard approach in the scheduling community [15] or resorting to optimisation techniques: Hybrid Genetic AlgorithmParticle Swarm Optimisation (HGA-PSO) multiple AGV [16], find the nearoptimum schedule for two AGVs based on the balanced workload and the minimum travelling time for maximum utilisation applying Genetic Algorithm and Ant Colony Optimisation algorithm [14]. Other approaches provide a methodology for converting a set of robot trajectories and supervision requests into a policy that guides the robots so that operators can oversee critical sections of robot plans without being over-allocated, as an human-machine-interface proposal that indicates how to decide the replanning [9]. Optimisation models can also help operators on scheduling [10]. Similar approach is stressed on [11] where the operator scheduling strategies are used in supervisory control of multiple UAVs. Scheduling for heterogeneous robots can also be found on literature but addressing two agents only [13]. Although there exist some algorithms that support complex cases, they do not represent efficient and optimised solutions that can be adapted for several (more than two) multi-robot systems in a convenient manner. This paper proposes a methodology, based on Simulated Annealing optimisation algorithm, to schedule a fleet of four and eight robots having in mind the simultaneous reduction of the distance travelled by the robots and the time it takes to accomplish all the assigned tasks.
3
System Architecture
The system used to test the performance of the optimisation methods, as shown in Fig. 1, is comprised of two modules: – The Optimisation module; – The Path Estimation module; The idea behind this study is to, at a later date, use its results to help design and implement a tasks scheduling software that will work as an interface between the ERP used for industrial management and the Multi AGV Control System. The Optimisation module will use the implemented methodologies, described in Sect. 4, to generate optimised sets of tasks for each of the robots. These sets are then sent to the Path Estimation module, this module estimates the paths that
Multiple Mobile Robots Scheduling Based on Simulated Annealing
191
Fig. 1. Top level view of the Control system.
each of the robot will have to take, in order to execute these tasks. This paths will be planned using the TEA* path planning algorithm, therefore taking into consideration possible resource conflicts that can occur. The Path Estimation module will be used to calculate the value of each of the task sets, this value is later used by the Optimisation module to generate better task sets for the robots. This cycle will continue to be executed until the optimisation method reaches its goal. In future works this cycle will be restricted to the available time interval until the completion of the current tasks by the robots, however since the aim of this study was to analyse the performance of the simulated annealing method when it is applied to this scenario, this restriction was not implemented.
4
Implemented Optimisation Methodology
In this study the Simulated Annealing(SA) metaheuristic, was chosen in order to demonstrate its results when it comes to optimising the solutions to the task attribution problem. However, some small modifications needed to be implemented to the classic version of this metaheuristic, in order to allow the application of this algorithm to the proposed problem. Most of these modifications were implemented with the objective of making the solutions generated by these algorithms compatible with the restrictions that most real life multi AGV systems are subjected to. The three main restrictions taken into consideration during this study were: – The possibility of having different priorities for each of the tasks; – The possibility of having tasks that can only be executed by specific robots; – The existence of charging stations that the robots must move to when they have no tasks assigned; The implemented algorithm, as well as, the modifications implemented are described in the following sections. 4.1
Calculate the Value of a Solution
In the tasks scheduling for multiple vehicle routing problem, the solutions can be classified by two major parameters:
192
D. Matos et al.
– The times it takes the robots to complete all of its tasks; – The distance travelled by the robot during the execution of the referred tasks; In order to classify and compare the solutions obtained by the implemented optimisation methodologies, a mathematical formula was used to obtain a cost value for each of the solutions. This formula uses as inputs a boolean that indicates if the TEA* is capable of planning a valid path for the robot (Vi), the number of steps that comprise each of the robots planned path(Si) and the total distance that each robot is estimated to travel(Di). This formula is represented bellow: N umberof Robots
(c1 ∗ V i + c2 ∗ Si + c3 ∗ Di)
i=0
Each of these inputs is multiplied by a distinct constant, these constants define what is the weight that each of the inputs will have in the final result of the function. For the purpose of these article, these values were set as 1 * 108 , 5, 1 for c1, c2 and c3, respectively. The intention behind these values is to force the optimisation process to converge into solutions where the path for all the robots is able to be planned, by attributing a large constant cost to the solutions that don’t generate feasible path, prioritising then those paths are the ones which leads to the fastest execution of all the tasks. It is of special importance, when using the TEA* algorithm for path planning, that the optimisation process gives special attention to the overall time taken by the system to execute the tasks. The TEA* algorithm has the possibility of solving pathing conflicts by inserting wait conditions into the robots paths, therefore in the paths generated by this algorithm there isn’t always a direct relation between travelling less distance and finishing the tasks quicker. There are some scenarios, as implied above, where the TEA* algorithm cannot plan viable paths for all the robots, this scenarios are normally associated with the fact that the maximum number of steps allocated in the algorithm is reached before all the targets are reached. Since this paths would be prohibitively costly to be executed by the robots since the more steps the path has the more time it will take to finish and the computational cost of planning will also increase. 4.2
Initial Clustering of the Tasks
Since the Simulated Annealing is a metaheuristic that generates random changes in the solution in an attempt to move its solution towards a global minimum, it the results obtained with this probabilistic technique tend to be dependent on the starting solution. To generalise this methodology and also to have a comparison point between a solution with optimisation and solution that was not exposed to any optimisation methodologies. The tasks where initially clustered using a Kmeans Spectral clustering algorithm, this algorithm was based in the
Multiple Mobile Robots Scheduling Based on Simulated Annealing
193
algorithm presented by [17,18] to solve the traditional Multiple Travelling Salesman Problem (mTSP). This initial clustering uses a matrix with the distance between the final point of each task and the beginning point of the other tasks, in order to create a number of clusters equal to the number of robots available in the system. Due to the fact that the beginning point and final point of each task are usually different, the distance matrix computed is not symmetric. This asymmetry serves to model the fact that the order in which the tasks are executed by each robot is not commutative and does have a large impact in the value of the solution. These clusters were then assigned to the robot that was closest to the start point of each cluster. This solution will serve as the baseline for the optimisation executed by the Simulated Annealing metaheuristic. 4.3
Simulated Annealing Algorithm
The implementation of the Simulated Annealing followed and approach that is very similar to the generalise version of the algorithm found in literature. This implementation is show in Fig. 2 via flow chart.
Fig. 2. Flowchart representation of the implemented simulated annealing algorithm
The Simulated Annealing algorithm implemented uses the same cooling function as the classical implementation of this algorithm. It uses initial temperature of 100◦ and a rate of cooling of 0.05. This algorithm if given an infinite time window to execute will deliver a solution if the final temperature reaches 0.01◦ .
194
D. Matos et al.
Dealing with Tasks with Different Priority Levels As stated previously, several modifications needed to be implemented to the classic approach of this algorithm, in order to deal with the new restrictions imposed by real industrial environments. In order to allow the implemented Simulated Annealing algorithm to generate solutions that respect the priorities of the tasks, the optimisation problem was divided into several smaller problems. Each of these smaller problems represent the optimisation of one of the priority groups. The algorithm will generate solutions to each of these problems starting with the group that as the highest priority and descending priority wise. After generating a solution for one these problems the system will calculate the final position of each of the robots, this position is not only characterised by the physical location of the robot but also by the estimated time that it will take the robot to finish its tasks. Afterwards, this position will be used as the initial position of the robots for the next priority group. This allows the algorithm to take into consideration that the solutions found for a priority group will also affect the priority groups with lower priorities. This methodology is represented in Fig. 3 via a flowchart.
Fig. 3. Flowchart representation of an implementation of a simulated annealing algorithm while taking into account the possibility of existing tasks with different priorities.
The TEA* algorithm used to estimate the paths for the robots, will also set the nodes belonging to the paths estimated for higher priority tasks, has occupied in the corresponding step. This modification in conjunction with the updating of the robots initial position allows the algorithm to divide the path planning problem into smaller chunks without sacrificing the effect that higher priority solutions may have in the path estimated for lower priority ones.
Multiple Mobile Robots Scheduling Based on Simulated Annealing
195
Robot Exclusivity Problem Another restriction that the system will have to face is the fact that some tasks might only be possible to execute by a specific robot or group of robots. This restriction implies that the changes made to the solution by the Simulated Annealing algorithm cannot be truly random. To respect this restriction, another modification must be added to the classical implementation of the Simulated Annealing algorithm. To prevent the attribution of tasks to robots that are not capable of executing them, a taboo table was implemented. This taboo table holds information on which tasks have this restriction and to which robots can those tasks be assigned to. By analysing the generated random change using this table, it is possible to check if a change to the solution can be accepted or not, before calculating the value associated with that change. The use of a taboo table prevents the algorithm from spending time calculating the value of solutions that are impossible to execute by the robots. The functioning of this taboo table is shown via a flowchart in Fig. 4. The implemented random change algorithm executes two different types of changes. It either commutes the position of two different tasks between each other, this was the example used to show the functioning of the taboo table in Fig. 4. Or it changes the position of one randomly selected task. In this last case, if the task is affected by this restriction the algorithm uses the taboo table to randomly select a new position, from the group of positions that respect the restriction associated with the referred task, to attribute to the task. In the case where there are no other valid candidates, either other tasks or other positions that respect the restriction, to exchange the selected task with, the algorithm will randomly select another task to change, and repeat the process. This taboo table is also used in the initial clustering in order to guarantee that the initial clustering of the tasks also respects this restriction. The taboo table is analysed when assigning a task to a cluster, tasks that are subjected to this restriction can only be inserted into cluster assigned to a robot that is capable of executing said tasks. All sets of tasks will have approximately 10% of their total tasks affected by robot restrictions and will be divided into three different priority levels (Table 1).
196
D. Matos et al.
Fig. 4. Flowchart representation of the how the modifications implemented into the process of generating a random change in the task set. Table 1. Example of a Taboo Table used to solve the robot exclusivity problem. Task ID Possible robot ID 1
2
1
4
2
2
Dealing with Idle Robots In real multi AGV implementations it is necessary to have specific spots where the robots can recharge, this spots are usually located in places where they will not affect the normal functioning of the system. This restriction was also taken into consideration by the implemented algorithm. At the end of each task group assigned to the robot the task scheduler module will send the robot to its charging station. This action will be considered as an extra task and is taken in consideration when the algorithm is estimating the cost of each solution, since even due the robot as finished its tasks it can
Multiple Mobile Robots Scheduling Based on Simulated Annealing
197
still interfere with the normal functioning of the other robots and cause pathing conflicts. To prevent the robots from moving to their charging stations before finishing all their tasks, this task will be permanently fixed as the last task to be executed by each of the robots. It will also be outside the scope of the normal random change process that occurs in the Simulated Annealing algorithm, therefore preventing any change, induced by the algorithm into the task set, from altering its position in the task set.
5
Tests and Results
In this section the test description and results obtained during this study will be described and displayed. As stated before, the objective of this study is to determine the efficiency and suitability of the Simulated Annealing algorithm when it is used to optimise the task scheduling of a multi AGV system. The Simulated Annealing algorithm will be analysed based on two key factors. The overall cost of the final path generated by the algorithm and the time it took the algorithm to reach said solution. The performance of this algorithm will be compared to the case where the task are randomly distributed and to the case where the tasks are optimised to reduce the distance travelled between each task without taking into account possible path planning conflicts. 5.1
Test Parameters and Environment
In order to tests the efficiency of the different methodologies, the map used in [19] was chosen has the test environment. This map defines a real life map of an industrial implementation of a multi AGV system and has as its dimensions 110 × 80 m. This map is represented in Fig. 5.
Fig. 5. Map of the environment use for the tests [19]. The possible paths that the robots can use are represented in the figure via the red coloured lines.
198
D. Matos et al.
Using this map a graph was generated that represents all the possible trajectories that the robots can take. This graph was composed by 253 vertexes and 279 edges, of the 253 vertexes 41 of them are either workstations or robot charging stations. Two different versions of the system will be tested one version will only use four robots while the other will use eight. Each version of the system will be tested with a different sets of tasks, these sets vary not only in the number of tasks but also in the restrictions associated with each one. These test were executed in a laptop with the a Intel Core i7-6820HK 2.70 ghz cpu, 32G available ram and NVIDIA GeForce GTX 980M graphic card. For the purpose of this tests, a task will be characterised by the movement of the robot to the “Starting Point” of said task and then from the movement of the robot from “Starting Point” to the “End Point”. In this study it is assumed that the loading and unloading of the robot happens instantly, in future iterations of this work this topic will be tackled in detail. 5.2
Four Robots and Twenty Tasks
The first scenario to be tested was the four robots scenario, in this test 20 tasks were assigned to the system, of these tasks three of them can only be assigned to a specific robot. After the test was executed 16 times (enough to obtain a trustworthy average), the results were analysed and are summarised in Table 2. Table 2. Table with the summarised results from the first scenario Method
Best cost Worst cost Mean cost Mean efficiency (SA)
SA
13030,4
14089,7
Kmeans 16691,9 Random 16498,5
13574,6
———-
17693,2
17139,5
20,79%
16925,7
16739,3
18,91%
As expected the implemented Simulated Annealing algorithm generated and average improvement of 20,79% when compared to the Kmeans clustering method and a 18,90% improvement when compared to a totally random distribution of tasks. The results of the random distribution method were surprising, although they do show that, even with only four robots, when the distribution is optimised considering only the shortest distance between tasks it tends to create more planning conflicts and consequently generate more costly paths, since even due the overall distance travelled by the robots tends to be minimised, the robots tend to take longer to execute their tasks due to the necessity of waiting for the shared resource’s to be freed. All three attribution methods tested were capable of generating solutions that respected all the system restrictions. In this scenario the Simulated Annealing took on average 442,5 s (slightly less than seven and a half minutes) to generate a solution.
Multiple Mobile Robots Scheduling Based on Simulated Annealing
199
The Simulated Annealing algorithm was also tested in terms of its conversion rate when applied to this scenario, the results of said test are represented in Fig. 6. These results were generated by changing the cooling rate value in order to increase or decrease the time it took the algorithm to generate a viable solution. From the results of this test it is possible to conclude that using a time interval superior to 400 s would be more than adequate for this scenario.
Fig. 6. Graph representation of the results obtained from the conversion rate tests
5.3
Eight Robots and Forty Tasks
The second scenario was the eight robots scenario, in this test 40 tasks were assigned to the system, of these tasks four of them can only be assigned to a specific robot. Similarly to the previous one this test was also executed 16 times to ensure the consistency of the results. The results were analysed and are represented in Table 3. Table 3. Table with the summarised results from the second scenario Method
Best cost Worst cost Mean cost Mean efficiency (SA)
SA
14112
15642,3
14743,3
———-
Kmeans 18303,1
19810,9
19072,7
22,68%
Random 18575,6
19424,1
18894,9
21,97%
In this scenario the Simulated annealing algorithm took in average 881,4 s (around fifteen minutes), this is roughly double the time taken in the previous
200
D. Matos et al.
test, this was expected since the complexity of the problem was also significantly increased in this scenario. The overall efficiency of the improvement added, by the Simulated Annealing algorithm, to the solution also suffered an increase, this was also expected given the a higher probability of occurring pathing conflicts, in this scenario.
Fig. 7. Graph representation of the results obtained from the conversion rate tests in the eight robot scenario
Similarly to the previous scenario the convergence rate of the Simulated Annealing algorithm was also analysed, the results from this analysis are represented in Fig. 7. In this scenario the algorithm requires a larger time interval until the solution cost reaches a stable value. Given the larger complexity of this scenario this increase was expected. Therefore, in order to obtain good results when using this algorithm in a eight robot system, the time interval available for the algorithm to optimise the task attribution should be larger than 1000 s. Analysing both flowcharts Figs. 6 and 7, it is possible to ascertain that the conversion time does not behave in a linear fashion when the problem is scaled.
6
Conclusions
In this work, it was presented a study on the implementation of the Simulated Annealing algorithm to optimise the assignment of tasks in a multi-AGV system. This implementation uses an estimate of the paths planned for the robots, provided by Time Enhanced A * (TEA *), to minimise the cost of time and distance to perform tasks assigned to the system, taking into account possible path conflicts that may occur during tasks execution. This article also compares
Multiple Mobile Robots Scheduling Based on Simulated Annealing
201
the performance of this method with the results obtained from the minimisation of the travelled distance without taking into consideration the path estimation. The results show, in the two scenarios implemented (four robots with twenty tasks, three of which are restricted; eight robots with forty tasks, four of which are restricted), that the implemented algorithm (Simulated annealing algorithm) has an average improvement of at least 22.68% (20.79% in the scenario of four robots), when compared to kmeans and an average improvement of at least 21.97% (18.91% in the scenario of four robots), when compared with a totally random algorithm. In this work loading and unloading of the robot happens instantly, in future work this topic will be addressed in more detail. In future iterations of this work the efficiency of other optimisation methodologies will also be studied. This studies will be used as the foundations for the creation of a task scheduling module, capable of optimising the task attribution while being sensitive to the available time. Acknowledgements. This work is financed by National Funds through the Portuguese funding agency, FCT - Funda¸ca ˜o para a Ciˆencia e a Tecnologia within project UIDB/50014/2020.
References 1. Siefke, L., Sommer, V., Wudka, B., Thomas, C.: Robotic systems of systems based on a decentralized service oriented architecture. Robotics 9, 78 (2020). https://doi. org/10.3390/robotics9040078 2. Kuhn, K., Loth, S.: Airport Service Vehicle Scheduling, Eighth USA/Europe Air Traffic Management Research and Development Seminar (ATM2009) (2009) 3. Lawer, E., Lenstra, J., Rinnooy, A.K., Shmoys, D.: The Travelling Salesman Problem. Wiley, Chichester (1985) 4. Lindholm, P., Giselsson, N.-H., Quttineh, H., Lidestam, C., Johnsson, C., Forsman, K.: Production scheduling in the process industry. In: 22nd International Conference on Production Research (2013) 5. Wall, M.B.: Genetic Algorithm for Resource-Constrained Scheduling. Ph.D., Massachusetts Institute of Technology (1996) 6. Baar, T., Brucker, P., Knust, S.: Meta-heuristics: Advances and Trends in Local Search Paradigms for Optimisation, vol. 18 (1998) 7. Vivaldini, K., Rocha, L.F., Martarelli, N.J., et al.: Integrated tasks assignment and routing for the estimation of the optimal number of AGVS. Int. J. Adv. Manuf. Technol. 82, 719–736 (2016). https://doi.org/10.1007/s00170-015-7343-4 8. Zhang, Y., Parker, L.E.: Multi-robot task scheduling. In: 2013 IEEE International Conference on Robotics and Automation, Karlsruhe, Germany, pp. 2992–2998 (2013). https://doi.org/10.1109/ICRA.2013.6630992 9. Zanlongo, S.A., Abodo, F., Long, P., Padir, T., Bobadilla, L.: Multi-robot scheduling and path-planning for non-overlapping operator attention. In: 2018 Second IEEE International Conference on Robotic Computing (IRC), Laguna Hills, CA, USA, pp. 87–94 (2018). https://doi.org/10.1109/IRC.2018.00021
202
D. Matos et al.
10. Crandall, J.W., Cummings, M.L., Della Penna, M., de Jong, P.M.A.: Computing the effects of operator attention allocation in human control of multiple robots. IEEE Trans. Syst. Man Cybern. Part A Syst. Hum. 41(3), 385–397 (2011). https:// doi.org/10.1109/TSMCA.2010.2084082 11. Cummings, M.L., Mitchell, P.J.: Operator scheduling strategies in supervisory control of multiple UAVs. Aerospace Sci. Technol. 11(4), 339–348 (2007) 12. LaValle, S.M., Hutchinson, S.A.: Optimal motion planning for multiple robots having independent goals. IEEE Trans. Robot. Autom. 14(6), 912–925 (1998). https:// doi.org/10.1109/70.736775 13. Wang, H., Chen, W., Wang, J.: Coupled task scheduling for heterogeneous multirobot system of two robot types performing complex-schedule order fulfillment tasks. Robot. Auton. Syst. 131, 103560 (2020) 14. Kumanan, P.U.S.: Task scheduling of AGV in FMS using non-traditional optimization techniques. Int. J. Simul. Model. 9(1), 28–39 (2010) 15. Mudrova, L., Hawes, N.: Task scheduling for mobile robots using interval algebra. In: 2015 IEEE International Conference on Robotics and Automation (ICRA), Seattle, WA, USA, pp. 383–388 (2015). https://doi.org/10.1109/ICRA. 2015.7139027 16. Zhong, M., Yang, Y., Dessouky, Y., Postolache, O.: Multi-AGV scheduling for conflict-free path planning in automated container terminals. Comput. Ind. Eng. 142, 106371 (2020) 17. Lihi, Z.-M., Pietro, P.: Self-Tuning Spectral Clustering, Computational Vision Caltech 18. Rani, S., Kholidah, K.N., Huda, S.N.: A development of travel itinerary planning application using traveling salesman problem and k-means clustering approach. In: Proceedings of the 2018 7th International Conference on Software and Computer Applications (ICSCA 2018), New York, NY, USA, pp. 327–331. Association for Computing Machinery (2018). https://doi.org/10.1145/3185089.3185142 19. Olmi, R., Secchi, C., Fantuzzi, C.: Coordination of multiple AGVs in an industrial application, pp. 1916–1921 (2008). https://doi.org/10.1109/ROBOT.2008.4543487
Multi AGV Industrial Supervisory System Ana Cruz1(B) , Diogo Matos2 , Jos´e Lima2,3 , Paulo Costa1,2 , and Pedro Costa1,2 1 2
Faculty of Engineering, University of Porto, Porto, Portugal [email protected], {paco,pedrogc}@fe.up.pt INESC-TEC - INESC Technology and Science, Porto, Portugal [email protected] 3 Research Centre of Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal [email protected]
Abstract. Automated guided vehicles (AGV) represent a key element in industries’ intralogistics and the use of AGV fleets bring multiple advantages. Nevertheless, coordinating a fleet of AGV is already a complex task but when exposed to delays in the trajectory and communication faults it can represent a threat, compromising the safety, productivity and efficiency of these systems. Concerning this matter, trajectory planning algorithms allied with supervisory systems have been studied and developed. This article aims to, based on work developed previously, implement and test a Multi AGV Supervisory System on real robots and analyse how the system responds to the dynamic of a real environment, analysing its intervention, what influences it and how the execution time is affected.
Keywords: Multi AGV coordination implementation
1
· Time enhanced A* · Real
Introduction
Automated guided vehicle systems (AGVS), a flexible automatic mean of conveyance, have become a key element in industries’ intralogistics, with more industries making use of AGVS since the mid-1990s [13]. These systems can assist to move and transport items in manufacturing facilities, warehouses, and distribution centres without any permanent conveying system or manual intervention. It follows configurable guide paths for optimisation of storage, picking, and transport in the environment of premium space [1]. The use of AGV represents a significant reduction of labour cost, an increase in safety and the sought-after increase of efficiency. By replacing a human worker with an AGV, a single expense for the equipment is paid- the initial investmentavoiding the ongoing costs that would come with a new hire [2]. These systems are also programmed to take over repetitive and fatiguing tasks that could c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 203–218, 2021. https://doi.org/10.1007/978-3-030-91885-9_15
204
A. Cruz et al.
diminish the human worker attention and lead to possible accidents. Therefore, industries that use AGV can significantly reduce these accidents and, with a 24 h per day and 7 days per week operability and high production output, AGV ensure worker safety while maximizing production [3]. Multiple robot systems can accomplish tasks that no single robot can accomplish, since a single robot, no matter how capable it is, is spatially limited [5]. Nevertheless, a multi-AGV environment requires special attention. Coordinating a fleet of AGV is already a complex task and restrict environments with the possibility of exposing the AGV to delays in the trajectory and even communication faults can represent a threat, compromising the safety, productivity and efficiency of these systems. To solve this, trajectory planning algorithms allied with supervisory systems have been studied and developed. Based on the work developed by [8], it is intended to implement and test a Multi AGV Supervisory System on real robots and analyse how the system responds to the dynamic of a real environment. This paper aims to analyse the intervention of the implemented Supervisory Module, what influences it and how the execution time is affected considering other variables such as the robots’ velocity.
2
Literature Review
The system performance is highly connected with path planning and trajectory planning. Path planning describes geometrically and mathematically the way from the starting point to the destination point, avoiding collisions with obstacles. On the other hand, trajectory planning is that path as a function of time: for each time instance, it defines where the robot must be positioned [7]. When choosing a path planning method, several aspects have to be considered such as the type of intended optimisation (path length, execution time), computational complexity and even if it is complete (always finds a solution when it exists), in full resolution (there is a solution to a particular discretisation of the environment) or probabilistically complete (the probability of finding a solution converges to 1 as the time tends to infinity) [7]. When it comes to coordinating a multi-AGV environment, the Time Enhanced A* (TEA*) Algorithm revealed to be very fitted as it is described as a multi-mission algorithm that incrementally builds the path of each vehicle considering the movements of the others [10]. 2.1
TEA* Algorithm
The TEA* Algorithm is a graph search algorithm, based on the A* algorithm, developed by [10]. This approach aims to fulfil industrial needs by creating routes that minimise the time allocated for each task, avoid collisions between AGV and prevent the occurrence of deadlocks. Considering a graph G with a set of vertexes V and edges E (links between the vertexes), with a representation of the time k = [0; TM ax ], each AGV can
Multi AGV Industrial Supervisory System
205
Fig. 1. TEA* algorithm: input map and analysed neighbour cells focusing on the cell with the AGV’s position [11]
only start and stop in vertexes and a vertex can only be occupied by one vehicle at a temporal layer [11]. As it can be seen in Fig. 1, the analysed neighbour cells belong to the next temporal layer and include the cell containing the AGV’s current position. To find the minimal path, the algorithm starts by calculating the position of each robot in each temporal layer and the next analysed neighbour cell is dependent on a cost function. In the TEA* approach, the heuristic function used is the euclidean distance. Hence, in the future, possible collisions can be identified and avoided in the beginning (k = 0) of the paths’ calculation [10]. Since the coordination between robots is essential to avoid collisions and to guarantee the correct execution of the missions, this approach ensures it since the previously calculated paths become moving obstacles [10]. Combining this approach with a supervisory system revealed to be a more efficient approach to avoid collisions and deadlocks [8]. Instead of executing the TEA* methodology as an online method (the paths are re-calculated every execution cycle, a computationally heavy procedure), the supervisory system would detect delays in the communication, deviations in the routes of the robots and communication faults and trigger the re-calculation of the paths, if needed. Therefore, [8] proposed a supervisory system consisting of two modules: Planning Supervision Sub-Module and Communication Supervision Sub-Module.
3
System Overall Structure
To implement and test the work developed by [8], and further modifications, it was set a shop floor map and developed a fleet of three robots and their control module, a localisation system based on the pose estimation of fiducial markers and a central control module. The architecture of the system developed is represented in Fig. 2. The Central Control Module of the system is composed of three hierarchical modules: the Path Planning Module (TEA* Algorithm) and the Supervisory Module: the Planning Supervision and the Communication Supervision.
206
A. Cruz et al. Central Control Module
Communication Supervision
Planning Supervision
Path Planning (TEA* Algorithm)
Robot Localisation Module Robot Control Module
Fig. 2. System architecture and relations between the different modules
The Robot Localisation Module locates and estimates the robot’s coordinates and communicates simultaneously with the Central Control Module and the Robot Control Module. Lastly, the Robot Control Module is responsible for calculating and delivering through UDP packets the most suitable velocities for each robots’ wheel, depending on the destination point/node indicated by the Central Control Module. The communication protocol used, UDP (User Datagram Protocol), is responsible for establishing low-latency and loss-tolerating connections between applications on the internet. Because it enables the transfer of data before an agreement, provided by the receiving party, the transmissions are faster. As a consequence, UDP is beneficial in time-sensitive communications [12]. 3.1
Robot Localisation Module
To run the system, the current coordinates, X and Y, and orientation, Theta, of the robots were crucial. Suitable approaches would be odometry or even an Extended Kalman Filter localisation using beacons [4]. However, for pose estimation, the Robot Localisation Module applies a computer vision algorithm. For this purpose, a camera was set above the centre of the shop floor map and the robots were identified with ArUco markers [6,9], as represented in Fig. 3. The ArUco marker is a square marker characterised by a wide black border and an inner binary matrix that determines its identifier. Using the ArUco library developed by [9] and [6] and associating an ArUco tag id to each robot, it was possible to obtain the coordinates of the robots’ positions with less than 2 cm of error. However, the vision algorithm revealed to be very sensitive to poor
Multi AGV Industrial Supervisory System
207
Fig. 3. Robot localisation module: computer vision algorithm for pose estimation through the detection and identification of ArUco markers
illumination conditions and unstable regarding non-homogeneous lighting. The size of the tag used was 15 per 15 cm with a white border of 3.5 cm. The Robot Localisation Module was able to communicate with the Central Control Module and the Robot Control Module through UDP messages. Each UDP message carried the positions of all robots detected and one message was sent every 170 ms (camera frame rate plus vision algorithm processing time). 3.2
Robot Control Module
The communication between the Central Control Module, constituted by the Path Planning Module (TEA* Algorithm) and the Supervisory Module, and the Robot Control Module is established through UDP messages. After the paths are planned, the information is sent to the Robot Control Module through UDP packets. Each packet has the structure represented in Fig. 4.
Fig. 4. Communication between central control module and robot control module: UDP packet structure
The heading of the packet, highlighted in yellow, carried the robot id (N), the priority of the robot (P) and the number of steps that the packet contained (S). Consequently, the body of the packet, highlighted in green, contained the information of the S steps. This information was organised by the number of the step (I), the coordinates X and Y and the direction D (that was translated into an angle in radians inside the trajectory control function). The ending of the packet, highlighted in blue, indicates if the robot has reached the destination and carried a termination character. The indicator T0 or T1 informed if the
208
A. Cruz et al.
robot’s current position was the final destination (T1 if yes, T0 if not) as a form of reassurance. When a robot finished its mission, the UDP packet sent would not contain any steps (S0), therefore it did not contain any information on its body. In this way, the indicator T0 or T1 assures the ending of the mission. Lastly, the character F was the termination character chosen to indicate the end of the packet. It is important to refer that, even if the communication between the Central Control Module and the Robot Control Module is shut down, the robots are capable of continuing their paths until reaching the last step of the last UDP packet received. This property is important when communication faults may exist. Thus, the mission is not compromised if the Central Control Module loses communication with the robot. After decoding the received packet, the robot’s control is done through the calculation of the most suitable velocity for each wheel for each step’s X and Y coordinates and direction/Theta angle. That operation is done through the function represented by the diagram in Fig. 5.
Rotate
abs(erro_theta) < MAX_ETF
Go_Foward
erro_dist < DIST_DA
erro_dist > DIST_NEWPOSE
erro_dist < TOL_FINDIST
De_Accel
erro_dist < TOL_FINDIST
Final_Rot
abs(erro_theta_f) < THETA_DA (abs(erro_theta_f) > THETA_NEWPOSE) or (erro_dist > DIST_NEWPOSE) Stop
Fig. 5. Robot trajectory control: diagram of the velocity control function
Multi AGV Industrial Supervisory System
209
In each stage of the diagram, the linear and angular velocities are calculated accordingly. The velocity for each wheel/motor is calculated through Eqs. 1 and 2, where b represents the distance between both wheels.
3.3
M 0Speed := linearvelocity +
angularvelocity · b 2
(1)
M 1Speed := linearvelocity −
angularvelocity · b 2
(2)
Robots’ Architecture
To validate the proposed robot orchestration algorithm, three differential mobile robots were developed, as a small scale of an industrial Automated Guided Vehicle, AGV. Each one measures 11 cm length by 9 cm width, as presented in Fig. 6. The robot was produced through additive manufacturing using a 3D printer.
Fig. 6. Example of the robot developed to perform tests: Small scale AGV, powered by three Li-Ion batteries that supply an ESP32 microcontroller and stepper motor drivers
Each robot is powered by three Li-Ion MR18650 batteries, placed on the top of the robot, that supply the main controller board based on an ESP32 microcontroller and the stepper motor drivers DRV8825. The ESP32 owns the WiFi connection that allowed it to communicate with the central system. The main architecture of the small scale AGV is presented in Fig. 7. A push-button Power switch controller is used to turn the system off when batteries are discharged avoiding damaging them. A voltage divider is applied so that the microcontroller measures the battery voltage. The communication between the Robot Control Module and each robot is also done using UDP packets and it sends commands to the motors while receiving information about the odometry (steps). To avoid slippage, a circular rubber
210
A. Cruz et al.
L Wheel
Stepper motor NEMA
DRV8825
DRV8825
Stepper motor NEMA
R Wheel
ESP32
3x 18650
Vbat
Off control
Push-button Power Switch
Fig. 7. Robot architecture’s diagram: Black lines represent control signals and red lines represent power supply. (Color figure online)
is placed on each wheel. Beyond the two wheels, a free contact support of Teflon with low friction is used to support the robot. 3.4
Central Control Module
As explained previously, the Central Control Module is the main module and the one responsible for running the TEA* algorithm with the help of its supervisory system. Supervisory System. The supervisory system proposed by [8] is responsible for deciding when to re-plan the robots’ paths and for detecting and handling communications faults through two sub-modules hierarchically related with each other: these modules are referred to as the Planning Supervision Sub-Module and the Communication Supervision Sub-Module. In environments where no communication faults are present, the Planning Supervision Sub-Module is responsible for determining when one of the robots is delayed or ahead of time (according to the path planned by the TEA* algorithm) and also detect when a robot has completed the current step of its path. On the other hand, the Communication Supervision Sub-Module is only responsible for detecting communication faults. When a communication fault is detected, the Planning Supervision Sub-Module is overruled and the recalculation of the robots’ paths is controlled by the Communication Supervision Sub-Module. Once the communication is reestablished, the supervision is returned to the Planning Supervision Sub-Module.
Multi AGV Industrial Supervisory System
211
In the Central Control Module, after the initial calculation of the robot’s paths, done by the Path Planning Module, the Planning Supervision Module is responsible for checking three critical situations that can lead to collisions and/or deadlocks: – If a robot is too distant from its planned position; – If the maximum difference between steps is 1; – If there is a robot moving into a position currently occupied by other. All these situations could be covered in only one: verifying when the robots become unsynchronised. If the robots are not synchronised, it means that each robot is at a different step of the planned path, which can lead to collisions and deadlocks. However, triggering the supervisory system by this criterion may lead to an ineffective system where the paths are constantly being recalculated. In the next section are described the tests performed to study the impact of the supervisor and, consequently, how the re-planning of the robot’s path affects the execution’s time and the number of tasks completed and what influences the supervisor.
4
Experiments and Results
The shop floor map designed is presented in Fig. 8. This map was turned into a graph with links around the size of the robot plus a safety margin, in this case, the links measure, approximately, 15 cm.
Fig. 8. Shop floor map designed to validate the work developed
The decomposition of the map was done using the Map Decomposition Module, developed by [8], and incorporated in the Central Control Module through an XML file. To test the Planning Supervision Sub-Module and its intervention, it was assigned a workstation to each robot as written in Table 1. After reaching the workstation, each robot moves towards the nearest rest station, which is any other station that is not chosen as a workstation. In Fig. 9, it is possible to observe the chosen workstations in blue and the available rest stations in red.
212
A. Cruz et al. Table 1. Assigned tasks for Test A Robot ID Robot station Workstation Rest station 1
No 8
No 6
No 7
2
No 2
No 4
No 3
3
No 7
No 9
No 10
Fig. 9. Shop floor skeleton graph with the workstations selected for the following tests in blue (Color figure online)
The following tests aimed to evaluate how many times the supervisor had to intervene and which situations triggered it the most. It was expected that the paths were re-calculated more times when the Supervisory System was triggered upon every delay (Test B), instead of re-calculating the paths only on those critical situations (Test A). It was also intended to evaluate if the nominal velocity could influence the re-planning of the paths (Test C). It was expected a decrease in the number of times the supervisor had to intervene, due to a more similar step execution time between the robots (less delays). Initially, the nominal linear velocity and the nominal angular velocity set in the Robot Control Module was of 800 steps/s (that correspond to 4.09 cm/s) and 100 rad/s, respectively. Before running the algorithm, it was already possible to predict a critical situation. Since robot number 1 and number 3 have part of their paths in common, the TEA* algorithm defined steps of waiting to prevent the collision of robot number 1 with robot number 3. However, if robot number 3 suffered any delay, robot number 1 could still collide with it. 4.1
Test A
During this test, the Supervisory Module only searched for the three situations, previously mentioned, to re-plan the paths. This mission was executed five times and the results of each sample and the average results are registered in Table 2 and Table 3, respectively. The situations that triggered the Path Supervisory Sub-Module the most were a robot being in a step ahead of time (verified by obtaining the lowest
Multi AGV Industrial Supervisory System
213
current step of the robots and comparing the advanced robot’s coordinates with the ones it would have if it was executing that lower step and noticing that the difference was superior to 10 cm) and the maximum step difference between all robots being superior to one. Table 2. Execution of Test A: supervisory module followed the criteria defined previously # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
1
22
1:50
0
100%
2
23
1:51
0
100%
3
23
1:54
0
100%
4
32
1:47
0
100%
5
21
2:10
0
100%
Table 3. Average values of Test A: supervisory module followed the criteria defined previously
4.2
# Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
5
100%
24.2
2:02
0
Test B
The mission previously described was also tested, with the same velocity conditions, with the Supervisory Sub-Module analysing and acting whenever any robot became out of sync, instead of waiting for any of the other situations to happen. The results of each sample and the average results are registered in Table 4 and Table 5, respectively. Comparing with the previous results, the supervisor was executed an average of 36.6 times, 12.4 times more. However, since the paths were planed again at the slightest delay, robot number 1 and number 3 never got as close as in the first performance. Therefore, this criterion was able to correct the issues before the other situations triggered the supervisor. 4.3
Test C
Focusing on the supervisor tested in Test A (the one that searches for the three critical situations), the nominal velocities of the robots, in the Robot Control Module, were increased by 25%. Therefore, the nominal linear velocity was set at 1000 steps/s and the nominal angular velocity at 125 rad/s. The results are described in Table 6 and Table 7.
214
A. Cruz et al. Table 4. Execution of Test B: Supervisory Module acts upon any delay # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
1
34
1:47
0
100%
2
37
1:52
0
100%
3
37
1:49
0
100%
4
39
1:45
0
100%
5
36
1:50
0
100%
Table 5. Average values of Test B: Supervisory Module acts upon any delay # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
5
100%
36.6
1:49
0
Table 6. Execution of Test C: Nominal Velocities increased by 25% # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
1
25
1:47
0
100%
2
26
1:42
0
100%
3
30
1:40
0
100%
4
25
1:44
0
100%
5
23
1:40
0
100%
Table 7. Average values of Test C: Nominal Velocities increased by 25% # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
5
100%
25.8
1:43
0
Comparing the results with the ones in Test A (Table 2 and Table 3), only the execution time varied. This means that what may cause the delay between the robots is either the time that it takes for a robot to rotate not corresponding to the time that it takes to cross a link (since one step corresponds to crossing from one node to the other but corresponds also to a rotation of 90◦ C) or the links (the distance between two nodes) not having a similar size. Repeating the same test but with the nominal linear velocity at 800 steps/s and the nominal angular velocity at 125 rad/s. The results are in Table 8 and Table 9. The average number of times that the supervisor recalculated the path is lower when the angular velocity is 25% superior. However, increasing too much
Multi AGV Industrial Supervisory System
215
this value would cause new delays (because the time taken by one step of rotating would be less than the time of one step of going forward). The average execution time is also lower, as expected. Table 8. Execution of Test C’: Nominal linear velocity at 800 steps/s and nominal angular velocity at 125 rad/s # Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
1
19
1:47
0
100%
2
21
1:44
0
100%
3
24
1:43
0
100%
4
24
1:42
0
100%
5
24
1:46
0
100%
Table 9. Average values of Test C’: Nominal linear velocity at 800 steps/s and nominal angular velocity at 125 rad/s
4.4
# Supervisor Exec. Time Deadlocks & intervention (min.) Collisions
Tasks completed
5
100%
22.4
1:44
0
Results Discussion
The time taken by the robots to perform their tasks is slightly longer in Test A. This can be justified due to the situations where the supervisor acts on being more critical and resulting in a different path instead of extra steps on the same node (the robot waiting in the same position). For example, in Table 2, the execution time of sample number 5 stands out from the others. This longer performance is justified by the alteration of the path of robot number 1. The addition of extra steps in station number 7, for robot number 1 to wait until robot number 3 has cleared the section, was a consequence of the re-planning done by the supervisor. Even though, in the other samples, it was possible to observe robot number 1 starting to rotate in the direction of station number 7, the robot never moved into that node/station, resulting in a shorter execution time. In sample number 4 of Test A, it was also possible to observe robot number 2 taking an alternative path to reach its rest station. The execution time was not significantly affected but the supervisor had to recalculate the paths 32 times. When it comes to the results of Test B, sample number 4 is also distinct. Even though the supervisor recalculates the paths more frequently, the execution time is a little shorter than on the other samples. This can be a result of the supervisor
216
A. Cruz et al.
being called on simpler situations that do not involve a change of the path and are quickly sorted. In conclusion, it is possible to verify that there is a trade-off between the number of times that the path is calculated (re-calculating the paths frequently can be a computationally heavy procedure) and the mission’s execution time. If the supervisor is only called on critical situations, the algorithm will be executed faster and it will not be as computationally heavy but the robots’ may take longer to perform their missions due to alternative and longer paths. Contrarily, if the paths are re-calculated every time a robot becomes unsynchronised, the most likely situation to happen is the TEA* algorithm adding extra steps on the current node, making the robots wait for each other and, consequently, avoiding longer paths. In Test C, it was evaluated the impact of the robot’s velocity in the number of times the paths were re-calculated. Even though in experiment Test C’, the angular velocity seems to be more fitted, the results are not very different. Therefore, the size of the links should be tested to evaluate their impact on the synchronisation of the robots. For this mission, the trajectory that each robot should have follow, according to the initial calculation done by the TEA* algorithm, is represented in Fig. 10 (rotations are not represented). In most cases, the paths were mainly maintained because the re-calculation only forced the robots to stop and wait until all robots were in sync. However, as described before, in sample number 4 and number 5 of Test A, the trajectories performed were different and can be visualised: Test A Sample number 41 , Test A Sample number 52 , and Test B Sample number 43 .
(a) Steps 1 to 6
(b) Steps 6 and 7
(c) Steps 7 to 10
(d) Steps 10 to 14
(e) Steps 14 to 17
(f) Steps 17 and 18
Fig. 10. Initial path schematic calculated by the Path Planning Module (rotations are not represented)
1 2 3
https://www.youtube.com/watch?v=XeMGC1BlOg8. https://www.youtube.com/watch?v=7tiBd8hPfKE. https://www.youtube.com/watch?v=NmdK5b0vj64.
Multi AGV Industrial Supervisory System
5
217
Conclusions
This article presented the implementation and evaluation of a supervisor under different situations. Through the development of a small fleet of small scale industrial Automated Guided Vehicle and their control and localisation module, it was possible to test the paths planned for them, provided by the Time Enhanced A * (TEA *) algorithm, and how the supervisor had to intervene and recalculate the paths upon different situations always concerning the delays of the robots (that could consequently evolve to collisions and deadlocks). Throughout the executed tests, it was possible to notice that there is a tradeoff between the number of times that the path is calculated and the mission’s execution time. Recalculating frequently the robots’ paths turns the Central Control Module computationally heavy but if the paths are recalculated every time a robot becomes unsynchronised, the most likely situation to happen is the TEA* algorithm adding extra steps on the current node, making the robots wait for each other and, consequently, avoiding longer paths. This results in a shorter robots’ execution time. Meanwhile, only triggering the Supervisor Sub-Module on critical situations might lead to the robots taking longer time to perform their missions due to alternative and longer paths but the Central Control Module would not be as computationally heavy. It was also studied if the robot’s velocity could be the reason for the delays detected by the supervisor. Since the time taken for a robot to go from one step to another should be equal in all situations for all robots, the possibility of the steps that contemplate rotations take a longer time than the steps that only include going forward, had to be considered. However, the results did not show a significant difference meaning that the delays could be caused by links of different sizes. This hypothesis should be addressed in future work. Acknowledgements. This work is financed by National Funds through the Portuguese funding agency, FCT - Funda¸ca ˜o para a Ciˆencia e a Tecnologia within project UIDB/50014/2020.
References 1. Automated Guided Vehicle Market Size, Share & Trends Analysis Report By Vehicle Type, by Navigation Technology, by Application, by End-use Industry, by Component, by Battery Type, by Region, and Segment Forecasts, https://www.grandviewresearch.com/industry-analysis/automated-guidedvehicle-agv-market. Accessed 21 Jan 2021 2. The Advantages and Disadvantages of Automated Guided Vehicles (AGVs). https://www.conveyco.com/advantages-disadvantages-automated-guidedvehicles-agvs. Accessed 21 Jan 2021 3. Benefits of Industrial AGVs in Manufacturing. https://blog.pepperl-fuchs.us/4benefits-of-industrial-agvs-in-manufacturing. Accessed 21 Jan 2021
218
A. Cruz et al.
4. Bittel, O., Blaich, M.: Mobile robot localization using beacons and the Kalman filter technique for the Eurobot competition. In: Obdrˇza ´lek, D., Gottscheber, A. (eds.) EUROBOT 2011. CCIS, vol. 161, pp. 55–67. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21975-7 6 5. Cao, Y.U., Fukunaga, A.S., Kahng, A.: Cooperative mobile robotics: antecedents and directions. Autonom. Robot. 4, 7–24 (1997) 6. Garrido-Jurado, S., Mu˜ noz Salinas, R., Madrid-Cuevas, F.J., Medina-Carnicer, R.: Generation of fiducial marker dictionaries using mixed integer linear programming. Patt. Recogn. 51, 481–491 (2016) 7. Gomes da Costa, P. L.: Planeamento Cooperativo de Tarefas e Traject´ oriasem M´ ultiplos Robˆ os. PhD thesis, Faculdade de Engenharia da Universidade do Porto (2011) 8. Matos, D., Costa, P., Lima, J., Costa, P.: Multi AGV coordination tolerant to communication failures. Robotics 10(2), 55 (2021) 9. Romero-Ramirez, F.J., Mu˜ noz-Salinas, R., Medina-Carnicer, R.: Speeded up detection of squared fiducial markers. Image Vis. Comput. 76, 38–47 (2018) 10. Santos, J., Costa, P., Rocha, L. F., Moreira, A. P., Veiga, G.: Time Enhanced A*: Towards the Development of a New Approach for Multi-Robot Coordination. In: Proceedings of the IEEE International Conference on Industrial Technology, pp. 3314–3319. Springer, Heidelberg (2015) 11. Santos J., Costa P., Rocha L., Vivaldini K., Moreira A.P., Veiga G.: Validation of a time based routing algorithm using a realistic automatic warehouse scenario. In: Reis, L., Moreira, A., Lima, P., Montano, L., Mu˜ noz-Martinez, V. (eds.) ROBOT 2015: Second Liberian Robotics Conference: Advances in Robotics, vol. 2, pp. 81– 92 (2016) 12. UDP (User Datagram Protocol). https://searchnetworking.techtarget.com. Accessed 13 June 2021 13. Ullrich, G.: The history of automated guided vehicle systems. In: Automated Guided Vehicle Systems, pp. 1–14. Springer, Heidelberg (2015). https://doi.org/ 10.1007/978-3-662-44814-4 1
Dual Coulomb Counting Extended Kalman Filter for Battery SOC Determination Arezki A. Chellal1,2(B) , Jos´e Lima2,3 , Jos´e Gon¸calves2,3 , and Hicham Megnafi1,4 1 Higher School of Applied Sciences, BP165, 13000 Tlemcen, Algeria 2 Research Centre of Digitalization and Intelligent Robotics CeDRI, Instituto Polit´ecnico de Bragan¸ca, 5300-252 Bragan¸ca, Portugal {arezki,jllima,goncalves}@ipb.pt 3 Robotics and Intelligent Systems Research Group, INESC TEC, 4200-465 Porto, Portugal 4 Telecommunication Laboratory of Tlemcen LTT, University of Abou Bakr Belkaid, BP119, 13000 Tlemcen, Algeria [email protected]
Abstract. The importance of energy storage continues to grow, whether in power generation, consumer electronics, aviation, or other systems. Therefore, energy management in batteries is becoming an increasingly crucial aspect of optimizing the overall system and must be done properly. Very few works have been found in the literature proposing the implementation of algorithms such as Extended Kalman Filter (EKF) to predict the State of Charge (SOC) in small systems such as mobile robots, where in some applications the computational power is severely lacking. To this end, this work proposes an implementation of the two algorithms mainly reported in the literature for SOC estimation, in an ATMEGA328P microcontroller-based BMS. This embedded system is designed taking into consideration the criteria already defined for such a system and adding the aspect of flexibility and ease of implementation with an average error of 5% and an energy efficiency of 94%. One of the implemented algorithms performs the prediction while the other will be responsible for the monitoring. Keywords: Prediction algorithm · Battery management system · Extended kalman filter · Coulomb counting algorithm · Engineering applications
1
Introduction
Embedded systems are ubiquitous today, but because these systems are barely perceptible, their importance and impact are often underestimated. They are used as sub-systems in a wide variety of applications for an ever-increasing c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 219–234, 2021. https://doi.org/10.1007/978-3-030-91885-9_16
220
A. A. Chellal et al.
diversity of functions [1]. Whether it is a hybrid vehicle, a solar power plant, or any other everyday electrical device (PC, smartphone, drone...), the key element remains the ability to monitor, control and optimise the performance of one or more modules of these batteries, this type of device is often referred to as a Battery Management System (BMS). A BMS is one of the basic units of electrical energy storage systems, a variety of already developed algorithms can be applied to define the main states of the battery, among others: SOC, state of health (SOH) and state of functions (SOF) that allow real-time management of the batteries. For the BMS to provide optimal monitoring, it must operate in a noisy environment, it must be able to electrically disconnect the battery at any time, it must be cell-based and perform uniform charging and discharging across all cells in the battery [2], and the components used must be able to withstand at least the total current drawn by the load [3]. In addition, it must continuously monitor various parameters that can greatly influence the battery, such as cell temperature, cell terminal voltage and cell current. This embedded system must be able to notify the robot using the battery to either stop drawing energy from it, or to go to the nearest charging station. However, in the field of mobile robotics and small consumer devices, such as Smarthpones or Laptops, as there are no requirements regarding the accuracy to which a BMS must be held, the standard approach such as Open Circuit Voltage (OCV) and Coulomb Counting (CC) methods are generally applied, this is mainly due to the fact that the use of more complicated estimation algorithms such as EKF, Sliding Mode and Machine Learning [4,5] requires higher computational power, thus, the most advanced battery management system algorithms reported in the literature are developed and verified by laboratory experiments using PC-based software such as MATLAB and controllers such as dSPACE. As an additional information, the most widely used battery systems in robotics today are based on electrochemical batteries, particularly lithium-ion technologies with polymer as an Electrolyte [6]. This document is devided into 5 sections, the rest of the paper is structured as follow. Section 2 promotes the work already done in this field and highlights the objectives intended throught this work. Section 3 offer a brief algorithm description implemented on the prototype. Section 4, describes the proposed solution for the system, where a block diagram and several other diagrams defining the operating principle are offered. Section 5 provides the results and offer some discussion. Finally, Sect. 5 draws together the main ideas described in this article and outlines future prospects for the development of this prototype.
2
State of the Art Review
Several research teams around the world have proposed different solutions to design an efficient BMS system for lithium-ion batteries. Taborelli et al. have proposed in [7], a design of an EKF and Ascending Extended Kalman Filter (AEKF) algorithms specifically developed for light vehicle categories, such as
DCC-EKF Battery SOC Determination
221
electric bicycles, in which a capacity prediction algorithm is also implemented tackling SOH estimation. The design has been validated by using simulation software and real data acquisition. In [8], Mouna et al. implemented two EKF and sliding mode algorithms in an Arduino board for SOC estimation, using an equivalent first-order battery as a model. Validation is performed by data acquisition from Matlab/Simulink. Sanguino et al. proposed in [9] an alternative design for battery system, where two batteries works alternatively, one of the batteries is charged through solar panels installed on the top of the VANTER mobile robot, while the other one provides the energy to the device. The battery SOC selection is performed following an OCV check only and the SOC monitoring is done by a coulomb counting method. In addition, several devices are massively marketed, these products are used in different systems, from the smallest to the largest. The Battery Management System 4–15S is a BMS marketed by REC, it has the usual battery protections (temperature, overcurrent, overvoltage) [10]. A cell internal DC resistance measurement technique is applied, suggesting the application of a simple resistor equivalent model and an open circuit voltage technique for SOC prediction, and an Coulomb counting technique for SOC monitoring. The device can be operated as a stand-alone unit and offers the possibility of being connected to a computer with an RS-485 for data export. This device is intended for use in solar system. Roboteq’s BMS10x0 is a BMS and protection system for robotic devices developed by Roboteq, it uses a 32-bit ARM Cortex processor and offers the typical features of a BMS, along with Bluetooth compatibility for wireless states checking. It can monitor from 6 to 15 batteries at the same time. Voltage and temperature thresholds are assigned based on the chemical composition of the battery. The SOC is calculated based on an OCV and CC techniques [11]. To the best of the authors’ knowledge, all research in the field of EKFbased BMS is based on bench-scale experiments using powerful softwares, such as MATLAB, for data processing. So far, the constraint of computational power limitation is not really addressed in the majority of scientific papers dealing with this subject. This paper focus on the implementation of an Extended Kalman Filter helped with a Coulomb Counting technique, called DCC-EKF, as a SOC and SOH estimator in ATMEGA328P microcontrollers, the proposed system is self powered, polyvalent to all types of Lithium cells, easy to plug with other systems and take into consideration most of the BMS criteria reported in the literature.
3
Algorithm Description
There are many methods reported in the literature that can give a representation of the actual battery charge [4,5,7,8]. However, these methods vary in the complexity of the implementation and the accuracy of the predicted results over long term use. There is a correlation between these two parameters, as the complexity of an algorithm increases, so does the accuracy of the results. Also, simulation is a very common technique for evaluating and validating approaches and allows for rapid prototyping [1]; these simulations are based on
222
A. A. Chellal et al.
models that are approximations of reality. MATLAB is a modeling and simulation tool based on mathematical models, provided with various tools and libraries. In this section, the two algorithms applied in the development of this prototype will be described and the results of the simulation performed for the extended Kalman filter algorithm will be given. 3.1
Coulomb Counting Method
The Coulomb counting method consist of a current measurement and integration in a specific period of time. The evolution of the state of charge for this method, can be described by the following expression: tn−1 nf I · dt (1) SOC(tn ) = SOC(tn−1 ) + Cactual tn where, I is the current flowing by the battery, Cactual is the actual total storable energy in the battery and nf represents the faradic efficiency. Although this method is one of the most widely used methods for monitoring the condition of batteries and offers the most accurate results if properly initialized, it has several drawbacks that lead to errors. The coulomb counting method is an open-loop method and its accuracy is therefore strongly influenced by accumulated errors, which are produced by the incorrect initial determination of the faradic efficiency, the battery capacity and the SOC estimation error [12], making it very rarely applied on its own. In addition, the sampling time is critical and should be kept as low as possible, making applications where the current varies rapidly unadvisable with this method. 3.2
Extended Kalman Filter Method
Since 1960, Kalman Filter (KF) has been the subject of extensive research and applications, the KF Algorithm estimates the states of the system from indirect and uncertain measurements of the system’s input and output. The general discrete time representation of it, is represented as follow: xk = Ak−1 · xk−1 + Bk−1 · uk−1 + ωk (2) yk = Ck · xk + Dk · uk + υk Where, xk ∈ Rn×1 is the state vector, Ak ∈ Rnxn is the system matrix in discrete time, yk ∈ Rm × 1 is the output, uk ∈ Rm×1 is the input, Bk ∈ Rnxm is the input matrix in discrete time, and Ck ∈ Rm×n is the output matrix in discrete time. ω and υ represents the Gaussian distributed noise of the process and measurement. However, Eq. 2 is only valid for linear systems, in the case of nonlinear systems such as batteries, the EKF is applied to include the non-linear behaviour and to determine the states of the system [14]. The EKF equation has the following form: xk+1 = f (xk , uk) + ωk (3) yk = h(xk , uk) + υk
DCC-EKF Battery SOC Determination
223
Where, Ak =
∂f (xk , uk ) , ∂xk
Ck =
∂h(xk , uk ) ∂xk
(4)
After initialization, the EKF Algorithm always goes through two steps, prediction and correction. The KF is extensively detailed in many references [13–15], we will therefore not focus on its detailed description. The Algorithm 1 summarize the EKF function implemented in each Slave ATMEGA328P microcontroller, the matrices Ak , Bk , Ck , Dk , xk are discussed in Sect. 3.3.
Algorithm 1: Extended Kalman Filter Function initialise A0 , B0 , C0 , D0 , P0 , I0 , x0 , Q and R ; while EKF Called do Ik measurements; Vtk measurements; xˆk = Ak−1 . xk−1 + Bk−1 . Ik−1 ; Pˆk = Ak−1 . Pk−1 . Atk−1 + Q ; Pˆk not diagonal = 0; ˆ k ∈[SOC interval] then if SOC Rt , Rp and Cp updated; end ˆ k ) + VˆP ; Ck = V oc(SOC k Dk = Rt ; Vˆtk = Ck + Dk · Ik ; L = (Ck · Pˆk · Ckt + R); if L = 0 then Kk = Pˆk · Ckt / L; end xk = xˆk + Kk · (Vtk − Vˆtk ); Pk = (I − Kk · Ck ) · Pˆk ; Pk not diagonal = 0; k = k + 1; Result: Send xk end
The overall performance of the filters is set by the covariance matrix P, the process noise matrix Q and the measurement noise R. The choice of these parameters were defined throught experience and empirical experiment and are given by: 0.25 0 1 0 Q= , P = and R = 0.00001 0 0 0 1 Data obtained from discharge tests of different cells simulations were applied to verify the accuracy of this estimator with known parameters and are reported in Sect. 3.4. The EKF Algorithm implemented in the ATMEGA328P microcontrollers has a sampling time of 0.04 s.
224
A. A. Chellal et al.
3.3
Battery Modelling
Two battery models are most often applied, the Electrochemistry model, which gives a good representation of the internal dynamics of the batteries, and the Electrical circuit model, which allows the behaviour of the batteries to be translated into an electrical model and can be easily formulated into mathematical formula. For this study, the second model, considered more suitable for use with a microcontroller, is chosen. The most commonly applied electrical model uses a simple RC equivalent battery circuit model, with two resistors (Rp and Rt ), a capacitor (Cp ), a voltage source (Voc ) and a current flowing through it (I), as shown in Fig. 1. It represents the best trade-off between accuracy and complexity.
Fig. 1. First order equivalent battery model
The terminal voltage denoted as Vt , represents the output voltage of the cell, and is given by Eq. 5. Vt = Voc (SOC) + I · Rt + Vp
(5)
A non-linear relationship exist between SOC and Voc , a representation employing the seventh-order polynomial to fit the overall curve can be expressed and is described with the following relation: Voc (SOC) = 3.4624e−12 · SOC 7 − 1.3014e−9 · SOC 6 + 1.9811e−7 · SOC 5
(6)
−1.5726e−5 · SOC 4 + 6.9733e−4 · SOC 3 − 0.017 · SOC 2 + 0.21 · SOC + 2.7066
The time derivative of Eq. 1 can be formulated as given in Eq. 7, .
I Cactual
(7)
1 1 Vp + I Rp Cp Cp
(8)
SOC = The polarization voltage is given as, .
Vp = −
DCC-EKF Battery SOC Determination
225
From the Eqs. 5, 7 and 8, it is possible to deduce the equation characterising the behaviour of the battery, which is expressed as the following system: ⎧ . 1 ⎪ 0 0 SOC SOC ⎪ ⎪ . = ·I · + Cactual ⎨ 1 0 Rp−1 Vp Vp Cp Cp (9) ⎪
SOC ⎪ ⎪ = poly 1 · ·I + Rt ⎩ Vt Vp Where, poly is the polynomial formula described in Eq. 6. Since the microcontroller processes actions in discrete events, the previous system must be transcribed into its discrete form, which is written as follows, ⎧ .
1 ⎪ 1 0 SOC SOC ⎪ C actual ⎪ . + = · Ik−1 · ⎨ 1 0 exp R−Δt Vp k−1 Vp Cp p Cp (10) ⎪
SOC ⎪ ⎪ poly 1 = · + Rt · Ik ⎩ Vt Vp k From both Eqs. 2 and 10, it is deduced that the current I is the input of the system, the voltage Vt is the output and the matrices Ak , Bk , Ck and Dk matrices are given by:
1 1 0 SOCk poly Cactual t = = = , Dk = Rt Ak = , x , B , C k k 1 k 0 exp R−Δt 1 VPk Cp p Cp
3.4
Simulation Results
Given the large number of articles dealing with the validation of these algorithms [13,16,17], it is however not necessary to dwell on this subject. Nevertheless, a simulation of the algorithm is proposed in this section, in order to confirm the good follow-up of the algorithm according to the chosen parameters.
Fig. 2. (a) overall Simulink model highlighting the Input/Output of the simulation (b) Battery sub-system model
226
A. A. Chellal et al.
The graphical representation of MATLAB/Simulink using graphical blocks to represent mathematical and logical constructs and process flow is intuitive and provides a clear focus on control and observation functions. Although Simulink has been the tool of choice for much of the control industry for many years [18], it is best to use Simulink only for modelling battery behaviour and not for the prediction algorithm. The battery model presented before is applied as a base model, the more complex model will not be able to simulate all possible cases and will therefore increase the time needed for development. Figure 2 represents the battery simulation used in MATLAB/Simulink. Figure 3 shows a comparison of the state of charge of the battery with simulation for the Extended Kalman filter, and a plot of the error with the real and the predicted one. The test consists of a 180 s discharge period followed by a one hour rest period, the cell starts fully charged and the EKF state of charge indicator is set at 50% SOC.
Fig. 3. Estimated and reference SOC comparison with the absolute error of the SOC for Extended Kalman Filter with a constant discharge test and a rest period.
The continuous updating of the correction gain (K), which is due to the continuous re-transcription of the error covariance matrices, limits the divergence as long as the SOC remains within the predefined operating range (80%-40%). The response of the observer to the determination of the SOC can be very fast, on the order of a few seconds. Also, from the previous figure it is clear that, for known parameters, the SOC can be tracked accurately with less than 5% of error, and record a perfect prediction for when the battery is at rest. Figure 4 shows the simulation results of a constant current discharge test. Although a good SOC monitoring by the EKF, it still requires a good determination of the battery parameter. Some reported works [19,20], have proposed the use simple algebraic method or a Dual Extended Kalman Filter (DEKF) as an online parameter estimator, to estimate them on the fly. Unfortunately, these methods require a lot of computational power, to achieve a low sampling time
DCC-EKF Battery SOC Determination
227
Fig. 4. Estimated and reference SOC comparison with the absolute error of the SOC for Extended Kalman Filter with a constant discharge test.
and reach convergence, which is difficult to achieve with a simple ATMEGA328P. For this reason, and given the speed at which the EKF is able to determine the battery SOC at rest, the EKF algorithm is applied to determine the battery SOC at start-up and then the CC algorithm is applied to carry on the estimation.
4
Proposed Solution
The system is designed to be “Plug and Play”, with two energy input and output located on one side only, future users of the product can quickly install and initialize the BMS, which works for all types of Lithium Model 18650 batteries, the initialization part is described in more depth in the next section. The connecting principle of the electronic components is illustrated in Fig. 5. 4.1
Module Connection
The Master microcontroller is the central element of the system, the ATMEL’s ATMEGA328P was chosen for its operational character and low purchase cost, it collect the State of Charge predicted by each ATMEGA328P slave microcontroller and control the energy flow according to the data collected. This microcontroller is connected to push buttons and an OLED screen to facilitate communication with the user. Power is supplied directly from the batteries, the voltage is stabilised and regulated for the BMS electronics by an step down voltage regulator. The Inter-Integrated Circuit (I2C) is a bus interface connection using only 2 pins for data transfer, it is incorporated into many devices and is ideal for attaching low-speed peripherals to a motherboard or embedded system over a short distance, it provides a connection-oriented communication with acknowledge [21]. Figure 6 represent the electronic circuit schematic diagram.
228
A. A. Chellal et al. Charging Station
Robot
Energy input
Energy output
Cell 1 Cell 2 Cell 3 Cell 4
Operational Amplifier
Current measurment
Step-down regulator
Button up
Slave Microcontroller #1
Button enter Master Microcontroller
Slave Microcontroller #2
Button exit
Button down S-8254A Cell Protection Battery Pack
Temperature Sensor
Oled Display
Electronic Board
Fig. 5. Block diagram of the system
The 18650 Lithium cells are placed in the two cell holder (1BH, 2BH). The Oled display (OLED1) is connected via I2C by the Serial Clock and Serial DATA line, called SCL and SDA respectively, the ATMEGA328P microcontroller (MASTER, SLAVE1, SLAVE2) are connected to the I2C wire through pins PC5 and PD4. The current is measured from the ACS712 (U1) and gathered by the slave microcontrollers (SLAVE1, SLAVE2) from the analog pin PC0. A quadruple precision amplifier LM324 (U5) is used to measure the voltage at each cell terminal, with the use of a simple voltage divider. The push buttons are linked to the master microcontroller via the digital pins (PD2, PD3, PB4, PB5), an IRF1405 N-Channel Mosfet is used as a power switch to the load (mobile robot) while an IRF9610 P-Channel Mosfet is used as a power switch from the power supply, they are controlled from master ATMEGA328P pins PB3 and PB2 respectively. A step down voltage regulator is applied to regulate the voltage supplied to the electronics to 5V, this power is either gathered from the battery pack or the power supply. 4.2
Operating Principle
This system is mainly characterised by two modes, the initialisation mode and the on-mode, these two modes are very dependent on each other and it is possible to switch from one mode to the other at any time using a single button. Figure 7 briefly summarizes the operation principale for both modes.
DCC-EKF Battery SOC Determination
229
Fig. 6. Schematic diagram of the electronic circuit
Because the characteristics between the batteries are not uniform, and can vary greatly, and in order to achieve high accuracy of SOC prediction, the initialization mode is introduced into the system, it is possible to skip this mode and ignore it, but at the cost of reduced accuracy. Through this mode it is possible to enter the capacity of the batteries installed, the actual SOC to ensure a more accurate result, as well as to activate an additional protection to limit further the discharges and the use or not of the EKF algorithm. As for the on mode, according to what was initialize, the BMS begins by carrying out the assigned tasks for each battery cell in parallel. – If the EKF prediction was set on during the initialization mode, the device shall begin the prediction of the actual SOC value for each cell, and prohibits the passage of current other than that which powers the BMS for a period of approximately 3 min (Fig. 7). – If the EKF prediction was set off during the initialization mode, and an SOC Value was introduced, the device allows the current to flow directly, and start the SOC monitoring according to the chosen value. – If the Protection was set off, the battery will be discharged and charged even deeper, taking the risk of shorten the life span of the batteries.
230
A. A. Chellal et al. 2
Begin of Initialisation mode
EKF function, Does not allow (dis)charge 1
Display menu
3 minutes
Arrow Navigation (UP & DOWN) buttons
Allow (dis)charge, Coulomb Counting function
1- Initialisation of cell capacity
2- (Des)activate the EKF
3- Enter Manualy the SOC
4- (Des)activate the cell protection
5- Finish Initialisation
SOCmin < SOC < SOCmax
Selected ?
Selected ?
Selected ?
Selected ?
Selected ?
Calculate R0
Yes
Yes
No
Yes
Selection of the value
Yes/No
Value selected ?
Choice selected ?
Yes
Yes
Yes Yes/No
Value selected ?
Choice selected ?
Yes
SOC< SOCmin
No
Yes
Send data to the slave µ-controller
Selection of the value
Yes
Yes
Does not allow discharge
Does not allow charge Yes
2
Yes "T" passed
(a)
(b)
Fig. 7. Flow chart of the system algorithm. (a) Initialisation mode flow chart. (b) On-mode flow chart with EKF algorithm activated.
The battery states are determined for each cell independently of the others by a specific microcontroller assigned to it, and works with the principle of Master/Slave communication. In order to keep a low sampling time, one slave microcontroller is assigned to two batteries, reaching a sampling time of 0.085 s.
5
Results and Discussions
The result is the design of a BMS that takes into account the already established requirements for this type of system and defines new ones, such as flexibility and size, that must be met for mobile robots. A breadboard conception was first carried out to perform the first tests. After power up, the initialisation mode is first started as expected. After that, while the on-mode is running, the voltage, current and SOC data are displayed on the screen, an accuracy of 100 mV and 40 mA is achieved. When the cell is at rest and for a SOC ∈ [80% − −40%], the EKF prediction reaches an error of 5% in the worst case, for SOC cells above 80% the accuracy drops to 8%, while for SOC below 30% the algorithm diverges completely (Fig. 10). These results are quite understandable, as the linearization of these curves is done in only 10 points. A cell protection is performed by an external circuit based on a S-8254A, it includes a high accuracy voltage detection for lithium battery, avoiding over voltage while charging the batteries, they are widely applied in rechargeable battery pack, due to their low costs and good caracteristics [22].
DCC-EKF Battery SOC Determination
231
The total storable power offered by this model varies according to the capacity of the installed cells. It is clear that the use of 4 lithium cells of 2200 mAh, gives the system a battery capacity of 8800 mAh which is sufficient in the majority of small robots application, it should be noted that it is also possible to implement the 5500 mAh cell, giving the product developed great flexibility by offering the possibility of choosing the battery capacity to users. The maximum current that can be delivered is 2 A, and therefore allows to offer a power up to 32 W, which is sufficient to power the electronics of the robot, beyond this value and in order to offer an optimal safety to the battery, a shutdown protocol will stop the discharge of the battery. As for the charging process, the maximum current supplied by an external source is currently 0.5 A, in order to have a good protection when charging the batteries. With such a current, the charging process is slow, in fact it will take 8 h and a half to reach the 80% SOC advised for 4 × 2200 mAh cells. Figure 8 shows the breadboard circuit.
Fig. 8. Breadboard circuit
The BMS electronics consume in average 1.15 W, giving the product an efficiency of 96.15%. While charging the battery, and because a constant charging power is set, the IRF9610 Mosfet leads to a constant loss of power of 0.52W, the efficiency then reaches 90.38%. For discharging the battery, as the regulation of the voltage supplied to the robot is left to the user and is done with a variable current, it is difficult to define with precision the efficiency of this device, it can however reach 2.5%, which makes the total efficiency to be 93.60%. Thus, in general the average efficiency of this product is 94.37%. Figure 9 shows a printed circuit representation of the proposed prototype.
232
A. A. Chellal et al.
Fig. 9. Printed Cirduit Board of the prototype. (a) componants view. (b) top view.
Fig. 10. On-mode display of cells 1, 2 and 3 with a SOC value of 9.51%, 77.25% and 71.10% respectively. (a) Average SOC of the first 50 iteration. (b) Few seconds after. (c) approximately 1 min after. For cell 1, the algorithm diverges for the SOC estimate. For cell 2, the estimate has reached the SOC value with an error of 1.75%. For cell 3, after 1 min, the prediction has not yet reached the estimated value with an error of 6.90%.
DCC-EKF Battery SOC Determination
233
The SOC values, voltage and current are displayed directly on the Oled screen as shown in Fig. 10. It is possible to display the overall battery status, or cell by cell for a more detailed view. Taking into account that this approach and the algorithm are constantly being improved, not all features such as the SOH and temperature are fully integrated.
6
Conclusion and Future Work
This paper proposes the DCC-EKF approach where the state of charge is first predicted using an EKF algorithm, after which the SOC is given to the Columbus measurement algorithm to monitor this quantity. Most commercial products only use the OCV to initially predict the SOC, a technique that is widely implemented, but is severely inaccurate, especially when the BMS is powered directly from the batteries, so the batteries never reach a resting state. The balancing and overvoltage protection of the BMS is provided by an external circuit based on the S-8245A module. The proposed BMS is small (10 cm × 15 cm), easy to use and has shown accurate SOC prediction with an error of 5% and good performance in noisy operation. The prototype also offers a good efficiency of about 93%. Future developments will focus on implementing a more accurate state of charge prediction algorithm, such as DEKF and AEKF, as well as a more accurate health prediction algorithm, while aiming to make it more user-friendly and improve the user experience. The temperature effect will also be addressed in future versions, as it is actually neglected, as well as the increase of the product efficiency. In addition, it is considered to Implement a Learning Algorithm, to further enhance the prediction accuracy, with a fast charging feature.
References 1. Marwedel, P.: Embedded Systems Foundations of Cyber-Physical Systems, and the Internet of Things. Springer Nature (2021) 2. Park, K.-H., Kim, C.-H., Cho, H.-K., Seo, J.-K.: Design considerations of a lithium ion battery management system (BMS) for the STSAT-3 satellite. J. Power Electron. 10(2), 210–217 (2010) 3. Megnafi, H., Chellal, A.-A., Benhanifia, A.: Flexible and automated watering system using solar energy. In: International Conference in Artificial Intelligence in Renewable Energetic Systems, pp. 747–755. Springer, Cham, Tipaza (2020). https://doi.org/10.1007/978-3-030-63846-7 71 4. Xia, B., Lao, Z., Zhang, R., et al.: Online parameter identification and state of charge estimation of lithium-ion batteries based on forgetting factor recursive least squares and nonlinear Kalman filter. Energies 11(1), 3 (2018) 5. Hannan, M.A., Lipu, M.H., Hussain, A., et al.: Toward enhanced State of charge estimation of Lithium-ion Batteries Using optimized Machine Learning techniques. Sci. Rep. 10(1), 1–15 (2020) 6. Thomas, B.-R.: Linden’s Handbook of Batteries, 4th edn. McGraw-Hill Education, New York (2011)
234
A. A. Chellal et al.
7. Taborelli, C., Onori, S., Maes, S., et al.: Advanced battery management system design for SOC/SOH estimation for e-bikes applications. Int. J. Powertrains 5(4), 325–357 (2016) 8. Mouna, A., Abdelilah, B., M’Sirdi, N.-K.: Estimation of the state of charge of the battery using EKF and sliding mode observer in Matlab-Arduino/LabView. In: 4th International Conference on Optimization and Applications, pp. 1–6. IEEE, Morocco (2018) 9. Sanguino, T.-D.-J.-M., Ramos, J.-E.-G.: Smart host microcontroller for optimal battery charging in a solar-powered robotic vehicle. IEEE/ASME Trans. Mechatron. 18(3), 1039–1049 (2012) 10. REC-BMS.: Battery Management System 4–15S. REC, Control your power, Slovenia (2017) 11. Robote, Q.: BMS10x0, B40/60V, 100 Amps Management System for Lithium Ion Batteries. RoboteQ, USA (2018) 12. Kim, I.-S.: A technique for estimating the state of health of lithium batteries through a dual-sliding-mode observer. IEEE Trans. Power Electron. 25(4), 1013– 1022 (2009) 13. Mastali, M., Vazquez-Arenas, J., Fraser, R.: Battery state of the charge estimation using Kalman filtering. J. Power Sources 239, 294–307 (2013) 14. Campestrini, C., Heil, T., Kosch, S., Jossen, A.: A comparative study and review of different Kalman filters by applying an enhanced validation method. J. Energ. Storage 8, 142–159 (2016) 15. Bishop, G., Welch, G.: An introduction to the kalman filter. In: Proceedings of SIGGRAPH, Course. Proceedings of SIGGRAPH, vol. 41, pp. 27599–23175 (2001) 16. Campestrini, C., Horsche, M.-F., Zilberman, I.: Validation and benchmark methods for battery management system functionalities: state of charge estimation algorithms. J. Energ. Storage 7, 38–51 (2016) 17. Yuan, S., Wu, H., Yin, C.: State of charge estimation using the extended Kalman filter for battery management systems based on the ARX battery model. Energies 6(1), 444–470 (2013) 18. Marian, N., Ma, Y.: Translation of simulink models to component-based software models. In: 8th International Workshop on Research and Education in Mechatronics, pp. 262–267. Citeseer, Location (2007) 19. Hu, T., Zanchi, B., Zhao, J.: Determining battery parameters by simple algebraic method. In: Proceedings of the 2011 American Control Conference, pp. 3090–3095. IEEE, San Francisco (2011) 20. Xu, Y., Hu, M., Zhou, A., et al.: State of charge estimation for lithium-ion batteries based on adaptive dual Kalman filter. Appl. Math. Modell. 77(5), 1255–1272 (2020) 21. Mazidi, M.-A., Naimi, S., Naimi, S.: AVR Microcontroller and Embedded Systems. Pearson, India (2010) 22. ABLIC INC.: S-8254A Series Battery Protection IC for 3-Serial- or 4-Serial-CELL Pack REV.5.2. ABLIC, Japan (2016) 23. Chatzakis, J., Kalaitzakis, K., Voulgaris, C., Manias, N.-S.: Designing a new generalized battery management system. IEEE Trans. Ind. Electron. 50(5), 990–999 (2003) 24. Chen, L., Xu, L., Wang, R.: State of charge estimation for lithium-ion battery by using dual square root cubature kalman filter. Mathematical Problems in Engineering 2017 (2017)
Sensor Fusion for Mobile Robot Localization Using Extended Kalman Filter, UWB ToF and ArUco Markers S´ılvia Faria1(B) , Jos´e Lima2,3 , and Paulo Costa1,3 1
3
Faculty of Engineering, University of Porto, Porto, Portugal {up201603368,paco}@fe.up.pt 2 Research Centre of Digitalization and Intelligent Robotics, Instituto Polit´ecnico de Bragan¸ca, Bragan¸ca, Portugal [email protected] INESC-TEC - INESC Technology and Science, Porto, Portugal
Abstract. The ability to locate a robot is one of the main features to be truly autonomous. Different methodologies can be used to determine robots location as accurately as possible, however these methodologies present several problems in some circumstances. One of these problems is the existence of uncertainty in the sensing of the robot. To solve this problem, it is necessary to combine the uncertain information correctly. In this way, it is possible to have a system that allows a more robust localization of the robot, more tolerant to failures and disturbances. This paper evaluates an Extended Kalman Filter (EKF) that fuses odometry information with Ultra-WideBand Time-of-Flight (UWB ToF) measurements and camera measurements from the detection of ArUco markers in the environment. The proposed system is validated in a real environment with a differential robot developed for this purpose, and the achieved results are promising. Keywords: ArUco markers · Autonomous mobile robot · Extended kalman filter · Localization · Ultra-WideBand · Vision based system
1
Introduction
In a semi-structured environment a mobile robot needs to be able to locate itself without human intervention, i.e. autonomously. It can be assumed that if the robot knows its own pose (position and orientation), it can be truly autonomous to execute given tasks. Since the first mobile robot was invented, the problem of pose determination has been addressed by many researches and developers around the world due to its complexity and the multitude of possible approaches. The localization methods can be classified in two great categories: relative methods and absolute methods [1]. Relative localization methods gives the robot’s pose relative to the initial one and for this purpose dead reckoning methods such as odometry and inertial navigation are used. Odometry is a technique c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 235–250, 2021. https://doi.org/10.1007/978-3-030-91885-9_17
236
S. Faria et al.
in which it is common to use encoders connected to the rotation axes of the robot wheels. Absolute localization methods gives the global pose of the robot and do not need previously calculated poses. In these methods, data from odometry and data from external sensors can be combined to estimate the robot’s pose. In an indoor environment, a mobile robot needs to localize itself accurately due to limited of the space and obstacles present in the space. Today, the number of applications which relay on indoor localization is rapidly increasing and because of this, localization of a robot in an indoor environment has become in an active research area. Global Positioning System (GPS) is usually used actually on outdoor environment, nevertheless the use of GPS in indoor environment is difficult. Due to this, different alternative technologies has been proposed and developed to solve this. Among these technologies that has been proposed, Ultra-WideBand (UWB) is known for its low-cost, high precision and easy deployment. An UWB based localization system can be characterized by an UWB tag present in the robot that can be located by measuring the distance till UWB anchors, whose positions are known. Since UWB based localization systems cannot provide robot orientation information, another way to achieve this information is required. To solve this problem it is possible to use odometry information to achieve the orientation of the robot. Another solutions to locate the robot are based on the visual field, whose aim is to find the correspondence between the real world and the image projection. To achieve this goal, methods based on binary squared fiducial markers have been widely used, such as ArUco markers. This paper presents the data fusion of the odometry information with UWB ToF distance measurements and angle measurements of the ArUco markers relative to the robot’s referential frame. The latter measurements are obtained through a camera installed on the robot that can detect the ArUco markers presented in the environment and whose positions are known. This data fusion is accomplished through the use of an Extended Kalman Filter (EKF). It is used once a non-linear system is being handled. The developed system allows increasing the robustness, the scalability and the accuracy of robot localization.
2
Related Work
Mobile robot localization is one of the key functionalities of a truly autonomous system. This is a complex and challenging problem in robotics field and has been subject of a great research attention over the years. Depending on the type of application and its environment (outdoor or indoor), the choice of technologies and methods used must be made carefully in order to meet the requirements of the application. Due to the existence of various obstacles, indoor environments usually depend on non-line-of-sight (NLOS) propagation in which signals cannot travel directly in straight path from an emitter to a receiver, which causes inconsistent time delays at the receiver. Nowadays, the main approaches to the robot localization problem in indoor environment include:
Sensor Fusion for Mobile Robot Localization
237
– Dead Reckoning (DR): DR can approximately determine robot’s pose using Odometry or Inertial Measurement Unit (IMU) by integration of the pose from encoders and inertial sensors. This is one of the first methodology used to calculate the robot position. Dead reckoning can give accurate information on position, but is subject to cumulative errors over a long distances, in that it needs to utilize the previous position to estimate the next relative one and during which, the drift, the wheel slippage, the uneven floor and the uncertainty about the structure of the robot will together cause errors. In order to improve accuracy and reduce error, DR need to use other methods to adjusts the position after each interval [2]. – Range-Based: Range-Based localization measures the distance and/or angle to a natural or artificial landmarks. High accuracy measurements are critical for in-building applications such as autonomous robotic navigation. Typically, reference points, i.e. anchors, and their distance and/or angle to one or more nodes of interest are used with in order to estimate a given pose. These reference points are normally static or with an a priori map. There are several methods that are used to perform the distances and angles calculations: Angle of Arrival (AoA), Time of Flight (ToF), Time Difference of Arrival (TDoA) and Received Signal Strength Indication (RSSI) [4]. The robot’s position can be calculated with various technologies such as Ultra-WideBand (UWB) tags, Radio Frequency Identification (RFID) tags, Laser Range Finders. This type of localization is widely used in Wireless Sensors Network Localization. It is important to mention that UWB is a wireless radio technology primarily used in communications that has lately received more attention in localization applications and that promises to outperform many of the indoor localization methods currently available [2]. In [5], the authors proposed a method that uses Particle Filter to fuse odometry with UWB range measurements, which lacks the orientation, to obtain an estimate of the real-time posture of a robot with wheels in an indoor environment. – Visual-Based Systems: These systems can locate a robot by extracting images of its environment using a camera. These systems can be Fiducial marker systems that detect some markers in the environment by using computer vision tools. These systems are useful for Augmented Reality (AR), robot navigation and applications where the relative pose between camera and object is required, due to their high accuracy, robustness and speed [7]. Several fiducial marker systems have been proposed in the literature such as ARSTudio, ARToolkit and ARTag. However, currently the most popular marker system in academic literature is probably the ArUco which is based on ARTag and comes with an OpenSource library OpenCV of functions for detecting and locating markers developed by Rafael Mu˜ noz and Sergio Garrido [6]. In addition, several types of research have been successfully conducted based on this type of system, such as [6,8,9]. All of the aforementioned technologies can be used independently. However they can also be used at the same time in order to combine the advantages of each of them. By the proper fusion of these technologies in a multi-sensor
238
S. Faria et al.
environment a more accurate and robust system can be achieved. For nonlinear systems this fusion can be achieved through developed algorithms such as the Extend Kalman Filter (EKF), the Unscented Kalman Filter (UKF) and the Particle Filter, which are among the most widely used [3]. The presented work uses a combination of odometry, UWB ToF measured distance and ArUco measured angle to compute an accurate pose of a robot, i.e. position and orientation. The combination of the measures mentioned above is achieved by an EKF, since it is the least complex and computationally efficient algorithm.
3
System Architecture
The system architecture proposed for this work, and its data flow is represented in Fig. 1. The system consists of two main blocks: Remote Computer and Real Robot. For all tests performed, a real robot was used and adapted, which was previously developed for other projects.
Fig. 1. System architecture proposed
The robot has a differential wheel drive system and therefore has two drive wheels, which are coupled to independent stepper motors powered by Allegro MicroSystems drivers - A4988, and a castor wheel, which has a support function. The robot sizes 0.31 m × 0.22 m and is powered by an on-board 12 V battery and a DC/DC step-down converter to supply the electronic modules, i.e. a Raspberry Pi 3 Model B and Arduino microcontroller boards. The top level consists of a Raspberry Pi that runs the raspbian operative system and is responsible for receiving data from Pozyx system obtained through the Arduino 2 and receiving data from Arduino 1 that corresponds to the speed and voltage of the motors and battery current. All the data is then send over Wi-Fi to the Remote Computer, where it is performed the Kalman Filter and the appropriate speeds for each wheel are calculated. A Raspberry Pi Camera Module is also connected to the Raspberry that is tasked with acquiring positioning information from the ArUco markers placed in the environment. This information is acquired by a script that runs on the Raspberry Pi and is sent to the Remote Computer via Wi-Fi. A block diagram of the robot architecture is presented in Fig. 2.
Sensor Fusion for Mobile Robot Localization
239
Fig. 2. Mobile Robot architecture
To determine the Ground-Truth of the robot, a camera (Playstation Eye) was placed on the ceiling and in the center of the square where the robot moves, looking down as shown in Fig. 3 (reference frame Xc , Yc , Zc ). This camera is connected to a Raspberry Pi 4 that contains a script and obtains the robot’s pose. In addition, a 13 cm ArUco marker was placed on top of the robot, centered on its center of rotation. By this way, the camera can detect the marker and consequently determine its pose from the aforementioned ArUco library. The pose extracted from the camera is useful for determining the accuracy of the developed system by its comparison.
Fig. 3. Referential frames
4
Problem Formulation
The problem of Robot Beacon-Based Localization (Fig. 4) can be defined as the estimation of the Robot’s pose X = xr yr θr by measuring the distances and/or angles of a given number of beacons, NB , placed in the environment at known positions MB,i = xB,i yB,i , i ∈ 1...NB . X and MB,i are both defined in the global reference frame WX WY .
240
S. Faria et al.
For the specific problem, the following assumptions were made: – Since the robot only navigates on the ground, without any inclinations, it is assumed that the robot navigates on a two-dimensional plane. – The beacons positions, MB,i , are stationary and previously known. – Every 40 ms the odometry values are available. This values will be used to T provide the system input uk = vk ωk and refers to the odometry variation between k and k − 1 instants. – ZB,i (k) = [rB,i ] and ZB,i (k) = [φB,i ], identifies the distance measurement between the Pozyx tag and the Pozyx anchor i, and the angle measurement between the Robot camera and the ArUco marker i, respectively, at the instant k.
Fig. 4. 2D localization given measurements to beacons with a known position
4.1
ArUco Markers
As already mentioned, the system is capable of extracting angle measurements from ArUco markers, arranged in the environment, relative to the referential frame of the robot. Each of the markers has an associated identification number that can be extracted when the marker is detected in an image, which distinguishes each reference point. Using the ArUco library provided, it is possible to obtain the rotation and translation (x, y, z) of the ArUco reference frame to the Camera reference frame (embedded in the robot). This allows to obtain the angle φ from the marker to the robot, to be extracted by the Eq. 1. x (1) φ = atan2( ) z Since the movement of the robot is only in 2D, the height (y) of the marker is ignored when making the calculations, thus having the angle exclusively as a horizontal difference. Note that the camera has been calibrated with a chessboard so that the measurements taken are reliable [12].
Sensor Fusion for Mobile Robot Localization
4.2
241
Extended Kalman Filter Localization
The beacons measurements alone cannot return the location of the robot, so it is necessary to implement an algorithm to obtain this information. For this purpose, it will be used the well-known EKF, which is widely applied on this type of problems. The EKF continuously updates a linearization around the previous state estimation and approximates the state densities by Gaussian densities. It thus allows the fusion between the odometry model and the Pozyx and ArUco measurements, and is divided into two phases. The Prediction phase, which estimates the actual pose by the State Transition Model, and the Correction phase which corrects the prediction state input with the Pozyx distance and ArUco angle measurements in the Observation model. The EKF algorithm is presented in Algorithm 1. State Transition Model. The state transition model, present in Eq. 3, is a probabilistic model that describes the state distribution according to the inputs, in this case the linear and angular velocity of the robot. In addition to the transition function f (Xk , uk ), the noise model N is represented by a Gaussian distribution with zero mean and covariance Q (Eq. 2), assumed constant. 2 σ vk 0 Q= (2) XK+1 = f (Xk , uk ) + N (0, Q) 0 σω2 k ⎤ ⎡ vk · Δt · cos(θk + ωk2·Δt ) (3) f (Xk , uk ) = Xk + ⎣ vk · Δt · sin(θk + ωk2·Δt ) ⎦ ωk · Δt In order to linearize the process, EKF uses the Taylor expansion that introduces uncertainty by calculating both the Jacobian of f with respect to Xk (Eq. 4) and uk (Eq. 5). ⎤ ⎡ 1 0 −vk · Δt · sin(θk + ωk2·Δt ) ∂f ∇fx = (4) = ⎣ 0 1 vk · Δt · cos(θk + ωk2·Δt ) ⎦ ∂Xk 00 1 ⎡
Δt · cos(θk + ∂f ∇fu = = ⎣ Δt · sin(θk + ∂uk 0
ωk ·Δt 2 ) ωk ·Δt 2 )
⎤ − 12 · vk · Δt2 · sin(θk + ωk2·Δt ) ωk ·Δt 1 2 ⎦ 2 · vk · Δt · cos(θk + 2 ) Δt
(5)
Observation Model. The filter will have two types of information inputs: the distance measurement made by Pozyx to each of the anchors and angle measurement made by the robot’s camera to each of the ArUco markers. The filter will have two observation models: one for each type of measurements. Both models will have in common the covariance matrix of the state estimate of the current state of the filter. The model corresponding to the Pozyx measurements is presented in Eqs. 6 and 7 and characterizes the Euclidean distance between the estimated position of the robot and the position of the anchor. The model
242
S. Faria et al.
corresponding to the camera measurements, on the other hand, is presented in Eqs. 9 and 10 and characterizes the angle between the robot’s referential and the ArUco marker. Both measurements are affected by an additive Gaussian noise with zero mean and covariance constant (R), a parameter related to the characterization of the Pozyx error and the robot camera, respectively. It should also be noted that, as for the state transition model, the EKF algorithm also needs the Jacobian of h with respect to Xk (Eq. 8 and Eq. 11). R = [σr2 ]
(6)
(xB,i − x ˆr,k )2 + (yB,i − yˆr,k )2
(7)
ZB,i = rB,i = h(MB,i , Xk ) + N (0, R) ˆk ) = ZˆB,i = h(MB,i , X
∇hx =
xB,i −ˆ xr,k yB,i −ˆ yr,k ∂h = − √(xB,i −ˆxr,k )2 +(yB,i −ˆyr,k )2 − √(xB,i −ˆxr,k )2 +(yB,i −ˆyr,k )2 0 (8) ∂Xk ZB,i = φB,i = h(MB,i , Xk ) + N (0, R)
∇hx =
R = [σφ2 ]
(9)
ˆ k ) = atan2(yB,i − yˆr,k , xB,i − x ZˆB,i = h(MB,i , X ˆr,k ) − θˆr,k
(10)
∂h y −ˆ yr,k xB,i −ˆ xr,k = (xB,i −ˆxr,kB,i )2 +(yB,i −ˆ yr,k )2 − (xB,i −ˆ xr,k )2 +(yB,i −ˆ yr,k )2 −1 ∂Xk
(11)
Outlier Detection. Normally, when taking measurements with sensors, they are prone to errors that can be generated due to hardware failures or unexpected changes in the environment. For proper use of the measurements obtained, the systems must be able to detect and deal with the less reliable measurements, i.e., those that deviate from the normal pattern and called outlier. Although there are several approaches to solving this problem, but in the presence of multivariate data, one of the common methods is to use the Mahalanobis Distance (MD) (Eq. 12) as a statistical measure of the probability of some observation belonging to a given data set. In this approach, outliers are removed as long as they are outside a specific ellipse that symbolizes a specific probability in the distribution (Algorithm 2). In [10,11], it can be seen that this approach has been used successfully in different applications, consisting of calculating the normalized distance between a point and the entire population.
(12) M D(x) = (x − μ)T · S −1 · (x − μ) In this case ZˆB,i will be the population mean μ and S will be a factor representing a combination of the state uncertainty and the actual sensor measurement, present in line 8 of Algorithm 1. The choice of the threshold value can be made by a simple analysis of the data or by determining some probabilistic statistical parameter. In this case the threshold was established according to the
Sensor Fusion for Mobile Robot Localization
243
Algorithm 1: EKF Localization Algorithm with known measurements ˆ k , ZB,i , uk , Pk , R, Q Input : X ˆ k+1 , Pk+1 Output : X 1 2 3 4
5 6 7 8 9 10 11 12 13 14 15
PREDICTION ˆ k+1 = f (X ˆ k , uk ) X ∂f ∇fx = ∂Xk
∂f ∇fu = ∂u k Pk+1 = ∇fx · Pk · ∇fxT + ∇fu · Q · ∇fuT
CORRECTION for i = 1 to NB do ˆk ) ZˆB,i = h(MB,i , X
∂h ∇hx = ∂X k Sk,i = ∇hx · Pk · ∇hTx + R OutlierDetected = OutlierDetection(Sk,i , ZˆB,i , ZB,i ) if not OutlierDetected then −1 Kk,i = Pk+1 · ∇hTx · Sk,i ˆ k+1 = X ˆ k + Kk,i · [ZB,i − ZˆB,i ] X Pk+1 = [I − Kk,i · ∇hx ] · Pk+1 end end
χ2 probability table, so that observations with less than 5 % probability were cut off in the case of the Pozyx system. For the ArUco system a threshold was chosen so that observations with less than 2.5 % probability were cut off. These values were chosen through several iterations of the algorithm, and the values, which the algorithm behaved best for, were chosen. Algorithm 2: Outliers Detection Algorithm Input : Sk,i , ZˆB,i , ZB,i Output: OutlierDetected
−1 1 M D(ZB,i ) = · (ZB,i − ZˆB,i ) (ZB,i − ZˆB,i )T · Sk,i 2 3 4 5 6
if M D(ZB,i ) > T hreshold then OutlierDetected = True else OutlierDetected = False end
Pozyx Offset Correction. The Pozyx system distance measurements suffer from different offsets, i.e. difference between the actual value and the measured value, depending on how far the Pozyx tag is from a given anchor. These offsets also vary depending on the anchor at which the distance is measured, as
244
S. Faria et al.
verified in Sect. 5.1. In order to correct this offset, the Algorithm 3 was implemented. After calculating the estimated distance from the anchor to the robot tag, it is verified between which predefined values this distance is, and then the correction is made through a linear interpolation. The variable RealDist is an array with a set of predefined distances for which the offsets have been determined. The variable Of f set is a 4 × length(RealDist) matrix containing the offsets corresponding to each distance for each of the four anchors placed in the environment.
Algorithm 3: Offset Correction Algorithm Input : ZˆB,i Output : ZˆB,i 1 2 3 4 5 6 7 8
9 10 11 12
5
if ZˆB,i = RealDist[7] then ZˆB,i = ZˆB,i + Of f set[i, 7] else for j = 0 to length(RealDist) − 1 do if ZˆB,i >= RealDist[j] and ZˆB,i > 14 + ( S [ 3 ] & 0XFC00) >> 10 + ( S [ 4 ] & 0X0C00 ) >> 2 ; AUX = ( S [ 4 ] & 0XF000 ) >> 1 2 ; S[0] S[1] S[2] S[3] S[4]
= = = = =
S[0] S[1] S[2] S[3] S[4]
& & & & &
0X03FF ; 0X03FF ; 0X03FF ; 0X03FF ; 0X03FF ;
Optimizing Data Transmission in a Wireless Sensor Network
289
This optimised message can be sent to the LoRaWAN network and at the destination, a decoder procedure will construct the original message. Figure 3 presents the encoding, transmission and decoding procedures. As it can be seen, the packet to be sent keeps the size of produced by the flame sensors S[i] (where i ∈ R|0 ≤ i ≤ 4):
Fig. 3. Encoding and decoding procedures. Size of S[i] is 16 bits whereas T and H are 8 bits. AUX is an auxiliary variable that was created with the 4 bits that remain free.
By this way, a reduction of transmission from 8 words (16-Bytes) to 5 words (10-Bytes) is obtained. The following section demonstrates the difference between the procedure of recommendation by TTN and this approach.
5
Results
To demonstrate the difference during transmission using the LoRaWAN network with the algorithm proposed in this work, a comparison test is performed with the method recommended by TTN. Therefore, five sensor modules are configured for each transmission method: five nodes with the TTN transmission technique and another five nodes with the algorithm shown in the previous section. Figure 4a shows the ten modules distributed on the laboratory bench. They are configured according to the mentioned algorithms and simulate a small WSN. All of these modules are configured to transmit at a specific frequency within the range that LoRaWAN works. In this way, it is possible to probe the behaviour of the duty cycle in the settings of the gateway used. The gateway used is RAK 7249, which is attached to the laboratory’s roof shown in Fig. 4b.
290
T. Brito et al.
(a) Five modules configured for each algorithm.
(b) LoRaWAN gateway used for the test.
Fig. 4. Structure used for the comparison between the two algorithms.
The five modules responsible for transmitting the data from the sensors with the TTN’s recommendations were configured to send using the frequency 864.9 MHz, 865.5 MHz and 863 MHz (this frequency is exclusive for FSK). The other five modules, those configured with the algorithm proposed in this work, carried out transmissions on 863.5 MHz , 863.9 MHz and 860.1 MHz (this frequency is exclusive for FSK use). To ensure that no other frequencies were used, the RAK 7249 was still configured to only work on these six frequencies mentioned. In addition, it was also chosen to enable a modulation concentrator for each frequency range used. All ten modules have the same sending values; that is, all of them must send the five values of the flame sensors, the battery level, humidity and relative air temperature. They have also been configured to communicate in an interval of 60 s. Therefore, after all the necessary configurations for the test, the modules were deposited under the laboratory bench. Where they are under the same climatic circumstances, it is also possible to guarantee that they will send corresponding temperature and humidity values. Also, note that all batteries are fully charged. After 24 h, the generated duty cycle graph was verified in the gateway system, and a screenshot is shown in Fig. 5. Through this graph, it is possible to notice the difference between the two algorithms based on the lines generated when the gateway performs transmissions at a specific frequency. In this sense, it is observed that the primary frequencies are the most used (864.9 MHz and
Optimizing Data Transmission in a Wireless Sensor Network
291
863.5 MHz), as the firmware will always choose them as the first attempt to send. However, when analysing the secondary frequencies (865.5 MHz and 863.9 MHz), a difference is noted between the amount of duty cycle occupation. This graphical difference demonstrates the optimisation of bytes during data transmission through the LoRaWAN network. Thus, using the algorithm proposed in this work, it is possible to insert more modules under the same facilities.
Fig. 5. A screenshot is obtained from the RAK 7249 gateway system after 24 h of use.
6
Conclusion and Future Works
The limited resources of the LoRaWAN requires a reduction of the transmission data. In this paper, an optimised transmission is proposed availing the unused bits of the 16 bits values. It is a lossless bit manipulation that will fit the temperature, humidity and battery level data bits in the unused bits of the sensors data where each sensor occupies 10 bits. The remaining 6 bits are used to perform this procedure. Also, 4 free bits will allow to use an auxiliary value from 0 to 0xF that can help on synchronisation and packet sequence verification. The results showed that the reduction of the duty cycle of the LoRaWAN while maintaining the data integrity allow to verify that the proposed methodology is able to be installed on the wireless sensor network, as future work. Acknowledgements. This work has been supported by Funda¸ca ˜o La Caixa and FCT—Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/5757/2020.
292
T. Brito et al.
References 1. Brito, T., Pereira, A.I., Lima, J., Castro, J.P., Valente, A.: Optimal sensors positioning to detect forest fire ignitions. In: Proceedings of the 9th International Conference on Operations Research and Enterprise Systems, pp. 411–418 (2020) 2. Brito, T., Pereira, A.I., Lima, J., Valente, A.: Wireless sensor network for ignitions detection: an IoT approach. Electronics 9(6), 893 (2020) 3. Azevedo, B.F., Brito, T., Lima, J., Pereira, A.I.: Optimum sensors allocation for a forest fires monitoring system. Forests 12(4), 453 (2021) 4. Brito, T., Azevedo, B.F., Valente, A., Pereira, A.I., Lima, J., Costa, P.: Environment monitoring modules with fire detection capability based on IoT methodology. In: Paiva, S., Lopes, S.I., Zitouni, R., Gupta, N., Lopes, S.F., Yonezawa, T. (eds.) SmartCity360◦ 2020. LNICST, vol. 372, pp. 211–227. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-76063-2 16 5. Seye, M.R., Ngom, B., Gueye, B., Diallo, M.: A study of LoRa coverage: range evaluation and channel attenuation model. In: 2018 1st International Conference on Smart Cities and Communities (SCCIC), pp. 1–4 (2018). https://doi.org/10. 1109/SCCIC.2018.8584548 6. Phung, K.H., Tran, H., Nguyen, Q., Huong, T.T., Nguyen, T.L.: Analysis and assessment of LoRaWAN. In: 2018 2nd International Conference on Recent Advances in Signal Processing, Telecommunications Computing (SigTelCom), pp. 241–246 (2018). https://doi.org/10.1109/SIGTELCOM.2018.8325799 7. Kufakunesu, R., Hancke, G.P., Abu-Mahfouz, A.M.: A survey on adaptive data rate optimization in LoRaWAN: recent solutions and major challenges. Sensors 20(18), 5044 (2020). https://doi.org/10.3390/s20185044. https://www.mdpi.com/ 1424-8220/20/18/5044 8. Jovalekic, N., Drndarevic, V., Pietrosemoli, E., Darby, I., Zennaro, M.: Experimental study of lora transmission over seawater. Sensors 18(9), 2853 (2018). https:// doi.org/10.3390/s18092853. https://www.mdpi.com/1424-8220/18/9/2853 9. Casals, L., Mir, B., Vidal, R., Gomez, C.: Modeling the energy performance of LoRaWAN. Sensors 17(10) (2017). https://doi.org/10.3390/s17102364. https:// www.mdpi.com/1424-8220/17/10/2364 10. Tsakos, K., Petrakis, E.G.M.: Service oriented architecture for interconnecting LoRa devices with the cloud. In: Barolli, L., Takizawa, M., Xhafa, F., Enokido, T. (eds.) AINA 2019. AISC, vol. 926, pp. 1082–1093. Springer, Cham (2020). https:// doi.org/10.1007/978-3-030-15032-7 91 11. Raza, U., Kulkarni, P., Sooriyabandara, M.: Low power wide area networks: an overview. IEEE Commun. Surv. Tutor. 19(2), 855–873 (2017). https://doi.org/10. 1109/COMST.2017.2652320 12. Zhou, Q., Zheng, K., Hou, L., Xing, J., Xu, R.: Design and implementation of open LoRa for IoT. IEEE Access 7, 100649–100657 (2019) 13. Baiji, Y., Sundaravadivel, P.: iloleak-detect: an IoT-based LoRaWAN-enabled oil leak detection system for smart cities. In: 2019 IEEE International Symposium on Smart Electronic Systems (iSES) (Formerly iNiS), pp. 262–267. IEEE (2019) 14. Kufakunesu, R., Hancke, G.P., Abu-Mahfouz, A.M.: A survey on adaptive data rate optimization in LoRaWAN: recent solutions and major challenges. Sensors 20(18), 5044 (2020) 15. Kim, S., Yoo, Y.: Contention-aware adaptive data rate for throughput optimization in LoRaWAN. Sensors 18(6), 1716 (2018)
Optimizing Data Transmission in a Wireless Sensor Network
293
16. Bouguera, T., Diouris, J.F., Chaillout, J.J., Jaouadi, R., Andrieux, G.: Energy consumption model for sensor nodes based on LoRa and LoRaWAN. Sensors 18(7), 2104 (2018) 17. Choudhury, S., Gibson, J.D.: Payload length and rate adaptation for multimedia communications in wireless LANs. IEEE J. Sel. Areas Commun. 25(4), 796–807 (2007). https://doi.org/10.1109/JSAC.2007.070515 18. Akyildiz, I., Joe, I.: A new ARQ protocol for wireless ATM networks. In: ICC 1998. 1998 IEEE International Conference on Communications. Conference Record. Affiliated with SUPERCOMM 1998 (Cat. No.98CH36220), vol. 2, pp. 1109–1113 (1998). https://doi.org/10.1109/ICC.1998.685182 19. Modiano, E.: An adaptive algorithm for optimizing packet size used in wireless ARQ protocols. Wirel. Netw. 5, 279–286 (2000). https://doi.org/10.1023/A: 1019111430288 20. Leghari, M., Abbasi, S., Dhomeja, L.D.: Survey on packet size optimization techniques in wireless sensor networks. In: Proceedings of the International Conference on Wireless Sensor Networks (WSN4DC) (2013) 21. Sankarasubramaniam, Y., Akyildiz, I.F., McLaughlin, S.: Energy efficiency based packet size optimization in wireless sensor networks. In: Proceedings of the First IEEE International Workshop on Sensor Network Protocols and Applications, pp. 1–8. IEEE (2003) 22. Dong, W., et al.: DPLC: dynamic packet length control in wireless sensor networks. In: 2010 Proceedings IEEE INFOCOM, pp. 1–9. IEEE (2010) 23. Working with bytes. https://www.thethingsnetwork.org/docs/devices/bytes/. Accessed 15 May 2021 24. Cayenne low power payload. https://developers.mydevices.com/cayenne/docs/ lora/#lora-cayenne-low-power-payload. Accessed 15 May 2021
Indoor Location Estimation Based on Diffused Beacon Network Andr´e Mendes1,2(B) 1
and Miguel Diaz-Cacho2
Research Centre in Digitalization and Intelligent Robotics (CeDRI), Instituto Polit´ecnico de Bragan¸ca, 5300-253 Bragan¸ca, Portugal [email protected] 2 Departamento de Ingenier´ıa de Sistemas y Autom´ atica, Universidade de Vigo, 36.310 Vigo, Spain [email protected]
Abstract. This work investigates the problem of location estimation in indoor Wireless Sensor Networks (WSN) where precise, discrete and low-cost independent self-location is a critical requirement. The indoor scenario makes explicit measurements based on specialised location hardware, such as the Global Navigation Satellite System (GNSS), difficult and not practical, because RF signals are subjected to many propagation issues (reflections, absorption, etc.). In this paper, we propose a low-cost effective WSN location solution. Its design uses received signal strength for ranging, lightweight distributed algorithms for location computation, and the collaborative approach to delivering accurate location estimations with a low number of nodes in predefined locations. Through real experiments, our proposal was evaluated and its performance compared with other related mechanisms from literature, which shows its suitability and its lower average location error almost of the time.
Keywords: Indoor location
1
· Beacon · ESP8266 · Mobile application
Introduction
Location is a very appreciated information. Fields of application are uncountable, from transportation systems, factory automation, domotics, robotics, sensor networks or autonomous vehicles. Position sensors for location in an outdoor environment are widely developed based on the Global Navigation Satellite System (GNSS). Despite people, mobile factory robots or even drones spent most of their time indoors, there is not a globally accepted solution for positioning in indoor environments. Even for vehicles, indoor vehicle positioning expands the study of vehicular-control techniques for soft-manoeuvres in vehicles placed in garages or parking. In general, the research approaches for the indoor positioning problem are grouped in two main solutions: beacon-based and beacon-free. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 294–308, 2021. https://doi.org/10.1007/978-3-030-91885-9_21
Indoor Location Estimation
295
The beacon-based solution is based on the existence of a network of receivers or transmitters (positioning-infrastructure), some of them placed at known locations. In this solution, the location is estimated by multilateration [1] (or triangulation for angles) from a set of measured ranges. These methods are also named Indoor Positioning Systems (IPS), depending on the sensor configuration and processing approach, using technologies such as ultrasound, middle to short-range radio (Wi-Fi, Bluetooth, UWB, RFID, Zigbee, etc.) or vision [2]. The main weakness of these solutions is the need for infrastructure, limited absolute accuracy and coverage. The beacon-free solution, mainly relying on dead-reckoning methods with sensors installed on the target to be located, uses Inertial Measuring Units (IMU) and odometry to estimate the position of the target [3]. They integrate step lengths and heading angles at each detected step [4] or, alternatively, data from accelerometers and gyroscopes [5,6]. IMU and odometry based location have the inconvenience of accumulating errors that drift the path length. Beacon-based solutions using short-range radio signals deduce the distance by measuring the received signal strength (RSS), mainly based on two methods: i) the use of a radio map (previously established or online measured) as a reference; or, ii) the use of probabilistic methods such as Bayesian inference to estimate the location of the target. The implementation of beacon-based solutions requires the existence of a positioning-infrastructure. While it is possible to achieve extremely high accuracy with a specific ad-hoc positioning-infrastructure, the cost of installing and maintaining the required hardware is a significant drawback of such systems. On the contrary, the use of an existing beacon-based network (such as Wi-Fi or Bluetooth) as a non-dedicated positioning-infrastructure could require no extra hardware installation and minimal adjustments in software to implement an IPS, but, it typically results in lower accuracy [7–9]. Therefore, most of the research lines for non-dedicated positioning-infrastructures are focused on increasing the accuracy in location estimation by using curve fitting and location search in subareas [9], along with different heuristic-based or mathematical techniques [10–12]. In this work, a low complexity positioning solution based on an existing Wi-Fi infrastructure is proposed. Such technology is extremely wide extended and allowable, therefore it is easily scaled to fill coverage gaps with inexpensive devices. One of them is the ESP8266 board, made by Espressif Systems, which has a low-cost Wi-Fi microchip and meandered inverted-F PCB antenna, with a full TCP/IP stack and a microcontroller. This solution includes a collaborative node strategy by processing fixed and dynamic information depending on the environment status, holding the line started by other authors [13,14] and improving the broadcasting method with new results [15]. In addition, it assumes no prior knowledge of the statistical parameters that represents the availability of the RF channel, it can also dynamically adapt to variations of these parameters.
296
A. Mendes and M. Diaz-Cacho
Additionally, the solution has low computational complexity and low energy consumption, which makes it attractive to be implemented in vehicles, mobile robots, embedded and portable devices and, especially, in smartphones. However, there are several issues with this type of location mechanism. Inherent in all signal measurement exists a degree of uncertainty with many sources (interferences, RF propagation, location of the receiver, obstacles in the path between transmitter and receiver, etc.). This uncertainty could have a significant effect on the measured RSS values, and therefore on the accuracy of the received signal. In addition, because of the RF wave propagation characteristics within buildings, the RSS values themselves are not a uniform square law function of distance. This means that a particular RSS value may be a close match for more than one RF transmission model curve, pointing that some dynamic adjustment may be necessary from time to time. Moreover, some contributions could be stated, as early simulations yield average location errors below 2 m in the presence of both range and interference location inaccuracies, experimentally confirmed afterwards; well-performed in real experiments compared with some related mechanism from the literature; use COTS inexpensive and easy to use hardware being beacon devices; verify the barely intuitive idea that there is a trade-off between the number of beacon devices and the location accuracy. The paper is organized as follows. This section presented the concept, motivation and common problems of indoor positioning technologies, and in addition an introduction to the proposed solution. Section 2 provides the basic concepts and problems encountered when implementing positioning algorithms in nondedicated positioning-infrastructures and describes the system model. A novel positioning-infrastructure based on collaborative beacon nodes is presented in Sect. 3. Simulation and real implementation results are presented and discussed in Sect. 4, and finally, Sect. 5 concludes the paper and lists future works.
2
System Model
In this section, we describe the system model, which serves as the basis for the design and implementation of our proposal. This model allows determining the location of a client device by using management frames in Wi-Fi standard [16,17] and Received Signal Strength (RSS) algorithm combined with the lateration technique [18,19]. Many characteristics make positioning systems work different from outdoor to indoor [19]. Typically, indoor positioning systems require higher precision and accuracy than that shaped for outdoor to deal with relatively small areas and existing obstacles. In a strict comparison, indoor environments are more complex as there are various objects (such as walls, equipment, and people) that reflect, refract and diffract signals and lead to multipath, high attenuation and signal scattering problems, and also, such systems typically rely on non-line of sight (NLoS) propagation where the signal can not travel directly in a straight path from an emitter to a receiver, which causes inconsistent time delays at the receiver.
Indoor Location Estimation
297
On the other hand, there are some favourable aspects [19], as small coverage area becomes relatively under control in terms of infrastructure, corridors, entries and exits, temperature and humidity gradients, and air circulation. Also, the indoor environment is less dynamic due to slower-speed moving inside. Lateration (trilateration or multilateration, depending on the number of reference points), also called range measurement, computes the location of a target by measuring its distance from multiple reference points [1,16].
Fig. 1. Basic principle of the lateration technique for 2-D coordinates.
In Fig. 1, the basic principle of the lateration method for a 2-D location measurement is shown. If the geographical coordinates (xi , yi ) of, at least, three reference elements A, B, C are known (to avoid ambiguous solutions), either x,ˆ y ), the measured distances dA , dB and dC , then the estimated position P (ˆ considering the measured error—grey area in figure—, can be calculated as a solution for a system of equations that could be written similarly as Eq. 1, for the x-axis. x − xi )2 + (ˆ y − yi )2 (1) dxi = (ˆ for {i ∈ Z | i > 0}, where i is the number of reference elements. In our model, we consider a static environment with random and grid deployments of S sensor nodes (throughout this work called only as nodes), which could be of two different types: – Reference, which can be an available Wi-Fi compliant access point (AP); and, – Beacon, which is made with the inexpensive Espressif ESP8266 board with a built-in Wi-Fi microchip and meandered inverted-F PCB antenna, a full TCP/IP stack and a microcontroller.
298
A. Mendes and M. Diaz-Cacho
Both types are in a fixed and well-known location, but there is also a client device that is a mobile device. All these nodes are capable of wireless communication. The client device has installed inside a piece of software that gathers information from those nodes and computes its proper location, by using an RF propagation model and the lateration technique. Therefore, based on a RSS algorithm, it can estimate distances. The RSS algorithm is developed in two steps: i. Converting RSS to estimated distance by the RF propagation model; and, ii. Computing location by using estimated distances. Remark that the RF propagation model depends on frequency, antenna orientation, penetration losses through walls and floors, the effect of multipath propagation, the interference from other signals, among many other factors [20]. In our approach, we use the Wall Attenuation Factor (WAF) model [8] for distance estimation, described by Eq. 2: RSS(d) = P (d0 ) − 10α log10 ( dd0 ) − W AF ×
nW, if nW < C C, if nW C
(2)
where RSS is the received signal strength in dBm, P (d0 ) is the signal power in dBm at some reference distance d0 that can either be derived empirically or obtained from the device specifications, and d is the transmitter-receiver separation distance. Additionally, nW is the number of obstructions (walls) between the transmitter and the receiver and C is its maximum value up to which the attenuation factor makes a difference, α indicates the rate at which the path loss increases with distance, and WAF is the wall attenuation factor. In general, these last two values depend on the building layout and construction material and are derived empirically following procedures described in [8]. Since the environment varies significantly from place to place, the simplest way to find the relationship of RSS and the distance between a pair of nodes is collecting signal data at some points with known coordinates. Moreover, this is a learning mode procedure that can improve the lateration process by the adoption of real environment particularities, and also helps to determine empirically the path loss exponent α. Therefore, we determine α pruning the path loss model to a form in which it presents a linear relationship between the predicted RSS and the logarithm of the transmitter-receiver separation distance d, and then, we apply a linear regression to obtain that model parameter. Observe that C and nW are determined according to the type of facility.
3
Distributed Collaborative Beacon Network
In this section, we introduce the distributed collaborative beacon network for indoor environments.
Indoor Location Estimation
299
Our goal is to improve the client location accuracy by enhancing the information broadcasted by nodes. 3.1
Proposal
Unlike traditional location techniques based on Wi-Fi [17], which map out an area of signal strengths while storing it in a database, beacon nodes are used to transmit encoded information within a management frame (beacon frame), which is used for passive position calculation through lateration technique. Observe that we are focusing on the client-side, without the need to send a client device position to anywhere, avoiding privacy concerns. Moreover, since this is a purely client-based system, location latency is reduced compared to a server-side implementation. To improve location accuracy, we propose a collaborative strategy where nodes exchange information with each other. Every 5 s, during the learning mode, a beacon node randomly (with probability depending on a threshold ε) enters in scanning mode [16,17]. The node remains in this mode during at least one beacon interval (approximately 100 ms) to guarantee the minimum of one beacon received from any reference node (access point) in range. A beacon node receives, when in learning mode, RSS and location information from reference nodes in range, and therefore can calculate a new α value using Eq. 2. After, the new propagation parameter (α) and the proper location coordinates are coded and stuffed into the SSID, then broadcasted to the clients. Reference nodes only broadcast its proper location. It is noted that the path loss model plays an important role in improving the quality and reliability of ranging accuracy. Therefore, it is necessary to investigate it in the actual propagation environment to undermine the obstruction of beacon node coverage (e.g. people, furniture, etc.) tackling the problem of NLoS communication. Once in place, this coded information allows a client device to compute distances through lateration, then determining its proper location. All of this is performed without the need for data connectivity as it is determined purely with the information received in beacon frames from nodes in range. The coding schema in the standard beacon frame (also known as beacon stuffing [13]) works in nearly all standard-compliant devices and enhancing them if multiple SSIDs are supported, thus allowing to use of an existing SSID, simultaneously. Beacon frames must be sent at a minimum data rate of 1 Mbps (and standard amendment b [16,17]) to normalize the RSS across all devices. In general, since the RSS will change if data rate changes for management data frames, in this way it did not get any variation in RSS on the client device, except for range. Consideration should be made when planning the optimal placement of the beacon nodes, but this will generally be dictated by existing infrastructure (e.g., if using an existent standard-compliant access point as reference node), building limitations or power source requirements.
300
A. Mendes and M. Diaz-Cacho
Algorithm 1: BEACON node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
3.2
Initialization of variables; while (1) do /* zeroing the information array */ /* and fill in a proper location */ Initialization of I[1..nodes]; /* check time counter */ if (counter % 5) then draws a random number x, x ∈ [0, 1]; /* learning mode */ if (x < ε) then WiFi Scanning; get SSID from beacon frame; foreach ref node in SSID do read coded information; Decode; get {location, RSS}; I[ref node] ← {location, RSS}; /* adjust α if needed */ if (α do not fit default curve) then ComputeNewAlpha; I[ref node] ← {α}; /* beacon frame coding */ PackAndTx ← I; Broadcast coded SSID;
Algorithms and Complexity Analysis
The proposed strategy is described in Algorithms 1 and 2. In the beginning, after initialization, the mechanism enters into an infinite loop during its entire period of operation. And from a beacon node point of view, it decides according to a threshold (ε) between enter in learning mode, as described earlier or jump directly to the coding process of its proper location coordinates into the SSID, and transmission. In Algorithm 2, a client device verifies if a received beacon frame comes from a beacon or a reference node, then run the routines to decode informations and adjust α, if needed, and at last computes its location. Finally, observing Algorithm 1, it is noted that it depends of three routines, named Decode, ComputeNewAlpha and PackAndTX, which are finite time operations with time complexity constant, O(1). However, it all depends on the number of reference nodes in range, this way it raises the whole complexity to T (n) = O(n). In a similar fashion, Algorithm 2 depends on Decode and AdjustAlpha routines, which are finite time operations, but the Positioning
Indoor Location Estimation
301
Algorithm 2: CLIENT device 1 2 3 4 5 6 7 8 9
Initialization of variables; while (1) do WiFi Scanning; get SSID from beacon frame; foreach (ref node|beacon node in SSID) do read coded information; Decode; AdjustAlpha; Positioning;
routine takes linear time, also dependent on the amount of nodes (reference and beacons) in range, thus the complexity becomes linear, T (n) = O(n). Additionally, the largest resource consumption remains related to the storage of each coded SSID (32 bytes), which is dependent on the number of nodes (reference and beacons) in range as well. Thus, S(n) = O(n).
4
Evaluation
In this section, the proposed collaborative strategy is evaluated using numerical simulations, also by a real implementation experiment using the inexpensive ESP8266 board [21], a Wi-Fi standard-compliant access point and a smartphone application software. Location estimation is the problem of estimating the location of a client device from a set of noisy measurements, acquired in a distributed manner by a set of nodes. The ranging error can be defined as the difference between the estimated distance and the actual distance. The location accuracy of each client device is evaluated by using the root mean square error (Eq. 3): (3) ei = (x − xe )2 + (y − ye )2 where x and y denote the actual coordinates, and xe and ye represent the estimated coordinates of the client. We define the average location error (e) as the arithmetic mean of the location accuracy, as seen in Eq. 4: N
e=
j=1
ei
(4) N To assist in the evaluation, the strategies are analyzed in terms of average location error (e), and additionally, some other metrics are used and discussed occasionally, such as accuracy, technology, scalability, cost, privacy, and robustness [16,19,22].
302
A. Mendes and M. Diaz-Cacho
Finally, the objective of the proposed strategy is not to shorten the network lifetime. Therefore, we have also evaluated the performance of the strategies in terms of energy consumption. 4.1
Simulations
Based on the system model described in Sect. 2 and to assess the behaviour of the proposed strategy (Subsect. 3.1) in solving the indoor positioning problem, we use the ns-2 simulator environment running under GNU/Linux, that emulates a network with both types of nodes and clients, and adopts a specific data link layer where contention and possible collisions, between them, takes place. In particular, 20 nodes and 10 clients have been deployed in an area of 200 m2 , each of them with initial 100 energy units that were consumed during the simulation, on a per operation basis. We use a fixed energy model, meaning that every receive, decode, code and transmit process consume a fixed amount of energy, as used by ns-2. The α parameter (Eq. 2) has a initial value of 2.0 and the threshold ε is setted to 0.1. The values of the remaining parameters of the simulation were picked up as the most representative ones within their validity intervals, after a round of tests. For this analysis, we set 2 different scenarios to place the sensors (beacon and reference) nodes for the physical features of the network, aiming to reproduce the Department of Systems Engineering and Automatics’ (DESA) facility. Clients are placed randomly in both cases. – Grid: sensor nodes are placed over an equally spaced reference grid; and, – Random: sensor nodes are placed randomly into the area. And the performance of the following strategies are evaluated through simulations in the laboratory: – WELO: our proposal that was named WEmos (development board based on ESP8266) LOcalization; – GENERAL: the single position approach, meaning that only one location is computed after decoding the data within beacon frames when the node is placed; and, – CF: the continuous positioning, like GENERAL, but multiple locations are computed to reduce the minimum square error. A total of 400 simulation rounds are done for each set of parameters, each one corresponding to 2.000 s in simulation time, for both scenarios described earlier, where we compare the performance of the described strategies. In the results, the average location error (e) obtained at every round is presented, with error bars corresponding to the 95% confidence interval; also the quantity of beacons nodes used for positioning, the cumulative distribution function (CDF) of e, and the average energy consumption, per client.
Indoor Location Estimation 40
40
35
35
GENERAL WELO CF
Avg. location error (m)
Avg. location error (m)
GENERAL WELO CF
30 25 20 15
Avg. location error (m)
40 35
30 25 GENERAL WELO CF
20 15 10
303
30 25 20 15 10
10 5
5
5 0 0
0 1
1
2
3
4
5 6 #CLIENTS
7
8
9
2
3
4
5 6 #CLIENTS
10
7
8
9
10
1
(b) #BEACON S = 10
(a) #BEACON S = 4
2
3
4
5 6 #CLIENTS
7
8
9
10
(c) #BEACON S = 20
Fig. 2. Average location error (e) against clients deployed, per beacons available (by simulations). 40
18 GENERAL WELO CF Energy consumed %
30 #USED BEACONS
100 GENERAL WELO CF
16
25 20 15 10
90
14
80
12
70
10
60
CDF (%)
35
8 6
2
0
0 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #AVAILABLE BEACONS
40 30
4
5
GENERAL WELO CF
50
20 10 1
2
3
4
5 6 #CLIENTS
7
8
9
10
0 0
5
10
15
20
25
30
Avg. location error (m)
(a) Beacons deployed versus (b) Energy consumption (c) Average location error available beacons. against clients deployed. (e) CDF in simulations.
Fig. 3. WELO behaviour in simulations.
Figure 2 compares the obtained e between strategies. this performance comparison shows that our proposal, WELO, improves the accuracy of clients positioning by reducing e. We have observed when the number of beacon nodes increases, WELO—as a passive mechanism—reduces e on average, independent of the quantity of clients deployed. Compared with other strategies, this result shows that WELO uses more location information obtained through our collaborative approach, then leveraging the lateration process, independently of the number of clients, becoming an important performance metric. Another relevant observation is that there is a balance between the quantity of beacon nodes placed and the accuracy. Looking at Figs. 2b and 2c, one can observe that e is marginally reduced when raising the amount of beacons deployed. From another point of view, Fig. 3a shows this balance with the number of used beacon nodes to obtain a location. Further studies at different scenarios have to determine if there is a clear relationship between accuracy and the quantity of nodes, which might go against the statement that accuracy (with lateration) improves with raising the nodes installed. The CDF of e is depicted in Fig. 3c, showing that the curve of WELO lies in the top, demonstrates that its cumulative probability is larger for the same error. As can be seen, WELO achieves accuracy equal or better than 2m for 80% of the location estimations along with the scenario, and reduction of at least 80% over the other strategies.
304
A. Mendes and M. Diaz-Cacho
Apart from that, when looking at Fig. 3b, the average energy consumption by our strategy is stable in comparison with other strategies. As expected, with clients running a simplified mechanism and only beacon frames being broadcasted by beacon nodes, our proposed approach significantly improves the residual energy of the overall network, for both scenarios. 4.2
Real Implementation Analysis
Our real implementation analysis has been made with placement around the border of a corridor that connect offices at the Department of Systems Engineering and Automatics’ (DESA) facility, as shown in Fig. 4.
Fig. 4. DESA’s facility real scenario and heatmap overlay (beacon and reference nodes—B and R respectively).
We deploy at least one beacon node (made with the ESP8266 board) on each corner until 8 nodes (01 Wi-Fi standard-compliant access point included) being placed in total, and a client device (smartphone), in an area of 200 m2 , where the maximum distance between nodes lies between 2 m and 3 m. To avoid the potential for strong reflection and multipath effects from the floor and ceiling, we kept all devices away from the floor and ceiling. The α parameter (Eq. 2) has a initial value of 2.0 and the threshold ε is set to 0.1. Before running the experiment, we measured received signal strengths from each node (beacon or reference node) of our network. These measurements were made from distances ranging between 1 m to 20 m of each node, in 10 points within the area of the experiment, totalizing 200 measurements, aided by a smartphone application. Figure 4 shows a heat map overlay made with the average of these measurements. In addition, we added functions to the base firmware of the board ESP8266 (esp iot sdk v1.3.0 SDK [21]) to execute the learning process, described in Subsect. 3.1. During the experiment, on the smartphone application, the trilateration process uses a RSS based path loss algorithm to determine the distance (Eq. 2).
Indoor Location Estimation
305
In the results, the average location error (e) obtained is presented and discussed, and for purposes of comparison, the cumulative distribution function (CDF) of e is also investigated.
10
5 WELO GNSS
0 0
200
400
600
800 1000 Time (s)
1200
1400
1600
(a) Measurements for the location estimation error.
GNSS Error Measurement (m)
Avg. real error (m)
15
24 20
4
16 12
2
8 4
WELO GNSS
0
0 200 180 160 140 120 100 80 60 40 20 0
1.2 1 0.8 0.6 0.4 WELO GNSS
0.2 0 0
200
400
600
800 1000 Time (s)
1200
1400
Real error (m)
Real error (m)
6
20
1600
GNSS Error Measurement (m)
25
(b) Real behavior during measurements.
Fig. 5. Real experiment: our strategy vs GNSS.
Obtained average location error e between WELO, running in a smartphone, and a GNSS (GPS and GLONASS) receiver application, running in another smartphone, is presented in Fig. 5a. Both smartphones are the same model and the measurements were taken the same way to avoid any bias. This comparison shows that WELO is the one that achieves better results. The performance of GNSS is worst because of the instability of the received signal, even with measurements were taken at the ground level, and separated from the outside by generous glass windows and drywall made walls on the inside. Another interesting observation relies on Fig. 5b, where we can see the real behaviour of both systems, GNSS and WELO. At some points near the glass window, GNSS signals become strong and their error is reduced, in opposite WELO becomes worst because it is far from nodes (reference and beacons). This happens due to the dynamic nature of the RF environment. Even so, GNSS can get much more information during evaluation instants, but in indoor scenarios, any temporary change from the RF environment causes significant performance degradation for GNSS. In contrast, WELO achieves a better performance not only because of the higher availability of its signals but also because of the higher confidence of the location information obtained. Moreover, this behaviour demonstrates that GNSS errors in this scenario become out of control, mainly because of the multiple reflections at surfaces that cause multipath propagation, and lose significant power indoors, concerning the required coverage for receivers (at least four satellites). However, with the introduction of “dual-frequency” support on smartphones, position accuracy probably experiment promising enhancements. Further analysis will determine its performance under this same indoor scenario.
306
A. Mendes and M. Diaz-Cacho
100 90 80
CDF (%)
70 60 Simulated Real
50 40 30 20 10 0
2
4
6
8
10
Avg. location error (m)
(a) Our strategy: simulated vs real.
(b) Benchmarking between mechanisms.
Fig. 6. Average location error (e) CDF comparison (by real experiment).
By comparing the results in Fig. 5a to the ones in Fig. 2, one can observe that the performance of the WELO is positively impacted with the growth of the amount of beacon nodes available, but with a limit. Additionally, the performance degradation is small, which shows the robustness of the proposed strategy against the larger heterogeneity of a real indoor scenario without any prior knowledge. Based on the above observations, we compared the average location error (e) CDF comparison (by real experiment) in Fig. 6. Figure 6a shows its performance in simulations in contrast with its capabilities in the real experiments. At that, we can observe the accuracy suffering from the toughness of the indoor scenario. Figure 6b shows the performance evaluation of the proposed strategy against some classical algorithms, such as RADAR [8] and Curve Fitting with RSS [9] in the office indoor scenario, together with GNSS (worse performance and related to upper x-axis only). As can be seen, WELO shows its suitability and its lower average location error almost of the time within the scenario. From these figures, WELO results are fairly stimulating and we can observe performance improvements.
5
Conclusions
The Wi-Fi standard has established itself as a key positioning technology that together with GNSS is widely used by devices. Our contribution is the development of a simple and low-cost indoor location infrastructure, plus a low complexity and passive positioning strategy that does not require specialized hardware (instead exploiting hardware commonly available—ESP8266 board—with enhanced functionality), arduous area polling or reliance on data connectivity to a location database. These last two features help to reduce its latency, all while remaining backwards compatible with existing Wi-Fi standards, and working side by side with
Indoor Location Estimation
307
IEEE 802.11mc Fine Time Measurement (Wi-Fi RTT) when it will broad available. We run simulations with the ns-2 and made an experiment under real indoor conditions, at DESA’s facility, to evaluate the performance of the proposed strategy. The results show that this solution achieves better performance than other pre-established strategies (GNSS system included) for the scenarios evaluated. Further research is required to guarantee the stability of our approach. As future works, we intend to extend the evaluation for client devices being located by dynamically deployed beacon nodes. Acknowledgements. This work has been conducted under the project “BIOMA – Bioeconomy integrated solutions for the mobilization of the Agri-food market” (POCI-01-0247-FEDER-046112), by “BIOMA” Consortium, and financed by European Regional Development Fund (FEDER), through the Incentive System to Research and Technological development, within the Portugal2020 Competitiveness and Internationalization Operational Program. This work has also been supported by FCT - Funda¸ca ˜o para a Ciˆencia e Tecnologia within the Project Scope: UIDB/05757/2020.
References 1. Savvides, A., Park, H., Srivastava, M.B.: The bits and flops of the n-hop multilateration primitive for node localization problems. In: Proceedings of the 1st ACM International Workshop on Wireless Sensor Networks and Applications, pp. 112–121 (2002) 2. Hightower, J., Borriello, G.: Location systems for ubiquitous computing. Computer 34(8), 57–66 (2001) 3. Collin, J.: Investigations of self-contained sensors for personal navigation. Tampere University of Technology (2006) 4. Jimenez, A.R., Seco, F., Prieto, C., Guevara, J.: A comparison of pedestrian deadreckoning algorithms using a low-cost MEMS IMU. In: 2009 IEEE International Symposium on Intelligent Signal Processing, pp. 37–42. IEEE (2009) 5. Jim´enez, A.R., Seco, F., Prieto, J.C., Guevara, J.: Indoor pedestrian navigation using an INS/EKF framework for yaw drift reduction and a foot-mounted IMU. In: 2010 7th Workshop on Positioning, Navigation and Communication, pp. 135–143. IEEE (2010) 6. Chatfield, A.B.: Fundamentals of High Accuracy Inertial Navigation. American Institute of Aeronautics and Astronautics, Inc. (1997) 7. Deasy, T.P., Scanlon, W.G.: Stepwise refinement algorithms for prediction of user location using receive signal strength indication in infrastructure WLANs. In: 2003 High Frequency Postgraduate Student Colloquium (Cat. No. 03TH8707), pp. 116– 119. IEEE (2003) 8. Bahl, P., Padmanabhan, V.N.: RADAR: an in-building RF-based user location and tracking system. In: Proceedings IEEE INFOCOM 2000. Conference on Computer Communications. Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (Cat. No. 00CH37064), vol. 2, pp. 775–784. IEEE (2000) 9. Wang, B., Zhou, S., Liu, W., Mo, Y.: Indoor localization based on curve fitting and location search using received signal strength. IEEE Trans. Industr. Electron. 62(1), 572–582 (2014)
308
A. Mendes and M. Diaz-Cacho
10. Ji, X., Zha, H.: Sensor positioning in wireless ad-hoc sensor networks using multidimensional scaling. In: IEEE INFOCOM 2004, vol. 4, pp. 2652–2661. IEEE (2004) 11. Doherty, L., El Ghaoui, L., et al.: Convex position estimation in wireless sensor networks. In: Proceedings IEEE INFOCOM 2001. Conference on Computer Communications. Twentieth Annual Joint Conference of the IEEE Computer and Communications Society (Cat. No. 01CH37213), vol. 3, pp. 1655–1663. IEEE (2001) 12. Shang, Y., Ruml, W.: Improved MDS-based localization. In: IEEE INFOCOM 2004, vol. 4, pp. 2640–2651. IEEE (2004) 13. Chandra, R., Padhye, J., Ravindranath, L., Wolman, A.: Beacon-stuffing: wi-fi without associations. In: Eighth IEEE Workshop on Mobile Computing Systems and Applications, pp. 53–57. IEEE (2007) 14. Sahoo, P.K., Hwang, I., et al.: Collaborative localization algorithms for wireless sensor networks with reduced localization error. Sensors 11(10), 9989–10009 (2011) 15. Bal, M., Shen, W., Ghenniwa, H.: Collaborative signal and information processing in wireless sensor networks: a review. In: 2009 IEEE International Conference on Systems, Man and Cybernetics, pp. 3151–3156. IEEE (2009) 16. Liu, H., Darabi, H., Banerjee, P., Liu, J.: Survey of wireless indoor positioning techniques and systems. IEEE Trans. Syst. Man Cybern. Part C (Appl. Rev.) 37(6), 1067–1080 (2007) 17. 802.11b: Wireless LAN MAC and PHY Specifications: Higher-Speed Physical Layer Extension in the 2.4 GHz Band (1999). IEEE Standard 18. Al Nuaimi, K., Kamel, H.: A survey of indoor positioning systems and algorithms. In: 2011 International Conference on Innovations in Information Technology, pp. 185–190. IEEE (2011) 19. Gu, Y., Lo, A., Niemegeers, I.: A survey of indoor positioning systems for wireless personal networks. IEEE Commun. Surv. Tutor. 11(1), 13–32 (2009) 20. Rappaport, T.: Wireless Communications: Principles and Practice. Prentice-Hall, Hoboken (2001) 21. Espressif: Datasheet ESP8266 (2016) 22. Huang, H., Gartner, G.: A survey of mobile indoor navigation systems. In: Gartner, G., Ortag, F. (eds.) Cartography in Central and Eastern Europe. Lecture Notes in Geoinformation and Cartography, pp. 305–319. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03294-3 20
SMACovid-19 – Autonomous Monitoring System for Covid-19 Rui Fernandes(B) and Jos´e Barbosa MORE – Laborat´ orio Colaborativo Montanhas de Investiga¸ca ˜o – Associa¸ca ˜o, Bragan¸ca, Portugal {rfernandes,jbarbosa}@morecolab.pt
Abstract. The SMACovid-19 project aims to develop an innovative solution for users to monitor their health status, alerting health professionals to potential deviations from the normal pattern of each user. For that, data is collected, from wearable devices and through manual input, to be processed by predictive and analytical algorithms, in order to forecast their temporal evolution and identify possible deviations, predicting, for instance, the potential worsening of the clinical situation of the patient. Keywords: COVID-19
1
· FIWARE · Docker · Forecasting
Introduction
Wearable devices nowadays support many sensing capabilities that can be used to collect data, related to the body of the person using the wearable. This allowed for the development of health related solutions based on data collected from the wearable devices for different purposes: for instance, in [1], the authors present a system for automated rehabilitation, in [2] big data analysis is used to define healthcare services. Nowadays, we are facing a pandemic scenario and this work intends to use the characteristics of the wearable devices to develop an innovative solution that can be used to diagnose possible infected COVID-19 patients, at an early stage, by monitoring biological/physical parameters (through wearable devices) and by conducting medical surveys that will allow an initial screening.
2
Docker and FIWARE
The system was developed using Docker compose, to containerize the architecture modules, and FIWARE, to deal with the context information. Docker is an open source platform that allows the containerization of applications and uses images and containers to do so. An image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings [3]. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 309–316, 2021. https://doi.org/10.1007/978-3-030-91885-9_22
310
R. Fernandes and J. Barbosa
A container is a standardized unit of software, and includes the code as well as the necessary dependencies for it to run efficiently, regardless of the computing environment where is being run [3]. Images turn into containers at runtime. The advantage that applications developed using this framework have is that they will always run the same way, regardless of the used infrastructure to run them. The system was developed using the FIWARE platform [4]. FIWARE defines a set of standards for context data management and the Context Broker (CB) is the key element of the platform, enabling the gathering and management of context data: the current context state can be read and the data can be updated. FIWARE uses the FIWARE NGSI RESTful API to support data transmission between components as well as context information update or consumption. The usage of this open source RESTful API simplifies the process of adding extra functionalities through the usage of extra FIWARE or third-party components. As an example, FIWARE extra components, ready to use, cover areas such as interfacing with the Internet of Things (IoT), robots and third-party systems; context data/API management; processing, analysis and visualization of context information. In this project, the version used was the NGSI-v2.
3
System Architecture
The system’s architecture is the one shown in Fig. 1, in which the used/ implemented modules communicate through the ports identified on the edges: – – – – –
Orion: FIWARE context broker; Cygnus: responsible for the data persistence in the MongoDB; Context Provider: performs data acquisition from the Fitbit API; Data analysis: processes the available data to generate forecasts; Fitbit API: data source for the wearable device.
In the system, data from the wearable device and from the mobile app is posted into the CB. This data is automatically persisted in the MongoDB through the cygnus module and is also used to trigger the data analysis module, to execute a new forecast operation. Data persistence is implemented through the creation of subscriptions in the CB that notify cygnus about data update. There are already docker images ready to use for the standard modules, such as, the MongoDB, the Orion context broker and the Cygnus persistence module. The context provider and data analysis modules were developed and containerized to generate the full system architecture. 3.1
Data Model
The NGSI-v2 API establishes rules for entity definition. Per those rules, an entity has to have mandatory attributes, namely, the id and the type attributes. The id is an unique uniform resource name (urn) created according with the format “urn:ngsi-ld::”. In this work, the entity’s type is identified in each entity definition, as can be seen in the data model presented in Fig. 2.
SMACovid-19 – Autonomous Monitoring System for Covid-19
311
Fig. 1. Architecture devised to create the SMACovid-19 system.
Given the fact that each id has to be unique, the part of the urn was created based on the version 4 of the universally unique identifier (uuid). Using these rules, a person entity may be, for instance: urn:ngsi-ld:Person:4bc3262c-e8bd-4b33-b1ed-431da932fa5 To define the data model, extra attributes were used, in each entity, to convey the necessary information between modules. Thus, the Person entity has attributes to specify the user characteristics and to associate the person with his fitbit account. The Measurement entity represents the acquired data values and its corresponding time of observation. This entity is used to specify information regarding the temperature, oxygen saturation, blood pressure, heart rate and daily number of diarrhea occurrences. The measurementType attribute is used to indicate what type of variable is being used on that entity. To ensure maximum interoperability possible, the Fast Healthcare Interoperability Resources (FHIR) specification of Health Level Seven International (HL7) [5] was used to define terms whenever possible. This resulted in the following terms being used: bodytemp for temperature, oxygensat for oxygen saturation, bp for blood pressure, heartrate for heart rate and diarrhea (FHIR non-compliant) for daily number of diarrhea occurrences. The Questionnaire entity specifies data that has to be acquired through the response of a questionnaire, by the user, through the mobile application. The Organization entity identifies the medical facility that the person is associated with. The Forecast entity provides the forecast mark value, calculated accord-
312
R. Fernandes and J. Barbosa
Fig. 2. Data model
ing with the classification table defined by the Hospital Terra Quente (HTQ) personnel, and the corresponding time of forecast calculation. 3.2
Data Acquisition
Data is acquired from two different sources: mobile application and Fitbit API. The mobile application is responsible for manual data gathering, sending this data to the CB through POST requests. For instance, data related to the attributes of the Questionnaire entity is sent to the CB using this methodology. Fitbit provides an API for data acquisition that, when new data is uploaded to the Fitbit servers, sends notifications to a configured/verified subscriber endpoint. These notifications are similar to the one represented in Fig. 3. The
Fig. 3. Fitbit notification identifying new data availability [6].
SMACovid-19 – Autonomous Monitoring System for Covid-19
313
ownerId attribute identifies the fitbitId of the person that has new data available, thus, allowing the system to fetch data from the identified user. This results in the following workflow, to get the data into the system: 1. create a Person entity; 2. associate Fitbit account with that person; 3. make a oneshot subscription (it is only triggered one time—oneshot) for that Person entity, notifying the Fitbit subscription endpoint; 4. update the Person entity with the Fitbit details; 5. create the fitbit subscription upon the oneshot notification reception; 6. get new data from Fitbit web API after receiving a notification from Fitbit: collect the fitbitId from the notification and use it to get the data from the Fitbit servers, from the last data update instant up until the present time. 3.3
Data Analysis and Forecast Execution
When new data arrives into the system, the data analysis module is called to perform a forecast, based on the new available data. Given the data sources at hand, there are two methods to call this module: (1) subscription based from the context broker or (2) direct call from the context provider. In the first method, subscriptions are created within the CB to notify the data analysis module about data change. This method is used on the Questionnaire and Measurement entities. For the latter, individual subscriptions have to be created for each possible measurementType value. With this methodology, every time new data arrives at the CB about any of these variables, the subscription is triggered and the CB sends the notification to the forecast endpoint, identifying the entity that has new data available. The second method is used when there’s new data from the Fitbit servers. Upon data collection from the Fitbit servers, the data is sent to the CB, being persisted by cygnus in the database. Afterwards, the data analysis endpoint is called with the subscription ID set to fitbit. In order to perform the forecast, data is retrieved from the CB and the database, based on the subscriptionId, for a 15 day interval, defined based on the present instant. Data is collected for all variables: (1) anosmia, (2) contactCovid, (3) cough, (4) dyspnoea, (5) blood pressure, (6) numberDailyDiarrhea, (7) oxygen saturation, (8) temperature and (9) heart rate. Data history of a certain variable is used to forecast that variable: – variables 1–4 are boolean variables, thus, the forecast implemented consists in the last value observed, for each variable, read from the context broker. – variables 5–8 are variables with slow variation and small dynamic range, thus, the forecast used was a trend estimator. – variable 9 has a seasonal variation that can be observed on a daily basis, thus, a forecast algorithm that can take seasonal effects into consideration was used, namely, the additive Holt-Winters forecast method. The Holt-Winters method needs to be fed with periodic data in order to make the forecast and has to have at least data related to two seasons (two
314
R. Fernandes and J. Barbosa
days). This means that data pre-processing has to be executed to ensure that this requirement is met. For instance, when the wearable device is being charged, it cannot, of course, read the patient’s data, creating gaps that have to be processed before passing the data to the forecast algorithm. Hence, when a new forecast is executed, data is collected from the database, the data is verified to determine if there are gaps in the data and, if the answer is positive, forward and backward interpolation are used to fill those gaps. The final data, without gaps, is, afterwards, passed to the forecast method. Holt-Winters parameter optimization is executed first, using, to that end, the last known hour data, coupled with a Mean Absolute Error (MAE) metric. The optimized parameters are then used to make the forecast for the defined forecast horizon. Table 1. Classification metrics for Covid-19 level identification provided by HTQ. Variable
0 Points
1 Points
2 Points
Systolic blood pressure (mmHg) 120 ≤ x ≤ 140 100 ≤ x ≤ 119
x ≤ 99
Heart rate (bpm)
x ≥ 101 or x ≤ 49
56 ≤ x ≤ 85
86 ≤ x ≤ 100 or 50 ≤ x ≤ 55
Oxygen saturation (%)
x ≥ 94
90 ≤ x ≤ 93
x ≤ 89
Body temperature (◦ C)
x ≤ 36.9
37 ≤ x ≤ 39.9
x > 39.9
Dyspnea
No
N/A
Yes
Cough
No
N/A
Yes
Anosmia
No
N/A
Yes
Contact COVID+
No
N/A
Yes
Diarrhea
No
N/A
Yes (minimum of 5 times/day)
The final forecast mark is computed by adding all individual marks, calculated according with the rules specified in Table 1, defined by the medical personnel of Hospital Terra Quente. This value is used with the following classification, to generate alerts: – value ≤ 4 points → unlikely Covid-19 → 24 h vigilance; – value ≥ 5 points points → likely Covid-19 → patient should be rushed into the emergency room (ER).
4
Results
As discussed on Sect. 3.3, some of the used variables in this work are boolean and the forecast performed is the last value those variables have, that can be read from the context broker. Another set of variables use the trend estimator to forecast the next day value. A case of such scenario can be seen in Fig. 4(a), that showcases the number of daiy diarrhea occurrences example. In this case, the forecast is less than 5 times per day, thus, the attributed forecast points are 0, per Table 1.
SMACovid-19 – Autonomous Monitoring System for Covid-19
(a) Daily diarrhea example.
315
(b) Oxygen Saturation example.
Fig. 4. Trend estimator forecasting.
Fig. 5. Heart rate forecasting example, using the Holt-Winters method.
Other variable that also uses the trend estimation predictor is the oxygen saturation variable. An example for this variable is presented in Fig. 4(b). For this variable, the forecast horizon is 2 h and the worst case scenario is considered for the forecast points calculation. In this example, the minimum of the forecast values is 90.78, yielding the value of 1 for the forecast points. The heart rate, given its seasonality characteristics, uses the Holt-Winters additive method fed, with, at least, data about two days and a forecast horizon of two hours. Similarly to the other variables, the worst case scenario is used to calculate the forecast points. Since the optimal case (0 points) is in the middle of the dynamic range of the heart rate value, both maximum and minimum forecast values are used to determine the associated forecast points. Figure 5 shows an example of heart rate forecast, in which, forecasts can only be determined starting on the second season, when this season’s data is already
316
R. Fernandes and J. Barbosa
available. The smoothing parameters α, β and γ fed into the Holt-Winters method [7] were [0.5, 0.5, 0.5] respectively. The optimization yielded the values [0.61136, 0.00189, 0.65050] with an associated MAE of 4.12. Considering the forecast values, the minimum is 74.4983 and the maximum is 84.2434, thus, the forecast points associated with this example, according with Table 1, are 0 points.
5
Conclusions
In this work, we present a solution using mobile applications and wearable devices for health data collection and analysis, with the purpose of generating health status forecasting, for patients that may, or may not, be infected with the COVID-19 virus. To implement this solution, Docker containerization was used together with elements from the FIWARE platform to create the system’s architecture. A health context provider was implemented, to fetch data from the wearable device, as well as a data analysis module to make the forecasts. Three types of forecasts were devised, considering the variables characteristics, namely, last observation, trend estimation and Holt-Winters methodology. The obtained results so far are encouraging and future work can be done in the optimization of the forecast methods and in the inclusion of more data sources. Acknowledgements. This work was been supported by SMACovid-19 – Autonomous Monitoring System for Covid-19 (70078 – SMACovid-19).
References 1. Candelieri, A., Zhang, W., Messina, E., Archetti, F.: Automated rehabilitation exercises assessment in wearable sensor data streams. In: 2018 IEEE International Conference on Big Data (Big Data), pp. 5302–5304 (2018). https://doi.org/10.1109/ BigData.2018.8621958 2. Hahanov, V., Miz, V.: Big data driven healthcare services and wearables. In: the Experience of Designing and Application of CAD Systems in Microelectronics, pp. 310–312 (2015). https://doi.org/10.1109/CADSM.2015.7230864 3. Docker. https://www.docker.com/resources/what-container. Accessed 5 May 2021 4. FIWARE. https://www.fiware.org/developers/. Accessed 5 May 2021 5. HL7 FHIR Standard. https://www.hl7.org/fhir/R4/. Accessed 5 May 2021 6. Fitbit Subscriptions Homepage. https://dev.fitbit.com/build/reference/web-api/ subscriptions/. Accessed 5 May 2021 7. Holt-Winters Definition. https://otexts.com/fpp2/holt-winters.html. Last accessed 5 May 2021. Accessed 5 May 2021
Optimization in Control Systems Design
Economic Burden of Personal Protective Strategies for Dengue Disease: an Optimal Control Approach Artur M. C. Brito da Cruz1,3
and Helena Sofia Rodrigues2,3(B)
1
3
Escola Superior de Tecnologia de Set´ ubal, Instituto Polit´ecnico de Set´ ubal, Set´ ubal, Portugal [email protected] 2 Escola Superior de Ciˆencias Empresariais, Instituto Polit´ecnico de Viana do Castelo, Valen¸ca, Portugal [email protected] CIDMA - Centro de Investiga¸ca ˜o e Desenvolvimento em Matem´ atica e Aplica¸co ˜es, Departamento de Matem´ atica, Universidade de Aveiro, Aveiro, Portugal
Abstract. Dengue fever is a vector-borne disease that is widely spread. It has a vast impact on the economy of countries, especially where the disease is endemic. The associated costs with the disease comprise prevention and treatment. This study focus on the impact of adopting individual behaviors to reduce mosquito bites - avoiding the disease’s transmission - and their associated costs. An epidemiological model is presented with human and mosquito compartments, modeling the interaction of dengue disease. The model assumed some self-protection measures, namely the use of repellent in human skin, wear treated clothes with repellent, and sleep with treated bed nets. The household costs for these protections are taking into account to study their use. We conclude that personal protection could have an impact on the reduction of the infected individuals and the outbreak duration. The costs associated with the personal protection could represent a burden to the household budget, and its purchase could influence the shape of the infected’s curve. Keywords: Dengue · Economic burden Household costs · Optimal control
1
· Personal protection ·
Introduction
Dengue is a mosquito-borne disease dispersed almost all over the world. The infection occurs when a female Aedes mosquito bites an infected person and then bites another healthy individual to complete its feed [10]. According to World Health Organization (WHO) [27], each year, there are about 50 million to 100 million cases of dengue fever and 500,000 cases of severe Supported by FCT - Funda¸ca ˜o para a Ciˆencia e a Tecnologia. c Springer Nature Switzerland AG 2021 A. I. Pereira et al. (Eds.): OL2A 2021, CCIS 1488, pp. 319–335, 2021. https://doi.org/10.1007/978-3-030-91885-9_23
320
A. M. C. Brito da Cruz and H. S. Rodrigues
dengue, resulting in hundreds of thousands of hospitalizations and over 20,000 deaths, mostly among children and young adults. Several factors contribute to this public health problem, such as uncontrolled urbanization and increasing population growth. Problems like the increased use of non-biodegradable packaging coupled with nonexistent or ineffective trash collection services, or the growing up number of travel by airplane, allowing the constant exchange of dengue viruses between countries, reflect such factors. Besides, the financial and human resources are limited, leading to programs that emphasize emergency control in response to epidemics rather than on integrated vector management related to prevention [27]. These days, dengue is one of the most important vector-borne diseases and, globally, has heavy repercussions in morbidity and economic impact [1,28]. 1.1
Dengue Economic Burden
Stanaway et al. [25] estimated dengue mortality, incidence, and burden for the Global Burden of Disease Study. In 2013, there were almost 60 million symptomatic dengue infections per year, resulting in about 10 000 deaths; besides, the number of symptomatic dengue infections more than doubled every ten years. Moreover, Shepard et al. [23] estimated a total annual global cost of dengue illness of US$8.9 billion, with a distribution of dengue cases of 18% admitted to hospital, 48% ambulatory, and 34% non-medical. Dengue cases have twofold costs, namely prevention and treatment. The increasing of dengue cases leads to the rise of health expenditures, such as outpatient, hospitalization, and drug administration called direct costs. At the same time, there are indirect costs for the economic operation, such as loss of productivity, a decrease in tourism, a reduction in foreign investment flows [14]. Most of the countries only bet on prevention programs to control the outbreaks. They focus on the surveillance program, with ovitraps or advertising campaigns regarding decrease the breeding sites of the mosquito. 1.2
Personal Protective Measures (PPM)
Another perspective on dengue prevention is related to household prevention, where the individual has a central role in self-protection. PPM could be physical (e.g., bed nets or clothing) or chemical barriers (e.g., skin repellents). Mosquito nets are helpful in temporary camps or in houses near biting insect breeding areas. Care is needed not to leave exposed parts of the body in contact with the net, as mosquitoes bite through the net. However, insecticide-treated mosquito nets have limited utility in dengue control programs, since the vector species bite during the day, but treated nets can be effectively utilized to protect infants and night workers who sleep by day [18]. For particular risk areas or occupations, the protective clothing should be impregnated with allowed insecticides and used during biting insect risk periods.
Economic Burden of Personal Protective Strategies for Dengue Disease
321
Repellents with the chemical diethyl-toluamide (DEET) give good protection. Nevertheless, repellents should act as a supplementary to protective clothing. The population also has personal expenses to prevent mosquito bites. There are on the market cans of repellent to apply on the body, clothing already impregnated with insect repellent, and mosquito bed nets to protect individuals when they are sleeping. All of these items have costs and are considered the household cost for dengue. The number of research papers studying the dengue impact dengue on the country’s economy is considerable [9,11,13,23,24,26]. However, there is a lack of research related to household expenditures, namely what each individual could spend to protect themselves and their family from the mosquito. There is some work available about insecticide bed nets [19] or house spraying operations [8], but there is a lack of studies using these three PPM in the scientific literature. Each person has to make decisions related to spending money for its protection or risking catching the disease. This cost assessment can provide an insight to policy-makers about the economic impact of dengue infection to guide and prioritize control strategies. Reducing the price or attribute subsidies for some personal protection items could lead to an increase in the consumption of these items, and therefore, to prevent mosquito bites and the disease. This paper studies the influence of the price of personal protection to prevent dengue disease from the individual perspective. Section 2 introduces the optimal control problem, the parameter, and the variables that composed the epidemiological model. Section 3 analyzes the numerical results, and Sect. 4 presents the conclusions of the work.
2 2.1
The Epidemiological Model Dengue Epidemiological Model
This research is based on the model proposed by Rodrigues et al. [21], where it is studied the human and mosquito population through a mutually exclusive compartmental model. The human population is divided in the classic SIRtype epidemiological framework (Susceptible - Infected - Recovered), while the mosquito population only has two components SI (Susceptible - Infected). Some assumptions are assumed: both (humans and mosquitoes) are born susceptibles; there is homogeneity between host and vectors; the human population is constant (N = S + I + R), disregarding migrations processes; and seasonality was not considered, which could influence the mosquito population. The epidemic model for dengue transmission is given by the following systems of ordinary differential equations for human and mosquito populations, respectively.
322
A. M. C. Brito da Cruz and H. S. Rodrigues
⎧ dS(t) Im (t) ⎪ ⎪ = μh Nh − Bβmh + μh S(t) ⎪ ⎪ Nh ⎪ ⎨ dt dI(t) Im (t) = Bβmh S(t) − (ηh + μh ) I(t) ⎪ dt Nh ⎪ ⎪ ⎪ ⎪ ⎩ dR(t) = ηh I(t) − μh R(t) dt
(1)
⎧ ⎪ ⎪ dSm (t) = μm Nm − Bβhm I(t) + μm Sm (t) ⎨ dt Nh I(t) dIm (t) ⎪ ⎪ = Bβhm Sm (t) − μm Im (t) ⎩ dt Nh
(2)
As expected, these systems depict the interactions of the disease between humans to mosquitoes and vice-versa. Parameters of the model are presented in Table 1. Table 1. Parameters of the epidemiological model Parameter Description
Range
Used values Source
Nh 1 μh
Human population
112000
[12]
Average lifespan of humans (in days)
79 × 365
[12]
B
Average number of bites on an unprotected person (per day)
βmh
Transmission probability from Im (per bite)
[0.25, 0.33] 0.25
[6]
1 ηh
Average infection period on humans (per day)
[4, 15]
7
[4]
1 μm
Average lifespan of adult mosquitoes (in days)
[8, 45]
15
[7, 10, 16]
Nm
Mosquito population
6 × Nh
[22]
βhm
Transmission probability from Ih (per bite)
1 3
[0.25, 0.33] 0.25
[20, 21]
[6]
This model does not incorporate any PPM. Therefore we need to add another compartment to the human population: the Protected (P ) compartment. It comprises humans that are using personal protection, and therefore they cannot be bitten by mosquitoes and getting infected. It is introduced a control variable u(·) in (1), which represents the effort of taking PPM. Additionally, a new parameter is required, ρ, depicting the protection duration per day. Depending on the PPM used, this value is adequate
Economic Burden of Personal Protective Strategies for Dengue Disease
323
for the individual protection capacity [5]. To reduce computational errors, it was normalized the differential equations, meaning that the proportions of each compartment of individuals in the population were considered, namely s=
S , Nh
p=
P , Nh
i=
I , Nh
r=
R Nh
and
Sm Im , im = Nm Nm The model with control is defined by: sm =
⎧ ds(t) ⎪ ⎪ = μh − (6Bβmh im (t) + u(t) + μh ) s(t) + (1 − ρ)p(t) ⎪ ⎪ dt ⎪ ⎪ ⎪ ⎪ ⎨ dp(t) = u(t)s(t) − ((1 − ρ) + μh ) p(t) dt di(t) ⎪ ⎪ = 6Bβmh im (t)s(t) − (ηh + μh ) i(t) ⎪ ⎪ ⎪ dt ⎪ ⎪ ⎪ ⎩ dr(t) = ηh i(t) − μh r(t) dt and
⎧ ⎪ ⎨ dsm (t) = μm − (Bβhm i(t) + μm ) sm (t) dt ⎪ ⎩ dim (t) = Bβhm i(t)sm (t) − μm im (t) dt
(3)
(4)
This set of equations is subject to the initial equations [21]:
s(0) =
11191 9 66200 1000 , p(0) = 0, i(0) = , r(0) = 0, sm (0) = , im (0) = . Nh Nh Nm Nm (5)
The mathematical model is represented by the epidemiological scheme in Fig. 1. Due to the impossibility of educating everyone to use PPM, namely because of budget constraints, time restrictions, or even the low individual willingness to using PPM, it is considered that the control u(·) is bounded between 0 and umax = 0.7. 2.2
Optimal Control Problem
In this section, an optimal control problem is proposed that portrays the costs associated with PPM and the restrictions of the epidemy. The objective functional is given by T γu2 (t)dt (6) J(u(·)) = R(T ) + 0
324
A. M. C. Brito da Cruz and H. S. Rodrigues
Fig. 1. Flow diagram of Dengue model with personal protection strategies
where γ is a constant that represents the cost of taking personal prevention measures per day and person. At the same time, it is relevant that this functional also has a payoff term: the number of humans recovered by disease at the final time, R(T ). It is expected that the outbreak dies out, and therefore, the total of recover individuals gives the cumulative number of persons infected by the disease. We want to minimize the total number of infected persons, and therefore recovered persons at the final time and the expenses associated with buying protective measures. Along time, we want to find the optimal value u∗ of the control u, such that ∗ ∗ , Im are solutions of the Eqs. the associated state trajectories S ∗ , P ∗ , I ∗ , R∗ , Sm (3) and (4) with the following initial conditions: s(0) 0,
p(0) 0,
i(0) 0,
r(0) 0,
sm (0) 0,
im (0) 0. (7)
The set of admissible controls is Ω = {u(·) ∈ L∞ [0, T ] : 0 u(·) < umax, ∀t ∈ [0, T ]}. The optimal control consists of finding (s∗ (·), p∗ (·), i∗ (·), r∗ (·), s∗m (·), i∗m (·)) associated with an admissible control u∗ (·) ∈ Ω on the time interval [0, T ] that minimizes the objective functional. Note that the cost function is L2 and the integrand function is convex with respect to the function u. Furthermore, the control systems are Lipschitz with respect to the state variables and, therefore, exists an optimal control [3]. The Hamiltonian function is H = H (s(t), p(t), i(t), r(t), sm (t), im (t), Λ, u(t)) = γu2 (t) + λ1 (μh − (6Bβmh im (t) + u(t) + μh ) s(t) + (1 − ρ)p(t)) + λ2 (u(t)s(t) − ((1 − ρ) + μh ) p(t)) + λ3 (6Bβmh im (t)s(t) − (ηh + μh ) i(t)) + λ4 (ηh i(t) − μh r(t)) + λ5 (μm − (Bβhm i(t) + μm ) sm (t)) + λ6 (Bβhm i(t)sm (t) − μm im (t))
Economic Burden of Personal Protective Strategies for Dengue Disease
325
Pontryagin’s Maximum Principle [17] states that if u∗ (·) is optimal control for the equations (3)–(6) with fixed final time, then there exists a nontrivial absolutely continuous mapping, the adjoint vector: Λ : [0, T ] → R6 , Λ(t) = (λ1 (t), λ2 (t), λ3 (t), λ4 (t), λ5 (t), λ6 (t)) such that s =
∂H , ∂λ1
p =
∂H , ∂λ2
i =
∂H , ∂λ3
r =
∂H , ∂λ4
sm =
∂H ∂H and im = , ∂λ5 ∂λ6
and where the optimality condition H (s∗ (t), p∗ (t), i∗ (t), r∗ (t), s∗m (t), i∗m (t), Λ(t), u∗ (t)) = min H (s∗ (t), p∗ (t), i∗ (t), r∗ (t), s∗m (t), i∗m (t), Λ(t), u(t)) 0u