Full text
Communication free synchronization of colliding robots University of California, San Diego Mechanical and Aerospace Engineering (MAE) Universitat Polit`ecnica de Catalunya Degree in Mathematics - Degree in Engineering Physics Guillem Pascual Astivill Bachelor Thesis Supervisor (UCSD MAE): Sonia Mart´ınez Co-supervisor (UPC): Jaume Franch Bullich May 2024
Abstract Catal`a En aquest treball, es presenta un entorn experimental que considera un grup de robots rotatoris dins d’un receptacle rectangular, el qual mostra un comportament sincronitzat altament robust sense necessitat d’intercommunicaci´o entre agents, nom´es mitjan¸cant col·lisions amb l’entorn. Aquest entorn ser`a analitzat amb um model matem`atic dissenyat a partir de la interconnexi´o de diferents sistemes din`amics h´ıbrids, per tal d’entendre el seu comportament. Amb aquest model, es demostren resultats sobre l’estabilitat de la seva sincronitzaci´o, la caracteritzaci´o dels punts d’equilibri i la seva robustesa per al cas d’un nombre redu¨ıt d’agents aix´ı com per un nombre arbitrari. Mitjan¸cant l’eina de Matlab HyEq Toolbox, el model es implementat en una simulaci´o num`erica que permet visualitzar el comportament del sistema per un nombre elevat d’agents i repeticions. Tamb´e es realitza un an`alisi de la representaci´o de l’operador de Koopman del sistema utilitzant una xarxa neuronal per tal de completar l’imatge del sistema. Paraules clau: Sincronitzaci´o, Comportament Col·lectiu, Sistema Din`amic H´ıbrid, Rob`otica, Operador de Koopman, Xarxes Neuronals Espa˜nol En este trabajo, se presenta un entorno experimental que considera un grupo de robots rotatorios dentro de un recept´aculo rectangular, el cual muestra un comportamiento sincronizado altamente robusto sin necesidad de intercomunicaci´on entre agentes, solo mediante colisiones con el entorno. Este entorno ser´a analizado con un modelo matem´atico dise˜nado a partir de la interconexi´on de diferentes sistemas din´amicos h´ıbridos, para entender su comportamiento. Con este modelo, se demuestran resultados sobre la estabilidad de su sincronizaci´on, la caracterizaci´on de los puntos de equilibrio y su robustez para el caso de un n´umero reducido de agentes as´ı como para un n´umero arbitrario. Mediante la herramienta de Matlab HyEq Toolbox, el modelo es implementado en una simulaci´on num´erica que permite visualizar el comportamiento del sistema para un n´umero elevado de agentes y repeticiones. Tambi´en se realiza un an´alisis de la representaci´on del operador de Koopman del sistema utilizando una red neuronal para completar la imagen del sistema. Palabras clave: Sincronizaci´on, Comportamiento Colectivo, Sistema Din´amico H´ıbrido, Rob´otica, Operador de Koopman, Redes Neuronales
English In this work, an experimental setting considering a group of rotating robots inside a rectangular box is presented, the highly robust synchronized behavior that it shows provides a perfect example of collective behavior without communication, just by colliding with the environment. A mathematical model consisting of a hybrid dynamical system interconnection is presented as a way to analyze the system and learn its dynamics. From that model, results regarding the stability of its synchronization as well as the characterization of some equilibrium points and its robustness are proved for a reduced and an arbitrary number of robots. A numerical simulation of the system is implemented in Matlab, and the results are presented to showcase the behavior of the system, as well as an analysis of its Koopman Operator representation using a Neural Network. Keywords: Synchronization, Collective Behavior, Hybrid Dynamical System, Robotics, Koopman Operator, Neural Networks AMS Code: 37N35,37C83,70G60. 2
Acknowledgements First of all, I want to thank Professors Sonia Mart´ınez and Nick Gravish for their supprt during my stay at UC San Diego, for creating such a good working environment and motivating me to continue my academic journey here. I also want to thank Rundong Yang, and Masih Haseli, who have helped me whenever I needed advice. All this could not be possible without CFIS, thanks for all this years at UPC, which culminate with this work, its been a long path with a lot of great people in it, friends and professors. Finally, I want to mention my family and friends both in Barcelona and in San Diego, for always finding a way to make my day brighter.
Contents 1 Introduction 3 1.1 Motivation .................................... 3 1.2 LiteratureReview ................................ 3 1.3 ProblemStatement................................ 5 1.4 PhysicalScenario................................. 5 1.5 Theoretical Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.1 HybridSystems.............................. 6 1.5.2 KoopmanOperator ........................... 10 1.6 Methodology and Planification . . . . . . . . . . . . . . . . . . . . . . . . . 14 2 System Model 16 2.1 Hybrid System Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2 Discretization................................... 23 2.3 Characterization of Equilibrium Points . . . . . . . . . . . . . . . . . . . . . 40 2.4 N-bead Local Stability of Synchronization . . . . . . . . . . . . . . . . . . . 43 2.5 Robustness .................................... 46 2.6 NumericalSimulation .............................. 48 2.7 ReversedTimeSystem.............................. 51 2.8 ContinuousModel ................................ 53 3 Control 57 3.1 Controlling input signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.2 Movingthecage ................................. 59 4 Koopman Operator Representation 62 4.1 Neural Network Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.2 Results....................................... 65 1
5 Sustainability 68 6 Conclusions 71 6.1 FurtherWork................................... 72 2
1. Introduction 1.1 Motivation Synchronization has since long ago been a matter of scientific interest due to its intriguing properties and vast applications. Classic examples found in nature include flocking birds, schooling fish or swarming insects. The approach that has been taken, centralized or not, highly depends on communication between the agents, which require the robots to have certain capabilities for reception and transmission of information. However, the synchronization of systems that are unable to communicate is still being studied. This question is of great interest since the circumstances where robots act may make impossible any type of communication. With this perspective, a specific group of rotors that undergo synchronization without any communication protocol will be analysed to find its underlying properties. The collective behavior showed by the system is extremely intriguing, and can be beneficial for applications related with surveillance and covering of areas, when the agents of the system are unable to communicate. At the same time, the analysis provides a new framework that can be applied to other scenarios, and opens the door for the design of new systems. 1.2 Literature Review Active matters in swarm are able to organize their collective behaviors and adapt to their environment by various communication methods [1] such as physical [1] chemical [1] and mechanical [2], for which they are usually equipped with a mechanism to receive, send and process information[3]. By applying frequent information exchange and elegant control algotherm, swarms achieved diverse collective behaviors such as orientation consensus by averaging all the neighbors’ orientation[4], self-assemble and intelligent mobility in entirety with assistance of interlock mechanism on each agent[5], flexible formation in external magnetic field[6], self-distribution, collision avoidance[7] and phase-synchronization through feedback coming from force sensors around the unit robots[8]. Recent study has revealed that purely physical collision is able to cause self-organization in both robots and the organism world[9] [10] With gear-like and chiral robot design, such robots with no active control collide and interact with each other frequently in a confined area and exhibit altering collective behaviors and phase transition with the change of density no matter in simulation, external-actuated or self-actuated environment[11] [12] [13] [14] [15] . Some following research even demonstrates a flexible outer boundary which 3
is assembled by a group of agents is able to actively and predictably distribute robots with different chirality[16] [17]. More interestingly, some researchers tried to break the boundary between collision-based swarm robots and individual robots by giving the swarm more mobility. Smarticle[18] is a small scale robot with two randomly flapping arms and a swarm of them in a movable confining circular boundary is able to move to the desired direction under certain control. Buds systems confined in a flexible boundary can traverse complex environments[19]. However, considering the energy efficiency of a swarm system, synchronized gait or motion is preferred and can lead to less power consumption[20]. Hao et.[21] achieved gait synchronization of undulated robots induced by collision by applying adaptive self-oscillator while Wei et. [20]simplify the controller to a pure phase oscillator and verify the synchronization behaviors of undulated robots in between narrow-enough boundaries. But whether unit robots that run constantly in mobile boundaries can achieve synchronization remains unknown and a dynamic system that can generalize the properties and be used for stability proof is still waiting for exploration. A paradigmatic example of such a behavior is showed by the experimental setting provided in this work. The collective behavior achieved by that system is presented alongside with a mathematical model that explains its underlying dynamics. In system and controls literature, synchronization has been present for a long time, showcased by works as [22], which presents the concept of synchronization and is inspired by behavior found in nature such as fireflies synchronization. The study of these systems has relied on results in the field of dynamical systems, studying its evolution over time, its bifurcations, and its behavior under constraints, as explained in [23]. These tools enable the analysis of a wide variety of systems ranging from Huygen’s clocks [24][25], to quantum synchronization [26]. When impacts play a key role in the system, the modelling of the dynamical system becomes challenging. If the agents of the system can implement certain algorithms to handle this collisions, synchronization can be achieved via consensus algorithms [27]. In [28],beads colliding in a ring are designed to slow or speed up when a collision happens. Other related papers are those based on Kuramoto oscillators [29][30]. Such behavior has applications in surveillance that can help control forest fires, as seen in [31]. Bio-inspired algorithms for non oscillating colliding systems also show collective behavior as the one in [32], where robots aggregate in the area with the highest illuminance. For non-algorithmically ruled systems without communication, if the number of agents is very large, mean-field approximations can be taken, such as in [33], to avoid the complexity of interconnecting a high number of systems. In a similar way, Langevin equations are used to analyse the collective behavior of rotating robots [34][13]. In the setting presented in this paper, the number of robots present in the system can be as small as two, so mean-field approximations must be disregarded. The alterations in the dynamics of the system that the impacts with the moving boundary produce motivate a hybrid system modelling. The main reference in the field of hybrid systems is [35]. A framework for the interconnection of multiple hybrid systems is introduced in [36]. This framework has allowed the incorporation of its synchronization, as seen in [37]. Implementations of the framework presented by hybrid systems for oscillators [38][39][40], prove it to be an effective modelling. However its application to autonomous systems with a wider range of dynamics is still being explored. 4
1.3 Problem Statement The proposed experimental setting consists of a small-scale robot with a rotational eccentric disk which is driven by DC motors. A rigid and movable frame is applied to encircle the swarm so that they can remain in the confined area and interact with each other frequently. The experiment results, explained in Section 1.4 demonstrate that the swarm achieves phase-synchronization quickly and robustly with zero communication and control algorithm. Also, the swarm together with the frame is actually an active unit without transportational limitation. Our goal is to provide a mathematical framework which enable the mathematical analysis of the system. With that framework we aim to provide insights regarding the stability and robustness of the synchronization of the system. The mathematical tools for this modelling will be based on hybrid dynamical systems. The Koopman Operator representation of the system will also be studied to obtain different perspectives of its behavior. At the same time, this model is to be simulated to obtain results for its behavior for a high number of beads and repetitions. 1.4 Physical Scenario The experimental setting has been designed by Rundong Yang and Nick Gravish. The main results and characteristics of it are described in the following. The study began with simulations in PyBullet involving multiple eccentric rotors confined within a rectangular frame, limited to a single row of rotors due to spatial constraints. Despite differing initial phases, the simulations revealed a fascinating phenomenon: the rotors achieved synchronization within a brief time span. This synchronization phenomenon exhibited a pronounced dependence on the friction coefficients governing both the rotors and the frame. Transitioning from simulations to real experiments, the researchers employed carefully selected friction coefficients based on simulation results. These experiments offered a detailed exploration of the transition from random phases to synchronization, shedding light on the underlying mechanisms driving this process, as showed in Figure 1.1. Figure 1.1: Schematic of the stages of the physical system. Expanding the investigation, the researchers delved into the impact of the frame’s size on various parameters, including synchronization stability, synchronization time, and the overall system’s locomotion. Additional experiments involved examining the role of the frame’s oscillation amplitude by imposing constraints on its movement. Furthermore, 5
Definition 1.5.11. (Koopman Modes) If the set of eigenfunctions {ϕj}∞ j=0 densely fills G ⊆ F. The Koopman expansion of f∈ G is given by: f= ∞ X j=0 vjϕj. Using the evolution of the eigenfunctions, we can also obtain the evolution of any observable with its decomposition. Kk(f) = ∞ X j=0 vjµk jϕj. For the identity functions, this evolution provides the orbits of the system. The infinite dimensionality of the observable space is the main challenge to face when studying the Koopman Operator. Usually, we don’t have enough tools to analyse its representation in the full space so its representation in finite subspaces is used instead, in those cases, one works with the projection of the operator, trying to minimize the amount of information that is lost. We’ll simplify working with the Koopman operator on finite-dimensional spaces using some notation, as done in [42]. Let Ψ : X→Csbe a vector map written as Ψ(·) = [ψ1(·), . . . , ψs(·)]T, where each ψi:X→C. We define span(Ψ) as the set of all possible combinations of ψ1, . . . , ψsand denote the Koopman operator’s action on Ψ as KΨ := [Kψ1, . . . , Kψs]T= Ψ ◦T, where Trepresents an operation. The basis of H⊂Fwill be described using a vector map Φ : X→Cdim(H), such that His the span of Φ. A key property of finite-dimensional Koopman-invariant subspaces is that we can represent the operator’s action with a matrix once we have a basis. Specifically, for an invariant subspace S⊆Fwith basis Ψ : X→Cdim(S), there exists a unique matrix K∈Cdim(S)×dim(S)such that KΨ=Ψ◦T. This matrix representation allows us to easily compute the operator’s effect on any function within S. If we have a function f∈Srepresented as f(·) = wTΨ(·), where w∈Cdim(S), then the operator’s effect on f, denoted as Kf, is given by Kf=wTKΨ. The idea of subspace invariance enables us to work with finite-dimensional subspaces and use numerical matrix techniques for predictions. Even if a subspace S⊆Fisn’t invariant under K, we can still approximate K’s action on Susing the concept of subspace invariance. This involves using an orthogonal projection operator PS:F→Fonto S. By applying PSto K, we get an approximation matrix Kapprox, allowing us to approximate K’s action on Sas KΨ≈ PSKΨ = KapproxΨ. Data Driven Methods We often encounter situations where the dynamics of the system are not known beforehand, and our only available information comes from observing the system’s trajectories. Data driven methods use sampling of the system trajectories to obtain an approximation of the Koopman Operator. One of the main methods is the Extended Dynamic Mode Decomposition (EDMD). This method considers a set of snapshots pairs of data from the system trajectories {xi, yi}M i=1, where Mis the number of samples, and such that S(xi) = yi. For a given set of basis functions Ψ = {ψ1, ..., ψN}, with ψj∈ F \ {0}, the 12
next data matrices are defined: D(X) = ψ1(x1)ψ2(x1)··· ψN(x1) ψ1(x2)ψ2(x2)··· ψN(x2) . . .. . ..... . . ψ1(xM)ψ2(xM)··· ψN(xM) D(Y) = ψ1(y1)ψ2(y1)··· ψN(y1) ψ1(y2)ψ2(y2)··· ψN(y2) . . .. . ..... . . ψ1(yM)ψ2(yM)··· ψN(yM) . The Koopman Operator Kassociated with the basis {ψj}N j=0 is computed from the data by minimizing the next expression. min K∥D(Y)−D(X)K∥F. Its minimizer has the next closed expression: KEDMD =D(X)†D(Y). Where D(X)†denotes the Moore-Penrose pseudoinverse of the matrix D(X). Assumption 1.5.1. (Full Rank Dictionary Matrices):D(X)and D(Y)have full row rank. Note that this implies that the elements of Ψ are linearly independent. It also suggests that the data in Xand X+are sufficiently diverse to differentiate between functions in span(Ψ). The matrix KEDMD captures essential information about the system’s behavior and can be utilized to approximate the action of the Koopman operator on span(Ψ). Formally, we define the EDMD predictor of KΨ, and the predictor for an arbitrary function f∈span(Ψ) with description f(·) = wTΨ(·) for w∈CNΨas: PEDMD Kψ:= KEDMDΨ,PEDMD Kf:= wTKEDMDΨ. The predictors are special cases of approximations, where the orthogonal projection corresponds to the L2(µX) inner product, with the empirical measure: µX=1 N N X i=1 δxi,(1.6) where δxiis the Dirac measure defined on the ith column of X. The quality of predictors depends on the quality of span(Ψ) in terms of being close to invariant under K. If span(Ψ) is invariant under K, then the predictors are exact. Determining closeness to invariance necessitates an appropriate metric, which is introduced in the following. Approximation Quality To check how accurate the approximation is, the consistency index will be used. This measure, introduced in [43], which relies on utilizing EDMD both forward and backward in time, has several advantageous characteristics that make it suitable for data-driven modeling of dynamic systems: it assesses the function space’s quality, remains invariant 13
regardless of the basis chosen, can be computed analytically from the available data, and offers a precise upper bound for the relative root mean square error across all function predictions throughout the entire dictionary span. Defining the forward KFand backward KBEDMD solutions as: KF=D(X)†D(Y), KB=D(Y)†D(X). If the dictionary spans a Koopman-invariant subspace, then: KFKB=I. From there, the next concepts are defined. Definition 1.5.12. Given a dictionary Dand data matrices (X, Y ), the consistency matrix is Mc(D, X, Y ) = I−KFKBand the consistency index is Ic(D, X, Y ) = λmax(Mc(D, X, Y )). The intuition behind the consistency index lies in the Koopman-invariance of span(Ψ). When this span is Koopman-invariant, the forward and backward EDMD matrices KFand KBbecome inverses of each other. Otherwise, their product will deviate from the identity matrix, and the consistency index serves as a measure of this deviation. Importantly, the consistency index is straightforward to compute based on data and depends solely on the vector space, independent of the specific basis chosen. The following theorem presents a key property relevant to our discussion: Theorem 1.5.1. √IC Bounds the Relative L2-norm error for EDMD’s Koopman Predictions. Given that dictionary Ψfullfills the Assumption 1.5.1, data matrices X,Y, and the empirical measure 1.6: √IC(Ψ, X, Y ) = max f∈span(Ψ) ∥Kf−PEDMD Kf∥L2(µX) ∥Kf∥L2(µX) , where the maximum is taken over all functions where the denominator is nonzero (indicating prediction error). Theorem 1.5.1 provides a crucial tool for approximating Koopman-invariant subspaces. The consistency index offers a closed-form formula suitable as a cost function in datadriven dictionary learning. The consistency index remains independent of the choice of the basis, offering a tight upper bound for the relative prediction error across all functions in the space. Observation 1. An expression for the invariance proximity for general inner product spaces is defined in [44] using Jordan principle angles. 1.6 Methodology and Planification The way the problem will be approached will be the following. 14
2023 2024 Sep Oct Nov Dec Jan Feb Mar Apr May Experimental setting analysis Litterature review on modelling Model development Analytical Proofs Numerical Simulation Koopman Operator Theory Neural Network Implementation Thesis Writing Figure 1.3: Gantt Chart for project planification After studying the characteristics and results of the experimental setting a mathematical model for the system will be analytically developed. The main idea is to make the model as simple as possible but preserving the key properties of the experimental one, such as the way it synchronizes. This way, we will be able to apply analytical tools to proof properties of the system dynamics. In order to achieve that, the literature regarding modelling of synchronized system will be deeply studied to find the most suitable fit for the experimental setting. Once the model is developed we will implement a simulation in Matlab. These simulations will allow a broader perspective of the model, as we can run a big number of repetitions for any initial conditions. The simulation is a very powerful tool as it can give counterexamples of certain properties of the system, as well as statistics for high number of repetitions can give the mean behavior of the system and can be represented with multiple graphic designs. Once the model and the simulation are developed, the focus will be placed on obtaining mathematical proofs related with the stability of the equilibriums of the system, specially of synchronization. Starting with the study of the system with a low number of agents, the properties will be generalized to an arbitrary number of beads. Finally, other perspectives of the system will be analysed. In particular, we will try to obtain the Koopman Operator representation of the system. This tool, that has been very present in the systems literature recently, offers a way to analyse complex system via data-driven methods. A theoretical understanding of this mathematical object is crucial to study its representation, which will be achieved via the study of the state of the art literature. Masih Haseli, postdoctoral student at UC San Diego, will be guiding our steps through the intricacies of the Koopman Operator. Once we have understood its functioning, a Neural Network will be used to implement Data-Driven methods. The results will be compared with the model and analysed to see how do they explain the system behavior. With all these insights of the system we hope to give a complete image of its dynamics. A Gantt diagram representing the planification of the work is shown in Figure 1.3. 15
2. System Model To analyse the experimental results from a mathematical point of view a model will be introduced which shows equivalent synchronization properties. The change in behaviour of the system due to the impacts with the boundary motivates a model with hybrid dynamics formalism. In particular, we will model each rotor as a hybrid system and they will be interconnected through a coupling signal. The first step is to model rotors as points in space, which will be named beads. We will take the two dimensional box as the reference frame, so the beads move in between two boundaries that are separated a distance R. The dynamics that rotors follow have two variables evolving in time: the position between the boundaries of the box, which will be introduced as the variable (h) and their phase, which will be introduced as the internal clock (τ). The rotation has constant speed, and when the rotor hits a boundary this speed is decreased. When the rotor reaches a certain phase (τmax) it separates again from the boundary, that is, it reverses its position motion in between boundaries. Intuitively, we can think of beads as systems that have two variables that evolve linearly but with different speeds depending on its position and the position of the other beads. Once this two variables reach a maximum value their speed is reversed, so they move in the opposite direction. This reversal can be understood as a reset, in the same way as the model for fireflies synchronization presented in [35] where the internal clocks are reset once they reach a maximum value. In this case however, we have two variables and changes in speed due to the interconnection of the systems. To allow the beads to reverse direction we will add a third variable that will be discrete, and will correspond to the direction of motion d, this variable will change when beads reach their maximum value of position and phase. Finally, the systems have to be coupled so that the position of each one affects the dynamics of the others. To do so, a coupling signal M(t) is defined, so that it acts as an input to each of the systems. A Diagram of the system is shown in Figure 2.1 In the next section the formal definition of the system is introduced. 2.1 Hybrid System Formulation To describe the system of nbeads, we will use a state vector: 16
= = = = = = Figure 2.1: Diagram showing the behavior of the hybrid system. Each pair of circles represent one of the interconnected systems, which change the direction of their speed with the jump function gi(yi). When the jumps of all the systems coincide the system is synchronized. x= y1 . . . yn ∈R3n, where each yi,i∈ {1, ..., n}=Vdescribes the state of a specific bead in the following way: yi= hi τi di . Here, hi∈[0, R], R∈R≥0 represents the position of the bead in between boundaries. τi∈[0, τmax] , τmax ∈R≥0 represents the value of the internal clock of the bead, and di∈ {−1,1}represents the direction in which the bead is moving, 1 corresponds to upward direction and −1 to downward. Thus, the coordinates of a bead are contained in the triplet yi= (hi, τi, di)∈[0, R]×[0, τmax]×{−1,1}=C. We will use the notation vi=˙ hifor spatial speed and wi= ˙τifor the clock speed. The state of the system are the ninstances of these coordinates, one for each bead. In order to analyze the synchronization of the system, ninterconnected hybrid systems Hiwill be defined, each one of the form: Hi:(˙y=F(y, M(t)), y ∈C y+=g(y), y ∈D. (2.1) The input signal M∈ {−1,0,1}will depend on the position of all the beads. Defining U(t) as the number of beads in the upper boundary h=R, and L(t) as the number of beads in the lower boundary h= 0. The values of M(t) are the following: 17
M(t) : 1if U(t)> L(t) 0if U(t) = L(t) −1if U(t)< L(t). (2.2) This signal will be used in order to capture the movement of the cage with respect to the beads. The cage is moving upwards when there are more beads in the upper boundary, and downwards if there are more in the lower one. This is how coupling of the beads is enabled. However we introduce it as a new variable to study how variations in M(t) can lead to synchronization. We will define the boundary set as follows: B={y∈C|(h= 0, d =−1) or (h=R, d = 1)} . Which corresponds to the points where the beads are pushing the box. The dynamics F(y, M(t)) of each system will be the following, where (f, α)∈[0,1]2: F(y, M(t)) = 0 α·d 0 , y ∈B, (d−M·f) d 0 , y ∈C\B. (2.3) The jump set Dand jump function g(y) for each bead, is the following: D={[R, τmax,1],[0,0,−1]}, g(y) = h τ −d , y ∈D. Intuitively, the beads are moving up and down in between two boundaries with varying speeds. To account for the time that they take to reverse their direction, an internal clock τis introduced. During the time the beads are in a boundary, this clock runs slower (wi=α). On the other hand, during the time the beads are in between boundaries the clock speed is faster (wi= 1), but their spatial speed changes as a function of the beads present in each boundary. This is taken into account thanks to the input signal M(t). This parameter will set the speed of the beads to one of the following: vi∈ {1−f, 1,1 + f}. 18
If a bead move towards the boundary where there are more beads, it will move slower (1 −f) and if the bead moves towards the boundary where there are less beads, it will move faster (1 + f). The reason for that is that if the robot moves to the boundary where there are more robots present it will approach the boundary slower than if there are more robots in the boundary from where it is coming. The time that a bead spends in between boundary will be defined as ∆ti, and it is subsequently limited to the next set: ∆ti∈R 1 + f,R 1−f. We will use the following notation for the maximum (M) and minimum (m) time spent: tM=R 1−f, tm=R 1 + f. The current framework allow us to properly define the concept of synchronized and antiphase positions, which have a key role in the system. Definition 2.1.1. Two beads (i, j) are said to be synchronized at time tsif they coincide in position, clock time and direction. That is: yi(ts) = yj(ts). They will remain synchronized from that time on, since the input signal M(t) is the same for every bead, and their jump and flow sets are equal. Definition 2.1.2. Two beads (i, j) are said to be in antiphase at time tas if their directions are the opposite and their clock and height value are symmetric with respect to their middle values. That is: di(tas) = −dj(tas), τi(tas) = τmax −τj(tas), hi(tas) = R−hj(tas). As their directions are opposite, a value of M(t)= 0 when they are in between boundaries will make the beads move at different speeds, what makes this position stable only for certain scenarios. Composing the nhybrid systems Hiwe obtain the full system Hof the form: H: ˙x= F(y1, M(t)) . . . F(yn, M(t)) x∈C= (C)n, x+∈ {Gi(x)|xi∈D , i ∈ V} x∈D={x∈C| ∃i∈ V s.t. xi∈D}, where Gi(x) is defined: Gi(x) = (id(y1), ..., g(yi), ..., id(yn)). 19
Figure 2.2: Diagram showing the state of the system at a given point for 2 beads, red bead has direction -1, while blue bead has direction 1. In between boundaries, beads move inside the cones defined by the blue and red lines, once they are in a boundary, they stay there until reaching the jump set. This way the system phase space can be represented graphically as in figure 2.2. The horizontal axis represents the clock internal time τand the vertical axis represents the height in between boundaries h. The color of the bead is red if di= 1 and blue otherwise. The blue and red lines correspond to the trajectories the beads will follow if they move with the fastest or lowest speed respectively. This means that the bead trajectories will always lay in between those lines, if the initial conditions do not lay in between, once all beads reach a boundary they will. Given this, we can define the continuous time evolution of the system t≥0 to start when all beads have reached a boundary at least once. Observation 2. An important outcome that can be taken from the representation of the system is that, when beads travel at minimum speed in between boundaries, they reach the other boundary with a clock time that is closer to its maximum value than when going at faster speed. Taking into account that the clock moves slower at the boundaries, spending more time in between boundaries will reduce the time between jumps of a certain bead. Observation 3. The system is symmetric with respect to the point (R 2,τmax 2,0). The symmetry applied to a given bead in phase space with coordinates yiyields: hs=R−h, τs=τmax −τ, ds=−d. It can be easily check that: ˙ xs=−˙x. On the other hand: g(ys) = hs τs ds . To analyze the system we will use the following concept. Definition 2.1.3. (Sequence) Given two beads (i, j), a sequence is the fragment of a trajectory starting with the moment one bead enters a jump set and ending when that bead enters a jump set again. We will use the word departure to reefer to the moment 20
a bead reaches the jump set (leaves the boundary) and arrival to reefer to the moment a bead reaches a boundary. As we will see in next sections, the number of sequences is for a pair of beads is restricted to three, we will name them sequence 1,2,3 respectively. Restrictions In order for the system to behave like the real-life scenario with robots, we have to apply some restrictions to the parameters that are being used. Those will be described in this section. Restriction 1. A bead can not reach it’s maximum clock values when it is in between boundaries. τmax > tM. That is, the time that a bead needs to reach τmax must be higher than the maximum time spent between boundaries. Restriction 2. A bead can not surpass another. Where surpass is the defined in the following way. Definition 2.1.4. If the departure times from the same boundary of two beads (i, j) are ti< tj. Bead jis said to surpass bead iif the departure times from the opposite boundary are t′ j< t′ i. For the second bead to surpass the first one, it has to spend more time in between boundaries as there the internal clock runs faster, approaching the next jump set faster. The extreme case of this situation is one where the first bead spends the maximum time tMpossible and the second the minimum tm. If there is no surpass in this situation there will never be as this is the maximum possible difference between time spent between boundaries, corresponding to the lines plotted in Figure 2.2. The restriction will be the next one: tm+αtM> tM. That is, the clock of the second bead doesn’t surpass the first bead clock. Substituting the values of tm, tMdefined before in the former equation we obtain the restriction: α > 2f 1 + f. Restriction 3. The sequences were two beads are neither in the same boundary nor in opposite boundaries at any time can’t happen. In order to apply this restriction, lwe will develop this case. For this situation to occur both beads would have to be in between boundaries in the same or opposite directions, and then one should arrive and leave the boundary before the other arrives. The sequence where this situation is more likely to happen is that where the first bead has been travelling the distance Rat minimum speed, meaning it will stay at the boundary 21
R 0 Figure 2.5: Arrival and departure times for sequence 3. Blue and Orange bead start at different boundaries and each instant of time is either a departure or an arrival. t0t1t2t3t4 Bead 1 R τmax 1 t1 t1 1 R t1+t2 1 R t1+t2+αt3 1 0 0 1 Bead 2 h0 τ0 −1 0 τ0−t1 −1 0 τ0−t1−αt2 −1 0 0 1 t4(1 −f) t4 1 Table 2.4: State evolution for second being coming towards the lower boundary Using the corresponding set of equations we obtain: T2( h0 τ0 −1 ) = R−(τmax−τ0 α+(R−h0) 1+f(1 −1 α))(1 −f) τmax −(τmax−τ0 α+(R−h0) 1+f(1 −1 α)) −1 . Case 4: 2n Bead moving upwards The last possible scenario is the one corresponding to bead two going upwards, which corresponds to sequence 1 starting at t1.The corresponding sequence of time is: t1=t∗ 2,j−1< t2=t∗ 1,k < t3=t2,j < t4=t1,k+1. The evolution of the system is the following: t0t1t2t3t4 Bead 1 0 0 1 t1 t1 1 R t1+t2 1 R t1+t2+αt3 1 R τmax 1 Bead 2 h0 τ0 1 R τ0+t1 1 R τ0+t1+αt2 1 R 0 −1 R−t4(1 + f) τmax −t4 −1 Table 2.5: State evolution for sequence 3 28
Figure 2.6: Evolution of the discrete system for the case of two beads. The second bead, can be in any of the four shown positions, and in the next step it will move in the direction shown by the arrows. Equilibrium points are plotted as black dots. Using the corresponding set of equations we obtain: T2( h0 τ0 1 ) = (τ0 α+h0 1−f(1 −1 α))(1 + f) (τ0 α+h0 1−f(1 −1 α)) 1 . A diagram of the behavior described by the map T2(x) is shown in Figure 2.6, for the values of the parameters closer to the real-life scenario, which are (f, α) = (0.5,0.75), as will be checked in Section 4.2.3. We can see how except from the antiphase point the beads will approach synchronization in the direction the arrows show. An important remark is that this map has nothing to do with the bead continuous trajectories, it corresponds to the evolution of the position of the second bead in relation with the first one, taking as discrete time the instants when that bead reaches the maximum value of its clock. Now, we have all six expressions for T2(x) for the case of two beads. For higher dimensional scenarios the system gets more complex, and obtaining an analytical expression for Tn() is way more difficult as the number of possible sequences, and thus expressions for Tn(), will increase for each nvery rapidly. Global Stability of Synchronization for 2 and 3 beads 2 Beads With the analytical expression for the map of two beads, we have the necessary tools to proof synchronization in the case of two beads. Proposition 2.2.2. There exists a set of value of {α, f}, for which the equilibrium of the discrete system T2() for two beads at (0,0,1) is globally asymptotically stable. Proof. To proof this results we will use a Lyapunov function which computes the time interval between one bead entering a jump set and the other one entering the same one, 29
which will be named ∆J2, this function is thus defined in a different way depending on the sequence that the two beads are in. For each sequence we will name the first bead as the one which enters the lower jump set first. •Sequence 1 In the case of sequence 1, the state of the second bead will be: y0= 0 τ0 −1 , Where τ0<τmin α. This means that ∆J2(y0) = τ0 α. In this case we know from the latter section that: T2( 0 τ0 −1 ) = 0 τ0 α(1 −(1 −α)1+f 1−f) −1 . Which means that ∆J2(T2(y0)) = τ0 α2(1 −(1 −α)1+f 1−f)=∆J2(y0)·β1. The value of ∆J2(y) will then decrease iff |β1|<1. Plotting the values for the values of (α, f)∈[0,1]2we can see that there is a region where this is fulfilled, in Figure 2.7. Figure 2.7: Values of β1for the span of the possible values of {α, f}. White region corresponds to a value of 0 < β1<1 meaning there is synchronization, grey to −1< β1<0, meaning there is synchronization but also surpass, and black β1<−1, meaning there is no synchronization. Thus, there exists certain values of the parameters for which: ∆J2(T2(y)) <∆J2(y). Observation 4. There are a set of values of {α, f}which make β1(α, f) zero, thus synchronizing both beads in one iteration of the sequence. Those values fulfill the next equation: 30
α=2f 1 + f. They correspond to the boundary between the grey and white regions of Figure 2.7. •Sequence 2 In the case of sequence 2, the state of the second bead will be: y0= 0 τ0 −1 , where τ0>=τmin α. This means that ∆J2(y0) = τ0 α. In this case we know from the latter section that: T2( 0 τ0 −1 ) = 0 τ0+ (α−1)(tM−tm) −1 . Which means that: ∆J2(T2(y0)) = τ0+ (α−1)(tM−tm) α= ∆J2(y0) + β2. In this case, as 0 ≤α≤1 and tM> tm, then β2<0. Which implies that: ∆J2(T2(y)) <∆J2(y). •Sequence 3 In the case of sequence 3, as beads are jumping from different boundaries the function computed will be ∆J∗ 2, which is defined as the time interval between two different beads entering opposite jump sets. Recalling the expression obtained in last section: y0= R τ0 1 , where τ0> τmax −tM α. This means that ∆J∗ 2(y0) = τmax−τ0 α. We know from the latter section that: T2( R τ0 1 ) = R τmax + (τmax −τ0)1 α((1 −α)1−f 1+f−1) 1 . Which means that: ∆J∗ 2(T2(y0)) = (τmax −τ0)1 α2(1 −(1 −α)1−f 1 + f) = ∆J∗ 2(y0)·β3. In this case β3>1, as it is equivalent to: 31
1−(1 −α)1−f 1 + f< α. Which can be rewritten as: 1−f 1 + f<1, with f∈[0,1], so this is always fulfilled, which implies: ∆J∗ 2(T2(y)) >∆J∗ 2(y), for beads in sequence 3. Furthermore, the fact that ∆J∗ 2(T2(y)) >∆J∗ 2(y) implies that ∆J2(T2(y)) <∆J2(y). So gathering all the results, we can check that ∆J2is a Lyapunov function. ∆J2(y)>0,(2.4) ∆J2(T2(y)) <∆J2(y).(2.5) Furthermore, ∆J2(y) = 0 only when both beads enter the jump set at the same instant of time. Which proves the stability of the origin in the discrete system T2(). To end the proof regarding synchronization, we have to connect the result for the discrete system with the hybrid one. Proposition 2.2.3. The system described in Section 2.1, with V={1,2}has global assymptotic synchronization with respect to the dimension of the state space of each subsystem. Proof. The asymptotic global stability of the position (0,0,1) in the discrete system implies that the sequence of instants of times where the second bead enters the jump set {t2,1, t2,2, ....}approaches the one of the first bead. When time steps tend to infinity we have: lim k→∞(t1,k −t2,k)=0. This directly implies that both beads are jumping from the same boundary at the same time, so the solutions of both beads will converge to the same value, that is: lim (t,k)→∞ |ϕ1(t, j)−ϕ2(t, j)|= 0, where the distance between beads is defined in the following way: |y1−y2|=(|h1−h2|+|τ1−τ2|if d1=d2, min((2R−h1−h2) + (2τmax −τ1−τ2),(h1+h2)+(τ1+τ2)) if d1=d2. 32
This resolves in the system having global attractive synchronization. The stability of the discrete time system equilibrium states that for any ϵ > 0 there exists δ > 0 such that: |y(0)| ≤ δ→ |T2(y(k))| ≤ ϵ∀k > 0. In fact, as the distance is always decreasing we can take δ=ϵ. However, during the continuous flows, the distance between beads can increase. When both beads are between boundaries they are moving at the same speed (maybe in opposite directions) so the distance is conserved, the same happens when they are both in a boundary. However when one bead is in between boundaries and the other one is not, the distance can either increase or decrease. If two beads are at a distance ϵ, the worst scenario will be the one where both of them are in the same boundary. When the first one departs the distance between them will increase during the time the second one is still in the boundary. As the clock moves at a speed α, the beads will spend a time min(tm,ϵ α) separating from each other, as once the bead has reached the other boundary, the distance stop increasing. The distance in position will increment at a rate of (1 + f), as this is the speed of the first bead while the other one is in the boundary, the distance in phase will increment at a rate (1 −α), as this are the speeds at which the clocks are moving. Thus, the total distance will be: ∆D= min( ϵ α(1 −α+1+f), tm(1 −α+1+f)). Then, given a value of ϵ > 0, we can always take δ=ϵ+ ∆D, such that: |ϕ2(0,0) −ϕ1(0,0)| ≤ δ→ |ϕ2(t, j)−ϕ1(t, j)| ≤ ϵ∀(t, j)∈domϕ. Which proves the stability of synchronization, thus we conclude that the system for 2 beads shows global asymptotic synchronization with respect of the bead state variables. Observation 5. The system does not have uniform synchronization because, as we have checked, the distance between beads does increase during certain intervals of the continuous flows. 3 Beads For the case of three beads, deriving an analytical expression for the map T3() is considerably more complex as the number of sequences increases, making the computation of equations for each one tedious. However, using some of the results from the system of two beads we can simplify the proof of synchronization in this scenario. The only downside is that we have to rely on the next assumption. Assumption 2.2.1. For the system of 3 beads, there are always two beads in sequence 1 or 2. Let’s check how strict the assumption is. First, we’ll note that the assumption is equivalent to state that it is impossible for all three pairs of beads to be in sequence 3 simultaneously. We’ll see in the following when that happens. Let’s picture the position where the first bead is in the coordinates (0,0,1), that is, it has just entered the lower jump set. Then if it is in sequence 3 with the other beads, they 33
have to be either coming down between boundaries, or in the opposite boundary. At the same time, those two beads have to be in sequence 3 in between them. To check weather or not they can be in sequence 3, we will assume they are separated the maximum possible distance, that is: one bead is at (0, τmax −R, −1), meaning it has to spend a time of τmax−R αbefore it enters the jump set. The other bead is at (R, τmax−Rα, 1), this bead will spend less than 2 ∗Rto reach the opposite boundary (Rto reach the jump set and Rto cross the space between boundaries). Here we are using the fact that the beads will move at a speed no lower than one, because there is always a bead in the opposite boundary when a bead is moving in between boundaries. This way, both beads are in sequence 3 with respect to the first one, but they are as separated as possible between them. Now, for this separation to be enough for the beads to be in sequence 3 the next inequality should be accomplished. τmax −R α<2R, that is, the time the bead in the lower boundary takes to enter the jump set must be less than the time the other bead will take to reach the lower boundary, so that they do not coincide in the same boundary. This inequality is equivalent to: τmax < R(2α+ 1). Which will happen for certain values of (τmax, R, α, f) that fulfill all restrictions of the system. Thus, we can take the assumption as valid. With this assumption we will first focus on the case where there is one pair of beads in sequence 1. If we prove their synchronization then the case will simplify to the 2 bead case, as the two beads which are synchronized will act as one. Proposition 2.2.4. Two beads in sequence 1 will always synchronize under the presence of a third bead in any position. Proof. The function that we used in the case of two beads, computing the time spent in between jumps of the beads, can’t be computed analytically as easy in this case, as there are different positions of the third bead that can affect the time in different ways. However we can find bounds to it. The sequence of time used is the one showed in Figure 2.3. The intervals of time where the distance between beads can change is during t1, that is, when the first bead is in between boundaries and the second still in the boundary, and t3, when the second one is in between boundaries and the first is already in the opposite boundary (t1, t3are the time intervals represented in Figure 2.3). The time spent in between boundaries by each bead will be: tb1=t1+t2, tb2=t2+t3. Now, we will note as {tM1 1, tM0 1, tM−1 1}the intervals of time where M={−1,0,1}respectively, during t1, and {tM1 3, tM0 3, tM−1 3}. The key at this point is to see that tM1 1= 0, because during t1, the second bead is in the boundary where the first one was, so there is not enough beads to switch the mode, at most it can be M= 0, if the third bead is in the opposite boundary. With a similar reasoning we have that tM−1 3= 0, as the first bead 34
is already in the opposite boundary during that interval. When M= 1, beads moving upwards will have a speed of (1−f), but when M=−1, the speed is (1+f), which implies that the second bead will move faster than the first one ( tb1< tb2)if M= 0 at some point, which always happens, as the only possibility for M(t) = 0 during the sequence is when two beads are synchronized and the other one is in anti phase, which is not the case are we are assuming the beads to be in sequence 1 (not synchronized). Then during the time difference tb2−tb1, the first clock will be moving at a speed α, while the other one will still be in between boundaries, so its clock moves at a speed of one. Then we can state the following: ∆J3(T3(y)) = ∆J3(y)−(tb2−tb1)·(1 −α), as we have seen that (tb2−tb1)>0 and α < 1, then we can state: ∆J3(T3(y)) <∆J3(y). Which combined with the positivity and the fact that it is only zero for synchronized beads makes it a Lyapunov function and proves convergence to synchronization of those beads. The following synchronization of the third one is given by Proposition 2.2.3. If the beads are in sequence 2, the former result also holds, except for the case where all three pairs are in sequence 2, as in this case the system would be in equilibrium. In the proof we are evaluating the function ∆J3() on the whole state of the system, even if we are just taking on of the beads into account (the one which is in Sequence 1 with respect to the first one). From now on, we will abuse the notation by feeding the function ∆Jnthe whole state, even though it just takes as input one of the beads of the system. Instability of Antiphase Position To prove the instability of the antiphase equilibriums, we will analyze it from the perspective of the reversed time system, that is, what happens when the system evolves backwards. To analyse that system, the only change that has to be added to the system is the way M(t) works, simply by changing its sign. Mr(t) = −M(t), that is, when there are more beads in a boundary, that boundary instead of being pushed, goes in the other direction, this will be described in more detail in Section 2.7. The proofs presented for 2 and 3 beads can be adapted to the reversed system. Which leads to the following result. Proposition 2.2.5. The antiphase equilibrium in the two beads scenario is globally asymptotically stable in the reversed time system. Proof. In this case the function that will be analysed is ∆J∗ 2(y), that is, the interval of time between both beads entering the jump sets of opposite boundaries. The key point here is that in the reversed time system, the speed of the beads in between boundaries is changed. As an example, in sequence 1, during t1, the second bead is moving at a speed of (1 −f) instead of (1+f), and the opposite is happening in sequence 3. Thus the expressions for β1and β3are interchanged. For the case of the sequence 2, in the first jump from the same boundary, the bead will spend tM, and the second one will spend tm, so β∗ 2=−β2. Thus we conclude that: 35
∆J∗r 2(y)>0,(2.6) ∆J∗r 2(y)<∆J∗r 2(y).(2.7) And as ∆J∗r 2(y) = 0, that equilibrium is globally asymptotically stable. As there are only two equilibriums for the 2 bead system, and the anti phase is stable for the reversed time system it will not be stable for the forward one. In the case of three beads a similar reasoning can be stated, as the beads that are in sequence 1 will separate from each other, so the three of them they will eventually separate as much as possible from each other. Comparison with physical results The results given until now are dependent on the values of the speed factors both of the movement inside the cage (f) and of the internal clock (α). To explore its dependence, we will compare the metrics analyzed in the physical scenario with the ones in the mathematical model. Parameter determination To determine the parameters (α, f) that correspond to the physical scenario, we will take a look at the model of the collisions of robots with the boundary, which models the position displacement. The results come from the report by Rundong Yang and Nick Gravish ”Physical communication among decentralized robots in confined region” . In this model, instead of just a bead moving in between boundary, the model consists of a slider and a base which moves in between boundaries. When it is in between boundaries, the base doesn’t move, and the slider moves at a unitary speed. Once the slider is at its maximum distance with respect with the base, it reverses the direction of the speed. Every time the slider hits the boundary, there is a displacement of the boundary, the base and the slider at the same time, the values are represented in Figure 2.8. The advantages of this model is that it can be directly related to the values of the friction coefficients, and the displacement values are obtained from them. Thus, it is a reliable bridge to connect the physical parameters with the current hybrid model. The impacts between the slider and the boundary occur so fast one after the other, that from a broader view it acts like an effective continuous speed of the slider, as in Figure 2.8. To compute this speed, a simple calculation is enough: vb=∆d ∆t=0.01 2∗0.01 = 0.5, That means that the speed of the slider when it is in contact with the boundary is half of the speed of the slider in between boundaries. Which mean that f= 0.5. On the other side, there is also a displacement of the base when the slider is in contact with the boundary, to compute the speed of the base with respect with the slider we have 36
Figure 2.8: Model of collision and positional displacement. Left, schematic of model parameters. Right, evolution of the position of x1as a function of time (blue) and of the boundary (black), the displacements in position are so fast that it can be represented as an effective speed. Figure 2.9: Frame dimensions in the physical scenario, representing the rotor. to add this displacement to the effective speed of the slider. wb=vb+0.005 2∗0.01 = 0.75, Which allows us to determine the parameter α= 0.75. Frame size In the physical scenario, there are restrictions in the frame size for the robots to synchronize, and those translate directly to the mathematical model. Taking the dimensions shown in Figure 2.9, the following restriction is stated. d < W < 2·e. The lower bound is needed in order for the robot to be able to rotate. In the case of the mathematical scenario, as the bead is represented as just one point, this restrictions can’t be translated as long as the distance between boundaries is bigger than zero. However there is a relation between the ratio τmax Rand the speed at which the system synchronizes. This relation will be presented with graphics once the numerical simulation is introduced in Section 2.6. On the other side, the higher bound is defined so that the robot does not rotate without impacting the boundary, this is directly related with the first restriction stated in Section 2.1, which states that τmax is smaller than the maximum time that a bead can spend in between boundaries, to avoid the bead reversing direction in between boundaries. 37
Figure 2.13: Extended local stability position. The bead closer to the lower left corner is the first one, while the one closer to the upper right corner is the last one. Furthermore, t3and t1are connected through the following relation, defining das the distance that bead iseparates from bead i+ 1. d= (1 + f)t1. This distance is the same distance that bead i+1 has to travel to reach the upper boundary during t3, as during t2, both of them were in between boundaries, and thus moving at the same speed. d= (1 −f)t3, t3=t1 1 + f 1−f. Substituting that in the former expression we obtain: t′ 1=t1 α((α−1)(1 + f) (1 −f)+ 1) = t1·β1(f, α), which means that: ∆Jn(Tn(y)) <∆Jn(y). For two consecutive beads in an almost synchronized position. The expression of β1 matches the one we have found in former sections, adding the positivity and the fact that it is zero iff the beads are synchronized, we conclude that there exists a set for which this scenario always converges to synchronization. Extended Local Stability The scenario in the former section can be extended to the case where the beads are not only in the same boundary but also there are beads coming down in between boundaries. Let’s assume w.l.o.g. that this boundary is the lower one. In this case we can order the beads in the following way: first one would be the one which is closer to the jump set, and the last one that which will take longer to reach the boundary where the beads are. A representation of this position is shown in Figure 2.13. Instead of looking at the behavior of consecutive beads as in the last case, now we will look at how the distance between the first and last one evolves: 44
Proposition 2.4.2. If all beads are either in the lower boundary or coming down in between boundaries at some point, they will eventually synchronize. Proof. For this particular scenario, the same function ∆Jn(y) will be used. We will find bounds for its expression applied to the first bead entering the lower jump set and the last one entering the upper one. If they are in sequence three, we will take a look at ∆J∗ n(y), that is, the time interval between the last one entering the upper jump set and the first one entering the lower one. We will use the same notation as in the case of 3 beads, that is, we will define (tb1, tbn) as the times that both beads spend in between boundaries. {tM1 b1, tM0 b1, tM−1 b1}and {tM1 bn , tM0 bn , tM−1 bn } are the intervals of time where M={−1,0,1}respectively during the time each of the beads {1, n}is in between boundaries. In the case where the first bead reaches the opposite boundary before the last one, obviously tb1< tbn. In the case where this does not happen, we have to take into account that, as there are no beads in the upper boundary, tM1 b1=tM1 bn = 0. At the same time, if there are more than two beads, either tM−1 b1= 0 or tM−1 bn = 0, as at some point, there is gonna be a bead in the lower boundary. During the time M(t) = −1, first bead will move upwards with a speed of (1 + f), while the last one will move downwards with a speed of (1 −f). Thus we also conclude that tb1< tbn. The difference in time spend in between boundaries translates into a change in clock difference, as during that interval of time, one clock is evolving at a speed of α, while the one in between boundaries is moving at a speed of 1. Thus we obtain the expression: ∆J∗ n(Tn(y)) = ∆J∗ n(y)+(tbn −tb1)(1 −α). Which implies that ∆Jn(Tn(y)) <∆Jn(y), as can be checked from Figure 2.14. Then, at some point the position of the beads becomes an almost synchronized scenario, which we have proven to converge in Proposition 2.4.1 Figure 2.14: Diagram showing the intervals of time where bead (1) and bead (n) are in between walls (green, tb) and in the boundary (red). The instants of times where a bead jumps from a boundary are ti,j . The interval of time between jumps from the same boundary for a pair of beads in an nbead system is ∆Jnif they jump from the same boundary and ∆J∗ nif they jump from opposite boundaries. 45
2.5 Robustness To analyze the robustness of the system, we will assume there is a group of N beads which is already synchronized, and see how do the others evolve, these unsynchronized beads act as perturbations to the synchronized state. This can also be seen as extending the local stability as it gives new starting condition from which we know the system synchronizes. In the same way, the extended local stability seen in Section 2.4 can be seen as a measure of robustness for the system, meaning that if there are some beads that are synchronized but the others are inside the set defined in Figure 2.13 the system will still synchronize. During this section, we will assume there is a group of Nbeads which is already synchronized. When the group of N synchronized beads enter the lower jump set we can organize the other beads in four groups: 1. n1beads that are still in the bottom boundary. 2. n2beads in the upper boundary. 3. n3beads going up in between boundaries. 4. n4beads going down in between boundaries. The group of N synchronized beads, as it has the most beads, will determine the value M(t) of the system when it is in one of the boundaries, thus it makes more easy to analyse how the other beads move in relation to it. In a real scenario, is difficult for N-beads to be exactly synchronized, to define properly their behavior we will use the following. Definition 2.5.1. (super bead) N ordered beads are said to be a super bead if the signal M(t) of the system from the first arrival until the last departure corresponds to the boundary where they are. Observation 8. It is easy to check, following the proofs of previous sections, that beads inside a superbead end up synchronizing. Let’s see how every other bead behave, starting by the beads that are in sequence 1. Beads in sequence 1 For these beads, we know that the following expression holds: t′ 1=t3(α−1) + t1 α, where the times are the ones depicted in Figure 2.3. Now, the distance that synchronized beads will separate from the other will depend on the velocity of those: d=v1t1, where v1is the averaged velocity of the bead during t1. 46
The same will happen with the velocity during t3: d=v2t3. Substituting this in the former equation, we obtain: t′ 1=t1 α((α−1)v1 v2 + 1). From this equation we can obtain the following result: v1 v2 >1→t′ 1< t1, = 1 →t′ 1=t1, <1→t′ 1> t1. We will use this quotient of velocities to see how beads in sequence one with respect to the synchronized beads evolve. For the n1beads in group one, we know that M(t) = 1 during t3, as during this time, the N-super bead is in the upper wall, setting v2= (1 −f), v1is unknown. As v1≥(1−f), the quotient of velocities is at least one, and so the distance between them is at least conserved. Furthermore, the only case where the distance is maintained is that where during t1the system has M(t) = 1, in which case v1= (1 −f). In the case where there are no beads in group 2, or beads in that group are less than n1, which are the only ones that can make M= 1 during all t1, these beads will approach synchronization. Beads in group 3, i.e. beads that are going up in between boundaries, are also in sequence 1 with respect to the synchronized beads. However, now the velocity of the bead during t1is known, as the synchronized beads are in the bottom boundary, and thus M(t) = −1, so we know that v1= 1 + f. On the other side, the velocity during t3is unknown. As v2≤(1 + f), again the beads in group 3 will either decrease its distance with respect to the super beads or maintain it. Furthermore, the distance will only be maintained if during t3the system is in M(t) = −1, in which case v2= (1+f).The beads in groups 1 and 4 are the ones that can make M(t) = −1 during t3, if there are no beads in those groups, or the beads in that groups are less than n3, the beads will approach synchronization. As a summary, we have the following observation. Observation 9. Beads which are in sequence one with respect to the super bead are “trapped”, i.e., their distance in relation with them can only be maintained or decrease. The cases where it decreases are described above. Beads in sequence 2 For beads in sequence 2, which can be some of the beads in groups n1 or n2, a similar result applies. For beads in n1that are in sequence 2, the superbead will jump first, and will spend a time tbs in between boundaries. When those beads jump, M(t) = 1 as the superbead is 47
in the upper boundary, so they will spend tMin between boundaries. As tbs ≤tM, the distance will either be conserved or dimminished. For beads in n2 that are in sequence 2, an equivalent result holds, as those beads must have spend tmto reach the upper boundary, given that the superbead was in the lower boundary at that time. In this case tbs ≥tm, which implies again that the distance between them is either conserved or decreased. Observation 10. Beads which are in sequence 2 with respect to the super bead are also “trapped” , i.e., their distance in relation with the superbead can only be maintained or decrease. Beads in sequence 3 The analysis for the other two groups is a little bit more complex, as we don’t have a closed expression for beads in sequence 3 where there are other beads intervening. This is because during the time where both beads are in between boundaries the effect of other beads takes a vital role, as the speeds of the two beads are different depending on their direction. Thus, we will simplify the scenario for each group. As in sequence 2, we will compare the time spent in between boundaries by the superbead and the group we are analysing, using again the fact that the more time a bead spends in between boundaries, the faster it will enter the next jump set, as the clock runs faster in between boundaries than in the boundary itself. For beads in n2, we will assume that there are no beads in groups n4, n1. Thus, we make sure that during the time both the super bead and n2beads are in between boundaries M(t)=−1. This way when they are in between boundaries, either they go at the same speed or the superbead moves slower. Adding the fact that during t3of that sequence, M(t) = 1 due to the superbead presence, the distance will decrease for at least a bead in n2. For beads in n4we will assume there are no beads in n2, n3. Thus, we make sure in this case that when they are in between boundaries M(t)= 1. Adding the fact that during t1 of that sequence M(t) = −1, the distance will decrease for at least a bead in n4. Observation 11. For beads in sequence 3 with respect to the superbead. If there are only beads either in groups n2, n3or in groups n1, n4, they will approach the superbead. 2.6 Numerical Simulation The fact that number of sequences increase rapidly with nmakes it difficult to obtain further analytical results. However, a numerical simulation can still be carried. Using Matlab toolbox HyEq [45], a composite hybrid system can be coded in such a way that it behaves as the one we described, thus enabling us to see its evolution. This numerical simulation will be of high relevance to study the stability of the system for any given value of n. To implement the model an instance of the class HybridSubsystem named Bead is defined in the following way: First the parameters (α, f, R, τmax) are defined as properties of the class. Then we willl define the dimension of the state of each bead as 3, as it will include the variables (h, τ, d). 48
After that we include the input and output for the interconnection of the systems. The output is just the vertical position of the bead (h), and the input, will take into account all the positions of the other beads, so it will have dimension (n−1). To define the continuous flows, first the parameter M(t) has to be computed from the input. Once it is obtained the flow map can be easily introduced. The same is carried for the jump function. For running a simulation, an instance of CompositeHybridSystem is invoked, conformed by a total of nBeads. The toolbox allow us a quick visualization of the data, where the position an internal clock evolution is plotted, along with the points where a jump is produced (denoted with red stars). An example is plotted in Fig 2.15. Figure 2.15: Position and clock evolution of two beads starting from a position close to anti phase, obtained from the implementation using HyEq Toolbox in Matlab of the hybrid system. These simulations allow us to observe the system behavior for a higher number of rotors, and make statistics for big number of repetitions. Among these, the next are outlined: Cluster behavior The way the beads synchronize for a high number of them is by clustering around a small number of them which are the ones synchronizing first. This discards the idea that beads may synchronize in two different clusters in different boundaries, to end up synchronizing in one of them. Animations of the simulation show this behavior, which can also be checked in Figure 2.16. From an analytical point of view, we can justify this behavior by considering the fact that when some beads synchronize, they act as superbead, described in Section 2.5. This superbead will impose the value of M(t) whenever its in contact with a boundary. Beads approaching this boundary will move slower thus approaching its clocks, and those moving further from the boundary will move faster, thus slowing their clocks eventually to be 49
Figure 2.16: Evolution of the number of synchronized beads (Ns) for a system of n= 30 beads. Two beads are synchronized if the sum of their clock and height differences is smaller than a certain tolerance. reached by the superbead before. The description of the evolution of a bead with respect to the superbead is explained in more detail in section 2.5. Distance Plot Plotting how the distance between beads evolve in time, the system evidences how complex and challenging to analyse its behavior is. To exemplify it, the internal clock maximum value is set to 2π, and then the distance to the final position is plotted in Figure 2.17 (left). This distance however, does not always decrease, at some points it may increase for some beads, to end up synchronizing. This behavior is what makes the prediction of the trajectories of each bead difficult analytically, as they may not always take the same approach toward the syncrhonized state, but highly depend on the position of the other beads. However, Figure 2.17 (right) shows how the mean position in the circle of all beads is decreasing, explaining the behavior of the other graph. Looking at the big picture (the mean of the positions) the distance does decrease, but looking at each trajectory this does not always happen. Parameters that affect Synchronization Time Finally, we may be interested in which parameters may affect the rate of convergence at which the beads synchronize, which will be named Ts, this will be evaluated in the simulation by computing the value of time for which all beads have both their clocks and vertical distances at a distance lower than a certain tolerance. In first place, we will see how the value of τmax affects the value of synchronization. The results, plotted in Figure 2.18 (left), show how increasing τmax, increase the value of Ts, which is explained by checking how beads will spend more time in the boundaries, and thus, almost all of the pairs of beads will be in sequence 2, which is the one which decreases the distance slower, as it does so arithmetically and not geometrically, as the other ones. 50
0 500 1000 1500 t -4 -3 -2 -1 0 1 2 3 4 Distance to synchronized state 0 500 1000 1500 t -0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Mean of distance with respect to Synchronized state Figure 2.17: Left, evolution of the distance with respect to the synchronized state for each bead. The distance here is just in the phase variable, which maximum value has been set to 2π. Right, evolution of the mean distance with respect to the synchronized state. At the same time data also spreads more, which can be explained by how the position of the initial conditions may affect its speed. Being τmax larger, the way the initial conditions can be spread is also bigger. On the other side, we will check how the number of beads affect this rate. Figure 2.18 (right) shows how the value of Tsis also increased in this case. This remarks again the complexity of the system, as more beads will increase the interactions and coupling between beads, making it difficult for beads to directly synchronize, as they have to organize and may change the way distance between them evolves until they are fully synchronized. 35 55 75 95 115 135 155 175 195 215 235 255 max 0 1000 2000 3000 4000 5000 6000 7000 T s Synchronization time as a function of max 2 3 4 5 6 7 8 9 10 N 0 200 400 600 800 1000 1200 1400 1600 1800 T s Synchronization time as a function of the number of beads (N) Figure 2.18: Time that is takes for the system to synchronize as a function of the value of τmax (left), and the number of beads in the system N(right). 2.7 Reversed Time System In this section we will study how the system evolves when we reverse the time evolution, that is when time flows backwards. The first thing we must check is if the system is invariant to time reversal, as the beads 51
evolve in a cyclic path, we may be tempted to say it does, but a rapid inspection shows the opposite. Let’s picture the scenario with two beads, where one bead is in the lower boundary, and the other is moving upwards (d= 1) in between boundaries, then M(t) = −1, so its speed is: v=d−M·f= 1 + f. Now, if we move backwards in time, the bead will move at the same speed but with opposite sign, however, if we were to use the same equations that define the normal system, we would obtain: v′=−1 + f=−(1 −f)=−v. Meaning that the bead would move slower. In order to fix that we have to define the signal M(t) differently for the case of backward evolution, that is: Mr(t) : 1if U(t)< L(t) 0if U(t) = L(t) −1if U(t)> L(t). (2.9) Which correspond to changing the sign of the former definition of the signal. Then the flow and jump equations of the systems would be the same one as the introduced in Section 3, but with the new input signal, that is, F(y, Mr(t)). The evolution of the backward system can give insights about the forward one, mainly because an equilibrium point in the discretized forward system will also be an equilibrium of the discretized backward system. However the stability will be opposite. As an example, the synchronized beads scenario is an equilibrium point of the backward system but is unstable in this case. If two beads are almost synchronized, and their jump difference is of ∆t=δ, we can obtain their next time difference using the expression introduced in Section 2.2.3: δ′=δ α((α−1)v1 v2 + 1). As in this case v1 v2<1→δ′> δ, we conclude that they will evolve to a less synchronized scenario. On the other side, the antiphase scenario is stable in this case, using the same reasoning as before. From that we may infer that this system tends to separate the beads from each other instead of bringing them together. That is, positions where all beads are equidistant one to the other are stable equilibriums of the system. Thus, the behavior will be different in the case of even or odd number of beads, as for the even case this situation will correspond to having antiphase positions but that can’t happen with odd beads. Definition 2.7.1. An equidistant position corresponds to that where the time between jumps of two consecutive beads is the same for every pair of consecutive beads. Given this intuition we can understand the results that numerical simulation of the system yields, dividing them between the next two cases: 52
1. Even number of beads An equidistant position with an even number of beads corresponds to an antiphase position where every bead has a symmetric bead that jumps from the opposite boundary the moment it jumps. However, unexpectedly, this equilibrium position is not the one to which the systems tends as time goes to infinity. The final position for the even scenario is the one where the beads are separated in two groups which are in antiphase, that is they synchronize in two symmetric clusters. This positions maintain the same number of beads in both boundaries at all time, so M(t) = 0, and thus, the bead always follow the same circuit with the same speed. 2. Odd number of beads Equidistant positions for an odd number of beads do not correspond to antiphase positions, and this leads to a different behavior, due to the fact that M(t)= 0 as there will be more beads in one boundary. This makes the equilibrium position more difficult to achieve, and in some cases the system does not converge to any position but keeps switching from different positions repeatedly. We will provide some example for cases with low number of beads: •3 beads In the case of 3 beads, the equilibrium reached has the three pairs in sequence 2. This implies that, while a bead is in between boundaries, the signal M(t) = 0, as there are the same number of beads in each side. •5 beads Once we increase the number of beads to 5, there is not enough space for all pairs of beads to be in sequence 2. This implies that some of the pairs will be in sequence either 1 or 3, and that, at some point the signal M(t)= 0, making the path that beads follow different depending on their direction. This outcome is interesting as it shows that there exist some limit cycles in the discrete system Tn(), depending on the number of beads, and they are stable. •7 beads In the case of seven beads, the system does not always converge into a determined position. Furthermore, depending on the initial conditions the system can either: (1) Evolve into the five bead equilibrium for some time with two pairs of the beads synchronized, and after that move on into a new five bead equilibrium with two different pairs being synchronized. (2) Converge into an equidistant position. The first case is shown in Figure 2.20. As it can be seen the study of the backward system is more chaotic as the system can converge to a different range of outcomes. However, it enabled the discovery of new equilibrium points and limit cycles. 2.8 Continuous Model A question that naturally arises when analyzing this system is what would be its behavior when the number of beads tends to infinity. In this case a continuous model could be 53
the other, with an overall displacement in the direction where the beads spend more time. Although this is not easy to implement in the given experimental setting, the geometry of the physical system could be changed in order to achieve this behavior. Proposition 3.2.1. If τmax is different depending on the direction of movement the system of 2-beads still synchronizes. Proof. We will check the case where the two beads are in sequence 3 or 2, as in sequence 1 the difference in τmax does not have any effect on their difference. The discrete map at the jumps of first bead will be named Tc() in this case. Now we have τmax(1) =τmax(-1). In order to introduce this change, the model has to be changed. The internal clock will only flow in one direction, and once it reaches its maximum value, it will be reset to zero. The new flow and jump maps are then: F(y, M(t)) = 0 α 0 , y ∈B, (d−M·f) 1 0 , y ∈C\B. (3.1) The jump set Dand jump function g(y) for each bead, are the following: D={[R, τmax1,1],[0, τmax(-1),−1]}, g(y) = h 0 −d , y ∈D. For beads in sequence 3 we will take the same approach as in Section 4.2, but the set of equations is different t1+t2+α(t3+t4) = τmax(1), t2+t3+α(t4+t′ 1) = τmax(-1). From which we obtain: t′ 1=t1∗β3+∆τmax α,(3.2) where ∆τmax =τmax(1) −τmax(2). The sign of ∆τmax will change in every sequence, so time may decrease if it is negative, however we can check the following, noting ∆J∗ 2(y) = t1. ∆J∗ 2(T2 c(y)) = ∆J∗ 2(Tc(y))β3−∆τmax α, ∆J∗ 2(Tc(y)) = ∆J∗ 2((y))β3+∆τmax α, 60
subtracting both: ∆J∗ 2(T2 c(y)) −∆J∗ 2(y)=∆J∗ 2(y)(β3−1 β3 ) + ∆τmax α(1 −1 β3 ), which, substituting again with the expression for ∆J∗ 2(Tc(y) becomes: ∆J∗ 2(T2 c(y)) −∆J∗ 2(y) = ∆J∗ 2(y)(β3−1 β3 ) + ∆τmax α(β3−1) As ∆J∗ 2(y)>0 and β > 1→∆J∗ 2(T2 c(y)) −∆J∗ 2(y)>0. Defining the map T∗ c() = T2 c(), which, remembering the definition of Tn() given in Section 2.1, would correspond to the position of a given bead every two jumps from the same boundary of the first bead, then the next is fulfilled: ∆J∗ 2(T∗ c(y)) >∆J∗ 2(y). If the sequence start with ∆τmax being negative, a similar increasing expression is also obtained. Thus, eventually the beads will reach sequence 2. For beads in sequence 2 we will take the same approach as in Section 2.2.3, but the set of equations is different: In this case we know the following: t1=tm, τ0+α(t1+t2) = τmax(1), t3=tM, t1+α(t2+t3+t4) = τmax(-1). As a result, we obtain: ∆J2(Tc(y)) = ∆J2(y)+(α−1)(tM−tm)+∆τmax. In this case the term ∆τmax will cancel every two repetitions of the sequence, so the beads will eventually reach sequence 1, where the difference in maximum values doesn’t play a role as both beads depart from the same boundary always, so the system will synchronize. Once the system is synchronized, it will start pushing the boundary, and the distance that it will travel for every sequence will be the following: ∆h= (τmax(1) −τmax(-1))f. 61
4. Koopman Operator Representation Previous sections have shown how difficult it is to obtain results for the studied system analytically, due to the high number of interacting agents, which makes it challenging to predict mathematically the sequence of times when each one will enter the jump set. For a system of two beads, an analytical expression for the sampled state of the system can be computed, that is, an expression for T(y(t1,k)) = ys(t1,k+1), where {t1,1, .., t1,k} is the sequence of times where the first bead enter the jumps set, as seen in Section 3.2. If the system has a higher number of beads, computing the analytical expression for the map Tn() becomes challenging, as the position of the beads may affect the behavior of a sequence in an exponentially increasing number of ways. In order to learn the dynamics of the system via the discrete map for higher number of beads, we have to rely on other perspectives such as its Koopman Operator representation, which has been introduced theoretically in Section 1.3.1. The fact that there is an analytical expression, which is piecewise linear for a system of two beads, implies that, if the same process for the obtention of that expression is carried for higher number of beads, a piecewise linear expression would also be obtained, which computation is extremely tedious and does not make sense to compute indefinitely. However, its existence means that its Koopman Operator Representation could be obtained, in our case we will try to obtain it through data driven methods. The approach that will be taken to obtain the Koopman Operator representation is the Extended Dynamical Mode Decomposition. The main goal of the section is to try to get an approximation of the Koopman Operator to see if the data driven methods can capture the dynamics of such a complex system, and at the same time obtain information about its dynamics from its spectral decomposition if the approximation is accurate enough. The first step is to generate a data set that will be used to apply the algorithm. To obtain it, the numerical simulation is used for random initial conditions, then the solution is sampled at the instants where the first bead enters the jump set and its positions are saved. For each simulation, ksamples of the state space are generated. In the matrix X, the first {1, ..., k −1}samples are saved, and in Y, the ones at the position {2, ..., k}. This way, T(X(i)) = Y(i), where X(i), is the ith column of the matrix X.The dataset obtained is shown in Figure 4.1. After that, a suitable basis of a Bannach function space is chosen. In this case, the first attempt was a truncated polynomial base, which elements are the following. Pd={xi1 1xi1 2...xik k|i1+... +ik≤d}. 62
Figure 4.1: Representation of the Data Set in the state space, for the second bead of the system in a system of 4 beads. Blue points correspond to the data set X, and red ones to data set Y, in such a way, where Tn(X(i)) = Y(i) Once the dictionaries {Φ(X),Φ(Y)}are computed, an approximation for the Koopman Operator is obtained. After checking that the dictionaries have full rank we apply the consistency index described in Section 1.5.2 to the Koopman approximation matrix yield by the dictionary Pd. Unfortunately, the results proof that this dictionary is unable to capture the complexity of the system, as the eigenvalues of the consistency matrix are all equal to one. This low accuracy, probably given by the simplicity of the chosen dictionary, motivates a different approach to find the optimal dictionary for the Koopman Operator subspace, such as a Neural Network. This machine learning approach uses the consistency index as a cost function and finds the most suitable basis of functions, as described in the following. 4.1 Neural Network Description The designed Neural Network NN(X) is aimed to find a dictionary D(), that has the following expression: D(x)=[x, NN(x)], With the right weights learned by the Neural Network, we hope to find the ones that minimize the loss function, which takes as inputs the dictionary evaluated at the dataset Xand evaluated at the dataset Y. The notation used will be the following: lossfunction := lf(D(X), D(Y)). The main characteristics of the implemented Neural Network are described in the following. 63
Figure 4.2: Scheme of a Feedforward Neural Network, provided by [46]. The core class, Custom Network, defines a Feedforward Neural Network (FNN). This type of neural network is structured in layers, with data flowing from the input layer through intermediate hidden layers to the output layer without any feedback loops. Each layer consists of neurons (nodes) that perform computations and apply activation functions to their inputs, as shown in Figure 4.2. At the same time the network is fully connected, that is, each neuron is connected to every neuron in the previous and next layers. This connectivity pattern allows the network to learn complex relationships in the data by adjusting the weights associated with these connections during training. The activation function f(x) used is the Rectifier Linear Unit (ReLu), which is defined in the following way: f(x) = max(0, x). This function is popular due to its simplicity and effectiveness. Its key-feature is its nonlinear nature. The derivative of the function is either 1 or 0 making it easy to compute and helping in gradient-based optimization methods, as the one that will be used. The initialization corresponds to Xavier uniform scheme for the weights, ensuring efficient learning during training. The training parameters include a training function that utilizes the Adam optimizer for gradient descent, allowing the network to learn from the data. Training continues until either a specified number of epochs is reached or the loss falls below a termination threshold. The loss function used is the consistency index described in Section 1.5.2. Many software packages for finding maximum eigenvalues rely on iterative methods that are sensitive to the separation between the largest and second largest eigenvalues. To avoid numerical issues, one can use Tr(MC) instead of λmax(MC), as justified by 1 sTr(MC)≤λmax(MC)≤Tr(MC), [43], where srepresents some parameter or value. Thus minimizing the trace, we make sure that the error is decreased. 64
Once the Neural Network is trained, the matrix KEDMD, and the eigenfunctions are computed, via the linear combinations that the Neural Network has obtained as optimal solutions. From there the results can be analysed. 4.2 Results To obtain the best results for the Neural Network described in the former section, the hyperparameters of the network are fine-tuned to obtain the least error possible. This parameters include the batch size, the dimension of the layers, the size of the output and the learning rate, each one of these affect in a particular way the result of the network, so they have to be adjusted properly. Usually, a bigger output and layer size will make the neural network explore more optimal solutions, but the training will take way longer, and there is a higher risk of over-fitting or divergence. The first thing that is noticed is that the error, even optimizing the hyperparameters, doesn’t reach the desired values, it still over the 10%. However, this is not the biggest issue: an accurate analysis of the results comes from the representation of the eigenvalues of the matrix KEDMD. A first inspection to the representation shows that a big part of them lie outside the unit circle, meaning that the trajectories of the system learned are diverging. To explain this behavior, we are gonna present the following result regarding eigenfunctions: Proposition 4.2.1. Let ϕbe an eignefunction of the Koopman Operator Kwith eigenvalue λ. Then if ϕk∈ F, the basis used to represent the eigenfunctions, ϕkis an eigenfunction with eigenvalue λk, for k∈Z. Which means that we can have negative exponentiation in the eigenfunctions. Remembering the expression for the evolution of observables in Section 1.5.2, we can easily check how, if the eigenfunctions with negative exponentiation are the ones captured by the Neural Network, the trajectories will diverge, instead to converge to the origin as they should in this case. To fix this issue, the Neural Network requires a more guided learning method to understand the underlying dynamics. The way this problem is assessed is by customizing the loss function in the following way: lf(D(X), D(Y))∗=lf(D(X), D(Y)) + α||KF||F. That is, we regularize the loss function by adding a term that is directly related with the size of the eigenvalues. At the same time we disable any Bias that the network has, this means that the network does not have separate learnable parameters for biases in those layers. Biases are typically added to linear transformations to shift the output of neurons, but in this case, the network relies solely on learned weights and ReLU activations for its computations. This way, the neural network is guided to solutions that prioritize optimizing the error at the same time that they decrease the eigenvalues size. The positive effects on the value of the eigenvalues is shown in Figure 4.3. Once the Neural Network is trained and the eigenvalues lie in the unit circle, the contrac- 65
Figure 4.3: Representation of the eigenvalues of KEDMD obtained using the neural network for (left) uneregularized loss function, (right) regularized loss function. For a system of n=3 beads. tive behavior of the system has been introduced on the Koopman approximation. From there we can plot different trajectories, using the predictor for the identity function. The results are accurate in the sense that they follow the generic behavior of the trajectories, converging to the origin and following the correct directions. However, they are still qualitatively far from the real ones. This is specially noticeable in near the origin, where trajectories oscillate due to the presence of eigenfunctions with eigenvalues near the unit circle, as Figure 4.4 shows. The results show how difficult is for the Neural Network to capture the different behavior that the system shows depending on the regions where the beads are. As it is trying to model with continuous smooth functions the whole dynamics, this is almost impossible at the points where different regions are acting at the same time, for example the upper and lower boundaries. Furthermore, the points where one region flows into another, that is, where beads depart or arrive to a boundary, the different dynamical behaviors are not continuous, making it very difficult to capture smoothly. The predictions though, do a good job with the direction that a bed in the upper boundary will follow, in some cases going to the left to approach the origin as in cases (a),(c) of Figure 4.4, and in (b) first going to the right, and then going to the lower boundary to approach the origin, that is, not taking the fastest path. That is why we say that the general behavior is indeed captured. Given the results shown, there is still a path to make to obtain more accurate results. One procedure that could be implemented is based on the idea of separating the state space into different regions that we know that behave differently, and apply the Neural Network to each one of them, to learn the dynamics separately. After that, each of the region trajectories is patched in a sequential order, so that the final trajectory follows a continuous path. Due to time limitation this method is left as further work. 66
-5 0 5 10 15 20 25 30 35 40 -2 0 2 4 6 8 10 12 h Trajectories for n=4 beads -5 0 5 10 15 20 25 30 35 40 -2 0 2 4 6 8 10 12 h Trajectories for n=4 beads -5 0 5 10 15 20 25 30 35 40 -2 0 2 4 6 8 10 12 h Trajectories for n=4 beads Figure 4.4: Comparison of the trajectories provided by the simulation (right) and the Neural Network Koopman Operator (left). Each color corresponds to a different bead for three different initial conditions, the rows are (a),(b) and (c) from the top to the bottom. 67
5. Sustainability Sustainability Matrix The assessment of this thesis’s environmental impact will be done using the sustainability matrix. We will examine the role of the thesis’s development, project execution, and associated risks and constraints from three distinct perspectives: environmental, economic, and social. This comprehensive approach aims to deliver a complete image of the project’s overall impact. Environmental Impact The ability to synchronize of certain collective systems is very present in nature [22],[47]. Fireflies flash synchronization, the movement of bird flocks or fish schools are perfect examples of it. By learning from these systems, and implementing its dynamics on robotic collectives, we blend nature with technology, minimizing the environmental impact that it can carry. As showcased in works such as [21], synchronization has proven to have numerous benefits for a multi-agent system, as it is an ideal way to make movement more energetically efficient. In particular, the system studied in this work does not incorporate any communication channel, as the information is exchanged psychically through impacts. This not only lessens the energetic requirements of the system, but also reassembles even more the behavior that can be found in nature, where agents just communicate via collisions. Being able to capture the dynamics of such systems and analyse its properties we enable the design of systems that have a positive impact on the environment. Thanks to the inspiration coming from nature, these systems reduce the energetic consumption in multi agent synchronization, which may be used in a diverse range of applications such as surveillance, power systems or traffic control. Regarding the institution where the thesis has been produced, UC San Diego has core Principles of Sustainability and fosters collaboration through the Advisory Committee on Sustainability, uniting academic programs, facility planning, and campus operations toward sustainable practices. In order to keep on improving in this sense, the institution has set the following goals [48]. •Achieving zero waste •Attaining carbon neutrality (net zero greenhouse gas emissions) from our buildings and vehicle fleet by 2025 and from all sources by 2050 68
•Reducing growth-adjusted potable water consumption by 36 percent by 2025, compared to a three-year average baseline of FY 2005-06, FY 2006-07, and FY 2007-08 •Ensuring 20 percent of sustainable food procurement for campus and medical foodservice operations (e.g., Fair Trade, USDA Organic, locally and regionally grown, Marine Stewardship Council Certified, etc.) •Providing food security for the campus community, with a focus on students, by 2025 •Obtaining LEED Silver or higher certification for all new buildings and significant renovations •Aligning systemwide purchasing power with UC’s strategic objectives to procure goods and services in an environmentally conscious and sustainable manner However, there is still a long path to be followed regarding the environmental impact as Figure 5.1 shows. Although the energy use intensity is below the target, the total emissions still nor reach the goals proposed, mainly due to the rapid growth of the campus in the recent years. Figure 5.1: Breakdown of emissions produced by UCSD. Finally, the specific amount of emission produced by this thesis are described in the following. As it has predominantly been crafted using a pen and paper (that was how the model was developed and the analytical results obtained), there are no emissions on that side. However, one has to remark also the use of the computer, employed for studying the literature of the topic, implementing the numerical simulation in Matlab, running the Neural Network on Google Collab, and drafting the thesis itself. Approximately, an average of 5 hours of computer per day throughout the workweek have been used to work on this project. The stay in UC San Diego spanned eight and a half months, totaling approximately 5(h/day)×20(days/month)×8.5(months)≈850 hours of computer. Coupled 69
[50] ICAO. Carbon emisison calculator, 2024. Accessed on 2024-05-14. [51] Solar. 2024 sdge electric rates: How to lower your electricity costs in san diego, 2024. Accessed on 2024-05-14. [52] UC San Diego. Uc san diego principles of community, 2024. Accessed on 2024-05-14. [53] United Nations. The 17 goals, 2024. Accessed on 2024-05-14. 76