UNIVERSIDADE ESTADUAL PAULISTA “JÚLIO DE MESQUITA FILHO” CÂMPUS DE ILHA SOLTEIRA LUCAS SIMON ARAÚJO DYNAMIC MODE DECOMPOSITION FOR DATA-DRIVEN MODELING OF SPATIO-TEMPORAL DYNAMICS Ilha Solteira 2024 LUCAS SIMON ARAÚJO DYNAMIC MODE DECOMPOSITION FOR DATA-DRIVEN MODELING OF SPATIO-TEMPORAL DYNAMICS Dissertation presented to the São Paulo State University (Unesp), School of Engineering, Ilha Solteira, as part of the requirements for obtaining the MSc. degree in Mechanical Engineering. Knowledge Area: Solid Mechanics. Prof. Dr. Americo Barbosa da Cunha Junior Supervisor Ilha Solteira 2024 Araújo DYNAMIC MODE DECOMPOSITION FOR DATA-DRIVEN MODELING OF SPATIO-TEMPORAL DYNAMICSIlha Solteira2024 57 Sim Dissertação (mestrado)Engenharia MecânicaSistemas DinâmicosNão . FICHA CATALOGRÁFICA Desenvolvido pelo Serviço Técnico de Biblioteca e Documentação Araújo, Lucas Simon. Dynamic mode decomposition for data-driven modeling of spatio-temporal dynamics / Lucas Simon Araújo. -- Ilha Solteira: [s.n.], 2024 57 f. : il. Dissertação (mestrado) - Universidade Estadual Paulista. Faculdade de Engenharia de Ilha Solteira. Área de conhecimento: Mecânica dos Sólidos, 2024 Orientador: Americo Barbosa da Cunha Junior Inclui bibliografia 1. Sistemas dinâmicos não-lineares. 2. Operador de Koopman. 3. Decomposição em modos dinâmicos. 4. Modelagem orientada por dados. A663d ACKNOWLEDGEMENTS I thank God for being my prop and source of purpose in this journey, blessing me with good people when I most needed. I am grateful for all the friendships I made, with amazing people who helped me by sharing their experiences. Some of them: Afonso Nunes, Eduardo Preto, Henrique Novais, Fernanda Colombo, Estênio Fuzzaro, Estêvão Fuzzaro, Renan Cavenaghi, Wellington Nogueira, João Pedro Noremberg, Diogo Karmouche. I would like to extend my gratitude to Professor Samuel da Silva for his assistance, along with his notably team, which welcomed me to FEIS-UNESP. From this team I highlight the substantial contribution of Eduardo Preto, who made the experiment of aluminum plate temperature field possible. It is important to recognize the essential role of Joselaine Seleguini and Bruno Arakaki, who treated my anxiety with professionalism. I am very grateful to my advisor Americo Cunha Jr, who I already esteemed as an amazing researcher and professor, and now I also admire for the person he is. Thank you for your guidance and patience. A special thanks to my support network with my parents Adriane and Sérgio, my brother Vitor, and also my soon fiancee Luana for their unconditional love, which maintained me stand up against the troubles. This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nı́vel Superior - Brasil (CAPES) - Finance Code 001. “Hoje me sinto mais forte, mais feliz quem sabe Só levo a certeza de que muito pouco sei Ou nada sei.” (Tocando em frente - Renato Teixeira e Almir Sater) ABSTRACT Nonlinear phenomena are almost ubiquitous in many different engineering applications. Their underlying nonlinearities bring extra complexity to characterize, predict, and con- trol systems. There are two standard ways to deal with this challenge: through lineari- zation, which restricts the response; and through a nonlinear perspective, which in turn increases the analysis complexity. Still in 1931, Koopman had already proposed a third way, expanding the set of states to encompass the nonlinearities inside a Hilbert space. Towards approximate the Koopman operator, we have explored an up-and-coming tech- nique called dynamic mode decomposition (DMD), which has been bringing attention in the last decades, especially in the fluid dynamics community. The theoretical founda- tions of both Koopman and DMD theories are explained, including the development of the basic algorithm. In order to challenge the performance of DMD reconstruction, four optimization benchmark functions are used to generate complex dynamic field data as input for the algorithm. Their reconstructions provide insights into the limitations of the method. In addition, a physical phenomenon is addressed in this work, the heat diffu- sion into a homogeneous, isotropic, and flat plate. The dynamical field is well recovered through analytically generated data by DMD with good accuracy even in the presence of noise and coarse spatial sampling. To complete the analysis, an experimental setup of an aluminum plate under a heat source is mounted and generate data for the DMD input, also getting good reconstruction results.Beyond the reconstructions, the algorithm also provided the modes, frequencies, and an approximation for the Koopman operator, useful results for identification and control. For all the cases studied, the reconstructions are compared with the original data using similarity analysis for a range of truncation levels, promoting a discussion of how this parameter influences the accuracy of the re- construction. The results confirm the ability of DMD to extract spatio-temporal patterns and recover these original fields with high similarity even using a reduced dimensionality, which corroborates the literature by highlighting DMD as a promising tool for studying dynamic systems, especially those whose governing equations are not sufficiently known. Keywords: Nonlinear dynamical systems; Koopman operator; Dynamic Mode Decom- position; Data-driven Modeling. RESUMO Os fenômenos não lineares são quase onipresentes em diversas aplicações de engenharia. Suas não-linearidades inerentes trazem complexidade adicional para caracterizar, prever e controlar sistemas. Há duas formas tradicionais de lidar com este desafio: a linearização, que restringe a resposta; e por uma abordagem não linear, que, por sua vez, dificulta a análise. Ainda em 1931, Koopman propôs uma terceira via, mediante uma expansão no espaço de estados para compreender as não linearidades dentro de um espaço de Hilbert. Para aproximar o operador de Koopman, exploramos uma técnica emergente chamada decomposição de modos dinâmicos (DMD), que vem ganhando destaque nas últimas décadas, especialmente na comunidade de dinâmica dos fluidos. Os fundamentos teóricos das teorias Koopman e da DMD são explicados, incluindo o desenvolvimento básico do algoritmo. Com o objetivo de desafiar o desempenho da reconstrução DMD, quatro funções benchmark em problemas de otimização são utilizadas para gerar dados de campos dinâmicos complexos como entrada para o algoritmo. Suas reconstruções fornecem uma discussão acerca das limitações do método. Além disso, um fenômeno f́ısico é abordado neste trabalho, a difusão de calor em uma placa plana homogênea e isotrópica. O campo dinâmico é bem recuperado através de dados gerados analiticamente pela DMD, mesmo na presença de rúıdo e amostragem espacial grosseira. Para completar a análise, uma configuração experimental de uma placa de alumı́nio sob uma fonte de calor é montada e gera dados reais para a DMD, obtendo uma boa reconstrução. Além das reconstruções, o algoritmo também forneceu os modos, frequências e uma aproximação para o operador de Koopman, resultados úteis para identificação e controle. Para todos os casos estudados as reconstruções são comparadas com os dados originais utilizando análise de similaridade para diferentes ńıveis de truncamento, promovendo uma discussão de como este parâmetro influencia na precisão do processo. Os resultados confirmam a capacidade da DMD em extrair padrões espaço-temporais e recuperar esses campos originais com alta similaridade mesmo com uma dimensionalidade reduzida, corroborando com a literatura ao destacar a DMD como uma ferramenta promissora para o estudo de sistemas dinâmicos, especialmente quando as equações governantes não são suficientemente conhecidas. Palavras-chave: Sistemas Dinâmicos Não-lineares; Operador de Koopman; Decom- posição em Modos Dinâmicos; Modelagem Orientada por Dados. CONTENTS 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.1 MOTIVATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 OBJECTIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3 MAIN CONTRIBUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 OUTLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 KOOPMAN FORMALISM FOR NONLINEAR DYNAMICAL SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 KOOPMAN OPERATOR . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 STATE-SPACE EXPANSION . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 Polynomial Nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.2 Simple Pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3 DINAMIC MODE DECOMPOSITION . . . . . . . . . . . . . 18 3.1 THEORETICAL FOUNDATIONS . . . . . . . . . . . . . . . . . . . . . 18 3.2 ALGORITHM DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . 20 4 RESULTS AND DISCUSSION . . . . . . . . . . . . . . . . . . 24 4.1 DATA GENERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.1.1 Mathematical fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.1.2 Heat diffusion field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.1.3 Experimental field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.2 SINGULAR VALUES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3 MODES AND FREQUENCIES . . . . . . . . . . . . . . . . . . . . . . 34 4.4 COMPARISON BETWEEN ORIGINAL AND RECONSTRUCTED DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.5 TRUNCATION INFLUENCE ON RECONSTRUCTION THROUGH SIMILARITY ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . . . 45 5 FINAL REMARKS . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.1 CONCLUSIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.2 SCIENTIFIC PRODUCTION . . . . . . . . . . . . . . . . . . . . . . . 50 5.3 FUTURE DIRECTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . 51 REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9 1 INTRODUCTION This chapter introduces the subject of this dissertation. In Section 1.1, the mo- tivation for conducting this research is presented. Following that, Section 1.2 addresses the objectives of the work, while Section 1.3 discusses its achieved contributions. Finally, Section 1.4 outlines how the chapters are organized within this report. 1.1. MOTIVATION Nonlinear phenomena are omnipresent across a wide spectrum of technological applications, manifesting in challenging operations like well drilling (Cunha Jr., 2015; Cunha Jr.; Soize; Sampaio, 2015; Lobo et al., 2022; Ritto; Aguiar; Hbaieb, 2017; Ritto et al., 2009), vibration analysis of slender structures (Facchinetti; Langre; Biolley, 2004; Kurushina; Pavlovskaia, 2018; Lopes, 2022), and seismic analysis for identifying potential reservoirs (Alves et al., 2023; Emerick, 2018; Freitas et al., 2021). The complexities introduced by nonlinearities pose significant hurdles in the characterization, prediction, and control of these phenomena. The conventional strategy to address nonlinear dynamics has been through line- arization, approximating the nonlinear system’s response around an equilibrium point. Although this method simplifies analysis, it inherently limits the scope of the system’s behavior it can capture, confined to narrow operational limits (Silva, 2022). Linearization, relying on a truncated Taylor series expansion and subsequent Jacobian matrix compu- tation for systems with multiple state variables, offers a constrained view of a system’s dynamics (Savi, 2017; Strogatz, 2014). Alternatively, a nonlinear modeling approach employing tools like Poincaré maps, bifurcation diagrams, basins of attraction, and Lyapunov exponents offers a richer, more accurate analysis at the cost of increased complexity (Savi, 2017; Strogatz, 2014). This method has been gaining traction, as evidenced in (Kurushina; Pavlovskaia, 2018; Lopes; Peterson; Cunha Jr., 2019; Norenberg et al., 2023; Reis et al., 2024; Wang et al., 2021). In the early 20th century, Bernard Koopman introduced a groundbreaking perspec- tive on analyzing nonlinear dynamical systems by describing their evolution through an operator acting on an infinite-dimensional Hilbert space. This method, centered around what is now known as the Koopman operator, offers a way to encapsulate the system’s 10 dynamics in a linear framework, albeit not through linearization in the conventional sense. Instead, it provides a “global linearization” by detailing the flow of the system in its state space through a linear evolution equation (Koopman, 1931). In a nutshell, Koopman operator converts a finite dimension nonlinear system into an infinite dimension linear system. The philosophy of this approach is represented in Fig. 1. Figura 1 – Transformation of a nonlinear dynamical system into a linear one trough the action of the Koopman Operator. Koopman operator Nonlinear System (Finite dimension) Linear System (Infinite dimension) Source: Produced by the author. For decades, the practical application of Koopman’s theory remained a conceptual ideal, largely due to computational limitations. However, the advent of modern computa- tional techniques and the growth of data availability enabled the emergence of data-driven modeling, revitalizing the interest in this approach (Brunton; Kutz, 2019). The fluid dy- namics community spearheaded the revival of Koopman idea, with the pioneer work of Igor Mezić (Mezić; Banaszuk, 2004; Mezić, 2005; Mezić, 2013), followed by the contribu- tions of Clarence Rowley (Rowley et al., 2009), and Peter Schmid (Schmid, 2010; Schmid et al., 2011), who set the basis for an Koopman operator approximation from spatio- temporal data via the so called Dynamic Mode Decomposition (DMD) (Budǐsić; Mohr; Mezić, 2012; Williams; Kevrekidis; Rowley, 2015). DMD emerges as a particularly promising technique, offering a powerful lens for analyzing complex dynamical systems across fields as varied as fluid mechanics and epi- demiology (Kutz et al., 2016; Schmid, 2022). DMD’s ability to identify spatio-temporal patterns from high-dimensional data and its modal decomposition capability make it a va- luable tool for system characterization, prediction, and control (Kutz et al., 2016; Proctor; Brunton; Kutz, 2016). Recent explorations have applied DMD across diverse domains, including wind engineering (Li et al., 2023), oscillating cylinder flow analysis (Ping et al., 2021), and simulations of mesh refinement and density-driven gravity currents (Barros et al., 2022; Barros; Cortes; Coutinho, 2020), to tumor growth models (Viguerie et al., 2022). These applications highlight DMD’s adaptability and its potential to complement classical mo- deling approaches (Brunton; Kutz, 2019; Gu et al., 2024; Kaiser; Kutz; Brunton, 2021). 11 In essence, DMD represents a convergence of Singular Value Decomposition (SVD) and Fourier Transform (FT) techniques, offering a robust framework for dimensionality reduction and mode identification in complex systems (Golub; Loan, 2013; Kutz et al., 2016). Due to these captivating abilities, we provided an immersion inside the DMD context with both theoretical foundation and hands-on applications to explore the method efficiency and along with its limitations. A graphical abstract is elaborated and despicted in the Fig. 2, furnishing an overview of the dissertation’s workflow. The upper block reveals the motivation presented in this section, with the data-driven modeling being an alternative branch for describing nonlinear complex dynamical systems, motivated by the growth in data availability and increase in computational power, where DMD is one special technique in this branch for leading with spatio-temporal systems. The middle block overviews the four prime steps of methodology, firstly the data generation through mathematical fields, Partial Differential Equations (PDEs), and experimental sensoring; followed by: pre-processing, DMD algorithm core, and post-processing. The bottom block express the main results, namely the fields reconstruction and extrapolation, the systems diagnosis with the modal decomposition, and a truncation analysis. The last block also present some practical applications that are enabled by the results presented, viz operational insights, control, and decision making. 1.2. OBJECTIVE This study aims to introduce the reader to the DMD method by showing the theory; presenting its exact algorithm; and applying it to demonstrative examples with spatio- temporal data from analytical solution and experimental sensoring; beyond discussing how truncation influences the good reconstruction of data. 1.3. MAIN CONTRIBUTIONS The key contributions of this dissertation are: • Providing a review of the Koopman theory and dynamic mode decomposition with a pedagogical approach; 12 Figura 2 – Graphical abstract summarizing the dissertation’s workflow. The first panel, in orange, explain the motivation; the second, in green, organize the information flux applied in the metodology; and the third panel, in purple, present some of the results achieved. Source: Produced by the author. 13 • Developing and furnish the algorithm for all steps of DMD computation presented. • Employing demonstrative examples of DMD reconstruction into analytical fields with noise added and poor spatial sampling; • Applying the DMD technique in an experimental context to recover the thermal field of an aluminum plate under the action of a heat source; • Revealing some limitations of the exact DMD algorithm by examination of recons- truction results; • Exploring the truncation influence in the reconstruction using similarity analysis. 1.4. OUTLINE The structure of this work spans six chapters: Chapter 1: Introduction - Presents the study’s motivation, objectives, and contribu- tions. Chapter 2: Koopman formalism for nonlinear dynamical systems - Develop a li- terature review around the Koopman methodology and explain the Koopman ope- rator power of dealing with nonlinear dynamical systems. Chapter 3: Dynamic mode decomposition - Delves into the novel approach used to approximate the Koopman operator, presenting the mathematical background along with its capabilities. Also introduce the DMD algorithm, with a detailed step-by-step explanation that culminates in a generalized algorithmic framework. Chapter 4: Results and discussion - Firstly the data generation section is presented, consisting of three parts: data generated through four optimization benchmark functions, an analytical solution for the heat diffusion problem, and finally athwart an experiment generating real-world data. Next, showcases the singular values, modes, frequencies and reconstructions for the proposed examples. Likewise, the truncation influence in the reconstruction is studied throughout the cosine similarity measure between original and reconstructed data. 14 Chapter 5: Conclusions - Provides a concise overview of key findings and suggests directions for further research. 15 2 KOOPMAN FORMALISM FOR NONLINEAR DYNAMICAL SYSTEMS In the beginning of last century, the success of infinite dimension operator-based formalism in the quantum mechanics (associated to Hilbert Theory), motivated its ex- tension to another fields, like classical dynamical fields. In the face of the increasing of physics subsumed to this theory, Koopman (1931) developed a generalization accounting systems defining a steady n-dimensional flow. His theory is explained in the following section inside the dynamical systems context. 2.1. KOOPMAN OPERATOR The dynamic systems of interest here are described by a differential equation of the form, dx dt = f(x, t, µ) , (2.1) that translates its temporal variation as a function of the current state vector x(t) ∈ Rn, the continuous time instant t and a bifurcation parameter µ. The right hand side function f is called the evolution law of the dynamical system (Kutz et al., 2016). When this system has nonlinear characteristics, obtain its solution in a closed analytical form becomes a difficult task. In this sense, Koopman proposes a substitution of variables, expanding the number of observable states to encompass nonlinearities as components of the state space itself (Mezić, 2013; Mezić, 2005). Through this modification, it is possible to describe the system with a linear dyna- mics that takes one current state to the next through a simplified operator, the Koopman operator K. The discrete representation of this formulation is described as g(xk+1) = K (g(xk)) , (2.2) where g represents this imposed change of variables and k represents a discrete instant of time. The downside of this technique is the possibility of facing a closure problem that takes the system of finite dimensions to a system of infinite dimension (Budǐsić; Mohr; Mezić, 2012). 16 2.2. STATE-SPACE EXPANSION Two examples for the state-space expansion are presented in this section, the first when a finite dimension is enough to make the system linear, while in the second, an infinite-dimensional expansion is required. 2.2.1 Polynomial Nonlinearity Suppose a certain dynamical system has its evolution law defined by the following system of ordinary differential equations ẋ1 = ax1 ẋ2 = b xn 1 + c x2 , (2.3) which is a nonlinear system, with a polynomial nonlinearity. Accordingly with the Koopman theory, it is possible to reach an equivalent linear system through an expansion of the state space. Thus, we chose the convenient change of variables: y1 = x1 y2 = xn 1 y3 = x2 . (2.4) To match the pattern shown in the Eq. (2.2), it is necessary to compute the new variable’s derivatives: ẏ1 = ẋ1 = a x1 = a y1 ẏ2 = n xn−1 1 ẋ1 = nxn−1 1 (a x1) = n a xn 1 = n a y2 ẏ3 = ẋ2 = b xn 1 + c x2 = b y2 + c y3 So, we reach a new state space representation, with one more variable, but con- verted into a linear system of ordinary differential equations: ẏ1 ẏ2 ẏ3  =  a 0 0 0 n a 0 0 b c   y1 y2 y3  17 2.2.2 Simple Pendulum Although a naive physical example, the simple pendulum provides a powerful in- sight into how some systems require an infinite expansion of the dimensional state space to make the system linear. To achieve this understanding, we begin with the characteristic equation of its simplest configuration, with no damping or external force, given by θ̈ = − g L sin θ , (2.5) where θ is the angle between the pendulum and the vertical, g is the gravity acceleration, and L is the string length. Just in order to simplify the approach take k = − g L . θ̈ = k sin θ (2.6) x1 = θ̇ x2 = sin θ x3 = θ̇ cos θ x4 = sin θ cos θ x5 = θ̇2 sin θ ... (2.7) Again, it is necessary to compute the new variable’s derivatives to match the pattern of the Eq. (2.2): ẋ1 = θ̈ = k sin θ = kx2 ẋ2 = θ̇ cos θ = x3 ẋ3 = θ̈ cos θ − θ̇θ̇ sin θ = k sin θ cos θ − θ̇2 sin θ = ẋ3 = kx4 − x5 ẋ4 = θ̇ cos2 θ − θ̇ sin2 θ = θ̇(1 − sin2 θ − sin2 θ) = θ̇ − 2θ̇ sin2 θ = x1 − x6 ẋ5 = 2θ̇θ̈ − θ̇3 cos θ = 2θ̇(k sin θ) − θ̇3 cos θ = 2kθ̇ sin θ − θ̇3 cos θ ... Notice that in the simple pendulum case, the underlying sinusoidal nonlinearity leads to a state space that can not close itself, so an infinite dimensional system emer- ges. Considering that the simple pendulum is a example with a sinusoidal response, also common for a broad of applications, the infinite dimensional problem can be frequently achieved. 18 3 DINAMIC MODE DECOMPOSITION This chapter delves into the up-and-coming technique called dynamic mode de- composition (DMD) used to approximate the Koopman operator in the context of data- driven science and engineering. The Section 3.1 describe the theoretical foundations of the theory, while the Section 3.2 enters a more practical field, describing the algorithm development. 3.1. THEORETICAL FOUNDATIONS Dynamic mode decomposition is a method that uses observation data from a dy- namical system to perform a spatio-temporal decomposition of its state representation through the combination of order reduction methods and dynamic mode analysis (Kutz et al., 2016; Kutz; Proctor; Brunton, 2018). In this formalism, the original nonlinear dynamical system in Eq. 2.1 is approxi- mated by a linear proxy d dt x(t) = A x(t) , (3.1) in which the matrix A ∈ RM×M represents the linear Koopman operator in a suitable basis and is analogous to the dynamic matrix seen in mechanical systems like vibrating beams and rods. Employing an eigendecomposition of matrix A, i.e, A ϕk = ωk ϕk, it is possible to write the novel state vector as x(t) = M∑ k=1 ϕk e(ωk t) bk , (3.2) where ϕk ∈ RM are eigenvectors of A, ωk the corresponding eigenvalues, and bk are the initial condition coordinates in the eigenvector basis, which reads as x(t) = Φ e(Ω t) b , (3.3) where the matrix Φ ∈ RM×M collects the eigenvectors ϕk on its columns, Ω ∈ RM×M is a diagonal matrix with the corresponding eigenvalues, and b ∈ RM collects the coordinates bk. Once the continuous dynamical system is defined as in Eq. (3.1), its discrete-time analog is given by xk+1 = A xk , (3.4) 19 where the state vector xk ∈ RM here is defined for discrete-time instants tk = k ∆t, for k = 1, · · · N . Therefore, this novel matrix A is defined in terms of the original matrix A via matrix exponentiation A = e(A ∆t) , (3.5) and the solution for the discrete system is xk = r∑ j=1 ϕj λk j bj = Φ Λk b , (3.6) where λj are the eigenvalues whenever ϕj are the eigenvectors of A. The DMD obtains the best fit for yk in a way that X ′ ≈ AX , (3.7) where X =  | | x1 · · · xN−1 | |  and X ′ =  | | x2 · · · xN | |  , (3.8) are matrices in RM×(N−1) that organize the available data in chronological order. Both X and X ′ contain state data in their rows and time instants in their columns. The difference between X and X ′ is that insofar X contains data from the first instant to the second to last, and the X ′ is composed of its version shifted one time instant, namely from second instant to last instant. In a more formal context, this approximation problem is stated as a regression problem in a matrix space given by arg min A ||X ′ − AX||F , (3.9) in which ||.||F is the Frobenius norm ||X||F = √√√√√ M∑ j=1 N∑ k=1 X2 jk . (3.10) The solution for this regression problem can be obtained by using the Moore- Penrose pseudoinverse of X, called X†. Coming out of the A matrix, the solution for the discrete-time system is directly taken from the Eq. (3.6), so that A = X ′X† . (3.11) 20 A challenge for this approach is that the computation of the pseudo-inverse from large data matrices is a costly process. Toward dealing with this dare a truncation step is applied in the algorithm (Kutz et al., 2016). 3.2. ALGORITHM DESCRIPTION The process of DMD as applied to the analysis of complex systems is depicted in Fig. 3. The procedure begins with the pre-processing stage where snapshots of the system are taken at sequential time intervals t1, t2, · · · , tN . These snapshots are then organized into two matrices, X and X ′, representing consecutive states. Following pre-processing, the DMD algorithm is applied to these matrices to compute the matrix A which ap- proximates the best-fit linear operator that maps between the states. This involves the computation of singular value decomposition (SVD) as explained by Golub e Loan (2013), and the subsequent DMD modes and eigenvalues. In the diagnosis phase, the eigenvalues λ and modes Φ are extracted, revealing the intrinsic frequencies and spatial structures governing the system dynamics. Lastly, the system’s future states are predicted by ex- trapolating the dynamic modes forward in time, allowing both the reconstruction of the system at known time points and the prediction of future states. The DMD algorithm is elucidated through the following steps: 1. Pre-processing: • Data Organization: Assemble the state snapshot matrices into a composite data matrix. Each column encapsulates the complete state information at a respective time step. • Matrix Partition: Divide the assembled data matrix into two matrices, X, and X ′. Matrix X contains columns from the first to the penultimate time step, while X ′ includes columns from the second to the final time step. 2. DMD factorization: • Economy SVD: Perform the economy Singular Value Decomposition (SVD) of X, to discern the principal modes of the system: X = U Σ V T 21 for which U ∈ RM×R and V ∈ R(N−1)×R are orthogonal matrices , and Σ ∈ RR×R is a diagonal matrix, and R is the rank of X. • Matrix Truncation: Approximate X with a truncated set of matrices capturing the dominant features of the decomposition: X ≈ Ur Σr V T r where Ur = U(:, 1 : r), Vr = V (:, 1 : r), and Σr = Σ(1 : r, 1 : r), where the reduction order r is such that r ≪ R. • POD Projection: Utilize Proper Orthogonal Decomposition (POD) to project the matrix A onto a reduced-order space: à = UT r A Ur = UT r X ′ Vr Σ−1 r so that à ∈ Rr×r. • Eigendecomposition: Determine the eigenvalues and eigenvectors of the reduced matrix Ã, which represent the dynamics of the reduced system: à W = W Λ where W ∈ Rr×r collects in its columns the eigenvectos of Ã, ϕk, and Λ ∈ Rr×r is a diagonal matrix with the associated eigenvalues λk. 3. Dynamics Reconstruction: • Eigendecomposition Mapping: Map the eigendecomposition from à back to the full operator A: A = Φ Λ ΦT where the modal matrix Φ ∈ RM×r is such that Φ = X ′ Vr Σ−1 r W . • Initial Value Problem (IVP): Solve the IVP to reconstruct the dynamic state by means of modal expansion: x(t) ≈ Φ exp (Ω t) b where the elements of the diagonal matrix Ω are such that ωk = ln λk/∆t, and b = Φ† X(:, 1). 22 4. Post-processing: • Data Unpacking: Convert the reconstructed data matrix, with its time ins- tances represented as columns, back into the format of the original snapshot matrices. The code below shows a pedagogical MATLAB implementation of this algorithm, where one of the steps described above is clearly indicated. The reader can download this code on GitHub (Araujo, 2024). 1 function [Phi , Omega , Xdmd , S] = dmd(X,dt ,r) 2 % Step 1: separate X e X' matrices 3 X1 = X(: ,1:end -1); X2 = X(: ,2: end); 4 % Step 2: compute economy SVD 5 [U,S,V] = svd(X1 ,'econ '); 6 % Step 3: truncate main modes 7 Ur = U(: ,1:r); Sr = S(1:r ,1:r); Vr = V(: ,1:r); 8 % Step 4: POD 9 Atilde = Ur '*X2*Vr/Sr; 10 % Step 5: Solve the eigen problem 11 [W,Lambda] = eig(Atilde); 12 % Step 6: Recover original eigenpairs 13 Phi = X2*Vr/Sr*W; Omega = log(diag(Lambda))/dt; 14 % Step 7: Solve the IVP 15 x0 = X1 (: ,1); b = Phi\x0; 16 snaps = size(X1 ,2); t = (0: snaps -1)*dt; 17 time_part = zeros(r,snaps); 18 for n = 1: snaps 19 time_part (:,n) = b.* exp(Omega*t(n)); 20 end 21 Xdmd = Phi* time_part ; 22 end 23 Figura 3 – Schematic overview of the DMD workflow. The top panel illustrates the pre- processing of system snapshots into data matrices. The middle panel outlines the DMD algorithm, including matrix construction and decomposition. The bottom left panel displays the frequencies and spatial modes resulting from the DMD diagnosis, while the bottom right panel shows both the reconstruction of past states and the prediction of future states using the identified dynamic modes. This multi-step process encapsulates the entire pipeline from data collection to predictive modeling in the application of DMD. Source: Produced by the author. 24 4 RESULTS AND DISCUSSION This chapter overviews the results from the applied metodology, concerning the field generation, the modal decomposition, the field reconstruction, and an exploration of how truncation influences into the quality of the outcome. Hence, the chapter is organized in four sections, namely: Section 4.2, showcases three ways employed to generate data as an input for the DMD algorithm; Section 4.2, presenting the singular values for the fields and the truncation taken; Section 4.3, which covers the modal decomposition; Section 4.4, providing a visual comparison between the original and reconstructed fields; and finally the Section 4.5, which discusses the similarity for different truncation values. 4.1. DATA GENERATION This section presents three ways used to generate data for the DMD algorithm application, so it is composed of three subsections: the generation using optimization benchmark functions, in subsection 4.1.1; athwart the analytical solution for a heat dif- fusion problem, in subsection 4.1.2; and finally through the sensoring of a heat diffusion experiment, in subsection 4.1.3. 4.1.1 Mathematical fields Aiming to illustrate the ability of dynamic mode decomposition in reconstructing spatio-temporal patterns from data, four nonlinear functions are considered as bench- marks here, namely Ackley, Rastrigin, Griewank, and Schaffer N.2 functions. All of them are typically used to evaluate the performance of optimization algorithms due to their complexity and several optimal values (Spall, 2003), an interesting feature in the context of challenging the DMD capability. The Tab. 1 shows the expressions for these functions such as their usual domains considered for evaluation. For sake of computation, the space coordinates are discretized with the aid of a 1000 × 1000 regular grid, which results in the static fields represented in the Fig. 4. In order to incorporate temporal dynamics into our analysis, we introduce a time- dependent variation into the spatial coordinates. The position xi is redefined as a function of time according to a harmonic signal, i.e., 25 Tabela 1 – Functions used as benchmark for optimization problems with their usual do- mains description. Name Function Domain Ackley fa = −20 exp −0.2 √√√√0.5 2∑ i=1 x2 i  − exp ( 0.5 2∑ i=1 cos (2πxi) ) + 20 + e xi ∈ [−32.768, 32.768] Rastrigin fr = 20 + 2∑ i=1 ( x2 i − 10 cos (2πxi) ) xi ∈ [−5.12, 5.12] Griewank fg = 2∑ i=1 x2 i 4000 − 2∏ i=1 cos ( xi√ i ) + 1 xi ∈ [−600, 600] Schaffer N. 2 fs = 0.5 + sin2 (x2 1 − x2 2) − 0.5 (1 + 0.001(x2 1 + x2 2)) 2 xi ∈ [−50, 50] Source: Produced by the author. xi(t) = A sin (t) , (4.1) where A represents the amplitude, corresponding to the magnitude of the original static coordinate xi. The function is designed to oscillate with time, bounded within the interval 0 ≤ t < π/4. To discretize the temporal domain for our simulations, we divide the time interval into 100 equidistant points. Applying these modifications to the benchmark functions, the dynamical fields are shown in Fig. 5. The three columns correspond to three different snapshots of the field, in the 1-st, 50-th and 100-th instants, the first row is the evolution of Ackley function, the second one of Rastrigin, the third is the Griewank instants, and the fourth is relative to the Schaffer N.2. Aiming to emulate disturbs in the measurements as well as uncertainties, white Gaussian noise was added to the dynamical fields with amplitude equivalent to 10% of the total amplitude of the field, reaching the instants presented in the Fig. 6. 26 Figura 4 – Static field of the (a) Ackley, (b) Rastrigin, (c) Griewank, (d) Schaffer N.2 functions, commonly used for optimization problem benchmark. -20 0 20 x 1 -30 -20 -10 0 10 20 30 x 2 5 10 15 20 (a) -5 0 5 x 1 -5 0 5 x 2 10 20 30 40 50 60 70 80 (b) -600 -400 -200 0 200 400 600 x 1 -600 -400 -200 0 200 400 600 x 2 20 40 60 80 100 120 140 160 180 (c) -50 0 50 x 1 -50 0 50 x 2 0.4999 0.49995 0.5 0.50005 0.5001 (d) Source: Produced by the author. 27 Figura 5 – Dynamical field evolution of (a) Ackley, (b) Rastrigin, (c) Griewank, (d) Schaf- fer N.2 functions. Three columns are presented corresponding to three time instants for each field: 1st in the left, 50th in the middle, 100th in the right. t 1 -20 0 20 -30 -20 -10 0 10 20 30 x 2 t 50 -20 0 20 x 1 t 100 -20 0 20 5 10 15 20 (a) t 1 -5 0 5 -5 0 5 x 2 t 50 -5 0 5 x 1 t 100 -5 0 5 10 20 30 40 50 (b) t 1 -500 0 500 -600 -400 -200 0 200 400 600 x 2 t 50 -500 0 500 x 1 t 100 -500 0 500 10 20 30 40 50 60 70 (c) t 1 -50 0 50 -50 0 50 x 2 t 50 -50 0 50 x 1 t 100 -50 0 50 0.4996 0.4998 0.5 0.5002 0.5004 (d) Source: Produced by the author. 28 Figura 6 – Gaussian noise added version (10%) of the dynamical field evolution of (a) Ackley, (b) Rastrigin, (c) Griewank, (d) Schaffer N.2 functions. Three columns are presented corresponding to three time instants for each field: 1st in the left, 50th in the middle, 100th in the right. t 1 -20 0 20 -30 -20 -10 0 10 20 30 x 2 t 50 -20 0 20 x 1 t 100 -20 0 20 5 10 15 20 (a) t 1 -5 0 5 -5 0 5 x 2 t 50 -5 0 5 x 1 t 100 -5 0 5 10 20 30 40 50 (b) t 1 -500 0 500 -600 -400 -200 0 200 400 600 x 2 t 50 -500 0 500 x 1 t 100 -500 0 500 10 20 30 40 50 60 70 (c) t 1 -50 0 50 -50 0 50 x 2 t 50 -50 0 50 x 1 t 100 -50 0 50 0.4995 0.5 0.5005 (d) Source: Produced by the author. 29 4.1.2 Heat diffusion field Going to a physical scenario, the DMD is then applied to a temperature dynamical field. The situation proposed is a plate of isotropic and homogeneous material cooling. From (Lienhard V; Lienhard IV, 2024) the heat transfer formulation for the conduction mechanism, when the conductivity is considered constant and the material is incompres- sible, is given by ∇2T + q̇ K = 1 α ∂T ∂t (4.2) with T being the temperature, q̇ the heat flux from the thermal source, K the thermal conductivity, α the thermal diffusivity, ρ the density, c = cv = cp the specific heat, and t the time. Simplifying the equation for a situation with no thermal source and thermal diffusivity unitary (α = 1), the Eq. 4.2 is subsumed to ∇2T = ∂T ∂t . (4.3) The boundary conditions proposed to evaluate the temperature field T (x, t) in the domain x = (x, y) with x ∈ [0, 1], and y ∈ [0, 1] are: T (0, y, t) = T (1, y, t) = 0 T (x, 0, t) = T (x, 1, t) = 0 (4.4) while the initial condition is given by T (x, y, 0) = 1. Thus, accordingly to (Sampaio; Wolter, 2001) the solution for the Eq. 4.3 becomes T (x, y, t) = ∑ i ∑ j 4 ijπ2 (1 − cos (iπ)) (1 − cos (iπ)) e−(i2+j2)π2t sin (iπx) sin (jπy) . (4.5) Evaluating this solution in the proposed domain for 100 time instants, the resulting dynamical field is displayed in the Fig. 7, also with three time instants (1st, 20th, and 50th) to show up the time evolution. 30 Figura 7 – Analytical temperature field evolution of a cooling plate through conduction. Three columns are presented corresponding to three time instants for each field: 1st in the left, 20th in the middle, 50th in the right. t 1 0 0.5 1 0 0.2 0.4 0.6 0.8 1 x 2 t 20 0 0.5 1 x 1 t 50 0 0.5 1 0 0.2 0.4 0.6 0.8 Source: Produced by the author. Toward considering a situation closer to an experimental, when the sensing is limited in resolution, a coarser sampling in the space is assumed, by taking just a 10×10 mesh grid, presented in the Fig. 8. Again, to emulate the disturbs and uncertainties, Gaussian white noise is added to the field, with intensity equivalent to 10% of the overall amplitude of the original field, exposed in the Fig. 9. Figura 8 – Analytical temperature field evolution of a cooling plate through conduction. Three columns are presented corresponding to three time instants for each field: 1st in the left, 20th in the middle, 50th in the right. t 1 0 0.5 1 0 0.2 0.4 0.6 0.8 1 x 2 t 20 0 0.5 1 x 1 t 50 0 0.5 1 0 0.2 0.4 0.6 0.8 Source: Produced by the author. 31 Figura 9 – Analytical temperature field evolution of a cooling plate through conduction. Three columns are presented corresponding to three time instants for each field: 1st in the left, 20th in the middle, 50th in the right. t 1 0 0.5 1 0 0.2 0.4 0.6 0.8 1 x 2 t 20 0 0.5 1 x 1 t 50 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Source: Produced by the author. 4.1.3 Experimental field Progressing to a more realistic scenario, an experiment was designed to generate a dynamical temperature field as input for the DMD algorithm. The experimental con- figuration is illustrated in Fig. 10, with two perspectives provided to highlight the ar- rangement of components. The primary objective of this experiment was to observe and analyze the temperature evolution of an aluminum plate subjected to a controlled heat source, represented by a heat gun. The materials used was: • Aluminum Plate: Dimensions of 305 mm × 250 mm × 1.5 mm; • Heat Gun: Model Hikari HK-508, rated at 1500W; • Thermal Imager: Fluke Ti25, used to capture the temperature field; • Component Supports: Used to align the heat gun and thermal imager at specific positions. To ensure accurate temperature measurements, the aluminum plate was painted black. This was necessary to correct for the low emissivity and high reflectivity of the aluminum surface, which would otherwise lead to inaccurate thermal readings from the imager. 32 The experimental procedure consisted of two stages: a heating phase followed by a cooling phase consisting of: 1. Heating Phase: • The heat gun was directed at the center of the aluminum plate and turned on for 150 seconds; • During this phase, the plate’s surface temperature gradually increased, forming a dynamic temperature field. 2. Cooling Phase: • After the heat gun was turned off, the plate was left to cool naturally for 300 seconds. • No external cooling mechanism was used, allowing the plate to return to am- bient temperature through natural convection and radiation. Throughout both stages, temperature data were collected using the Fluke Ti25 thermal imager, with frames captured every 10 seconds. This resulted in a total of 44 frames: 15 during the heating phase (0–150 seconds) and 30 during the cooling phase (150–450 seconds). These frames provided a time-resolved dataset of the temperature distribution across the plate’s surface, serving as input for the DMD algorithm to analyze the underlying spatial and temporal dynamics. Three frames are stated in the Fig. 11, that correspond to 1st, 15th, and 30th instants (0 s, 150 s, and 300 s), outlining the visualization of the normalized temperature field evolution. It’s important to highlight that the output from the thermal imager is given in a three-layer matrix for each frame, the RGB (red, green, blue) representation of colors. Therefore, the DMD must also to be performed in three channels, each one with its own truncation choice. 33 Figura 10 – Experimental setup for measuring the temperature field evolution of a alu- minum plate under a heat gun as a heat source. Two perspectives are shown, a front view (a) and a back view (b). Source: Produced by the author. Figura 11 – Experimental temperature field evolution of a aluminum plate under a heat gun source. Three columns are presented corresponding to three time instants for each field: 1st in the left, 15th in the middle, 30th in the right. t 1 t 15 t 30 0 0.5 1 Source: Produced by the author. 34 4.2. SINGULAR VALUES First of all, the singular values of X are the first step to achieve de modal decom- position of data and must be examined to provide insights into truncation taken into the algorithm. The process of obtaining the singular values is described as the first step of the DMD factorization in the Section 3.2, and computed in the sixth row of the simplified code presented in that section. The singular values for the analytical dynamical fields are presented in the Figure 12, while for the experimental fields are in the Fig. 13. Their magnitudes are in the log scale into the vertical axis, and the first 15 indexes of singular values are in the horizontal axis. The region containing just main contributions is highlighted in light gray and will be the only singular values taken in the truncation. Notice that for the Ackley function, despite the first nine singular values being considerably bigger than the next ones, there is a second baseline of values with similar importance. Therefore, using nine modes yields a better reconstruction, which is con- firmed in the further truncation analysis. Similarly, for the Rastrigin function, despite the first singular value is also larger than the others, truncating with seven modes is the option chosen to encompass the next level of singular values. Griewank function, in its turn, has two modes remarkably dominant, the same for the Schaffer N.2 which needs only one singular value, and the Heat diffusion field also with two modes. As the experimental field has three layers of information for the red, green, and blue shades, there are also three singular values decomposition. Spot that both of them have a more subtle decay, such that more singular values are needed for a good description of the field evolution. For the red channel, singular values seems stabilize in a small level after the 21th mode, so that 21 modes are chosen. Following the same criteria, for the green and blue channels 18 modes are selected. 4.3. MODES AND FREQUENCIES In DMD, modes represent the dominant spatial patterns in a system’s evolution, with each mode associated with a complex eigenvalue that dictates its temporal behavior — whether it oscillates, grows, or decays. Frequencies within the unit circle indicate 35 Figura 12 – Singular values of X matrix for the datasets corresponding to the spatio- temporal patterns of the Ackley (a), Rastrigin (b), Griewank (c), Schaffer N.2 (d) functions, and for the heat diffusion field (e). (a) (b) (c) (d) (e) Source: Produced by the author. stability, while those outside it signal instability (Strogatz, 2014). These modes help uncover key dynamics, such as vortex patterns in fluid flows or deformation shapes in structures, and their amplitudes reflect their contribution to the system’s behavior. By focusing on the most relevant modes, DMD provides a low-dimensional representation that captures essential dynamics. From the nine modes taken in the Ackley field decomposition, six are shown in 36 Figura 13 – Singular values of X matrix for the datasets corresponding to the spatio- temporal patterns of the experimental components field red (a), green (b), blue (c). (a) (b) (c) Source: Produced by the author. the Fig. 14. The first and second modes are very similar, with a slight difference of the third one, which also compose a pair of close modes with the fourth mode, the reason why fourth is omitted. The same happens with the fifth and sixth modes, and with the pair eight and nine. The first four modes recover mainly the global surface, while the next ones resume the local oscillations with their local minima. 37 Figura 14 – Modes and frequencies for Ackley decomposition x 1 x 2 r =1 -5 0 5 r =2 r =3 1 2 3 10 -3 r =5 -5 0 5 -5 0 5 r =7 -5 0 5 r =8 -5 0 5 1 2 3 10 -3 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. Respecting the Rastrigin field, an alike approach is taken. Six modes are presented in the Fig. 15, the first and second are very similar, as like as third and fourth, and sixth and seventh pairs. Recurrently, the first modes are responsible for the major information about the field evolution while the next ones recover the local details. Figura 15 – Modes and frequencies for Rastrigin decomposition x 1 x 2 r =1 -5 0 5 r =2 r =3 1 2 3 10 -3 r =4 -5 0 5 -5 0 5 r =5 -5 0 5 r =6 -5 0 5 1 2 3 10 -3 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. For the Griewank field, only two modes are considered, as depicted in Fig. 16. Likewise the previous modal decomposition, the first mode captures the majority of the information, while the second mode adds finer details. In contrast, the Schaffer field main mode derived from DMD do not accurately des- cribe the behavior of the original field, as displayed in the Fig. 17. This issue is thoroughly examined and discussed in Section 4.4, with hypotheses about the decomposition’s failure in this context, along with proposed solutions to deal with this trouble. 38 Figura 16 – Modes and frequencies for Griewank decomposition. x 1 x 2 r =1 -600 -400 -200 0 200 400 600 -600 -400 -200 0 200 400 600 r =2 -600 -400 -200 0 200 400 600 0.5 1 1.5 2 2.5 10 -3 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. Figura 17 – Modes and frequencies for Schaffer N.2 decomposition. x 1 x 2 r =1 -50 0 50 -50 0 50 9.993 9.994 9.995 9.996 9.997 9.998 9.999 10 10.001 10 -4 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. About the analytical diffusion field for the cooling plate, the two modes taken are outlined in the Fig. 18. These modes represent properly the field evolution, as further proven in the next section. Figura 18 – Modes and frequencies for the temperature field decomposition x 1 x 2 r =1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 r =2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. The modal decomposition for the experimental field is shown in the Fig. 19, where it is verified that all modes are similar. The frequencies are represented by their respective 39 colors, so that the frequencies for the red component of the thermal image are stated as red circles in the complex plane, what extend for the green and blue components as well. Figura 19 – Modes and frequencies for the experimental field decomposition. r =1 r =2 r =3 r =4 r =5 r =6 -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 Source: Produced by the author. An important aspect to highlight is that the eigenvalues of all the dynamical fields presented here lie within the unit circle in the complex plane. Since these fields are discrete, this indicates that the systems are stable. 4.4. COMPARISON BETWEEN ORIGINAL AND RECONSTRUCTED DATA This section allows an qualitative overview of the decomposition accuracy by com- paring the original fields with the reconstructed ones. Likewise, an previous analysis about the truncation step influence on the reconstruction effectiveness is furnished. Starting from the optimization benchmark fields, the Ackley field reconstruction is stated in the Fig. 20, where the first row is the original field, the second one is its noised version. The third row contains a reconstruction with one mode, showing that just one mode is not enough to get a good reconstruction. Meanwhile, the fourth row proven that nine mode is already capable of generating a good reconstruction. Adding even more modes, we reach the reconstruction with 19 modes placed in the fifth row, resulting an even better reconstruction. However, considering the dimensionality reduction goal, just nine modes produce a result very close to the original field with significantly dimensionality reduction, corroborating the previous singular values analysis. 40 Figura 20 – Time instants comparison between original and reconstructed data for the Ackley dynamical field. The first row contains the original field, the second one its version added by 10% gaussian noise. The third accomodate the reconstruction with one mode for truncation, the fourth with nine modes, while the fifth comprehend 19 modes. Whereas, the three collumns, represent three instants, the 1st, the 50th, and the 100th x 1 x 2 t 1 -20 0 20 t 50 t 100 5 10 15 20 -20 0 20 5 10 15 20 -20 0 20 5 10 15 20 -20 0 20 5 10 15 20 -20 0 20 -20 0 20 -20 0 20 -20 0 20 5 10 15 20 Source: Produced by the author. The next figures follow the same pattern with first row being the original field by means of comparison, the second row a noised version and finally the last three rows a comparison between three levels of truncation assumed for the reconstruction. The Rastrigin reconstruction has a bad performance for just one mode, what is seen by the time instants in the third row of Fig. 21. Increasing the truncation limit, with six modes the reconstruction is almost good (fourth row of Fig. 21), and with seven modes the reconstruction is really close to the original field, what is demonstrated by the visual 41 comparison of the fifth row with the first row of the Fig. 21. Again, the visualization is in line with the singular values study. Figura 21 – Time instants comparison between original and reconstructed data for the Rastrigin dynamical field. The first row contains the original field, the second one its version added by 10% gaussian noise. The third accommodate the reconstruction with one mode for truncation, the fourth with six modes, while the fifth comprehend seven modes. Whereas, the three columns, represent three instants, the 1st, the 50th, and the 100th x 1 x 2 t 1 -5 0 5 t 50 t 100 10 20 30 40 50 -5 0 5 10 20 30 40 50 -5 0 5 10 20 30 40 50 -5 0 5 10 20 30 40 50 -5 0 5 -5 0 5 -5 0 5 -5 0 5 10 20 30 40 50 Source: Produced by the author. Meanwhile, the reconstruction with only two modes (fourth row of Fig. 22) is as good as with 15th modes (fifth row of Fig. 22) for the Griewank field, and significantly better than with just one mode. Thus, the truncation previously chosen confirmed to be a good choice. 42 Figura 22 – Time instants comparison between original and reconstructed data for the Griewank dynamical field. The first row contains the original field, the second one its version added by 10% gaussian noise. The third accommodate the reconstruction with one mode for truncation, the fourth with two modes, while the fifth comprehend 15 modes. Whereas, the three columns, represent three instants, the the 1st, the 50th, and the 100th x 1 x 2 t 1 -500 0 500 t 50 t 100 20 40 60 -500 0 500 20 40 60 -500 0 500 20 40 60 -500 0 500 20 40 60 -500 0 500 -500 0 500 -500 0 500 -500 0 500 20 40 60 Source: Produced by the author. Nevertheless, the Schaffer N.2 field could not be well recovered, either with one, ten, or even 100 modes, as can be seen in the Fig. 23. An hypothesis is that DMD has dif- ficulties to deal with this function characteristic discontinuities, once they translates into sparse matrices, demanding SVD and eigendecomposition requires a special treatment. Some alternatives for the exact DMD algorithm has been gaining attention to offer a more robust procedure. The BOP-DMD (Bagging, Optimized Dynamic Mode Decomposition) uses statistical bagging methods to produce an ensemble of DMD models instead of just one, whose output metrics improve the result quality (Sashidhar; Kutz, 2022). Another 43 modification is proposed by (Askham; Kutz, 2018), allowing to collect unevenly spaced sample times by associating a variable projection method to DMD. There is a broad of others possibilities that have been proposed to deal with DMD limitations, among them the promising extended DMD (Kutz et al., 2016). Figura 23 – Time instants comparison between original and reconstructed data for the Schaffer N.2 dynamical field. The first row contains the original field, the second one its version added by 10% gaussian noise. The third accommodate the reconstruction with one mode for truncation, the fourth with 10 modes, while the fifth comprehend 100 modes. Whereas, the three columns, represent three instants, the the 1st, the 50th, and the 100th x 1 x 2 t 1 -50 0 50 t 50 t 100 0.4996 0.4998 0.5 0.5002 0.5004 -50 0 50 0.4996 0.4998 0.5 0.5002 0.5004 -50 0 50 0.4996 0.4998 0.5 0.5002 0.5004 -50 0 50 0.4996 0.4998 0.5 0.5002 0.5004 -50 0 50 -50 0 50 -50 0 50 -50 0 50 0.4996 0.4998 0.5 0.5002 0.5004 Source: Produced by the author. Relatively to the field generated by the analytical solution of the cooling plate, an additional panel is stated, showing also the coarsening step described previously. Thus, the Fig. 24 displays the analytical solution of the cooling plate in the first row, the solution with spatial bad sampling in the second row, followed by its noised version with 10% 44 Gaussian white noise in the third row. Two reconstructions are presented, applying only two modes and using 11 modes for truncation, in the fourth and fifth rows respectively. Notice that two modes is already enough to produce a reconstruction really similar to the original coarsened field. Although, choosing more modes seems also capture noise information, verified by comparing third and fifth rows of the Fig. 24. Figura 24 – Time instants comparison between original and reconstructed data for the Heat dynamical field. The first row contains the original field, the second one its version sampled with a 10:1 rate in space, and the third enclose represent this field added by 10% gaussian noise. The fourth accommodate the reconstruction with two mode for truncation, while the fifth comprehend 11 modes. Whereas, the three columns, represent three instants, the the 1st, the 50th, and the 100th x 1 x 2 t 1 0 0.5 1 t 20 t 50 0 0.5 0 0.5 1 0 0.5 0 0.5 1 0 0.5 0 0.5 1 0 0.5 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 Source: Produced by the author. The result for reconstruction of experimental field using three layers (RGB) is 45 exposed in the Fig. 25 using a normalized scale. Notice that red and blue components are well recovered, while the green one is not. A possible reason for this problem is poor sampling in the time, which can be overcome by increasing the sampling rate. Another possibility is a DMD difficulty in deal with sparse matrices, once the green component of the field is restricted to a small region. To handle with this setback, some recent modifications of DMD like the previously presented Bagging, Optimized DMD or Variable Projection Method DMD can be tested. Further, from a pre-processing perspective, exploring the conversion of RGB (Red, Green, Blue) data into the HSV (Hue, Saturation, Value) can be a valuable alternative to explore for improving reconstruction. Figura 25 – Time instants comparison between original and reconstructed data for the experimental temperature field. The first row contains the original field. Meanwhile, the second one accommodate the reconstruction. Whereas, the three columns, represent three instants, the the 1st, the 50th, and the 100th t 1 t 15 t 30 0 0.5 1 0 0.5 1 Source: Produced by the author. 4.5. TRUNCATION INFLUENCE ON RECONSTRUCTION THROUGH SIMILA- RITY ANALYSIS Despite the visual inspection providing an interesting comparison between original and reconstructed data, also a quantitative perspective is desired (Golub; Loan, 2013). To handle this need, the similarity of the two matrices is computed using the cosine of the angle between them, cos (θ) = v1 · v2 |v1||v2| , (4.6) 46 Figura 26 – Truncation analysis through similarity of the Ackley (a), Rastrigin (b), Gri- ewank (c), Schaffer N.2 (d) fields and for the analytical temperature field of the cooling aluminum plate (e). (a) (b) (c) (d) (e) Source: Produced by the author. where v1 represent the X matrix stretched into a single vector, while the v2 is the stretched version of the reconstructed matrix Xr. As it is a cosine measure, the closer to one the more similar. Using the similarity tool, an exploration of the truncation influence in the quality of the reconstruction are realized. For the analytical fields, the results are exposed in the Fig. 26, while for the expe- rimental data is in the Fig. 27, splitted in its three components (RGB). The truncation regions assumed are again highlighted in light gray. The inspection of the results allows proof of the previous analysis, confirming the truncation levels chosen. An interesting aspect is that the Griewank function reconstruc- 47 Figura 27 – Truncation analysis through similarity of the red (a), green (b), and blue (c) components of the experimental field. (a) (b) (c) Source: Produced by the author. tion does not seem to reach similarity one even in a truncation long horizon, reflecting the exact DMD can not capture some subtle details. Another point to mention is that even with a bad reconstruction, proven by the instant visualization, the Schaffer N.2 field similarity is really close to one, which reveals similarity alone is not useful and must be sparingly used, so that a suggestion to improve analysis is to verify more metrics like the statistical measures for the difference between the original and reconstruction field, 48 to quote media and variance. A last interesting result to point out is the unstable beha- vior of the green component similarity concerning the truncation, which reflects the poor reconstruction of this color spectra already seen. 49 5 FINAL REMARKS This chapter is splitted in three sections: the Section 5.1 summarizes the conclu- sions from this dissertation, the Section 5.2 presents the scientific contributions during master’s course, while the Section 5.3 delineates potential next steps for this research. 5.1. CONCLUSIONS This dissertation explored the application of Dynamic Mode Decomposition (DMD) in analyzing nonlinear dynamical systems, emphasizing its ability in extracting and re- constructing spatio-temporal patterns with reduced dimensionality. The investigation initiated with the theoretical foundations, passed through the algorithm description, and reached practical applications, where the DMD power was challenged. The literature review provided a theoretical background for the Koopman operator and its approximation through the DMD for dealing with complex dynamical systems using just data. The development of the DMD reconstruction algorithm was also explained in detail. Four benchmark functions from optimization problems were employed to test the DMD algorithm, generating complex dynamic field data. The results highlighted DMD’s strengths in reconstructing these fields with high accuracy, even in the presence of noise emulating experimental disturbances. This previous analysis allows conducting DMD for a testing with physical applications, where data may be also imperfect or incomplete. A part of the research was dedicated to the heat diffusion phenomenon in a ho- mogeneous, isotropic flat plate. For this application along with noise, also a spatial poor sampling is applied emulating real situations, with disturbances and limited sensoring. The results shows that DMD algorithm again successfully recovered the dynamic tempe- rature field. Furthermore, finally, the experimental data collected from the heat diffusion expe- riment demonstrated the practical applicability of DMD. The ability to extract modes, frequencies, and an approximation of the Koopman operator from the experimental data shed light in the direction of real system identification and control. In verifying the success of the DMD algorithm, it was essential to verify both the similarity and the visualization of the reconstructed fields. Accurate reconstruction 50 requires not only quantitative metrics but also qualitative visual assessments to confirm that the reconstructed fields will closely resemble the original data. This dual criterion is crucial to ensure the captured modes accurately represent the underlying dynamics of the system. DMD has proven to be a powerful tool for dimensionality reduction, significantly simplifying complex datasets. For each field analyzed, only a small number of modes were necessary to achieve accurate reconstructions. For instance, the heat diffusion field was effectively captured using just a few dominant modes, illustrating the efficiency of DMD in reducing the dimensionality of high-dimensional datasets without loosing the main field information. However, some limitations were encountered and deserves careful attention. The accuracy of the DMD algorithm was found to be highly dependent on the quality of input data, so that a rigorous pre-processing step is required, by pointing results limitations and requirements based on physical understanding. Additionally, the computational cost of DMD can be significant, especially for very high-dimensional datasets. Another care that must be taken is related to sparse matrices and surfaces with sharp peaks, where DMD can not capture well the dynamics and variations of exact DMD could be a good suggestion to surpass this concern. Overall, the findings of this dissertation confirm the promise of DMD as a valuable tool for studying dynamic systems, particularly those with unknown or partially known governing equations. The method’s ability to provide high-fidelity reconstructions with reduced dimensionality positions it as a powerful approach for application in various fields of engineering and beyond. 5.2. SCIENTIFIC PRODUCTION The development of this research allows the following productions. • Presentation of ”Dynamic Mode Decomposition: A Powerfull Data-Driven Modeling Tool”in the Simpósio PPGEM 2023 - Ilha Solteira/SP; • Presentation of ”Reconstrução de Campos Dinâmicos via Decomposição em Mo- dos Dinâmicos”in the VIII ERMAC (Encontro Regional de Matemática Aplicada e Computacional) - Regional 9 - Ilha Solteira/SP; 51 • Registration of the software ”DynaMoDE - Dynamic Mode Decomposition En- gine”in Intituto Nacional de Propriedade Intelectual (INPI). The most recent results are also generating ongoing productions. 5.3. FUTURE DIRECTIONS Some future directions are proposed for the following of this research: • The application of new variant of DMD, like BOP-DMD is an interesting field in direction of improve the method robustness; • An inherent intention that also emerges from this promising capabilities relies on comparing the DMD methodology with another data-driven methods such as Karhunen- Loève Expansion (KLE); • Likewise, the exploration of the DMD capabilities of diagnosis, prediction and con- trol is a further aim. REFERENCES ALVES, C. D. et al. Horizon extraction using absolute seismic phase obtained by unwrapping techniques. Journal of Applied Geophysics, Amsterdam, v. 218, p. 105198, 2023. ARAUJO, L. S. DMD Reconstruction Code. GitHub, 2024. Dispońıvel em: https://github.com/lucas-simon-araujo/DMD-Reconstruction. ASKHAM, T.; KUTZ, J. N. Variable projection methods for an optimized dynamic mode decomposition. SIAM Journal on Applied Dynamical Systems, Philadelphia, v. 17, n. 1, p. 380–416, 2018. BARROS, G. F.; CORTES, A. M. A.; COUTINHO, A. L. G. A. Dynamic mode decomposition for density-driven gravity current simulations. In: Proceedings of the XLI Ibero-Latin-American Congress on Computational Methods in Engineering. Foz do Iguaçu, Brazil: [s.n.], 2020. BARROS, G. F. et al. Dynamic mode decomposition in adaptive mesh refinement and coarsening simulations. Engineering with Computers, Berlin, v. 38, n. 5, p. 4241–4268, 2022. BRUNTON, S. L.; KUTZ, J. N. Data-Driven Science and Engineering : Machine Learning, Dynamical Systems, and Control. [S.l.]: Cambridge University Press, 2019. BUDIŠIĆ, M.; MOHR, R.; MEZIĆ, I. Applied Koopmanism. Chaos: An Interdisciplinary Journal of Nonlinear Science, Huntington, v. 22, n. 4, p. 047510, 2012. Cunha Jr., A. Modeling and Uncertainty Quantification in the Nonlinear Stochastic Dynamics of Horizontal Drillstrings. Tese (D.Sc. Thesis) — PUC-Rio, Rio de Janeiro, Brazil, 2015. Cunha Jr., A.; SOIZE, C.; SAMPAIO, R. Computational modeling of the nonlinear stochastic dynamics of horizontal drillstrings. Computational Mechanics, Heidelberg, v. 56, n. 5, p. 849–878, 2015. EMERICK, A. A. Deterministic ensemble smoother with multiple data assimilation as an alternative for history-matching seismic data. Computational Geosciences, Cham, v. 22, n. 5, p. 1175–1186, 2018. FACCHINETTI, M.; LANGRE, E. D.; BIOLLEY, F. Coupling of structure and wake oscillators in vortex-induced vibrations. Journal of Fluids and Structures, Paris, v. 19, n. 2, p. 123–140, 2004. FREITAS, R. S. M. et al. An encoder-decoder deep surrogate for reverse time migration in seismic imaging under uncertainty. Computational Geosciences, Cham, v. 25, n. 3, p. 1229–1250, 2021. GOLUB, G. H.; LOAN, C. F. V. Matrix Computations. 4th. ed. [S.l.]: Johns Hopkins University Press, 2013. https://github.com/lucas-simon-araujo/DMD-Reconstruction GU, M. et al. Probabilistic forecast of nonlinear dynamical systems with uncertainty quantification. Physica D: Nonlinear Phenomena, Amsterdam, v. 457, p. 133938, 2024. KAISER, E.; KUTZ, J. N.; BRUNTON, S. L. Data-driven discovery of Koopman eigenfunctions for control. Machine Learning: Science and Technology, Bristol, v. 2, n. 3, p. 035023, 2021. KOOPMAN, B. O. Hamiltonian systems and transformation in Hilbert space. Proceedings of the National Academy of Sciences, Washington, D.C., v. 17, n. 5, p. 315–318, 1931. KURUSHINA, V.; PAVLOVSKAIA, E. Fluid nonlinearities effect on wake oscillator model performance. MATEC Web of Conferences, Les Ulis, v. 148, p. 04002, 2018. KUTZ, J. N. et al. Dynamic Mode Decomposition: Data-Driven Modeling of Complex Systems. [S.l.]: Society for Industrial and Applied Mathematics, 2016. KUTZ, J. N.; PROCTOR, J. L.; BRUNTON, S. L. Applied koopman theory for partial differential equations and data-driven modeling of spatio-temporal systems. Complexity, [S. l.], v. 2018, p. e6010634, 2018. LI, C. Y. et al. Koopman analysis by the dynamic mode decomposition in wind engineering. Journal of Wind Engineering and Industrial Aerodynamics, North York, v. 232, p. 105295, 2023. LIENHARD V, J. H.; LIENHARD IV, J. H. A Heat Transfer Textbook. 6th. ed. Cambridge, MA: Phlogiston Press, 2024. LOBO, D. et al. On the stochastic bit–rock interaction disturbances and its effects on the performance of two commercial control strategies used in drill strings. Mechanical Systems and Signal Processing, Eindhoven, v. 164, p. 108229, 2022. LOPES, G. J. V. Contributions to the investigation of the nonlinear dynamics of immersed slender structures: reduced-order model analysis and their advantages. Tese (D.Sc. Thesis) — Universidade de São Paulo, 2022. LOPES, V. G.; PETERSON, J. V. L. L.; Cunha Jr., A. Nonlinear characterization of a bistable energy harvester dynamical system. In: BELHAQ, M. (Ed.). Topics in Nonlinear Mechanics and Physics. [S.l.]: Springer Singapore, 2019. p. 71–88. MEZIĆ, I. Spectral Properties of Dynamical Systems, Model Reduction and Decompositions. Nonlinear Dynamics, London, v. 41, n. 1, p. 309–325, 2005. MEZIĆ, I. Analysis of fluid flows via spectral properties of the Koopman operator. Annual Review of Fluid Mechanics, San Mateo, v. 45, n. 1, p. 357–378, 2013. MEZIĆ, I.; BANASZUK, A. Comparison of systems with complex behavior. Physica D: Nonlinear Phenomena, Amsterdam, v. 197, n. 1–2, p. 101–133, 2004. NORENBERG, J. P. et al. Nonlinear dynamics of asymmetric bistable energy harvesters. International Journal of Mechanical Sciences, Oxford, v. 257, p. 108542, 2023. PING, H. et al. Dynamic mode decomposition based analysis of flow past a transversely oscillating cylinder. Physics of Fluids, Huntington, v. 33, n. 3, p. 033604, 2021. PROCTOR, J. L.; BRUNTON, S. L.; KUTZ, J. N. Dynamic mode decomposition with control. SIAM Journal on Applied Dynamical Systems, Philadelphia, v. 15, n. 1, p. 142–161, 2016. REIS, A. S. et al. Unravelling COVID-19 waves in Rio de Janeiro city: Qualitative insights from nonlinear dynamic analysis. Infectious Disease Modelling, Toronto, v. 9, n. 2, p. 314–328, 2024. RITTO, T. G.; AGUIAR, R. R.; HBAIEB, S. Validation of a drill string dynamical model and torsional stability. Meccanica, London, v. 52, n. 11–12, p. 2959–2967, 2017. RITTO, T. G. et al. Fuzzy logic control of a drill-string. In: Proceedings of the XXX Iberian-Latin American Congress on Computational Methods in Engineering. [S.l.: s.n.], 2009. ROWLEY, C. W. et al. Spectral analysis of nonlinear flows. Journal of Fluid Mechanics, Cambridge, v. 641, p. 115–127, 2009. SAMPAIO, R.; WOLTER, C. Bases de karhunen-loève: aplicações à mecânica dos sólidos. In: . São Carlos, SP, Brazil: [s.n.], 2001. SASHIDHAR, D.; KUTZ, J. N. Bagging, optimized dynamic mode decomposition for robust, stable forecasting with spatial and temporal uncertainty quantification. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, Londres, v. 380, n. 2229, 2022. SAVI, M. A. Dinâmica Não-linear e Caos. Brazil: E-Paper, 2017. SCHMID, P. J. Dynamic mode decomposition of numerical and experimental data. Cambridge, v. 656, p. 5–28, 2010. SCHMID, P. J. Dynamic mode decomposition and its variants. Annual Review of Fluid Mechanics, San Mateo, v. 54, n. 1, p. 225–254, 2022. SCHMID, P. J. et al. Applications of the dynamic mode decomposition. Theoretical and Computational Fluid Dynamics, London, v. 25, n. 1-4, p. 249–259, 2011. SILVA, C. W. Modeling of Dynamic Systems with Engineering Applications. 2. ed. [S.l.]: CRC Press, 2022. SPALL, J. C. Introduction to Stochastic Search and Optimization: Estimation, Simulation, and Control. [S.l.]: Wiley, 2003. STROGATZ, S. Nonlinear Dynamics and Chaos with Applications to Physics, Biology, Chemistry, and Engineering. 2nd. ed. [S.l.]: Westview Press, 2014. VIGUERIE, A. et al. Data-driven simulation of Fisher–Kolmogorov tumor growth models using dynamic mode decomposition. Journal of Biomechanical Engineering, New York, v. 144, n. 12, p. 121001, 2022. WANG, D. et al. Bifurcation analysis of vortex-induced vibration of low-dimensional models of marine risers. Nonlinear Dynamics, Bristol, v. 106, n. 1, p. 147–167, 2021. WILLIAMS, M. O.; KEVREKIDIS, I. G.; ROWLEY, C. W. A data–driven approximation of the Koopman operator: Extending dynamic mode decomposition. Journal of Nonlinear Science, New York, v. 25, n. 6, p. 1307–1346, 2015. Title page Approval Acknowledgements Epigraph Abstract RESUMO INTRODUCTION MOTIVATION OBJECTIVE MAIN CONTRIBUTIONS OUTLINE KOOPMAN FORMALISM FOR NONLINEAR DYNAMICAL SYSTEMS KOOPMAN OPERATOR STATE-SPACE EXPANSION Polynomial Nonlinearity Simple Pendulum DINAMIC MODE DECOMPOSITION THEORETICAL FOUNDATIONS ALGORITHM DESCRIPTION RESULTS AND DISCUSSION DATA GENERATION Mathematical fields Heat diffusion field Experimental field SINGULAR VALUES MODES AND FREQUENCIES COMPARISON BETWEEN ORIGINAL AND RECONSTRUCTED DATA TRUNCATION INFLUENCE ON RECONSTRUCTION THROUGH SIMILARITY ANALYSIS FINAL REMARKS CONCLUSIONS SCIENTIFIC PRODUCTION FUTURE DIRECTIONS References