Simulation and Modeling Methodologies, Technologies and Applications: 8th International Conference, SIMULTECH 2018, Porto, Portugal, July 29-31, 2018, Revised Selected Papers [1st ed. 2020] 978-3-030-35943-0, 978-3-030-35944-7

This book includes a selection of papers from the 8th International Conference on Simulation and Modeling Methodologies,

484 74 27MB

English Pages XIV, 197 [211] Year 2020

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Simulation and Modeling Methodologies, Technologies and Applications: 8th International Conference, SIMULTECH 2018, Porto, Portugal, July 29-31, 2018, Revised Selected Papers [1st ed. 2020]
 978-3-030-35943-0, 978-3-030-35944-7

Table of contents :
Front Matter ....Pages i-xiv
Atomistic Modelling and Simulation of Transmission Electron Microscopy Images: Application to Intrinsic Defects of Graphene (Cyril Guedj, Léonard Jaillet, François Rousse, Stéphane Redon)....Pages 1-19
Using Simulation in Business Process Analysis and Risk Management: The Blood Bank Case Study (Ilaria Angela Amantea, Antonio Di Leva, Emilio Sulis)....Pages 20-38
An SDN/NFV Based Approach for Mobility Management in 5G Networks (N. Omheni, F. Zarai, B. Sadoun, M. S. Obaidat)....Pages 39-53
Dockemu: An IoT Simulation Framework Based on Linux Containers and the ns-3 Network Simulator — Application to CoAP IoT Scenarios (Antón Román Portabales, Martín López Nores)....Pages 54-82
Iterative Construction of Complete Lyapunov Functions: Analysis of Algorithm Efficiency (Carlos Argáez, Peter Giesl, Sigurdur Hafstein)....Pages 83-100
A Pre-step Stabilization Method for Non-iterative Co-Simulation and Effects of Interface-Jacobians Identification (Simon Genser, Martin Benedikt)....Pages 101-125
A Heating Systems Application of Feedback Linearization for MTI Systems in a Tensor Framework (Kai Kruppa, Gerwald Lichtenberg)....Pages 126-152
Syntactic Generation of Similar Pictures (Nuru Jingili, Sigrid Ewert, Ian Sanders)....Pages 153-180
Mathematical Modeling of Alkaline Methanol Oxidation for Design of Efficient Fuel Cells (Tanja Clees, Igor Nikitin, Lialia Nikitina, Sabine Pott, Ulrike Krewer, Theresa Haisch)....Pages 181-195
Back Matter ....Pages 197-197

Citation preview

Advances in Intelligent Systems and Computing 947

Mohammad S. Obaidat Tuncer Ören Floriano De Rango   Editors

Simulation and Modeling Methodologies, Technologies and Applications 8th International Conference, SIMULTECH 2018, Porto, Portugal, July 29–31, 2018, Revised Selected Papers

Advances in Intelligent Systems and Computing Volume 947

Series Editor Janusz Kacprzyk, Systems Research Institute, Polish Academy of Sciences, Warsaw, Poland Advisory Editors Nikhil R. Pal, Indian Statistical Institute, Kolkata, India Rafael Bello Perez, Faculty of Mathematics, Physics and Computing, Universidad Central de Las Villas, Santa Clara, Cuba Emilio S. Corchado, University of Salamanca, Salamanca, Spain Hani Hagras, School of Computer Science and Electronic Engineering, University of Essex, Colchester, UK László T. Kóczy, Department of Automation, Széchenyi István University, Gyor, Hungary Vladik Kreinovich, Department of Computer Science, University of Texas at El Paso, El Paso, TX, USA Chin-Teng Lin, Department of Electrical Engineering, National Chiao Tung University, Hsinchu, Taiwan Jie Lu, Faculty of Engineering and Information Technology, University of Technology Sydney, Sydney, NSW, Australia Patricia Melin, Graduate Program of Computer Science, Tijuana Institute of Technology, Tijuana, Mexico Nadia Nedjah, Department of Electronics Engineering, University of Rio de Janeiro, Rio de Janeiro, Brazil Ngoc Thanh Nguyen , Faculty of Computer Science and Management, Wrocław University of Technology, Wrocław, Poland Jun Wang, Department of Mechanical and Automation Engineering, The Chinese University of Hong Kong, Shatin, Hong Kong

The series “Advances in Intelligent Systems and Computing” contains publications on theory, applications, and design methods of Intelligent Systems and Intelligent Computing. Virtually all disciplines such as engineering, natural sciences, computer and information science, ICT, economics, business, e-commerce, environment, healthcare, life science are covered. The list of topics spans all the areas of modern intelligent systems and computing such as: computational intelligence, soft computing including neural networks, fuzzy systems, evolutionary computing and the fusion of these paradigms, social intelligence, ambient intelligence, computational neuroscience, artificial life, virtual worlds and society, cognitive science and systems, Perception and Vision, DNA and immune based systems, self-organizing and adaptive systems, e-Learning and teaching, human-centered and human-centric computing, recommender systems, intelligent control, robotics and mechatronics including human-machine teaming, knowledge-based paradigms, learning paradigms, machine ethics, intelligent data analysis, knowledge management, intelligent agents, intelligent decision making and support, intelligent network security, trust management, interactive entertainment, Web intelligence and multimedia. The publications within “Advances in Intelligent Systems and Computing” are primarily proceedings of important conferences, symposia and congresses. They cover significant recent developments in the field, both of a foundational and applicable character. An important characteristic feature of the series is the short publication time and world-wide distribution. This permits a rapid and broad dissemination of research results. ** Indexing: The books of this series are submitted to ISI Proceedings, EI-Compendex, DBLP, SCOPUS, Google Scholar and Springerlink **

More information about this series at http://www.springer.com/series/11156

Mohammad S. Obaidat Tuncer Ören Floriano De Rango •



Editors

Simulation and Modeling Methodologies, Technologies and Applications 8th International Conference, SIMULTECH 2018, Porto, Portugal, July 29–31, 2018, Revised Selected Papers

123

Editors Mohammad S. Obaidat King Abdullah II School of Information Technology University of Jordan Amman, Jordan

Tuncer Ören School of Electrical Engineering and Computer Science University of Ottawa Ottawa, ON, Canada

Nazarbayev University Astana, Kazakhstan Floriano De Rango University of Calabria Rende, Cosenza, Italy

ISSN 2194-5357 ISSN 2194-5365 (electronic) Advances in Intelligent Systems and Computing ISBN 978-3-030-35943-0 ISBN 978-3-030-35944-7 (eBook) https://doi.org/10.1007/978-3-030-35944-7 © Springer Nature Switzerland AG 2020 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 present book includes extended and revised versions of a set of selected papers from the 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2018), held in Porto, Portugal, in the period July 29–31, 2018. SIMULTECH 2018 received 83 paper submissions from 29 countries, of which 11% were included in this book. The papers were selected by the event chairs, and their selection is based on a number of criteria that includes the reviews and suggested comments provided by the program committee members, the session chairs’ assessments and also the program chairs’ global view of all papers included in the technical program. The authors of selected papers were then invited to submit a revised and extended version of their papers having at least 30% new material. The purpose of the 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2018) was to bring together researchers, engineers, applied mathematicians and practitioners interested in the advances and applications in the field of system simulation. Four simultaneous tracks were held, covering on one side domain-independent methodologies and technologies and on the other side practical work developed in specific application areas. The specific topics listed under each of these tracks highlight the interest of this conference in aspects related to computing, including conceptual modeling, agent-based modeling and simulation, interoperability, ontologies, knowledge-based decision support, Petri nets, business process modeling and simulation, among others. The papers selected to be included in this book contribute to the understanding of relevant trends of current research on simulation tools and platforms, formal methods, as well as complex system modeling and simulation. The readers can find contributions of simulation in business process analysis and risk management, Internet of things, advanced material science and fuel cell design. Formal method contributions include visual password systems, co-simulation of complex subsystems, heating system application of feedback linearization for MTI systems in a tensor framework and iterative construction of complete Lyapunov functions.

v

vi

Preface

We would like to thank all the authors for their contributions as well as to the reviewers who have helped ensuring the quality of this publication. We also thank the staff of INTICCC and Springer for their good efforts and cooperation. July 2018

Mohammad S. Obaidat Tuncer Ören Floriano De Rango

Organization

Conference Chair Mohammad S. Obaidat

University of Jordan, Jordan, and Nazarbayev University, Kazakhstan

Program Chairs Tuncer Ören (Honorary) Floriano De Rango

University of Ottawa, Canada University of Calabria, Italy

Program Committee Nael Abu-Ghazaleh Lyuba Alboul Mikulas Alexik Carlos Argáez Gianfranco Balbo Isaac Barjis Martin Benedikt Mohamed Bettaz Louis Birta Wolfgang Borutzky Christos Bouras António Brito Jesus Carretero Francesco Casella Rodrigo Castro

University of California, Riverside, USA Sheffield Hallam University, UK University of Zilina, Slovak Republic University of Iceland, Iceland University of Torino, Italy City University of New York, USA Technische Universität Graz, Austria Philadelphia University, Jordan University of Ottawa, Canada Bonn-Rhein-Sieg University of Applied Sciences, Germany University of Patras and CTI&P Diophantus, Greece INESC TEC, Faculdade de Engenharia, Universidade do Porto, Portugal Computer Architecture Group, University Carlos III of Madrid, Spain Politecnico di Milano, Italy University of Buenos Aires, Argentina

vii

viii

Srinivas Chakravarthy Franco Cicirelli Tanja Clees Flavio Correa da Silva Andrea D’Ambrogio Guyh Dituba Ngoma Karim Djemame Atakan Dogan Julie Dugdale Dirk Eisenbiegler Sabeur Elkosantini Georg Engel Zuhal Erden Denis Filatov Jason Friedman Marco Furini José Manuel Galán Petia Georgieva Charlotte Gerritsen John Goulermas Alexandra Grancharova Francisco Grimaldo Mykola Gusti Maamar Hamri Cathal Heavey Monika Heiner Tsan-Sheng Hsu Xiaolin Hu Eric Innocenti Nobuaki Ishii Mhamed Itmi Syed Waqar ul Qounain Jaffry Emilio Jiménez Macías Nina Kargapolova Peter Kemper

Organization

Kettering University, USA Università della Calabria, Italy Fraunhofer Institute for Algorithms and Scientific Computing (SCAI), Germany University of Sao Paulo, Brazil Università di Roma “Tor Vergata”, Italy Université du Québec en Abitibi-Témiscamingue, Canada University of Leeds, UK Anadolu University, Turkey Laboratoire d’Informatique de Grenoble, France University of Furtwangen, Germany University of Monastir, Tunisia AEE - Institute for Sustainable Technologies, Austria Atılım University, Turkey Institute of Physics of the Earth, Russian Academy of Sciences, Russian Federation Tel Aviv University, Israel Università di Modena e Reggio Emilia, Italy Universidad de Burgos, Spain University of Aveiro, Portugal Vrije Universiteit Amsterdam, the Netherlands University of Liverpool, UK University of Chemical Technology and Metallurgy, Bulgaria Universitat de València, Spain International Institute for Applied Systems Analysis, Austria Laboratoire d’Informatique et Systèmes, France University of Limerick, Ireland Brandenburg University of Technology Cottbus, Germany Institute of Information Science, Academia Sinica, Taiwan Georgia State University, USA IUT DE CORSE - University of Corsica, France Kanagawa University, Japan INSA Rouen, France University of the Punjab, Pakistan Universidad de La Rioja, Spain Institute of Computational Mathematics and Mathematical Geophysics, Russian Federation College of William and Mary, USA

Organization

Juš Kocijan Petia Koprinkova-Hristova Vladik Kreinovich Claudia Krull Jean Le Fur Willem le Roux Pierre L’Ecuyer Mike Lees Alberto Leva Richard Lipka Antonio Lopes Maria Celia Lopes José Machado Maciej Malawski Andrea Marin Carla Martin-Villalba Moreno Marzolla Radek Matušu Roger McHaney Nuno Melão Adel Mhamdi Bozena Mielczarek Vikram Mittal Cristina Montañola Sales Roberto Montemanni Jairo Montoya-Torres Bertie Müller Ivan Mura Navonil Mustafee Nazmun Nahar Angela Nebot Bao Nguyen Lialia Nikitina James Nutaro Mohammad Obaidat

ix

Jozef Stefan Institute, Slovenia IICT - Bulgarian Academy of Sciences, Bulgaria University of Texas at El Paso, USA Otto von Guericke University Magdeburg, Germany IRD (Inst. Res. Development), France CSIR, South Africa Universite de Montreal, Canada University of Amsterdam, the Netherlands Politecnico di Milano, Italy University of West Bohemia, Czech Republic University of Porto, Portugal COPPE-UFRJ, Brazil Institute of Engineering, Polytechnic of Porto, Portugal AGH University of Science and Technology, Poland University of Venice, Italy UNED, Spain University of Bologna, Italy Tomas Bata University in Zlin, Czech Republic Kansas State University, USA Instituto Politécnico de Viseu, Escola Superior de Tecnologia e Gestão de Viseu, Portugal RWTH Aachen University, Germany Wroclaw University of Science Technology, Poland United States Military Academy, USA Universitat Politècnica de Catalunya, Spain IDSIA - Dalle Molle Institute for Artificial Intelligence (USI-SUPSI), Switzerland Universidad de La Sabana, Colombia Swansea University, UK Universidad de los Andes, Colombia University of Exeter, UK University of Jyvaskyla, Finland, and University of Tartu, Estonia Universitat Politècnica de Catalunya, Spain Defence R&D Canada and University of Ottawa, Canada Fraunhofer Institute for Algorithms and Scientific Computing (SCAI), Germany Oak Ridge National Laboratory, USA University of Jordan, Jordan, and Nazarbayev University, Kazakhstan

x

Sorin Olaru Paulo Oliveira Feng Pan Victor Parque George Pavlidis Alessandro Pellegrini L. Felipe Perrone Alexandre Petrenko Alexandr Petukhov Régis Plateaux Tomas Potuzak Jacinto Quintero Mpho Raborife Urvashi Rathod Manuel Resinas Jerzy Respondek M. Riazi José Risco-Martín Oliver Rose

Rosaldo Rossetti Jaroslav Rozman Katarzyna Rycerz Jordi Sabater-Mir Paulo Salvador Antonella Santone Jean-François Santucci Jefrey Smith Xiao Song Yuri Sotskov

James Spall Giovanni Stea Mu-Chun Su

Organization

CentraleSupélec, France Universidade de Tras-os-Montes e Alto Douro, Portugal Liaoning Normal University, China Waseda University and Egypt-Japan University of Science and Technology (E-JUST), Japan “Athena” Research Centre, Greece Sapienza University of Rome, Italy Bucknell University, USA Centre de Recherche Informatique de Montreal, Canada Lobachevsky State University of Nizhni Novgorod, Russian Federation SUPMECA, France University of West Bohemia, Czech Republic Universidad de Los Andes, Venezuela University of Johannesburg, South Africa Symbiosis Centre for Information Technology (SCIT), India Universidad de Sevilla, Spain Silesian University of Technology, Poland Kuwait University, Kuwait Universidad Complutense de Madrid, Spain Universität der Bundeswehr München (University of the Federal Armed Forces Munich), Germany Laboratório de Inteligência Artificial e Ciência de Computadores, LIACC/FEUP, Portugal Brno University of Technology, Czech Republic Institute of Computer Science, AGH, Krakow, Poland IIIA-CSIC, Spain Instituto de Telecomunicações, DETI, University of Aveiro, Portugal University of Molise, Italy SPE UMR CNRS 6134 - University of Corsica, France Auburn University, USA Beihang University, China United Institute of Informatics Problems of the National Academy of Belarus, UIIP, Minsk, Belarus Johns Hopkins University, USA University of Pisa, Italy National Central University, Taiwan

Organization

Nary Subramanian Peter Summons Antuela Tako Halina Tarasiuk Constantinos Theodoropoulos Mamadou Traoré Klaus Troitzsch Zhiying Tu Kay Tucci Adelinde Uhrmacher Alfonso Urquia Durk-Jouke van der Zee Svetlana Vasileva-Boyadzhieva Vladimír Veselý Maria Viamonte Manuel Villen-Altamirano Friederike Wall Frank Werner Philip Wilsey Kuan Yew Wong Hui Xiao Yiping Yao Gregory Zacharewicz František Zboril

xi

The University of Texas at Tyler, USA University of Newcastle, Australia Loughborough University, UK Warsaw University of Technology, Poland The University of Manchester, UK University of Bordeaux, France University of Koblenz-Landau, Koblenz Campus, Germany Harbin Institute of Technology, China Universidad de los Andes, Venezuela University of Rostock, Germany Universidad Nacional de Educación a Distancia, Spain University of Groningen, the Netherlands Bulgarian Modeling and Simulation Association (BULSIM), Bulgaria Faculty of Information Technology, Brno University of Technology, Czech Republic Instituto Superior de Engenharia do Porto, Portugal Universidad de Malaga, Spain Alpen-Adria-Universität Klagenfurt, Austria Otto-von-Guericke-Universität Magdeburg, Germany Univ. of Cincinnati, USA Universiti Teknologi Malaysia, Malaysia Southwestern University of Finance and Economics, China National University of Defense Technology, China IMT Mines Ales, France Faculty of Information Technology, Czech Republic

Additional Reviewers Gökhan Cinar Tansu Filik Celal Kandemir Francesco Mercaldo Ezequiel Pecker-Marcosig Lucio Santi Long Wang

Eskisehir Osmangazi University, Turkey Anadolu University, Turkey Eskisehir Osmangazi Üniversitesi, Turkey National Research Council of Italy (CNR), Italy FIUBA, ICC, CONICET, Argentina Universidad de Buenos Aires, Argentina Johns Hopkins University, USA

xii

Organization

Invited Speakers Juan M. Durán Janusz Kacprzyk Gabriel Wainer

University of Stuttgart, Germany Systems Research Institute, Polish Academy of Sciences, Poland Carleton University, Canada

Contents

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images: Application to Intrinsic Defects of Graphene . . . . . Cyril Guedj, Léonard Jaillet, François Rousse, and Stéphane Redon

1

Using Simulation in Business Process Analysis and Risk Management: The Blood Bank Case Study . . . . . . . . . . . . . . . . . . . . . . Ilaria Angela Amantea, Antonio Di Leva, and Emilio Sulis

20

An SDN/NFV Based Approach for Mobility Management in 5G Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. Omheni, F. Zarai, B. Sadoun, and M. S. Obaidat

39

Dockemu: An IoT Simulation Framework Based on Linux Containers and the ns-3 Network Simulator — Application to CoAP IoT Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Antón Román Portabales and Martín López Nores Iterative Construction of Complete Lyapunov Functions: Analysis of Algorithm Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Carlos Argáez, Peter Giesl, and Sigurdur Hafstein

54

83

A Pre-step Stabilization Method for Non-iterative Co-Simulation and Effects of Interface-Jacobians Identification . . . . . . . . . . . . . . . . . . 101 Simon Genser and Martin Benedikt A Heating Systems Application of Feedback Linearization for MTI Systems in a Tensor Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Kai Kruppa and Gerwald Lichtenberg Syntactic Generation of Similar Pictures . . . . . . . . . . . . . . . . . . . . . . . . 153 Nuru Jingili, Sigrid Ewert, and Ian Sanders

xiii

xiv

Contents

Mathematical Modeling of Alkaline Methanol Oxidation for Design of Efficient Fuel Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Tanja Clees, Igor Nikitin, Lialia Nikitina, Sabine Pott, Ulrike Krewer, and Theresa Haisch Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images: Application to Intrinsic Defects of Graphene Cyril Guedj1(&), Léonard Jaillet2, François Rousse2, and Stéphane Redon3 1

Univ. Grenoble Alpes, CEA, LETI, 38000 Grenoble, France [email protected] 2 Univ. Grenoble Alpes, Inria, CNRS, Grenoble INP, LJK, 38000 Grenoble, France 3 OneAngstrom, Grenoble, France [email protected] https://www.oneangstrom.com, https://www.minatec.org/fr/, http://www.leti-cea.fr/cea-tech/leti, https://www.samson-connect.net

Abstract. The characterization of advanced materials and devices in the nanometer range requires complex tools to understand the precise links between structure and properties. This paper demonstrates that the modelling of graphene-based defects can be obtained efficiently for various atomic arrangements using the Brenner module of the SAMSON software platform. The signatures of all kinds of defects are computed in terms of energy and simulated scanning transmission electron microscopy images. The results are in good agreement with the majority of the available theoretical and experimental data. This original methodology is an excellent compromise between the speed and the precision required by the semiconductor industry and opens the possibility of realistic in-silico research conjugated to the experimental nanocharacterization of these promising materials. We propose a novel approach to compare the agreement between experiment and simulation by using the projected radial distribution function. The maximum projected Euclidian distance between the model and the experiment is always better than 100 pm. Keywords: Atomic modelling  Electron microscopy  STEM  Graphene  Defects  Microstructure  Image simulation  Materials  Characterization  Atomistic

1 Introduction Digitals tools are more and more required to study, design and prototype nano-objects, although the underlying physics is so complex that the quest for a universal tool is still far from being over. With the increase of the computational power and the Grenoble INP—Institute of Engineering Univ. Grenoble Alpes. © Springer Nature Switzerland AG 2020 M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 1–19, 2020. https://doi.org/10.1007/978-3-030-35944-7_1

2

C. Guedj et al.

improvement of the simulation methods, new possibilities are emerging. The increasing pace of the semiconductor industry requires rapid and efficient simulation and modelling strategies to analyse the results and improve the technological performances of various nano-devices, sensors or actuators. In many systems, the optical or electronic properties are driven by interfacial or by defect-engineered phenomena. In order to understand the links between structure and properties, the nanocharacterization of materials and devices must be advantageously combined with atomistic modelling studies. The equilibrium positions of all atoms provide the necessary basis to simulate the relevant physical properties, which are measured with increasing precision and sensitivity. The combination of experiments conducted in parallel with simulations is particularly relevant in the field of transmission electron microscopy (TEM), because the correlation between the measured image and the actual arrangement of atoms is not straightforward in general. Like most characterizations, the precise simulation of TEM images is usually mandatory to interpret the experimental results at the atomic scale. With developments in aberration-corrected transmission electron microscopy, it is now possible to characterize vacancy defects in graphene [1]. This paper provides an optimized methodology to model high resolution scanning transmission electron microscopy (HRSTEM) experiments of graphene-based defects. For this, it uses relaxed atomistic models obtained with the Brenner module of the Software for Adaptative Modeling and Simulation Of Nanosystems (SAMSON) (www.samsonconnect.fr). The case of graphene-based defects is extremely interesting, because this is a 2D material with outstanding mechanical [2–6], and electronic [7, 8] properties. Hence, graphene belongs to a family of 2D materials which generates huge expectations in terms of possible applications [9–14]. The high mobility of graphene makes it advantageous in the perspective of post-silicon electronics, but the defectivity remains a recurrent critical issue. A wide variety of deviations from a perfect crystal might occur during the processing of graphene, either due to the growth conditions or to various sources of degradation, such as knock-on interactions, electron or ionic collisions, plasma damage, chemical reactions, etc. The link between defectivity and physical properties is critical for the device performance. Thus, defect engineering is certainly the key of the possible industrial viability of this material. In this paper, we study the defects in graphene in terms of structure and energy. Our methodology used to build the systems and to simulate TEM images provides the necessary basis to analyze graphene-based defects, in comparison with available data from the literature.

2 Methodology 2.1

State of the Art

Many methods exist to simulate hydrocarbon systems, such as molecular dynamics, Monte Carlo and many other variants. Typically, these simulations come with ab-initio quantum-chemistry computations. Therefore, computational studies of complex defects are often limited by the maximum number of atoms that the first-principle methods can handle. In all cases, these methods require an initial structural model consisting in the description of all atoms in terms of position and chemical nature. In the case of pure

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

3

crystals, the 3D periodicity helps in calculating all the atom positions for large systems (i.e. more than 50 000 atoms), but in case of localised asymmetrical defects, this task is much more tedious or even completely unfeasible in the worst cases. Hence, a computational tool that is fast enough to handle physically-relevant calculations with tens of thousands atoms is highly desirable. The SAMSON platform and its Brenner module appear to be ideally suited to this task, since they can handle complex models and simulate very large systems in a timescale typically less than a day, which is compatible with the feedback delay required by most research teams in nanomaterial characterization. This module appears as an interactive tool for performing predictive modelling, particularly adapted to the very sustained pace of experimentalists. 2.2

The SAMSON Software Platform

SAMSON is a user-friendly software platform for computational nanoscience developed by the NANO-D group at Inria (https://www.samson-connect.net). SAMSON has an open architecture, and users customize their installation with SAMSON Elements, i.e. modules for SAMSON that may contain apps, editors, builders, force fields, optimizers, visualizations, etc. SAMSON Elements are available with a provided Software Development Kit for further customization. At the time of writing, about fifty SAMSON Elements are available on SAMSON Connect, for a number of application domains, including materials science (e.g. Brenner model, graphene generator, Universal Force Field, Crystal creator, graphene TEM image analyser, etc.) and drug design (GROMACS force fields, AutoDock Vina, Interactive Ramachandran plots, Normal Modes Analysis, PEPSI-SAXS, etc.). Users may mix and match SAMSON Elements to design their own processes and workflows, and may use Python scripting to perform modelling and simulation tasks. 2.3

Brenner Model

To simulate the structure of defects in graphene, the atomic positions are computed from energy minimization using the well-known bond-order Brenner interatomic potential [15–21]. This is a parametrized version of Tersoff’s potential which includes terms to correct for the overbindings of radicals. Brenner potential is ideally suited to the interactive digital modelling (virtual nano-engineering) of complex hydrocarbon structures like carbon nanotubes [22], fullerene [23], or defective single layered graphene [24]. We detail below how the energy and forces can be described from this potential. Energy The Brenner interatomic potential is particular in the sense that it mostly focuses on covalent bonds, without long-range interaction. Hence, the potential energy VB of the bonding interactions is a sum over interacting atoms (i.e. separated by less than 0.2 nm): VB ¼

X X i

j[i

    ½V R rij  bij V A rij 

ð1Þ

The details are given in the original reference [17]. Since bonds are defined dynamically via a bond-order function evolving with the interatomic distances, this reactive potential has the ability to describe chemical reactions.

4

C. Guedj et al.

The potential also includes angular and dihedral terms, radical energetics and the influence of p bonds [25]. To overcome the lack of long-range interactions, a non-bonded interaction potential term is added. It consists in a sum of pairwise potential contributions. For simplicity, the approach of Los et al. [26] is chosen and the Van der Waals potential term is added: VNB ðrij Þ ¼ b expðc0 rÞ  2

r6 Vshift r

ð2Þ

to adjust the precision, using b = 3224.9 eV, c0 = 35.995 nm−1, 2 ¼ 0:01396 eV and r = 0.344 nm. Forces The force terms can be calculated from the gradient of the potential V. More specifically, the Force Fi applied on atom i at position xi can be written:    X @V @V @rji Fi ¼  ¼ j;ði;jÞ2b dr dxi dxi ij

ð3Þ

where rij is the distance between atoms i and j, and b is the set of all pairs of atoms involved in the interaction: b ¼ fi; rij\Dmax ij g

ð4Þ

being a threshold distance depending on the atom types. with Dmax ij Adaptive Brenner The adaptive version of the Brenner potential has been implemented in SAMSON [25]. Its interest is that it relies on an algorithm which incrementally updates the forces and the total potential energy. It basically consists in an incremental dynamical update of the set of interacting atoms and all information related to one, two, three or four atoms. Bonds are divided into 4 types: bond with a relative motion, bonds with a change in potential, bond with a change in conjugate number, and bonds without any change in potential. After initialization, all terms with relative motions are updated incrementally and after a first level and second level potential update, the forces are henceforward updated. This allows the algorithm to linearly scale with the number of updated bonds. Therefore the computational cost is decoupled from the number of atoms in the system and physically-based editing becomes markedly faster. To take advantage of adaptive Brenner, an adaptive mechanism is proposed in SAMSON to update when minimizing a system. Such an approach in Cartesian coordinates consists in deciding for each atom if it might move or be frozen in space. This decision is made by comparing the norm of its potential displacement with a threshold value, either automatically deduced from the system state or by a manual choice fixed by the user. This implementation is an extension of the internal coordinates and articulated bodies simulation [27]. This efficient update mechanism allows continuous minimization of the system energy during the edition of the system, which helps to build realistic structures in a

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

5

very convenient manner. The user action step (creating/moving/deleting atoms) alternates with the adaptative minimization steps to parallelize the structure editing and the energy minimization. 2.4

Simulation of Microscopy Images

Once the structure is fully relaxed, it is possible to compute the corresponding highresolution scanning transmission microscopy image by using the QSTEM software [28]. This program allows accurate image simulations including fully dynamic calculations. QSTEM computes the true 3D potential distribution and numerically integrates every slice of the potential map. This enables a thickness reduction without limitations in the multislice calculation. In addition, it is possible to explore a wide range of experimental setups in order to evaluate the best conditions to observe the defects. Here the images are simulated using a typical voltage of 80 kV, a C3 spherical aberration of 0.001 mm, a Cc chromatic aberration of 1 mm, an energy spread of 0.16 eV and a convergence angle of 20 mrad, which are reasonable values to compare with highresolution scanning transmission electron microscopy (HRSTEM) experiments from an aberration-corrected microscope. The detectors collection angle are chosen between 50 mrad and 200 mrad for realistic high-angle annular dark field (HAADF) conditions. In this conditions of Z-contrast imaging, the contrast scales with the atomic number with a power-law dependence [29]. In addition, the HRTEM images are also calculated with QSTEM using a voltage of 80 kV, all aberration coefficients equals to zero except for the chromatic aberration of 1 mm, a spherical aberration of 5 µm and a vibration of 3 nm in all directions. In these conditions, the HRTEM contrasts are usually comparable to HRSTEM, and the superimposition of the atomic model to the (S)TEM image provides an efficient method of validation. To outlines the most striking features and compare the relative positions, we have used suitable look-up tables (LUT) to colorize the experimental TEM and the simulated STEM images. 2.5

Quantitative Comparison Between Experiment and Simulation

The difference between the model and the reality is required to evaluate the trueness and the precision of the simulations. This point is usually far from trivial. In our case, the TEM image is compared to the simulated one, but many sources of errors and drifts usually bias the experimental results. Graphene can be damaged via knock-on damage, where atoms are displaced by the impacts of the imaging electron beam, therefore lowdose and low-energy (< 80 keV) conditions are required. Other radiation damage such as ionization [30] may also create and modify the defects during the observation, therefore the TEM sample is usually affected by dynamical changes during the measurement. In addition, the electrical parameters of the microscope are also subjected to possible drifts, therefore images have to be acquired only within a small time window. A permanent compromise between resolution and sample damage has to be obtained [31–33]. In addition, all kinds of instabilities including electrostatic, magnetic and electromagnetic noise [34] or instabilities caused by the sample stage can lead to image blurring in case of long exposure times. Hence, obtaining a good image of a graphene defect with atomic resolution is a real challenge [35].

6

C. Guedj et al.

The simulation process may be also affected by errors. HAADF-HRSTEM images can match simulations quantitatively to within few percent [36, 37], therefore the current understanding of image formation should be adequate when the model correctly accounts for the contributions of thermal diffuse scattering which dominates the Zcontrast. However, quantitative comparisons in HRTEM may be prone to a large (100– 400%) discrepancy between theory and experiment, (Stobbs factor) [38–44]. This factor may be impacted by the superficial amorphous layer resulting from the sample preparation process. Many parameters are used to model the optical properties of the microscope lens, and the precision and accuracies of these parameters strongly affect the confidence of the fit. A quantitative approach therefore relies on both a precise determination of the experimental parameters of the sample and the microscope, and a reliable measure for the degree of similarity between the simulations and the experimental image. To take into account the large variations of experimental parameters used for microscopy in the literature, we propose here to obtain a quantitative comparison between experiment and simulation by using the projected radial distribution function (p-RDF) of the HRTEM or the HRSTEM image transformed into atomic positions via proper image simulation. The radial distribution function RDF (or pair correlation function) is classically defined in statistical mechanics by the probability to find one atom at a given distance from a reference atom. To evaluate this function, it is necessary to compute the distribution of distances between all particle pairs around a reference atom. The RDF is very sensitive to local ordering effects at the atomic scale, for instance in graphene [45]. Here, in a way similar to astrophysics, we define the projected RDF, labelled p-RDF by the distribution of interatomic distances projected on the observation plan. For TEM experiments, the observation plan is obviously the sample orientation plan, perpendicular to the electron beam. The projected distances between spots in a HR(S)TEM image can be measured, they constitute an observable linked to the real atomic positions, after TEM image simulations. Hence, the experimental results can be quantitatively compared with the simulations using the p-RDF.

3 Results and Discussion 3.1

Introducing Remarks

In the following, we illustrate the cases of typical defects induced by electron-beam damage during TEM observation. The probability to observe these defects is relatively high, for instance when the electron beam energy is set up above the threshold for knock-on damage in sp2-bonded carbon structures (i.e. >100 keV) [46, 47]. These defects could also be obtained by other interactions, such as ionic or mechanical or by plasma damage. Here we focus the analysis on simple topological defects, vacancies and adatom, but the same conclusion applies to all defects we have studied so far (dislocations, novel phases, extended defects, etc.), based on available published data. In the following figures, colorization of experimental images is obtained with the Fiji software [48]. The various atomistic models correspond to flake system of 1308

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

7

atoms with flat borders, built in SAMSON and optimized thanks to the Brenner module. The clear advantage of the Brenner approach compared to ab-initio is a *4 orders of magnitude improvement in terms of simulation speed. Moreover, as we will see, the precision achieved is sufficient to match the experimental results and we obtained similar findings for all the graphene-based defects we found in literature, without apparent limitation, and even for systems with tens of thousands of atoms. In the following, all experimental data already published are used with permissions. 3.2

Stone-Wales Defect

Graphene has the ability to form nonhexagonal rings, and the simplest example is the Stone-Wales (SW) defect [49] in which four hexagons are transformed into two pentagons and two heptagons [SW(55-77) defect] by an in-plane 90° rotation of two carbon atoms with respect to the midpoint of the C-C bond (Fig. 1).

Fig. 1. Left: atomistic ball and stick model of the unstable flat SW(55-77) defect in graphene. Black balls represent carbon atoms. Right: Corresponding HRSTEM-HAADF simulated image.

In pure graphene, the C-C bond distance is 0.142 nm according to Pauling [50], which is the exact value provided by our code. The simulation also matches very well previous experimental results [51–53] and the corresponding ab-initio simulations [54, 55]. The planar configuration is unstable and may relax in the 3D sinelike or cosinelike configuration. In our case, the minimum energy configuration of 6 eV is obtained for the sinelike configuration (Fig. 2), in reasonable agreement with the configuration and the energy of 5.82 ± 0.03 eV obtained by quantum Monte Carlo [55] and the value of 5.9 eV obtained by DFT-LDA [56]. An absolute comparison with the exact and precise value of the formation energy is difficult, because of the significant dispersion of formation energies published in the literature, depending on the DFT options or the size of the supercell [54, 55, 57–59]. Meanwhile, the buckling height value of 0.156 nm is very close to the value of 0.161 nm obtained by DFT for the biggest cell (11  11) of Ma et al. [55]. The SW defects are not simple planar defects but rather involve 3D displacements (Fig. 3). The Fig. 4 shows that a reasonable agreement is obtained between the experimental and simulated p-RDF but many factors may influence these results. Experimentally, the

8

C. Guedj et al.

Fig. 2. Atomistic model of the lowest energy configuration SW(55-77) sinelike defect in graphene, with bond distances, superimposed with the experimental HRTEM image of Kotakoski [52, 53]. Colorization has been added to help the interpretation.

Fig. 3. Sideview of the SW(55-77) sinelike defect in orthographic projection.

HRTEM image may suffer from optical aberration, sample drift, contamination and damage, especially with the very fragile defects of graphene. The presence of surface oxycarboneous species or hydrogen at the surface may slighty modify the images during these difficult measurements. The microscope parameters are usually prone to various sources of instabilities, therefore a direct comparison between experiment and simulation is not straightforward, nevertheless a reasonable agreement is obtained. A first major peak around 142 pm is observed in both the experimental and simulated p-RDF, which corresponds to the carbon atoms in first nearest neighbour (C1nn) configuration. The peak is very sharp in the simulation, because the positions are frozen around the equilibrium configuration. In the HRTEM experiment, a significant deviation from the ideal positions is observed, because of all sources of blurring and noise. The maximum deviation between experiment and simulation is around ±40 pm, as can be verified at looking the experimental broadening of the C1nn peak. Hence, in this case, a fairly good quantitative agreement between experiment and simulation is obtained, with a maximum relative deviation of atomic positions less than 40 pm.

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

9

Fig. 4. Comparison between the p-RDF deduced from the HRTEM image of Kotakoski [52, 53] and from the atomistic simulations using the Brenner potential (bottom).

3.3

Monovacancy (V1 Defects)

V1 (5-9) The removal of one carbon atom from the graphene network results in the formation of a single vacancy, which has been studied both theoretically and experimentally [52–55, 60, 61]. Our simulated model matches extremely well the experimental HRTEM images published in the literature (Figs. 5, 6 and 7). We obtained a formation energy of 5.45 eV, which is less than the range of [7.6, 7.9] eV obtained by DFT [59]. The symmetric monovacancy (s-MV) is known to exhibit a Jahn Teller distortion, and may reconstruct into a closed five- and nine-membered pair of rings. The reconstructed monovacancy (r-MV) arrangement lowers the energy of the symmetrical vacancy structure in agreement with ab-initio calculations [62].

Fig. 5. Let: atomistic model of the V1 (5-9) defect superimposed to the colorized experimental HRTEM image [52, 53]. Right: simulated HRSTEM-HAADF image.

10

C. Guedj et al.

Another comparison with HRTEM experiment (Fig. 6) shows that the best agreement between experiment and simulation is obtained for the reconstructed model r-MV, in expected agreement with our lowest computed energy. Hence, our methodology provides a convenient and realistic approach to model the HRTEM images at the atomic scale for this case. We found similar findings for all the cases we have studied, without any exception. In general, the precise comparison with experiment must include the possible extrinsic contamination by oxycarboneous species, by hydrogen or by water for instance to be fully significant, therefore a significant comparison should take all these possible effects into account. Once again, the quantitative comparison between experiment and simulation is verified via the p-RDF, and an overall good agreement is obtained. The maximum deviation in the atomic positions corresponds to a broadening of the C1nn peak less than *30 pm (Fig. 8).

Fig. 6. Atomistic model of the V1 (5-9) defect superimposed to the experimental HRTEM image published by Robertson [63]. Left: r-MV (also labelled C2v). Right: s-MV.

Fig. 7. Atomistic model of the V1 (5-9) defect r-MV superimposed to the experimental HRTEM defect image entitled “SALVE-III-project-HRTEM-graphene-vacance-foreign-atoms-defectszoom.png” obtained by the SALVE III project [64].

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

11

Fig. 8. Comparison between the p-RDF deduced from the experimental image of the SALVE III project (top) and from the Brenner atomistic simulations (bottom).

Fig. 9. Left: atomistic model of the V1 (5-5) defect superimposed to the simulated HRSTEM image. Right: model superimposed to the experimental HRSTEM image [65].

V1 (5-5) The V1 (5-5) state (Fig. 6) may be considered as intermediary between the V1 (5-9) rMV and s-MV [58]. Our calculations predicts a formation energy of 5.01 eV, which means that such defect should be observable in principle. The simulated HRSTEMHAADF of Fig. 9 is so close to the image of pure graphene that it might not be identified in most cases, except perhaps in ultra-low doses quantitative experiments to minimize the knock-on energy provided by the incident electrons and at very low temperatures to freeze the thermal motion. In the supplementary movie provided by Lehtinen [65], a pattern similar to the V1 (5-5) is possibly obtained, just prior to the formation of a more extended defect. Although the contrasts are very rapidly changing, the V1 (5-5) is presumably a reactive seed for more complex defect growth. This type of defect has been observed experimentally with the central 4-fold atom being substituted by silicon [66]. The quantitative comparison between experiment and simulation is provided with the p-RDF (Fig. 10), and a good agreement is obtained. The maximum deviation in the atomic positions corresponds to a broadening of the C1nn peak inferior to *40 pm.

12

C. Guedj et al.

Fig. 10. Comparison between the p-RDF of V1 (5-5) deduced from the experimental image (top) and from the Brenner atomistic simulations (bottom).

3.4

Divacancy (V2 Defects)

V2 (5-8-5) When two individual diffusing mono-vacancies meet they will coalesce into a nearestneighbour divacancy defect (equivalent to removing a carbon dimer from the lattice). This process results in the formation of the stable pentagon–octagon–pentagon (5-8-5) structure, which has been widely observed in high-resolution transmission electron microscopy (HRTEM) images [52, 53, 63, 65, 67]. Our calculation provides a formation energy of 7.29 eV, not far from 7.59 eV by DT-LDA [68] and 7.52 eV by Tight Binding [69, 70]. The comparison with experiment (Fig. 11) is once again very positive, with a nearly perfect match with published experimental TEM results. The V2 (5-8-5) defects may mutate into the V2 (555-777) and V2 (5555-6-7777) states due to electron beam irradiation for instance, and these transitions were observed by HRTEM [52, 53, 71].

Fig. 11. Left: atomistic model of the V2 (5-8-5) defect superimposed to the colorized experimental HRTEM image [52, 53]. Right: simulated HRSTEM-HAADF image.

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

13

The quantitative comparison between experiment and simulation is quantified via the p-RDF (Fig. 12), and a good agreement is obtained. The maximum deviation in the atomic positions corresponds to a broadening of the C1nn peak inferior to *40 pm.

Fig. 12. Comparison between the p-RDF of the V2 (5-8-5) defect deduced from the experimental image (top) and from the Brenner atomistic simulations (bottom).

Case V2 (555-777) The structure of the V2 (555-777) divacancy is displayed in Fig. 13, showing an excellent agreement between experiment and simulation (Fig. 14).

Fig. 13. Left: atomistic model of the V2 (555-777) defect superimposed to the colorized experimental HRTEM image [52, 53]. Right: simulated HRSTEM-HAADF image.

Fig. 14. Comparison between the p-RDF of the V2 (555-777) defect deduced from the experimental image (top) and from the Brenner atomistic simulations (bottom).

14

C. Guedj et al.

The calculated formation energy is 7.14 eV, in reasonable agreement with the value of 7.41 eV obtained by DFT-PBE/DNP [72]. Hence the V2 (555-777) state should be more stable than the V2 (5-8-5), in agreement with all DFT results published [59]. 3.5

Carbon Adatom

Fig. 15. Left: atomistic model of the 1C adatom defect superimposed to the colorized experimental HRTEM image extracted from the supplementary movie 6 provided in [65]. Right: corresponding simulated HRSTEM-HAADF image.

The healing (self-repair) of various graphene defects by migration of adatoms has been observed by HRTEM [71, 73]. The result of our calculation is displayed in Fig. 19. DFT studies usually gives three stable positions of the adatom on graphene [74]. The bridge position is predicted to be the most stable and was observed by HRTEM [75] and by HRSTEM [76]. We obtain a formation energy of 2.69 eV, therefore such defect should form easily during processing of a graphene-based nanodevice. The DFT method provides a value of the order of 1.5–2 eV for the binding energy of the carbon adatom [77, 78] (Figs. 15 and 16).

Fig. 16. Comparison between the p-RDF of the 1C adatom defect deduced from the experimental image (top) and from the Brenner atomistic simulations (bottom).

The perpendicular distance of the adatom to the graphite surface is *0.222 nm, not too far from the value of 0.187 nm previously obtained by ab-initio calculations for 50 atoms [78]. In our case, we find that the 5th nearest neighbours around the carbon

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

15

adatom are vertically displaced, therefore a simulation box of 50 atoms is certainly too small to simulate the full relaxation of the structure. Indeed, we obtained that 192 atoms are vertically displaced by more than 0.005 nm around the carbon adatom. Our methodology therefore provides extended strains and stresses over long distances, which is not possible with other methods restricted to a limited number of atoms. The quantitative comparison between experiment and simulation for a single carbon adatom is represented in Fig. 20. The maximum deviation from the first nearest neighbours atomic positions is inferior to *40 pm and the other experimental peaks are reasonably well reproduced by the simulation, therefore our model should be close to reality, if all sources of errors and blurring are taken into account. 3.6

Extended Edge Defect (88-7-5555)

Fig. 17. Left: atomistic model of the extended defect 88-7-5555 defect superimposed to the experimental HRTEM image entitled “SALVE-III-project-HRTEM-graphene-vacancycharacteristic-defects.png” [64]. Right: corresponding simulated HRTEM image.

A severe test to assess the validity of a structural model consists in considering a complex defective structure with a large number of atoms. Hence, we have used an extended defect and the excellent spatial resolution obtained by the Salve project [64] to check our methodology (Figs. 17 and 18).

Fig. 18. Comparison between the p-RDF of the Salve (88-7-5555) defect deduced from the experimental image (top) and from the Brenner atomistic simulations (bottom).

16

C. Guedj et al.

The double correction of chromatic and spherical aberrations provides information transfer until 71 pm, which is probably the best result ever obtained for an image of graphene. The comparison is depicted in Fig. 17. As usual, a nearly perfect agreement between simulation and experiment is obtained, as can be verified quantitatively with the p-RDF displayed in Fig. 18. For this case, the broadening of the C1nn peak is inferior to *25 pm and all experimental peaks are very well reproduced by the Brenner model. The positions of all atoms in the system are readily available for further ab-initio calculations in order to get all the physical properties (electronic, optical, mechanical, magnetic, etc.).

4 Conclusions Using the Brenner module of the SAMSON platform, we have precisely matched the experimental high resolution transmission electron microscopy experiments of various graphene-based defects. We have also shown that a good agreement is obtained with more complex ab-initio simulations in terms of structure and energy. This methodology opens the pathway to more extensive in-silico exploration of all forms of phases or defects in carbon-based materials, like diamond-like carbon (DLC), amorphous carbon, nanotubes, fullerenes, pentaheptite [79], or other novel phases or defects. Apparently, there is virtually no limit in the number of structural arrangements of graphene-based defects that can be simulated with the Brenner module of SAMSON, in good matching with experimental results. Finally, this methodology is therefore a reliable approach to obtain 3D atomistic models from 2D experimental TEM images. Acknowledgements. The invaluable contribution from the platform of nanocharacterization (PFNC) at MINATEC, Grenoble, France is respectfully acknowledged (https://www.minatec. org/en/). We would like to gratefully acknowledge funding from the European Research Council through the ERC Starting Grant No. 307629.

References 1. Novoselov, K.S., et al.: Electric field effect in atomically thin carbon films. Science 306, 5696 (2004) 2. Geim, A.K., Novoselov, K.S.: The rise of graphene. Nat. Mater. 6, 183–191 (2007) 3. Lee, C., et al.: Measurement of the elastic properties and intrinsic strength of monolayer graphene. Science 321(5887), 385–388 (2008) 4. Chen, H., et al.: Mechanically strong, electrically conductive, and biocompatible graphene paper. Adv. Mater. 20(18), 3557–3561 (2008) 5. Pei, Q.X., et al.: A molecular dynamics study of the mechanical properties of hydrogen functionalized graphene. Carbon 48(3), 898–904 (2010) 6. Scarpa, F., et al.: Effective elastic mechanical properties of single layer graphene sheets. Nanotechnology 20(6), 1–11 (2009) 7. Park, S., et al.: The effect of concentration of graphene nanoplatelets on mechanical and electrical properties of reduced graphene oxide papers. Carbon 50(12), 4573–4578 (2012)

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

17

8. Lee, E., et al.: Electrical properties and photoconductivity of stacked-graphene carbon nanotubes. Adv. Mater. 22(16), 1854–1857 (2010) 9. Allen, B.L., et al.: Carbon nanotube field-effect-transistor-based biosensors. Adv. Mater. 19 (11), 1439–1451 (2007) 10. Sorkin, V., Zhang, Y.W.: Graphene-based pressure nano-sensors. J. Mol. Model. 17(11), 2825–2830 (2011) 11. Qureshi, A., et al.: Review on carbon-derived, solid-state, micro and nano sensors for electrochemical sensing applications. Diam. Relat. Mater. 18(12), 1401–1420 (2009) 12. Joh, H.-I., et al.: Synthesis and properties of an atomically thin carbon nanosheet similar to graphene and its promising use as an organic thin film transistor. Carbon 55, 299–304 (2013) 13. Yao, J., et al.: In situ chemical synthesis of SnO2–graphene nanocomposite as anode materials for lithium-ion batteries. Electrochem. Commun. 11(10), 1849–1852 (2009) 14. Stankovich, S., et al.: Graphene-based composite materials. Nature 442(7100), 282–286 (2006) 15. Brenner, D.W.: Empirical potential for hydrocarbons for use in simulating the chemical vapor deposition of diamond films. Phys. Rev. B 42, 9458–9471 (1990) 16. Brenner, D.W.: The art and science of an analytic potential. Phys. Stat. Sol. (b) 217, 23–40 (2000) 17. Brenner, D.W., et al.: A second-generation reactive empirical bond order (REBO) potential energy expression for hydrocarbons. J. Phys. Condens. Mater. 14, 783–802 (2002) 18. Dyson, A.J., Smith, P.V.: Extension of the Brenner empirical interatomic potential to C-Si-H systems. Surf. Sci. 355, 140–150 (1996) 19. Los, J.H., Fasolino, A.: Intrinsic long-range bond-order potential for carbon: performance in Monte Carlo simulations of graphitization. Phys. Rev. B 68, 024107 (2003) 20. Stuart, S.J., et al.: A reactive potential for hydrocarbons with intermolecular interactions. J. Chem. Phys. 112, 6472 (2000) 21. Brenner, D.W., et al.: Simulated engineering of nanostructures. In: Fourth Foresight Conference on Molecular Nanotechnology (1996) 22. Sinnott, S.B., et al.: Model of carbon nanotube growth through chemical vapor deposition. Chem. Phys. Lett. 315, 25–30 (1999) 23. Brenner, D.W., et al.: Molecular dynamics simulations of the nanometer-scale mechanical properties of compressed Buckminsterfullerene. Thin Solid Films 206, 220–223 (1991) 24. Lehtinen, O., et al.: Effect of ion bombardment on a two-dimensional target: atomistic simulations of graphene irradiation. Phys. Rev. B 81(15), 153401 (2010) 25. Bosson, et al.: Interactive physically-based structural modeling of hydrocarbon systems. J. Comput. Phys. 231(6), 2581–2598 (2012) 26. Los, J.H., Fasolino, A.: Monte Carlo simulations of carbon-based structures based on an extended Brenner potential. Comput. Phys. Commun. 147, 178–181 (2002) 27. Redon, S., et al.: Adaptive dynamics of articulated bodies. ACM Trans. Graph. (TOG) 24(3), 936–945 (2005) 28. Koch, C.: Determination of core structure periodicity and point defect density along dislocations. Ph.D. thesis, Arizona State University (2002) 29. Crewe, A.V., Wall, J., Langmore, J.: Science 168, 1338 (1970) 30. Egerton, R.: Mechanisms of radiation damage in beam-sensitive specimens, for TEM accelerating voltages between 10 and 300 kV. Microsc. Res. Tech. 75(11), 1550–1556 (2012) 31. Biskupek, J., et al.: Effects of residual aberrations explored on single-walled carbon nanotubes. Ultramicroscopy 116, 1–7 (2012) 32. Barthel, J., Thust, A.: On the optical stability of high-resolution transmission electron microscopes. Ultramicroscopy 134, 6–17 (2013)

18

C. Guedj et al.

33. Schramm, S., et al.: Intrinsic instability of aberration- corrected electron microscopes. Phys. Rev. Lett. 109(16), 163901 (2012) 34. Uhlemann, S., et al.: Thermal magnetic field noise limits resolution in transmission electron microscopy. Phys. Rev. Lett. 111, 046101 (2013) 35. Lee, Z., et al.: Electron dose dependence of signal-to-noise ratio, atom contrast and resolution in transmission electron microscope images. Ultramicroscopy 145, 3–12 (2014) 36. LeBeau, J.M., et al.: Phys. Rev. Lett. 100, 206101 (2008) 37. LeBeau, J.M., et al.: Phys. Rev. B 79, 214110 (2009) 38. Hytch, M.J., et al.: Ultramicroscopy 53, 191 (1994) 39. Howie, A.: Ultramicroscopy 98, 73 (2004) 40. Mkhoyan, K.A., et al.: Phys. Rev. Lett. 100, 025503 (2008) 41. Boothroyd, C.B.: J. Microsc. 190, 99 (1998) 42. Du, K., et al.: Ultramicroscopy 107, 281 (2007) 43. Meyer, R.R., et al.: Microsc. Res. Tech. 49, 269 (2000) 44. Thust, A.: Phys. Rev. Lett. 102, 220801 (2009) 45. Fasolino, A., et al.: Intrinsic ripples in graphene. Nat. Mater. 6, 858–861 (2007) 46. Banhart, F., et al.: Irradiation effects in carbon nanostructures. Rep. Prog. Phys. 62, 1181 (1999) 47. Smith, B.W., et al.: Electron irradiation effects in single wall carbon nanotubes. J. Appl. Phys. 90, 3509 (2001) 48. Schindelin, et al.: Fiji: an open-source platform for biological-image analysis. Nat. Methods 9(7), 676 (2012) 49. Stone, A.J., et al.: Theoretical Studies of Icosahedral C60 and some related species. Chem. Phys. Lett. 128, 501–503 (1986) 50. Pauling, L.: The Nature of the Chemical Bond. Cornell University Press, Ithaca (1960) 51. Meyer, J.C., et al.: Direct imaging of lattice atoms and topological defects in graphene membranes. Nano Lett. 8(11), 3582–3586 (2008) 52. Kotakoski, J., et al.: From point defects in graphene to two-dimensional amorphous carbon. Phys. Rev. Lett. 106, 105505 (2011) 53. Kotakoski, J., et al.: Stone-Wales-type transformations in carbon nanostructures driven by electron irradiation. Phys. Rev. B 83, 245420 (2011) 54. Li, L., et al.: Defect energies of graphite: density-functional calculations. Phys. Rev. B 72, 184109 (2005) 55. Ma, J., et al.: Stone-Wales defects in graphene and other planar sp2-bonded materials. Phys. Rev. B 80, 033407 (2009) 56. Jensen, P., et al.: Catalysis of nanotube plasticity under tensile strain. Phys. Rev. B 66, 193403 (2002) 57. Zhang, W., et al.: Tight-binding calculation studies of vacancy and adatom defects in graphene. J. Phys. Condens. Matter 28, 115001 (2016) 58. Trevethan, T., et al.: Vacancy diffusion and coalescence in graphene directed by defect strain fields. Nanoscale 6, 2978–2986 (2014) 59. Skowron, S., et al.: Energetics of atomic scale structure changes in graphene. Chem. Soc. Rev. 44, 3143 (2015) 60. Gass, M.H., et al.: Free-Standing graphene at atomic resolution. Nat. Nanotechnol. 3, 676– 681 (2008) 61. Girit, Ç.Ö., et al.: Graphene at the edge: stability and dynamics. Science 27 323(5922), 1705–1708 (2009) 62. El-Barbary, A.A., et al.: Structure and energetics of the vacancy in graphite. Phys. Rev. B 68, 144107 (2003)

Atomistic Modelling and Simulation of Transmission Electron Microscopy Images

19

63. Robertson, A.W., Warner, J.H.: Atomic resolution imaging of graphene by transmission electron microscopy. Nanoscale 5, 4079–4093 (2013) 64. Salve (2018). http://www.salve-project.de/home.html 65. Lehtinen, O., et al.: Atomic scale study of the life cycle of a dislocation in graphene from birth to annihilation. Nat. Commun. 4, 3098 (2013) 66. Ramasse, Q.M., et al.: Probing the bonding and electronic structure of single atom dopants in graphene with electron energy loss spectroscopy. Nano Lett. 13, 4989–4995 (2013) 67. Warner, J.H., et al.: Dislocation-driven deformations in graphene. Science 337, 209 (2012) 68. Saito, M., et al.: Magic numbers of graphene multivacancies. Jpn. J. Appl. Phys. 46(12L), L1185 (2007) 69. Xu, C.H., et al.: Simulations of point-defect properties in graphite by a tight-binding-force model. Phys. Rev. B. 48(18), 13273 (1993) 70. Dettori, R., et al.: Elastic fields and moduli in defected graphene. J. Phys. Condens. Matter 24, 104020 (2012) 71. Robertson, A.W., et al.: Spatial control of defect creation in graphene at the nanoscale. Nat. Commun. 3, 1144–1151 (2012) 72. Wu, L., et al.: First-principles study on migration and coalescence of point defects in monolayer graphene. J. Phys. Chem. C 117, 17066–17072 (2013) 73. Song, B., et al.: Atomic-scale electron-beam sculpting of near-defect-free graphene nanostructures. Nano Lett. 11, 2247–2250 (2011) 74. Tsetserisa, L., Pantelides, S.T.: Adatom complexes and self-healing mechanisms on graphene and single-wall carbon nanotubes. Carbon 47, 901–908 (2009) 75. Hashimoto, A., et al.: Direct evidence for atomic defects in graphene layers. Nature 430, 870–873 (2004). https://doi.org/10.1038/nature02817 76. Bangert, U., et al.: Nanotopography of graphene. Phys. Status Solidi A 206, 2115–2119 (2009) 77. Lee, Y.H., et al.: Catalytic growth of single-wall carbon nanotubes: an ab initio study. Phys. Rev. Lett. 78, 2393–2396 (1997) 78. Lehtinen, O., et al.: Magnetic properties and diffusion of adatoms on a graphene sheet. Phys. Rev. Lett. 91, 017202 (2003) 79. Crespi, V.H., et al.: Prediction of a pure-carbon planar covalent metal. Phys. Rev. B 53, R13303(R) (1996)

Using Simulation in Business Process Analysis and Risk Management: The Blood Bank Case Study Ilaria Angela Amantea, Antonio Di Leva, and Emilio Sulis(B) Computer Science Department, University of Torino, 185 Corso Svizzera, Torino, Italy {amantea,dileva,sulis}@di.unito.it

Abstract. Risks are part of every business activity and risk management is therefore essential in organizing business for success. Our paper describes a methodological framework for identifying and managing risks in the context of business process analysis. The method includes business process modeling and simulation not only to organize activities but also to locate errors and manage risks. Simulating business processes supports managers in compliance analysis by investigating different scenarios of norms and regulations. We adopt as a case study an healthcare application where risk management is even more important, because errors not only increase costs, reduce quality, and lead to delays, but can also lead to serious damages. This work demonstrate how to afford risk management by using modeling and computational simulation, also by improving regulatory compliance.

Keywords: Business process analysis and simulation · Healthcare

1

· Risk management · Modeling

Introduction and Related Work

Healthcare management is particularly relevant due to the impact of patient’s treatment waiting times on health outcomes, the increasing need to reduce costs due to the lack of resources in public sector, or the unpredictability and variability of patients arrivals. The studies about organization mostly involve analysis, monitoring, optimization of business processes [42] in Business Process Management discipline, defined as “the art and science of how work should be performed in an organization in order to ensure consistent outputs and to take advantage of improvement opportunities, e.g. reducing costs, execution times or error rates” [17]. The analysis of business processes in healthcare largely benefits from the adoption of information systems [1], enabling the collection of data (event logs) and business process mining [18]. Performance analysis relies on the exam of such information to detect the actual functioning of the organization, including bad events which may occurs in the process [22]. In this respect, the analysis of c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 20–38, 2020. https://doi.org/10.1007/978-3-030-35944-7_2

Using Simulation in Business Process Analysis and Risk Management

21

failures and risks in change management allows to monitor and assess compliance processes with respect to several kinds of business regulations [27]. A traditional approach mostly concerns the examination of bad performing departments in an organization to detect bottlenecks or risks of errors [11]. In this work we explore a different perspective focusing on good performing department, in order to investigate a case of success to be used as a benchmark towards other department of the same organization. We introduce a business analysis practical application by focusing on risks analysis of business processes and their compliance to regulations, norms and laws. The problem concerning risks that organizations face in daily work is a difficult task to be managed by information systems. As risk is part of every business process [21], it may cause loss of quality, claims, increased costs, time delays or legal problems [7]. Risks in healthcare are particularly relevant for patients causing serious and permanent damages up to death. This will lead to two kinds of problems: firstly, a large set of regulations have to be applied attention in order to perform process compliance. Secondly, new reorganizations must be implemented with the introduction of new procedures, i.e. for privacy control. In addition to modeling business process activities, we explore the adoption of simulation in risk management [36]. A simulation-driven approach is a versatile tool to produce results that are relatively easy to interpret by comparing different scenarios to evaluate process changes [41]. Our research, as already addressed in [6], will focus on the following questions: (i) How to improve compliance to norms and regulations in order to manage risks in healthcare? (ii) It is possible to afford risk management by using modeling and computational simulation? To answer these questions, we adopt a methodology of risk-aware business process modeling process integrating data analysis, modeling and simulation. In particular, we describe a practical application in the Italian “City of Health and Science” of Torino, one of the biggest hospital in Europe1 . Our use case concerns the Blood Bank (BB) service selected by the Risk Manager office of the Hospital as a well-performing department. BB collects blood or hemocomponents from blood donors in order to supply several different hospitals in the surrounding of the main hospital. The laboratory unit performs different kinds of tests to produce blood components (e.g., blood-borne infectious diseases, immunohematology) by performing pre-transfusion testing, diagnosis and prevention of hemolytic disease of newborns. This work mainly performs process modeling techniques in order to address, analyze and support business processes involving staff, the management of requests, supporting and addressing organizational decision-making [2,16]. The adoption of a specific language is a relevant prerequisite to specify and model business processes. We decided to adopt Business Process Modeling and Notation (BPMN) language [5,31], due to the readability and clarity also to not specialists such as doctors and all other stakeholders involved in the project. Moreover, BPMN nowadays is a “de facto” standard language for process modeling already included in tools improve process analysis allowing business process simulation [3]. In our case study we used iGrafxProcess tool [23] in order to implement the main phases of the BPM methodology, including simulations and risk analysis. 1

Cfr. Citt´ a della Salute e della Scienza, http://www.cittadellasalute.to.it.

22

I. A. Amantea et al.

From a risk management perspective [20,25,30], several studies already investigate specific use cases to describe benefits of new practices or tools [8,14,35]. Such analysis are particularly important in healthcare for the direct and indirect consequences of errors [12,19,29,39]. In particular, relevant works focused on the role of evidence based medicine [40], while others analyze favorable cases in public health [9]. In the broad spectrum of studies concerning the monitoring of business processes, an important part concerns aspects related to the business compliance with laws, rules or regulations involving the management of patient healthcare processes [4,10,28,37]. In the following of the paper, we introduce our methodological framework concerning the analysis and the improvement of business processes (Sect. 2). The starting point in process modeling involves the definition of the actual (As-is) situation in order to execute simulations via What-if analysis of several different scenarios to introduce re-engineering phase (To-be). In our traditional framework we introduce the management of aspects related to risk analysis and compliance of business processes with current laws and regulations. Section 3 introduces of the case study by exploring the whole process concerning the functioning of the hospital department, which is reconstructed with a special attention to the compliance with current Italian laws and regulations. Section 4 provides a description of the main outcomes of simulation, having attention to propose a new bank management system and analyze the impact on the existing process. Some concluding remarks will be discussed in Sect. 5.

2

The Methodological Framework

The methodological framework here presented concerns a Risk-aware Business Process Management (RBPM) methodology [24,34], including practical considerations about the specific application into the specific medical field. 2.1

Risk-Aware Business Process Management Methodology

The absence of event logs traced by the actual information system forces to adopt a traditional methodological framework consisting in three main phases: – Context Analysis: an initial phase focuses on the organizational analysis, with the end goal to clearly define the strategic scenario relevant for the enterprise, also defining all the components to be investigated. – Functional Analysis and Process Engineering: this phase aims to determinate the wide spectrum of activities carried out in the different part of business processes, also identifying the existing relationships. The process is reconstructed starting from the arrival of transaction and considering all tasks and event occurred. This phase leads to define a Process Diagram (usually defined as a process map or flowchart), by using BPMN [5] as a standard language able to clearly describe the business process. The model provided in this phase have to be verified and validated by stakeholders involved in

Using Simulation in Business Process Analysis and Risk Management

23

the process, finally obtaining the so called As-is model. We included in this phase the analysis of each cause of errors, such as failures, “near-miss” and other relevant behavior that affect the compliance of business regulations. – Risk Analysis and Compliance Verification: the main goal of this last phase is to focus on the problems related to compliance, as highlighted in the previous phase, to finally introduce corrective actions. This examination aims both to obtain a further reduction of risks into an acceptable level and to make activities fully compliant with norms and regulations. In this context a new version of the As-is model (the To-be model) produces results to be checked by actual managers of the organization. 2.2

Risk and Compliance Management in the Medical Field

The main area involved in our case study is the Clinical Risk Management (CRM) hospital unit which currently manage processes, methods and activities to better handle risks in patient healthcare, with the ultimate goal of increment the safety both of patients and of caregivers and other people involved in healthcare process. The CRM describes the wide set of internal procedures and strategies for handling risk which may be resumed in four aspects: – Risk identification: to perform risk identification, the hospital management takes into account every notifications about errors reported in some tasks. They are usually stored into an incident reporting data base, e.g. all events causing health problems to patients or other complaints. Even results of inspections and audits can provide useful indications. – Risk analysis: the main goal of this step is to determine the causes of risks and factors related to errors as well as their effects on the safety of patients. – Risk assessment: decision-makers have to determine the kind of risks should be treated with priority as well as define eventual thresholds. – Risk treatment: a risk can be treated by introducing preventive measures and/or accepting risk with or without supervision. In the whole organizational framework, hospital management regularly involves risk management office in order to ascertain whether the risk handling process achieved the desired goals. Risk management methods and tools can be proactive or reactive. Proactive methods are used in absence of adverse events while reactive methods are always preceded by an event. Proactive methods include Failure Mode and Effect Analysis (FMEA) [13], Cause and Effect analysis (“fishbone” diagram) [26], Scenario analysis [17] and are based on a systematic data collection. Reactive methods apply a systematic investigative technique to analyze adverse events that aims to achieve a comprehensive identification of both systemic aspects as well as individual causes, e.g. London protocol [38]. In this perspective, compliance refers to the ability of an organization to comply with the obligations of laws and regulations. It must become part of the organization culture and hardly integrated into business processes. Compliance

24

I. A. Amantea et al.

risk can be characterized by the likelihood of occurrence and the consequences of non-compliance with the organization’s obligations. A compliance framework supports the organizational processes to implement, monitor and continually improve compliance management in the organization. The natural basis of our framework is based on detailed understanding of every information about errors occurring through the process. For the purpose of transparency and safety of care, which includes prevention and management of risk related to the provision of health services, one of the techniques adopted in our case study to date and encouraged in literature is the prompt reporting of adverse events and sentinel events2 .

3

The Blood Bank Case Study

Blood banking refers to the process that takes place in the hospital to make sure that donated blood as well as blood products are safe. After the evaluation, blood is stored into Blood Bank Refrigerator before they are used in medical procedures. For instance, blood banking includes typing the blood for transfusion and testing of infectious diseases. In our case, the whole process starts with the arrival of a blood request by using a special form (we refer to “request” in the rest of the article). In our case, as shown in Fig. 1, the BB department consists of three functional units: Acceptance, Laboratory and Distribution.

Fig. 1. Main Process of Blood Bank department at high level.

There are two areas involved for the management of requests, depending on the arrival time. The Acceptance unit manages requests arriving in the time slot between 8:00 am to 4:00 pm. Otherwise. For other periods, the requests are 2

https://www.jointcommission.org/sentinel event policy and procedures/.

Using Simulation in Business Process Analysis and Risk Management

25

directly transferred and managed by the Laboratory unit, accordingly to shift work and workload reasons. Each request coming from other hospital departments (for example, from the Emergency Department) have to be carefully verified. Staff to confirm that the information on the tube label and on the transfusion request form are identical. In case of any discrepancy or doubt, a new sample should be obtained. The request and the test tube with the patient’s blood is then sent to the Laboratory. The ordinary test tubes (Urgent? gateway) arriving in morning slot are send in stock (Move stock test tube), while the urgent ones are move quickly towards the end of acceptance checks (Move test tube). In the afternoon the only request arriving to the BB are the urgent requests, even if there some exceptions for some ordinary requests. The decrease of requests arrival imply that the staff decreased in the afternoon, as well the Acceptance activities is transferred into the Laboratory. When a patient’s blood sample arrives at the Laboratory, a set of standard tests are performed, including the following ones: – Typing: AB0 group (blood type), – Rh typing (positive or negative antigen), – Screening for any unexpected red blood cell antibodies that may cause problems in the recipient. In Distribution, the requested units of blood or components are taken from the blood deposit and finally sent to the requesting department through the appropriate staff. In the following subsection we better detail the functioning of the three units (Acceptance, Laboratory and Distribution), while here below we provide some information about the exceptional pathway concerning emergencies, i.e. (Critical) requests. This kind of request are rare and very urgent cases. When a very critical request arrives every efforts of the staff focus on solving this transaction, which immediately acquire the highest priority. In internal regulation, the whole iter concerning critical requests have to be accomplished, the blood unit have to be analyzed and send back to the requesting department. In these very urgent cases, the doctor’s BB department and the doctor of the department requiring the blood, have to talk together (usually by a phone call) in order to understand patient’s conditions, to agree how to proceed as well as verify the request (Phone call and Verify request). Once a blood unit 0- are choose (Take blood unit 0-), the documents and the blood unit are prepared (Prepare doc + blood unit) and the blood unit is send as soon as possible (Unit delivery). The blood 0- are universally compatible and for this reason they do not require further tests. The Laboratory tests can be performed in some cases, i.e. for checking the presence of not compatible alloantibodies. In very critical situation, the test tube may arrive without the formal document for the request which can be acquired at a later moment (Test tube? gateway). Once the document arrives, Laboratory tests can be performed (Analyze blood). The conclusion of the process occurs when patient’s alloantibodies are compatible with the alloantibodies of the blood

26

I. A. Amantea et al.

units (Compatible alloantibodies? gateway). Otherwise, in case the alloantibodies are not compatible, BB staff call urgently the department requiring the blood (Call department): if blood has not yet been transfused (Transfusion already done? gateway), the correct blood unit is sent (Blood distribution). 3.1

Business Process Model

The BPMN language has been adopted, as in our simulation tool which allows to insert monitors (i.e. blocks from M1 to M10) in order to track and count all the transactions that correspond to errors. ACCEPTANCE. Initial considerations focuses in better define Acceptance, as detailed in Fig. 2. The process starts with

Fig. 2. Subprocess of Acceptance of requests in BPMN with monitors count errors [6].

the arrival of requests in the department (Receive Request), whereas the staff enter information concerning the requests in the information system by applying an identifying barcode (Manage Request). Then checks are carried out on the correctness of data on the request and the patient’s blood tube (Check). If errors are detected (monitor M1) the correct data is re-entered. The gateway Blood components? checks if only blood tests are necessary or blood components are also required. In the latter case the doctor of the Blood Bank (BB doctor) verifies the correctness of the request (Evaluate Request) and, if he has any doubts, calls the doctor of the ordering department for an explanation (Ask Explanations). At this point (Approved? gateway) one of three things can happen: 1. the BB doctor is convinced about the correctness of the request; 2. the request is changed due to agreement between doctors (Modify Request) 3. the request is considered unsuitable and disposed of (the subprocess is closed with an error report Disposal )

Using Simulation in Business Process Analysis and Risk Management

27

We add two monitors in order to collect information about cases (2) and (3) (respectively M2 and M3 monitors), counting the errors detected in these kind of request. If no blood components are requested or the request is deemed suitable or modified, an identifying barcode is applied on the test tube (Apply barcode) and a final check is carried out by two people together (Double Check), at least one must be a graduate (doctor or biologist) who eventually signs the approval on a request. The detection of errors (Correct? gateway) (Monitor M4) involves calling immediately the requesting department (Verify Validity). Once an agreement is reached, the requesting department sends back a modified request with the correct data that have to be re-entered into the system (after a certain delay, timer Receive correct request), otherwise the request is considered unsuitable and finally deleted (monitor M5). If no errors are detected the request and the test tube are sent to the Laboratory. Laboratory. The main part of the tests of laboratory are performed in automated way. For this reason, in this sub-process the number of controls and errors are fewer in comparison to the other two sub-process. As shown in Fig. 3, all tubes are located into blood banking centrifuges for five minutes (Centrifuge test tube), than they follow different Procedures: – Group+TS: the more complete test made for patients not present in the information system (see Patient known? gateway), to analyze the blood group (AB0 and Rh) and the Type Screen (Make Group (AB0+Rh)+TS); – ABD: the quickest test. It is used for patient that are already hospitalized (Patient known? gateway), with TS sill valid (TS valid? gateway), normally that patients are just moved to one department to another (Make ABD). – ABD+TS: it is used for patient known (Patient known? gateway) and with the TS valid (TS valid? gateway) but positive (TS positive? gateway), (Make ABD+TS). In this case doctors of requesting department shall be notify (Call doctor’s department) and, if it’s ordinary test (Urgent? gateway) it is made first the identification test (30 min) (Make identification test) and after the compatibility test (30 min) (Make compatibility test) for testing the compatibility between the alloantibody identified. If it is urgent the identification test and the compatibility test are made contemporary and the last test it’s made on a predeterminated stock hoping that identification match, this for reducing time. If the TS result already positive, so there is no match found (In-depth/TS positive? gateway) the in-depth tests are made (Make In-depth test). At the end, for each of these three procedures, workers read are read, validate and send to the informatic system final results; a report is printed and checked by a technician, a doctor or a biologist (Make ABD+TS and (Make ABD+TS). After that step, if blood components are not requested (to keep the TS valid or for a scheduled surgery) the reports of the test are stored (Store report) and the process is over (Dossier).

28

I. A. Amantea et al.

Fig. 3. Subprocess of Laboratory and counters of errors.

Transactions then follow one of the three paths: – blood components are required (Blood component required? gateway) or; – the patient is known (Patient known? gateway) and the TS is valid (TS valid? gateway) and the department is not changed (Department changed? gateway) or; – the patient is known (Patient known? gateway) and the TS is nether valid (TS valid? gateway) nor positive (TS positive? gateway); the work paper is printed and there is an automatic check by the informative system (Print work paper + IS check).

Using Simulation in Business Process Analysis and Risk Management

29

After these controls the blood products are taken (Take blood unit) then there are some tasks to record that specific blood unit has gone out of the refrigerator and that it has been assigned to a specific patient (Booking + labeling unit + allocate blood component). During all these activities there is a continuous control on the correctness of the registry data of the patient and the suitable characteristics on the blood unit. At list there is a last whole check by another person that control the correspondence of the blood unit with the work paper (Check unit + work paper). In both these two last checks, if some errors are found (Correct? gateways) (monitors M6 and M7) it needs to go to take the correct unity and to correct the recording (Take correct blood unit) with an obvious time delay. Otherwise, if the request is not critical (Critical? gateway) the blood unit is send to the Distribution’s department. A critical request follows a particular pathway shown in the Fig. 1, as already defined in the previous paragraph.

Fig. 4. Subprocess of Distribution and counters of errors.

Distribution. Besides the delivery of the blood’s unities, this sub-process concerns the last steps in controlling and avoiding that some errors committed in any activities of Acceptance, Laboratory or Distribution, goes out of the department and possibly becomes a claim. Figure 4 describes two paths, one for the ordinary and not urgent requests and one for more urgent requests (Type? gateway). The activities are the same but follow different sequence of tasks due to different degree of urgency. The ordinary requests concerns a blood unit which is stored in information system (Computer registration). In the meanwhile, workers check data about the label on the tube and the one on the request (Correct? gateway) (monitor M9). In case of any errors, the blood unit and the paper request are packaging together (Pack unit) and stock in the Blood Bank Refrigerator (Put in BB Refrigerator). These activities use a lot of time and a lot of attention therefore they are execute before relay’s arrivals. The tours of the relay are schedule. When the relay arrive they withdraw a stock of different blood units all together (Prepare blood unit). There is a last

30

I. A. Amantea et al.

check between the blood unit’s data, the previous request’s data and the relay request’s data (Correct? gateway) (monitor M10). At the end the blood units will deliver (Delivery unit). In case of emergency, the blood unit is store in the Blood Bank Refrigerator (Put in BB refrigerator) and when the pick-up staff arrive (maximum a pair of minutes) he withdraw just that exact unit. The activities and the checks are the same of the ordinary procedure but consecutive (Prepare blood unit, Computer registration, Print delivery form, Pack unit and Delivery unit). When errors occurred (Correct? gateway) (monitor M8), the procedure is stopped and the correct blood unit has been taken (Take correct blood unit). The new blood unit has to pass all the controls from the task Take blood unit in Laboratory sub-process (Fig. 3).

4

Process Simulation Output

In order to simulate our business process, the flow in the above mentioned diagrams includes a description of how each activity deals with a transaction (i.e. a request), the time it takes and the necessary resources to execute the task. Furthermore, it is relevant to specify how the transactions are introduced in the model and for how long the simulation has to last. With this respect, our simulation environment developed with iGrafx Process tool is very suitable for process mapping and simulation modeling business process management context. We perform input data analysis by considering information about the functioning of the BB department in 2017. Moreover, we interviewed doctors, nurses, administrative workers. The model has been refined several times and finally validated by workers and managers of the department. In particular, for the Acceptance subprocess the generator that corresponds to the initial event Start introduces about 350 requests a day distributed according to the time table of Fig. 5 for a total amount of about 85,000 requests received

Fig. 5. The BB daily workload.

Using Simulation in Business Process Analysis and Risk Management

31

Table 1. Table of causes of reported errors, number of errors and claims. Symbol ‘-’ means no occurrences in our dataset.

Distribution

Laboratory

Acceptance

Dep Causes Internal Acceptance Incomplete data Switching Errors Insert Error Other Internal Check in Acceptance Cross check (request-test tube) missing Signature check missing Doctor check missing Inappropriate Request Data: inappropriate/reconsidered Quantity: inappropriate/reconsidered Urgency: inappropriate/reconsidered Internal Test Not performed Insert missing Other Internal Assignment Barcode check missing Unsuitable reservation Wrong labeling Wrong assignment Computer transmission problem Internal Distribution Wrong document delivery Wrong number of unit delivery Late delivery Wrong blood component delivery Error on the medical report No correspondence bag/data Various External Output Wrong Department Delivery Switching Errors

Err C 134 20 349 8

− − 10 −

14 31 82

− − −

16 26 21

− − −

11 6 1

− − −

9 79 − − 5

− − 3 1 −

1 27 43 − 3 2 2

1 1 − 1 − 5 −

− −

2 2

32

I. A. Amantea et al.

from the Blood Bank during the initial 8 months of 2017. Table 1 describes errors and related causes, as registered by workers in a self-reporting database on the information system. In this table the causes of error have been divided according to the units of the Blood Bank where they can occur, corresponding to Acceptance, Laboratory and Distribution, and the columns Causes, Errors and C respectively represent the causes of errors, the number of errors and claims occurring in these three units. This amount of errors reported by the BB staff have to be compared with the number of errors from the simulation output in the same period, as detailed in Table 2. In particular, columns Rep, Det, DetNotRep and Claim respectively represent all errors Reported, Detected, Detected but not Reported and the Claims in the three units of the Blood Bank and for the whole process. The number of self-reported errors (column Rep) derives from the sum of errors of each department of Table 1, while column Det refers to simulation output. In particular, errors in Acceptance are the sum of monitors from M1 to M5, while in Laboratory M6 and M7, and in Distribution from M8 to M10. For instance, the percentage of errors Detected But Not Reported of the whole process is 70%. Table 2. Reported errors (Rep), detected errors (Det), detected but rot reported (DetNotRep) and claims. Rep Det

DetNotRep Claim

Acceptance 701 1,829 62% 791 86% Laboratory 111 464 83% Distribution 78

10 4 12

BB Process

26

890 3,084 71%

The table provides the starting point for two important conclusions: – The BB staff has a poor attitude for reporting errors as they are discovered in the process. This is partly due to the workload that at certain times of the day is particularly heavy. The consequence of this fact is that the management of the bank has little information about the actual causes of errors. As a result, improvement initiatives clearly suffer from this deficiency. – The Claim column shows that the number of errors not detected in the BB process is very low, this indicates that the current process is very efficient. In any case, as the consequences of certain errors can be very serious, managers evaluate to improve the process analysis with FMEA as a way to focus on most dangerous cases. 4.1

Compliance of the BB Process

The efficiency of the BB process is the result of continuous improvement initiatives. In particular, several checks on the correctness of data have been introduced in order to detect the greatest possible amount of errors. To investigate

Using Simulation in Business Process Analysis and Risk Management

33

the process compliance with Italian norms and regulation, we perform a scenario concerning the current Acceptance sub-process including exclusively the activities prescribed by national laws and internal regulation. In this scenario we consider only tasks provided by laws, removing further checks and activities added by managers to increase the safety and reliability of the process. In our case, the Acceptance subprocess described law only imposes to check that the surname, name and date of birth of the patient reported on the request are the same as reported on the test tube. Figure 6 shows how the subprocess of Acceptance would be with only the mandatory controls by Italian law.

Fig. 6. Acceptance subprocess with only mandatory controls and detected errors.

Therefore, at the arrival of a request (Receive Request) nurses have to check if a blood component is required. In that case, the request is assigned to the BB doctor (Assign Blood Component). In both cases, a label identification is applied on the test tube (Apply Label on Test tube) and then the data on the request and the test tube is checked (Cross Control Test tube/Request). If no errors are detected (Correct? gateway) the request and the test tube are sent to the Laboratory, otherwise (monitor M4) the request is disposed. As shown in Fig. 6, only a limited number (140) of errors would be detected in this Compliant subprocess (the simulation of the two versions of the subprocess was performed under the same conditions). This number must be compared with the number of errors detected in the current subprocess (1,829) and this means that about 92% of the errors would not be detected (lost errors). Table 3 illustrates the results obtained for the whole BB process if only mandatory obligations are implemented. In this table the columns Current, Compliant and Lost respectively represent the errors detected in the current and the compliant processes, and the percentage of lost errors. These results clearly indicate that the controls required by law are absolutely insufficient. Table 3. Comparison of current and compliant processes. Current Compliant Lost Acceptance 1,829 791 Laboratory 464 Distribution

140 53 43

92% 93% 93%

BB Process

236

92%

3,084

34

4.2

I. A. Amantea et al.

Process Improvement

The need to introduce several controls into the Acceptance subprocess stems from the fact that the process relies only on the (hand-filled) paper request which may contain errors and therefore needs to be checked several times to ensure that patient and test tube data are correctly uploaded to the local management system. The simulation-based approach in the RBPM methodology is very useful to verify the evolution of the processes currently under investigation (Whatif analysis of possible future scenarios). A scenario can be considered as a description of a possible future situation. Scenarios are not meant to be a complete description of the future, but rather a tool to consider the basic elements of a possible future and to draw analysts’ attention to the key factors that can help to effectively improve the process [15]. In our RBPM approach the specification of the scenarios to be analyzed is very simple if they can be defined as changes to be made to the As-is model. A new web-based application will be applied to manage integrating the hospital management system in which the patient and test tube data will be uploaded by the requesting department. A simplified paper request and the test tube will then arrive at the Blood Bank, and both will already have the correct control barcode inserted. At the same time, these data will be automatically loaded on the local system for which the problems related to the local insertion of data are eliminated. Figure 7 shows how the Acceptance subprocess could be modified. At the arrival of the request (Receive Request) the data will be acquired and checked (Acquire Request) for blood components. If a blood component is required, as well as for the As-is model (Fig. 2), the BB doctor verifies the correctness of the request (Evaluate Request) and, if he has any doubts, calls the doctor of the ordering department for an explanation (Ask Explanations). At this point the request could be (1) approved, (2) modified (Modify Request) or (3) deleted. For cases (2) and (3) the M2 and M3 monitors count the errors detected in the request. The simulation of the two models As-is and To-be allows a comparison between the two scenarios in relation to the detected errors. Table 4 shows the results for the whole process. In this table the columns As-is, Tobe and Elim respectively represent the errors detected by the current As-is subprocess, by the To-be subprocess and the percentage of errors that would be eliminated from the restructuring. These results in Table 4 clearly indicate that the introduction of the new local system greatly reduces (57%) the number of errors that would be detected in the Blood Bank. This leads to a much more efficient process in terms of processing time of requests and costs for the organization.

Using Simulation in Business Process Analysis and Risk Management

35

Fig. 7. To-be model of the Acceptance subprocess. Table 4. Comparison between the As-is and the To-be model. As-is Acceptance 1,829 791 Laboratory 464 Distribution Process

To-be Elim 509 72% 494 38% 335 28%

3,084 1,337 57%

The simulation report (Table 5) shows that the digitization of the request and the integration of hospital and BB management systems leads to a drastic reduction of the disposal request and of the average cycle, work and waiting time. The reduction in the number of errors and the processing times obtainable through digitization is particularly relevant at peak hours of the workload in Acceptance (h. 8–12, as shown in Fig. 2). Mainly, in case of urgent and very urgent requests in which it is required a rapid delivery of blood: between 15 and 20 min for very urgent requests, within 1 h for urgent requests.

36

I. A. Amantea et al. Table 5. Report of simulation values. As-is Total input request

86,160 86,160

Disposal request

60

25

Average cycle time (min)

35.22

2.61

Average work time (min)

5.46

Average waiting time (min) 29.75

5

To-be

2.20 0.41

Conclusions

In this paper we described a model-based approach (RBPM framework) to design and reason about compliance and risk analysis in an organization’s business environment. The framework proposes a methodology to model, validate and analyze business processes, starting from the simulation of actual (As-is) processes and the analysis of regulation an norms. The execution of What-if scenarios starting from compliant process and possible combination of attributes. In this way managers obtain useful suggestions for deciding on the most appropriate restructuring actions to improve the efficiency of the organization. Main limitation of this approach concerns the costs of modeling business processes (including both costs of proprietary software and staff costs). As a future work, we plan to explore the adoption in risk management of an agent-based modeling perspective that we already applied in hospital departments [32,33]. The main advantage of the proposed approach relies in the possibilities offered by our RBPM framework to accurately analyze the effective functioning of the organization under analysis, to investigate the impact on risks of possible evolutions towards a more efficient organization. Acknowledgements. We are grateful for the collaboration of the “City of Health and Science” of Torino (Italy). This research was conducted in the project “CANP CAsa Nel Parco” of Regione Piemonte funded by POR FESR PIEMONTE 2014-2020.

References 1. van der Aalst, W.M.P., ter Hofstede, A.H.M., Dumas, M.: Patterns of process modeling. In: Process-Aware Information Systems: Bridging People and Software Through Process Technology. Wiley-Interscience (2005) 2. Van der Aalst, W.M., Nakatumba, J., Rozinat, A., Russell, N.: Business process simulation. In: Handbook on BPM 1, pp. 313–338. Springer (2010) 3. Abo-Hamad, W., Arisha, A.: Simulation-based framework to improve patient experience in an emergency department. Eur. J. Oper. Res. 224(1), 154–166 (2013) 4. Adams, A.P.: Clinical risk management. enhancing patient safety, 2nd edition: Charles Vincent (ed.). BMJ books: London, UK, 2001, 573 pp; hardback, indexed, ISBN: 0-7279-1392-1; price £47.50. Eur. J. Anaesthesiol. 20(7), 589 (2003). https://doi.org/10.1017/S0265021503000930

Using Simulation in Business Process Analysis and Risk Management

37

5. Allweyer, T.: BPMN 2.0: introduction to the standard for business process modeling. BoD–Books on Demand (2016) 6. Amantea, I.A., Di Leva, A., Sulis, E.: A simulation-driven approach in risk-aware business process management: a case study in healthcare. In: Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, vol. 1, pp. 98–105. SciTePress (2018) 7. Betz, S., Hickl, S., Oberweis, A.: Risk-aware business process modeling and simulation using XML nets. In: 2011 IEEE 13th Conference on Commerce and Enterprise Computing (CEC), pp. 349–356. IEEE (2011) 8. Blake, J., McTaggart, K.: Using simulation for strategic blood supply chain design in the Canadian prairies. In: 2016 6th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH), pp. 1–8. IEEE (2016) 9. Braithwaite, J., Westbrook, J., Coiera, E., Runciman, W., Day, R., Hillman, K., Herkes, J.: A systems science perspective on the capacity for change in public hospitals. Isr. J. Health Policy Res. 6(1), 16 (2017) 10. Buddle, J.J., Burke, B.S., Perkins, R.A., Roday, L.E., Tartaglia, R., Vermiglio, I.A.: System and method for compliance management (2005). US Patent 6,912,502 11. Chang, J.F.: Business Process Management Systems: Strategy and Implementation. CRC Press, Boca Raton (2016) 12. Chartier, Y.: Safe Management of Wastes from Health-Care Activities. World Health Organization, Geneva (2014) 13. Chiozza, M.L., Ponzetti, C.: FMEA: a model for reducing medical errors. Clinica Chimica Acta 404(1), 75–78 (2009) 14. DeRosier, J., Stalhandske, E., Bagian, J.P., Nudell, T.: Using health care failure mode and effect analysis: the va national center for patient safety’s prospective risk analysis system. Jt. Comm. J. Qual. Improv. 28(5), 248–267 (2002) 15. Di Leva, A., Sulis, E.: A business process methodology to investigate organization management: a hospital case study. WSEAS Trans. Bus. Econ. 1(14), 100–109 (2017) 16. Di Leva, A., Sulis, E., Vinai, M.: Business process analysis and simulation: the contact center of a public health and social information office. Intell. Inf. Manag. 9(05), 189 (2017) 17. Dumas, M., Rosa, M.L., Mendling, J., Reijers, H.A.: Fundamentals of Business Process Management. Springer, Heidelberg (2013) 18. Ferreira, D.R.: Process mining in practice. In: A Primer on Process Mining, pp. 65–93. Springer (2017) 19. Fishman, G.: Discrete-Event Simulation: Modeling, Programming, and Analysis. Springer, New York (2013) 20. Haimes, Y.Y.: Risk Modeling, Assessment, and Management. Wiley, Hoboken (2015) 21. Hashmi, M., Governatori, G., Wynn, M.T.: Normative requirements for regulatory compliance: an abstract formal framework. Inf. Syst. Front. 18(3), 429–455 (2016). https://doi.org/10.1007/s10796-015-9558-1 22. Hayes, J.: The Theory and Practice of Change Management. Palgrave Macmillan, London (2014) 23. iGrafx: iGrafxProcess 2015 (2015). http://www.igrafx.com 24. Jakoubi, S., Tjoa, S., Goluch, S., Kitzler, G.: Risk-Aware Business Process Management—Establishing the Link Between Business and Security, pp. 109–135. Springer, New York (2010). https://doi.org/10.1007/978-1-4419-1636-5 6

38

I. A. Amantea et al.

25. McNeil, A.J., Frey, R., Embrechts, P.: Quantitative Risk Management: Concepts, Techniques and Tools. Princeton University Press, Princeton (2015) 26. Nicolini, D., Waring, J., Mengis, J.: The challenges of undertaking root cause analysis in health care: a qualitative study. J. Health Serv. Res. Policy 16(1 suppl.), 34–41 (2011). https://doi.org/10.1258/jhsrp.2010.010092 27. Parker, C., Nielsen, V.L.: Explaining Compliance: Business Responses to Regulation. Edward Elgar Publishing, Cheltenham (2011) 28. Racz, N., Weippl, E., Seufert, A.: A process model for integrated it governance, risk, and compliance management. In: Proceedings of the Ninth Baltic Conference on Databases and Information Systems (DB&IS 2010), pp. 155–170. Citeseer (2010) 29. Rose, G., et al.: The Strategy of Preventive Medicine. The Strategy of Preventive Medicine (1992) 30. Sadgrove, K.: The Complete Guide to Business Risk Management. Routledge, Abingdon (2016) 31. Smith, H., Fingar, P.: Business Process Management: The Third Wave, vol. 1. Meghan-Kiffer Press Tampa (2003) 32. Sulis, E., Di Leva, A.: An agent-based model of a business process: the use case of a hospital emergency department. In: International Conference on Business Process Management, pp. 124–132. Springer (2017) 33. Sulis, E., Di Leva, A.: Public health management facing disaster response: a business process simulation perspective. In: Proceedings of the 2018 Winter simulation Conference, pp. 2792–2802. Winter Simulation Conference (2018) 34. Suriadi, S., Weiss, B., Winkelmann, A., ter Hofstede, A.H., Adams, M., Conforti, R., Fidge, C., Rosa, M.L., Ouyang, C., Rosemann, M., Pika, A., Wynn, M.: Current research in risk-aware business process management: overview, comparison, and gap analysis. Commun. Assoc. Inf. Syst. 34(1), 933–984 (2014). https://eprints.qut.edu.au/50606/ 35. Tomiyama, T., Gu, P., Jin, Y., Lutters, D., Kind, C., Kimura, F.: Design methodologies: industrial and educational applications. CIRP Ann. Manuf. Technol. 58(2), 543–565 (2009) 36. Van Der Aalst, W.M.: Business process management: a comprehensive survey. ISRN Software Engineering 2013 (2013) 37. Vincent, C.: Patient Safety. Wiley-Blackwell, Hoboken (2017) 38. Vincent, C., Amalberti, R., et al.: Safer Healthcare. Springer International Publishing, Cham (2016) 39. Vincent, C., Taylor-Adams, S., Chapman, E.J., Hewett, D., Prior, S., Strange, P., Tizzard, A.: How to investigate and analyse clinical incidents: clinical risk unit and association of litigation and risk management protocol. BMJ Br. Med. J. 320(7237), 777 (2000) 40. Vincent, C., Taylor-Adams, S., Stanhope, N.: Framework for analysing risk and safety in clinical medicine. BMJ Br. Med. J. 316(7138), 1154 (1998) 41. Vom Brocke, J., Rosemann, M., et al.: Handbook on Business Process Management. Springer (2010) 42. Weske, M.: Business process management architectures. In: Business Process Management, pp. 333–371. Springer (2012)

An SDN/NFV Based Approach for Mobility Management in 5G Networks N. Omheni1(&), F. Zarai1, B. Sadoun2, and M. S. Obaidat3 1

3

New Technologies and Telecommunications Systems Research Unit, ENET’COM, Sfax, Tunisia [email protected], [email protected] 2 ECE Department, College of Engineering, Al-Balqa Applied University, Astana, Jordan Kazakhstan and King Abdullah II School of Information Technology, Amman, Jordan [email protected]

Abstract. The Software-Defined Networking (SDN) and the Network Function Virtualization (NFV) paradigms present new opportunities in the concept of cellular and wireless networks. The present chapter investigates the benefits of the emerging SDN and NFV technologies on the mobility management in such networks. The fast development has led to the emergence of extremely complicated systems, where a large number of logic modules must interact to lead to the desired behavior and the desired quality of service. The key advantage of SDNs is the simplicity of networking and the deployment of new mechanisms and applications. Furthermore, the programmable aspect on the traffic and devices in SDNs makes them more efficient and flexible than traditional networks. Network Functions Virtualization aims at answering these issues by removing networking functions from vendor-specific hardware appliances to a software accommodated on platform systems. In this context, Distributed Mobility Management (DMM) has been recently presented as a new trend to solve the issues of the today’s mobility management protocols. In this chapter, we propose a partially distributed Mobility Management for SDN/NFV networks. Simulation results demonstrate that, compared with conventional MM strategies, the proposed scheme guarantees an important reduction of the number of handover and the signaling cost. Keywords: Software-Defined Networking  Network Functions Virtualization  Distributed Mobility Management  Proxy Mobile IPv6  Media Independent Handover  OpenFlow  SDN controller

1 Introduction We are witnessing in recent years to an explosion of mobile communications, together with an exponential usage of Internet for all kinds of applications. It is expected that by the year 2020, more than 50 billion smart devices around the world should be connected and the annual revenues of this new market will exceed US $8.9 trillion [1]. In this evolved context, a wide range of wireless technologies has gradually emerged © Springer Nature Switzerland AG 2020 M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 39–53, 2020. https://doi.org/10.1007/978-3-030-35944-7_3

40

N. Omheni et al.

indicating a great diversity in communication needs in various application domains and new standards have regularly been proposed. Moreover, the massive volume of traffic and the evolutionary aspect of the size of such systems make any study carried out on these networks a very difficult task. Thus, both mobile operators, industry and research communities are trying to discover innovative solutions and mechanisms to improve their network efficiency and performance as well as to moderate the costs of new service deployment and network operation maintenance.

Fig. 1. Overall main components of SDN architecture.

Software-Defined Networking (SDN) and Network Function Virtualization (NFV) are two important recent innovations that are expected to offer such solutions. SDN is a new paradigm for programmable networking and is adopted extensively in enterprise networks and data centers [2]. While the aims of NFV aims are virtualize network functions and use them into common purpose hardware, SDN makes networks programmable by the separation between the control and data planes. NFV and SDN are two complementary technologies capable of offering one network solution. SDN can offer connectivity between Virtual Network Functions (VNFs) in a flexible and automated manner; however, NFV can utilize SDN as part of a service function sequence. Figure 1 depicts the SDN network. In such network, control and data forwarding functions are managed separately in order to permit centralized and programmable network control [3]. The major components of the SDN architecture comprise a data plane involving network resources for data forwarding, a control plane including SDN controllers permitting a centralized control of network resources, and a management applications to program network operations over a controller. The interface between the data

An SDN/NFV Based Approach for Mobility Management in 5G Networks

41

and the control forwarding plans is called the southbound interface while the controlapplication interface is called the northbound interface. Mobility management plays a crucial role in such environments, where mobiles can easily experience numerous handovers during the same connectivity session. Consequently, there is a real need to propose novel mobility management approaches. Mobility management approaches have to be distributed to provide better reliability and avoid any network bottleneck or single point of failure. Here the DMM paradigm presents most of the above-mentioned features, and specifically accounts for distributed IP flow mobility managed via distributed anchoring by separating data and control planes to address the limitations of current centralized mobility management such as scalability, reliability and sub-optimal routing [4]. Several DMM-oriented solutions have been proposed in the literature as, for example, the Distributed Mobility Anchoring (DMA) [5], Double NAT (D-NAT) [6], Inter-domain DMM, and Local IP Access (LIPA)/Selected IP Traffic Offload (SIPTO) [7]. OpenFlow-based SDN architecture is another candidate solution that supports DMM features and outperforms existing solutions. Advantages provided by OpenFlow, as the most joint communication protocol used in SDN approach, would be an enabler to reach the forwarding plane of OpenFlow switches through the network and reconfigure it in line with the necessities of applications and network services [8]. In this chapter, we present a new SDN/OpenFlow based partially DMM. First, we introduce the proposed architecture components. Then, we describe our suggested mobility management procedures for SDN/OpenFlow composed by two stages: (a) preparation and registration stage and (b) handover execution. Our approach belongs to the category of partially distributed mobility management. The SDN Controller handles the control plane in a centralized way. While, the DMM-ARs (Distributed Mobility management-Access Routers) manage the data plane in a distributed manner. The rest of this chapter is organized as follows. Section 2 presents the related work. In Sect. 3, the new SDN/NFV based partially DMM is detailed. OpenFlow operations, which are executed in the DMM-AR are detailed in Sect. 4. Performance evaluation is discussed in Sect. 5. Finally, Sect. 6 concludes the chapter.

2 Related Work 2.1

SDN and NFV Paradigms

In this section, we discuss different projects dealing with wireless and cellular networks that integrate SDN and NFV paradigms. In SoftCell [9], SDN principles are incorporated in LTE (Long Term Evolution) core networks. The aim of this framework is to build simple programmable core switches inside mobile network while the most of functionalities are pushed to access switches in the radio access network. This division between access and other core switches creates real scalability. Contrary to SoftCell, which is interested in the dimensioning of the core network, SoftRAN project makes use of SDN functionalities to remodel the LTE radio access network [10]. In traditional radio access networks, interference and handovers are handled using distributed protocols. While this concept is acceptable in light networks,

42

N. Omheni et al.

in ultra-dense environment it leads to bad performance in terms of interferences and latencies. In SoftRAN, the entire LTE network is controlled in a centralized manner. All e-Node B co-located in a geographical area are managed as a virtual big-base station. Radio resources are abstracted out as three-dimensional grid of space, time and frequency slots. Periodically, all radio interfaces send information about local network state to SDN controller. The latter determines the way to assign radio resources block and transmit power for each radio element. Work in [11] was recently published. The authors proposed a new architecture for IoT (Internet of Thing) combining the two evolving technologies: Fog computing and SDN. Their goal was to support a high level of scalability, real-time data delivery and mobility. Fog computing policy is considered as the suitable platform for IoT thanks to its capability to reduce latency for services that need fast analysis and decision-making. While, SDN is used due to its centralized aspect to manage control plane, which permits the execution of sophisticated techniques for resource management and traffic control. In [12], authors proposed a new solution in the form of Software-Defined Mobile Networks (SDMN) including SDN, NFV (Network Function Virtualization) and cloud technologies. The goal is to answer the issues confronted by current mobile network architectures in integrating diverse services. Authors in [13] proposed an OpenFlow based IEEE 802.21 Media Independent Handover (MIH) to perform link connectivity establishment in SDN. Nevertheless, 3GPP or ETSI NFV architectures are not considered in their framework. In this work, a MIH-enabled Evolved Packet System was proposed to offer seamless handovers between 3GPP and non-3GPP wireless technologies. However, their work does not consider programmable or virtualized mobile concepts. 2.2

Distributed Mobility Management (DMM)

There are already many works that have treated Distributed Mobility Management in the context of SDN. In [14], a mobility management approach called Mobility SDN (M-SDN) was proposed to decrease the traffic pause time produced by a host-initiated layer-2 handover. The key idea of this work is that the handover preparation is performed in parallel with layer-2 handover and active flows are sent to each potential handover target. In [15], the authors considered the 5G as an application group and suggested that mobility management can be treated as a service on top of the SDN controller. In [16], the authors focused on forwarding data across networking layers and discussed how to relate SDN to the Telecom domain. Authors of [17] presented a new architecture for SDN based mobile networking with two kinds of controller model: hierarchical and single controller. In [18], authors proposed a new DMM solution in the context of 5G networks based on SDN architecture called S-DMM. In their proposed architecture, DMM is delivered as a service deployed on top of SDN controller. Mobile Access Routers (MAR) are considered as a simple forwarding hardware and do not necessitate any mobility-related module. The centralized control controller permits the operators to control the network at a reduced complexity level.

An SDN/NFV Based Approach for Mobility Management in 5G Networks

43

In the rest of this subsection, we describe briefly three main types of DMM solutions, which have been published as extensions or improvements of already published standards. The first type of solutions is known as PMIPv6-based DMM solution. It is based on amelioration of classical IP mobility protocols and mainly PMIPv6 (Proxy Mobile IPv6). This protocol manages mobility in a centralized way where the Local Mobility Anchor (LMA) in the core network creates bidirectional tunnels to Mobile Access Gateways (MAGs) fixed in the radio access networks. More details about this protocol can be founded in [19]. The second family of solutions is inspired by the SDN context and named SDNbased DMM. In SDN, network control and data forwarding functions are managed separately to permit centralized and programmable network control. With this paradigm, network administrators are able to program the comportment of the traffic and the network in a centralized manner. The last category of solutions is the routing-based DMM. The main idea of this kind of solutions is to eliminate any anchor point from the network architecture; permitting all nodes in the network to re-establish a new routing map when terminals change their location. This family of solutions belongs to the IP routing protocols.

3 SDN/NFV-Based Partially Distributed MM (S-PDMM) 3.1

Proposed Architecture Components

In this section, we introduce in detail the proposed system model for SDN/NFV-based partially distributed MM and we describe the suggested mobility management procedures. The approach presented in this chapter is a continuation of our research work [20]. The proposed system model takes benefit from the management and orchestration functionalities from NFV by a suitable cooperation between SDN and NFV. The proposed architecture is shown in Fig. 2. Our SDN mobility management architecture relies on three main levels: The RANs (Radio Access Networks), the DMM-AR and the SDN Controller. The proposed architecture is in the context of 5G where several RATs coexist. The proposed solution takes advantage of SDN and NFV technologies. The proposed model divides the network into several slices. The base stations and DMM-ARs form the data plane while the control plane consists of the SDN-Controller. The DMM-AR is an access router that not only delivers connectivity to the RANs (default gateway), it is also boosted with some specific DMM functionalities. DMMARs act as OpenFlow switches (OFS) and communicates with the SDN controller with the southbound Application Program Interfaces (APIs) to achieve the packet processing and forwarding feature. The SDN controller with the use of OpenFlow protocol can apply a set of actions such as adding, deleting or updating flow entries to the flow tables in the DMM-AR. The latter also oversees the exchange of control plane messages with mobile users, controls data plan functions and provides data flow configurations. It is also responsible for the exchange of control plan messages with the SDN-Controller. The first level is composed of SDN enabled WiFi access points and 3GPP LTE radio access network. RANs are the heterogeneous access networks, which include

44

N. Omheni et al.

Fig. 2. Proposed architecture.

different access technologies such as WiFi and LTE. These radio access networks can be programmable and under the supervision of SDN Controller in the core network. One of the issues that can be observed in the first level is the coexistence of various complementary technologies (cellular vs WiFi), in terms of connection type, shared/dedicated medium and QoS requirements. In order to closer incorporate QoS signaling and mobility for these various technologies, we combined the IEEE 802.21 MIH functions with the proposed SDN-based partially distributed MM. The reason of this mapping between MIH and SDN is that WiFi RANs allow handover only to the same network types and behind the same domain. Furthermore, mobility management at upper layers does not tolerate significant delays to get technology-independent handover triggers and to select the best candidate AP. The aims of MIH standard are to facilitate mobility management by delivering a technology-independent interface under the network layer. The IEEE 802.21 proposes a MIH specification for achieving seamless handover for mobile users in the same or in different networks.

An SDN/NFV Based Approach for Mobility Management in 5G Networks

45

The main functionality offered by MIH is a seamless connection to different RATs. The control messages are relayed by the Function (MIHF) located in the protocol stack between layer 2 wireless technologies and IP layer. This type of deployment makes it easy for mobile nodes to move between different Points of Attachment (PoAs). The third level is composed of SDN controller which is the key entity in our architecture. The role of this controller is the management and the configuration of DMM-ARs through the Southbound common application programming interface as mentioned earlier. The northbound API is reserved for communications between the SDN controller and the network applications. The Mobility Management Entity (MME) side core network is integrated in the SDN controller. The latter interacts with the AAA server to get the MN’s profile for authentication. Furthermore, SDN controller supports others control plane features related to LTE networks such as Serving Gateway (S-GW), Home Subscriber System (HSS) and others nodes. The BS ensure the transmission of the signaling plan/control messages exchanged between the mobile users and the SDN controller. The exchange of the user plane data between the users and the external data networks via DMM-AR is also ensured by the DMM-AR. The proposed model also includes Slice Manager (SM), Network Functions (NFs) and a physical layer for storing, calculating and managing network devices. The NFs play the role of the orchestrators and allow the management of the NFV infrastructure. Network resources are managed by the SM, which slices them according to service requirements. NF processes resources to instantiate the virtual network. Due to the scalability of the proposed architecture, the slices present may contain an independent controller. In each slice, a virtual controller provides virtual base station management and control as well as virtual DMM-ARs. As mentioned, the SDN-Controller is placed in the core network and must have huge processing and storage capabilities. The SDN controller is the key entity in our architecture. The role of this controller is the management and the configuration of DMM-ARs through the Southbound common application programming interface. The functional blocks of the SDNController are shown in the Fig. 3.

Fig. 3. SDN controller architecture.

46

N. Omheni et al.

The SDN-Controller must perform the following functions: – Device Pattern Interface Bloc (DPIB): DPIB communicate with the data plane functions and constitutes the lowest layer of the SDN-Controller. – Multi-RAT Abstraction Bloc (MRAB): This functional bloc permit the management of Multi-RAT according to mobiles users. It transforms all configurations delivered by higher layer functions into a RAT particular configuration set to a virtual BS through the DPIB. – Flow Control Bloc (FCB): FCB allows flow configuration on Virtual BSs and DMM-ARs based on service quality requirements in an abstract way. It offers a RAT-independent interface to the Application Control and Rule Bloc (ACRB), which may contain RAT control mechanisms. FCB preserves a combined list of abstract attributes for each connected user and its related data flows. – Application Control and Rule Bloc (ACRB): ACRB includes of slice-specific control and specific rules applications. These latter can be included easily by the network administrator in a particular slice without touching other network slices. – Network Supervision Bloc (NSB): NSB permit the functionality supervision into the network. It delivers all necessary parameters for the supervision and the configuration to sending plane functions via MRAB and its DPIB. 3.2

SDN/NFV-Based Partially Distributed MM Procedures

The suggested mobility management procedures are divided into two stages: (a) The preparation and registration stage and (b) the handover execution stage. In the first step, we take advantage of the MIH standard in SDN context for the optimization of the MN attachment detection. In the second stage, the proposed mobility management approach uses the PMIPv6 protocol for handover execution. The SDN controller will play the role of LMA in the PMIPv6 context. The MAG is replaced by the DMM-AR. Figure 4 shows the proposed mobility management operations.

Fig. 4. Mobility management operations [20].

An SDN/NFV Based Approach for Mobility Management in 5G Networks

47

3.2.1 Preparation and Registration Stage For the preparation stage, the DMM-AR must be able to be aware of the existing RANs status. These actions can be achieved by applying MIH_Link_Get_Parameters primitives between the MIHF and its users. MIH_Get_Information message primitives can ask Handover policies and network context information from the SDN and the MIIS at the core network. Upper layers can also command specific actions for a given radio interface such as Link Power Up or Link Power down operation. When a MN moves inside an LTE RAN network, the radio interface is switched on by running MIH Link Power Up primitive. This will trigger the network attachment of the LTE interface to the DMM-AR and an IP route will be established to the MN. Registration occurs when the MN changes its attachment from a previous DMM-AR (p-DMM-AR) to a new DMM-AR (n-DMMAR) to preserve connectivity with the correspondent node (CN). Two types of messages are exchanged between the MME, which is integrated in the SDN controller, and the new DMM-AR. The latter acts as the HA (Home Agent) of the MN in the PMIPv6 domain during this process; proxy binding update (PBU) and proxy binding acknowledgement (PBA) processes. A DMM-AR incorporates either mobility anchoring features and is able to forward MN’IP flows without disruption before moving to a new DMM-AR. The SDN controller will play the role of LMA (Local Mobility Anchor) in the PMIPv6 context and maintain the mobile node’s (MN) reachability when it is away from home. The MN sends a Router Solicitation message to its DMM-AR. The latter exchanges PBU and PBA messages with the SDN controller. The MN attachment detection is achieved and new IPv6 prefix is assigned to the MN. 3.2.2 Handover Execution PMIPv6, in the original version, suffers from several limitations such as packet loss and long handover latencies. For that reason, our approach takes benefit from the wireless link layer triggers to anticipate the next handover when the MN changes its attachment. IP flows are directly forwarded to the new DMM-AR in a pre-established tunnel between the two DMM-ARs before the new attachment. In the following, we give the different steps of handover execution. After the registration stage, the SDN Controller creates a new entry for the MN. After receiving the PBU message from the current DMM-AR, the MN updates its location with the new DMM-AR. As mentioned previously, IP flows are directly forwarded to the new DMM-AR in a pre-established tunnel between the two DMM-AR before the new attachment. After that, DMM-ARs act as OpenFlow switches (OFS) and communicates with the SDN controller with the APIs to achieve the packet processing and forwarding feature and the OpenFlow rules in the new DMM-AR are configured. The final step of handover is achieved when rules on DMM-AR are translated and forwarded. The visited DMM-AR changes the IP destination address with the last MN’s IP address to forward traffic in the new MN’s domain. Our approach belongs to the category of partially distributed mobility management. The SDN Controller handles the control plane in a centralized way. While, the DMMARs manage the data plane in a distributed manner.

48

N. Omheni et al.

4 OpenFlow Operations DMM-ARs act as OpenFlow switches (OFS). The comportment of OFS is wholly determined by the contents of Flow Tables, whose entries identify flows and the way to analyze packets of these flows. Each entry comprises three features: (1) Rules: to match incoming packets to current flows. Each entry must contain a set of header values. These are used to look for the flows to which incoming packets belong. (2) Actions: This entry determines how to handle packets belonging to the flows. A packet can be either forwarded, dropped, or modified. (3) Statistics: This feature covers statistical data, which can be used by the SDN controller to adjust policies. The flow-table format is illustrated in the Fig. 5. Counters field indicates some statistics such as number of received packets, received bytes and duration. Three actions are defined depending on the case (forward the packet, encapsulate and forward the packet or drop the packet. The priority field in our approach gives priority of the used radio network.

Fig. 5. Flow-table format [20].

The OpenFlow protocol allows handling different nodes in the network in right time by executing configuration changes in the data plane. In OFS, the latency experienced by data plane features to treat packets increases due to the transmission delay between OpenFlow switch and the SDN Controller, the performance of the latter in terms of processing speed and finally the receptiveness of OpenFlow switches in creating new flow and updating their tables after receiving information from the SDN Controller [21]. DMM-ARs check the SDN controller for the first packet of each new flow. Later all packets belonging to the same flow will be processed in line with the flow-table entry (rules) fixed after receiving the first packet. The traffic between the SDN controller and DMM-ARs is then considerably reduced by flow-based traffic. We consider that the OFSs adopt a pipeline treatment of the received packets as mentioned in [22]. Three components are defined in this pipeline treatment. A flowtable to manage and forward packets, a safe channel to connect a DMM-AR and the SDN Controller and finally the OpenFlow protocol, an open standard for communication between the SDN Controller and DMM-ARs. Figure 6 illustrates the different steps that the DMM-AR takes to process a packet. When a packet arrives at DMM-AR, which acts as an OpenFlow switch, it checks whether there is an entry matchin its flow-table.

An SDN/NFV Based Approach for Mobility Management in 5G Networks

49

Fig. 6. Packet processing steps [20].

In case of correspondence, one of these three actions will be executed (forward the packet, encapsulate and forward the packet or drop the packet). If not, the packet will be sent to the SDN Controller to update the flow-table.

5 Simulations Results 5.1

Simulation Setup

The proposed approach is evaluated through simulation. The implementation of the proposed framework is performed in OMNeT++ 5.0. The simulation scenarios are as follows: one eNodeB, one DMM-AR and UEs, where the UEs are dynamically moving from one place to another. We conduct the simulation in the area of about 2000 m  2000 m. To simplify the simulation, we assume that control messages are of the same size of a unit length and the distance between the SDN controller and the DMM-AR is set to 1 hop. Table 1 shows the simulations parameters. The performance of our proposed S-PDMM framework is evaluated based on a comparison of signaling cost and number of handovers with the work in [22]. The Signaling Cost (SC) represents the cost of mobility-related signaling messages for a mobile node per unit time. The Signaling Cost (SC) can be calculated as: SC ¼

X

ðMessagej  Hopsj Þ

Signaling j

Where Message j is the size (in bytes) of a signaling message j, and Hops j are the average number of hops traversed by message j. The number of hops changes for each type of transmission based on the path selected. Here, one hop is assumed to be set as the distance between the SDN Controller and the DMM-AR. The Overall handover indicates the number of networks that are involved in handover.

50

N. Omheni et al. Table 1. Simulations parameters. Parameters Values Simulation area 2000 m  2000 m Mobility model random walk model UE distribution Uniform randomly Transmission rate 100 Mbps Distance between eNB and DMM-AR (hops) 1 Radius of eNB coverage 500 m Velocity of UEs 2 m/s

5.2

Simulation Results

5.2.1 Signaling Cost Figure 7 shows the performance results of signaling cost in the network over the time interval. We can observe that when the MN moves far away from its DMM-AR, the signaling cost is notably increased because it is proportional to the number of switches along the path from the source to the destination.

Fig. 7. Signaling cost.

We can clearly see that our proposed S-PDMM framework outperforms the other existing system in terms of signaling cost. Compared with the [22], signaling cost is approximately reduced by around 10%. Our approach takes benefit from the wireless link layer triggers to anticipate the next handover when the MN changes its attachment. IP flows are directly forwarded to the new DMM-AR in a pre-established tunnel between the two DMM-ARs before the new attachment and without recourse to additional signaling messages exchange. This act significantly reduces the signaling cost. In conclusion, the low signaling cost makes the proposed scheme more scalable in comparison with other competing approaches.

An SDN/NFV Based Approach for Mobility Management in 5G Networks

51

5.2.2 Overall Handovers Overall handover indicates the number of networks that are involved in handover. Figure 8 shows the simulation results for the overall handover process in the network. It can be observed that our proposed scheme reduces the overall unnecessary handover.

Fig. 8. Overall handover.

6 Conclusion In this chapter, we have proposed a new mobility management approach called an SDN/NFV-based partially distributed mobility management in the context of 5G cellular and wireless networks. First, we have presented comprehensively the latest approaches for SDN and NFV based mobile and cellular 5G. Then, we made a general system model for SDN and NFV mechanisms in the network, and define in detail profits that these two technologies bring in all levels of the network. Last, we have detailed our approach for mobility management that takes benefit from the management and orchestration functionalities from NFV by a suitable cooperation between SDN and NFV. Our solution benefits from the scalability and the flexibility provided by SDN/NFV and DMM schemes. The proposed solution belongs to the category of partially distributed mobility management. Moreover, we combined the IEEE 802.21 MIH functions with the proposed SDN-based partially distributed MM in order to incorporate QoS signaling and mobility for the various technologies in the network. We have demonstrated by simulation that the proposed approach can significantly reduce the number of handovers and the signaling cost.

52

N. Omheni et al.

References 1. Internet of Things (Iot) 2013 to 2020 Market Analysis: Billions of Things, Trillions of Dollars, IDC (2016). Www.Marketsandmarkets.Com/Internet-of/Things-Market. Accessed 20 Mar 2017 2. Ahn, C.-W., Chung, S.-H.: SDN-based mobile data offloading scheme using a femtocell and Wifi networks. Mob. Inf. Syst. J. 1(1), 1–15 (2017) 3. Kreutz, D., Ramos, F., Verissimo, P., Uhlig, S.: Software-defined networking: a comprehensive survey. Proc. IEEE 13(1), 14–76 (2015) 4. Liu, D., et al.: Distributed mobility management: current practices and gap analysis. IETF Internet Draft (2014) 5. Seite, P., Bertin, P.: Distributed mobility anchoring. IETF Internet Draft (2013) 6. Liebsch, M., et al.: Per-host locators for distributed mobility management. IETF Internet Draft (2011) 7. 3GPP Technical Specification 23.829: Local IP Access and Selected IP Traffic Offload (LIPA-SIPTO) (Release10) (2015). http://www.3gpp.Org/Dynareport/23829.htm. Accessed 2017 8. The OpenFlow Switch Specification, Version K.15.05.5001: (2017). http://Archive. Openflow.Org. Accessed Mar 2017 9. Jin, X., et al.: SoftCell: scalable and exible cellular core network architecture. In: ACM Conference on Emerging Networking Experiments and Technologies (Conext), pp. 163–174 (2013) 10. Gudipati, A., Perry, D., Li, L., Katti, S.: SoftRAN: software dened radio access network. In: ACM SIGCOMM HotSDN Workshop, pp. 25–30 (2013) 11. Tomovic, S., Yoshigoe, K., Maljevic, I., Radusinovic, I.: Software-defined fog network architecture for IoT. Int. J. Wirel. Pers. Commun. 2(1), 181–196 (2017) 12. Ahmad, I., et al.: New concepts for traffic, resource and mobility management in softwaredefined mobile networks. In: 12th Annual Conference on Wireless on-Demand Network Systems and Services (WONS), Cortina d’Ampezzo, pp. 1–8 (2016) 13. Knaesel, F., Neves, P., Sargento, S.: IEEE 802.21 MIH-enabled evolved packet system architecture. In: International Conference on Mobile Networks and Management, pp. 61–75 (2013) 14. Chen, C., et al.: Mobility management for low-latency handover in SDN-based enterprise networks. In: IEEE Wireless Communications and Networking Conference, Doha, pp. 1–6 (2016) 15. Costa, J., et al.: Software defined 5G mobile backhaul. In: 1st International Conference on 5G for Ubiquitous Connectivity, pp. 258–263 (2013) 16. Hampel, G., Steiner, M., Bu, T.: Applying software-defined networking to the telecom domain. In: IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), pp. 133–138 (2013) 17. Jeon, S., Guimaraes, C., Aguiar, R.: SDN-based mobile networking for cellular operators. In: 9th ACM Workshop on Mobility in the Evolving Internet Architecture (Mobiarch 2014), pp. 13–18 (2013) 18. Nguyen, T., Bonnet, C., Harri, J.: SDN-based distributed mobility management for 5G networks. In: IEEE Wireless Communications and Networking Conference, pp. 1–7 (2016) 19. Bernardos, C.J., De La Oliva, A., Giust, F.: A PMIPv6-based solution for distributed mobility management. IETF Internet Draft (2014)

An SDN/NFV Based Approach for Mobility Management in 5G Networks

53

20. Nouri, O., et al.: New approach for mobility management in OpenFlow/software-defined networks. In: The 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH), pp. 25–33 (2018) 21. He, K., et al.: Measuring control plane latency in SDN-enabled switches. In: The 1st ACM SIGCOMM Symposium on Software Defined Networking, pp. 1–6 (2016) 22. Javed, U., et al.: Stochastic model for transit latency in OpenFlow SDNs. Comput. Netw. J. 113(1), 18–229 (2017)

Dockemu: An IoT Simulation Framework Based on Linux Containers and the ns-3 Network Simulator — Application to CoAP IoT Scenarios Ant´ on Rom´an Portabales1(B) and Mart´ın L´ opez Nores2 1

2

Quobis, O Porri˜ no, Spain [email protected] AtlantTIC Research Center for Information and Communication Technologies, University of Vigo, Vigo, Spain [email protected]

Abstract. Large-scale and realistic simulations have been a pending issue in IoT research and development, hampering the design and optimization of networked systems. This paper presents new features added to the Dockemu open-source project, aimed at making it a valuable framework for such studies. The framework is based on the use of Linux Docker containers for the individual constrained nodes, and the ns-3 network simulator to emulate the network and connect the nodes during the simulation. Both technologies combined enable the capacity to simulate a huge number of lightweight nodes under realistic network conditions. The Linux interface mechanism used to interconnect the containers and the ns-3 simulation are described in detail. We also explain how LTE and LR-WPAN network technologies were added to the framework in order to cover a wide range of scenarios. Details on how Ansible has been used to orchestrate the setup and execution of the testing framework are given, too, showing how this widely-used devops tool can replace different programming and scripting languages for the orchestration of a simulation framework. Finally, the paper includes an example of IoT scenario simulation, using a real implementation of the CoAP protocol and involving a relevant number of nodes. Keywords: IoT CoAP

1

· Network simulation · Docker real-time containers ·

Introduction

The Internet of Things (IoT) will consist of an unprecedented number of heterogeneous connected devices, including the smart mobile devices of billions of users and a significantly greater amount of sensors, of very diverse types. The latter will have very specific characteristics in terms of hardware (most often, limited memory and computational power) and software (including operating systems c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 54–82, 2020. https://doi.org/10.1007/978-3-030-35944-7_4

Dockemu: An IoT Simulation Framework

55

and communication protocols). Even the management facilities will be disparate, with some devices supporting powerful administration utilities and frequent system updates, and many other supporting none. Therefore, IoT networks and systems will be intrinsically complex, hard to design and manage. Simulation is called to be an enabling tool in order to build reliable IoT services in a cost-effective manner, dealing with both quantitative and qualitative aspects such as capacity planning, what-if simulation and analysis, proactive management and support for specific security-related evaluations [6]. However, large-scale and realistic simulations have been a pending issue in IoT research and development, hampering design and optimization studies. In this paper, we tackle this problem by presenting new features added to the Dockemu opensource project, aimed at making it a valuable framework for IoT simulations. The original Dockemu project was launched by Marco Antonio To, Marcos Cano and Preng Biba in [27]. It proposes a simulation approach where a configurable number of nodes can run any client/server application which is executed in a Linux container and the network is simulated used using the open source network simulator ns-31 . The implementation we have used as a reference was ´ published by J.A. Alvarez Aldana in Github2 . The main features of the Dockemu simulation framework and which were firstly described in [27] are as follows: – It allows to use real software in the simulated nodes, removing the extra effort needed to create ad-hoc simulation software and ensuring more accurate results. – The nodes execute the real software to be used in production environments with no modifications, thus making the experiments more realistic and reducing the effort to setup the simulation. – It is based on open-source projects and the project itself is open-source and publicly available, so it can be used and extended with total access to the code, which is certainly an effective and cost-efficient approach for research works [9]. – It has a very quick set-up time through a completely automated procedure, minimizing the time the researcher needs to invest in tasks not directly related with the experiments at hands. – The tools available for the exchange of Docker containers make it very easy to replicate any kind of experiments, therefore easing the validation and analysis of the simulation results included in any publication. – The whole environment can be executed in generic low cost hardware, making it usable by any researcher. Due to these facts, Dockemu promotes more realistic, reproducible and representative network simulations. It supports the most relevant IoT network technologies, and thanks to its decoupled architecture it can be easily extended by adding more of them in the future, as soon as they are available in ns-3. The use 1 2

https://www.nsnam.org/. https://github.com/chepeftw/NS3DockerEmulator.

56

A. R. Portabales and M. L. Nores

of real software for the simulations entails great advantages, not only for being able to test the software that is going to be used in production, but also because it is possible to discover implementation flaws (and even design ones) that could cause dramatic effects in the case of IoT devices3 . We used the original version of Dockemu as a reference, but rewrote it entirely as a set of Ansible playbooks in order to introduce the extensions included in this paper for large-scale IoT simulations. The approach presents a number of advantages which are explained in detail in Sect. 4.3. The common goal of the additions to the framework—which were first described in [21]—was to enable simulations of different IoT scenarios that can neither be covered with the initial version of Dockemu nor with other available simulations frameworks. Those scenarios include more complex topologies, including different types of applications (e.g. client-server) in the same simulation, and uses of network technologies typically found in IoT networks, namely LTE and 6lowpan over IEEE 802.15.4. This work describes the new features added to conduct experiments in a controlled and simulated environment that aim to benchmark IoT protocols and measure the impact of the modification of different network and application protocol-specific parameters. The key technologies in our approach are Linux containers and ns-3. Both are described in Sect. 2. Then a state-of-the-art section discusses the existing alternatives to perform IoT simulations. In Sect. 4 we cover the new features added to the existing Dockemu framework and in Sect. 5 we describe the main implementation details. The section also covers the particularities and challenges of using sys admin tools like Ansible to orchestrate simulation scenarios. Section 6 describes several examples of simulations experiments conducted with Dockemu. The paper ends in Sect. 7 with conclusions and future lines to further enhance Dockemu. This implementation of Dockemu and all the simulations performed for this paper are available in a public repository4 .

2

Technological Background

Container-based virtualization and application containerization is an Operating System (OS) level virtualization method for deploying and executing distributed applications without launching a different VM for each application. The application executed in the containers uses the same lower layers of the OS like the rest 3

4

Security is a key point in IoT deployments since it normally controls and monitors critical infrastructures, and also due to the huge number of devices and the difficulties to update the software in many constrained devices. An extensive report of MQTT and CoAP vulnerabilities and attack patterns detected in production devices can be found at [14]. The Ansible version of Dockemu framework presented in this paper is publicly available under GPLv3 license at: https://github.com/antonroman/dockemu-ansible. In doing so, we try to follow good practices [15] in terms of research impact and reproducibility.

Dockemu: An IoT Simulation Framework

57

of applications, but in an isolated runtime environment. Linux containers take advantage of the different types of namespaces and cgroups resource isolation features provided by the Linux kernel. Namely, the kernel supports six types of name spaces: – mount (mnt), which provides a mount name space for the mounted disk partitions accessible from the container; – process ID (pid), which isolates the processes executed within the container from the processes executed by the host OS; – network (net), which provides a the list of interfaces attached to the container and which can be used to interact with to other containers or any external node; – interprocess communication (IPC), which isolates processes from SysV style inter-process communication and prevents processes in different IPC namespaces from using shared memory; – UTS, which allows a single system to appear to have different host and domain names to the processes running within the container; – user id, each container will have its own name space of users only valid within the specific container. All of them are used by Docker in order to provide its container-level virtualization of processes. In the specific case of Dockemu, a direct manipulation of Network Namespace of the container has to be done in order to provision the MAC and the IP of the containers. Docker provides a complete framework to create and execute Linux containers. It enables the execution of a huge number of isolated containers in a single host server. This is the main reason why we considered containers to be the best approach to run the real software to be tested in our simulations, since IoT scenarios normally require a big number of network endpoints. Using Virtual Machines would require far more resources [22] making the simulations unaffordable in many cases. The overhead of virtual machines is even more noticeable in IoT, since applications in this realm have to run in constrained devices, so they are expected to be light in terms of CPU and RAM usage. Apart from the low use of resources of containers, the use of Docker also facilitates the creation of images which contain all the required software to be tested. These can be created from scratch, or derived from existing container images used during the development phase of the project to be automatically tested by CI (Continuous Integration) systems or by the developer herself. As described in [27] currently, there are Docker images available to be used as development environments for the most common IoT operating systems, such as Contiki OS5 and FreeRTOS6 . The same Docker container which is used to develop and test IoT applications can be directly connected to Dockemu. The other key technology of Dockemu, ns-3, is a discrete event simulator (DES) designed for the simulation of data networks of different technologies 5 6

https://github.com/contiki-ng/contiki-ng/wiki/Docker. https://github.com/megakilo/FreeRTOS-Sim.

58

A. R. Portabales and M. L. Nores

and topologies. It is targeted primarily for research and educational use and open-source software, licensed under the GNU GPLv2 license, therefore publicly available for research, development and use. There are other open-source network simulators, but ns-3 has been considered one of the best in terms of performance of use of CPU and RAM [19]. A key feature of ns-3 is a real-time scheduler for simulation events which locks the simulation clock with the hardware clock. This real-time feature and the ability to generate real network packets which its respective checksums enable integration of ns-3 with real network stacks like Dockemu to connect the Docker containers with the ns-3 simulation [27]. Furthermore, ns-3 has a great diversity of modules to simulate different parts of data networks. Many modules allow to simulate different network technologies implementing realistic models. One of these modules is the Tap NetDevice [25], which enables the connection of a OS-level tap interface with a node of the ns-3 simulation. The Tap is the alternative used to connect the containers where the software of the nodes is running and ns-3. There are also modules not related with the networking itself but with other characteristics of the simulation such as the mobility model, which allows to simulate the nodes moving within a defined area. Credibility of simulations has been identified as one of the problems of ns-3 [18] and network simulation tools in general. However many authors [4,16] have validated the simulation results using testbeds with positive results in the last years so it is reasonable to expect that the models are accurate and that they will become even better over time. A new version of ns-3 called ns-4 has been proposed in [3]. The authors of ns-4 purpose to leverage P4 domain-specific language7 to try to reduce the gap between the development of behavioral models and its implementation. P4 is used to define the network control plane which defines how the packets are processed by the network data plane nodes (switches, routers and NICs) of the network which are in charge of forwarding the data themselves. Both concepts are the pillars of Software Defined Networks (SDN) which separates the control of the operation of a network from the nodes which transport the data. ns-4 is aimed at making the development of advanced layer 2 and layer 3 simulations much easier but it is not expected to mean any relevant advantage for Dockemu framework so it will not be considered in short and mid-term. In Sect. 5 we will see how both the real-time feature and Tap bridge module are key characteristics of ns-3 used by Dockemu to be able to run simulations.

3

State of the Art

Simulation of IoT networks has been widely discussed by the research community for years. [10] gathers a comprehensive list of the requirements every simulation and experimentation platform should meet in order to provide realistic and valuable results: 7

https://p4.org/.

Dockemu: An IoT Simulation Framework

59

– Scale: IoT simulations would normally involve a huge number of nodes; – Heterogeneity: different network technologies, topologies, type of devices and applications must be supported; – Repeatability: experiments must be easily reproducible with the same or equivalents results; – Concurrency: several experiments should be able to be performed at the same time; – Mobility: the platform must be able to simulate mobile nodes as this is going to be normal behavior of many IoT devices; – Federation: testing platforms should be able to federate to each other in order to simulate bigger systems; – User Involvement and Impact: experiments which involves humans should be able to evaluate its social impact and acceptance. Though those requirements were initially considered for experimentation testbeds many of them can be applied directly or adapted to pure or hybrid8 IoT simulations. The first five items are accomplished partially or completely by the current implementation of Dockemu. Federation could be implemented in future versions of Dockemu thanks to the features supported by ns-3. Regarding the simulation technologies to be used, DESs have been identified as valid tools in order to simulate the network. DES is based on the execution of discrete sequence of events in time, occurring each event occurs at a particular instant in time and marking a change of state in the system. No change in the system is assumed to occur between consecutive events. In order to take advantage of multiple CPUs and distributed networks [6] it is necessary to implement Parallel and Distributed Simulation (PADS)9 . The authors of [6] also proposed the use of multilevel simulations, where some parts of the system are simulated in more detail and other parts are simulated at a higher level in order to save computational resources. There are several proprietary simulators, such as SimpleIoTSimulator10 , that claim to be able to simulate thousands of sensors implementing different IoT protocols. No technical details about the simulation techniques used are disclosed. Rather, the sensors are pre-built and the code is proprietary, so it is not really usable in typical research environments. Another commercial alternative is Netsim11 , a generic network emulator that can emulate a network of different technologies and connect real applications to it, however it does not handle the setup of the complete scenario. It allows to modify its source code to implement customized protocols to licensed users. 8

9 10 11

We started to use the term hybrid in [27] to refer to simulations where some of the elements is not simulated but a real element, like the client/server software in Dockemu. With ‘pure simulation’ we refer to simulations where all the elements (nodes, IoT software, networks, etc.) are simulated. ns-3 supports distributed simulations as explained in Sect. 7.1. http://www.smplsft.com/SimpleIoTSimulator.html. https://www.tetcos.com/.

60

A. R. Portabales and M. L. Nores

ns-3 has been already use in other simulation frameworks such as Cupcarbon12 . This is a open-source IoT and smart city simulator that allows to simulate a network of sensors deployed in a city with geographic models13 . It is focused on smart cities and sensor networks, and it does not support the simulation of customized applications so it can not be considered as an alternative to Dockemu [27]. Node-RED14 is an open-source flow-based programming tool which is part of the JS Foundation15 . Flow-based programming is a way of describing the behavior of an application as a network of black boxes. Each black box has a well-defined purpose and exchanges data with other connected boxes. This highlevel, functional style of specifications allows the system behavior to emerge from simplified model, but it does not deal with neither implementation nor low-level networking models. Finally, the most extreme approach in terms of simulation is to use a very large scale open testbed with thousands of real wireless sensors. This is the approach followed by FIT/IoT-Lab16 which consists of thousands of real IoT wireless sensors spread across six different sites in France. The IoT-LAB is open to research experiments under request. This approach is realistic but very expensive and only the specific deployed hardware devices can be used for the simulation.

4

New Features Added to Support IoT Simulations

This section gathers all the new features and technologies we have added to the Dockemu framework within the scope of this work in order to improve its suitability for advanced IoT simulations and be able to simulate a wider range of scenarios. 4.1

LTE and 6lowpan over 802.15.4

IoT emulation requires to support a huge number of nodes as there would be in a real environment and also network topologies using adapted technologies such as LTE and 6lowpan over 802.15.4. We included support for both of them in Dockemu by leveraging the LENA, lr-wpan and 6lowpan modules of ns-3. The initial version of Dockemu only supported CSMA (model equivalent to Ethernet in terms of simulation) and WiFi (802.11), which are not particularly relevant to emulate IoT scenarios [27]. Both LTE and 6lowpan over 802.15.4 topologies support mobility, so scenarios where the nodes are not static are supported thanks to the ns-3 mobility model library [24]. This feature could be especially interesting to simulate connected car scenarios, since it is possible to set the relative position of the nodes 12 13 14 15 16

http://www.cupcarbon.com/. https://github.com/bounceur/CupCarbon. https://nodered.org/. https://js.foundation/. https://www.iot-lab.info/.

Dockemu: An IoT Simulation Framework

61

and also the speed they are moving respectively to each other. The type of simulations covered by both technologies is different. LTE can cover large areas, leveraging the operator infrastructure and relatively expensive devices with SIM card and LTE wireless module which can send and receive high bandwidth traffic. In turn, 6lowpan over 802.15.4 is used in small areas to receive and send information to low power constrained devices. Actually a combination of two modules –which is still not possible in Dockemu– would make sense to cover even more realistic scenarios where a PAN coordinator receives data from remote sensor connected to small devices and this information is sent to a cloud service using LTE.As. 4.2

Different Types of Nodes

The initial version of Dockemu only considered a single type of node. We have added the capacity to define different types of nodes (e.g. scenarios where one node is a server and the rest of nodes act as clients). This allows, for example, to simulate for IoT protocols such as CoAP [5] and MQTT [2] where the nodes can play different roles. Scenarios where there is more than one server can even be easily supported, too. In order to create the different type of nodes the Docker container must be created using a different Dockerfile with the right software or configuration. After conducting some experiments we have found useful to have even more types of nodes (e.g. to simulate different types of client nodes connected to the same server) so it will be considered for a future extension. 4.3

Ansible as Simulation Deployment Tool

The initial setup as well as the scenario setup is a complex process which involves several software elements and configuration files. Ansible –a deployment and orchestration software supported by Red Hat– has become an important tool for devops engineers [8] to deploy services since its release in 2012 and it is being used to automate the setup of complex architectures such as NFV-based platforms. The fact that it is a de facto standard tool, together with the ease to add new features using existing and well-tested modules, makes it a suitable choice to manage the orchestration of the Dockemu framework. It also allows to replicate the simulation environment in different Linux distributions so it makes the project more portable. These are the reason why we decided to adopt Ansible in Dockemu as the deployment and scenario setup tool. We could successfully replace the main original deployment program in Python and a set of Bash scripts by 4 Ansible playbooks following the best practices17 and which can be easily understood and modified with a basic knowledge of Ansible.

17

Ansible Best Practices to write playbooks and organize the files can be found in Ansible doc site: https://docs.ansible.com/.

62

5 5.1

A. R. Portabales and M. L. Nores

Implementation Configuration File

In order to control the parameters of the simulation we had to extend the parameters included in the reference configuration file. The configuration file is an Ansible variable file in YAML format, which makes it easy to understand and modify. If any change is made in the variables file the execution will be modified accordingly. Listing 1.1. Dockemu reference configuration file. −−− # deployment s e t u p n s V e r s i o n : ns−a l l i n o n e −3.29 nsCodeFolder : ns −3.29 e x t e n s i o n : . t a r . bz2 d e p l o y F o l d e r : /home/dockemu/ s r c /dockemu optimized : f a l s e # experiment c o n f i g u r a t i o n # b a s e c o n t a i n e r name s h o u l d not # c o n t a i n non−a l f a n u m e r i c c h a r s # max 8 c h a r s baseContainerName : c o a p c o n t experimentName : coap−e x p e r i m e n t l o g s D i r e c t o r y : / var /dockemu/ l o g s / numberOfClientNodes : 5 numberOfServerNodes : 1 s e r v e r N o d e : True emulationTime : 3000 n s 3 N e t w o r k S c r i p t : tap−csma nodeSpeed : 5 nodePause : 1 ns3NetworkParameteres : −−ns3 : : CsmaChannel : : DataRate =100000000 # emulation parameters startns3 : False ns3Jobs : 1

Once the configuration file has been provisioned with the right values it is necessary to execute the Dockemu from a terminal command, passing the configuration file as a parameter: $ansible-playbook dockemu.yml -t install

Once the installation has finished it is necessary to create the images of the containers simulating the nodes with the command: $ansible-playbook dockemu.yml -t prepare

Dockemu: An IoT Simulation Framework

63

After preparing the simulation it can be executed with the command: $ansible-playbook dockemu.yml -t execute

It is also possible to execute the three commands together which the recommended actions to make sure that all the changes applied in the simulation files are effectively applied by executing the command: $ansible-playbook dockemu.yml --skip-tag cleanup

These commands execute different roles which are explained in detail in Sect. 5.2. Depending on the Ansible installation it may be required to execute the playbook with sudo. 5.2

Steps to Set up the Simulation

Installation Role. There is an Ansible role18 just to setup the installation. The install role is intended to be executed only the first time in the server which is going to host the Dockemu framework. As it upgrades system packages and download a specific ns-3 version (the version specified in the configuration file) the install role can be also executed when it is necessary to upgrade some docker-ce, ns-3 or any other package. The main tasks performed in the installation role are as follows: 1. Upgrading and installing all the required packages. 2. Downloading and installing the last stable version of docker-ce from the official Docker repository. 3. Creating dockemu user and addition to the docker group to enable container execution. 4. Cleaning packages cache and remove not necessary packages. 5. Downloading and extracting ns-3 from official repository. 6. Configuring and compiling ns-3. 7. Preparing the init.d script in order to execute ns-3 as a daemon. Preparation Role. This role must be executed before the first execution and also every time there is a change in the ns-3 simulation script19 or on the client or server Dockerfiles which contains the software which is going to be executed during the simulation in the IoT nodes. This role has been added as it is going to be common during the experiments to modify the networking model or the software running on the nodes. If the name of the files is modified then it is necessary to execute again the install role. 18 19

The roles are the way that Ansible separates groups of actions to be performed in the server. Please note that it is a .cc which must be re-compiled even when we refer to it as a script.

64

A. R. Portabales and M. L. Nores

The main tasks carried out by the preparation role are as follows: 1. 2. 3. 4. 5.

Copying Dockerfiles for client and server. Generating images for both client and server. Copying ns-3 network simulation script. Building the new network simulation script. Creating the folders to store the logs from the client and server containers.

If there has been not any modification in either Dockerfiles or the ns-3 script configuration then it is not necessary to execute the preparation role. Execution Role. The execution role runs the simulation itself and performs all the steps to start the ns-3 network and the node containers. Most of the tasks of this role are related to the creation and configuration of network interfaces required to connect the containers and the ns-3 simulation. In this role is important to keep the order in which the tasks are performed to make sure that the interfaces exist when they must be used by other elements. The main tasks performed by the execution role can be summarized in the list below: 1. Start server and client containers20 . 2. Create link the network name spaces of the containers to the folder which contains the network name spaces of the Kernel21 . 3. Create tap and bridge interfaces per container and link them. 4. Create a pair of virtual peer interfaces (internal and external) per container. 5. Attach external virtual interface to the bridge created for the container. 6. Attach internal virtual interface to the network name space of each container. 7. Change name, add MAC and IPv4 and IPv6 addresses to internal interface of each container. 8. Launch ns-3 daemon. The simulation starts when Ansible finishes the execution setup and it lasts as long as specified in the configuration file. Cleanup Role. There is an assistant role called cleanup which removes all the elements created by the execute role and leaves the system ready for a new execution. It must not be executed before analyzing the results of the simulation as it clears all the simulation logs. The tasks of the cleanup role are as follows: 1. 2. 3. 4. 20

21

Stop and remove client and server containers. Remove log files. Stop ns-3 simulation (if it is still running). Remove tap, bridge and virtual interfaces. The container can not execute the client or server daemon just after being started but it must start with a few-second (at least 10 s) delay to make sure the network interfaces are connected to ns-3. /var/run/netns.

Dockemu: An IoT Simulation Framework

5.3

65

Networking Setup

The networking setup requires the creation of as many bridges and tap interfaces as containers are in the simulation. The number of containers corresponds with the number of nodes desired in the simulation, and it may change from one simulation to another; so, the creation/deletion of bridge and tap interfaces most be done on demand. The number and type of nodes is passed as a parameter. As shown in Fig. 1 the virtual interfaces and the corresponding tap interfaces are connected using a bridge interface and the tap bridge object within the ns-3 topology is associated in turn to its corresponding bridge. Dockemu takes advantage of the Network name space feature of the Linux Kernel [17] to assign IPv4 and IPv6 IP addresses to each container.

Fig. 1. Connectivity between containers and ns-3 ghost nodes for Ethernet (CSMA) and WiFi. Figure obtained from [21].

IPv6 Support. Supporting IPv6 is mandatory for any IoT simulation system as IoT is one of the reasons to force the migration to IPv6. In order to support it, an IPv6 address has been added to the Network Space interface created for each container. This way each container will use directly this IP so the application can be tested with a real IPv6 like in a real network. The connection

66

A. R. Portabales and M. L. Nores

with ns-3 happens at Data Link layer so it is not necessary to handle it in the OS interfaces. Special attention needs to be put on the routing configuration of ns-3 as it has some differences respect to IPv4 routing and this must be managed by the Ansible scripts. 5.4

ns-3 Configuration

Dockemu requires a network simulation as close as possible to a real network. In order to achieve a realistic network ns-3 is compiled with an optimized configuration during the install process. 5.5

LTE Support

Tap bridge is only supported in ns-3 for WiFi and CSMA so it is not possible to connect an ns-3 LTE node to a container through network interface. In order to connect the container with the ns-3 simulation, we followed the approach validated in [12]. A CSMA link with a huge bandwidth and negligible latency is used to connect the tap interface and the UE node in the simulation as depicted in Fig. 2. Each container is connected through a bridge with the tap interface installed in a ghost host, connected in turn using the aforementioned CSMA link. The impact the CSMA link effect is minimal in terms of simulation, so it will not add a measurable effect. This approach can be followed to simulate other network technologies which can not be connected directly to tap bridge interfaces. The current implementation connects each container to a UE node, therefore it simulates the execution of the application in a device with LTE connectivity. In the initial version all the devices are connected to the same eNodeB22 in the ns-3 simulation, but nothing prevents from using several enbNodes in the future. Having several eNodeBs is supported by ns-3 LENA module, actually it has been designed to support from tens to hundreds of eNodeBs and from hundreds to thousands of UEs, so we can assume that this module is suitable for almost any IoT simulation. The diagram of Fig. 2 depicts the general architecture of the system. 5.6

LR-WPAN and 6LoWPAN Support

Low-rate wireless personal area networks (LR-WPANs) are widely used for the last mile in IoT deployments. LR-WPAN enables low-cost, low-speed ubiquitous communication between constrained devices with low-power requirements. The physical and MAC (Medium Access Control) layers of LR-WPANs are defined IEEE 802.15.4 standard. The higher-level layers on top of 802.15.4 needed for 22

eNodeB comes from E-UTRAN Node B and it is the name given to base stations in LTE, the hardware which connects the mobile devices (UE in LET terminology) and the rest of the network.

Dockemu: An IoT Simulation Framework

67

interoperability with other devices are not defined in the standard. There are several specifications, such as 6LoWPAN, SNAP, Thread and ZigBee which define the layers not covered by IEEE 802.15.4 to implement usable LR-WPANs. 6LowPAN defines the encapsulation and header compression mechanisms that allow IPv6 packets to be sent and received over IEEE 802.15.4 and it the only top layer currently implemented by ns-3. ns-3 6lowpan module is used jointly with the lr-wpan module (which implements part of the 802.15.4 standard) in order to simulate a LR-WPAN network. Figure 3 depicts the architecture we used to simulate this type of network. It is pretty similar to the architecture used to simulate the LTE scenario: the ns-3 tap-bridge is connected to a ghost node which is connected using an Ethernet23 . In this architecture the node container must send the traffic in IPv6 directly therefore this must be taken into account when the node application is configured in the Dockerfile used for the node containers. This IPv6 traffic is sent through a very low latency and high bandwidth link to the node which sends the traffic to the LR-WPAN network, after passing through a 6lowpan layer to

Fig. 2. Block diagram of ns-3 configuration to simulate LTE network with N UE and a server nodes. Figure obtained from [21] 23

The name of the module used to simulate wired Ethernet networks in ns-3 is called CSMA.

68

A. R. Portabales and M. L. Nores

adapt the packets to the 127-byte maximum size defined by 802.15.4 standard. In order to associate all the nodes to the same network, a fake PAN association is forced in the configuration. This association happens automatically in a real network and it would set up by one of the nodes of the network which would play the role of PAN coordinator. This has no relevant effects in terms of network simulation. 5.7

Docker Setup

In order to execute the software of server and client nodes, Dockemu uses Docker containers. This way a relatively high number of nodes can be simulated at low computational cost (especially considering that the software is expected to have been designed to be executed in constrained devices). The current Dockemu version allows to deploy up to 16 server nodes and up to 240 client nodes although this number can be increased in future releases. The role of the container is defined by the experimenter with the command executed by the container. The communication between all the containers is bidirectional and agnostic to their role. With this setup we can cover a wide range of IoT simulation scenarios. It would be possible to add more roles with a low effort in the future if it is required

Fig. 3. Block diagram of ns-3 configuration to simulate LTE network with N UE nodes and a server. Figure obtained from [21].

Dockemu: An IoT Simulation Framework

69

by more complex scenarios. The name of the interfaces at OS level used by client and containers is different for debugging and control purposes. Creation of Client and Server Images. It is necessary to build the Docker images which will be instantiated as containers at the beginning of the simulation. In order to create the build, it is necessary to write one Dockerfile for the server and another one for the clients. The creation of this Dockerfile does not differ from a regular file for other types of containers. It must leave the service running as if it would be in a real device or server. Therefore the simulation will also validate the implementation of the IoT software. The client containers will have a pre-configured host table to resolve the IP addresses of the server containers. Performance Compared to the Use of Virtual Machine. The use of containers instead of virtual machines for IoT simulations has several advantages. The main one is that container enables the scalability by several magnitude orders. These are the requirements of the Virtual Machine used to develop Dockemu and to perform all the experiments documented in this paper: – – – – – –

OS: Ubuntu LTS 18.04 64-bit. RAM: 2048 MB. CPU: 1 processor. Enabled Intel VT-x extensions in host server. Enabled nested paging. Execution cap of 100%24 .

With this virtual machine it was possible to run up to 5 server and 90 client containers and handle the ns-3 simulation. Even considering a very small VM running Alpine it would require at least 256 MB of RAM. It means that it would require at least 256 MB × 30 = 7680 MB25 just to execute the Virtual Machines plus the overhead of the RAM consumed by the hypervisor to keep the Virtual Machines running. So we can safely say that Dockemu framework outperforms virtual machine simulations at least by four times only in terms of RAM consumption. It is also relevant to say that Dockemu can perfectly run in Virtual Machines itself so it is very convenient for academic and research use since it can be used in average laptops. In order to measure the efficiency of Dockemu in term of use of RAM, we carried out a battery of tests with different number of client nodes ans a single server node and the results are shown in Fig. 4. As it can be seen in the graph it is possible to simulate a huge number of nodes in a single Virtual Machine consuming a low amount of RAM memory. 24 25

This means in Virtual Box terminology that a full physical CPU is assigned to the virtual CPU. Please note that modern hypervisors does not consume all the reserved RAM when the virtual machine is launched but it is used under demand, however the RAM required to keep the system up and running.

70

A. R. Portabales and M. L. Nores

Use of Light Containers and Multistage Feature of Docker. Docker good practices [7] define that the container must be as light as possible to reduce the load time and the use of resources of the container host. This can be extended to any other container technology. In order to achieve small size images Docker community uses Alpine, a minimalist Linux distribution designed for embedded and tinny systems in general. The size of the base Apline image is close to 4MB and it has consequently shorter download and load times than the rest of distributions.

Fig. 4. Evolution of the RAM consumption in the host running Dockemu respect to the number of client nodes in a simulation.

Alpine uses musl as C library instead of glibc 26 . Using a different C library is it going to make necessary to compile the application for it. For example, to compile libcoap [23] for the experiments presented in Sect. 6 we had to do the compilation directly in the Alpine base image instead of using the reference Dockerfile included in the library. Applications programmed with musl may be more efficient than the same one compiled using glibc 27 which could potentially lead to slightly different simulation results however this is not expected to have a noticeable effect. In the specific case of IoT applications they are commonly compiled using musl. If it is necessary to have some specific C library then Alpine can not be used as base image. Additionally and in order to achieve an image as small as possible we took advantage of the multistage feature of Docker. It enables the building of images in several steps, enabling the use of an image to compile the application installing all the dependencies required for the compilation and then copying the executable 26 27

glibc is the GNU C Library used by most Linux distributions. This page contains a very detailed comparison of performance and characteristics of the main C libraries http://www.etalabs.net/compare libcs.html.

Dockemu: An IoT Simulation Framework

71

files to the final image. This enables to keep the size of the final image to be used in the simulation very small. The Dockerfile shown in Listing 1.2 represents an example of a real file to generate node containers for Dockemu. The first part of the file compiles the library in Alpine and then it is moved and executed in a clean base image. This second container is the one used for the simulations. Listing 1.2. Multistage Dockerfile used for a Dockemu simulation. FROM alpine : latest as builder RUN apk add -- update \ bash \ autoconf \ automake \ pkgconf \ libtool \ build - base \ git \ && rm - rf / var / cache / apk /* \ && ls RUN git clone https :// github . com / obgm / libcoap . git WORKDIR / libcoap RUN ./ autogen . sh -- clean && ./ autogen . sh \ && ./ configure -- disable - tests \ -- disable - documentation -- enable - examples \ -- disable - dtls -- disable - shared \ && make \ && cp / libcoap / examples / coap - server / tmp /. \ && cp / libcoap / examples / coap - client / tmp /. \ && ls / tmp

FROM alpine : latest COPY -- from = builder / tmp / coap -* / libcoap / CMD sleep 60 \ && / libcoap / coap - client \ -m get -s 600 -T cafe \ coap :// server -0 - dockemu / time \ > / var / log / dockemu / coap - client . log EXPOSE 5684 STOPSIGNAL SIGTERM

Network Interface Management. The main complexity of Dockemu framework comes from the management of Linux network interfaces. For each server and client involved in the simulation there will be a docker container. For each container it is necessary to create the interfaces as follows: – One bridge interface which connects the container and the tap interface. – One tap interface which will be connected to the ns-3 simulation and also to the container bridge interface.

72

A. R. Portabales and M. L. Nores

– One virtual interface (referred as “internal” within Dockemu playbooks) which will be connected to the network namespace of the Docker container and which will the interface used by the container (the simulated device) to send and receive data. This interface will be assigned an IP which will be internally used to access the device from the network created by ns-3. – Another “external” virtual interface connected to the “internal” one and in turn connected the container bridge. These interconnected interfaces make possible the exchange of real traffic between the software running in containers as simulated nodes and the network emulated by ns-3. 5.8

Use of Ansible to Deploy, Setup and Execute the Simulation

Several solutions to automate the deployment of software such Puppet, Chef and Ansible have appeared in the last years. They are intensively used in devops tasks. The initial version of Dockemu was implemented using up to ten different Bash scripts to set up the environment (creation of tap and Bridge interfaces and edition of the C++ ns-3 simulation script) and a Python main script which controls the lifecycle and execution of the simulation. We have used Ansible to carry out all the tasks going from the setup of the required packages which need to be installed in the VM where Dockemu is going to be executed to the setup and launching simulation execution itself. Using Ansible instead of Bash or Python scripts has a number of advantages: – The simulation can be easily deployed in any server, different from the OS where the main script is being executed. – It is idempotent, and therefore more efficient since it only performs actions when needed reducing setup time. – Ansible modules take care of checking the current status of the system and act accordingly so it is not necessary to consider many potential initial status in the code saving development time. – It is declarative (not procedural), which added to its smooth learning curve makes the playbook files28 easier to understand and modify even by not expert programmers. – It will be possible to take advantage of new modules and features added to Ansible in the future. Once the simulation has finished, Ansible it is also used to gather all the traffic exchanged by all the nodes collected in PCAP files (except the LR-WPAN traffic, which is collected in text files) and also the logs generated by the client and server applications executed in the Docker containers.

28

Playbook is the name given by Ansible framework to the scripts where all the instruction needed to carry out a task are written.

Dockemu: An IoT Simulation Framework

73

Creation of the Main Playbook. Ansible is based on the used of playbooks which are YAML files which includes the actions to be performed on the target host. As stated above, the playbooks are declarative, not procedural. This means that the playbook represent the desired state of the host where the simulation is going go be executed. Ansible takes cares of checking the current status of the system and perform the required actions to reach the defined state. This saves a considerable amount of development time and also helps to automatically cover error situations which could hardly be covered with hand-made scripts. There are other valueless and routine tasks which can be done with Ansible built-in actions without requiring any ad-hoc code. For example, the generation random MACs for the containers with Ansible built-in filters. Configuration of the Simulation. All the simulation parameters are configured in a single YAML file. This enables the modification of all the simulation conditions in a single point. When a parameter is modified, Ansible acts accordingly and performs again only the actions related to that parameter in new executions. Use of Ansible-Playbook Tags to Control the Simulation. The tagging feature of the ansible-playbook command enables the partition of the playbooks in several sections which can be executed separately. This has been used to divide the playbook in four main sections (namely, install, preparation, execution and cleanup) and also for debugging purposes. If no tag is used then the whole playbook is executed. The main point of using tags is on one hand to avoid repeating steps to save time during the experiments and on the other hand to make easier to find possible problems in during the simulation. Logging and Tracing System. Dockemu gives the option to output the logs of the IoT devices into a folder in the container host server. This is achieved by mounting a volume in Docker when the container is started. It enables the analysis of the results even during the simulation. On the other side, ns-3 has the possibility to capture pcap traces of all the traffic sent through the simulated channel. The pcap traces make it possible to perform a deeper analysis of the message flows and also analyze network issues such as packet losses, delays and jitter with standard tools. Issues Found Using Ansible to Implement Dockemu. The fact that Ansible is not and must not be used as a programming can make it a bit harder to implement some parts of the simulation without understanding the fundamentals of Ansible. For example, the iterations through client and server containers has to be done with with indexed items instead of with index to be able to use both the information related to the container and also the numeric index assigned to each container which will be used to create and manage the networking interfaces.

74

A. R. Portabales and M. L. Nores

In any case, it is necessary to remark that Ansible has been successfully used in Dockemu to replace a main Python script to orchestrate the setup and several bash scripts so we can conclude that it is a powerful and useful tool which can save a lot of development time in IT research works.

6

Experiments Using Dockemu

This section includes the steps which must be followed to conduct an experiment using Dockemu and also describe examples of real IoT scenarios simulated with the framework. 6.1

Steps to Setup en Experiment

The first step to use Dockemu for a simulation experiment is to define what is going to be tested in order to conclude if Dockemu is the right framework for it. Due to its flexibility it is possible to simulate a wide range of scenarios but it requires specific skills to write the Dockerfiles and to create the ns-3 configurations. Docker is a very used technology in IT and a valuable asset for any IT researcher so it is reasonable to assume that the required Docker skills may not be a relevant stopper for many researchers. On the other hand ns-3 is a specific simulator and its configuration can be far from trivial. In order to overcome these initial learning curve, Dockemu brings a set of pre-configured network environments which can be modified to be adapted to different final scenarios. In order to organize the experiment setup we propose the preparation as follows: 1. defining the experiment goals and enumerate the nodes which are going to be needed and the software they will need to run; 2. defining the message flow between the nodes which want to be simulated. It may be necessary to add random wait times within a range of values suitable for the simulation duration which also need to be defined. It makes sense to consider network deterministic events (e.g. all the nodes ending a notification in a very short time) can be limiting conditions which can be worth being tested; 3. defining how the outputs of the simulation are going to be analyzed and if more outputs than node logs and pcap traces are needed; 4. defining network conditions: the network technology to be used and also the latency, jitter, packet loss and MTU. Some configurations may not make sense in real environment so they could be avoided in the experiment. It is also interesting considering using the CSMA network model29 with modified parameters to achieve results close to what would be obtained with other network technologies; 29

The CSMA model can be considered very close to a Ethernet cabled network.

Dockemu: An IoT Simulation Framework

75

5. generating light Docker images for client and server nodes using the multistage feature of Docker describe in Sect. 5.7. Many software projects provide Dockerfiles which can be used for the building process but it is important to keep them as light as possible as the ability to scale the number of simultaneous containers running is normally critical in IoT simulations; 6. completing the configuration variables of Dockemu (which is a YAML file of Ansible variables) to use the right images and create an experiment as close as possible to the designed one. 6.2

Testig CoAP Deployments with Dockemu

Dockemu has been designed to be able to test scenarios where different nodes interact with each other using a simulated network with controlled parameters. One of the main goals behind the extension to Dockemu framework proposed in this paper was to be used as reference framework to simulate IoT scenarios where is necessary to test a huge number of devices. Namely, the short-term aim of Dockemu is to test the performance of IoT protocols under different network conditions and with different values of connectivity parameters at application and transport layers. We decided to focus our attention on CoAP for the initial experiments as it one the most popular IoT protocols and can be used to cover many different use cases. These experiments can be taken as a reference to build more advanced experiments in the future. 6.3

Description of the Experiments

The included experiment tries to simulate a SmartGrid scenario where a number of remote devices are connected to single server and this one sends a simultaneous notification to all of them when some specific event happens. A example of this type of event would be a requested to disconnect huge number of small generation sources due to safety reasons. We also covered a second very simple scenario where the clients spoof the origin IP of the CoAP request to simulate an amplification attack against one specific node or one set of them. The use of CoAP to monitor and control has been discussed by several authors in the last years. In [13] the use of IEC 61850 over CoAP for SmartGrids operation and management tasks. The IEC 61850 is a standard developed by the IEC30 and originally designed for modeling, controlling and monitoring electrical substation automation systems and it has been extended to support new power sources and distributed generation systems. CoAP is not only used in complex scenarios but also in common IoT commercial devices for domestic applications31 . In order to test a more realistic scenario it is also possible to use DTLS [20] for encrypted transfer of CoAP messages actually its use is strongly recommended in 30 31

International Electrotechnical Comission. IKEA smartlights are one of the most well-known examples of CoAP usage in mass market products: https://learn.pimoroni.com/tutorial/sandyj/controllingikea-tradfri-lights-from-your-pi.

76

A. R. Portabales and M. L. Nores

any real implementation. However the security provided by DTLS comes at a cost since it requires the more computational resources on both the server and in the constrained device. In any case DTLS can be used in Dockemu by just modifying the parameters of the simulation in the Dockerfiles which build the nodes. Both experiments described in this section are included in the public repository32 of the Ansible version of Dockemu. Experiment 1: Simultaneous Notification to All the Client Nodes. This experiment tests the call flow shown in Fig. 5. The clients will be playing the

Fig. 5. CoAP messages flow diagram of one example of experiment conducted using the Dockemu framework. 32

https://github.com/antonroman/dockemu-ansible.

Dockemu: An IoT Simulation Framework

77

role of observer role in RFC7641 CoAP [11] terminology. They will subscribe to the modifications of a resource (security shutdown resource) hosted by the server. This resource would simulate the status of alarm in the control system of a facility. This resource would be plays the role subject in RFC7641 terminology and its values can be: – no which is the normal and default value; – alarm which indicates that the shutdown status can be imminent; – shutdown which indicates that all the power generation sources must be disconnected. Once all the clients are subscribed to this status, the simulation script changes the status to alarm and after 1 s to shutdown. This would simulate a real situation where a server must notify an event to a number of remote nodes simultaneously. In order to check the capacities of Dockemu we carried out different tests using confirmable and non-confirmable messages and also using different parameters of network latency and packet-loss33 . This make possible to discover the optimal scenario implementation before doing a real deployment. Experiment 2: CoAP Amplification Experiment. The fact of being transported over UDP gives CoAP a significant advantage over MQTT since it enables it to be used by constrained devices with a lower network overhead. However its connection-less nature makes it more vulnerable to IP spoofing attacks where the origin IP of the request is modified to force the server to send the reply to an IP different from the one which sent the message. It is important to say that modern Internet implements packet filtering mechanism to avoid IP spoofing. However, it has been shown that about 17 to 22% of the IPv4 autonomous systems are susceptible to spoofing [14]. Figure 6 depicts the flow of CoAP tested in this experiment. [14] also proposes that this amplification attack could even be increased by taking advantage of the “block-wise transfer” supported by CoAP. The attacker could request the maximum block size to try to maximize the size of the of the reply sent to the victim of the attack. Setting the block size to low values would also increase the number of packets sent in each notification increasing the overall network usage which could lead to a general DDoS attack. This attack is specially harmful when the MTU of the network technology is very small and responses can no be included in a single CoAP datagram. This would generate a huge number of packets also increasing the probability of network congestion. As [11] does not explicitly forbids an observer from being registered several times to the same resource this amplification attack could be combined with the registration scenario described in Sect. 6.3 generating the message flow shown in Fig. 7. However once implemented the test we found that when the victim receives the first message the victim silently discards the 2.05 reply with the 33

In our case the packet loss can be simulated by both ns-3 and also by the libcoap reference applications [23] used for the tests.

78

A. R. Portabales and M. L. Nores

Fig. 6. CoAP messages flow diagram of simple amplification attack.

first block of data and the server does not keep sending the rest of messages as it expects to receive more GETs from the victim asking for the rest of payload fragments as stated in Sect. 2.6 of [5].

Fig. 7. CoAP messages flow diagram of simple amplification attack with registration.

Dockemu: An IoT Simulation Framework

79

To avoid being able to subscribe to an resource on behalf of other client would be to enforce to enforce the use of Confirmable messages to register to the status of a resource. This way the victim would never confirm the reply coming from the server and the subscription would never take place. In the amplification attack scenario the victim gets subscribed by another node spoofing its IP with a Non-confirmable34 registration then the attack can be generated periodically every time the subscribed resource changes.

7

Conclusions

Simulation of large IoT deployments is necessary in order to determine if the IoT applications, protocols and network layers can handle properly specific scenarios. Dockemu framework has been designed to enable a wide range of simulations using real IoT applications in nodes connected by different network technologies (WiFi, Ethernet, LTE and 802.15.4) using a solid state-of-the-art network simulator. This way the setup time is reduced since there is not need to develop any specific application for the simulation; the same software which is going to be deployed in the constrained devices can be tested previously in Dockemu. On the other hand, the number of nodes and the network conditions can be changed by just modifying the parameters in a configuration file. Beyond pure experimentation, Dockemu has also been proved to be useful for different purposes: – validate IoT software over realistic network conditions; – test the IoT software from a functional point of view playing different roles in a real system; – check the impact of modification in the applications or at any level of the network stack; – validate network technologies as valid for specific deployments; – carry out performance test of real IoT software under specific network conditions. The usage of a live project such as ns-3 to simulate the network has several advantages. It has been independently developed and tested by networking experts and the loose coupling between Dockemu and ns-3 makes it possible to use always an updated version and take advantage of the fixes, improvements and new modules added. Therefore Dockemu framework is expected to benefit from future ns-3 advances, like the outgoing development of the NB-IOT module [26] to be able to cover more simulation scenarios. The framework has shown to be valid to simulate realistic CoAp scenarios involving 90 nodes with a modest use of CPU and RAM resources. This enables the possibility of being used in standard PCs making experiments cheaper and quicker to setup. Additionally, the use of Docker containers to simulate the nodes 34

This scenario is not recommended by [11] however is neither forbidden by the RFC nor the current CoAP libraries.

80

A. R. Portabales and M. L. Nores

also helps to make experiments much more easy to reproduce since the researcher can make sure it using the same software and OS configuration as in the original experiment. The use of containers has been recognized as one of the pillars of the devop culture which is being massively adopted by IT industry. This work can be considered as an argument in favour of the extension of this approach to the simulation field. Based on the result of the experimentation we can conclude that Dockemu is a valid framework to simulate almost any IoT scenario involving a huge number of nodes. Right node it is limited by the fact of only being able to use just two type of nodes however it can be easily extended to use an arbitrary number of Dockerfiles to build different types of container nodes. Also as a practical application of the experiments and an extra takeaway from this work, we can strongly advice to use of IP filtering techniques in IoT network to prevent amplification attacks as the one simulated using Dockemu. 7.1

Future Lines

We have identified several work lines to enhance Dockemu framework in the next years. These tasks can be divided in four main groups: 1. Improvement of Existing Framework: this group of tasks goes from improving and completing the documentation for the framework in order to be used by others to including more configuration parameters for the simulation of the network. These configuration parameters will give the researcher more control about what is happening on the network interfaces and enable the execution of more specific experiments. 2. Addition of More Complex Network Topologies and Support of More Network Technologies: the network topologies currently offered by Dockemu are not very flexible. The framework can be enriched with more topologies and network technologies in order to be adaptable to more scenarios. Regarding new network technologies, one of them will the standard NB-IOT, a 3GPP extension of LTE standard [1] which is being intensively promoted by mobile operators and it is expected to be widely used by IoT devices deployments in the next years. 3. Support of Parallel and Distributed Simulation Mode: ns-3 supports parallel and distributed modes for simulation. These modes can handle a higher number of nodes which is essential to cover real-world scenarios. To support distributed simulation in ns-3, the standard Message Passing Interface (MPI) is used. There is an existing module35 which already supports it and which makes use of the OpenMPI Linux library36 . 4. Need to Improve the Capabilities to Control the Software Running in the Containers. One of these improvements could be to be able to send signals to specific containers (this can be already done by hand). This will 35 36

https://www.nsnam.org/docs/models/html/distributed.html. https://www.open-mpi.org/.

Dockemu: An IoT Simulation Framework

81

enable the capacity to interact with the IoT nodes in order to achieve more advanced simulations of real use cases. Other options could involve some queue system but they would add more complexity in the simulated nodes and also an extra processing load which could alter the results of the simulations.

References 1. 3GPP: Standardization of NB-IOT completed (2016). http://www.3gpp.org/newsevents/3gpp-news/1785-nb iot complete. Accessed 3 Mar 2019 2. Cohn, R.J., et al.: Mqtt version 3.1.1. http://docs.oasis-open.org/mqtt/mqtt/v3. 1.1/os/mqtt-v3.1.1-os.html 3. Bai, J., Bi, J., Kuang, P., Fan, C., Zhou, Y., Zhang, C.: NS4: enabling programmable data plane simulation. In: Proceedings of the Symposium on SDN Research, SOSR 2018, pp. 12:1–12:7. ACM, New York (2018). https://doi.org/10. 1145/3185467.3185470, http://doi.acm.org/10.1145/3185467.3185470 4. Baldo, N., Requena-Esteso, M., N´ un ˜ez-Mart´ınez, J., Portoles-Comeras, M., Nin-Guerrero, J., Dini, P., Mangues-Bafalluy, J.: Validation of the IEEE 802.11 MAC model in the ns3 simulator using the EXTREME testbed. In: SimuTools (2010) 5. Bormann, C., Shelby, Z.: Block-Wise Transfers in the Constrained Application Protocol (CoAP). RFC 7959 (Proposed Standard), August 2016. https://doi.org/ 10.17487/RFC7959, https://www.rfc-editor.org/rfc/rfc7959.txt 6. D’Angelo, G., Ferretti, S., Ghini, V.: Simulation of the internet of things. CoRR abs/1605.04876 (2016). http://arxiv.org/abs/1605.04876 7. Docker-Team: Best practices for writing dockerfiles. https://docs.docker.com/ develop/develop-images/dockerfile best-practices/. Accessed 3 Jan 2019 8. Ebert, C., Gallardo, G., Hernantes, J., Serrano, N.: DevOps. IEEE Softw. 33(3), 94–100 (2016). https://doi.org/10.1109/MS.2016.68 9. Gupta, S.G., Ghonge, M., Thakare, P.D.P.M., Jawandhiya, P.: Open-source network simulation tools an overview. Int. J. Adv. Res. Comput. Eng. Technol. 2 (2013) 10. Gluhak, A., Krco, S., Nati, M., Pfisterer, D., Mitton, N., Razafindralambo, T.: A survey on facilities for experimental internet of things research. IEEE Commun. Mag. 49(11), 58–67 (2011). https://doi.org/10.1109/MCOM.2011.6069710 11. Hartke, C.: Observing Resources in the Constrained Application Protocol (CoAP). RFC 7641 (Proposed Standard), September 2015. https://doi.org/10.17487/ RFC7641, https://www.rfc-editor.org/rfc/rfc7641.txt 12. Hasan, A.B., Kiong, T., Paw, J.K., Musa, A.B., Mohamed, H.: Real-time video streaming over NS3-based emulated LTE networks. Int. J. Electron., Comput. Commun. Technol. 4 (2017). https://www.researchgate.net/publication/ 282219796 Real-Time Video Streaming over NS3-based Emulated LTE Networks 13. Iglesias Urkia, M., Urbieta, A., Parra, J., Casado Mansilla, D.: IEC 61850 meets CoAP: towards the integration of smart grids and IoT standards, pp. 1–9, October 2017. https://doi.org/10.1145/3131542.3131545 14. Maggi, F., Vosseler, R., Quarta, D.: The fragility of industrial IoT’s data backbone - security and privacy issues in MQTT and CoAP protocols. Trend Micro Res. (2018). https://documents.trendmicro.com/assets/white papers/wp-the-fragilityof-industrial-IoTs-data-backbone.pdf

82

A. R. Portabales and M. L. Nores

15. Patrick Vandewalle, J.K., Vetterli, M.: Reproducible research in signal processing. IEEE Signal Process. Mag. 37, 47 (2009). https://infoscience.epfl.ch/record/ 136640/files/VandewalleKV09.pdf 16. Pei, G., Henderson, T.R.: Validation of OFDM error rate model in ns-3 (2010) 17. Pino, D.: Network namespaces. https://blogs.igalia.com/dpino/2016/04/10/ network-namespaces/ (2016). Accessed 22 Apr 2018 18. Rampf, S.: Network simulation and its limitations. In: Seminar Future Internet SS2013 (2010) 19. ur Rehman Khan, A., Bilal, S.M., Othman, M.: A performance comparison of network simulators for wireless networks. CoRR abs/1307.4129 (2013) 20. Rescorla, E., Modadugu, N.: Datagram Transport Layer Security Version 1.2. RFC 6347 (Proposed Standard), January 2012. https://doi.org/10.17487/RFC6347, https://www.rfc-editor.org/rfc/rfc6347.txt 21. Rom´ an, A., L´ opez, M.: Dockemu: extension of a scalable network simulation framework based on Docker and NS3 to cover IoT scenarios. In: Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH). INSTICC, INSTICC, Porto, Portugal, July 2018 22. Sharma, P., Chaufournier, L., Shenoy, P., Tay, Y.C.: Containers and virtual machines at scale: a comparative study. In: Proceedings of the 17th International Middleware Conference, Middleware 2016, pp. 1:1–1:13. ACM, New York (2016). https://doi.org/10.1145/2988336.2988337, http://doi.acm.org/10. 1145/2988336.2988337 23. libcoap team: libcoap: A CoAP (RFC 7252) implementation in C (2019). Accessed 12 Jan 2019. https://github.com/obgm/libcoap 24. NS3 Team: Mobility model library guide (2018). Accessed 21 Apr 2018. https:// www.nsnam.org/docs/models/html/mobility.html 25. NS3 Team: Mobility model library guide (2018). Accessed 22 Apr 2018. https:// www.nsnam.org/docs/models/html/tap.html 26. NS3 Team: NB-IOT guide (2019). Accessed 3 Mar 2019. https://www.nsnam.org/ wiki/NB-IOT 27. To, M.A., Cano, M., Biba, P.: DOCKEMU – a network emulation tool. In: 2015 IEEE 29th International Conference on Advanced Information Networking and Applications Workshops. IEEE, March 2015. https://doi.org/10.1109/waina.2015. 107

Iterative Construction of Complete Lyapunov Functions: Analysis of Algorithm Efficiency Carlos Arg´ aez1(B) , Peter Giesl2 , and Sigurdur Hafstein1 1

2

Science Institute, University of Iceland, Dunhagi 3, 107 Reykjav´ık, Iceland {carlos,shafstein}@hi.is Department of Mathematics, University of Sussex, Falmer, Brighton BN1 9QH, UK [email protected]

Abstract. Differential equations describe many interesting phenomena arising from various disciplines. This includes many important models, e.g. predator-prey in population biology or the Van der Pol oscillator in electrical engineering. Complete Lyapunov functions allow for the systematic study of the qualitative behaviour of complicated systems. In this paper, we extend the analysis of the algorithm presented in [1]. We study the efficiency of our algorithm and discuss important sections of the code. Keywords: Dynamical system · Complete Lyapunov function · Orbital derivative · Meshless collocation · Radial Basis Functions Algorithms · Scalability

1

·

Introduction

Studying systems that change in time often requires the semantics of differential equations. Autonomous differential equations define dynamical systems which describe the evolution of a given system. The study of dynamical systems is a mathematical discipline originated by Newtonian mechanics. It is in fact a consequence of Henri Poincar´e’s work on celestial mechanics; hence, he is often regarded as the founder of dynamical systems. Poincar´e studied the problem of three bodies motion describing in detail several concepts commonly studied in dynamical systems such as stability. Let us consider a general autonomous ordinary differential equation (ODE) of the form, x˙ = f (x), (1) where x ∈ Rn . The first author in this paper is supported by the Icelandic Research Fund (Rann´ıs) grant number 163074-052, Complete Lyapunov functions: Efficient numerical computation. c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 83–100, 2020. https://doi.org/10.1007/978-3-030-35944-7_5

84

C. Arg´ aez et al.

To solve the differential equation (1) we consider an initial condition. Then, by time-integration, we would obtain a specific solution, however, in general this is not possible analytically, but only numerically. Moreover, this procedure needs to be repeated for each new initial condition and is thus inefficient. In recent years, the increase of computational power and more efficient algorithms, provided by numerical methods, allowed to speed up such procedures and to increase the collection of problems that can be analysed and studied. The initial condition dependence, however, restricts the understanding of complicated systems that cannot be described by a small sample of orbits and known trajectories. The correct description of such systems may find application in physics, engineering, biology and other disciplines. For that reason, several techniques to expand the understanding and the analysis of such systems have been developed during the years. Many famous techniques differ in approach, difficulty and efficiency. To summarize some, we can point out the direct simulations of solutions with many different initial conditions, as discussed previously and computing invariant manifolds, which form the boundaries of attractors’ basin of attraction [17]. Other techniques to analyse dynamical systems are the set oriented methods [9] and the cell mapping approach [13]. These methods are supposed to work provided enough computational resources are available. While there have been many advances introduced by different brilliant minds, the approach provided by Aleksandr Lyapunov is of particular relevance. His work is based on defining stability of sets in the phase space ordinary differential equations and provides another approach to study dynamical systems by their qualitative behaviour. In particular, it turns out to be useful to characterize the flow by studying attractors and repellers of the dynamics. Lyapunov proposed to construct an auxiliary scalar-valued function whose domain is a subset of the state-space. This function is strictly decreasing along all solution trajectories in a neighbourhood of an attractor, e.g. an equilibrium point or a periodic orbit. The function’s minimum is attained on the attractor, hence, all solutions starting on a decreasing trajectory are bound to converge to the attractor. Today this function is known as a strict Lyapunov function in his honor. Here its classical definition [18]. Definition 1 (Classical (strict) Lyapunov Function). A classical (strict) Lyapunov function V (x) for the system (1) is a scalar-valued C 1 function defined on a neighbourhood of an attractor of the system. It attains its minimum at the attractor, and is otherwise strictly decreasing along solutions of the ODE. Note that the function in the last definition is limited to the neighbourhood of one single attractor. A redefinition of this function was later given to the whole phase space and it is called a complete Lyapunov function [7,8,14,15], see Definition 2. Definition 2 (Complete Lyapunov Function). A complete Lyapunov function for the system (1) is a scalar-valued continuous function V : Rn → R,

Iterative Construction of Complete Lyapunov Functions

85

defined on the whole phase space of the ODE. It is non-increasing along solutions of the ODE; it is strictly decreasing where the flow is gradient-like and constant along solution trajectories on each transitive component of the chainrecurrent set, such as local attractors and repellers. Furthermore, the level sets of V provide information about the stability and attraction properties: minima of V correspond to attractors, while maxima represent repellers. This general case provides tools to describe the complete qualitative behaviour of the dynamical system on the whole phase space and divides the state-space into two disjoint areas, in which the system behaves fundamentally differently. The first one, referred to as the gradient-like flow, is an area where the systems flows through and has the property of having negative orbital derivative, if smooth enough (the orbital derivative is the derivative along solutions). The second, referred to as the chain-recurrent set, is an area where infinitesimal perturbations can make the system recurrent, see Definition 3; the points in this set have vanishing orbital derivative. In this work we will refer to these two conditions (negative orbital derivative for the gradient-like flow and zero orbital derivative to the chain-recurrent set) as the Lyapunov condition. Definition 3 (Chain-recurrent Set). A point is said to be in the chainrecurrent set, if for any  > 0 and any given time, an -trajectory exists that starts at the point and returns to it after the given time. An -trajectory is arbitrarily close to a true system’s solution and a point in the chain-recurrent set is recurrent or almost recurrent; for a precise definition see, e.g. [7]. The dynamics outside of the chain-recurrent set are similar to a gradient system, i.e. a system (1) where the right-hand side f (x) is given by the gradient ∇U (x) of a function U : Rn → R. Conley [7] gave the first mathematical proof of existence of complete Lyapunov functions for flows in compact metric spaces. Hurley [15] extended these results to flows in separable metric spaces. In general, this work is a continuation of the algorithms described in [1–3,5,6]. It is a modification of a general method to compute classical Lyapunov functions for one stable equilibrium using Radial Basis Functions [10]. Nonetheless, along this work we describe an algorithm to construct complete Lyapunov functions considering that the l# -norm, with # = 1, 2, for the Lyapunov condition at a given set of points must be kept constant. Previously, we described the benefits of keeping the Lyapunov condition constant in the l1 -norm [1]. However, selecting the right norm turns out to be a non-trivial task. In Sect. 3.2, we discuss this question in more detail. Furthermore, when developing algorithms to study and to describe dynamical systems, an important question on the efficiency arises and we address this issue in Sect. 4. The general idea to construct a complete Lyapunov function under this approach, is to approximate a “solution” to the ill-posed problem V  (x) = −1, where V  (x) = ∇V (x)·f (x) is the derivative along solutions of the ODE, i.e. the orbital derivative.

86

C. Arg´ aez et al.

A function v is computed using Radial Basis Functions, a mesh-free collocation technique, such that v  (x) = −1 is fulfilled at all points x in a finite set of collocation points X. The discretized problem of computing v is well-posed and has a unique solution. However, the computed function v will fail to fulfil the PDE at some points of the chain-recurrent set, such as an equilibrium or a periodic orbit. For some x in the chain-recurrent set we must have v  (x) ≥ 0 and this is the key component of our general algorithm to localize the chain-recurrent set; we determine the chain-recurrent through the area where v  (x) ≈ −1.

2 2.1

Preliminaries Mesh-Free Collocation

Radial Basis Functions (RBFs) are a powerful methodology [10] for general interpolation problems based on mesh-free collocation methods. The construction of complete Lyapunov functions can be posed as a generalized interpolation problem. RBFs are real-valued functions whose value depends only on the distance of its argument from the origin. Many examples of RBFs can be given, however, the most common ones are Gaussians, multiquadrics and Wendland functions. Our algorithm uses Wendland functions, which are compactly supported and positive definite functions introduced in [20]. Their form is that of a polynomial on their compact support defined by a recurrent formula. The corresponding Reproducing Kernel Hilbert Space is norm-equivalent to a Sobolev space. Note that in the context of RBF, positive definite function ψ refers to the matrix (ψ(xi − xj ))i,j being positive definite for X = {x1 , x2 , . . . , xN }, where xi = xj if i = j. We assume that the target function belongs to a Hilbert space H of continuous functions (often a Sobolev space). We assume that the Hilbert space H has a reproducing kernel ϕ : Rn × Rn → R, given by a convenient positive definite Radial Basis Function Φ through ϕ(x, y) := Φ(x − y), where Φ(x) = ψ0 (x) is a radial function. Generally speaking, we can resume the idea of this algorithm as follows. We seek to reconstruct the target function V ∈ H from the information r1 , . . . , rN ∈ R generated by N linearly independent functionals λj ∈ H ∗ , i.e. λj (V ) = rj holds for j = 1, . . . , N . The optimal (norm-minimal) reconstruction of the function V is the solution to the problem min{vH : λj (v) = rj , 1 ≤ j ≤ N }. It is well-known [21] that the solution can be written as v(x) =

N  j=1

βj λyj ϕ(x, y),

Iterative Construction of Complete Lyapunov Functions

87

where the coefficients βj are determined by the interpolation conditions λj (v) = rj , 1 ≤ j ≤ N and the superscript y denotes the application of the operator λj with respect to the variable y. In our case, we consider the PDE V  (x) = r(x), where r(x) is a given function and V  (x) is the orbital derivative. We choose N pairwise distinct collocation points x1 , . . . , xN ∈ Rn of the phase space and define functionals λj (v) := (δxj ◦ L)v = v  (xj ) = ∇v(xj ) · f (xj ), where L denotes the linear operator of the orbital derivative LV (x) = V  (x) and δ is Dirac’s delta distribution. The information is given by the right-hand side rj = r(xj ) for all 1 ≤ j ≤ N . The approximation is then v(x) =

N 

βj (δxj ◦ L)y Φ(x − y),

j=1

where Φ is a positive definite Radial Basis Function, and the coefficients βj ∈ R can be calculated by solving a system of N linear equations. The superscript y denotes that the operator is applied to the function y → Φ(x − y) for a fixed x. A crucial ingredient is the knowledge of the behaviour of the error function |V  (x) − v  (x)| in terms of the so-called fill distance, which measures how dense the points {x1 , . . . , xN } are, since it gives information when the approximate solution indeed becomes a Lyapunov function, i.e. has a negative orbital derivative. Such error estimates were derived, for example, in [10,12], see also [19,21]. The advantage of mesh-free collocation for solving PDEs is that scattered points can be added to improve the approximation, no triangulation of the phase space is necessary, the approximating function is smooth and the method works in any dimension. Wendland Functions. The Wendland functions are expressed by the general form: ψ(x) := ψl,k (cx), where c > 0 and k ∈ N is a smoothness parameter. Along this work, the parameter l is fixed as l = n2 + k + 1. The Reproducing Kernel Hilbert Space corresponding to ψl,k contains the same functions as the k+(n+1)/2 Sobolev space W2 (Rn ) and the spaces are norm equivalent. The Wendland functions ψl,k are defined by the recursion: For l ∈ N and k ∈ N0 , we define ψl,0 (r) = (1 − r)l+ , (2) 1 ψl,k+1 (r) = r tψl,k (t)dt for r ∈ R+ 0 , where x+ = max(0, x) and has higher precedence than taking power, i.e. (1 − r)l+ = [(1 − r)+ ]l . Collocation Points. Our algorithm is based on the idea of solving the illposed problem V  (x) = ∇V (x) · f (x) = −1 on a collocation of points X = {x1 , . . . , xN } ⊂ Rn .

88

C. Arg´ aez et al.

Our set X of collocation points, is a subset of a hexagonal grid with finenessparameter αHexa-basis ∈ R+ constructed according to the next equation:   n  ik ωk : ik ∈ Z , where (3) αHexa-basis k=1

ω1 = (21 , 0, 0, . . . , 0) ω2 = (1 , 32 , 0, . . . , 0) .. .. . . ωn = (1 , 2 , 3 , . . . , (n + 1)n ) and  1 , k ∈ N. k = 2k(k + 1) The hexagonal grid is optimal to balance the opposing aims of a dense grid and a low condition number of the collocation matrix. It delivers the matrix with the minimal condition number for a fixed fill distance [16]. Since f (x) = 0 for an equilibrium x, an equilibrium cannot be used as a collocation point, because otherwise the collocation matrix is singular. The approximation v is then given by the function that satisfies the PDE v  (x) = −1 at all collocation points and it is norm minimal in the corresponding Reproducing Kernel Hilbert space. Practically, we compute v by solving a system of N linear equations, where N is the number of collocation points. We set ψ0 (r) := ψl,k (cr) with a positive constant c and define recursively i−1 ψi (r) = 1r dψdr (r) for i = 1, 2 and r > 0. Note that limr→0 ψi (r) exists if the smoothness parameter k of the Wendland function is sufficiently large. The explicit formulas for v and its orbital derivative are v(x) =

N 

βj xj − x, f (xj )ψ1 (x − xj ),

(4)

 βj − ψ1 (x − xj )f (x), f (xj )

(5)

j=1

v  (x) =

N  j=1

 + ψ2 (x − xj )x − xj , f (x) · xj − x, f (xj ) where ·, · denotes the standard scalar product and  ·  the Euclidean norm in Rn , β is the solution to Aβ = r, rj = r(xj ) and A is the N × N matrix with entries aij = ψ2 (xi − xj )xi − xj , f (xi )xj − xi , f (xj ) − ψ1 (xi − xj )f (xi ), f (xj ) for i = j and

aii = −ψ1 (0)f (xi )2 .

(6)

Iterative Construction of Complete Lyapunov Functions

89

More detailed explanations on this construction are given in [10, Chapter 3]. If no collocation point xj is an equilibrium for the system, i.e. f (xj ) = 0 for all j, then the matrix A is positive definite and the system of equations Aβ = r has a unique solution. Note that this holds true independent of whether the underlying discretized PDE has a solution or not, while the error estimates are only available if the PDE has a solution. Evaluation Grid. Once we have solved the PDE on the collocation points, we use a different evaluation grid Yxj , around each collocation point xj . This grid can be constructed in many different ways. Important is, however, to always associate each evaluation point to a unique collocation point. 2.2

Previous Algorithms

To obtain a classical Lyapunov function for a nonlinear system already is a hard task. However, thanks to mathematical research, efficient algorithms to compute Lyapunov functions have been proposed, cf. [11] for a recent review of such methods. One of these algorithms to compute classical Lyapunov functions for an equilibrium approximates the solution of the PDE V  (x) = ∇V (x)·f (x) = −1 [10] using mesh-free collocation with Radial Basis Functions. It constructs an approximate solution to this linear partial differential PDE, which satisfies the equation in a given finite set of collocation points X. This method has been extended to the construction of complete Lyapunov functions. However, as discussed before, a complete Lyapunov function cannot have a negative derivative on the chain-recurrent set, hence, the equation is ill-posed. However, turning the argument around, the area where the approximation is poor, i.e. where the approximation v to the Lyapunov function V does not satisfy v  (x) ≈ −1, gives an indication of where the chain-recurrent set is located. In previous work, the authors of this paper have developed and continuously improved such algorithms. Firstly, the algorithm was implemented to identify both the chain-recurrent set and the gradient-like flow region, see [2]. We determine the chain-recurrent set as the area, in which the condition v  (x) ≈ −1 is not satisfied and the approximation fails. In the next step, we then split the collocation points X into two different sets: X 0 where the approximation fails, and X − , where it works well. This classification allows us to reconstruct the complete Lyapunov function considering that it should be constant on X 0 . However, such methodology requires certain considerations. The speed of the flow of the dynamical system can vary considerably. Therefore, the orbital derivative of the complete Lyapunov function can vary as well. These speed variations render it difficult to classify the chain-recurrent set under a fixed criterion. Therefore, we introduced in [3] an “almost” normalized approach, i.e., the original dynamical system (1) was substituted by x˙ = ˆf (x),

where ˆf (x) =

f (x) δ2

+ f (x)2

(7)

90

C. Arg´ aez et al.

with a small parameter δ > 0. This allowed us to reduce the over-estimation, i.e. the “noise”, of the chain-recurrent set. 2.3

Reconstruction of a Complete Lyapunov Function

Once the chain-recurrent set is classified, enough information is obtained to reconstruct the complete Lyapunov using different Lyapunov conditions for X 0 and X − . That is, we solve the PDE for V again, but now using different values on the right-hand side. We have considered three different ways of reconstructing the complete Lyapunov function. Next, we give a review of these three cases. Reconstruction with Binary Parameters. The two sets X 0 and X − provide important information about the ODE under consideration: the first one X 0 , where v  (x) ≈ 0 approximates the chain-recurrent set, including equilibria, periodic and homoclinic orbits, while the second set X − , where v  (x) ≈ −1, approximates the area where the flow is gradient-like, i.e. where solutions pass through. Our first approach was to reconstruct the complete Lyapunov function with the Lyapunov conditions 0 and −1 respectively for the two different sets, i.e.,

0 if x ∈ X 0 , V  (x) = −1 if x ∈ X 0 This approximation, however, can lead to convergence to a trivial (constant) solution, i.e. V  (x) = 0. The right-hand side of V  (x) has a jump, so that the constructed function does not have a “smooth” orbital derivative. Illustrative examples can be found in Figs. 6 and 7 in [1]. Reconstruction with Exponential Decay. This approach was based on the idea that smoothing the right-hand side would replace the jump with a smoother transition. To do that, we replaced the original binary right-hand side by a smooth exponential decay,  0 0 if x ∈ X ,  (8) V (x) = r(x) := − exp − ξ·d21(x) if x ∈ X 0 , where d denotes the distance to the set X 0 and ξ > 0 is a parameter. This improved the method to construct complete Lyapunov functions and to determine the chain-recurrent set. However, there is a problem with this methodology. If iterated in an attempt to improve the reconstruction of the Lyapunov function, the area where v  (x) ≈ 0 holds (or X 0 ) could grow in size and the functions v could converge towards a trivial, constant solution. However, this approach is slower than when using binary parameters. More details are found in paper [3].

Iterative Construction of Complete Lyapunov Functions

91

Reconstruction by Averaging the Orbital Derivative. This methodology is based on using the average of v  (y) for points y ∈ Yxj (or 0 if the average is positive), i.e. the points in the evaluation grid for each point xj ∈ X, where v denotes the result of the last iteration and regardless of xj lying in X − or X 0 .

N Additionally, we scale the right-hand side r˜j by 1/˜ r(xi )l1 = 1/( i=1 |˜ r(xi )|),

N r(x ) of the values in right-hand side over all such that the new sum i i=1 collocation points is constant in each iteration, see the algorithm in the next section. This prevents the iterations from converging to the trivial solution. We will show the improvement of the performance of the algorithm in an example. This method was introduced in [1]. For the evaluation points y ∈ Yxj around each collocation point xj we use a directional evaluation grid, which was first proposed for the higher-dimensional case, i.e., x˙ = f (x) with x ∈ Rn and n ≥ 3 [5], since the set of evaluation points remains 1-dimensional. For the directional evaluation grid, we use points in the direction of the flow f (xj ) at each collocation point xj . Previously, in [2,3] and dimension 2, we used a circular evaluation grid around each collocation point consisting of two concentric circumferences whose centre was the collocation point. In the n-dimensional case, this circumference would become an (n − 1)dimensional set, requiring a large amount of points to evaluate. More details on the evaluation grid are given in Sect. 3.1.

3

Algorithm

Our algorithm is based on the algorithms described in [2] and where the speed of the system has been normalized as in (7); explained in detail in [3]. The Wendland functions for the numerical computations are constructed with the software from [4]. In this paper, as in [1], we add the next improvement: we scale the right-hand side of the linear system Aβ = r in each iteration to avoid convergence to the trivial solution β = 0 corresponding to V (x) = 0. Let us explain the method and the improvements in more detail. We fix a set of pairwise distinct collocation points X, none of which is an equilibrium for the system. We use an evaluation grid to determine for each collocation point whether the approximation was poor or good, and thus whether the collocation point is part of the chain-recurrent set (X 0 ) or the gradient-like flow (X − ). The evaluation grid at the collocation point xj is given by   r · k · αHexa-basis · ˆf (xj ) Yxj = xj ± : k ∈ {1, . . . , m} m · ˆf (xj ) where αHexa-basis is the parameter used to build the hexagonal grid defined above, r ∈ (0, 1) is the ratio up to which the evaluation points will be placed and m ∈ N denotes the number of points in the evaluation grid that will be placed on both sides of the collocation points aligned to the flow. Altogether, will have 2m points for each collocation point, so 2mN points in the evaluation grid overall. We note that we have chosen r < 1 to avoid overlap of evaluation grids [1,6].

92

C. Arg´ aez et al.

This means that there will not be any evaluated points to provide information about the dynamical system apart from the ones aligned with the flow. On the other hand, this evaluation grid avoids exponential growth in size as the system’s dimension increases. We start by computing the approximate solution v0 of V  (x) = −1 with collocation points X. As we have previously done in [2,3], we define a tolerance parameter −1 < γ ≤ 0. In each step i of the iteration we mark a collocation point xj as being in the chain-recurrent set (xj ∈ X 0 ) if there is at least one point y ∈ Yxj such that vi (y) > γ. The points for which the condition vi (y) ≤ γ holds for all y ∈ Yxj are considered to belong to the gradient-like flow (xj ∈ X − ). In this paper, we follow the same idea as [1] and replace the right-hand side −1 by the average of the values vi (y) over the evaluation grid y ∈ Yxj at each collocation point xj or, if this average is positive, by 0. In formulas, we calculate the approximate solution vi+1 of V  (xj ) = r˜j with ⎛ ⎞  1 r˜j = ⎝ vi (y)⎠ , 2m y∈Yxj



where x− = min(0, x). We will refer to this as the “non-scaled” version. While in [3] we have used the distance to the set X 0 to ensure that the righthand side is a continuous function, this new approach also allows us to obtain a complete Lyapunov function with a smoothed out orbital derivative. However, this approach can lead to a decrease of “energy” from the original Lyapunov function. Recall that the original value of the orbital derivative condition in the first iteration is −1, but the new value is obtained by averaging and bounding by 0, so it could tend to zero and thus force the total energy of the Lyapunov function to decrease. To avoid this, we scale the condition of the orbital derivative after the first iteration onwards so that the sum of all rj over all collocation points is constant for all iterations; we will refer to this as the “scaled” method. Our new algorithm to compute complete Lyapunov functions and classify the chain-recurrent set can be summarized as follows: 1. Create the set of collocation points X and compute the approximate solution v0 of V  (x) = −1; set i = 0 2. For each collocation point xj , compute vi (y) for all y ∈ Yxj : if vi (y) > γ for a point y ∈ Yxj , then xj ∈ X 0 , otherwise xj ∈ X − , where γ ≤ 0 is a chosen critical value

1  3. Define r˜j = 2m y∈Yx vi (y) j



4. Define rj = NN |˜r | r˜j , l l=1 5. Compute the approximate solution vi+1 of V  (xj ) = rj for j = 1, . . . , N ; this is the scaled version, while approximating the solution of V  (xj ) = r˜j would be the non-scaled version 6. Set i → i + 1 and repeat steps 2 to 5 until no more points are added to X 0 . Note that the sets X 0 and X − change in each step of the algorithm.

Iterative Construction of Complete Lyapunov Functions

3.1

93

Results

The system we use to benchmark our methodology is the following:     x˙ 1 − x2 = f (x, y) = , y˙ −xy

(9)

This system has two equilibria (±1, 0) where (−1, 0) is unstable and (1, 0) is asymptotically stable. We now apply the method proposed in this paper. The parameters we defined to compute the complete Lyapunov function for the system (9) are: we replace f by ˆf according to (7) with δ 2 = 10−8 , and we choose αHexa-basis = 0.1 and used all points in the hexagonal grid that are in the area [−2, 2]2 ∈ R2 . This gave us a total amount of 2, 016 collocation points. The critical value to define the failing points is γ = −0.5 and the Wendland function parameters are l = 4, k = 2 and c = 1. The number of evaluation points around each collocation point is 20, i.e., m = 10, and we choose r = 0.5; the total amount of points in our evaluation grid is thus 40, 320. Evaluation Grid for Our System. In Fig. 1 we plot the evaluation grid (9) for the system (9) Notice that we use colour to indicate the value of the complete Lyapunov function computed.

Fig. 1. Evaluation grid for (9). All points of the evaluation grid are aligned with the direction of the flow of the dynamical system. The flow is marked with colours to indicate the value of the computed complete Lyapunov functions.

Complete Lyapunov Function, Orbital Derivative and Iterations. Now, we present the results obtained with our algorithm using the l1 -norm for the scaling and using 10,000 iterations. The complete Lyapunov function approximation for system (9) is given in Fig. 2 and its orbital derivative in Fig. 3. We start by approximating the solution of V  (x) = −1 by v0 .

94

C. Arg´ aez et al.

Fig. 2. Complete Lyapunov function v0 for system (9), obtained by solving V  (x) = −1, iteration 0, [1].

Fig. 3. Complete Lyapunov function derivative v0 for system (9), iteration 0, [1].

The complete Lyapunov function at this iteration (ite = 0) poorly approximates the orbital derivative fixe to −1 in some areas. Indeed, Fig. 3 shows that the orbital derivative can be positive with values between 0 and 2. From this, we obtain information on the values over the evaluation grid that failed as v0 (y) > γ. These points are an approximation of the chain-recurrent set under the scaled method. The function v0 and its orbital derivative v0 are shown in Figs. 2 and 3, respectively. Figure 2 already shows that the unstable equilibrium at (−1, 0) is a maximum of v0 and the asymptotically stable equilibrium at (1, 0) is a minimum; the orbital derivative v0 approximates −1 quite well apart from the equilibria and an ellipse covering the heteroclinic orbits, connecting the two equilibria, which touch the boundary of the considered area. However, a different perspective of Fig. 2, see Fig. 1 with the directional grid, shows that there are many heteroclinic connections between the two equilibria. These connections have different lengths. In particular, even if v is constant in a neighbourhood of each of the two equilibria, there is no solution such that v  (x) = −1 holds in the rest of the gradient-like flow part since the orbital derivative reflects the length of the route. Hence, this is an example where the previous method [2] must fail. We used the previous non-scaled method and solved V  (xj ) = r˜j iteratively and the scaled-method V  (xj ) = rj = NN |˜r | r˜j (l1 -scaled method), see l=1

l

Iterative Construction of Complete Lyapunov Functions

95

algorithm Sect. 3.1. In the first case (non-scaled method) the solution converges to the constant solution, while in the second case (scaled-method) we obtain a smooth complete Lyapunov function and a smooth orbital derivative, see Fig. 4.

Fig. 4. Evolution of the complete Lyapunov function for system (9) and its orbital derivative. The two-upper figures are obtained with the non-scaled method while the lower-two figures are obtained with the scaled method. ite = 10000, [1].

96

3.2

C. Arg´ aez et al.

l1 - and l2 -Norm Scaling

In this section we analyse the difference between using the l1 - and l2 -norms for scaling in our method. In [1], we originally considered scaling using the l1 norm. However, when we replace step 4 in the algorithm with   r˜j ˜ r0 l2 , rj = ˜ rj l2 then we obtain a method that keeps the l2 norm of the vector (rj )j=1,...,N constant in every step. Similarly, we can define   r˜j ˜ r0 lp rj = ˜ rj lp for any p ≥ 1, which scales by the lp -norm. When comparing the results using the l2 -norm instead of the l1 -norm, one notices that there are considerable differences, see Figs. 5 and 6. Indeed, it look like scaling using the l2 -norm gives a smoother and better behaved complete Lyapunov function. Figure 9 gives the evolution of the l1 - and l2 -norms of the Lyapunov condition vector at each iteration for the non-scaled method. It shows how the norms tend to zero and after 3000 iterations both deliver nearly constant approximations with orbital derivative close to zero. Clearly scaling is necessary for this problem and additionally improves previous results be smoothing the orbital derivative. Understanding the different results for the l1 - and l2 -norm scalings requires further analysis, which is a subject of future work.

4

Complexity Analysis of the Algorithm

In this section we analyze the computational complexity of our algorithm. As before n stands for the dimension of the system and N for the number of collocation points. Each collocation points has 2m evaluation points associated to it. We assume that the evaluation of f (x) is O(n) because it has n coordinates. Our algorithm has the following structure: Algorithm 1. The different parts of the algorithm are the following: (i) Generate the Collocation Points. We construct N collocation points, each of dimension n. For this we need O(N n) operations. (ii) Interpolation Matrix and Cholesky Decomposition. The interpolation matrix A is built using the formula (6). Each of the N 2 -elements aij can be computed in O(n) so the complexity is O(N 2 n). Since A is positive definite we Cholesky decompose it, which is O(N 3 ). Note that the matrix A and its Cholesky decomposition must only be computed once, regardless of the number of iterations!

Iterative Construction of Complete Lyapunov Functions

97

Fig. 5. Complete Lyapunov function v for system (9), iteration 10000 with the scaled method (l1 blue, l2 red). Plane Z − X.

Fig. 6. Complete Lyapunov function v for system (9), iteration 10000 with the scaled method (l1 blue, l2 red). Plane Z − Y .

(iii) Construction of the Evaluation Grid. For each of the N collocation points we construct 2m evaluation points, each of dimension n. This is O(N nm) operations. (iv) Compute the Lyapunov Function. To compute the coefficients βj in formulas (4) and (5) we need to solve the equation Aβ = r, where A is Cholesky decomposed. This is well known to be O(N 2 ) (back substitution). (v) Classification of the Failing Points in the Chain-recurrent Set. We have to evaluate v  at 2m evaluation points for each collocation point, of which there are N . From formula (5) we see that each evaluation is O(N n). Together we need O(N 2 nm) operations for the evaluation. (vi) Lyapunov Condition. First we need to compute the average value of v  at the evaluation points for each collocation point. Since we already have evaluated v  at all evaluation points in the last step, this is O(N m). Then we have to compute the average value (l1 -norm) or the root-means-square value (l2 -norm) over all the collocation points, which is O(N ). Together we have complexity of O(N m). Altogether this proves the following result, noting that we only once have to generate and Cholesky decompose the collocation matrix A and that the

98

C. Arg´ aez et al.

Fig. 7. Complete Lyapunov function derivative v  for system (9), iteration 10000 with the scaled method (l1 blue, l2 red). Plane Z − X.

Fig. 8. Complete Lyapunov function derivative v  for system (9), iteration 10000 with the scaled method (l1 blue, l2 red). Plane Z − Y .

Fig. 9. Evolution of the l1 -and l2 -norms along iterations.

most expensive operation in each iteration is computing the average of v  at the evaluation points for each collocation point. Lemma 1. To compute an approximation to a complete Lyapunov function with our method using I iterations, we need O(N 3 + IN 2 nm) operations.

Iterative Construction of Complete Lyapunov Functions

5

99

Conclusions

We have introduced a methodology to construct approximations to smooth complete Lyapunov function. In particular, we have addressed three main questions in this paper: First, by introducing a scaling factor on the Lyapunov condition, we introduced a fundamental change in the iterative construction. Second, we compared scaling using the l1 -norm and the l2 -norm. The l2 -norm scaling seems to be superior, but we do not have a convincing reason for this. This should definitely be addressed in future work. Third, we analysed the numerical complexity of our algorithm. Acknowledgement. First author wants to thank Dr. A. Arg´ aez for nice discussions on normed spaces as well as the Icelandic Research Fund (Rann´ıs) for funding this work under the grant: number 163074-052, Complete Lyapunov functions: Efficient numerical computation.

References 1. Arg´ aez, C., Giesl, P., Hafstein, S.: Iterative construction of complete Lyapunov functions. In: Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2018), pp. 211– 222 (2018). https://doi.org/10.5220/0006835402110222, ISBN 978-989-758-323-0 2. Arg´ aez, C., Giesl, P., Hafstein, S.: Analysing dynamical systems towards computing complete Lyapunov functions. In: Proceedings of the 7th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH 2017, Madrid, Spain (2017) 3. Arg´ aez, C., Giesl, P., Hafstein, S.: Computational approach for complete Lyapunov functions. Accepted in Springer Proceedings in Mathematics and Statistics (2018) 4. Arg´ aez, C., Hafstein, S., Giesl, P.: Wendland functions a C++ code to compute them. In: Proceedings of the 7th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH 2017, Madrid, Spain, pp. 323–330 (2017) 5. Arg´ aez, C., Giesl, P., Hafstein, S.: Computation of complete Lyapunov functions for three-dimensional systems (2018, submitted) 6. Arg´ aez, C., Giesl, P., Hafstein, S.: Computation of complete Lyapunov functions for three-dimensional systems. In: 57th IEEE Conference on Decision and Control (CDC) (2018, to be published) 7. Conley, C.: Isolated Invariant Sets and the Morse Index. CBMS Regional Conference Series, vol. 38. American Mathematical Society (1978) 8. Conley, C.: The gradient structure of a flow I. Ergodic Theory Dyn. Syst. 8, 11–26 (1988) 9. Dellnitz, M., Junge, O.: Set oriented numerical methods for dynamical systems. In: Handbook of Dynamical Systems, vol. 2, pp. 221–264. North-Holland, Amsterdam (2002) 10. Giesl, P.: Construction of Global Lyapunov Functions Using Radial Basis Functions. Lecture Notes in Mathematics, vol. 1904. Springer, Berlin (2007) 11. Giesl, P., Hafstein, S.: Review of computational methods for Lyapunov functions. Discrete Contin. Dyn. Syst. Ser. B 20(8), 2291–2331 (2015)

100

C. Arg´ aez et al.

12. Giesl, P., Wendland, H.: Meshless collocation: error estimates with application to Dynamical Systems. SIAM J. Numer. Anal. 45(4), 1723–1741 (2007) 13. Hsu, C.S.: Cell-to-Cell Mapping. Applied Mathematical Sciences, vol. 64. Springer, New York (1987) 14. Hurley, M.: Chain recurrence, semiflows, and gradients. J. Dyn. Diff. Equ. 7(3), 437–456 (1995) 15. Hurley, M.: Lyapunov functions and attractors in arbitrary metric spaces. Proc. Am. Math. Soc. 126, 245–256 (1998) 16. Iske, A.: Perfect centre placement for radial basis function methods. Technical report TUM-M9809, TU Munich, Germany (1998) 17. Krauskopf, B., Osinga, H., Doedel, E.J., Henderson, M., Guckenheimer, J., Vladimirsky, A., Dellnitz, M., Junge, O.: A survey of methods for computing (un)stable manifolds of vector fields. Int. J. Bifur. Chaos Appl. Sci. Eng. 15(3), 763–791 (2005) 18. Lyapunov, A.M.: The general problem of the stability of motion. Int. J. Control ´ 55(3), 521–790 (1992). Translated by A. T. Fuller from Edouard Davaux’s French translation (1907) of the 1892 Russian original 19. Narcowich, F.J., Ward, J.D., Wendland, H.: Sobolev bounds on functions with scattered zeros, with applications to radial basis function surface fitting. Math. Comput. 74, 743–763 (2005) 20. Wendland, H.: Error estimates for interpolation by compactly supported radial basis functions of minimal degree. J. Approx. Theory 93, 258–272 (1998) 21. Wendland, H.: Scattered Data Approximation. Cambridge Monographs on Applied and Computational Mathematics, vol. 17. Cambridge University Press, Cambridge (2005)

A Pre-step Stabilization Method for Non-iterative Co-Simulation and Effects of Interface-Jacobians Identification Simon Genser(B)

and Martin Benedikt

Virtual Vehicle Research Center, Inffeldgasse 21a, Graz, Austria {simon.genser,martin.benedikt}@v2c2.at

Abstract. Co-Simulation of complex subsystems can lead to stiff problems, where, especially for applied explicit numerical schemes, small communication step sizes are mandatory to obtain stable and accurate results. Due to the utilization of subsystem information, i.e. interfacejacobians or partial derivatives, it is possible to increase the stability and accuracy of the overall co-simulation. The herein proposed co-simulation coupling method therefore performs three major steps: a global approximation of the monolithic solution utilizing an introduced Error Differential Equation; a global model-based extrapolation over the next communication step and, finally, a local pre-step input optimization is carried out for all subsystems. This method is validated along a two degree-offreedom oscillator benchmark example. As for realistic use cases it is difficult to access interface-jacobians, system identification methods are applied for approximation. Associated interface-jacobian approximation errors are investigated with respect to the performance and especially the stability of the overall co-simulation. Keywords: Co-simulation · Pre-step stabilization identification · Interface-jacobians

1

· System

Introduction

Systems become more and more complex in industry and there is a demand for integration of domain-specific subsystems. Examples can be found in automotive industry or the IoT sector, where components are developed in different departments or delivered by different stakeholders. Furthermore, beside IPR-related aspects, the individual subsystems possess specific features and domain-specific simulation tools have to be utilized for modeling and analysis of related effects. For analysis of the overall system behavior virtual links between the individual subsystems have to be established by connecting corresponding inputs and outputs, where the synchronization is happening exclusively at certain points in time, the so-called communication points [2,8,14]. The co-simulation problem of continuous-time subsystems originates when bidirectional dependencies c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 101–125, 2020. https://doi.org/10.1007/978-3-030-35944-7_6

102

S. Genser and M. Benedikt

between subsystems exist and some subsystem inputs have to be extrapolated. The resulting coupling error of this extrapolation is related to the discretization error from continuous-time simulation and is unavoidable. The challenge is to deal with this coupling error in such a way that the performance of the whole co-simulation is satisfying. The non-iterative co-simulation of stiff problems, resulting from a big gap between the subsystem dynamics, e.g. an engine coupled to a cooling system, can lead to inaccurate or even unstable results. A compensation of the occurring coupling error is mandatory and a variety of different approaches and algorithms dealing with that challenge is available, e.g. [7,9]. Based on subsystem information there are different so-called model-based algorithms available dealing with that kind of problem, see for example [3,17,18,20]. In most of the state-of-theart algorithms the compensation of the coupling error is always performed in a delayed manner, but just recently a so-called pre-step stabilization method was proposed in [11,12]. There the compensation of the coupling error is applied before the co-simulation communication step, leading to an improved accuracy and stability of this method. As model-based co-simulation coupling methods are based on additional subsystem information, i.e. interface-jacobians or partial derivatives, it is important to have access to this kind of model information. The Functional Mock-Up Interface 2.0 in [8] defines an optional function call for accessing dedicated partial derivatives of the related FMU (Functional Mockup Unit), but this export feature is typically not supported by simulation tools. However, if the subsystems do not support this functionality in general, system identification methods, e.g subspace methods see [13,16,19], have to be applied. Due to identification of the subsystems partial derivatives additional approximation errors are introduced and the effect on the overall system behavior in terms of accuracy and stability has to be investigated. The paper is organized as follows: Sect. 2 introduces the Model-based PreStep Stabilization Method for the case of continuous- and discrete-time subsystem descriptions. In order to mitigate the effect of approximation errors in the partial derivatives to the co-simulation, a modified version is introduced. In Sect. 3 the proposed Model-based Pre-Step Stabilization Method is validated against a linear two degree-of-freedom(DoF) oscillator co-simulation benchmark example, especially demonstrating the effect of system identification to the cosimulation stability.

2

The Model-Based Pre-step Stabilization Method

The aim of this section is to present and derive the Model-based Pre-Step Stabilization Method. The subsystem description in the first subsection is the basis for the derivation of the three main steps of the classical continuous-time method, which will be carried out in Sect. 2.2, initially published in [12]. Due to the aim to investigate the effect of system identification, the used method, the so-called subspace method is shortly introduced in Sect. 2.3. For the direct use of the approximated partial derivatives the continuous-time stabilization method has

A Pre-step Stabilization Method for Non-iterative Co-simulation

103

to be modified for the utilization of discrete-time partial derivatives leading to the discrete-time stabilization method in Sect. 2.4. For further investigation of the effect of approximations errors in the identified interface-jacobians a modified version of the coupling method is introduced in Sect. 2.5. 2.1

Subsystem Description

As it is later shown the herein presented coupling method relies on information about the coupled subsystems and therefore a proper mathematical description of them is mandatory. The motivation for the utilized non-linear output-based subsystem1 description y˙ i = Si (y i , ui , u˙ i )

(1)

is given through the linear time-invariant state-space representation of a subsystem Si x˙ i (t) = Ai · xi (t) + Bi · ui (t),

(2)

y i (t) = Ci · xi (t) + Di · ui (t),

(3)

see for example [10]. Necessary assumptions for this motivation are that, the number of outputs and states are the same2 and that the matrix Ci is regular. Taking the time derivative of (3) leads to y˙ i = Ci · x˙ i + Di · u˙ i . Substituting (2) implies y˙ i = Ci · (Ai · xi + Bi · ui ) + Di · u˙ i .

(4)

Rearranging (3) and inserting into (4) results in   y˙ i = Ci · Ai · Ci−1 · (y i − Di · ui ) + Bi · ui + Di · u˙ i and from algebraic rearrangements follows     y˙ i = Ci · Ai · Ci−1 · y i + Ci · Bi − Ci · Ai · Ci−1 · Di · ui + Di · u˙ i .

(5)

Here is the connection to the utilized output-based subsystem description (1) clearly visible. It should also be denoted that in this description the states are no longer directly included. 1

2

A necessary assumption for this subsystem description is that the in- and outputs of a subsystem are continuous differentiable, which means e.g. that hybrid systems are not considered. This assumption is not a restrictive one because, this subsystem description will only be used in the context of co-simulation, where the subsystems are typically black boxes, which implies, that the number of states is unknown and therefore one can always choose the number of states as the number of outputs.

104

S. Genser and M. Benedikt

The proposed coupling method is based on the linearization of (1) around an equilibrium point3 , for the sake of simplicity (0, 0, 0) is chosen as one ∂Si ∂Si ∂Si y˙ i ≈ Si (0, 0, 0) + · yi + · ui + · u˙ i .   ∂yi ∂ui ∂ u˙ i

(6)

=0

Comparing (6) with (5) leads to ∂Si = Ci · Ai · Ci−1 , ∂yi ∂Si = Ci · Bi − Ci · Ai · Ci−1 · Di , ∂ui ∂Si = Di , ∂ u˙ i

(7)

i ∂Si ∂Si where ∂S ∂yi , ∂ui , ∂ u˙ i are the so-called interface-jacobians or the partial derivatives of the subsystem Si . The Functional Mock up Interface 2.0, see [8], provides access to this information but unfortunately most subsystems do not support this functionality. So one have to approximate the interface-jacobians with system identification algorithms, more about them in Sect. 2.3. The effects and the impact of approximated interface-jacobians to the proposed coupling method will be discussed in the following sections.

2.2

Derivation of the Method

The following assumptions are made to keep the notation of the derivation as simple as possible: – the overall co-simulation consists of two fully coupled subsystems (i.e. u1 = y2 , u2 = y1 at the communication points); – the communication step size ΔT and the subsystem solver step size δT are fixed for the whole computation time and for both subsystems; – the inputs and outputs ui , yi for i = 1, 2 are scalar signals; – the inputs and outputs ui , yi for i = 1, 2 are continuous differentiable signals in time; – to ensure zero-stability, see [9], the co-simulation does not consist of an algebraic loop, i.e. at least one of the direct feedthrough terms of the subsystems is zero. The proposed method consists of three main steps, illustrated in Fig. 1: 1. Approximation of the monolithic, i.e. ideal coupled, output y˜, over the last communication step, utilizing the introduced global Error Differential Equation

˜ ·+D ˜ · ˙ , ˜ −1 · A˜ · δ + B δ˙ = (I − C) 3

Equilibrium point of an ordinary differential equation means that the right-hand side is zero.

A Pre-step Stabilization Method for Non-iterative Co-simulation

105

Fig. 1. Illustration of the three main steps of the Model-based Pre-Step Stabilization method from the viewpoint of subsystem S2 , all subsystems have simulated until the communication point T k . In step 1 the monolithic solution y˜2 is computed, over the last communication step T k−1 → T k . Based on that a model-based extrapolation, over the next communication step T k → T k+1 , resulting in yˆ2 is performed in step 2. In step 3 the input for S2 , for the next communication step T k → T k+1 , is optimized, based on yˆ2 .

where δ describes the gap between the monolithic output y˜ and the computed output y of the subsystems. The non-homogeneous terms  and ˙ stand for the coupling error respectively its time derivative. 2. A global model-based extrapolation yˆ of the monolithic output is performed by solving ˆ −1 · Aˆ · yˆ, y ˆ˙ = (I − B) over the next communication step. 3. Based on the extrapolation yˆ the corresponding input u is optimized, over the next communication step. Therefore the optimization problem min

t∈[T k ,T k+1 ]

|α(t)|

is solved, here α := yˆ − y denotes the gap between the extrapolated output yˆ and the computed output y of the subsystems. Detailed definitions and explanations of all quantities mentioned above can be found in the following derivation, at the appropriate position. Step 1: Approximate the Monolithic Solution. For approximation of the monolithic solution y˜i over the last communication step T k−1 → T k , see step 1 in Fig. 1, of a subsystem the so-called Error Differential Equation is utilized,

106

S. Genser and M. Benedikt

which represents an ordinary, vector-valued differential equation4 . Its derivation is based on the subsystem description (1) and the following two cases: – Ideal coupling of the two subsystems: y˜˙ 1 = S1 (˜ y1 , y˜2 , y˜˙ 2 ) y˜˙ 2 = S2 (˜ y2 , y˜1 , y˜˙ 1 )

(8)

y˙ 1 = S1 (y1 , u1 , u˙ 1 ) y˙ 2 = S2 (y2 , u2 , u˙ 2 )

(10) (11)

(9)

– Coupling by co-simulation:

Comparing (8) with (10) results in y1 , y˜2 , y˜˙ 2 ) = y˙ 1 − S1 (y1 , u1 , u˙ 1 ). y˜˙ 1 − S1 (˜

(12)

δi := y˜i − yi for i = 1, 2

(13)

The definition

representing the gap between the monolithic output y˜i and the computed output yi from the subsystem, see Fig. 1, and (12) is resulting in S1 (˜ y1 , y˜2 , y˜˙ 2 ) − S1 (y1 , u1 , u˙ 1 ) = y˜˙ 1 − y˙ 1 .  

(14)

δ˙1

Combining the coupling error5 2 := y1 − u2 with δ1 = y˜1 − y1 is leading to y˜1 = u2 + 2 + δ1 .

(15)

Rearranging (13) for i = 2 is resulting in y˜2 = y2 + δ2 .

(16)

Rearranging the coupling errors 2 = y1 − u2 and 1 := y2 − u1 is leading to y1 = u2 + 2 , u1 = y2 − 1 .

(17) (18)

Inserting (15)-(18) in (14) is leading to δ˙1 = S1 (u2 + 2 + δ1 , y2 + δ2 , y˙ 2 + δ˙2 ) − S1 (u2 + 2 , y2 − 1 , y˙ 2 − ˙1 ). 4 5

The size of the differential equation is based on the overall number of outputs of all subsystems, for this derivation, due to the assumptions, it is fixed to two. The terms 1 and 2 are denoted as coupling errors because they describe the deviation of the coupled signals, u1 = y2 and u2 = y1 at the communication points, over a communication step, see Fig. 1.

A Pre-step Stabilization Method for Non-iterative Co-simulation

107

From the spatial linearization based on the Taylor-series, with the center of the series in (u2 , y2 , y˙ 2 ), follows ∂S1 ∂S1 ∂S1 ˙ · (2 + δ1 ) + · δ2 + · δ2 − S1 (u2 , y2 , y˙ 2 ) − . . . ∂y1 ∂u1 ∂ u˙ 1 ∂S1 ∂S1 ∂S1 ... · 2 + · 1 + · ˙1 ≈ δ˙1 . ∂y1 ∂u1 ∂ u˙ 1

S1 (u2 , y2 , y˙ 2 ) +

From algebraic rearrangements follows the final ordinary Error Differential Equation ∂S1 ∂S1 ∂S1 ˙ · δ1 + · [δ2 + 1 ] + · [δ2 + ˙1 ]. δ˙1 ≈ ∂y1 ∂u1 ∂ u˙ 1

(19)

Via symmetry for (9) and (11) it follows ∂S2 ∂S2 ∂S2 ˙ · δ2 + · [δ1 + 2 ] + · [δ1 + ˙2 ]. δ˙2 ≈ ∂y2 ∂u2 ∂ u˙ 2

(20)

The fact that the two ordinary differential equations above are coupled motivates to write them in vector and matrix notation   ∂S1 ∂S1   ∂S1 δ1  δ˙1 ∂y1 ∂u1 ∂u1 0 · 1 ... ∂S2 ˙δ2 = ∂S2 ∂S2 · δ2 +  0 ∂u2 2    ∂u2∂y2       =:δ˙



˜ =:A

=:δ

˜ =:B

=:

   ∂S1 1 ˙1 0 ∂S 0 δ ˙ . . . + ∂S2 ∂ u˙ 1 · ˙ + ∂ u˙ 1 ∂S2 · 1 .  ˙2 0 0 δ 2 ∂ u˙ 2 ∂ u˙ 2         ˜ =:C

=:δ˙

˜ =:D

=:˙

Rearranging this equation leads to ˜ · δ˙ = A˜ · δ + B ˜ ·+D ˜ · , (I − C) ˙ where I denotes an identity matrix from appropriate dimension. The final Error Differential Equation results in

˜ −1 · A˜ · δ + B ˜ ·+D ˜ · ˙ . δ˙ = (I − C) (21) ˜ is regular because at least one of ∂S1 or It should be mentioned that (I − C) ∂ u˙ 1 ∂S2 are zero, due to (7) and the assumption of zero-stability. ∂ u˙ 2 Note: Due to the definition of δi = y˜i − yi and the assumption that yi is continuous it follows that δi is continuous as well. This leads naturally to the initial conditions for δ = (δ1 , δ2 )T , combining this with the equation above leads to a initial value problem for the computation of δ in [T k−1 , T k ], the monolithic solution y˜i can be computed via y˜i = δi + yi for i = 1, 2.

(22)

108

S. Genser and M. Benedikt

The numerical solving of (21) requires an appropriate numerical solver for ordinary differential equations, like standard Runge-Kutta methods. For satisfying performance of the overall co-simulation coupling method, the parameters of the solver, especially the step size, have to be chosen appropriately. Step 2: Model-Based Extrapolation. The second step of the method is to perform a model-based extrapolation of the approximated monolithic solution over the next communication step ΔT , depicted as step 2 in Fig. 1. The modelbased extrapolation of the overall system ensures the linear-implicit behavior of the method. The ordinary differential equation for the extrapolation is based on the assumption of ideal coupling between the subsystems and the subsystem description (6) ∂Si ∂Si ∂Si · yˆi + · ui + · u˙ i for i = 1, 2. yˆ˙ i ≈ ∂yi ∂ui ∂ u˙ i

(23)

The assumption of ideal coupling between subsystems yˆ1 = u2 , yˆ2 = u1 , combined with equation (23) leads to   ∂S1 ∂S1   ∂S1 0 yˆ˙ 1 y ˆ yˆ˙ 1 1 ∂y1 ∂u1 ∂ u˙ 1 = · + · . ∂S ∂S ∂S 2 2 2 yˆ2 0 yˆ˙ 2 yˆ˙ 2    ∂u2∂y2    ∂ u˙ 2   ˙ =:yˆ

ˆ =:A

=:yˆ

ˆ =:B

˙ =:yˆ

Rearranging this equation results in the final differential equation6 ˆ −1 · Aˆ · yˆ. yˆ˙ = (I − B)

(24)

Note: The initial condition for (24) is defined from the solution of the Error Differential Equation, i.e. yˆi (T k ) = y˜i (T k ) for the extrapolation over [T k , T k+1 ], leading to an initial value problem for every communication step. It should be denoted that (24) is an ordinary differential equation and therefore the numerical solution requires an appropriate numerical solver, like standard Runge-Kutta methods. Like in the case of the Error Differential Equation, the parameters of the numerical solver has to be chosen in such a way, that the accuracy of the numerical solution of (24) is sufficient. Otherwise the performance of the presented co-simulation coupling method could decrease drastically.

6

ˆ is regular because of the zero-stability assumption, analogous to (I − C) ˜ (I − B) before.

A Pre-step Stabilization Method for Non-iterative Co-simulation

109

Step 3: Pre-step Input Optimization. The local optimization of the input ui represents the third main part of the presented method, for illustration see Fig. 1. Based on the extrapolation yˆi , over the next communication step T k → T k+1 , and the interface-jacobians of a subsystem, the input ui of a subsystem for the next communication step is computed. Local means that this part can be computed for every subsystem individually and independent from the other subsystems, therefore the sub index i is omitted in this subsection. The optimization is based on the deviation α(t) := yˆ(t) − y(t).

(25)

The idea is to choose the input u so that α is minimized over the next communication step min

t∈[T k ,T k+1 ]

|α(t)|.

(26)

There are different ways to solve this optimization problem. Herein the focus is drawn to a discretized version !

|αk+1 | = 0, with αk+1 := α(T k+1 ).

(27)

The discretization (27) of the optimization problem combined with the definition (25) leads to !

yˆk+1 = y k+1 ,

(28)

where yˆk+1 := yˆ(T k+1 ) and y k+1 := y(T k+1 ). For explicitly solving this problem the dependency of the output y k+1 on the input uk has to be exploited. To describe this relation a close look on the system description (6) and standard theory of ordinary differential equations is needed. The analytical solution of (6) is described through  t ∂S ∂S ∂S ·(t−T k ) k ∂y · u(τ ) dτ + . . . · y(T )+ e ∂y ·(t−τ ) · y(t) = e ∂u k T  t ∂S ∂S · u(τ ˙ ) dτ, (29) ... e ∂y ·(t−τ ) · ∂ u˙ Tk where t ∈ [T k , T k+1 ] for k = 0, 1, . . ., T 0 denotes the start of the co-simulation and y(T 0 ) the initial condition. The derivative u˙ denotes the time derivative which is computed piecewise for every communication step. Due to the appearance of u˙ in (29) the choice of piecewise constant basic functions is a bad one because u would not be differentiable. That is the reason that piecewise linear basic functions, they are at least weak differentiable, are utilized to describe the input u in the following, i.e. the preferred approach for u is u(t) = uk0 + sk · t for t ∈ [T k , T k+1 ],

(30)

110

S. Genser and M. Benedikt

where uk0 = y(T k ), with y representing the output from the coupled subsystem. The slope of u in the communication step T k → T k+1 is denoted with sk . Inserting this approach in (29) and evaluating the equation for t = T k+1 leads to y(T

k+1

)=e

k+1 ∂S −T k ) ∂y ·(T

 · y(T ) + k

 . . . (uk0 + sk · τ ) dτ +

T k+1

Tk T k+1

e ∂y ·(T ∂S

e ∂y ·(T ∂S

k+1

k+1

−τ )

Tk

−τ )

·

·

∂S · ... ∂u

∂S k · s dτ. ∂ u˙

Rearranging the last equation is leading to y k+1 = e ∂y ·ΔT · y k + uk0 · ∂S

 s · k

T k+1

e



T k+1

e ∂y ·(T ∂S

k+1

−τ )

Tk

k+1 ∂S −τ ) ∂y ·(T

Tk

∂S · τ dτ + sk · · ∂u

· 

∂S dτ + . . . ∂u T k+1

e ∂y ·(T ∂S

Tk

k+1

−τ )

·

∂S dτ, ∂ u˙

with φA := e ∂y ·ΔT ,  T k+1 k+1 ∂S ∂S φB := dτ, e ∂y ·(T −τ ) · ∂u Tk  T k+1 k+1 ∂S ∂S · τ dτ, φC := e ∂y ·(T −τ ) · ∂u k T  T k+1 k+1 ∂S ∂S dτ, φD := e ∂y ·(T −τ ) · ∂ u˙ Tk ∂S

it is possible to write y k+1 = φA · y k + uk0 · φB + sk · (φC + φD ) .

(31)

Inserting (31) into (28) results in yˆk+1 = φA · y k + φB · uk0 + sk · (φC + φD ) .

(32)

As it is the case, that y k and uk0 is known from the previous communication step and yˆk+1 is given due to the model-based extrapolation it is now possible to determine sk through  −1  (33) sk = (φC + φD ) · yˆk+1 − φA · y k − φB · uk0 and therefore the input over the next communication step is fully determined. A closer look on (32) directly implies that for φC + φD = 0, the singular case, the choice of sk has no influence, so one can set sk = 0. Therefore the computation of sk in (33) is well-defined. It should be mentioned that, this input optimization is computed locally for each subsystem and can therefore be easily performed in parallel.

A Pre-step Stabilization Method for Non-iterative Co-simulation

111

Summary of the Method. The first step of the introduced co-simulation coupling method is, to approximate the monolithic output y˜ over the last communication step. This is important for improving the stability because the deviation between the co-simulated y and the ideal coupled output y˜ is thus known. The value of this computed monolithic output is taken as the initial condition for the model-based extrapolation yˆ over the next communication step, which is carried out in step 2. This extrapolated output yˆ is the objective for the computed output y of the subsystem over the next communication step. Therefore is the input u optimized in step 3. This input optimization improves the stability of the coupling method because coupling errors are minimized at the same communication step, at which they occur and not in a delayed manner, therefore the method is called pre-step. Step 1 and 2 of the method are global and model-based, which means that the interface-jacobians of all included subsystems are needed. That implies, that the mutual coupling effects are taken into account by computing the monolithic solution and by performing the extrapolation, which is leading to an improved stability, as it will be demonstrated in Sect. 3. 2.3

System Identification - Subspace Method

The utilization of the Model-based Pre-Step Stabilization Method requires infor∂Si i ∂Si mation about the partial derivatives ∂S ∂yi , ∂ui and ∂ u˙ i for every subsystem Si . Typically the subsystems represents complex systems and from the perspective of co-simulation these systems are black boxes. In industrial applications these partial derivatives are typically unknown. The preferred opportunity to access them is that the partial derivatives are provided through the subsystems themselves, see getDirectionalDerivatives in FMI 2.0 [8]. Unfortunately nowadays just a few, rare tools support this functionality and therefore system identification is required to approximate the mandatory partial derivatives. System identification is a huge field of research and there is a vast number of algorithms available. The herein preferred ones are the so-called subspace methods [16,19], especially the Multivariable Output Error State sPace (MOESP) method [13]. One advantage is their ability to identify the direct feedthrough terms with an appropriate accuracy, a second advantage7 is that the model order can be chosen automatically and therefore the method is well-suited for the identification of black box systems. The input for the system identification algorithm are the in- and outputs ui , yi of the subsystem Si . Enough exciation in ui has to be ensured and therefore the number of samples of ui and yi has to be chosen appropriately. Without lack of generality the sampling rate can be assumed equal and constant for ui and yi . The output of the MOESP method are the discrete-time system matrices Adi , Bdi , Cdi and Ddi of the state space model

7

If one wants to utilize equations (7) the number of states has to be chosen equal to the number of outputs.

112

S. Genser and M. Benedikt

xk+1 = Adi · xki + Bdi · uki , i

(34)

yik = Cdi · xki + Ddi · uki ,

(35)

representing the discrete-time subsystem Sdi . Analogously to the derivation of the continuous-time output-based subsystem description (6) a discrete-time version can be derived, resulting in yik+1 =

∂Sdi k ∂Sdi ∂Sdi · yi + · uki + · uk+1 , i ∂yik ∂uki ∂uk+1 i

(36)

where the analogous transformation equations ∂Sdi = Cdi · Adi · Cd−1 , i ∂yik ∂Sdi = Cdi · Bdi − Cdi · Adi · Cd−1 · Ddi , i ∂uki ∂Sdi = Ddi ∂uk+1 i

(37)

hold. Quality Check. Bad excitation see, e.g. [15], data losses or strong nonlinearities can lead to a poor quality of the identified linear model. Due to the fact that the proposed stabilization method is model-based this can lead to a poor performance or even to instabilities in the co-simulation. Therefore, it is mandatory to check the quality of the approximated models. In industrial examples there is no reference solution and therefore a measurement of the quality is carried out in the following way: After the computation of the output yik at the coupling instant T k based on , the partial derivatives the input uk−1 i ∂Sdk−1 ∂Sdk−1 ∂Sdk−1 i i i , , ∂uki ∂yik−1 ∂uk−1 i

(38)

of Sdi are approximated via the MOESP method based on an appropriate batch of samples of yi and ui . The quality check is carried out by comparing the output of the subsystem yik with y¯ik =

∂Sdk−1 i ∂yik−1

· yik−1 +

∂Sdk−1 i ∂uk−1 i

· uk−1 + i

∂Sdk−1 i ∂uki

· uki ,

(39)

which displays the output of the identified, linear and discrete-time subsystem . It should be emphasised that yik and y¯ik are computed with the same Sdk−1 i inputs. So if there is a difference, the only source of deviations is an approximation error in the identified model.

A Pre-step Stabilization Method for Non-iterative Co-simulation

113

A useful check of the quality can only be carried out since the errors are normalized, absolute errors are not comparable. Therefore the absolute error of every output |yik − y¯ik | is normalized, via the maximum amplitude of the batch of yi , which is utilized for the system identification, resulting in krel,i =

|yik − y¯ik | . max(yi ) − min(yi )

(40)

If one of the krel,i for a subsystem Sdk−1 is larger than a user-predefined threshi old8 , the accuracy of the identified model is too weak. This means one should not use this identified model for the model-based coupling. It would be better to use the model from the last communication point, the partial derivatives ∂Sdk−2 i

∂yik−2

,

∂Sdk−2 i

∂uk−2 i

,

∂Sdk−2 i

∂uk−1 i

or one can simply skip the model-based coupling for this

one communication step and perform a classical ZOH or FOH coupling. Note: The singular case (max(yi )−min(yi ) ≈ 0) is not problematic because it means yi ≈ constant over the utilized batch, so there is no dynamic in the system and this leads to a poor performance of the co-simulation itself. Consequently, a high krel,i is the correct indicator for that case because either the batch is chosen poorly or the subsystem is not appropriate for co-simulation in general. 2.4

The Discrete-Time Stabilization Method

The utilization of a system identification algorithm, like the MOESP mentioned in previous section, leads typically to a discrete-time state space model (34) and (35). Therefore the direct utilization of the discrete-time partial deriva∂S ∂S ∂Sdi is favourable. This can be carried out analogously tions ∂ydki , ∂udki and ∂uk+1 i

i

i

to the derivation of the stabilization method in Sect. 2.2, which is based on a continuous-time subsystem description: Step 1: Approximate the Monolithic Solution. The derivation of the discrete-time formulation of the Error Differential Equation is analogous to the continuous-time case in the Sect. 2.2, if one takes into account that the time derivative of an element for the continuous-time case is replaced with quantities with the index k + 1, i.e. the derivation of the method is based on (36). So the final discrete-time Error Differential9 Equation is

˜d · k−1 + D ˜ d · k , δ k = (I − C˜d )−1 · A˜d · δ k−1 + B (41)

8 9

The choice of this threshold depend among others on the excitation, the dynamics of the subsystem and the accuracy requirement of the overall co-simulation. It should be mentioned that the name Error Differential Equation is kept although the equation is now an algebraic equation instead of an differential equation.

114

S. Genser and M. Benedikt

where

⎞ ⎞ ⎛ ⎛ ∂Sd1 ∂Sd1 ∂Sd1 k 0 k k k δ ∂y1 ∂u1 ⎠ ˜d = ⎝ ∂u1 ∂S ⎠ , δ k = 1k , A˜d = ⎝ ∂S , B d2 ∂Sd2 δ2 0 ∂udk2 k k ∂u2 ∂y2 2 ⎞ ⎛ ⎛ ∂S ⎞ ∂Sd1 k d1 0 ∂uk+1 0 k+1  ˜ d = ⎝ ∂u1 1 ⎠. ⎠, D k = 1k , C˜d = ⎝ ∂Sd2 ∂Sd2 2 0 0 k+1 k+1 ∂u2

∂u2

Due to the fact that (41) is an algebraic equation the solution of it is easy and fast to compute. Step 2: Model-Based Extrapolation. The discrete-time version of the model-based extrapolation of the monolithic output y˜k , over the next communication step, can be derived analogous to the continuous-time case. As in the derivation for the discrete-time Error Differential Equation, the time derivative of quantities is replaced by an index k + 1 at the appropriate quantity. The final algebraic equation results in ˆd )−1 · Aˆd · yˆk y ˆk+1 = (I − B with yˆk+1 =

⎛ ∂Sd1

yˆ1k+1 ∂y1k ˆ ⎝ k+1 , Ad = ∂Sd2 yˆ2 k ∂u2

∂Sd1 ∂uk 1 ∂Sd2 k ∂y2



(42) ⎞



ˆd = ⎝ ⎠, B

0 ∂Sd2 ∂uk+1 2

∂Sd1 ∂uk+1 1 ⎠

0

.

Step 3: Pre-step Input Optimization. Due to the fact that the input optimization has to be based on (36), the optimization problem !

|αk+1 | = 0, with αk+1 := α(T k+1 )

(43)

coincides with (27). The derivation starts with the discrete-time subsystem description10 (36) y k+1 =

∂Sd k ∂Sd k ∂Sd ·y + ·u + · uk+1 . ∂y k ∂uk ∂uk+1

Inserting this into the optimization problem !

yˆk+1 = y k+1 results in ∂Sd k ·y + ∂y k 10



∂Sd ∂Sd + ∂uk ∂uk+1

(44)

· uk = yˆk+1 .

(45)

Like in the continuous-time case this computation can be carried independently for every subsystem and therefore the subindex i is omitted.

A Pre-step Stabilization Method for Non-iterative Co-simulation

115

For the case of zero-order-hold extrapolation it should be pointed out that uk+1 = uk holds in general for co-simulation. This leads to k

u = 2.5

∂Sd ∂Sd + ∂uk ∂uk+1

−1

∂Sd k k+1 · yˆ − k ·y . ∂y

(46)

Modified Coupling Method

For further investigation of the effect of approximation errors in the interfacejacobians the following modified version of the discrete-time and continuous-time method is utilized: Step 3, the input optimization, is replaced with the direct utilization of the extrapolated monolithic output yˆi as an input ui for the appropriate subsystems, i.e. k+1 k yˆ1 u1 = L · , (47) uk2 yˆ2k+1 for the discrete-time method and analogously for the continuous-time method. Here L denotes the coupling matrix, which possesses the information about the coupling structure of the co-simulation. In case of approximated interfacejacobians skipping the optimization of the input is a fine option, because the presumption is, that the input optimization is the most sensitive step, according approximation errors in the interface-jacobians. This behavior will be demonstrated and discussed in Sect. 3. Note: This modified version still works in pre-step manner.

3

Co-simulation Example

The performance of the proposed stabilization method is illustrated by an two degree-of-freedom oscillator, see e.g. [6,9,12]. The case of utilization of exact partial derivatives is examined first, afterwards the impact of system identification is investigated. It will be distinguished between direct use of the discrete-time partial derivatives, utilizing the discrete-time stabilization method, and the usage of the continuous-time stabilization method, where the approximated partial derivatives have to be converted to their continuous-time representation first. The following description of the example and the case of exact partial derivatives is partly published in [12]. 3.1

Two Degree-of-Freedom Oscillator

The preferred example represents a force-displacement11 coupled two degree-offreedom (DoF) mechanical oscillator, which is separated into two subsystems, see 11

The force-displacement coupling has been chosen because, so no apperance of an algebraic loop is ensured and the zero-stability is guaranteed, see therefore [9].

116

S. Genser and M. Benedikt

Fig. 2. Co-simulation setup of a coupled 2-DoF oscillator, see [9].

Fig. 2, including a direct feedthrough in the second subsystem; the state-space representation of the subsystems is given by: x˙ 1 = A1 · x1 + B1 · u1 ,

(48)

y 1 = C1 · x1

(49)

x˙ 2 = A2 · x2 + B2 · u2 , y2 = C2 · x2 + D2 · u2

(50) (51)

and

with





0 1 x1 x2 , x2 = , A1 = , c1 d1 −m −m x˙ 1 x˙ 2 1 1

0 1 0 A2 = , B1 = 1 , k − c2m+c2 k − d2m+d m1 2

0 0 10 , B2 = ck dk , C1 = 01 m2 m2     C2 = ck dk , D2 = −ck −dk . x1 =

The chosen parameters are: m1 = 10 kg, m2 = 10 kg, c1 = 106 Nm−1 , c2 = 107 Nm−1 , d1 = 1 Nsm−1 , d2 = 2 Nsm−1 , ck = 105 Nm−1 , dk = 103 Nsm−1 , tstart = 0 s, tend = 0.1 s. The initial conditions are set to: x01 = 0.1,

x˙ 01 = 0,

x02 = 0,

x˙ 02 = 0.

(52)

The constant communication step size is varied for evaluation purposes within the interval ΔT ∈ [1·10−3 , 8·10−3 ] s; the fixed subsystem solver step size is set to

A Pre-step Stabilization Method for Non-iterative Co-simulation

117

δT = 10−5 s; an explicit Euler method is utilized for solving the subsystems. The reference solution is determined individually by utilizing a monolithic simulation with ΔT = δT . Therefore, the monolithic overall system is derived from the subsystem description (48)–(51) assuming ideal couplings u1 = y2 and u2 = y 1 :

x˙ 1 x1 A1 + B1 · D2 · C1 B1 · C2 · = . x˙ 2 B2 · C1 A2 x2   =Amono

The numerical reference solution is determined by using the explicit euler method. The overall stiffness results in −104 λmax = 200, = λmin −50 where λmax denotes the maximum and λmin the minimum of the absolute value of the eigenvalues of Amono . 3.2

Performance Evaluation

Due to the fact that a direct feedthrough term is included the utilization of firstorder-hold (FOH) coupling approaches is preferred, see for more justification and details [12]. In all following figures the coupling force y2 (t) = ck · [x1 (t) − x2 (t)] + dk · [x˙ 1 (t) − x˙ 2 (t)]

(53)

is depicted. It is chosen because the positions x1 (t), x2 (t) and their velocities x˙ 1 (t), x˙ 2 (t) have an significant influence and therefore the whole behavior of the example is displayed. Exact Interface-Jacobians. The Figs. 3, 4 and 5 depicts the case of utilization of exact interface-jacobians for the model-based stabilization method. That means the transformation12 rule (7) is combined with the exact knowledge of the i ∂Si continuous-time state-space matrices (48)-(51) to compute the required ∂S ∂yi , ∂ui ∂Si and ∂ u˙ i . This results in application of the continuous-time stabilization method from Sect. 2.2. The stability border of FOH coupling is depicted in Fig. 3 with ΔT = 0.00305 s. With the utilization of a signal-based approach, the so-called Nearly Energy Preserving Coupling Element (NEPCE), see [7], the stability border can be extended to ΔT = 0.0037 s, see Fig. 4. To choose even larger step sizes the application of model-based coupling approaches is unavoidable, Fig. 5 displays the stability border for the so-called linear-implicit stabilization method, see [3]. It is obvious that the proposed pre-step stabilization method is stable and quite accurate for that case, too. Increasing the communication step size further is 12

Due to the fact that, there is only one output but two states in S2 the Moore-Penrose inverse is utilized, instead of the classical inverse, to compute C2−1 .

118

S. Genser and M. Benedikt

not reasonable, due to the sampling theorem, see e.g. [1]. Especially for many industrial applications only the values at the communication points are available for the co-simulation coupling method. Therefore one has to take the sampling theorem into account, as reasonable limitation for choosing the communication step size. 2

10

5

1.5

coupling force / N

1 0.5 0 -0.5 -1 -1.5 -2 0

T

T

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 3. Coupling force y2 ; stability border ΔT = 0.00305 s for FOH coupling; NEPCE solution with FOH; continuous-time stabilization method with exact partial derivatives.

Effect of System Identification. The effect of approximated interfacejacobians to the discrete-time and the continuous-time coupling method is depicted in Figs. 6, 7 and 8. There the results simulated with the discrete-time method and the continuous-time method, both based on approximated interfacejacobians, are compared to the result simulated with the continuous-time method utilized with exact interface-jacobians. The only reason for a difference in the depicted result are the approximation errors arising from the system identification. Due to the nature of system identification it is mandatory to have a learning phase for the method, for this example ≈0.01 s has been chosen, because it has to be a multiple of the communication step size. During that phase it is impossible to apply model-based coupling and therefore classical FOH coupling is utilized in every case. In Fig. 6 the result utilizing the continuous-time method with exact partial derivatives and with approximated partial derivatives is shown. For that case, first one has to transform these identified discrete-time partial derivatives to their continuous-time representation. Furthermore the result using the discretetime stabilization method based on approximated partial derivatives is depicted. There one can see that, both cases are stable and remarkable is, that the solution utilizing the discrete-time method is more accurate. A possible reason for that is, that instead of numerical solving the differential equations (21) and

A Pre-step Stabilization Method for Non-iterative Co-simulation 8

10

4

T

T

119

6

coupling force / N

4 2 0 -2 -4 -6 -8 0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 4. Coupling force y2 ; stability border ΔT = 0.0037s for NEPCE coupling [7]; NEPCE solution with ZOH; continuous-time stabilization method with exact partial derivatives. 1.5

10

5

coupling force / N

1 0.5 0 -0.5 -1 -1.5 0

T

T

0.02

0.04

0.06

0.08

0.1

0.12

0.14

time / s

Fig. 5. Coupling force y2 ; stability border ΔT = 0.008 s for linear implicit stabilization coupling [3]; continuous-time stabilization method with exact partial derivatives.

(24) just the algebraic equations (41) and (42) have to be computed and so the numerical approximation error is avoided. As a reference solution the result from the continuous-time method with exact partial derivatives is taken. By increasing the communication step size to ΔT = 0.004, one can see in Fig. 7 that, the effect of the approximation errors of the interface-jacobians is low for the

120

S. Genser and M. Benedikt

104

3

learning phase

continuous, exact derivatives continuous, approximated derivatives discrete, approximated derivatives

coupling force / N

2

1

0

-1

-2

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 6. Effect of approximated interface-jacobians on the continuous-time and discretetime Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.001 s; learning phase = [0, 0.01] s.

104

6

learning phase

continuous, exact derivatives continuous, approximated derivatives discrete, approximated derivatives

coupling force / N

4 2 0 -2 -4 -6

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 7. Effect of approximated interface-jacobians on the continuous-time and discretetime Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.004 s; learning phase = [0, 0.012] s.

A Pre-step Stabilization Method for Non-iterative Co-simulation

121

105 1 continuous, exact derivatives continuous, approximated derivatives discrete, approximated derivatives

learning phase

coupling force / N

0.5

0

-0.5

-1 0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

time / s

Fig. 8. Effect of approximated interface-jacobians on the continuous-time and discretetime Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.008 s; learning phase = [0, 0.016] s.

104

3

learning phase continuous, exact derivatives discrete, approximated derivatives discrete, approximated derivatives, no Input Opt. continuous, approximated derivatives, no Input Opt.

coupling force / N

2

1

0

-1

-2

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 9. Classical and modified Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.001 s; learning phase =[0, 0.01] s.

122

S. Genser and M. Benedikt

104

6

learning phase continuous, exact derivatives discrete, approximated derivatives discrete, approximated derivatives, no Input Opt. continuous, approximated derivatives, no Input Opt.

coupling force / N

4 2 0 -2 -4 -6

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

time / s

Fig. 10. Classical and without input optimization modified Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.004 s; learning phase = [0, 0.012] s.

105

learning phase

3

continuous, exact derivatives discrete, approximated derivatives discrete, approximated derivatives, no Input Opt. continuous, approximated derivatives, no Input Opt.

coupling force / N

2 1 0 -1 -2 -3 0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

time / s

Fig. 11. Classical and without input optimization modified Model-based Pre-Step Stabilization Method; coupling force y2 ; ΔT = 0.008 s; learning phase = [0, 0.016] s.

A Pre-step Stabilization Method for Non-iterative Co-simulation

123

continuous-time method. The discrete-time method is still stable but it is inaccurate. Due to the sampling theorem [1] the maximum communication step size is about ΔT = 0.008. The result for that case, see Fig. 8, shows that the discretetime method is instable. Due to the fact that the continuous-time method is stable and also quite accurate, the assumption arises that, the discrete-time method is more sensitive to errors in the approximation of the partial derivatives than the continuous-time method. For a further investigation of the sensitivity of the proposed method according approximations errors in the interface-jacobians, the modified version, see Sect. 2.5, of the continuous-time and the discrete-time method is utilized. In Fig. 9 one sees that there is not a visible difference between the modified discretetime and the classical discrete-time method. An increase in the communication step size to ΔT = 0.004 s is shown in Fig. 10, there it is depicted that the modified discrete-time version is nearly as accurate as the classical discrete-time version of the method, although the third main step, the input optimization, is skipped and therefore the computational effort is reduced. The fact that for ΔT = 0.008 s the modified discrete-time method is stable and the classical discrete-time method is unstable, see Fig. 11, results in the assumption that the modified version is less sensitive than the classical one. That means that the third main step of the proposed discrete-time method, the pre-step input optimization is more sensitive to approximations errors in the partial derivatives than the remaining parts of the discrete-time method. Comparing the results from the modified continuous-time method, Figs. 9, 10 and 11, to results from the classical continuous-time method, Figs. 6, 7 and 8, shows that there is no big difference. This results in the assumption that the prestep input optimization for the continuous-time method is not highly sensitive to approximation errors in the partial derivatives compared to the case of the discrete-time method. Summarizing one can say, that the modified versions of the method perform very well for the case of the continuous-time and discrete-time method.

4

Conclusion

The Model-based Pre-Step Stabilization Method consists of the main steps: 1. approximation of the monolithic solution, 2. model-based extrapolation, 3. pre-step input optimization. The proposed coupling method shows improved stability and accuracy for the case of utilizing exact partial derivatives. The further investigation of the effect of approximations errors in the interface-jacobians, arising from the system identification, indicates that for the continuous-time method the stability is as good as with exact partial derivatives. For the discrete-time method a modified version, the input optimization is replaced, shows also satisfying stability behavior. Summarizing one can say that the utilization of system identification algorithms,

124

S. Genser and M. Benedikt

to approximate the mandatory interface-jacobians, has some minor influence to the accuracy but the stability of the method is given up to the shannon-border for the communication step size.

5

Future Work

Future work will focus on a sensitivity analysis including all main steps of the proposed method, for the continuous-time and the discrete-time version. The extension of the method to handle hybrid subsystem, which consist of events, will be a focus in the future. The validation of the proposed method will be carried out by an industrial use case. Remark Patent The presented work describes an extension to a novel coupling approach for cosimulation of distributed dynamical subsystems. Protected by a pending European patent [5] the outlined schemes are supported by the co-simulation platform Model.CONNECTTM [4] from AVL. Acknowledgements. The publication was written at VIRTUAL VEHICLE Research Center in Graz, Austria. The authors would like to acknowledge the financial support of the COMET K2 – Competence Centers for Excellent Technologies Programme of the Federal Ministry for Transport, Innovation and Technology (bmvit), the Federal Ministry for Digital, Business and Enterprise (bmdw), the Austrian Research Promotion Agency (FFG), the Province of Styria and the Styrian Business Promotion Agency (SFG).

References 1. Oppenheim, A.V., Schafer, R.W.: Discrete-Time Signal Processing. Prentice-Hall Inc., New Jersey (1999) 2. Arnold, M.: Multi-rate time integration for large scale multibody system models. In: IUTAM Symposium on Multiscale Problems in Multibody System Contacts (2006) 3. Arnold, M.: Numerical stabilization of co-simulation techniques, the ODE case. Martin Luther University Halle-Wittenberg NWF II-Institute of Mathematics (2011) 4. AVL: Model.CONNECTTM , the neutral model integration and co-simulation platform connecting virtual and real components. http://www.avl.com/-/modelconnect- (2018). Accessed 31 Jan 2018 5. Benedikt, M., Genser, S.: Pre-step co-simulation method and device (filed) (2018) 6. Benedikt, M., Watzenig, D., Hofer, A.: Modelling and Analysis of the Noniterative Coupling Process for Cosimulation. Taylor & Francis, Didcot (2013) 7. Benedikt, M., Hofer, A.: Guidelines for the application of a coupling method for non-iterative co-simulation. In: IEEE, 8th Congress on Modelling and Simulation (EUROSIM), Cardiff Wales (2013) 8. Blochwitz, T.E.A.: Functional mockup interface 2.0: The standard for tool independent exchange of simulation models. In: 9th International Modelica Conference Munich (2012)

A Pre-step Stabilization Method for Non-iterative Co-simulation

125

9. Busch, M.: Zur Effizienten Kopplung von Simulationsprogrammen. Ph.D. thesis, University Kassel (2012) 10. Dorf, R.C., Bishop, R.H.: Modern Control Systems, 13th edn. Pearson, USA (2017) 11. Genser, S., Benedikt, M.: Model-based pre-step stabilization method for noniterative co-simulation. IMSD, Tecnico Lisboa (2018) 12. Genser, S., Benedikt, M.: Extension of the model-based pre-step stabilization method for non-iterative co-simulation - including direct-feedthrough. In: Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications - volume 1: SIMULTECH, pp. 223–231. INSTICC, SciTePress (2018). https://doi.org/10.5220/0006848002230231 13. Katayama, T.: Subspace Methods for System Identification, 1st edn. SpringerVerlag, London (2005) 14. Kuebler, R., Schiehlen, W.: Modular Simulation in Multibody System Dynamics. Kluwer Academic Publishers, Dordrecht (2000) 15. Ljung, L.: System Identification: Theory for the User PTR Prentice Hall Information and System Sciences Series, 2nd edn. Prentice Hall, New Jersey (1999) 16. Overschee, P.V., Moor, B.D.: Subspace Identification for Linear Systems, 1st edn. Kluwer Academic Publishers, London (1996) 17. Sadjina, S., Kyllingstad, L., Skjong, S., Pedersen, E.: Energy conservation and power bonds in co-simulations: non-iterative adaptive step size control and error estimation. arXiv preprint arXiv:1602.06434 (2016) 18. Sicklinger, S., Belsky, V., Engelmann, B.: Interface-jacobian based co-simulation. NAFEMS World Congress 2013 (2013) 19. Trnka, P.: Subspace Identification Methods (2005) 20. Viel, A.: Implementing stabilized co-simulation of strongly coupled systems using the functional mock-up interface 2.0. In: 10th International Modelica Conference, Lund, Sweden (2014)

A Heating Systems Application of Feedback Linearization for MTI Systems in a Tensor Framework Kai Kruppa(B) and Gerwald Lichtenberg University of Applied Sciences, Ulmenliet 20, 21033 Hamburg, Germany {kai.kruppa,gerwald.lichtenberg}@haw-hamburg.de

Abstract. Input-affine nonlinear systems are known to be feedback linearizable, i.e. the closed loop shows a predefined linear behaviour. The nonlinear control law can be computed symbolically by Lie derivatives calculus with the help of a state space model of the plant. In applications, this can lead to problems, because the complexity of the controller is not predefined by the order of the system, but depends on the structure of the nonlinear terms of the model. It was shown that this is not true for the multilinear subclass of input-affine nonlinear systems, where only the order of the model determines the complexity of the controller. Moreover, models and controllers can be represented as parameter tensors, which makes modern tensor decomposition methods also applicable. The paper shows how this tensor framework of Multilinear Time-Invariant (MTI) Systems can be used for the design of a feedback linearizing controller for a heating system. Keywords: Feedback linearization · MTI systems decomposition methods · Polynomial methods

1

· Tensors

Introduction

Control applications are getting more and more complex nowadays. This has many reasons, some of these are: – performance requirements are often increased next to physical limits, – standard linear control methods are no longer sufficient to fulfill the requirements, – dependency is growing by interconnections of systems via information networks. Control theory has developed many methods to cope with these problems, e.g. model predictive (MPC) or optimal control, [4,8,18,20]. But whenever the This work was partly sponsored by the project OBSERVE of the Federal Ministry of Economic Affairs and Energy, Germany (Grant No.: 03ET1225B). c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 126–152, 2020. https://doi.org/10.1007/978-3-030-35944-7_7

A Heating Systems Application of Feedback Linearization for MTI Systems

127

system dynamics has notable nonlinearities, these methods tend to get complex and nice properties like convexity of the underlying mathematical problems vanish for general cases, [12]. As the majority of modern controllers are implemented digitally, the resources needed on any platform play a major role. Besides the memory usage, a low and predictable runtime is a major issue to be able to enforce necessary sampling times. For linear systems and controllers, runtimes usually are predictable small and scale with the order of the system: linear in the easiest parallel case or at maximum quadratic in the fully interconnected. This is not the case in nonlinear control, e.g. for generalized nonlinear MPC, runtimes are not predictable at all. Feedback linearization is another well known nonlinear control method but with predictable runtimes, which makes it remarkable better applicable, [10]. But for the general case, the complexity of the controller depends on the nonlinearities of the model of the plant and does not scale with the order alone. Moreover, the controller contains nonlinear functions of the same kind as the plant model, e.g. trigonometric or exponential functions. This often causes problems for implementations to platforms where double-precision arithmetics is not standard but integer. One key to solve these problems is to restrict the class of possible plant models - in the direction but not down to linear. There are e.g. approches for bilinear systems known for decades, which have been extended in the last years to the class of Multilinear Time-Invariant (MTI) Systems, [5,23]. MTI systems are suitable, e.g. for heating systems or chemical systems that are modeled by mass or power balances - which is not adequately representable by bilinear systems alone, [23]. Even though the latter systems have no inherent multilinear structure, it was shown that the system behavior can be approximated adequately by an MTI model, [16]. The class of linear parameter-varying (LPV) systems sounds like another example, but is not, because for general parameter variations, this class contains the general nonlinear systems at well, [9]. In this paper a feedback linearization method for MTI systems without symbolic computations introduced in [15] is applied to a specific plant. All system parameters are stored as canonical polyadic (CP) decomposed tensors, [21,22]. The controller law can be computed by standard tensor techniques, [2,13] as all essential arithmetic operations: multiplication, differentiation and Lie derivatives are derived here based on operational tensors. This opens the application domain to complex nonlinear control problems as storage and runtime resources are predictable and by using tensor decompositions, even large scale MTI systems are becoming feedback linearizable by easy operations. The paper is organized as follows. Sections 2, 3 and 4 give an introduction to tensor algebra, MTI systems and feedback linearization respectively. Section 5 derives the computation of multiplication, differentiation and Lie derivatives of polynomials based on operational tensors. These methods are used in Sect. 6 to compute a feedback linearizing control law for MTI systems that are CP decomposed. A complexity analysis is provided in Sect. 7. A heating system example shows the validity of the approach in Sect. 8. In Sect. 9 conclusions are drawn.

128

2

K. Kruppa and G. Lichtenberg

Tensor Algebra

This paper focusses on a subclass of polynomial systems. State space models of MTI systems can be represented in a tensor framework. The following definitions for tensors can be found in [2] or [13]. Definition 1 (Tensor). A tensor of order n X ∈ RI1 ×I2 ×···×In is an n-way array. Elements x(i1 , i2 , . . . , in ) are indexed by ij ∈ {1, 2, . . . , Ij } in each dimension j = 1, . . . , n. Here only real domains R are assumed because the numbers result from real physical parameters, although this framework has been developed for complex domain C. A Matlab-like tensor notation is used here. Several arithmetic operations are available for tensor computations, some are given here. Definition 2 (Outer product). The outer product Z = X ◦ Y ∈ RI1 ×I2 ×···×In ×J1 ×J2 ×···×Jm ,

(1)

of two tensors X ∈ RI1 ×I2 ×···×In and Y ∈ RJ1 ×J2 ×···×Jm is a tensor of order n + m with elements z(i1 , . . . , in , j1 , . . . , jm ) = x(i1 , . . . , in )y(j1 , . . . , jm ).

(2)

Since the outer product is associative, it can be applied in sequence denoted by N

 Xi = X1 ◦ X2 ◦ · · · ◦ XN .

i=1

Definition 3 (Contracted Product). The contracted product of two tensors X and Y of dimensions I1 × · · · × In × In+1 × · · · × In+m and I1 × · · · × In  X | Y  (k1 , . . . , km ) =

I1  i1 =1

···

In 

x(i1 , . . . , in , k1 , . . . , km )y(i1 . . . in ),

(3)

in =1

with ki ∈ {1, 2, . . . , In+i }, i = 1, . . . , m, is a tensor of dimension In+1 × · · · × In+m . Definition 4 (k-mode Product). The k-mode product of a tensor X ∈ RI1 ×···×IN and a matrix W ∈ RJ×Ik is a tensor Y = X ×k W ∈ RI1 ×···×Ik−1 ×J×Ik+1 ×IN . An element of the resulting tensor is given by y(i1 , . . . , ik−1 , j, ik+1 , . . . , iN ) =

Ik  ik =1

x(i1 , . . . , iN )w(j, ik ).

(4)

A Heating Systems Application of Feedback Linearization for MTI Systems

129

For tensors, the number of elements increases exponentially with the order, such that they have a very high memory demand. The complexity can be reduced significantly by decomposition methods. Many tensor decomposition techniques have been developed during the last decades, [6]. In this paper the canonical polyadic (CP) decomposition is used because it is suitable for representation of MTI systems, [17]. A tensor is factorized to a sum of rank 1 elements in CP decomposition. Definition 5 (Rank 1 Tensor). A nth order tensor X ∈ RI1 ×···×In is a rank 1 tensor if it can be computed by the outer product of n vectors xi ∈ RIi n

X =  xi .

(5)

i=1

Definition 6 (CP Tensor). A canonical polyadic (CP) tensor of dimension I1 × · · · × In reads K = [X1 , X2 , . . . , Xn ] · λ = =

r  k=1 r 

λ(k)X1 (:, k) ◦ · · · ◦ Xn (:, k) n

λ(k)  Xi (:, k),

k=1

(6)

i=1

where elements are computed by the sums of the outer products of the column vectors of so-called factor matrices Xi ∈ RIi ×r , weighted by the elements of the so-called weighting or parameter vector λ. An element of the tensor K is given by k(i1 , . . . , in ) =

r 

λ(k)x1 (i1 , k) · · · xn (in , k).

(7)

k=1

The rank of the CP tensor is defined as the minimal number of rank 1 tensors that are summed up in (6) to get K, [3]. Example 1. A 3rd order CP tensor is given by K = [X1 , X2 , X3 ] · λ =

r 

λ(k)X1 (:, k) ◦ X2 (:, k) ◦ X3 (:, k).

k=1

The tensor as the sum of outer products of the column vectors Xi (:, k) of the factor matrices is shown in Fig. 1. When tensors are represented in a CP format, standard tensor products like (2) or (3) can be computed very efficiently by simple matrix operations, as e.g. implemented in the Tensor Toolbox, [1] or Tensorlab, [29]. Proposition 1 (Outer Product in CP Form). The outer product Z = X ◦ Y of two CP tensors X = [U1 , . . . , Un ] · λX ∈ RI1 ×···×In ,

(8)

130

K. Kruppa and G. Lichtenberg

= λ(1) K

x3 (:, 1)

x3 (:, r)

+ · · · + λ(r) x2 (:, 1)

x2 (:, r)

x1 (:, 1)

x1 (:, r)

Fig. 1. Third order CP tensor, [15].

Y = [V1 , . . . , Vm ] · λY ∈ RJ1 ×···×Jm ,

(9)

with rX and rY rank 1 components respectively gives Z = [W1 , . . . , Wn+m ] · λZ ∈ RI1 ×···×In ×J1 ×···×Jm ,

(10)

that can be represented in a CP format. The factor matrices and weighting vector are given by Wi = Ui ⊗ 1TrY , ∀ i = 1, . . . , n, Wn+i =

1TrX

⊗ Vi , ∀ i = 1, . . . , m,

λZ = λX ⊗ λY ,

(11) (12) (13)

with 1k denoting a column vector full of ones of length k. Thus, the CP format of Z follows directly from the factors of X and Y. The number of rank 1 components of the resulting tensor Z is rZ = rX rY . The proof of the proposition is given in [15]. Although the CP decomposition (10) is the exact outer product of (8) and (9), it is possible that a decomposition with a lower number rZ < rX rY of rank 1 elements exist. Finding this memory saving representation is an NP-hard problem, [13]. Proposition 2 (Contracted product in CP form). The contracted product z =  X | Y  ∈ RIn+1 of a tensor of order n + 1 X = [U1 , . . . , Un+1 ] · λX ∈ RI1 ×···×In+1 , with arbitrary rank and a nth order rank 1 tensor with the same sizes of the dimensions in the first n modes Y = [v1 , . . . , vn ] ∈ RI1 ×···×In , can be computed based on factor matrices by      z = Un+1 λX  UT1 v1  · · ·  UTn vn , where  denotes the Hadamard (elementwise) product, [23].

(14)

A Heating Systems Application of Feedback Linearization for MTI Systems

131

Proposition 3 (k-mode product in CP form). The k-mode product, [1] Y = X ×k W

(15)

X = [U1 , . . . , Un ] · λX ∈ RI1 ×···×In

(16)

of a nth order tensor

and a matrix W ∈ RJ×Ik is a CP tensor Y = [V1 , . . . , Vn ] · λY

(17)

with weighting vector and factor matrices λY = λX ,  WUi , Vi = Ui ,

3

(18) for i = k, else.

(19)

MTI Systems

Multilinear time-invariant systems have been introduced in [19] or [23]. MTI systems can be realized by state space models with multilinear functions as right hand sides. The overall vector space of the variables of a multilinear function is given by X = X1 × · · · × Xn , with vector spaces Xi , i = 1, . . . , n of each variable. A multilinear mapping h : X → H with vector space H is linear in each argument, i.e. it fulfills the condition h(x1 , . . . , a · x ˜j + b · x ˆj , . . . , xn ) = a · h(x1 , . . . , x ˜j , . . . , xn ) + b · h(x1 , . . . , x ˆj , . . . , xn ),

(20)

˜j , x ˆj ∈ Xj , 1 ≤ j ≤ n, a, b ∈ R, [7]. The coordinate-free for all xi ∈ Xi , x representation of an MTI system results from the use of multilinear functions as right hand side functions of nonlinear state space models. The multilinear mappings are given by f : X × U → X, g : X × U → Y, with state X , input U and output Y space. The multilinearity condition (20) is fulfilled by both mappings. Next, coordinates x ∈ X , u ∈ U and y ∈ Y are defined to describe multilinear functions.

132

K. Kruppa and G. Lichtenberg

Definition 7 (Multilinear Function). A multilinear function h : Rn → R h(x) = αT m(x)

(21)

  n 1 ⊗ ··· ⊗ with coefficient vector α ∈ R2 and monomial vector m(x) = xn   n 1 ∈ R2 is a polynomial in n variables, which is linear, when all but one x1 variable are held constant. Example 2. A multilinear function with 2 variables x1 and x2 is given by ⎞ ⎛ 1  ⎜ x1 ⎟  ⎟ h(x1 , x2 ) = αT m(x1 , x2 ) = α1 α2 α3 α4 ⎜ ⎝ x2 ⎠ x1 x2 = α1 · 1 + α2 · x1 + α3 · x2 + α4 · x1 x2 . Introduction of coordinates leads to the state space representation of MTI systems that can be written in a tensor structure. The multilinear monomials can be rearranged in a tensor framework. The monomial tensor         1 1 1 1 ,..., , ,..., , (22) M (x, u) = u1 xn x1 um (n+m)

2 of dimension R× is rank one.1 The tensor representation of an MTI system follows from rearranging its parameters in the same way than the monomial tensor.

Definition 8 (MTI System in Tensor Form). Using the monomial tensor (22), the tensor representation of an MTI system with n states, m inputs and p outputs reads x˙ =  F | M (x, u)  ,

(23)

y =  G | M (x, u)  ,

(24)

with the transition tensor F ∈ R× (n+m) 2×p . R×

(n+m)

2×n

and the output tensor G ∈

n+m times

  

1

The notation R

×

(n+m)

2

denotes the space R

2×...×2

.

A Heating Systems Application of Feedback Linearization for MTI Systems

133

Example 3. The state equation of an MTI system with two states is given by 

x˙ 1 x˙ 2



 =  F | M (x1 , x2 )  = f (1,1,2)

=

f (1,1,1) f (2,1,2) f (2, 1, 1)

=

       1 1 F  , x2 x1

f (1,2,2) f (1,2,1)

1

x1

x2

x1 x2

f (2, 2,2) f (2,2,1)

  f (1,1,1)+f (1,2,1)x1 +f (2,1,1)x2 +f (2,2,1)x1 x2 . f (1,1,2)+f (1,2,2)x1 +f (2,1,2)x2 +f (2,2,2)x1 x2

The number of parameters of an MTI system given by the numbers of elements in the tensors F and G increases exponentially with the numbers of states and inputs, i.e. the transition tensor F contains n · 2n+m elements. When dealing with large models, this leads to problems in memory demand. To reduce the complexity of high dimensional models, decomposition methods can be used. Therefore, a CP decomposition of the parameter tensors F = [Fum , . . . , Fu1 , Fxn , . . . , Fx1 , FΦ ] · λF ,

(25)

G = [Gum , . . . , Gu1 , Gxn , . . . , Gx1 , GΦ ] · λG ,

(26)

is desired, which can be found for every MTI system, [14]. During simulation, by using (14), the contracted product of the CP decomposed MTI system (23) and (24) can be computed very efficiently, since the monomial tensor is a rank one tensor. Example 4. For an MTI system with two states and state equation   3x2 − 4x1 x2 , x˙ = −x1 + 9x2 − 2x1 x2 u1 the transition tensor F = [Fu1 , Fx2 , Fx1 , FΦ ] · λF is constructed by the factor matrices and the weighting vector     10010 00100 , Fx2 = , Fx1 = 01101 11011     11110 11000 , FΦ = , Fu1 = 00001 00111  T λF = 3 −4 −1 9 −2 .

134

4

K. Kruppa and G. Lichtenberg

Feedback Linearization

This section highlights the most important features of feedback linearization as described in [10] or [12]. The main idea of this method is to design a state feedback controller for an input affine nonlinear plant such that the reference behavior in closed loop from reference input r to output y is linear as shown in Fig. 2. r

y

u

Controller

Plant

x

Fig. 2. Closed loop state feedback, [15].

Consider a nonlinear, input affine, single-input single-output (SISO) system x˙ = a(x) + b(x)u,

(27)

y = c(x),

(28)

with nonlinear functions a, b : R → R and output function c : R → R. It is assumed that the functions are sufficiently smooth, which means that all later appearing partial derivatives of the functions are defined and continuous, [12]. A nonlinear state feedback controller is constructed by, [10] n

− u=

n

ρ sys i=0

n

μi Lia c(x) + μ0 r ρ

Lb Lasys

−1

c(x)

,

(29)

such that the closed loop shows a linear behavior from r to y prescribed by the linear differential equation ∂ ρsys ∂ ρsys −1 y + μ y + . . . + μ1 y˙ + μ0 y = μ0 r. (30) ρ −1 sys ∂tρsys ∂tρsys −1 The factor μρsys is set to one without loss of generality. The relative degree ρsys is defined by μρsys

Lb Lia c(x) = 0 ∀ x, 0 ≤ i ≤ ρsys − 2, ρ −1 Lb Lasys c(x)

= 0 ∀ x.

(31) (32)

The Lie derivative of a scalar function g(x) along a vector field h(x) is defined as, [10] Lh g(x) =

n  i=1

hi (x)

∂g(x) . ∂xi

(33)

The term Lh · · · Lh g(x) = Lih g(x) denotes an i-times application of the Lie derivative to a function.

A Heating Systems Application of Feedback Linearization for MTI Systems

5

135

Arithmetic Operations for Polynomials

To determine the Lie derivatives, multiplication and differentiation of functions have to be computed. In the following, these arithmetic operations are investigated, for the case that the functions are polynomial and given in terms of a tensor structure by a contracted product of a parameter and a monomial tensor. A multilinear function (21) in tensor representation is written as h(x) =  H | M (x)  .

(34)

The multiplication of two multilinear functions is not a multilinear function anymore, since in general higher order terms occur in the result. Because of that, a representation of higher order polynomials in the tensor structure has to be introduced. Definition 9 (Polynomial in Tensor Form). A polynomial with maximal order N of the monomials in n variables x ∈ Rn is given by    h(x) = H  MN (35) p (x) , (nN )

(nN )

2 × 2 with parameter tensor H ∈ R× and the monomial tensor MN , p (x) ∈ R which is constructed as rank 1 tensor, analogous to (22), by         N 1 1 1 1 N Mp (x) =  M (x) = . (36) ,··· , ,··· , ,··· , x x x x n 1 n 1 j=1    N times

A maximal order N of the monomials means that variables with exponents up to N , i.e. xN i could occur. Obviously by construction some monomials appear multiple times inside the monomial tensor. This choice of the monomial tensor, which is not unique, is not optimal regarding the storage effort but helps developing the algorithms. Since the monomial tensor is a rank 1 tensor, this redundancy is still acceptable. With this tensor representation of multilinear and polynomial functions, the aim here is to compute the parameter tensor of the result of multiplication and differentiation, just by using the parameter tensors of the operands, without evaluating the contracted product with the monomial tensor. 5.1

Multiplication

Definition 9 allows to derive the multiplication based on the parameter tensors. Proposition 4 (Multiplication in tensor form). The multiplication of two polynomials in n variables of orders N1 and N2 in tensor representation    1 h1 (x) = H1  MN (37) p (x) ,  N   2 h2 (x) = H2  Mp (x) , (38)

136

K. Kruppa and G. Lichtenberg

with parameter tensors Hi ∈ R× ×(nNi ) 2

R

(nNi ) 2

i and monomial tensors MN p (x) ∈

, i = 1, 2,    1 +N2 h1 (x) · h2 (x) = H1 ◦ H2  MN (x) , p

(39)

is a polynomial of order N1 + N2 . The proposition is proven in [15]. If the parameter tensors H1 and H2 are given as CP tensors, the parameter tensor of their product is efficiently computed by (10)–(13) in this representation. Thus it is not required to build the full tensors of H1 and H2 . Example 5. In this representations

example

two

multilinear

functions

with

tensor

   1 0  1 x1 , (40) h1 (x1 , x2 ) = 1 + 2x1 x2 =  H1 | M (x1 , x2 )  = 0 2  x2 x1 x2     0 1  1 x1 . h2 (x1 , x2 ) = x1 − 3x1 x2 =  H2 | M (x1 , x2 )  = 0 −3  x2 x1 x2 (41) 

are multiplied, leading to h(x1 , x2 ) =  H1 | M (x1 , x2 )   H2 | M (x1 , x2 )     = H1 ◦ H2  M2p (x1 , x2 ) . The result of the multiplication is a polynomial of maximal order 2 as shown by the monomial tensor M2p (x1 , x2 ) of the result. Computing the outer product H = H1 ◦ H2 gives the parameter tensor of the result with slices     00 10 H(:, :, 1, 1) = , H(:, :, 1, 2) = , 00 02     00 −3 0 H(:, :, 2, 1) = , H(:, :, 2, 2) = . 00 0 −6 The evaluation of the parameter tensor H1 ◦ H2 of the multiplication and the monomial tensor gives    h(x) = H  M2p (x) = x1 − 3x1 x2 + 2x21 x2 − 6x21 x22 , which shows that the tensor representation of the result is computed correctly. 5.2

Differentiation

This section investigates the computation of the partial derivative of a polynomial in tensor representation (35) with respect to one variable xj .

A Heating Systems Application of Feedback Linearization for MTI Systems

137

Proposition 5 (Differentiation in Tensor Form). The partial derivative of a polynomial in n variables of maximal monomial order N with respect to one variable xj , j = 1, . . . , n in tensor representation is given by     ∂ ∂   N H Mp (x) = Hj  MN h(x) = p (x) , ∂xj ∂xj

(42)

with the parameter tensor of the differentiated function and Θ = ( 00 10 ) Hj =

N 

H ×kn−j+1 Θ ∈ R×

nN

2

.

(43)

k=1

The proof of the proposition can be found in [15]. Assuming the parameter tensor H is in CP form as desired, the CP representation of Hj is constructed using the factors of H only, without building the full tensors, since the k-mode product is defined for CP tensors as given in Proposition 3. Example 6. Consider a polynomial with 2 variables   12 h(x) = 1 + 2x1 + 3x2 + 6x1 x2 =  H | M (x)  = 36

   1 x1  .  x2 x1 x2

With (43) the parameter tensor of the differentiated function with respect to x1 reads   20 , H1 = H ×2 Θ = 60 which describes the function ∂ h(x) =  H1 | M (x)  = 2 + 6x2 . ∂x1 The 2-mode multiplication with Θ maps the elements of H belonging to the monomials x1 and x1 x2 to the monomials 1 and x2 . All others are zero, which is exactly the case when differentiating this function with respect to x1 . The parameter tensor      T 1100 1010 H= , · 1236 0011 0101 can be given in a CP tensor structure. The CP format of the differentiated function          T  T 1100 10 0101 11 , , · 1236 = · 26 , H1 = 0011 01 0000 00 is computed by multiplying the second factor matrix from the right by Θ. The number of rank 1 components can be reduced by removing the zero columns of the factor matrices to get a more efficient CP tensor representation.

138

5.3

K. Kruppa and G. Lichtenberg

Lie Derivatives

For the case that polynomials are given in CP form    h(x) = H  MN p (x) ,    g(x) = G  MN p (x) ,

(44) (45)

the multiplication and differentiation methods (39) and (42) are used to compute the Lie derivative (33). Theorem 1 (Lie Derivative in Tensor Form). The tensor representation of the Lie derivative (33) of the scalar polynomial (45) along the polynomial vector field (44) yields     Llh g(x) = LH,G,l  MpN (l+1) (x) . (46) with the parameter tensor ⎧ G ⎪ ⎪ ⎪ ⎪ N  ⎪ n ⎨  Hi ◦ G ×kn−i+1 Θ LF,G,l = i=1 ⎪ k=1   ⎪ ⎪ n lN  ⎪ ⎪ ⎩ Hi ◦ LF,G,l−1 ×kn−i+1 Θ i=1

for l = 0, for l = 1, else,

k=1

with subtensor Hi = H(:, . . . , :, i), where the last dimension of H is fixed. In [15] the proof of the theorem is given. Example 7. The vector function   h1 (x1 , x2 ) h(x1 , x2 ) = =  H | M (x1 , x2 )  h2 (x1 , x2 ) composed of polynomials (40) and (41) has a parameter tensor     10 0 1 H1 = H(:, :, 1) = , H2 = H(:, :, 2) = . 02 0 −3 The first Lie derivative Lh g(x) of the scalar function   0 0 g(x) = x2 − x1 x2 =  G | M (x)  = 1 −1

   1 x1  ,  x2 x1 x2

along the vector field h(x) should be computed by operational tensors. For comparison the Lie derivative with the standard approach (33) gives ∂ ∂ g(x) + h2 (x) g(x) ∂x1 ∂x2 = x1 − x2 − 3x1 x2 − x21 + 3x11 x2 − 2x1 x22 .

Lh g(x) = h1 (x)

(47)

A Heating Systems Application of Feedback Linearization for MTI Systems

139

With the method introduced in Theorem 1 the parameter tensor of the Lie derivative LH,G,1 = H1 ◦ (G ×2 Θ) + H2 ◦ (G ×1 Θ) , results in a fourth order tensor     0 1 0 −1 , LH,G,1 (:, :, 1, 2) = , 0 −3  0 3 −1 0 00 LH,G,1 (:, :, 2, 1) = , LH,G,1 (:, :, 2, 2) = . 0 −2 00

LH,G,1 (:, :, 1, 1) =

From (46) follows that the monomial tensor M2p (x1 , x2 ) for the Lie derivative is of maximal order 2. Evaluating the contracted product of the parameter tensor  with the monomial tensor LH,G,1  M2p (x1 , x2 ) shows that the result with the operational tensor is equal to (47). Thus, the parameter tensor is computed correctly. With the definition of the Lie derivative (46) in tensor representation, a related operation, the Lie brackets, can be described in a similar way, that is also important in the design of feedback linearizing controllers. The Lie bracket of two vector functions h(x) and g(x) is given by, [10] [h, g] = where

∂h(x) ∂x

and

∂h(x) ∂g(x) h(x) − g(x) = Lh g(x) − Lg h(x), ∂x ∂x

∂g(x) ∂x

(48)

are the Jacobian matrices of h(x) and g(x) respectively.

Lemma 1 (Lie bracket). Rn → Rn

The Lie bracket of two vector functions h, g :    h(x) = H  MN p (x) ,    g(x) = G  MN p (x) , (nN )

2×n in n variables with parameter tensors H ∈ R× and G ∈ R× given by    [h, g] = LH,G,1 − LG,H,1  M2N p (x) .

(nN )

2×n

, is

The proof of the lemma is given in the Appendix. This can be extended to the multiple application of the Lie bracket. For the repeated Lie bracket [h, [h, . . . [h, g]]] of the vector field g(x) with the same vector field h(x) the recursive notation  k+1 !  k   adkh g(x) = h, adk−1 (x) , (49) h g (x) = Ladh g Mp is used with k ≥ 1. The term ad0h g(x) gives g(x).

140

6

K. Kruppa and G. Lichtenberg

Feedback Linearization for CP Decomposed MTI Systems

The controller design by feedback linearization introduced in Sect. 4 is investigated in this section for MTI systems with CP decomposed parameter tensors. An input affine SISO MTI system is given by x˙ = a(x) + b(x)u =  F | M(x, u)  =  A | M(x)  +  B | M(x)  u,

(50)

y = c(x) =  G | M(x, u)  =  C | M(x)  .

(51)

It is assumed that the system is controllable, observable and feedback linearizable with well-defined relative degree ρsys . To compute the Lie derivatives of the multilinear model functions in tensor form Theorem 1 is used. This leads to the following lemma. Lemma 2 (MTI System Lie Derivatives). The Lie derivative (33) of the multilinear output function given by tensor C along the multilinear vector field a(x) given by tensor A yields Lla c(x)

=

n 

ai (x)

i=1

   ∂ l−1 La c(x) = LA,C,l  Ml+1 (x) , p ∂xi

with parameter tensor ⎧ C ⎪ ⎪ ⎪ n ⎪ ⎨ A ◦ (C × Θ) LA,C,l = i=1 i  n−i+1  ⎪ ⎪ n l   ⎪ ⎪ ⎩ Ai ◦ LA,C,l−1 ×kn−i+1 Θ i=1

(52)

for l = 0, for l = 1, else,

k=1

with l = 0, . . . , ρsys and subtensor Ai = A(:, . . . , :, i) of A. Using the parameter tensor " l+1 # n   Bi ◦ LA,C,l ×kn−i+1 Θ , LB,A,C,l = i=1

(53)

k=1

with Bi = B(:, . . . , :, i), the Lie derivatives along b(x) are given by Lb Lla c(x) =

n  i=1

bi (x)

   ∂ l La c(x) = LB,A,C,l  Ml+2 (x) . p ∂xi

(54)

The representations of the Lie derivatives of the system (50) and (51) follows obviously from Theorem 1. No full tensor has to be build during computation of the Lie derivatives, since all operations, i.e. summation, outer product and

A Heating Systems Application of Feedback Linearization for MTI Systems

141

k-mode product, used to get the parameter tensors of the Lie derivatives are introduced for CP tensors. This is important especially for large scale systems. With the tensor description of the Lie derivatives given in Lemma 2 the controller law for feedback linearization can be constructed. Lemma 3 (MTI Feedback Linearization). The feedback linearizing controller for an input affine MTI system given by (50) and (51) reads   ρsys    ρsys +1 μi LA,C,i  Mp (x) + μ0 r − i=0    u= , (55)  ρ +1 LB,A,C,ρsys −1  Mpsys (x) when the Lie derivatives are defined by parameter tensors as in Lemma 2. The proof of the previous lemma is described in [15]. Thus, the feedback linearizing controller has got a fixed structure. To adapt the controller for a given plant, the factors μi and tensors LA,C,i and LB,A,C,ρsys −1 have to be provided. Setting these parameters is like setting a static state feedback gain matrix for pole placement in the linear case. The structure of the controller for MTI systems is fixed and does not depend on the plant. This structural invariance is an advantage for application of the controller. Compared to the general nonlinear case it is not necessary to provide an arbitrary set of mathematical operations, that depends on the plant model. Here it is limited to the given structure and the operations can be defined efficiently on the coefficient spaces. Example 8. In this example the proposed method for feedback linearization is applied to a SISO, MTI system with 2 states to give all steps of the design procedure explicitly. Consider the system       2x2 0 x˙ 1 = + u, x˙ 2 −x1 + 0.2x1 x2 1 y = 1 + 2x1 . The systems belongs to the class of input affine MTI systems (50) and (51) where the factor matrices are represented as CP tensors ⎛ ⎞       2 010 100 100 A= , , · ⎝−1⎠ , 101 011 011 0.2       1 1 0 B= , , · 1, 0 0 1       11 01 2 C= , · . 00 10 1 The Lie derivatives of the system must be derived to design the controller. Using (52) the parameter tensors of the Lie derivatives along a(x) in CP format are given by

142

K. Kruppa and G. Lichtenberg

LA,C,1 LA,C,2

        0 1 1 1 = , , , · 4, 1 0 0 0               10 00 11 11 11 11 −4 = , , , , , · , 01 11 00 00 00 00 0.8

resulting in the derivatives  La c(x) = LA,C,1  L2a c(x) = LA,C,2

 2  Mp = 4x2 ,  3  Mp = −4x1 + 0.8x1 x2 .

The Lie derivatives along b(x) lead to Lb c(x) = 0 and Lb La c(x) = 4 with parameter tensors (53)         0 0 0 0 , , , · 0, LB,A,C,0 = 0 0 0 0             1 1 1 1 1 1 , , , , , · 4. LB,A,C,1 = 0 0 0 0 0 0 Because of Lb La c(x) = 4 = 0 ∀x the relative degree ρsys of the system is two, which is equal to the number of states. Thus the system has full degree and the zero dynamics needs not to be checked. Additionally the system is controllable and observable. The linear behavior μ2 y¨ + μ1 y˙ + μ0 y = μ0 r is desired in closed loop. As an example μ1 = μ0 = 10 and μ2 = 1 are chosen. Using the parameter tensors of the Lie derivatives, the feedback linearizing controller is given by    − μ0 C + μ1 LA,C,1 + μ2 LA,C,2  M3p (x) + μ0 r    u= LB,A,C,1  M3p (x) 10 + 16x1 + 40x2 + 0.8x1 x2 + 10r . 4  T The closed loop simulation result with x0 = −0.5 0 for a step change in reference signal r is shown in Fig. 3. The system behaves as the specified 2nd order linear system. =−

The parameter tensors A, B and C of the system can be used to check if the system is feedback linearizable with relative degree ρsys = n. The conditions for feedback linearizability of [10] are adapted to the MTI case here. Lemma 4 (Feedback Linearizability of MTI Systems). An affine MTI system is feedback linearizable with relative degree n at the point x0 , if the following conditions hold

A Heating Systems Application of Feedback Linearization for MTI Systems 3

143

r y

2 1 0

0

2

4

6

8

10

12

14

Time [s]

Fig. 3. Closed loop simulation, [15].

i. Rank condition rank

$

 % T  Mnp (x0 ) =n

with tensor T(:, . . . , :, k) = Lk−1 ada b and k = 1, . . . , n containing the parameters of the Lie brackets (49) with respect to the monomial tensor Mnp (x0 ), ' & b ii. Involution condition for the distribution span b, ada b, . . . , adn−2 a  % $ $  %  (x0 ) = rank T1  Mn−1 (x0 ) , rank T2 (:, . . . , :, i, j)  M2(n−1) p p for all i and j = 0, . . . , n − 2 with tensors T1 (:, . . . , :, k) = Lk−1 ada b , k = 1, . . . , n − 1,  Lk−1 k = 1, . . . , n − 1, ada b , T2 (:, . . . , :, k, i, j) = k = n, Li,j ,  with

  !  2(n−1) (x0 ) denoting the Lie bracket adia b, adja b (x0 ). Li,j  Mp

If these conditions are met, there exists an output function, such that the system has relative degree n. The proof of the Lemma 4 is given in the Appendix.

7

Complexity Analysis

In today’s applications systems get more and more complex, like in smart grids or heating systems. Plants in these application areas can be modeled by MTI systems with a large number of states. These models can capture very complex dynamics with dense parameter tensors. But a large order n leads to a very large number of system parameters in full representations. Also in a symbolic representation the number of terms increases exponentially with the number of states. Thus, for large scale systems a system description is impossible because

144

K. Kruppa and G. Lichtenberg

Fig. 4. Number of parameter for MTI systems, [15].

of curse of dimensionality. A system of order 100 has got more than 1032 terms in full representation, which does not fit in memory anymore. The state space representation and thus the computation of a controller of such big system is not possible in a symbolical way. Tensor decomposition methods like CP decomposition allow to compute low rank approximations of the parameter tensors. This breaks the curse of dimensionality and allows an approximate representation of large scale systems with a number of parameters that is lower by orders of magnitude. Figure 4 shows in a logarithmic scale how the number of parameters increases with the order of the system and the rank of the parameter tensors. As shown in this paper the application of low rank approximation techniques for parameter tensors, makes it possible to represent large systems and to compute controllers. E.g. the number of values to be stored for a system of order 100 is reduced from 1032 to 6200 for a rank 10 approximation, since the parameters scale linearly with order and rank. No full tensor representation has to be constructed during the whole controller design process since the proposed feedback linearization approach works with the decomposed representations of the system and all operations are defined for CP decomposed tensors. This leads to a controller in a decomposed structure. The storage demand is still capable as shown in Fig. 5, where an upper bound for the number of elements to be stored for the parameter tensors of the controller is depicted. The figure considers different orders and different ranks of the system tensors A, B and C for a system with relative degree of one. The storage effort can be reduced further since the results can be represented by tensors of lower rank in many cases. Also during application the controller law can be evaluated based on the decomposed factor matrices. This makes it possible to use this feedback linearizing scheme also for large scale MTI systems, where the full representation can not processed but low rank approximations exist. This break of the dimensionality problem for large scale systems is the big advantage of the introduced feedback linearization design approach by CP decomposed tensors.

A Heating Systems Application of Feedback Linearization for MTI Systems

145

Fig. 5. Upper bound for number of parameters for a feedback linearizing controller of decomposed MTI systems, [15].

8

Heating System Example

In the following section the tensor based feedback linearization method is applied to a heating system example. In the literature the general feedback linearization approach for nonlinear systems was used for heating or HVAC systems in several applications, [11,25,27,28]. Here one component, a consumer with its mixing circuit, is linearized by the tensor based approach for MTI systems. The thermal behavior is modeled by heat balances as in [22]. All rooms in the heating circuit are summarized to one large zone, where it is assumed, that the air inside the zone is completely mixed with homogeneous room or building temperature Tb . This results in a one zone model for the consumer. The heat demand of the consumer is covered by radiators. The heat transfer from the radiators to the zone air is assumed to be proportional to the difference between the room and the return temperature Tr of the radiators with the heat transfer coefficient krb . The thermal loss to the environment with the ambient temperature To is given proportional to the difference of the room and the ambient temperature with heat transfer coefficient kbo . This leads to the heat balance krb kbo T˙b = (Tr − Tb ) − (Tb − To ), Cb Cb

(56)

where Cb is the heat capacity of the heating circuit. The consumer is supplied with warm water with temperature Ts,HC and flow V˙ HC . Heat is transferred to the building, such that cooled water leaves the radiators at return temperature Tr with rate 1 ˙ krb T˙r = VHC (Ts,HC − Tr ) − (Tr − Tb ) , Vc cρVc

(57)

where Vc is the volume of the water in the consumer with density ρ and specific heat capacity c. The consumer and the heat transfers are illustrated in Fig. 6.

146

K. Kruppa and G. Lichtenberg

To adapt the supply temperature Ts,total of the total supply coming from the boiler to the particular heating circuit, the heating circuit has a three way valve and a pump. The valve allows a return flow addition to reduce the supply temperature for the heating circuit, which is shown in Fig. 7.

Consumer

Ts,HC , V˙ HC

To

Tb , Cb

Tr Tr

Fig. 6. Consumer with heat transfers. ζ Ts,total

ϕ Ts,HC Consumer i

Tr

Fig. 7. Mixing circuit of the consumer.

The three way valve is controlled by a signal ζ ∈ [0, 1] such that the radiators are supplied by the mixing temperature Ts,HC = ζTr + (1 − ζ)Ts,total .

(58)

The flow in the consumer circuit is determined by a controllable pump depending on the input signal ϕ ∈ [0, 1] with maximal flow V˙ max . Since the pump does not react instantaneously on a change in the control signal ϕ, it is modeled as first order system here V˙ max 1 V¨HC = − V˙ HC + ϕ, τV˙ τV˙

(59)

with time constant τV˙ . The flow (1−ζ)V˙ HC leaves the heating circuit with return temperature Tr . Thus, the states of the consumer model are given by  T x = Tr V˙ HC Tb . The input is the pump signal u = ϕ. The room temperature is the output y = Tb of the model. With these state variables the state space model of the consumer follows from (56), (57) and (59)

A Heating Systems Application of Feedback Linearization for MTI Systems

147

Ts,HC 1 krb krb x2 − x1 x2 − x1 + x3 , Vc Vc cρVc cρVc V˙ max 1 u, x˙ 2 = − x2 + τV˙ τV˙ krb −krb − kbo kbo x˙ 3 = x1 + x3 + To , Cb Cb Cb y = x3 ,

x˙ 1 =

where it is assumed that the supply temperature Ts,HC is held constant by the mixing valve. The outside temperatures To is assumed as constant here as well. Inside the state equations the flow is multiplied by the return temperature, which results in a multiplication of two states V˙ HC · Tr = x2 · x1 . Because of that, the model is multilinear. All other terms are linear. Since the system has one input, one output and no multiplications between inputs occur, the model belongs to the class of affine MTI models, that has a tensor representation %   $ %   $   + B  M Tr , V˙ HC , Tb u, x˙ = A  M Tr , V˙ HC , Tb   $ %  y = C  M Tr , V˙ HC , Tb , with parameter tensors A ∈ R2×2×2×3 , B ∈ R2×2×2×3 and C ∈ R2×2×2 described in CP format. For the output, i.e. the building temperature, a reference temperature Tb,ref is given. A feedback linearizing controller is designed, such that the closed loop from Tb,ref to Tb is linear. To design the controller at first the Lie derivatives along a(x) have to be determined with the tensor approach (52) by %   $  , (60) L0a c(x) = C  M Tr , V˙ HC , Tb  $ %   L1a c(x) = A1 ◦ (C ×3 Θ) + A2 ◦ (C ×2 Θ) + A3 ◦ (C ×1 Θ)  M2p Tr , V˙ HC , Tb   $ %  = LA,C,1  M2p Tr , V˙ HC , Tb , (61)  $ %   , (62) L2a c(x) = LA,C,2  M3p Tr , V˙ HC , Tb  $ %   L3a c(x) = LA,C,3  M4p Tr , V˙ HC , Tb , (63) where the parameter tensors follow from (52). With these results, the Lie derivatives along b(x) are computed by operational tensors by (54) with parameter tensors (53) leading to  $ %   = 0, Lb L0a c(x) = LB,A,C,0  M2p Tr , V˙ HC , Tb  $ %   Lb L1a c(x) = LB,A,C,1  M3p Tr , V˙ HC , Tb = 0, Lb L2a c(x) =



 $ % V˙ max krb  = LB,A,C,2  M4p Tr , V˙ HC , Tb (Ts − x1 ) . Cb Vc τV˙

(64)

148

K. Kruppa and G. Lichtenberg

As stated in (31) and (32) it is required for this controller approach, that Lb L2a c(x) is nonzero for this plant with three states. This is the case, if Ts = x1 , which means that the return temperature should not be equal to the supply temperature. That is fulfilled here, if the consumer is operated under nominal conditions, when water flows through the consumer pipes and e.g. no bypasses occur. The consumer has a certain heat demand and thus takes heat from the supply flow, such that the return temperature is reduced compared to the supply temperature. When Lb L2a c(x) = 0 holds, the relative degree of the plant follows from (31) and (32) and is equal to ρsys = 3. The relative degree is equal to the number of states, such that no zero dynamics have to be checked. The desired linear closed loop behavior is given by ... (65) T b + μ2 T¨b + μ1 T˙b + μ0 Tb = μ0 Tb,ref . To determine the pole locations of the linear transfer function following from (65), the MTI consumer model is linearized around an operating point. With the linearization pole locations are determined by a LQR design for linear systems, [4]. The pole locations determined by the LQR design are used then to compute the coefficients of the desired linear behavior (65). The desired linear system behavior was tuned such that it fits to the input constraints for this example scenario. With the linear behavior (65) and the parameter tensors of the Lie derivatives (60) to (64) all parameters of the feedback linearization controller are $ % 3 ˙ defined and can be expressed with respect to the monomial tensor Mp Tr , V , Tb leading to the controller law   $ %  − μ0 C + μ1 LA,C,1 + μ2 LA,C,2 + LA,C,3  M3p Tr , V˙ , Tb + μ0 Tb,ref   $ % u=ϕ= .  LB,A,C,2  M4p Tr , V˙ , Tb (66) The closed loop system is simulated for a step change in the room temperature reference. The simulation result is shown in Fig. 8 with the input signal of the pump computed by the controller and the resulting room temperature. The simulation shows, that the controller works as desired, such that the room temperature follows its reference with the desired closed loop dynamics as given by (65). This shows that the tensor based feedback linearization method derived in Sect. 6 is applicable for plants in the field of heating systems.

Temperature [◦ C]

A Heating Systems Application of Feedback Linearization for MTI Systems

20.5

20

Tb Tb,ref 0

2

4

6

8

10

0.15 Pump signal

149

12

ϕ

0.1 0.05 0

0

2

4

6

8

10

12

Time [h]

Fig. 8. Closed loop simulation result of the consumer and feedback linerization controller.

9

Conclusion and Outlook

This paper shows that it is possible to adapt a general nonlinear control design method to the special structure of MTI systems resulting in a fixed controller structure. The controller design method is based on decomposed tensors, which allows to design controllers for large scale systems where standard feedback linearization design methods cannot be applied. To compute the control law based on the decomposed parameter tensors of the multilinear plant model a fixed set of arithmetic operations: multiplication, differentiation and Lie derivative are necessary only. The operations are derived here based on operational tensors. No symbolic computations are necessary since the operations are defined on the coefficient spaces of the operands. The result is computed numerically leading to the analytically exact solution. Using the tensor based operations, the feedback linearization controller can be computed directly from the parameter tensors of the MTI model representation. All operations work very efficiently with CP decomposed tensors such that no full tensor representation has to be built once the model is given in decomposed format. This leads to a controller of predictable complexity and order with a fixed set of operations: multiplication and summation, that can be computed on standard hardware. By using decomposed tensors the controller design is possible for large scale systems where standard representations are not possible. The application to a heating system example showed the validity of the approach also for real world systems in simulation. The feedback linearization method has been derived for SISO plants assuming no disturbances or model mismatches. If these assumptions are not fullfilled, as it is the case for real buildings this would lead to an additional control error.

150

K. Kruppa and G. Lichtenberg

Therefore the controller approach would have to be extended e.g. for disturbance rejection as proposed in [24]. Furthermore when thinking of real world heating systems, plants often have multiple inputs and multiple outputs, that have to be controlled. This has to be considered in the design method, too. For general nonlinear systems this approach was extended to MIMO systems, [26]. The tensor feedback linearizaton technique for MTI systems has to be adapted to that, which is future work. This paper focusses on the CP decomposition only to describe MTI systems and the controller. In [17] different tensor decomposition methods were investigated and compared for MTI system representation with the result that other decomposed MTI system representations are possible too. This leads to the question if the other decomposition formats could be used to improve the feedback linearization controller design process or representation. Here one possible representation of polynomials by tensors with some nice properties for algorithm development is used. But there exist redundancies in the monomial tensor for higher order polynomials. This representation is not memory efficient, since the redundancies are not necessary for the polynomial description. It is left open here, how a monomial tensor is constructed with less or without redundancies, e.g. by a variable transformation. This would lead to an even more memory efficient polynomial representation and thus opens a wider range of applications.

Appendix Proof (Lie Bracket). The Lie bracket of two vector functions is defined by (48). With Theorem 1 the Lie derivatives of a vector function g(x) along a vector field h(x) and vice versa are written as Lh g(x) =

n 

hi (x)

   ∂ g(x) = LH,G,1  M2N p (x) , ∂xi

gi (x)

   ∂ h(x) = LG,H,1  M2N p (x) . ∂xi

i=1

Lg h(x) =

n  i=1

Inserting this to (48) and rearranging results in [h, g] =



           LH,G,1  M2N − LG,H,1  M2N = LH,G,1 − LG,H,1  M2N . p (x) p (x) p (x)



Proof (Feedback Linearizability). The conditions for an affine SISO system to be feedback linearizable with relative degree of n are given for nonlinear systems in [10]. The matrix   b(x0 ) b ada b(x0 ) · · · adn−1 a must have rank nand can be expressed in the case of an MTI model  n given    in tensor form by T  Mnp (x0 ) . Each repeated Lie bracket Lk−1 ada b Mp (x)

A Heating Systems Application of Feedback Linearization for MTI Systems

151

is described with respect to the monomial tensor of order n and concatenated resulting in T(:, . . . , :, k) = Lk−1 ada b , k = 1, . . . , n. The evaluation of T with the monomial tensor of order n gives the matrix of the Lie brackets      n b(x0 ) . T  Mp (x0 ) = b ada b(x0 ) · · · adn−1 a The matrix should have rank n, which can be easily checked, by evaluation of the contracted product at x0 . The second ' formulation of & condition is the tensor b) is involutive at the condition that the distribution span b, ada b, . . . , adn−2 a x0 . The distribution is involutive if and only if rank

  

b(x0 ) · · · adn−2 b(x0 ) adia b(x0 ), adja b(x0 ) = rank b(x0 ) · · · adn−2 b(x0 ) a a

is fulfilled for all i and j = 0, . . . , n − 2. Describing the two matrices in terms of parameter tensors, like it was done for the rank condition before, leads to the second condition. 

References 1. Bader, B.W., Kolda, T.G., et al.: Matlab tensor toolbox version 2.6, February 2015. http://www.sandia.gov/∼tgkolda/TensorToolbox/ 2. Cichocki, A., Zdunek, R., Phan, A., Amari, S.: Nonnegative Matrix and Tensor Factorizations. Wiley, Chichester (2009) 3. Cichocki, A., Mandic, D.P., Phan, A.H., Caiafa, C.F., Zhou, G., Zhao, Q., Lathauwer, L.D.: Tensor decompositions for signal processing applications from twoway to multiway component analysis. abs/1403.4462 (2014). http://arxiv.org/ abs/1403.4462 4. Dorf, R.C., Bishop, R.H.: Modern Control Systems, 12th edn. Pearson Prentice Hall, Upper Saddle River (2011) 5. Ekman, M.: Modeling and control of bilinear systems: application to the activated sludge process. Ph.D. thesis, Uppsala University (2005) 6. Grasedyk, L., Kressner, L., Tobler, C.: A literature survey of low-rank tensor approximation techniques. GAMM-Mitteilungen 36, 53–78 (2013) 7. Hackbusch, W.: Tensor Spaces and Numerical Tensor Calculus. Springer Series in Computational Mathematics, vol. 42. Springer, Heidelberg (2012) 8. Henson, M.A., Seborg, D.E. (eds.): Nonlinear Process Control. Prentice-Hall, Inc., Upper Saddle River (1997) 9. Hoffmann, C.: Linear parameter-varying control of systems of high complexity. Ph.D. thesis, Technische Universit¨ at Hamburg (2016) 10. Isidori, A.: Nonlinear Control Systems, 3rd edn. Springer, New York (1995) 11. Kang, C.S., Park, J.I., Park, M., Baek, J.: Novel modeling and control strategies for a HVAC system including carbon dioxide control. Energies 7, 3599–3617 (2014) 12. Khalil, K.H.: Nonlinear Systems. Prentice-Hall, Inc., Upper Saddle River (1996) 13. Kolda, T., Bader, B.: Tensor decompositions and applications. SIAM Rev. 51(3), 455–500 (2009)

152

K. Kruppa and G. Lichtenberg

14. Kruppa, K., Lichtenberg, G.: Comparison of CP tensors, tucker tensors and tensor trains for representation of right hand sides of ordinary differential equations. In: Workshop on Tensor Decomposition and Applications, Leuven (2016) 15. Kruppa, K., Lichtenberg, G.: Feedback linearization of multilinear time-invariant systems using tensor decomposition methods. In: 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (2018) 16. Kruppa, K., Pangalos, G., Lichtenberg, G.: Multilinear approximation of nonlinear state space models. In: 19th IFAC World Congress, Cape Town, pp. 9474–9479. IFAC (2014) 17. Kruppa, K.: Comparison of tensor decomposition methods for simulation of multilinear time-invariant systems with the mti toolbox. IFAC-PapersOnLine 50(1), 5610–5615 (2017). 20th IFAC World Congress 18. Lewis, F., Vrabie, D., Syrmos, V.: Optimal Control, 3rd edn. Wiley, Hoboken (2012) 19. Lichtenberg, G.: Tensor representation of Boolean functions and Zhegalkin polynomials. In: International Workshop on Tensor Decompositions, Bari (2010) 20. Maciejowski, J.: Predictive Control with Constraints. Pearson Education Limited, London (2002) 21. M¨ uller, T., Kruppa, K., Lichtenberg, G., R´ehault, N.: Fault detection with qualitative models reduced by tensor decomposition methods. IFAC-PapersOnLine 48(21), 416–421 (2015). 9th IFAC Symposium on Fault Detection, Supervision and Safety for Technical Processes, SAFEPROCESS 22. Pangalos, G.: Model-based controller design methods for heating systems. Dissertation, TU Hamburg, Hamburg (2016). https://doi.org/10.15480/882.1324 23. Pangalos, G., Eichler, A., Lichtenberg, G.: Hybrid multilinear modeling and applications, pp. 71–85. Springer, Cham (2015) 24. Pop, C.I., Dulf, E.H.: Robust feedback linearization control for reference tracking and disturbance rejection in nonlinear systems. In: Recent Advances in Robust Control - Novel Approaches and Design Methods, InTech (2011) 25. Rehrl, J., Horn, M.: Temperature control for HVAC systems based on exact linearization and model predictive control. In: IEEE International Conference on Control Applications (CCA), pp. 1119–1124 (2011) 26. Sastry, S.: Nonlinear Systems: Analysis, Stability, and Control. Interdisciplinary Applied Mathematics. Springer, New York (1999) 27. Semsar-Kazerooni, E., Yazdanpanah, M.J., Lucas, C.: Nonlinear control and disturbance decoupling of HVAC systems using feedback linearization and backstepping with load estimation. IEEE Trans. Control. Syst. Technol. 16(5), 918–929 (2008) 28. Thosar, A., Patra, A., Bhattacharyya, S.: Feedback linearization based control of a variable air volume air conditioning system for cooling applications. ISA Trans. 47(3), 339–349 (2008) 29. Vervliet, N., Debals, O., Sorber, L., Van Barel, M., De Lathauwer, L.: Tensorlab 3.0, March 2016. http://www.tensorlab.net

Syntactic Generation of Similar Pictures Nuru Jingili1 , Sigrid Ewert1(B) , and Ian Sanders2 1 School of Computer Science and Applied Mathematics, University of the Witwatersrand, Johannesburg, Johannesburg, South Africa [email protected], [email protected] 2 School of Computing, University of South Africa, Florida, South Africa [email protected]

Abstract. In visual password systems it is important to display distractor pictures along with the user’s password picture on the authentication screen. These distractors should be similar to the password picture to make it difficult for shoulder surfers to easily identify the true password picture. In this work, we present approaches to generating similar pictures using bag context picture grammars (BCPGs). We describe how these approaches are implemented and present galleries of pictures that have similar characteristics. We then determine the mathematical similarity of the generated pictures, using the spatial colour distribution descriptor (SpCD). The spatial colour distribution descriptor has been shown to be effective in determining the similarity of computer-generated pictures in previous research, and so was seen as a good similarity measure for this research. We then describe an online survey that was conducted to determine the perceptual similarity of the pictures generated by the picture grammars. This is followed by a comparison of perceptual similarity from the survey with mathematical similarity to determine if the results are consistent. The results show that we can easily generate galleries of pictures that we feel are similar (they have common characteristics) using BCPGs; that SpCD can be used to determine the mathematical similarity of the pictures; and that there is a good correlation between SpCD and perceptual similarity, although in some instances humans do make different judgements. In terms of the desired goal of generating pictures that are similar to a selected picture, we found that controlling the level of refinement of the pictures and limiting the number of refinements of subpictures are important factors. Keywords: Syntactic picture generation · Picture grammar · Regulated rewriting · Bag context · Mathematical similarity · Spatial colour distribution descriptor · Perceptual similarity

1

Introduction

Determining picture similarity is a crucial element in many applications that require the comparison of pictures based on different features, like colour, texture, layout, and theme. Applications like search engines, picture database c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 153–180, 2020. https://doi.org/10.1007/978-3-030-35944-7_8

154

N. Jingili et al.

retrieval systems, picture generators and visual password systems are some of the applications that may require determining the degree of similarity of pictures [6,14]. The challenge of many picture retrieval systems is the relationship between the perceptual similarity of pictures, i.e., how humans perceive the similarity, and the mathematical similarity of pictures, i.e., the approaches used in contentbased image retrieval (CBIR) systems. Humans judge the similarity of pictures by considering many features of the pictures under consideration, eg., the colour, semantics, luminance, texture or objects present [12,13,17,18]. Most CBIR systems are based on one or more of these features [3,17]. Mathematically based similarity measures are capable of finding similar pictures. However, people may not find those pictures to be similar. Moreover, different people may have different opinions on the similarity of a given set of pictures. Thus it is important, in some applications, to determine if the mathematical similarity measures on pictures in some set correspond with the human perceptual similarity measures applied to the same set of pictures. Determining picture similarity is very important in our research as we focus on generating similar pictures using random context picture grammars (RCPGs) [4] and bag context picture grammars (BCPGs) [5,9]. An end goal of our work is to generate visual passwords and appropriate distractors, i.e., pictures which are similar to the password picture, for a visual password system. It is thus necessary to evaluate if the generated pictures are mathematically similar. As visual password systems are used by humans, it is important to not only determine how humans perceive the similarity of the generated pictures, but also if the chosen mathematical similarity measure is consistent with the human view of similarity. In Sect. 2, we give background information on picture grammars, in particular BCPGs, on mathematical similarity and perceptual similarity. Then in Sect. 3 we present the methods we used in generating structurally similar pictures using BCPGs. We consider pictures to be structurally similar if they share some characteristics based on how they were generated, eg., the pictures contain the same subpictures or they have been refined the same number of times. We then determine the mathematical similarity of the generated pictures, using the spatial colour distribution descriptor1 (SpCD) [3]. This is discussed in Sect. 4. Subsequently, in Sect. 5, we present the results of an online survey that we conducted to determine how humans perceive the similarity of our generated pictures and to evaluate the relationship between the perceptual similarity and mathematical similarity results. In Sect. 6 we discuss the implications of the work with a focus on what approaches could be used to generate finite galleries of similar pictures (for use in a visual password system). In Sect. 7 we provide the conclusion.

1

The authors used the spelling ‘color’.

Syntactic Generation of Similar Pictures

2 2.1

155

Background Picture Grammars

The pictures used in this study were generated using syntactic methods of picture generation, in particular random context picture grammars and bag context picture grammars. Both grammar classes are context-free grammars with regulated rewriting. In an RCPG, each production rule has two sets of variables, the so-called permitting and forbidding context sets, which regulate the application of the rule during a derivation. Instead of context sets, a BCPG has a k-tuple of integers (where k is a positive integer) called the bag, which regulates the application of rules during a derivation and can change during a derivation. The formal definition of BCPGs is given below. Formal definitions of RCPGs are given in [4,9]. In [5] it was proven that every RCPG can be written as a BCPG. Therefore we focus on BCPGs in this paper. Let N+ = {1, 2, . . .} and Z = {. . . , −2, −1, 0, 1, 2, . . .}. The set Z ∪ {−∞, ∞} is denoted by Z∞ . If I = {1, 2, . . . , k}, then elements of ZI∞ (which includes ZI ) are written as k-tuples. On ZI∞ , addition is defined component-wise in the usual way. Similarly, ≤ denotes component-wise ordering. An element q of Z∞ which occurs in the place of a k-tuple, denotes the k-tuple of the appropriate size with all components equal to q. Let k ∈ N+ . For simplicity, we often write {1, 2, . . . , k} as [k]. Bag context picture grammars generate pictures using productions of the form in Fig. 1, where A is a variable, x11 , x12 , . . . , xmm are variables or terminals for m ∈ N+ , and λ, μ and δ are k-tuples for some k ∈ N+ . The interpretation is as follows: if a developing picture contains a square with the label A and if the bag is within the range defined by the lower limit λ and the upper limit μ of the rule, then the square labelled A may be divided into equal-sized squares with labels x11 , x12 , . . . , xmm and the bag adjusted with δ.

A

−→

xm1

xm2

...

...

...

...

...

x21

x22

...

x2m

x11

x12

...

x1m

Fig. 1. Production in BCPG [9, page 246].

xmm

(λ, μ; δ)

156

N. Jingili et al.

We denote a square by a lowercase Greek letter, eg., (A, α) denotes a square α with the label A. If α is a square, then α11 , α12 , . . . , αmm denote the equal subsquares into which α can be divided, with α11 denoting the bottom left one. A bag context picture grammar G = (VN , VT , P, (S, σ), I, β0 ) has a finite alphabet V of labels, consisting of disjoint subsets VN of variables and VT of terminals. P is a finite set of production rules. There is an initial labelled square (S, σ), with S ∈ VN . Finally, I denotes a finite bag index set and β0 ∈ ZI the initial bag. A rule in P is of the form A → [x11 , x12 , . . . , xmm ] (λ, μ; δ), m ∈ N+ , where A ∈ VN , {x11 , x12 , . . . , xmm } ⊆ V, λ, μ ∈ ZI∞ , and δ ∈ ZI . The k-tuples λ and μ are the lower and upper limits, respectively, while δ is the bag adjustment.2 For simplicity, we write a rule of the form A → [x11 , x12 , . . . , xmm ] (−∞, ∞; 0) as A → [x11 , x12 , . . . , xmm ]. A pictorial form is any finite set of non-overlapping labelled squares in the plane. The size of a pictorial form Π is the number of squares contained in it.3 If Π is a pictorial form, we denote by l(Π) the set of labels used in Π. Let G = (VN , VT , P, (S, σ), I, β0 ) be a BCPG, Π and Γ pictorial forms, and β, β  ∈ ZI∞ . Then we write (Π, β) =⇒ (Γ, β  ) if there is a production A → [x11 , x12 , . . . , xmm ] (λ, μ; δ) in P , Π contains a labelled square (A, α), λ ≤ β ≤ μ, Γ = (Π \ {(A, α)}) ∪ {(x11 , α11 ), (x12 , α12 ), . . . , (xmm , αmm )}, and β  = β + δ. As usual, =⇒∗ denotes the reflexive transitive closure of =⇒. The (bag  σ), I, β0 )  context) gallery generated by a BCPG G = (VN , VT , P, (S, is G(G) = Φ | ({(S, σ)}, β0 ) =⇒∗ (Φ, β) , for β ∈ ZI∞ and l(Φ) ⊆ VT . An element of G(G) is called a picture. Let Φ be a picture in the square σ. For any m ∈ N+ , let σ be divided into equal subsquares, say σ11 , σ12 , . . . , σmm . A subpicture Ψ of Φ is any subset of Φ that fills a square σij , with i, j ∈ [m], i.e., the union of all the squares in Ψ is the square σij . Example 1. Consider the gallery Gcarpet . Three pictures in this gallery are shown in Fig. 2, where Fig. 2a is the smallest picture of the three, Fig. 2b the second smallest, and Fig. 2c the third smallest. Gcarpet consists of a variation on the sequence of pictures approximating the Sierpi´ nski carpet [1]. Each of the smallest pictures in Gcarpet , of which Fig. 2a is one example, is created by subdividing the initial square into nine equal subsquares. The subsquare in the centre is filled with a white circle on a grey background, while the remaining subsquares are filled with five purple and three green circles on a grey background, in no particular order. Since the initial square is divided only once, we refer to such a picture as a ‘first refinement’ picture. 2

3

Please note that we also use the square brackets as shorthand for a set, eg., for m ∈ N+ , [m] = {1, 2, . . . , m}, as defined earlier. It should be clear from the context which use is meant. Therefore a pictorial form that consists of, say, one square is considered smaller than a pictorial form that consists of, say, three squares, even though both lie in the initial square.

Syntactic Generation of Similar Pictures

(a)

(b)

157

(c)

Fig. 2. Some pictures in Gcarpet .

Each of the second smallest pictures in Gcarpet , eg., Fig. 2b, has the following format: A white circle is at the centre as in Fig. 2a. Each of the remaining eight subsquares is filled with any of the smallest pictures in Gcarpet . Since the initial square is divided twice, we refer to such a picture as a ‘second refinement’ picture. Each of the third smallest pictures in Gcarpet , eg., Fig. 2c, has the following format: The white circles are as in Fig. 2b, while each remaining subsquare is filled with any of the smallest pictures in Gcarpet . Since the initial square is divided three times, we refer to such a picture as a ‘third refinement’ picture. Note that in this gallery only refinement levels 1 to 3 are possible and it is thus a finite gallery. The gallery Gcarpet is generated by the bag context picture grammar Gcarpet = (VN , VT , P, (S, σ), [8] , (1, 0, 0, 0, 0, 0, 0, 0)), where VN = {S, T, U, F, C}, VT = {b, w, g} and P is the set of rules in Fig. 3. The terminals w, b and g represent white, purple and green circles, respectively. S → [T, T, T, T, w, T, T, T, T ] ((1, 0, 0, 0, 0, 0, 0, 0) , (∞, ∞, 0, ∞, ∞, ∞, ∞, ∞) ; (−1, 8, 0, 0, 0, 0, 0, 0)) T → U ((0, 1, 0, 0, 0, 0, 0, 0) , (0, ∞, ∞, 0, ∞, ∞, ∞, 71) ; (0, −1, 1, 0, 0, 0, 0, 1)) |

(1) (2)

F ((0, 1, 0, 0, 0, 0, 0, 0) , (0, ∞, 0, 0, ∞, ∞, ∞, ∞) ; (0, −1, 0, 1, 0, 0, 0, 0)) |

(3)

C ((0, 1, 0, 1, 0, 0, 0, 0) , ∞; (0, −1, 0, 0, 1, 0, 0, 0))

(4)

U → S ((0, 0, 1, 0, 0, 0, 0, 0) , (∞, 0, ∞, ∞, ∞, ∞, ∞, ∞) ; (1, 0, −1, 0, 0, 0, 0, 0))

(5)

F → C ((0, 0, 0, 1, 0, 0, 0, 0) , (∞, 0, ∞, ∞, ∞, ∞, ∞, ∞) ; (0, 0, 0, −1, 1, 0, 0, 0))

(6)

C → b ((0, 0, 0, 0, 1, 0, 0, 0) , (∞, ∞, ∞, ∞, ∞, 4, ∞, ∞) ; (0, 0, 0, 0, −1, 1, 0, 0)) |

(7)

g ((0, 0, 0, 0, 1, 5, 0, 0) , (∞, ∞, ∞, ∞, ∞, ∞, 2, ∞) ; (0, 0, 0, 0, −1, 0, 1, 0)) | (8) C ((0, 0, 0, 0, 1, 5, 3, 0) , ∞; (0, 0, 0, 0, 0, −5, −3, 0))

Fig. 3. Rules for grammar Gcarpet [9, page 247].

(9)

158

N. Jingili et al.

The bag positions 1 to 5 in Gcarpet count the occurrences of the variables S, T, U, F and C, respectively. Bag positions 6 and 7 count the occurrences of the terminals b and g, respectively, and ensure that for every white circle on the highest level of refinement, there are five purple and three green circles. The last bag position counts the number of times that Rule (2) in Fig. 3 has been applied in a derivation. This makes it possible to place a lower and upper limit on the subdivision of the initial square. 2.2

Mathematical Similarity

One of the key elements in this research is to determine the similarity of the pictures in a gallery that we generate with a grammar. Existing content based image retrieval systems measure the similarity of pictures based on different features, eg., colour, texture, content or layout. Significant features of the pictures generated in this research are colour and the location of various coloured objects in the picture, hence we considered CBIR systems based on colour description to be suitable for determining the similarity of these pictures. There exist many such systems. One of these systems is spatial colour distribution descriptor [3], which is a compact composite descriptor that combines colour and spatial colour distribution [3]. SpCD is suitable for coloured pictures that contain a small number of colours and texture regions such as hand-drawn sketches and coloured graphics. We decided to use SpCD because Okundaye et al. [14] observed that SpCD provided better results in determining the mathematical similarity of syntactically generated pictures (that are similar to our pictures) than did correlograms [7], colour histograms [16] or other systems that used colour features. 2.3

Perceptual Similarity

Several researchers have tried to compare their results of applying mathematical similarity measures to pictures with human perception in order to understand visual perception. For instance, Kiranyaz et al. [10] tried to model human colour perception. The authors observed that the human eye could not distinguish close colours well or identify a broad range of colours, and came to the conclusion that humans only use a few outstanding colours to judge similarity of pictures. They presented a systematic approach to extract a perceptual (colour) descriptor and then proposed an efficient similarity metric to achieve the highest discrimination power possible for colour-based retrieval in general-purpose image databases. Furthermore, Yamamoto et al. [17] conducted an experiment to evaluate the correlation between a mathematical similarity measure and human perception. Moreover, Okundaye et al. [15] conducted an online survey in which they required respondents to arrange pictures generated by tree grammars in order of similarity to a given picture. Their focus was also on using the pictures in a visual password system which was to be used by humans. Their results showed that, although humans are generally in agreement about the similarity of images, there could be some situations that cause confusion or disagreement.

Syntactic Generation of Similar Pictures

3

159

Generation of Similar Pictures

In this section, we describe how we generated pictures that we considered to be structurally similar, i.e., pictures that have one or more outstanding features in common. In general, we started with a grammar that generates a (possibly infinite) set of pictures. We then selected one picture from the set and modified the grammar such that it would only generate pictures that are all structurally similar to the selected picture. Usually the gallery generated by the modified grammar is finite. We used two methods, namely 1. limiting the number of refinements of a picture, and 2. limiting the refinement of subpictures in a picture. For illustrative purposes, we explain the first method in more detail. 3.1

Limiting the Number of Refinements

Consider Example 1. The grammar Gcarpet generates the finite gallery Gcarpet of Sierpi´ nski carpets, where each picture is in one, two or three levels of refinement. Gallery Arep in Fig. 4 contains some pictures in this gallery. We selected Fig. 4a, which is in the first level of refinement, and modified Gcarpet to generate the finite set of all pictures in Gcarpet that are in the first refinement. The resulting gallery Gallery Brep contains, amongst others, the pictures in Fig. 5. The modification of the grammar proceeds as follows: As stated in Example 1, bag position 8 in Gcarpet counts the number of times that Rule (2) has been applied. This makes it possible to place a lower and upper limit on the subdivision of the initial square. In order to generate only the first refinement pictures, the value of bag position 8 of the upper limit of Rule (2) must be changed from 71 to −1. This ensures that the initial square is subdivided only once. Analogously, Gallery Crep in Fig. 6 consists of only the second refinement pictures in Gcarpet , i.e., pictures structurally similar to Fig. 4d. To generate this gallery, the following changes must be made to Gcarpet : 1. change the value of bag position 8 of the upper limit of Rule (2) from 71 to 7; this ensures that the initial square is subdivided twice. 2. change the value of bag position 8 of the lower limit of Rule (3) from 0 to 8; this allows colouring once the picture has been subdivided twice. Furthermore, to generate only the third refinement pictures, i.e., pictures structurally similar to Fig. 4f, eg., Gallery Drep (Fig. 7), the value of bag position 8 of the lower limit of Rule (3) must be changed from 0 to 72. This ensures that the colouring only starts after the initial square has been subdivided three times.

160

3.2

N. Jingili et al.

Limiting the Refinement of Subpictures

Consider Figs. 8, 9 and 10. Consider Fig. 8a and any quarter in it. The quarter is divided into sixteen subsquares of equal size. The four subsquares in the centre are filled with white circles on a black background, while the remaining

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 4. Gallery Arep : Sierpi´ nski carpet, different refinements.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 5. Gallery Brep : Sierpi´ nski carpet, first refinement.

Syntactic Generation of Similar Pictures

161

subsquares are filled with grey circles on a black background. For simplicity, let us call this image Π. Its structure is reminiscent of a flower, hence Figs. 8, 9 and 10 are called ‘Flower’ galleries.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 6. Gallery Crep : Sierpi´ nski carpet, second refinement.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 7. Gallery Drep : Sierpi´ nski carpet, third refinement.

162

N. Jingili et al.

Figure 8a is the smallest picture in Gallery Erep . In general, every picture in Gallery Erep has the following structure: The top left quarter may be divided into four subquarters and one of the following actions performed: 1. Π is placed in each subquarter; this is illustrated in the top left quarter in Fig. 8d, 2. the bottom right subquarter is divided into four and Π is placed in each subquarter; this is illustrated in the top left quarter in Fig. 8c, 3. (2) may be recursively repeated once for the bottom right subquarter; this is illustrated in the top left quarter in Fig. 8b. Each of the four quarters of the smallest picture may be subdivided from zero to three times as described above, with the repeated subdivision occurring in the quarter closest to the middle, eg., for the top right quarter, the repeated subdivision occurs in the bottom left quarter, and so forth. The subdivisions of the four quarters are independent of each other. Consider Fig. 9. In each picture, both the top right and the bottom left quarters are subdivided three times, whereas the remaining quarters may be subdivided from zero to two times. The subdivisions are done in the manner described above. Finally, consider Fig. 10. In each picture, both the top left and the bottom right quarters are subdivided twice, while the remaining quarters may be subdivided from zero to two times. Using the above two methods, we generated structurally similar pictures. In the following sections, we assess if these are mathematically similar and/or perceptually similar.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 8. Gallery Erep : Flowers.

Syntactic Generation of Similar Pictures

4 4.1

163

Determining Mathematical Similarity Determining the Similarity of Pictures

Determining the mathematical similarity of pictures is essential in this research, not only because we want to ensure that the generated pictures are similar, but also because we want to determine the most effective ways of syntactically generating similar pictures. We have experimented with different BCPGs and generated many pictures. For each BCPG, we selected eight representative pictures in its gallery. These sets of eight are given in Figs. 4, 5, 6, 7, 8, 9 and 10. We determined the mathematical similarity of the pictures in each set. In particular, we used the Img(Rummager) application [2] to calculate the mathematical similarity according to SpCD. For each set, we also calculated the average SpCD, in order to compare the similarity across different sets.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 9. Gallery Frep : Flowers.

In this paper, rank represents the position of a picture with respect to similarity to a query picture. In this section, the rank ranges between 1 and 8, where the lower the rank, the higher the similarity of a picture to a given query picture. The query picture itself has rank equal to 1. The average SpCD (avg. SpCD) 8 value was calculated as i=2 xi /7, where xi is the SpCD value of rank i. In calculating this average, the query picture was left out, because it has SpCD value equal to 0 in all instances.

164

N. Jingili et al.

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Fig. 10. Gallery Grep : Flowers.

4.2

Results of SpCD Similarity Measurements

Tables 1 and 2 present the results of the mathematical similarity measurements on the galleries in Figs. 4, 5, 6, 7, 8, 9 and 10. In each column with the heading ‘Pict.’ in these tables, the picture with rank 1 is the query picture. Moreover, for the SpCD values in the columns headed ‘SpCD value’, it holds that the lower the value, the more similar the picture to the query picture. Table 1. SpCD similarity results for Figs. 4, 5, 6 and 7. Rank

Figure 4 Pict.

SpCD value

Figure 4 Pict.

SpCD value

Figure 4 Pict.

SpCD value

Figure 5 Pict.

SpCD value

Figure 6 Pict.

SpCD value

Figure 7 Pict.

SpCD value

1

a

0

d

0

f

0

a

0

a

0

a

0

2

b

32.736

e

2.777

h

0

b

33.120

c

2.393

b

0

3

f

32.855

c

2.782

g

0.463

g

49.099

b

2.865

d

0

4

h

32.855

f

7.627

d

7.627

d

50.000

d

2.870

c

0.432

5

d

33.864

h

7.627

e

7.737

e

51.541

f

4.093

e

0.432

6

g

34.430

g

8.108

c

8.601

h

66.321

e

4.272

h

3.971

7

c

36.608

a

33.864

b

32.381

c

67.652

h

16.964

f

4.717

8

e

38.577

b

35.499

a

32.855

f

70.406

g

20.000

g

4.717

Avg. SpCD

34.560

14.040

12.809

55.448

7.636

2.038

Syntactic Generation of Similar Pictures

165

Limiting the Number of Refinements. Consider Table 1. It provides the mathematical similarity results for Figs. 4, 5, 6 and 7. Consider the three columns with the heading ‘Figure 4’. For Fig. 4, we calculated the mathematical similarity using three different query pictures, namely Figs. 4a, d and f. Consider the SpCD values for Fig. 4a as query picture. All values are greater than 32, indicating little similarity between the query picture and the other pictures in Fig. 4. Consider the SpCD values for Figs. 4d and f as query pictures. In both cases, five of the seven values under consideration are less than 10, while the remaining two are greater than 32. Figure 4 contains pictures with three different levels of refinements. The three query pictures used also have three different levels of refinements, with Fig. 4a being in the first refinement and Fig. 4f in the third. Consider the corresponding average SpCD values: the higher the refinement of the query picture is, i.e., the smaller its subpictures, the lower these SpCD values are. Consider the column for Fig. 5, with Fig. 5a as query picture. All values are greater than 33 and the average SpCD is 55.448, indicating little similarity between the query picture and the other pictures. This is probably a result of the fact that the pictures have large subpictures. Consider the column for Fig. 6, with Fig. 6a as query picture. Five of the seven values under consideration are less than 5, and the average is 7.636. Consider the column for Fig. 7, with Fig. 7a as query picture. The average SpCD is 2.038, which is smaller than those of Figs. 4, 5 and 6. This suggests that the pictures in Fig. 7 are more similar to the query picture than any of the other cases we have considered so far. Moreover, we note that the SpCD value for two pictures is zero, even though these pictures are not identical to the query picture. Limiting the Refinement of Subpictures. Consider Table 2. It provides the mathematical similarity results for Figs. 8, 9 and 10. We note that the results for Figs. 9 and 10 are smaller than those for Fig. 8, implying that the pictures in the former two galleries are more similar to the respective query pictures than in the latter gallery. Finally, we observe that the average SpCD values in Table 2 are smaller than most of those calculated in Table 1.

166

N. Jingili et al. Table 2. SpCD similarity results for Figs. 8, 9 and 10. Rank

1

h

0

c

0

a

0

a

0

2

a

1.253

f

0.624

c

0.286

e

0

3

e

1.524

g

0.624

b

0.309

f

0.609

4

f

1.857

b

0.893

e

0.606

b

0.624

5

g

1.857

e

0.906

f

0.607

d

0.624

6

d

2.468

a

1.257

h

0.864

c

1.276

7

b

2.735

d

1.276

g

0.935

g

1.276

8

c

5.764

h

2.439

a

1.197

h

Avg. SpCD

4.3

Figure 8 Figure 8 Figure 9 Figure 10 Pict. SpCD Pict. SpCD Pict. SpCD Pict. SpCD value value value value

2.494

1.145

0.686

1.908 0.902

Discussion of Mathematical Similarity Results

The galleries were grouped into two categories in order to test different methods of generating structurally similar pictures and investigate which method is more effective in generating mathematically similar pictures. The first method was to limit the number of refinements in a picture. The corresponding galleries are given in Figs. 4, 5, 6 and 7. The galleries given in Figs. 5, 6 and 7 have pictures that are in the same level of refinement. The mathematical similarity of the pictures in Figs. 6 and 7 is higher than that of the pictures in Fig. 4, regardless of the query picture used for the latter. However, the opposite holds for Fig. 5. Based on the results, we can state that BCPGs are able to generate mathematically similar pictures, but if the grammar is modified to generate pictures that are in the same level of refinement to the query picture, there is an excellent chance of improving the similarity of the pictures. Moreover, in the galleries consisting of pictures that are on the same level of refinement, the similarity increased with the level of refinement to an extent. The similarity of Fig. 5 was not better than that of Fig. 4. Presumably this was because the subpictures in Fig. 5 were large compared to most in Fig. 4 and the placement of colours from one picture to the next differed a good deal. Per definition, SpCD measures the similarity of pictures based on the spatial colour distribution. We observe that any significant colour shift leads to a big difference in similarity values. For example, consider the similarity values of Figs. 6h and g in Table 1. They are much higher than the other values in this column, even though all pictures in this gallery have subpictures of the same size. The second method was to limit the refinement of subpictures. The corresponding galleries are given in Figs. 8, 9 and 10. The mathematical similarity of the pictures in Figs. 9 and 10 is higher than that of the pictures in Fig. 8, regardless of the query picture used for the latter.

Syntactic Generation of Similar Pictures

167

This implies that the mathematical similarity of the pictures improves if all the pictures in the gallery have the same subpictures in common. Moreover, most of the galleries in Table 2 have lower SpCD values than most of the galleries in Table 1. Presumably this is because fewer colours were used in the former galleries than in the latter. Both methods used to modify a given grammar to generate structurally similar pictures have shown to be effective in generating mathematically similar pictures. Judging by the average SpCD values in the two tables, the second method produced the better results. Since these methods used galleries that have different properties, we cannot make a conclusion based on these results as to which method is better. We can only note that the described methods produced galleries with a higher mathematical similarity than the original galleries. Moreover, we note that one can modify a grammar to generate a finite number of relevant pictures, eg., the gallery in Fig. 6.

5

Correlation Between Mathematical and Perceptual Similarity

For this research, it is important to measure if perceptual similarity correlates to the chosen measure of mathematical similarity, because we need to be sure that the results from the mathematical measure reflect what people think. We conducted an online survey for this purpose. The link to the survey was distributed through mailing lists for staff members and students at two universities. We obtained 408 responses. The survey contained the following points: Ranking of Pictures in Gallery: We showed the respondents the galleries in Figs. 11, 12, 13, 14, 15, 16 and 17. For each gallery a respondent had to rank the pictures in the gallery in terms of how similar they felt the picture was to a given picture, in particular the picture with label (c) in each gallery. In the ranking, the value 1 was given to the most similar picture and 5 to the least similar picture. Picture (c) was used both as the query picture and as a picture in the gallery to check for outliers. Similarity of Pictures in Gallery: For Figs. 11, 12, 13, 14, 15, 16 and 17, we asked respondents to select the statement that best described the similarity of the pictures in that gallery. The statements were: not at all similar, somehow similar, similar, very similar, or identical. Ranking of Galleries: For Figs. 11, 12, 13, 14 and Figs. 15, 16, 17, respectively, we asked respondents to rank the galleries from the gallery with the pictures that are most similar to each other to the gallery with the pictures that are least similar to each other.

168

N. Jingili et al.

Factors that Determine Similarity: We asked respondents which factor they considered the most important when determining the similarity of the pictures in a gallery. We provided them with the following options: colours present in the picture, distribution of the colours in the picture, objects in the picture, distribution of the objects in the picture, and other (specify).

(a)

(b)

(c)

(d)

(e)

Fig. 11. Gallery A: Sierpi´ nski carpet, different refinements [9, page 249].

(a)

(b)

(c)

(d)

(e)

Fig. 12. Gallery B: Sierpi´ nski carpet, first refinement [9, page 249].

(a)

(b)

(c)

(d)

(e)

Fig. 13. Gallery C: Sierpi´ nski carpet, second refinement [9, page 249].

(a)

(b)

(c)

(d)

(e)

Fig. 14. Gallery D: Sierpi´ nski carpet, third refinement [9, page 249].

Syntactic Generation of Similar Pictures

(a)

(b)

(c)

(d)

169

(e)

Fig. 15. Gallery E: Flowers [9, page 249].

(a)

(b)

(c)

(d)

(e)

Fig. 16. Gallery F: Flowers [9, page 250].

(a)

(b)

(c)

(d)

(e)

Fig. 17. Gallery G: Flowers [9, page 250].

5.1

Ranking of Pictures in Gallery

As stated above, picture (c) was used as the query picture in each gallery, i.e., all pictures were compared to picture (c) to determine their similarity to it. The results of the SpCD measurements and the online survey are presented in Tables 3, 4, 5, 6, 7, 8 and 9. Each table is structured as follows: Rank: The first column presents the picture ranking from 1 (most similar) to 5 (least similar). SpCD: The second column presents SpCD. It is divided into two columns, the first giving the picture label and the second its SpCD value. Perceptual: The third column presents the perceptual similarity. It is divided into two columns, the first giving the picture label and the second its average perceptual ranking.

170

N. Jingili et al.

The average perceptual ranking (or score) over all the respondents was calculated as [9, page 248]: 5 i wi xi , (1)  5 i xi where – wi is the weight of the rank, where the picture that was ranked as the most similar is given the weight of 5 and the least similar picture is given the weight of 1, and – xi is the number of responses for each possible answer. For the ranking according to SpCD, the picture with the smallest value is the most similar to the query picture, while the picture with the largest value is the least similar to the given picture. On the other hand, for the ranking according to the perceptual similarity, the picture with the largest value is the most similar to the query picture and the picture with the smallest value the least similar. The SpCD values and the average perceptual ranking cannot be compared directly, because they use different unit measures. We therefore compare the ranking of the pictures by the two measures. In the following, each of Tables 3, 4, 5, 6, 7, 8 and 9 is discussed briefly. Consider Table 3, which gives the results for Gallery A in Fig. 11. For this gallery, SpCD is to a degree consistent with perceptual similarity as three of the five pictures were ranked the same for both similarity measures. Table 3. Similarity of Fig. 11c to pictures in Fig. 11 [9, page 250]. Rank

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.53

2

d

1.932

b

3.80

3

b

2.782

d

3.31

4

e

8.601

e

1.89

5

a

33.425

a

1.62

Consider Table 4, which gives the results for Gallery B in Fig. 12. For this gallery, SpCD is to a degree consistent with perceptual similarity. Three of the five pictures were ranked at the same positions. There is a small score difference of 0.17 in the perceptual similarity of the remaining two pictures, implying that respondents found these pictures to be very similar. Consider Table 5, which gives the results for Gallery C in Fig. 13. For this gallery, SpCD is to a degree consistent with perceptual similarity. Both measures ranked the first picture on the same position. However, there is a difference at Ranks 2 and 3. Both measures place pictures (a) and (b) at these ranks, but in

Syntactic Generation of Similar Pictures

171

Table 4. Similarity of Fig. 12c to pictures in Fig. 12 [9, page 250]. Rank

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.79

2

d

3

e

23.437

e

3.00

30.126

d

2.83

4

a

5

b

67.653

a

2.79

73.297

b

1.59

different orders. However, the difference of the weighted score of 0.21 suggests that respondents found these pictures to be very similar. There is a similar situation at Ranks 4 and 5. Both measures place pictures (d) and (e) at these ranks, but in different orders. Also in this case, the difference of the weighted score of 0.04 suggests that respondents found these pictures to be very similar. Table 5. Similarity of Fig. 13c to pictures in Fig. 13 [9, page 250]. Rank

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.67

2

a

2.394

b

3.51

3

b

3.426

a

3.30

4

e

4.830

d

1.83

5

d

5.291

e

1.79

Consider Table 6, which gives the results for Gallery D in Fig. 14. It shows no correlation between the two measures. In fact, the ranking of the pictures in the online survey suggests that the respondents were not able to tell the difference between the pictures. For example, the respondents ranked Fig. 14c, which is the query picture, third instead of first. This might be because the pictures in this gallery have very small subpictures, which might have made it difficult for respondents to distinguish one picture from another. It is worth noting that the SpCD values for this gallery are very small, and that the difference between values in Table 6 is small compared to that in Tables 3, 4 and 5. Moreover, we observe that SpCD could not measure the difference between pictures which are different. For example, it ranked pictures (c) and (e) as identical, and similarly pictures (a), (b) and (d). We assume the underlying reason is that SpCD cannot measure the difference between pictures that have such small subpictures. Consider Table 7, which gives the results for Gallery E in Fig. 15. For this gallery, SpCD is to a degree consistent with perceptual similarity. Three pictures

172

N. Jingili et al. Table 6. Similarity of Fig. 14c to pictures in Fig. 14 [9, page 251]. Rank 1

SpCD Perceptual Picture Value Picture Score c

0

d

4.13

2

e

0

b

3.76

3

a

0.433

c

3.29

4

b

0.433

a

2.62

5

d

0.433

e

1.39

were ranked the same by both measures. The measures differed at Ranks 3 and 4. However, the difference of the weighted score of 0.27 suggests that respondents found these pictures to be very similar. Table 7. Similarity of Fig. 15c to pictures in Fig. 15 [9, page 251]. Rank

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.68

2

b

0

b

3.97

3

d

0.894

a

2.51

4

a

0.907

d

2.24

5

e

1.865

e

1.63

Consider Table 8, which gives the results for Gallery F in Fig. 16. In this case, SpCD is consistent with perceptual similarity as both measures ranked the pictures in the same order. Table 8. Similarity of Fig. 16c to pictures in Fig. 16 [9, page 251]. Rank

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.63

2

a

0

a

3.48

3

b

0

b

3.31

4

e

0

e

2.44

5

d

1.276

d

1.31

Consider Table 9, which gives the results for Gallery G in Fig. 17. For this gallery, SpCD is to a degree consistent with perceptual similarity. Two pictures,

Syntactic Generation of Similar Pictures

173

namely pictures (c) and (b), were ranked the same by both measures. Moreover, both measures ranked picture (d) higher than picture (e). However, perceptual similarity ranked picture (a) higher than pictures (d) and (e), whereas SpCD ranked picture (a) lower than these pictures. Moreover, SpCD assigned pictures (a) and (b) the same values, whereas perceptual similarity did not consider these pictures to be identical. Table 9. Similarity of Fig. 17c to pictures in Fig. 17 [9, page 251]. Rank

5.2

SpCD Perceptual Picture Value Picture Score

1

c

0

c

4.76

2

d

0

a

3.46

3

e

0.610

d

2.95

4

a

0.625

e

1.97

5

b

0.625

b

1.81

Similarity of Pictures in Gallery

In the second section of the survey, respondents were shown Figs. 11, 12, 13, 14, 15, 16 and 17 and asked to select the statement that best described the similarity of the pictures within that gallery. The options were: not at all similar, somehow similar, similar, very similar, or identical. Consider Table 10, which shows how humans evaluated the similarity of pictures within each gallery. A perceptual score of 1 indicates that the pictures are not at all similar, while 5 indicates that the pictures are identical. All the scores in Table 10 are higher than 1, which implies that the respondents found the pictures to be similar to some degree. The highest scores are for Galleries C and D in Figs. 13 and 14, which implies that the respondents considered these galleries to have the pictures that are most similar to each other. Table 10. Perception of similarity of pictures in each gallery [9, page 251]. Rank Gallery Perceptual score 1

A

1.82

2

B

2.40

3

C

3.12

4

D

3.64

5

E

2.17

6

F

2.66

7

G

2.24

174

5.3

N. Jingili et al.

Ranking of Galleries

In the third section of the survey, respondents were asked to rank the galleries in Figs. 11, 12, 13, 14 and Figs. 15, 16, 17, respectively, from the gallery containing pictures that are most similar to each other to the gallery containing pictures that are least similar to each other. Consider Table 11, which gives the results for Figs. 11, 12, 13 and 14. Humans ranked Gallery D in Fig. 14 highest, i.e., as the gallery with pictures that are most similar to each other. This view correlates with the SpCD measures for this gallery (Table 6), which are very low (0 or 0.433), which implies that the pictures are very similar to the query picture and each other. Humans ranked Gallery C in Fig. 13 second. This view correlates with the SpCD measures for this gallery (Table 5), which are the second lowest for the four galleries under consideration. Humans ranked Gallery A in Fig. 11 last, i.e., as the gallery with pictures that are least similar to each other. This does not correlate with the SpCD measures for the four galleries. The SpCD measures are the highest for Gallery B in Fig. 12. Moreover, they differ a great deal from one picture to another, implying that Fig. 12 is the gallery containing the least similar pictures. A possible explanation for this discrepancy might be that humans considered it important that the objects in Fig. 12 have the same size, whereas SpCD measures the distribution of colours. We observe that the SpCD measures for Gallery A (Table 3) differ greatly from one picture to another. This implies dissimilarity between the pictures, but these differences are not bigger than those for Gallery B (Table 4), rather the opposite. Table 11. Ranking of galleries in Figs. 11, 12, 13 and 14 according to similarity of pictures in gallery [9, page 252]. Rank Gallery Perceptual score 1

D

3.64

2

C

3.12

3

B

2.40

4

A

1.82

Consider Table 12, which gives the results for Figs. 15, 16 and 17. Humans ranked Gallery F in Fig. 16 highest, i.e., as the gallery with pictures that are most similar to each other. This view correlates with the SpCD measures for this gallery (Table 8). Four pictures have the value 0, which means that the SpCD measure found them to be identical to the query picture. The pictures are not identical, but this result shows that both measures found these pictures to be very similar. Humans ranked Gallery G in Fig. 17 second. This view correlates with the SpCD measures for this gallery (Table 9), which are the second highest for the three galleries under consideration. Humans ranked Gallery E in Fig. 15

Syntactic Generation of Similar Pictures

175

third. This view correlates with the SpCD measures for this gallery (Table 7), which are the highest for the three galleries under consideration. Table 12. Ranking of galleries in Figs. 15, 16 and 17 according to similarity of pictures in gallery [9, page 252]. Rank Gallery Perceptual score

5.4

1

F

2.66

2

G

2.24

3

E

2.17

Factors that Determine Similarity

In the last section of the survey, respondents were asked which factor was most important to them when determining the similarity of the pictures in a gallery. Table 13 shows the factors that respondents considered important, and the percentage of respondents for each factor. Table 13. Most important factor when determining similarity of pictures [9, page 253]. Rank Factor

5.5

%

1

Distribution of the objects in the picture

46.46

2

Distribution of the colours in the picture

28.54

3

Objects in the picture

14.39

4

Colours present in the picture

6.31

5

Other: symmetry; both distribution of colours and 4.29 objects in the picture; subshapes; patterns

Discussion of Perceptual Similarity Results

Only one gallery, namely Gallery D in Fig. 14, showed no correlation at all between SpCD and perceptual similarity in ranking the pictures. This gallery was treated as an outlier as humans failed to rank the picture which was used as the query picture correctly. One gallery, namely Gallery F in Fig. 16, had the same ranking for both SpCD and perceptual similarity. For four galleries, namely the galleries A–C and E (Figs. 11, 12, 13 and 15), the correlation was high, in that there were more pictures that were ranked the same by both measures than pictures that were not. In the remaining gallery, Gallery G in Fig. 17, there were more pictures that were ranked differently by both measures than pictures that were ranked the same.

176

N. Jingili et al.

It is important to evaluate the effectiveness of SpCD in representing perceptual similarity. Such an evaluation will aid us in determining whether or not SpCD is consistent with perceptual similarity and direct the future research. In this evaluation, we use discounted cumulative gain (DCG) [8], which evaluates the ranking of documents. The key feature in DCG is that highly relevant documents should be ranked higher than the less relevant ones. Since, in this survey, the main focus was on the ranking of pictures, discounted cumulative gain was deemed to be an appropriate method to evaluate the consistency between perceptual similarity and SpCD. We furthermore present the evaluation by the normalized discounted cumulative gain (NDCG) [11], which normalizes the values to lie between 0 and 1, to aid the comparison. The discounted cumulative gain for a given query is [9, page 253] DCG =

5  rating (i) , log2 (1 + i) i=1

(2)

where – i is the rank of a picture from 1 (most similar to the query picture) to 5 (least similar), and – rating (i) is the value assigned to a picture according to its perceptual similarity, from 5 (most similar) to 1 (least similar). The ideal discounted cumulative gain (iDCG) for a given query is the DCG according to the perceptual ranking. The normalisation is calculated by dividing the DCG by the iDCG, i.e., NDCG = DCG/iDCG [9, page 253]. For example, Table 14 gives the DCG calculation for Table 3. Table 14. DCG calculation for Table 3 [9, page 253]. i

SpCD (DCG) Picture rating (i) DCG

1

c

2

d

3

b

4

e

5

a DCG =

5 log2 (1+1) 3 3 log2 (1+2) 4 4 log2 (1+3) 2 2 log2 (1+4) 1 1 log (1+5) 5 rating(i) 2 i=1 log2 (i+1) = 10.138

5

Perceptual (iDCG) Picture rating (i) iDCG c b d e a iDCG =

5 log2 (1+1) 4 4 log2 (1+2) 3 3 log2 (1+3) 2 2 log2 (1+4) 1 1 log (1+5) 5 rating(i) 2 i=1 log2 (i+1) = 10.269

5

Table 15 presents the DCG and NDCG values for Tables 3, 4, 5, 6, 7, 8 and 9. The average NDCG is 0.961. The closer the NDCG value is to 1, the higher the correlation between the ranking of the pictures by SpCD and by human perception. As all the NDCG values are close to 1 we believe that we can use SpCD as an appropriate similarity measure in our visual password work.

Syntactic Generation of Similar Pictures

177

Table 15. NDCG results [9, page 253]. Table DCG

iDCG NDCG

3

10.138 10.269

0.987

4

10.138 10.269

0.987

5

10.095 10.269

0.983

6

8.388 10.269

0.807

7

10.200 10.269

0.993

8

10.269 10.269

1.000

9

10.006 10.269

Average NDCG

6

0.974 0.961

Discussion

Two methods were used to modify given grammars to generate structurally similar pictures. Both have shown to be effective in generating mathematically similar and perceptually similar pictures. For mathematical similarity, the second method produced the better results, judging by the average SpCD values in Tables 1 and 2. On the other hand, the participants in the online survey chose the pictures in the galleries in Figs. 13 and 14 to have the highest perceptual similarity. These galleries were generated by the first method. Since these methods used galleries that have different properties, we cannot make a conclusion based on these results as to which method is better. We can only note that the described methods produced galleries with a higher mathematical similarity than the original galleries. Moreover, we note that one can modify a grammar to generate a finite number of relevant pictures, eg., the gallery in Fig. 13. The original galleries for both methods contained many pictures that were not mathematically similar to a query picture. Generating such pictures wastes resources. The results show that in some situations, SpCD failed to detect a difference between pictures that are different, for instance, if these pictures contain subpictures that are very refined. The same holds for perceptual similarity; in some situations humans failed to rank the query picture as the most similar to itself. Both measures are shown in Table 6 for Fig. 14. Therefore pictures that contain very small subpictures are probably not suitable for use in visual password systems. On the other hand, pictures with large subpictures are probably also not suitable. An example is Gallery B in Fig. 12. Consider Tables 3, 4, 5 and 6. The SpCD measures are the highest for Gallery B. Moreover, they differ a great deal from one picture to another, implying that Gallery B is the gallery containing the least similar pictures of the four galleries under consideration. Humans ranked this gallery second last in terms of similarity, as seen in Table 11.

178

N. Jingili et al.

It seems that pictures that are neither too refined nor too unrefined should be considered first for use in visual password systems, eg., the pictures in Figs. 13, 15, 16 and 17. The decision on the maximum level of refinement for the pictures in a gallery is made by the person designing the gallery.

7

Conclusion

In this work, we presented approaches to generating similar pictures that could be used as password pictures and distractors in a visual password system. We used bag context picture grammars (BCPGs) to generate these pictures. Bag context picture grammars can be written and modified in many ways in order to generate similar pictures. Two methods of producing similar pictures were presented. These methods are limiting the number of refinements of the generated pictures and limiting the refinement of some subpictures in the picture. We then determined the mathematical similarity of the generated pictures, using the spatial colour distribution descriptor. Both the methods presented showed that when the grammar was modified to generate only pictures with structurally similar properties, the similarity of the generated pictures improved. We then reported on an online survey that was conducted to determine the perceptual similarity of the pictures generated by the picture grammars. The humans seemed to have very different opinions regarding the similarity of pictures. A reason may be that different people compare pictures using different measures, some placing more emphasis on colour while others place more emphasis on objects. However, the majority of respondents agreed on the similarity of individual pictures compared to the query picture. Most respondents found the given galleries of pictures to contain similar pictures, which is very important as this research is about the generation of similar pictures. When comparing the results of the survey with the results of the spatial colour distribution descriptor similarity measure, perceptual similarity seemed to correlate quite well to the spatial colour distribution descriptor measure. This implies that the spatial colour distribution descriptor can be used to judge the similarity of pictures generated by bag context picture grammars. The results of this research imply that bag context picture grammars can be used to generate similar pictures by selecting a picture and modifying its grammar to create only similar pictures to the original picture. We also observe that using the methods presented here can improve the similarity of the generated pictures. As different galleries are used for each method, we cannot make a general conclusion as to which of the methods is the better, but we have showed that modifying grammars to produce pictures with structurally similar properties improves the mathematical similarity and the perceptual similarity of the generated pictures. Acknowledgements. This work is based upon research supported by the National Research Foundation (of South Africa). Any opinion, findings and conclusions or recommendations expressed in this material are those of the authors and therefore the

Syntactic Generation of Similar Pictures

179

NRF does not accept liability in regard thereto. The first author also acknowledges support of the Council for Scientific and Industrial Research of South Africa.

References 1. Bhika, C., Ewert, S., Schwartz, R., Waruhiu, M.: Table-driven context-free picture grammars. Int. J. Found. Comput. Sci. 18(6), 1151–1160 (2007). https://doi.org/ 10.1142/S0129054107005194 2. Chatzichristofis, S.A., Boutalis, Y.S., Lux, M.: Img(Rummager): an interactive content based image retrieval system. In: Proceedings of the Second International Workshop on Similarity Search and Applications, SISAP 2009, pp. 151–153. IEEE Computer Society, Washington, DC (2009). https://doi.org/10.1109/SISAP.2009. 16 3. Chatzichristofis, S.A., Boutalis, Y.S., Lux, M.: SpCD — spatial color distribution descriptor — a fuzzy rule based compact composite descriptor appropriate for hand drawn color sketches retrieval. In: Proceedings of the International Conference on Agents and Artificial Intelligence (ICAART 2010), Valencia, Spain, vol. 1 (Artificial Intelligence), pp. 58–63, January 2010. https://doi.org/10.5220/0002725800580063 4. Ewert, S.: Random context picture grammars: the state of the art. In: Drewes, F., Habel, A., Hoffmann, B., Plump, D. (eds.) Manipulation of Graphs, Algebras and Pictures, pp. 135–147. Hohnholt, Bremen (2009) 5. Ewert, S., Jingili, N., Mpota, L., Sanders, I.: Bag context picture grammars. J. Comput. Lang. 51, 214–221 (2019). https://doi.org/10.1016/j.cola.2019.04.001 6. Goldberger, J., Gordon, S., Greenspan, H.: An efficient image similarity measure based on approximations of KL-divergence between two Gaussian mixtures. In: Proceedings of the Ninth IEEE International Conference on Computer Vision, pp. 487–493. IEEE (2003). https://doi.org/10.1109/ICCV.2003.1238387 7. Huang, J., Kumar, S., Mitra, M., Zhu, W.J., Zabih, R.: Image indexing using color correlograms. In: Proceedings of the 1997 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 762–768. IEEE Computer Society (1997). https://doi.org/10.1109/CVPR.1997.609412 8. J¨ arvelin, K., Kek¨ al¨ ainen, J.: IR evaluation methods for retrieving highly relevant documents. In: Proceedings of the 23rd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2000, pp. 41–48. ACM, New York (2000). https://doi.org/10.1145/345508.345545 9. Jingili, N., Ewert, S., Sanders, I.D.: Measuring perceptual similarity of syntactically ¨ generated pictures. In: Rango, F.D., Oren, T.I., Obaidat, M.S. (eds.) Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH 2018, Porto, Portugal, 29–31 July 2018. pp. 244–255. SciTePress (2018). https://doi.org/10.5220/0006906502440255 10. Kiranyaz, S., Birinci, M., Gabbouj, M.: Perceptual color descriptor based on spatial distribution: a top-down approach. Image Vis. Comput. 28(8), 1309–1326 (2010). https://doi.org/10.1016/j.imavis.2010.01.012 11. Le, Q.V., Smola, A.J.: Direct optimization of ranking measures. CoRR abs/0704.3359 (2007). http://arxiv.org/abs/0704.3359 12. Li, B., Chang, E., Wu, Y.: Discovery of a perceptual distance function for measuring image similarity. Multimedia Syst. 8(6), 512–522 (2003). https://doi.org/10.1007/ s00530-002-0069-9

180

N. Jingili et al.

13. Neumann, D., Gegenfurtner, K.R.: Image retrieval and perceptual similarity. ACM Trans. Appl. Percept. (TAP) 3(1), 31–47 (2006). https://doi.org/10.1145/1119766. 1119769 14. Okundaye, B., Ewert, S., Sanders, I.: Determining image similarity from pattern matching of abstract syntax trees of tree picture grammars. In: Proceedings of the Twenty-Fourth Annual Symposium of the Pattern Recognition Association of South Africa, pp. 83–90. PRASA, RobMech, AfLaT (2013) 15. Okundaye, B., Ewert, S., Sanders, I.: Perceptual similarity of images generated using tree grammars. In: Proceedings of the Annual Conference of the South African Institute for Computer Scientists and Information Technologists (SAICSIT 2014), pp. 286–296. ACM (2014). https://doi.org/10.1145/2664591.2664606 16. Swain, M.J., Ballard, D.H.: Color indexing. Int. J. Comput. Vis. 7(1), 11–32 (1991). https://doi.org/10.1007/BF00130487 17. Yamamoto, H., Iwasa, H., Yokoya, N., Takemura, H.: Content-based similarity retrieval of images based on spatial color distributions. In: Proceedings of the 10th International Conference on Image Analysis and Processing, pp. 951–956. IEEE (1999). https://doi.org/10.1109/ICIAP.1999.797718 18. Zhou, X.S., Huang, T.S.: Relevance feedback in image retrieval: a comprehensive review. Multimedia Syst. 8(6), 536–544 (2003). https://doi.org/10.1007/s00530002-0070-3

Mathematical Modeling of Alkaline Methanol Oxidation for Design of Efficient Fuel Cells Tanja Clees1,2 , Igor Nikitin2 , Lialia Nikitina2(B) , Sabine Pott2 , Ulrike Krewer3 , and Theresa Haisch3 1

University of Applied Sciences, Sankt Augustin, Germany Fraunhofer Institute for Algorithms and Scientific Computing, Sankt Augustin, Germany {tanja.clees,igor.nikitin,lialia.nikitina,sabine.pott}@scai.fraunhofer.de 3 Institute of Energy and Process Systems Engineering, Technical University, Braunschweig, Germany {u.krewer,t.haisch}@tu-braunschweig.de 2

Abstract. This paper considers the electrochemical kinetic model of alkaline methanol oxidation, the process, relevant for the design of efficient fuel cells. Fuel cells of direct methanol type have a great advantage in safety and storage compared to hydrogen-oxygen fuel cells. They possess high energy density and are especially suitable for portable applications. The oxidation of fuel in an alkaline medium allows the use of affordable electrodes. The mathematical model of the oxidation process includes a system of non-linear differential equations of high order, describing elementary reactions. The model also possesses 14 unknown reaction constants and 6 dynamic variables describing surface coverages of the intermediates. These variables cannot be measured directly, but can be reconstructed by the parameter identification procedure. The procedure comprises numerical integration of the system of differential equations, automatic global minimization of the distance between measured and modeled cyclic voltammograms, iterative Monte Carlo search and interactive parameter study. The developed methods have been applied to 9 cyclic voltammograms of cells with different concentrations of alkaline and fuel. The reaction constants have been reconstructed, their dependence on concentrations has been discussed. Dynamic behavior of the system in form of the reconstructed evolution of the intermediates has been presented.

Keywords: Complex systems modeling and simulation optimization · Parameter identification · Application in electrochemistry

· Non-linear

c Springer Nature Switzerland AG 2020  M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, pp. 181–195, 2020. https://doi.org/10.1007/978-3-030-35944-7_9

182

1

T. Clees et al.

Introduction

This paper extends our previous work [1], presented at SIMULTECH 2018. We have added the analysis of new experiments involving variations of concentrations, have found an interesting effect of dependence of reaction constants on the concentrations and have described the dynamical behavior of the reconstructed surface coverages of the intermediates. The fruitful discussion of the new results with the colleagues at the conference has inspired us for this extension. Fuel cells as well as galvanic cells are devices converting chemical energy of reagents into electric energy. The difference of fuel cells from galvanic cells is that the reagents are refillable and are supplied from the outside. Direct carbon fuel cells work on carbon containing fuel, such as alcohol, bio-mass, coal, avoiding the production of hydrogen. The advantage of direct cells in comparison with hydrogen-oxygen ones is the availability as well as simplicity of transport and storage of the fuel. Alkaline methanol oxidation uses commonly available components and allows a considerable reduction of the costs for production and operation of the cells. The detailed description of this chemical process includes a large number of reactions, multiple intermediates, leading to a mathematical model with many unknown parameters [2–4]. For parameter identification of alkaline methanol oxidation different types of experiments can be used [5,6]. Polarization curves measure stationary voltampere characteristics of the cell. Electrochemical impedance spectroscopy uses a linearization near the stationary point and scans a response of the cell to harmonic oscillations of small amplitude in a wide range of frequencies. In our previous paper [7] we have presented the methods for parameter identification in these types of measurements. Cyclic voltammetry [8] is a different experimental setup, where the cell is subjected to a saw-like voltage variation of high amplitude. These voltage variations clean up the electrode during every period, in this way preventing the electrode poisoning. On the side of parameter identification, however, the problem becomes more difficult, since one needs to integrate numerically stiff non-linear differential equations, instead of just finding the stationary state or testing the linear response of the system. Parameter identification generally uses a non-linear least square method [9,10] to fit the experimental data with the mathematical model. One can also take into account any equality or inequality constraints by methods of nonlinear programming, e.g., interior point method [11]. These methods only find a local optimum and should be enhanced by global strategies to find all relevant solutions. One possibility is an interactive exploration of solution space using metamodeling with radial basis functions [12–14]. Alternatively, instead of interpolating the response, one can directly solve the differential equations, provided that the integrator is sufficiently fast. Interactive exploration can also be enhanced with standard global optimization methods [15–17], including genetic algorithms, differential evolution, simulated annealing, etc. In this paper we use a combination of automatic global methods and interactive parameter study. In Sect. 2 we present the mathematical model behind the alkaline methanol oxidation. In Sect. 3 the experimental measurements are

Mathematical Modeling of Alkaline Methanol Oxidation

183

Fig. 1. The reaction graph. Orange boxes indicate possible decoupled reagents causing the hysteresis effect. Gray colored parts are not included into the model. Table 1. The reaction list.

r1 : OH −

+ Pt

↔ OHad

+ e−

r2 : CH3 OH

+ Pt

↔ CH3 OHad

r3 : CH3 OHad + 3OHad ↔ CHOad

+ 3H2 O

r4 : CHOad

+ OHad → COad

+ H2 O

r5 : COad

+ 2OHad → CO2

+ H2 O + 2P t

r7 : CHOad

+ 2OHad → COOHad + H2 O + P t

r8 : COOHad + e− r9 : COad

→ HCOO −

+ OHad → COOHad + P t

r10 : COOHad + OHad → CO2 r12 : OH

+ Pt



+ H2 O + 2P t + H2 O + e−

+ OHad ↔ P tO

Table 2. Numeration and values for the model variables and constants.

Variables θ1

Concentrations Constants Values

OHad

F

9.649 · 104 C/mol

θ2 CH3 OHad c1

OH −

R

8.314 J/(K mol)

θ3 CHOad c2

CH3 OH

A

2.376 · 10−5 m2

H2 O

Cdl

1.899 · 10−4 F

Cact

8.523 · 10−5 mol/m2

θ4

COad

θ5 COOHad θ6

P tO

c3

α

0.5

184

T. Clees et al.

described. In Sect. 4 the details on parameter identification methods are given. Section 5 presents the obtained results.

2

The Model

The elementary reactions in the electrochemical alkaline methanol oxidation process have been discussed in our paper [1]. Further we use only those parts, which are tested to be most promising for description of the experimentally observable data. The transformation of reagents is schematically shown in Fig. 1 and the corresponding elementary reactions are listed in Table 1. The reagents adsorbed on the electrode (subscript “ad”) are represented by the surface coverage variables θ1..6 , while the reagents in the solvent are represented by the constant fractions values c1..3 . In particular, in the considered experiments, the values c1 are set to 0.1, 0.5, 1.0, c2 – to 0.5, 0.75, 1.0, which equals to the concentrations of alkaline and methanol in [M ] = [mol/l]. The solvent is represented by c3 = 1. The assignment of the reagents is given in Table 2. The rates for every particular elementary reaction are described as follows: r1 = k1 c1 θ0 − k−1 θ1 , r2 = k2 c2 θ0 − k−2 θ2 , r3 = k3 θ2 θ13 − k−3 θ3 c33 ,

(1)

k5 θ4 θ12 ,

r4 = k4 θ3 θ1 , r5 = r7 = k7 θ3 θ12 , r8 = k8 θ5 ,

r9 = k9 θ4 θ1 , r10 = k10 θ5 θ1 , r12 = k12 c1 θ1 − k−12 c3 θ6 , where ki are reaction constants. The model directly encodes molecular reactions in terms of probabilities of collision, e.g., in reaction r4 , the term θ3 θ1 corresponds to a probability, that one CHO-particle meets one OH-particle, while, in reaction r5 , the term θ4 θ12 describes the probability of interaction between one of CO-particles and two OH-particles. The variables θi are changed in the range [0, 1]. The variable θ0 is left for non-covered surface of the electrode and can be 6 found from normalization 0 θi = 1. The reaction coefficients for the electron exchange are defined by Tafel equation: k1 = k10 exp(αβη), 0 k−1 = k−1 exp(−(1 − α)βη), 0 k8 = k8 exp(−(1 − α)βη), 0 k12 = k12 exp(αβη), 0 k−12 = k−12 exp(−(1 − α)βη), β = F/(RT ).

(2)

Mathematical Modeling of Alkaline Methanol Oxidation

185

where R is the universal gas constant, T is the absolute temperature and α is the charge transfer coefficient. The remaining coefficients for the reactions without electron exchange are considered as constant. So, the parameters of the fit are the constants ki0 for electrochemical reactions and ki for other reactions, 14 in total. They are given in the same units as reaction rates ri , in [mol/(m2 s)]. Generally, the constants are constrained by positivity condition only. Counting the stoichiometric coefficients of the reagents in the reactions, we obtain the following molar and charge balance conditions: F1 = (r1 − 3r3 − r4 − 2r5 − 2r7 − r9 − r10 − r12 )/Cact , F2 = (r2 − r3 )/Cact , F3 = (r3 − r4 − r7 )/Cact ,

(3)

F4 = (r4 − r5 − r9 )/Cact , F5 = (r7 − r8 + r9 − r10 )/Cact , F6 = r12 /Cact , F7 = (−r1 + r8 − r12 ) · F A/Cdl , where ri are reaction rates, Fi are production rates, F1..6 – for adsorbed reagents, F7 – for electrons. The constants, participating in these equations, are: Cact – concentration of P t catalyst on the surface of the electrode, F – Faraday constant, A – geometric electrode area, Cdl – cell capacitance. The values for the universal and measured model constants are given in Table 2. The value of the temperature, measured in every experiment, has been extracted from the corresponding data files; it varies slightly in the range 300K...303K. The balance conditions allow to describe the kinetics of alkaline methanol oxidation by a closed system of differential equations: dθi /dt = Fi (θ, η), i = 1 ... 6,

(4)

dη/dt = F7 (θ, η) + Icell /Cdl , where the electrode potential η is set in the experiments and is considered as a given function of time t, while the cell current Icell is considered as a predicted value and can be compared with the measured values. In particular, in the fitting procedure, the distance between predicted and measured current values should be minimized: 1/2   exp 2 (Icell,i − Icell,i ) . (5) L2 = i

186

T. Clees et al.

Fig. 2. Cyclic voltammetry: the experimental setup, consisting of a teflon cell (white) under deep vacuum, the rotating working electrode (in the center of the cell cover), the counter electrode (red plug right), the reference electrodes (black plug), the temperature sensor (red plug left), argon blow supply (blue pipes), [1].

Fig. 3. Cyclic voltammetry. From left to right: voltage profile, current profile, voltampere characteristics with hysteresis effect. The last period is shown by cyan line.

3

The Experiments

The experimental cell setup is shown in Fig. 2. The cell is made of teflon and put under a deep vacuum, to avoid external influences. The working electrode is a disk, rotating at a high speed, 500 rpm in our experiments. Under these conditions the diffusion effects are strongly suppressed. The working electrode is coated with a platinum catalyst ink and an ionomer and is electrochemically cleaned before each measurement cycle. Permanent argon blow is applied to remove the formed CO2 from the cell. The counter electrode is made of a platinum wire, while the reference electrode is a Hg/HgO one. The potentials η are recalculated with respect to a normal hydrogen electrode. In the experiments, the voltage is set and the cell current is measured. The voltage profile has a periodical saw-like shape with a slew rate of 5 mV/s. The resulting voltage-current

Mathematical Modeling of Alkaline Methanol Oxidation

0.006

0.006

0.006

0.004

0.004

0.004

0.002

0.002

0.002

0.000

0.000 0.6

0.4

0.2

0.0

0.2

0.4

0.000 0.6

0.4

0.2

0.0

0.2

0.4

0.006

0.006

0.006

0.004

0.004

0.004

0.002

0.002

0.002

0.000

0.000 0.6

0.4

0.2

0.0

0.2

0.4

0.4

0.2

0.0

0.2

0.4

0.006

0.006

0.004

0.004

0.004

0.002

0.002

0.002

0.000 0.6

0.4

0.2

0.0

0.2

0.4

0.6

0.4

0.2

0.0

0.2

0.4

0.6

0.4

0.2

0.0

0.2

0.4

0.6

0.4

0.2

0.0

0.2

0.4

0.000 0.6

0.006

0.000

187

0.000 0.6

0.4

0.2

0.0

0.2

0.4

Fig. 4. Cyclic voltammogramms of 9 experiments. From left to right, the concentration of alkaline KOH is set to c1 = {0.1, 0.5, 1.0}M , from bottom to top, the concentration of methanol CH3 OH is set to c2 = {0.5, 0.75, 1.0}M . Horizontal axes represent the voltage in Volts, vertical axes – the cell current in Amperes. Blue points are experimental data. Red lines show the best fit by the model with reaction constants reconstructed separately for each experiment. Green lines show an attempt of simultaneous fit of all experiments by the same set of reaction constants.

curve is called cyclic voltammogramm (CV), see Fig. 3. Every experiment contains 5 full periods, each comprising 200 time-equidistant measurements of the cell current. The scatter in the CV curve over the periods is small, however, the points from the last period, i.e., the most converged one, are used for the fitting, for which the difference from the curve of the previous period is negligible. In Fig. 4 the measured CV data for all periods are shown by blue points, the modeled curves are shown by red and green lines. The reagent concentrations in the experiments, shown on the image, are set as follows. From left to right, the

188

T. Clees et al.

1.0

1.0

1.0

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

0.0

600

700

800

900

1000

1100

0.0

600

700

800

900

1000

1100

0.0

1.0

1.0

1.0

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

0.0

600

700

800

900

1000

1100

0.0

600

700

800

900

1000

1100

0.0

1.0

1.0

1.0

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

0.0

600

700

800

900

1000

1100

0.0

600

700

800

900

1000

1100

0.0

600

700

800

900

1000

1100

600

700

800

900

1000

1100

600

700

800

900

1000

1100

Fig. 5. Reconstructed evolution of surface coverages for the best fit. The setting of concentration is the same as on the previous figure. Horizontal axes represent time in seconds, in the range of one period. Vertical axes represent the surface coverages. The color encodes: θ1..6 – red, green, blue, cyan, magenta, brown, θ0 – black. It is visible that in the middle of each plot, in the region of high voltages, where the current vanishes, the electrode is completely covered by P tO (brown) and COOH (magenta). See the discussion in the text for more details on the evolution of intermediates.

alkaline KOH is set to c1 = {0.1, 0.5, 1.0}M , from bottom to top, the methanol CH3 OH is set to c2 = {0.5, 0.75, 1.0}M . Surface coverage profiles θi (t) are generally not measurable. Although their rough estimation can be done with the aid of Fourier Transform Infrared Spectroscopy (FTIR, [18]), the precision of this approach is not sufficient yet. The usual way to reconstruct the kinetics is the model based parameter identification.

Mathematical Modeling of Alkaline Methanol Oxidation

189

Fig. 6. The interactive manipulator.

Fig. 7. A possible structure of solutions, explaining the properties of independent and simultaneous fits. Three experiments (exp1, 2, 3) possess strongly stretched error ellipsoids (orange) of independent fits. They intersect in a compact region (green), containing the true result of a simultaneous fit. However, the intersection is located in a failure domain of the integrator (blue dashed). Thus, the result of a simultaneous fit is located in the inaccessible domain, while the results of independent fits show a good match.

4

The Parameter Identification Procedure

For parameter identification in cyclic voltammetry of alkaline methanol oxidation we have developed a multilevel procedure, comprising automatic global optimization methods, traditional Monte Carlo and interactive parameter study. The implementation is performed by means of Mathematica [19], more details on the methodology can be found in our paper [1].

190

T. Clees et al.

NDSolve algorithm is used for numerical solution of the differential equations. The algorithm internally evaluates an error of solution by means of Richardson’s formula: e = |y2 − y1 |/(2p − 1), where p is the order of the integration method, |y2 −y1 | is a difference of integration results with a single step h and two half-steps h/2. The step is selected adaptively to keep the estimated error in the specified precision range. In addition, the stiffness of the system is evaluated on the basis of eigenvalues of Jacobi matrix. Dependent on the estimated stiffness, the algorithm switches between explicit and implicit methods. The explicit methods have less computational cost per step, but require small steps for stability. The implicit methods have greater effort per step, but can take larger steps. Generally, for stiff systems the implicit methods are preferred. Manipulate algorithm is a tool for interactive parameter study. It represents a model, e.g., a formula, a program, a plot, depending on a number of parameters. The parameters are controlled by sliders, which can be shifted manually or automatically in animation. Every time when the values of control parameters are changed, the model is reevaluated and the displayed results are updated. Figure 6 shows such a manipulator used for interactive parameter study of alkaline methanol oxidation. The manipulators control the reaction constants, the plots present the resulting CV curve superimposed on the experimental data and the evolution of surface coverages in one period. The underlying model is the integrator of differential equations governing the electrochemical kinetics of the process. The tool allows to explore solution space, immediately observing the influence of the parameters, various features and effects in the results and compare the modeled results with the measured data. NMinimize algorithm is used for automatic global optimization. It contains a collection of derivative free global optimization methods and evaluates performance criteria allowing to switch between them automatically. Being applied to our problem, minimization of L2 -norm between the modeled and the experimental shapes of the cyclic voltammograms, it requires 5000 iterations and 30 min (on 3 GHz CPU) for convergence. The quality of the minimum is usually comparable with the other methods. However, in the parameter identification problems with several deep local minima of L2 -norm, all of them may become interesting, not only a single global minimum. Such local minima can reveal hidden discrete symmetries of the problem or can indicate several alternative chemical mechanisms, explaining the same experimental data. Therefore, we have to involve more exhaustive methods for searching alternative solutions. Monte Carlo method uses a random sampling of parameter space and an iterative strategy of its refinement, with the following procedure. At first, a large population of N points in k-space is generated, for which the modeled shapes and L2 -norms are evaluated. Then a multidimensional cloud is selected by L2 < threshold. The threshold is adjusted to have approximately 500 points in the cloud. The cloud is plotted in (ki , kj )-projections for visual inspection. If any interesting structure is visible, the limits are zoomed towards this structure and the procedure is repeated until all interesting structures are extracted.

Mathematical Modeling of Alkaline Methanol Oxidation

191

In our settings, the generation of one population of N = 120000 points requires 6 h (on 3 GHz CPU), and one needs 3–5 iterations for convergence. The advantage of this algorithm is a possibility to branch the iterative process towards several solutions and an availability of a large amount of data, representing the behavior of the L2 -norm in the tested hypervolume. Table 3. The results of the fit. Log const

Experiments 1

2

3

5

6

7

8

9

All

0.906

0.027

−0.326 0.705

0.119

0.525

1.81

0.982

1.33

0.295

p0−1

−6.01

−9.2

−9.16

−7.3

−8.1

−8.19

−7.62

−8.37

−8.2

−9.46

p2

1.19

1.76

1.87

2.33

1.36

1.5

2.27

1.04

1.4

1.35

p−2

0.64

1.66

1.87

1.98

8.12

0.934

1.98

2.04

1.2

2.48

p3

−0.0552 −0.491 −0.383 −0.318 7.29

−0.66

−0.17

−0.3

−0.439 0.635

p−3

−2.94

−4.25

−3.98

−3.85

0.85

−3.94

−3.55

−4.11

−4.21

−2.62

p4

−2.91

−2.63

−2.56

−2.49

−0.556 −2.58

−2.82

−2.66

−2.65

−2.51

p5

−2.68

−0.294 −0.507 −0.653 −7.32

−0.711 −0.673 −0.659 −0.848 0.007

p01

4

p7

−2.84

−2.43

−2.63

−3.05

−4.17

−2.95

−3.01

−3.29

−3.0

−2.41

p08

−11.5

−4.67

−5.35

−5.78

−3.62

−5.73

−9.02

−5.62

−6.08

−6.44

p9

−2.65

−1.73

−2.05

−1.77

−2.45

−3.72

−2.22

−3.62

−3.65

−1.99

p10

−1.75

−5.77

−5.13

−3.27

−7.99

−5.09

−3.34

−5.23

−5.16

−3.5

p012

−5.86

−5.65

−5.93

−5.61

−4.2

−5.67

−5.21

−5.52

−5.82

−6.09

−6.44

−7.33

−7.72

−6.61

−7.43

−7.9

−7.84

−8.49

−8.65

−7.97

1.59

0.894

2.10

2.73

1.48

1.54

3.41

2.07

39.1

p0−12

L2 /[mA] 2.08

Totally: L2 /[mA] = 6.32

5

39.1

The Results

The Monte Carlo direct search phase is the most time-consuming one. So, we do it only once and find the shape matching all experiments only approximately. Then, starting from this shape, we find a better approximation interactively, with the manipulator tool. The fitting procedure on this phase has been performed for every experiment separately. Then we use the fitting results from this phase as a staring point for the automatic global optimization method, first, independently for every experiment, then, starting from the best matching result, for all experiments simultaneously, trying to fit them by a single set of parameters. The modeled CV curves matching experimental points are shown on Fig. 4. We see, that the independent fit (red) gives a very good matching, while the simultaneous fit (green) is much worse. The corresponding values of the reaction coefficients and the resulting L2 -norms are presented in Table 3. For the reaction constants their logarithms are given: pi = log10 (ki /[mol/(m2 s)]).

(6)

192

T. Clees et al.

The columns present the results of 9 independent fits. The numeration of experiments is that the concentration of the methanol c2 = {0.5, 0.75, 1.0}M is varied first in every triple, then the concentration of the alkaline c1 = {0.1, 0.5, 1.0}M is varied between the triples. The last column represents the result of one simultaneous fit with a single parameter set. The L2 -norms given in the last two rows show that the independent fits have a better match than the simultaneous one. The main result we obtained so far is that the independent fit of every experiment by its own set of reaction constants provides an excellent match, both visually and by the L2 -criterion. This fact cannot be a random coincidence, it means that the model really catches all the features of experimentally observable shapes. On the other hand, it is expected that the shapes can be fitted by a single set of reaction constants. This is what we currently cannot confirm in our analysis. Any attempt to fit the shapes with a single set of constants leads to a very poor match. Therefore, at this point we go to the conclusion that the best fit reaction constants depend on the concentrations. This problem definitely requires a deeper analysis and will be further investigated. First of all, the fitting procedure shows that the variation of parameters along some directions in parameter space does not change the L2 -criterion. This means that the result in Table 3 is not a unique answer. A sensitivity analysis should be performed, which will provide an error estimation for the fitting parameters and enclose every solution by an error ellipsoid. The unstable directions are those where the ellipsoid becomes stretched out. Different experiments done at different concentrations will produce different ellipsoids. The useful opportunity is that the intersection of strongly stretched ellipsoids can produce much compact localization of the solution, in this way different experiments can fix the unstable directions and compensate the large errors present in single experiments. Secondly, the integrator sometimes fails, which is not unusual for the very stiff systems considered here. There can be a hole in parameter space, where presumably a better match can be located, as shown schematically on Fig. 7. As a result, the intersection of error ellipsoids can occur in a currently inaccessible region of parameter space. To resolve this problem, several strategies to increase stability of integration can be tried. For instance, some of the differential equations are located close to the equilibrium and they can be constrained to the stationary surface. In this way the order of the system can be reduced and the stability can be improved. On Fig. 5, the evolution of surface coverages during the period is shown. The plots for all experiments have similarities. The evolution starts with the pure methanol (green line), adsorbed on the platinum electrode (black line). Then, the other intermediates appear, with clearly dominating peak of hydroxyl adsorbed (red line). Then, the hydroxyl is replaced very fast by P tO (brown line), and on the halfperiod, when the voltage starts to fall back, the electrode is completely covered by P tO and, for experiments 2, 3, 6, 9, also by a portion of COOHad (magenta line). At this point no current flows through the cell. Then, the P tO becomes dissolved fast, and other intermediates start to occupy the free electrode surface, also resulting in several peaks, but, contrary to the first halfperiod,

Mathematical Modeling of Alkaline Methanol Oxidation

193

without clear domination of the OHad . This time, the peaks for all intermediates are smaller, than in the first halfperiod. Finally, the intermediates disappear and the balance of CH3 OHad and pure P t comes back to the initial state. Thus, the reconstructed dynamics of intermediates provides a deeper understanding of the complex processes in electrochemistry of alkaline methanol oxidation. One more detail, visible on the plots, is that the smaller peaks of intermediates on the way back correspond to the smaller shifted current peak on the lower part of all CV curves. This behavior, the large difference between the upper and the lower part of the CV curve, represents the hysteresis effect. In our work [1] the hysteresis effect has been analyzed in more details and its relationship to the degeneracy of the system matrix has been shown. The matrix becomes degenerate in a particular way, via decoupling of the reactions in the branching points of the reaction graph, shown by orange frames on Fig. 1. Namely, the presence of a reagent, weakly coupled to the rest of reactions means that all reactions involving this reagent have small reaction constants, i.e., are slow. Although this reagent is weakly coupled, it can occupy the free surface of the electrode and influence the dynamics through the θ0 -variable, in this way producing the hysteresis effect.

6

Conclusion

An electrochemical kinetic model of alkaline methanol oxidation has been considered. This process is relevant for the design of the efficient direct methanol fuel cells, providing a great advantage in safety and storage compared to the hydrogen-oxygen ones. These cells allow the use of affordable electrodes and possess high energy density especially suitable for portable applications. The mathematical model of the oxidation process has been investigated. The model includes a system of non-linear differential equations of high order, possessing 14 unknown reaction constants and 6 dynamic variables describing surface coverages of the intermediates. The reconstruction of the dynamical behavior of these variables is the main purpose of parameter identification, since they reflect the underlying electrochemical kinetics and cannot be measured directly. The parameter identification procedure comprises numerical integration of the system of differential equations, automatic global minimization of the distance between measured and modeled cyclic voltammograms, iterative Monte Carlo search and interactive parameter study. The developed methods have been applied to 9 cyclic voltammograms of the cells with different concentrations of the alkaline and the fuel. The reaction constants have been reconstructed, their dependence on concentrations has been discussed. The independent fit of every experiment by its own set of reaction constants provides an excellent match, both visually and by L2 -criterion. On the other hand, the simultaneous fit of the shapes with a single set of constants is much worse. A deeper analysis of this effect, as well as a sensitivity analysis and the improvement of integrator stability are in our further plans.

194

T. Clees et al.

Dynamic behavior of the system in form of the reconstructed evolution of the intermediates has been presented. The forward evolution starts with adsorption of methanol, then various intermediates come and go in waves, ending in complete coverage of the electrode by platinum oxide. The backward evolution repeats the same sequence in reverse order, but the waves have smaller amplitude, being inhibited by a slow dissociation of platinum oxide on the electrode. The difference between forward and backward evolutions reflects itself as a hysteresis effect in the volt-ampere characteristics of the cell. Acknowledgment. The authors are grateful to the organizers and participants of SIMULTECH 2018 conference for fruitful discussions. The authors thank also Kira Konich and Kevin Reinartz for proofreading the paper. The work has been partially supported by German Federal Ministry for Economic Affairs and Energy, project BMWI-0324019A, MathEnergy: Mathematical Key Technologies for Evolving Energy Grids and by the German Bundesland North Rhine-Westphalia using fundings from the European Regional Development Fund, grant Nr. EFRE-0800063, project ES-FLEXINFRA.

References 1. Clees, T., Nikitin, I., Nikitina, L., Pott, S., Krewer, U., Haisch, T.: Parameter identification in cyclic voltammetry of alkaline methanol oxidation. In: Proceedings of the SIMULTECH 2018, Porto, Portugal, 29–31 July 2018, pp. 279–288 (2018) 2. Krewer, U., Vidakovic-Koch, T., Rihko-Struckmann, L.: Electrochemical oxidation of carbon-containing fuels and their dynamics in low-temperature fuel cells. ChemPhysChem 12, 2518–2544 (2011) 3. Krewer, U., Christov, M., Vidakovic, T., Sundmacher, K.: Impedance spectroscopic analysis of the electrochemical methanol oxidation kinetics. J. Electroanal. Chem. 589, 148–159 (2006) 4. Beden, B., Kardigan, F., Lamy, C., Leger, J.M.: Oxidation of methanol on a platinum electrode in alkaline medium: effect of metal ad-atoms on the electrocatalytic activity. J. Electroanal. Chem. 142, 171–190 (1982) 5. Ciucci, F.: Revisiting parameter identification in electrochemical impedance spectroscopy: weighted least squares and optimal experimental design. Electrochimica Acta 87, 532–545 (2013) 6. Gamry Instruments, Basics of Electrochemical Impedance Spectroscopy, online tutorial. http://www.gamry.com/application-notes/EIS/basics-ofelectrochemical-impedance-spectroscopy 7. Clees, T., Nikitin, I., Nikitina, L., Steffes-lai, D., Pott, S., Krewer, U., Windorfer, T.: Electrochemical impedance spectroscopy of alkaline methanol oxidation. In: Proceedings of the INFOCOMP 2017, The Seventh International Conference on Advanced Communications and Computation, pp. 46–51, IARIA (2017) 8. Bard, A.J., Faulkner, L.R.: Electrochemical Methods: Fundamentals and Applications. Wiley, Hoboken (2000) 9. Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in C. Cambridge University Press, Cambridge (1992). Chap. 15 10. Strutz, T.: Data Fitting and Uncertainty: A Practical Introduction to Weighted Least Squares and Beyond. Springer (2016)

Mathematical Modeling of Alkaline Methanol Oxidation

195

11. W¨ achter, A., Biegler, L.T.: On the implementation of an interior-point filter linesearch algorithm for large-scale nonlinear programming. Math. Program. 106, 25– 57 (2006) 12. Nikitin, I., Nikitina, L., Clees, T.: Stochastic analysis and nonlinear metamodeling of crash test simulations and their application in automotive design. In: Browning, J.E. (ed.) Computational Engineering: Design, Development, and Applications, pp. 51–74. Nova Science Publishers, New York (2012) 13. Clees, T., Hornung, N., Nikitin, I., Nikitina, L., Steffes-lai, D., Klimenko, S.: Focused ultrasonic therapy planning: metamodeling, optimization, visualization. J. Comput. Sci. 5(6), 891–897 (2014) 14. Clees, T., Nikitin, I., Nikitina, L., Pott, S.: Quasi-Monte Carlo and RBF metamodeling for quantile estimation in river bed morphodynamics. In: Obaidat, M.S., et al. (eds.) Simulation and Modeling Methodologies, Technologies and Applications. Advances in Intelligent Systems and Computing, vol. 319, pp. 211–222. Springer, Cham (2014) 15. B¨ ack, T.: Evolutionary Algorithms in Theory and Practice. Oxford University Press, New York (1996) 16. Ilonen, J., Kamarainen, J.K., Lampinen, J.: Differential evolution training algorithm for feed forward neural networks. Neural Process. Lett. 17, 93–105 (2003) 17. Otten, R.H.J.M., van Ginneken, L.P.P.P.: The Annealing Algorithm. Kluwer (1989) 18. Griffiths, P., de Hasseth, J.A.: Fourier Transform Infrared Spectrometry. WileyBlackwell, Hoboken (2007) 19. Mathematica 11, Reference Manual. http://reference.wolfram.com

Author Index

A Amantea, Ilaria Angela, 20 Argáez, Carlos, 83

L Lichtenberg, Gerwald, 126

B Benedikt, Martin, 101

N Nikitin, Igor, 181 Nikitina, Lialia, 181 Nores, Martín López, 54

C Clees, Tanja, 181 D Di Leva, Antonio, 20 E Ewert, Sigrid, 153 G Genser, Simon, 101 Giesl, Peter, 83 Guedj, Cyril, 1 H Hafstein, Sigurdur, 83 Haisch, Theresa, 181 J Jaillet, Léonard, 1 Jingili, Nuru, 153 K Krewer, Ulrike, 181 Kruppa, Kai, 126

O Obaidat, M. S., 39 Omheni, N., 39 P Portabales, Antón Román, 54 Pott, Sabine, 181 R Redon, Stéphane, 1 Rousse, François, 1 S Sadoun, B., 39 Sanders, Ian, 153 Sulis, Emilio, 20 Z Zarai, F., 39

© Springer Nature Switzerland AG 2020 M. S. Obaidat et al. (Eds.): SIMULTECH 2018, AISC 947, p. 197, 2020. https://doi.org/10.1007/978-3-030-35944-7