Graphical Abstract One-shot learning for the complex dynamical behaviors of weakly nonlinear forced oscillators
arXiv:2604.15181v1 [cs.LG] 16 Apr 2026
Teng Ma, Luca Rosafalco, Wei Cui, Lin Zhao, Attilio Frangi
Highlights One-shot learning for the complex dynamical behaviors of weakly nonlinear forced oscillators Teng Ma, Luca Rosafalco, Wei Cui, Lin Zhao, Attilio Frangi • A one-shot learning method identifies global nonlinear frequency-response curves of weakly nonlinear forced oscillators from a single excitation time history by inferring the governing equations. • The equation learning framework for weakly nonlinear systems is upgraded from autonomous single-frequency dynamics to non-autonomous multi-frequency dynamics. This advancement is achieved by incorporating the generalized harmonic balance theory.
One-shot learning for the complex dynamical behaviors of weakly nonlinear forced oscillators Teng Maa,b , Luca Rosafalcob,∗, Wei Cuia , Lin Zhaoa,c , Attilio Frangib a
State Key Lab of Disaster Reduction in Civil Engineering, Tongji University, Shanghai, 200092, Shanghai, P. R. China b Department of Civil and Environmental Engineering, Politecnico di Milano, Milan, 20133, Lombardia, Italy c Guangxi Laboratory of Whole Life Safety for Land-Sea Corridor Engineering, Guangxi University, Nanning, 530004, Guangxi, P. R. China
Abstract Extrapolative prediction of complex nonlinear dynamics remains a central challenge in engineering. This study proposes a one-shot learning method to identify global frequencyresponse curves from a single excitation time history by learning governing equations. We introduce MEv-SINDy (Multi-frequency Evolutionary Sparse Identification of Nonlinear Dynamics) to infer the governing equations of non-autonomous and multi-frequency systems. The methodology leverages the Generalized Harmonic Balance (GHB) method to decompose complex forced responses into a set of slow-varying evolution equations. We validated the capabilities of MEv-SINDy on two critical Micro-Electro-Mechanical Systems (MEMS). These applications include a nonlinear beam resonator and a MEMS micromirror. Our results show that the model trained on a single point accurately predicts softening/hardening effects and jump phenomena across a wide range of excitation levels. This approach significantly reduces the data acquisition burden for the characterization and design of nonlinear microsystems. Keywords: System identification, Nonlinear dynamics, Weak nonlinearity, Generalized harmonic balance, One-shot learning
∗
email: [email protected]
1. Introduction The rapid advancement of computational resources has enabled the high-fidelity simulation of complex physical phenomena, even within intricate multi-physics and multi-scale frameworks. However, characterizing the complex dynamical behaviors of physical systems remains a formidable challenge. In practical engineering applications, such as MEMS resonators and sensors, understanding the nonlinear response—including frequency shifts, hardening/softening effects, and jump phenomena—requires extensive frequency and amplitude sweeps. When relying on full-order models (FOMs), such as the finite element method (FEM), each individual simulation in the time domain or parametric space can be computationally very demanding. Consequently, exploring a broad range of initial conditions and parameter combinations becomes a computationally prohibitive task or even unfeasible for real-time monitoring and design optimization. Unlike simple output estimation, capturing the evolution of a high-dimensional nonlinear field is intrinsically difficult due to its time-dependent nature and the sensitivity of nonlinear regimes. These challenges drive the urgent need for efficient yet accurate reduced-order models (ROMs) that can bypass the heavy burden of FOMs while preserving the essential physics of the dynamical system. Efficient ROM construction begins with dimensionality reduction (Van Der Maaten et al., 2009). This process projects high-dimensional FOM states onto a low-dimensional manifold from data previously collected from full-order simulations or experiments (Huang et al., 2017). Historically, the reduced basis method has been the standard for building these reduced spaces (Maday and Rønquist, 2002; Quarteroni et al., 2015; Benner et al., 2017). It often utilizes Proper Orthogonal Decomposition (POD) (Amsallem et al., 2012; Pagani et al., 2018; Gobat et al., 2022) to approximate solutions. However, POD-based techniques are typically intrusive. They require direct access to the internal operators of the FOM. This requirement makes it difficult to use them with proprietary or commercial simulation software. Machine learning has emerged as a powerful non-intrusive alternative for ROM construction. These methods reduce dimensionality directly from data streams. They do not require access to the FOM operators. Dynamic Mode Decomposition (DMD) (Schmid et al., 2011; Le Clainche and
2
Vega, 2017) is a prominent linear framework in this category. It extracts dominant frequencies and spatial modes from snapshot data. However, DMD is limited by its linear assumption. Autoencoder (AE) networks (Zhai et al., 2018; Romor et al., 2023; Gonzalez and Balajewicz, 2018) provide a nonlinear alternative. They are particularly effective at uncovering latent features in complex systems. These networks offer better nonlinear compression than linear methods like POD or DMD. Advanced frameworks like deep learning-based ROMs (DLROMs) (Fresca et al., 2022; Franco et al., 2023) and their enhanced version through POD (POD-DL-ROMs) (Fresca and Manzoni, 2022) have further improved this process. They perform dimensionality reduction and learn the parameter-to-solution map at the same time. Data-driven ROMs face significant challenges when predicting scenarios outside the training set. These methods are essentially interpolation tools. They provide high accuracy only within the observed parameter ranges. When these models encounter unseen parameter values, their performance often degrades. This lack of generalization limits their use in exploring unknown physical regimes. Furthermore, constructing reliable non-intrusive ROMs requires a large volume of training data. Generating these datasets through FOM simulations is computationally expensive. This high cost reduces the overall efficiency of the modeling process. There is a clear need for a framework that offers better extrapolation. Such a framework should also require less training data to maintain physical consistency. Equation discovery offers a powerful alternative to black-box models. This approach infers governing equations directly from data. There are two main methodological paradigms in this field. The first paradigm is symbolic discovery (Schmidt and Lipson, 2009; Ruan et al., 2025). It seeks to recover closed-form representations of physical laws. The second paradigm is sparse regression (Brunton et al., 2016; Gao and Yan, 2022). This method identifies parsimonious models from a predefined library of candidate functions. These techniques were first developed for ordinary differential equations. Researchers later extended them to partial differential equations (Rudy et al., 2017; Rao et al., 2023). Recent advances in machine learning have improved these methods. They are now robust against sparse or noisy data (Chen et al., 2021; Hirsh et al., 2022; Niven et al., 2024; Fung et al., 2025). This makes them viable for real-world scientific discovery. Equation discovery has catalyzed the field of scientific 3
machine learning. It helps uncover interpretable laws in cyber-physical systems (Yuan et al., 2019), fluid dynamics (Ma et al., 2023; Loiseau et al., 2018), biological and chemical networks (Mangan et al., 2016; Hoffmann et al., 2019) and complex networks (Gao et al., 2024; Yu et al., 2025). The main appeal of this approach is the generation of an explicit ROM. The resulting model takes the form of a system of ordinary differential equations. Sparsity constraints ensure that the latent dynamics remain interpretable. Users can then analyze the identified system using standard numerical tools for time integration. Most physical and engineering systems exhibit weakly nonlinear oscillatory behaviors with weak linear dissipation. These include applications in structural engineering and microelectro-mechanical systems (MEMS). Weak nonlinearities often arise from geometric effects. They can lead to pronounced impacts on dynamical performance. However, existing methods often overlook these challenges. They focus on extracting only the most dominant governing equations. This process often discards terms that seem insignificant but are physically important. Recent research has introduced evolutionary-based learning to address this issue. A prominent example is EvLOWN (Ma et al., 2026), which stands for Encoding Cumulation to Learn Perturbative Nonlinear Oscillatory Dynamics. This method reformulates optimization objectives using the method of averaging. It bridges the gap between weak nonlinearities and slow-varying evolutionary variables. Only the terms most informative about amplitude and phase evolutions are selected. However, EvLOWN has specific limitations. It can only identify autonomous single-frequency responses but cannot handle multi-frequency oscillations or non-autonomous dynamics. In this work, we propose a novel data-driven approach. We call it Multi-frequency Evolutionary Sparse Identification of Nonlinear Dynamical systems (MEvSINDy). This framework is designed to learn the governing equations of multi-frequency forced weakly nonlinear oscillators. It extends the advantages of evolutionary learning to more complex forced and multi-frequency regimes. The capability to identify governing equations from multi-frequency data opens the door to a more ambitious paradigm. This paradigm is known as one-shot learning (Fei-Fei et al., 2006). It involves training models to recognize global patterns based on only a single data point. The concept originated in computer vision but remains rare in scientific machine 4
learning (SciML) (Ivanov et al., 2020; Darcy et al., 2023; Jiao et al., 2025). Most data-driven ROMs still require massive datasets to characterize physical systems (Conti et al., 2023; Gobat et al., 2022; Franco et al., 2023). However, generating such snapshots for complex nonlinear oscillators is computationally expensive. We leverage MEv-SINDy to achieve oneshot learning for forced nonlinear dynamics. In our framework, the identified governing equations represent the “general knowledge” of the system. We extract this knowledge from a single excitation configuration. This analytical representation allows the model to predict dynamical behaviors under entirely different parameters. Consequently, MEv-SINDy can predict the complete frequency-response curve from one observation. This strategy eliminates the need for exhaustive training data. It also provides a robust tool for exploring unknown physical regimes with minimal cost. To our knowledge, this is one of the first applications of one-shot learning for multi-frequency forced oscillators. Schematic diagram of this work is shown in Figure 1. The paper is structured as follows. Section 2 details the methodology of the proposed MEv-SINDy framework. This section introduces the Generalized Harmonic Balance (GHB) method as an upgrade to the averaging method. The evolutionary variables are expanded from simple amplitude and phase to general harmonic coefficients. Based on GHB, we reformulate the sparse regression optimization targets. We also describe a joint sparse regression method designed for multiple equations. Section 3 presents numerical validations using a 1-DOF oscillator with quadratic and cubic nonlinearities. These tests validate the effectiveness of each step in the MEv-SINDy process. Section 4 considers two high-dimensional applications. These include a Beam MEMS resonator and a MEMS micromirror. We demonstrate that our approach achieves one-shot learning for the frequency-response curve. To further analyze the robustness of the method, we examine the influence of training point selection in Section 4. We describe a multi-point training strategy to improve predictive performance. Finally, Section 5 provides concluding remarks and summarizes the findings.
5
Figure 1: One-Shot Learning framework of weakly nonlinear forced oscillator: The starting point of our framework is the dynamical response at a single excitation configuration, which is also the training data of MEv-SINDy. During the training stage, the multi-frequency dynamics are separated into distinct harmonic components. We use the generalized harmonic balance method to reformulate the sparse regression problem into an evolution space. A two-stage sparse regression process then discovers the final coefficient vector. The primary output of MEv-SINDy is the explicit governing equation of the weakly nonlinear forced oscillator. Finally, we apply a continuation method to the inferred equations to compute the global frequency-response curves.
2. Methodology 2.1. Problem setup The starting point is to consider the general form of weakly nonlinear oscillators with external forcing: ẍi (t) + ωi2 xi (t) + ϵfi (x(t), ẋ(t)) = Fi (t),
(1)
for i = 1, . . . , k,where: x(t) = (x1 (t), · · · , xk (t)) ∈ Rk is the displacement vector at time t; ωi is the frequency of oscillator i; fi (x(t), ẋ(t)) is a smooth function of the velocity ẋ and the displacement x representing the weak nonlinearity and weak dissipation, which are from 6
geometric, internal, material, contact and coupling nonlinearities; Fi (t) is the external actuation that depends on time t; ϵ is a small parameter quantifying the strength of nonlinearity compared to dominating linear spring effects ωi2 xi . Eq. (1) is well suited for modeling various classes of systems, whose dimensionality k represents the number of degrees of freedom arising, for example, from spatial discretization techniques (e.g. finite elements or finite volumes) applied to a system of partial differential equations (PDEs) governing the underlying physical problem. Due to the weak nonlinearity fi , the steady-state periodic response of the system governed by Eq. (1) under different harmonic actuation Fi exhibits distinct characteristics in terms of amplitude and phase, collectively referred to as the frequency-response curves (FRCs), which characterize the dynamic properties of the system. Typically, the actuation can be parameterized by two features, frequency and intensity, both of which strongly affect the steady-state periodic response. The goal of this study is to utilize data snapshots from a single time history and a given actuation to accurately predict responses under any other actuation conditions, thus reconstructing all the possible FRCs of the system. The proposed methodology employs only few set of time history of displacement x and its time-derivative ẋ. In general, ẋ can be either computed directly or approximated numerically from x. 2.2. Sparse Identification of Nonlinear Dynamics: SINDy To identify the system in Eq. (1), it is possible to rely on a linear combination of a set of predetermined functions collected in a library, as done in the SINDy method, (Brunton et al., 2016). To apply SINDy, snapshots of x at different time instants are collected in the following matrix:
x (t ) x2 (t1 ) 1 1 x1 (t2 ) x2 (t2 ) X= .. .. . . x1 (tT ) x2 (tT )
··· ··· .. . ···
xn (t1 )
xn (t2 ) .. . . xn (tT )
(2)
where: xi (tj ) is the i-th entry of x at the j-th time instant; T is the number of time instants for each snapshot. Similarly, a matrix Ẋ is constructed by collecting ẋ. 7
A library Θ(x) = [θ1 (x), . . . , θp (x)] ∈ Rp of p candidate functions is selected. In Sec. 2.7, it will be discussed how to retain only the most relevant functions among this set of candidates. The matrix Θ(X) ∈ RT ×p is thus constructed by applying Θ to the rows of X, for example, as in the following: | | | | Θ(X) = 1 X XP2 XP3 · · · | | | |
|
|
sin(X) cos(X) · · · . | |
(3)
Any nonlinear function, such as polynomial and trigonometric, cna be included in the library. As mentioned, the model to be identified is a linear combination of the candidate functions, with combination coefficients stored in Ξ = [ξ1 , . . . , ξk ] with ξk ∈ Rp . Combination coefficients are determined by solving a regression problem with a sparsity promoting term, as in the following: arg min ∥ẍ − Θ(x, ẋ, t)Ξ∥22 + λ∥Ξ∥1 Ξ
(4)
where || · ||22 is the least squares term; || · ||1 is the L1 norm of the coefficient vector Ξ, which is the sum of absolute values of the coefficients; λ is the regularization parameter that controls the strength of the penalty. In Sec. 2.7, Eq. (4) will be modified for a better coupling with the proposed algorithm. 2.3. Weakly nonlinear oscillator inference: EvLOWN It is worth noting that most existing model identification frameworks such SINDy do not target the specific difficulties introduced by weak nonlinearities in practical systems. Indeed, these methods identify parsimonious governing equations by neglecting library terms weighted by very small terms. While this approach is meaningful in general, it may become a major drawback in the context of WNOs, where the very necessary components for accurately capturing the dynamics may be discarded as the dynamics is governed by the linear term ωi2 xi . 8
To address this gap, Ma et al. (2026) proposed a data-driven approach called EvLOWN (Evolutionary Learning Oscillator with Weak Nonlinearity) for discovering weakly nonlinear oscillator. EvLOWN reformulates the original system of ODEs into an evolutionary-variable representation via averaging theory, naturally separating terms by their order of magnitude. The goal of EvLOWN is to discover the autonomous oscillatory dynamical system: ẍi (t) + ωi2 xi (t) + ϵfi (x(t), ẋ(t)) = 0
(5)
by learning the evolution of amplitude and phase, rather than directly learning the state variables x. Leveraging averaging theory (Sanders et al., 2007), also known as the Krylov-BogoliubovMitropolsky method (Volosov, 1962), we approximate the response of the oscillator (5) when the nonlinear effect is weak (i.e., ϵ is small) as: xi (t) = Ai (t) sin(ω̂i t + ϕi (t))
(6)
where: ω̂i is the oscillating frequency; Ai and ϕi are the amplitude and phase, respectively. In WNOs, the amplitude Ai (t) and phase ϕi (t) evolve much more slowly over time compared to the oscillatory term, changing little over a single period 2π/ω̂i Nayfeh and Balachandran (2008). This separation of timescales allows us to average the system dynamics over one oscillation cycle, yielding explicit relationships between the weak nonlinearities and the time evolution of the amplitude Ai (t) and phase ϕi (t): Z t+π/ω̂i ϵi Ai (t + π/ω̂i ) − Ai (t − π/ω̂i ) ′ Ai (t) = fi (x(s), ẋ(s)) cos(ω̂i s + ϕi (s))ds, = 2π/ω̂i 2π t−π/ω̂i Z t+π/ω̂i ϕi (t + π/ω̂i ) − ϕi (t − π/ω̂i ) ϵi ′ ϕi (t) = =− fi (x(s), ẋ(s)) sin(ω̂i s + ϕi (s))ds, 2π/ω̂i 2Ai (t)π t−π/ω̂i (7) where (·)′ denotes the rate of change over one period. To identify the first-order ODEs governing the evolution of amplitude and phase, we integrate the basis terms in the original library Θ over a single period, which quantifies their contributions to the averaged dynamics. This transformation results in two new libraries: ΘA for amplitude evolution and Θϕ for phase evolution. The discovery task now becomes 9
identifying a sparse subset of basis terms from these libraries that best approximate A′i (t) and ϕ′i (t). Critically, this averaging process naturally separates terms by order of magnitude, allowing weak nonlinear contributions to be isolated from dominant dynamics. 2.4. Generalized Harmonic Balance method As the magnitude of external forcing increases in the forced oscillator Eq.
(1), the
contribution of nonlinearities in the system, such as quadratic and cubic terms, becomes significant. Consequently, the assumption of a single-frequency solution, see Eq. (8) becomes inadequate for complex forced dynamics. To address this issue, we employ the generalized harmonic balance method to replace the averaging method, thus extending the EvLOWN approach to account for multiple-frequency responses. The solution of the weakly nonlinear forcing oscillator can be approximated as follows (Luo and Huang, 2012): (0) x∗i (t) = ai (t) +
N X (n) (n) {bi (t) cos(nω̂i t) + ci (t) sin(nω̂i t)}
(8)
n=1
where the superscript (·)(n) indicates the order of the harmonic frequency, corresponding to (n)
(0)
(n)
the n-multiple of the fundamental frequency ω̂i . The terms ai (t), bi (t), and ci (t) are the slowly varying parameters associated with each harmonic component nω̂i . The first- and second-order time derivatives of x∗ (t) are: (0) ẋ∗i (t) = ȧi (t) +
N X
(n)
(n)
(n)
{[ḃi (t) + nω̂i ci (t)] cos(nω̂i t) + [ċi
(n)
− nω̂i bi (t)] sin(nω̂i t)}
(9)
n=1
(0) ẍ∗i (t) = äi (t) +
N X
(n)
(n)
(n)
{[b̈i (t) + 2nω̂i ċi (t) − (nω̂i )2 bi (t)] cos(nω̂i t)
n=1 (n)
(n)
(10)
(n)
+[c̈i (t) − 2nω̂i ḃi (t) − (nω̂i )2 ci (t)] sin(nω̂i t)} (0)
(n)
(n)
Supposing that ai (t), bi (t), and ci (t) vary slowly with time, we substitute Eqs. (8)(10) into Eq. (1), and then we average for each harmonic terms of cos(nωi t) and sin(nωi t) obtaining for n = 1, 2, · · · , N :
10
ω̂i (0) äi (t) + ωi2 a0 (t) = −
Z t+π/ω̂i
ω̂i π
Z t+π/ω̂i
2π
(n)
(n)
(n)
b̈i (t) + 2ω̂i nċi (t) − ω̂i2 (n2 − 1)bi (t) = − (n)
(n)
(n)
c̈i (t) − 2ω̂i nḃi (t) − ω̂i2 (n2 − 1)ci (t) = −
ω̂i π
[fi∗ (x, ẋ, s)]ds
t−π/ω̂i
t−π/ω̂i Z t+π/ω̂i
[fi∗ (x, ẋ, s)] cos(nω̂i s)ds
(11)
[fi∗ (x, ẋ, s)] sin(nω̂i s)ds,
t−π/ω̂i
where: (12)
fi∗ (x, ẋ, s) = ϵfi (x∗ (s), ẋ∗ (s)) − Fi (x∗ (s), ẋ∗ (s), s)
It is worth stressing that the only assumption is related to the slow temporal variation (0)
(n)
(n)
of ai (t), bi (t), and ci (t), while no limitations on the type of response (steady state or transient) is instead required. In the next section, we will show how to exploit the evolutionary formulation in Eq. (11) to identify the system described, in its original formulation, by Eq. (1). 2.5. Multiple slow-varying evolutions evaluations (0)
(n)
We now describe how to extract the slowly varying evolutionary variables ai (t), bi (t), (n)
and ci (t) (n = 1, 2, . . .) from the observed signal x(t). These variables are subsequently used to perform sparse regression on the evolutionary formulation reported in Eq. (11) in order to identify the unknown components of the governing equations, namely ωi , fi∗ . Given an input signal x(t) = [x1 (t), . . . , xd (t)]T , the oscillation frequency in the i-th dimension can be directly computed from the Fourier transform F(xi (t)) : R → R, with: Z +∞ ω̂i = arg max F(xi (t)) = arg max ω̂i
ω̂i
xi (t)e−iω̂i t dt
(13)
−∞
It is worth noting that the oscillation circular frequency ω̂i differs from the natural circular frequency ωi . This deviation arises from the presence of weakly nonlinear terms and external forcing. To illustrate this, we consider a simple example of a linearly damped oscillator described by ẍ + 2β ẋ + ω 2 x = F cos(Ωt). Under the assumption of light damping (β ≪ 1), the solution of the linear damped oscillator is given by: p f x(t) = x0 e−βt cos( ω 2 − β 2 t + ϕ) + p cos(Ωt − φ) (ω 2 − Ω2 )2 + 4β 2 ω 2 11
Therefore, the oscillation circular frequency ω̂ obtained from Eq. (13) lies within the range p ( ω 2 − β 2 , Ω), and the value of ω̂ depends on the selected portion of the data x(t). If the p transient response dominates, ω̂ will tend to ω 2 − β 2 ; otherwise, it will be close to Ω. (0)
(n)
(n)
To obtain the multiple slow-varying evolutionary variables ai (t), bi (t), and ci (t) (n = 1, 2, . . .) from the given time history xi (t), we proposed a novel identification method involving the Hilbert transform. Unlike what was proposed in (Ma et al., 2026), the Hilbert transform cannot be directly applied to extract the slowly varying amplitude and phase, because the dynamic response of a weakly nonlinear forced oscillator contains multiple frequency components. To address this, we define N frequency bands to address the limitations of standard Fourier analysis. In classical spectral analysis, isolated peaks represent constant coefficients. However, our evolutionary coefficients depend on time. This time-dependency smears the frequency peaks in the spectrum. In particular, we determine the value of N depends on the number of distinct frequency peaks observed in the frequency spectrum. When, as in Figure 2a, x(t) consists of the zero, first and second harmonic components, we set N = 3. Each frequency band to be centered at nω̂ and has a bandwidth of ω̂/4 (Figure 2b). By passing the signal through the corresponding bandpass filter, each harmonic component is isolated, as shown in Figure 2c. In practice, Finite Impulse Response (FIR) filters are designed using the window method. This procedure is implemented in readily available packages such as scipy.signal. (0)
(n)
(n)
After having obtained the slow-varying evolutionary variables ai (t), bi (t), and ci (t) through the Hilbert transform, we can elaborate Eq. (8) as: xi (t) =
N X
(n)
(14)
xi (t),
i=0
with: (n)
xi (t) =
a(0) (t)
n=0
i
(15)
b(n) (t) cos(nω̂t) + c(n) (t) sin(nω̂t) n = 1, 2, · · · i i
The zero-order harmonic component directly corresponds to a(0) (t). While for n > 0, the slow-varying evolutionary variables are calculated from amplitude and phase. The Hilbert (n)
(n)
(n)
transform H is used to compute the analytic signal x̂i (t) = xi (t) + iH(xi (t)). The 12
Figure 2:
Identification process of the slowly varying evolutionary variables a(0) (t), b(n) (t), and c(n) (t) by
combining a bandpass filter and the Hilbert transform. (a) Input signal x(t), representing the time-domain response of a weakly nonlinear forced oscillator; (b) x(t) consists of multiple narrowband harmonic components centered at nω̂, as shown in the frequency domain. Several frequency bands are defined to isolate each n-th harmonic component; (c) Time-domain representation and (d) corresponding frequency-domain representation of the filtered narrowband signals; (e) Hilbert transform applied to each n-th harmonic component to extract the instantaneous amplitude A(n) (t) and phase β (n) (t); (f) The slowly varying coefficients b(n) (t) and c(n) (t) are calculated from the extracted amplitude and phase, while the zero-order term directly corresponds to a(0) (t). (n)
(n)
evolutionary variables Ai (t) and βi (t) of time t can be considered as the averaging value of instantaneous evolutionary variables in one period:
13
R t+π/ω̂i (n) Ai (t) =
(n)
βi (t) =
t−π/ω̂i
(n)
|x̂i (s)|ds
2π/ω̂i R t+π/ω̂i (n) Arg(x̂i (s))ds t−π/ω̂i
(16)
2π/ω̂i (n)
(n)
As Figure 2f shows, the evolutionary variable bi (t) and ci (t) of higher harmonic components can be calculated as Eq. (17): (n)
(n)
(n)
(n)
(n)
(n)
bi (t) = Ai (t) sin(βi (t))
(17)
ci (t) = Ai (t) cos(βi (t)) 2.6. Reformulation of the Regression Problem in the Evolutionary Domain In order to accurately identify the governing dynamics of weakly nonlinear forced oscillators, it is essential to reformulate the regression problem in a form that enhances the visibility of nonlinear effects. Sharing the same starting point of EvLOWN, we transform the problem into an evolutionary domain. In the proposed MEv-SINDy approach, the system behavior is represented by slowly varying evolutionary variables based on generalized harmonic balance method. This reformulation allows the nonlinear interactions to be more effectively captured and facilitates the application of sparse regression for discovering the underlying equations. We thus exploit SINDy to approximate the evolutionary formulation reported in Eq. (11), instead of the original formulation (Eq. (1)). This is equivalent to perform regularized regression reported in Eq. (4), but here involving the evolutionary instead of the original variables to identify the weakly nonlinear coefficients. (0)
(n)
(n)
According to Sec. 2.5, the slow-varying evolutionary variables ai (t),bi (t) and ci (t) (n = 1, 2, . . .), together with the oscillation frequency ω̂i , can be computed from the given time history xi (t). Eq. (11) can then be reorganized such that known quantities are collected in the left hand side, while in the terms to be inferred are assembled in the right hand side.
14
ω̂i (0) äi (t) + ω̂i2 a0 (t) = −
2π
(n)
(n)
(n)
b̈i (t) + 2ω̂i nċi (t) − ω̂i2 (n2 − 1)bi (t) = − (n)
(n)
(n)
c̈i (t) − 2ω̂i nḃi (t) − ω̂i2 (n2 − 1)ci (t) = −
ω̂i π ω̂i π
Z t+π/ω̂i t−π/ω̂i Z t+π/ω̂i
fˆi∗ (x, ẋ, s)ds fˆi∗ (x, ẋ, s) cos(nω̂i s)ds
t−π/ω̂i
Z t+π/ω̂i
fˆi∗ (x, ẋ, s) sin(nω̂i s)ds
t−π/ω̂i
fˆi∗ (x, ẋ, s) = (ωi2 − ω̂i2 )x∗i (s) + ϵfi (x∗ (s), ẋ∗ (s)) − Fi (x∗ (s), ẋ∗ (s), s) n = 1, 2, · · · , N (18) where fˆi∗ (x, ẋ, t) = Θ∗ (x, ẋ, t)Ξ∗ are unknown functions expressed as a sparse combination of a set of linear and nonlinear candidate basis function. Thanks to this rearrangement, the system is expressed in a standard regression form suitable for sparse identification. Unlike conventional sparse regression, our objective is to find a sparse coefficient vector Ξ∗ that simultaneously satisfies all equations in Eq. (18), rather than a single one. This gives rise to the concept of joint sparse regression, where the goal is to estimate a shared sparse representation across multiple regression targets. Mathematically, given M = 2N + 1 equations reported in the following: yi (t) = Θi (t)Ξ∗ , (0) (0) yi (t) äi (t) + ω̂i2 a0 (t) (1,cos) (1) (1) yi (t) b̈i (t) + 2ω̂i ċi (t) (1,sin) (1) (1) yi (t) c̈i (t) − 2ω̂i ḃi (t) , yi (t) = (2,cos) = (2) (2) (2) yi (t) b̈i (t) + 4ω̂i ċi (t) − 3ω̂i2 bi (t) (2,sin) (2) (2) (2) 2 yi (t) c̈i (t) − 4ω̂i ḃi (t) − 3ω̂i ci (t) .. .. . .
15
(19)
(20)
(0) Θi (t)
t+π/ω̂i ω̂i − 2π Θ∗ (s)ds t−π/ω̂i ω̂i R t+π/ω̂i ∗ − π t−π/ω̂i Θ (s) cos(ω̂i s)ds
R
(1,cos) Θi (t) (1,sin) ω̂i R t+π/ω̂i ∗ Θi (t) − π t−π/ω̂i Θ (s) sin(ω̂i s)ds , Θi (t) = = ω̂i R t+π/ω̂i ∗ (2,cos) Θi (t) − π t−π/ω̂i Θ (s) cos(2ω̂i s)ds (2,sin) ω̂i R t+π/ω̂i ∗ Θi (t) − π t−π/ω̂i Θ (s) sin(2ω̂i s)ds .. .. . .
(21)
the objective is to determine a common coefficient vector Ξ∗ that minimizes the overall residual while maintaining sparsity. Only when this condition is met, the reconstructed system can accurately recover the original formulation expressed in Eq. (1). In Eqs. (20) and (35), the superscript (·)(n,t) identifies the harmonic term in Eq. (18). Specifically, n ∈ R+ represents the order of the harmonic frequency, corresponding to the n-fold multiple of the fundamental frequency ω̂i , and {cos, sin} indicates the cosine and sine components. 2.7. Joint sparse regression across multiple equations To infer the sparse coefficient vector Ξ∗ that best satisfies all evolutionary equations, we propose a joint sparse regression method across multiple equations all evolutionary equations Eq. (19), rather than fitting each equation independently. The problem is formulated as minimizing the total residual across the 2N +1 evolutionary equations derived from the weakly nonlinear oscillator, each corresponding to a harmonic component over N + 1 frequencies, with an L1 regularization term to ensure sparsity. A key algorithmic choice is setting which harmonics are considered in the evolutionary representation among yf ull (t) = [y (0) (t), y (1,cos) (t), y (1,sin) (t), y (2,cos) (t), y (2,sin) (t), · · · ]. Once set, goal of the optimization is to identify a sparse coefficient vector Ξ∗ that simultaneously satisfies all evolutionary equations derived from weakly nonlinear forcing oscillator as shown in the following:
! Ξ∗ = arg min Ξ∗
X
∥y (m) − Θ(m) Ξ∗ ∥22 + λ∥Ξ∗ ∥1
(22)
m∈IS
where: IS collects all the index of the effective harmonic components (e.g, 0, (1, cos), (1, sin), · · · ); y (m) and Θ(m) denote the response and library matrices for the m-th equation; λ > 0 con16
trols the sparsity level of the solution. We introduce a two-phase sparse regression method to solve Eq. (27). The first phase utilizes a convex optimization algorithm to select an initial subset of the library. In this work, we employ the CVXOPT solver (Vandenberghe, 2010) to handle the L1 regularization term. This step provides a preliminary sparse structure for the coefficient vector. The second phase involves a sparse fine-tuning process that removes terms with negligible contributions, thus ensuring a concise and generalized model. We apply an approach inspired by orthogonal matching pursuit to narrow down the model space. We select only the most relevant basis functions from the initial subset. The contribution cij of each basis function j for the i-th dimension is calculated using Eq. (23): 2 Z T X Θ̂mij (t)Ξ∗ ij cij = dt (yim (t))2 0 m∈IS
(23)
These values are then normalized to a range between 0 and 1. Finally, we fine-tune the model by applying a cut-off threshold. Any basis function with a contribution value lower than this threshold is removed from the library. This two-phase strategy ensures the identification of a parsimonious dynamical system. It maintains high predictive accuracy while preventing overfitting to numerical noise. 2.8. Parameter continuation method In nonlinear dynamical systems, periodic solutions often depend on one or more system parameters, such as the excitation frequency and intensity and can be computed using several classical numerical techniques, such as the harmonic balance method (Cheung et al., 1990), the shooting method (Osborne, 1969), and collocation-based approaches (Carrington Jr, 2021). These methods transform the governing differential equations into nonlinear algebraic systems by enforcing periodicity conditions, and the steady-state responses are then obtained through iterative solvers such as the Newton–Raphson method (Ypma, 1995). However, these traditional approaches are often computationally expensive because they require repeated integrations or nonlinear solves for each excitation parameter. In addition, they usually depend on initial guesses that are close to stable solutions, which makes them incapable of accurately tracing unstable branches or capturing turning points in the frequency–response 17
curves. As a result, their applicability is limited when a complete description of the system dynamics, including both stable and unstable periodic responses, is required. The continuation method provides a systematic procedure to trace the evolution of these solutions as parameters vary, allowing for the identification of critical phenomena such as bifurcations or stability transitions. Consider a general system of nonlinear algebraic equations derived from the steady or periodic conditions of a dynamical system:
G(u, ζ) = 0
(24)
where u denotes the unknown state vector (e.g., displacement and velocity), and ζ represents the control parameter to be varied (e.g., frequency and amplitude of external forcing). A straightforward approach would be to increment ζ in small steps and solve for u at each step using the previous solution as the initial guess ζk+1 = ζk + ∆ζ. However, this simple “parameter sweep” method fails e.g. near turning points or folds in the solution curve, where the slope ∂u/∂ζ becomes infinite and the solution path cannot be followed uniquely. To overcome this limitation, arc-length continuation (also known as pseudo–arc-length continuation) is commonly employed (Krauskopf et al., 2007). In this method, the solution path is parameterized by an artificial variables, representing the arc length along the curve in the (u, ζ) space. The continuation step is then constrained by: (∆u)T (∆u) + (∆ζ)2 = (∆s)2
(25)
where ∆s is the prescribed step size along the solution trajectory. By solving the extended system composed of Eq. (24) together with the arc-length constraint, the continuation algorithm can robustly track both stable and unstable branches of the solution family, even across fold and bifurcation points. This technique provides a powerful and general framework for the numerical exploration of nonlinear response characteristics. These methods are implemented in many ready-to-use packages like Auto07p (Doedel and Oldeman, 1998), that implements collocation methods in FORTRAN to perform numerical continuation and bifurcation analysis; Manlab, a Matlab tool that uses HB methods 18
and Asymptotic Numerical Method (Guillot et al., 2019); Nlvib, that also exploits HB methods (Krack and Gross, 2019), and many others among which we mention COCO (Dankowicz and Schilder, 2013). The numerical examples addressed in this work will be solved using the Matlab MATCONT package (Dhooge et al., 2006), that exploits collocation methods to perform the continuation of periodic orbits. 2.9. Mean chamfer distance of frequency response curves (MCDRC) Frequency response curves (FRCs) are the primary goals for one-shot learning and prediction, describing complex dynamic behaviors of weakly nonlinear oscillators. FRCs characterize a steady-state output quantity of interest, such as maximum deflection, across various load multipliers β for all excitation frequency values Ω within a specified range. To quantitatively assess the predictive ability, an error metric named Mean Chamfer Distance of frequency response curves (MCDRC) between two FRCs is defined herein. It is worth mentioning that FRCs are generally not single-valued functions of the excitation frequency. For a given frequency, multiple periodic solutions may exist due to nonlinear effects such as jump phenomena, hysteresis, and multi-stability. Furthermore, continuationbased computations generally produce differently spaced samples along solution branches, and distinct response branches may be specified using varying frequency grids. These properties violate the assumptions required by most pointwise or function-based error measures. To address this limitation, we represent FRCs as point sets in the frequency-response space. This allows to naturally support multi-valued responses, discontinuities, and nonuniform sampling, hence offering a consistent and stable foundation for quantitative comparison of nonlinear frequency response curves. We then exploit the Chamfer distance dch (C → Cref ) (Butt and Maragos, 1998) to establish a novel metric termed Mean Chamfer Distance of Frequency Response Curves (MCDRC). The chamfer distance dch (C → Cref ) is defined as the average distance from each point on the predicted curve C = {(xi , yi )}N i=1 to its nearest neighbor on the reference curve Cref = {(xj , yj )}M j=1 . It can be computed as: dch (C → Cref ) =
1 X min ∥p − q∥ N p∈C q∈Cref 19
(26)
By selecting the oscillation amplitude (A) and phase (P ) as primary steady-state descriptors, P N the FRC is discretized into two point sets: C A = {(Ωi , Ai )}N i=1 and C = {(Ωi , Pi )}i=1 . Here, A
and P denote the amplitude and the phase lag relative to the external excitation, respectively. The MCDRC is defined as follows: (27)
P A ) ) + dch (C P → Cref MCDRF = dch (C A → Cref
Prior to calculating the distance between points, a max-min scaling normalization preprocessing step is introduced to ensure that the scaling disparity between the axes does not spoil the representativeness of MCDRC. Figure 3 presents an illustrative example of MCDRC comparing two predicted FRCs against a reference FRC. The MCDRC for FRC1 is 0.24, indicating poor predictive accuracy, whereas the value for FRC2 is 0.01, representing excellent agreement with the reference. This comparison provides an intuitive demonstration of how MCDRC quantifies the similarity between FRCs. ) 5 &