Skip to main content
MethodsX logoLink to MethodsX
. 2024 Feb 21;12:102625. doi: 10.1016/j.mex.2024.102625

WyNDA: A method to discover mathematical models of dynamical systems from data

Agus Hasan 1
PMCID: PMC10904192  PMID: 38425498

Graphical abstract

graphic file with name ga1.jpg

Keywords: Dynamical systems, Data-driven method, Governing equations

Method name: Wide-Array of Nonlinear Dynamics Approximation

Abstract

This paper introduces a novel method called Wide-Array of Nonlinear Dynamics Approximation (WyNDA) for extracting mathematical models of dynamical systems from data. A key advantage of this method over existing approaches lies in its suitability for online implementation. Moreover, WyNDA stands out by not relying on optimization or machine learning, ensuring computational efficiency. The fundamental concept revolves around approximating the unknown function of a dynamical system through a diverse set of basis functions that encapsulate the available data. An adaptive observer is then employed to iteratively refine this approximation and estimate the associated parameters. The efficacy of the proposed method is demonstrated through numerical simulations encompassing linear systems, nonlinear systems, and control systems. The results underscore the method’s ability to successfully unveil the governing equations of dynamical systems, highlighting its potential for extracting intricate system dynamics from observational data.

  • WyNDA represents a novel approach for uncovering mathematical models of dynamical systems from data.

  • Utilizing a series of basis functions, WyNDA effectively approximates the unknown structure inherent in dynamical systems.

  • The validation of WyNDA involves benchmark equations of dynamical systems, confirming its efficacy in diverse scenarios.


Specification table

Subject area: Mathematics
More specific subject area: Dynamical Systems
Name of your method: Wide-Array of Nonlinear Dynamics Approximation
Name and reference of original method: Not applicable
Resource availability: https://github.com/agushasan/discovery

Method details

A dynamical system refers to a system in which its state undergoes changes over time and follows a predetermined set of rules or equations [1]. The mathematical models of dynamical systems capture the behavior and changes of variables within a system, providing a framework to study and predict its dynamics. Dynamical systems can be either discrete or continuous. In discrete dynamical systems, time advances in distinct steps, while continuous dynamical systems involve a continuous and smooth evolution over time. The state variables of a dynamical system represent the system’s internal configuration, and the equations governing their changes describe how the system evolves. The study of dynamical systems is crucial in various fields, including physics, engineering, biology, economics, and ecology. It enables researchers to analyze and understand the behavior of complex systems, predict their future states, and design control strategies for desired outcomes [2], [3], [4], [5], [6].

The schematic diagram in Fig. 1 illustrates a model of a dynamical system with its input and output. This system is characterized by a state vector, denoted as xRn, which is a function of the time variable t. The state vector represents the internal variables that describe the system’s behavior over time. Additionally, the system incorporates a parameter vector θRr, introducing a distinguishing factor among different instances of the system. Moreover, the dynamical system is characterized by an initial condition, denoted as x(t0), representing the state of the system at the initial time, providing a starting point for its evolution. The inclusion of initial conditions is crucial for capturing the system’s history and understanding its trajectory from a specified starting state. The system is responsive to control inputs, denoted by uRp, which influence its behavior. The control input serves as an external factor that can be manipulated to achieve desired outcomes or responses from the system. This feature makes dynamical systems amenable to control strategies, where inputs can be adjusted to attain specific performance objectives.

Fig. 1.

Fig. 1

A schematic depiction of the input-output relationship in dynamical systems.

As the system evolves, it produces an output that is recorded through a sensor system. The output, denoted as y(k), is measured in discrete-time steps indexed by k. Note that, throughout the remainder of the paper, the index k is adopted to denote discrete-time instances, representing instances in a digital or sampled domain. Conversely, the symbol t is utilized to signify continuous-time. Hence, x(k) designates the discrete-time state variable, while x(t) denotes the continuous-time state variable. Discrete-time measurements are common in practical applications, reflecting the sampling nature of sensor systems. The recorded output provides information about the system’s state, allowing for monitoring, analysis, and control adjustments. Understanding the dynamics of such systems is essential for various applications, including engineering, physics, biology, and economics. The schematic diagram encapsulates the key components of a dynamical system, emphasizing the interactions between the state, parameters, initial conditions, control inputs, and sensor-recorded outputs. This holistic representation forms the basis for modeling and analyzing the behavior of dynamic systems in diverse fields.

Developing mathematical models of dynamical systems involves two primary approaches: deriving models from first principles using the laws of physics (mechanistic models) or constructing models from sensor data through optimization or machine learning techniques [7]. Each approach has its strengths and challenges, catering to different preferences and requirements. The first approach relies on a deep understanding of the underlying physics governing the system. This involves formulating equations based on fundamental principles and laws. While this method provides models that are rooted in physical reality, it demands a strong background in physics and a comprehensive knowledge of the system’s dynamics. The derived models are often complex and require precise parameter tuning, making them suitable for well-understood systems where the governing equations are known [8], [9], [10], [11], [12], [13], [14]. On the other hand, machine learning techniques, particularly those involving data-driven approaches, offer an alternative route to model development. This approach utilizes sensor data measurements to construct models without a prior knowledge of the system’s governing equations. Machine learning algorithms, such as neural networks or support vector machines, learn patterns and relationships from the data to generate predictive models [15], [16], [17], [18], [19], [20], [21], [22]. While this method is versatile and applicable to a wide range of systems, it often produces black-box models, making it challenging to interpret the underlying dynamics. However, regardless of the approach chosen, the validation of dynamical models is a critical step. Models derived from either first principles or data-driven methods must be tested against real-world data to ensure their accuracy and reliability.

There is a growing incentive to discover mathematical models based on data that not only exhibit predictive power but also offer interpretability [23], [24], [25], [26], [27]. Explainable models are advantageous as they provide insights into the underlying mechanisms of the system, enhancing understanding of its behavior. Achieving a balance between accuracy and interpretability is a key challenge in this field, as it requires methods that can capture complex dynamics while remaining transparent and comprehensible to domain experts. The exploration of deriving governing equations from data has been a focal point within the research community over the past decades. One notable instance is found in [28], where the authors employ sparse identification of nonlinear dynamical systems to discern the equations governing a dynamic system based on empirical data. The effectiveness of the proposed method, known as Sparse Identification of Nonlinear Dynamics (SINDy), is contingent upon factors such as the selection of measurement variables, the quality of the data, and the choice of the sparsifying basis function. The method’s success hinges on these considerations, making it crucial to carefully tailor these aspects to ensure accurate and meaningful identification of the underlying dynamics. In a more recent study [29], the authors introduced Automatic Regression for Governing Equations (ARGOS), a novel approach that seamlessly integrates machine learning and statistical inference to automatically discern interpretable models characterizing the dynamics of a system. The algorithm encompasses crucial phases such as data smoothing and numerical approximation of derivatives, incorporating bootstrap sampling along with sparse regression to establish confidence intervals for variable selection. Notably, the method demonstrates its capability to consistently identify three-dimensional systems when provided with moderately-sized time series data and high signal quality in relation to background noise levels.

The references mentioned earlier are undeniably robust, yet their efficacy lies predominantly based on optimization methods or machine learning, requiring data to be collected before processing. In contrast, the proposed method introduces three innovative features. Firstly, it enables online implementation, allowing real-time processing without the need for a pre-existing dataset. This real-time adaptability is particularly advantageous in dynamic scenarios where prompt decision-making is essential. Secondly, the proposed method leverages an adaptive observer, which dynamically approximates the underlying dynamical systems based on their convergence rate. This adaptive nature enhances the model’s accuracy and adaptability to changing conditions. Thirdly, the method exhibits efficiency by requiring fewer data points for highly excited systems, as evidenced by numerical examples. This reduction in data demand not only streamlines the implementation process but also makes the approach more resource-efficient. Together, these features position the proposed method as a versatile and efficient solution, well-suited for dynamic systems where real-time adaptability and resource optimization are paramount. Given its broad applicability across various dynamical systems and the use of wide-array of basis functions, the proposed methodology is coined as Wide-Array of Nonlinear Dynamics Approximation or WyNDA, as detailed in the next section.

In mathematical terms, the continuous-time dynamical system is described by the following equations:

x˙(t)=f(x(t),u(t),θ) (1)
x(t0)=x0 (2)

These equations capture the evolution of the system’s state over time. The first equation, a vector differential equation, expresses the rate of change of the state vector x(t) with respect to time. This rate of change is determined by a function f that takes into account the current state x(t), control input u(t), and parameters θ. The function f encapsulates the underlying dynamics governing the system’s behavior. The second equation sets the initial condition for the system. At the initial time t=t0, the state vector x(t0) is specified as x0.

In many scientific and engineering applications, the functions f and the parameters θ governing a dynamical system are often unknown. However, the state vector x(t) can be measured using sensors, and the inputs u(t) are typically known as they are intentionally applied to the system. The fundamental challenge in discovering the mathematical model of a dynamical system lies in identifying the unknown function f and its associated parameters θ from data. This process is crucial for understanding and predicting the behavior of the system. By deciphering the underlying dynamics encoded in f and determining the specific values of θ, researchers and engineers gain valuable insights into how the system responds to inputs and evolves over time. The ability to accurately capture these dynamics enhances the overall comprehension of complex systems, enabling informed decision-making and control strategies. The primary approach to discover the mathematical models involves leveraging measured data, particularly the recorded measurement vector y(k) obtained from sensors, which can be modelled as follows:

y(k)=x(k)+v(k) (3)

The term v(k)N(0,R(k)) is employed to characterize the presence of noise or uncertainty in the sensor data. This additional term allows for the consideration of potential inaccuracies in the measurements, contributing to a more robust and realistic modeling of the system.

The objective of this paper is to discover mathematical models of dynamical systems represented by Eq. (1) that captures the system’s dynamics based on data from sensor measurement (3). This is referred to as an inverse problem, constituting one of the most crucial topics in modeling and simulation. The problem is particularly relevant in scenarios where a detailed understanding of the underlying processes is essential, such as in the design and optimization of control systems, robotics, and many other applications across various scientific and engineering domains.

Wide-array of nonlinear dynamics approximation (WyNDA)

The proposed method for discovering the mathematical model of dynamical systems represented by (1) is called WyNDA and involves several key steps, as outlined in Fig. 2.

  • The first step is to construct an approximation model based on wide-array of basis functions that captures and stores the measurement data y(k) generated by the dynamical system and control input u(k). This approximation model, built from the observed data, serves as a basis for further analysis.

  • The second step is the application of an adaptive observer algorithm. This algorithm is instrumental in estimating the system’s parameter θ. The adaptive observer iteratively refines its estimation of θ by comparing the predicted and measured outputs, thereby enhancing the accuracy of the parameter estimation.

  • The third step is to convert the discrete-time approximation model into continuous-time model. In this case, once a sufficiently accurate estimate θ¯ is obtained, it enables the construction of the mathematical model of the dynamical system (1).

Fig. 2.

Fig. 2

A schematic diagram of the proposed methodology based on Wide-Array of Nonlinear Dynamics Approximation (WyNDA) to discover mathematical models of dynamical systems from data.

The discovered model, now incorporating the estimated parameters, provides a mathematical representation of the underlying dynamics. This representation is then capable of predicting the system’s response to different inputs with increased fidelity. This methodology offers a systematic and data-driven approach to modeling dynamical systems. By leveraging measured data, the approach avoids the need for a prior knowledge of the system dynamics, making it applicable in situations where the underlying governing equations are unknown or complex. The adaptive observer plays a crucial role in refining the model, ensuring that the estimated parameters align closely with the true characteristics of the dynamical system. The resulting model, grounded in observed data, serves as a valuable tool for understanding, predicting, and controlling the system’s behavior.

To this end, the approximation model is expressed as follows:

x(k+1)=x(k)+Ψ(y(k),u(k))θ (4)

where Ψ(y(k),u(k))Rn×r is called the approximation function. Note that, for any dynamical system represented by (1), its Euler discretization yields:

x(k+1)=x(k)+Δtf(x(k),u(k),θ) (5)

Thus, the mathematical model of the dynamical system can be approximated by the approximation model by comparing (4) and (5), as follows:

Δtf(x(k),u(k),θ)Ψ(y(k),u(k))θ (6)

The approximation function Ψ(y(k),u(k)) consists of a wide-array of basis functions and is given by:

Ψ(y(k),u(k))=(Φ1(y(k),u(k))0000Φ2(y(k),u(k))0000Φn(y(k),u(k))) (7)

The array of basis functions Φj(y(k),u(k)), where j=1,,n, is not unique and can be chosen in various ways. An example is given as follows:

Φj(y(k),u(k))=(1yi(k)yi2(k)sin(yi(k))cos(yi(k))) (8)

In this case, the basis function comprises a constant, polynomials, and trigonometric functions. These elements collectively form a set of functions used for approximating the unknown function f in the dynamical system. The inclusion of a constant term, polynomial functions, and trigonometric functions allows for a flexible and diverse representation of the system’s dynamics, capturing various patterns and behaviors that may be present in the underlying function. The choice of these functions is intuitive, as polynomials and trigonometric functions are frequently employed in function approximation, such as in Taylor and Fourier series. However, other combinations of these functions are also possible. For instance, including |yl(k)|yi(k)3 or yl(k)sin(yi(k)) in the set of basis functions is a viable option. Once the approximation model with its basis functions is constructed, the subsequent step involves applying an estimation algorithm to determine the parameter vector θ in (4). This estimation process is crucial for obtaining the values of θ that best align with the underlying dynamics of the dynamical system, ensuring an accurate representation of the system’s behavior.

The estimation algorithm proposed in this paper relies on an adaptive observer presented in [30]. This method exhibits notable strengths, particularly its capacity to rapidly converge to the actual parameter values. Adaptive observers are advantageous for their ability to adapt and fine-tune the estimated parameters based on real-time data. In the context of dynamical systems, this adaptability is crucial for capturing the system’s intricate dynamics, providing a more accurate representation. The observer continuously refines its estimation, ensuring that the identified parameter values closely align with the true system characteristics. This adaptability contributes to the overall effectiveness of the estimation algorithm, making it a robust tool for discovering the underlying parameters governing the dynamical system. The adaptive observer to estimate the approximation model (4) is designed as follow:

x¯(k|k)=x¯(k|k1)+(Kx(k)+Γ(k|k)Kθ(k))(y(k)x¯(k|k1)) (9)
θ¯(k|k)=θ¯(k|k1)Kθ(k)(y(k)x¯(k|k1)) (10)

where the observer gains Kx(k)Rn×n, Kθ(k)Rr×n, and Γ(k|k)Rn×r are calculated from the following formulas:

Kx(k)=Px(k|k1)(Px(k|k1)+Rx(k))1 (11)
Ω(k)=Γ(k|k1)Pθ(k|k1)Γ(k|k1)+Rθ(k) (12)
Kθ(k)=Pθ(k|k1)Γ(k|k1)Ω(k)1 (13)
Γ(k|k)=(IKx(k))Γ(k|k1) (14)

The observer gains depend on the update matrices Px(k|k1)Rn×n and Pθ(k|k1)Rr×r and the tuning matrices Rx(k)Rn×n and Rθ(k)Rn×n. The initial conditions for this matrices are Px(0|1)=(Px(0|1))>0, Pθ(0|1)=(Pθ(0|1))>0, Rx(1)=(Rx(1))>0, Rθ(1)=(Rθ(1))>0, and Γ(0|1)Γ(0|1)>0.

The prediction updates are given by:

x¯(k+1|k)=x¯(k|k)+Ψ(y(k),u(k))θ¯(k|k) (15)
θ¯(k+1|k)=θ¯(k|k) (16)
Px(k+1|k)=λx1(IKx(k))Px(k|k1) (17)
Pθ(k+1|k)=λθ1(IKθ(k)Γ(k|k1))Pθ(k|k1) (18)
Γ(k+1|k)=Γ(k|k)Ψ(y(k),u(k)) (19)

Eq. (15) articulates the structure of the approximation model, serving as a representation of the dynamical system under consideration. This model captures the system’s behavior and dynamics, providing an insightful mathematical framework. On the other hand, Eq. (16) underscores a critical characteristic of the parameter θ; it is considered constant or piece-wise constant. This implies that the parameter remains fixed within certain intervals or segments, reflecting the system’s behavior during those specific periods. The constancy or piece-wise constancy of θ is a key assumption in the proposed methodology, enabling a more tractable approach to parameter estimation. This assumption aligns with the notion that certain system characteristics, represented by θ, may remain relatively stable or undergo discernible changes over distinct phases of the system’s operation. Therefore, Eqs. (15) and (16) collectively form the basis for the parameter estimation algorithm, offering a structured and nuanced understanding of the dynamical system’s representation and the constancy characteristics of the parameter of interest. The prediction update has two tuning parameters λx,λθ(0,1), which can be tuned to increase the performance of the estimator.

The prerequisite for the convergence of the parameter estimate is that the sequence Ψ(k) must exhibit persistent excitation. Under this circumstance, there exist fixed positive constants κ and ξ such that:

0<κIΣl=kξkΨ(l)Ψ(l) (20)

Indeed, the persistence of excitation is a fundamental and indispensable factor in the context of parameter estimation. In the area of system identification or modeling, persistency of excitation denotes the continuous and sufficient variation in the input signals or stimuli, ensuring that the system under consideration remains responsive and informative for the duration of the estimation process. Subject to the persistence of excitation condition (20), we can ensure the convergence of the estimate to the true value, as asserted in the following theorem.

Theorem 1

The estimation errors:

ϵx(k)=x¯(k|k)x(k) (21)
ϵθ(k)=θ¯(k|k)θ (22)

exhibit exponential decay towards zero, and the convergence speed can be adjusted arbitrarily by tuning the parametersλxandλθ.

Proof

Building upon the concept introduced in [30], [31], and [32], we will initially establish the exponential convergence of a specific linearly combined error. In this context, the error is defined as:

ϵ(k)=ϵx(k)+Γ(k|k)ϵθ(k) (23)

First remark that, substituting (10) to (9), yields:

x¯(k|k)=x¯(k|k1)+Kx(k)(x(k)x¯(k|k1))Γ(k|k)(θ¯(k|k)θ¯(k|k1)) (24)

The first term of the right hand side of (24) can be obtained from (15), as follows:

x¯(k|k1)=x¯(k1|k1)+Ψ(y(k1),u(k1))θ¯(k1|k1) (25)

Note that from (4) and (21), we have:

x(k)=x¯(k1|k1)ϵx(k1)+Ψ(y(k1),u(k1))θ (26)

Thus, utilizing (22), the second term of the right hand side of (24) is given by:

Kx(k)(x(k)x¯(k|k1))=Kx(k)ϵx(k1)Kx(k)Ψ(y(k1),u(k1))ϵθ(k1) (27)

The third term of the right hand side of (24) is given by:

Γ(k|k)(θ¯(k|k)θ¯(k|k1))=Γ(k|k)(ϵθ(k)ϵθ(k1)) (28)

Combining (25), (27), and (28), (24) can be written as:

x¯(k|k)=x¯(k1|k1)+Ψ(y(k1),u(k1))θ¯(k1|k1)Kx(k)ϵx(k1)Kx(k)Ψ(y(k1),u(k1))ϵθ(k1)Γ(k|k)(ϵθ(k)ϵθ(k1)) (29)

From (21), we have:

ϵx(k+1)=x¯(k+1|k+1)x(k+1) (30)

Substituting (4) and (29) into (30), we have:

ϵx(k+1)=(IKx(k+1))ϵx(k)+(IKx(k+1))Ψ(y(k),u(k))ϵθ(k)Γ(k+1|k+1)(ϵθ(k+1)ϵθ(k)) (31)

Note that from (14) and (19), we have:

Γ(k+1|k+1)=(IKx(k+1))(Γ(k|k)Ψ(y(k),u(k))) (32)

Thus, from (23) we obtain:

ϵ(k+1)=ϵx(k+1)+Γ(k+1|k+1)ϵθ(k+1)=(IKx(k+1))ϵ(k) (33)

The expression (33) aligns with the dynamics of the estimation error in a design employing an exponential forgetting factor derived in [33] for homogeneous systems:

x(k+1)=x(k) (34)
y(k)=x(k) (35)

Consequently, the sequence ϵ(k+1) exhibits exponential decay towards zero. Considering Eq. (23), to ensure the exponential convergence of the observer, it suffices to verify that ϵθ(k) also undergoes exponential decay. This is demonstrated sequentially as follows:

ϵθ(k+1)=θ¯(k|k)Kθ(k+1)(x(k+1)x¯(k+1|k))θ (36)

Substituting (21) and (22) into (36), we have:

ϵθ(k+1)=ϵθ(k)+Kθ(k+1)ϵx(k)+Kθ(k+1)Ψ(y(k),u(k))ϵθ(k) (37)

Finally, substituting (23) and (19) into (37), we have:

ϵθ(k+1)=(IKθ(k+1)Γ(k+1|k))ϵθ(k)+Kθ(k+1)ϵ(k) (38)

This error corresponds to the dynamics of the estimation error in a system designed with an exponential forgetting factor presented in [30], as illustrated below:

θ(k+1)=θ(k) (39)
yθ(k)=Γ(k|k1)θ(k) (40)

Hence, the error ϵθ(k) undergoes exponential decay towards zero. Given the relationship in (23), this implies that the estimation error ϵx(k) also experiences exponential decay towards zero. This concludes the proof. □

Having the convergence of the estimate is guaranteed, as outlined in Theorem 1, we can now provide a summary of the WyNDA algorithm, which is presented in Algorithm 1. This algorithm encapsulates the key steps and procedures for the efficient functioning of the WyNDA methodology.

Algorithm 1.

Algorithm 1

Wide-Array of Nonlinear Dynamics Approximation (WyNDA)

Method validation

In this section, four examples are presented to validate the effectiveness of WyNDA. The first example demonstrates the application of WyNDA to discover a mathematical model of a linear system from data. Subsequently, the second example showcases the method’s capability to estimate nonlinear systems. Here, four nonlinear mathematical equations are considered: the Lorenz system, Rössler attractor, Lotka–Volterra equations, and Van der Pol oscillator. Moving forward, the third example illustrates how the proposed method can be effectively employed for control system applications. Lastly, the fourth example demonstrates the utility of the method in the context of system identification. These diverse examples collectively highlight the versatility and robustness of WyNDA across various types of dynamical systems and applications. All codes and data are available in: https://github.com/agushasan/discovery.

Example 1: linear systems

The primary aim of this example is to derive a mathematical model for a mass-spring-damper (MSD) system. This system is characterized by a first-order linear differential equation encompassing two state variables: position (x) and velocity (v). Notably, the MSD system is defined by three key parameters, namely the mass (m), the spring coefficient (k), and the damper coefficient (b). To initiate this process, we conduct a simulation of MSD system utilizing Matlab Simulink to gather pertinent data with m=1 kg, k=84 N/m, and b=0.9 NS/m. The data is sampled at a rate of 1 ms, and to introduce uncertainty in the measurements, a white Gaussian noise with a standard deviation of 1 is added. The resulting data is systematically compiled and stored in a file named DATAMSD.mat. A visual representation of this data is presented in Fig. 3, offering a graphical insight into the dynamics of the system. This dataset will serve as the foundation for subsequent analysis and the formulation of an accurate mathematical model for the MSD system.

Fig. 3.

Fig. 3

Captured measurements of the MSD system’s position and velocity data from Matlab Simulink simulation.

In this example, the basis function is selected as follow:

Φj(y(k),u(k))=(y1(k)y2(k)y12(k)y22(k)y1(k)y2(k)) (41)

where y1(k) represents the measurement of x(k) and y2(k) represents the measurement of v(k). Thus, the approximation model is given by:

(x(k+1)v(k+1))=(x(k)v(k))+(y1(k)05×1y2(k)y1(k)y12(k)y2(k)y22(k)y12(k)y1(k)y2(k)y22(k)05×1y1(k)y2(k))(θ1θ10) (42)

Since the MSD system is linear, we would expect parameters correspond to the nonlinear terms in (42) (such as θ3, θ4, θ5, θ8, θ9, θ10) are zero. The subsequent step involves implementing the adaptive observer (9)-(10) to obtain the state estimate x¯ and parameter estimate θ¯. The parameters for the adaptive algorithm are given in Table 1.

Table 1.

Values of parameters used in simulation of example 1.

parameter value parameter value
Px(0|1) 0.1I λx 0.995
Pθ(0|1) 0.1I λθ 0.999
Rx(1) I Γ(0|0) 0
Rθ(1) I

The outcomes are showcased in Figs. 4 and 5, respectively. Analyzing Fig. 4, it is evident that the algorithm successfully mitigates the impact of noise, significantly improving the data quality for both variables. To assess the effectiveness of the proposed method, we analyze the convergence of the estimated values towards the actual values. Convergence, in this context, is gauged by scrutinizing the trend and alignment between the estimated and actual values over successive iterations or time intervals. This evaluation provides insights into how well the proposed method approximates the true underlying values of the system dynamics. Fig. 5 displays the evolution of the parameter estimate, illustrating its convergence toward the actual values. From the depicted figure, it is evident that the algorithm converges to the true values within a time span of 0.4 s, corresponding to 400 data points. This observation underscores the efficiency and rapid convergence of the algorithm in accurately approximating the sought-after values. The temporal aspect, represented by the 0.4-second interval, provides insights into the algorithm’s convergence speed and its ability to converge within a relatively short duration.

Fig. 4.

Fig. 4

State estimation from measured data.

Fig. 5.

Fig. 5

Estimated parameters for the MDS system.

Table 2 presents the estimated parameters for the approximation model (42). As anticipated, the parameters linked to nonlinear basis functions are determined to be zero. The corresponding approximation model (42) for the MSD system is expressed as:

(x(k+1)v(k+1))=(x(k)v(k))+(00.0010.0830.001)(x(k)v(k)) (43)

Since the sampling time Δt is 1 ms, the continuous time differential equation for the MSD system is given by:

(x˙(t)v˙(t))=(01831)(x(t)v(t)) (44)

This outcome corresponds to parameters m=1 kg, k=83 N/m, and b=1 NS/m, which slightly deviate from the Matlab Simulink simulation data where parameters were set to m=1 kg, k=84 N/m, and b=0.9 NS/m. The observed discrepancy can be attributed to noise introduced during the Simulink simulation.

Table 2.

Comparison between the true and estimated parameters in the MSD system.

parameter estimated value parameter estimated value
θ1 0 θ6 -0.083
θ2 0.001 θ7 -0.001
θ3 0 θ8 0
θ4 0 θ9 0
θ5 0 θ10 0

Example 2: nonlinear systems

The objective of this example is to demonstrate the performance of the proposed method for nonlinear systems. Specifically, four nonlinear mathematical equations are examined: the Lorenz system, Rössler attractor, Lotka–Volterra equations, and Van der Pol oscillator. Note that in these examples, the time series are expressed in units of seconds. The Lorenz system is given by:

p˙(t)=σ(q(t)p(t)) (45)
q˙(t)=p(t)(ρr(t))q(t) (46)
r˙(t)=p(t)q(t)βr(t) (47)

The Lorenz system is recognized as a benchmark system in chaotic dynamics due to its remarkable sensitivity to initial conditions and the manifestation of the strange attractor phenomenon. In this example, the true value of parameters are: σ=10, ρ=28, and β=3. y1(k), y2(k), and y3(k) are denoted as the measurements from the sensor system, which were taken every 1 ms. The basis function for this problem is selected as follows:

Φj(y(k),u(k))=(1yi(k)yi2(k)yi(k)yl(k))R1×10 (48)

for (i,l=1,2,3). The simulation results for state estimation are presented in Fig. 6 a. The initial condition of the system was (8727). It is evident from the plot that the method converges rapidly to the actual state. Note that in this example the basis function consists of 10 entries, corresponding to 30 parameters represented by θ1,,θ30. Specifically, the parameters σ are associated with θ2 and θ3, the parameter ρ is associated with θ12, and the parameter β is associated with θ24. The estimation results are depicted in Fig. 7. It is evident from the graph that the estimates converge to the actual values after approximately 2 s, equivalent to 2000 sampling points. The Lorenz system serves as an excellent illustration for the proposed method, given that the states exhibit high excitation for certain initial conditions. This heightened state of excitation is a key factor enabling WyNDA to accurately and swiftly discover the model.

Fig. 6.

Fig. 6

Discovering mathematical models of nonlinear dynamical systems using WyNDA.

Fig. 7.

Fig. 7

Parameter estimation of the Lorenz system.

In the second example, the Rössler attractor is considered. The Rössler attractor characterizes a continuous-time dynamical system that demonstrates chaotic dynamics, attributed to the fractal properties inherent in the attractor. The model is given by the following three dimensional differential equations:

p˙(t)=q(t)r(t) (49)
q˙(t)=p(t)+aq(t) (50)
r˙(t)=b+r(t)(p(t)c) (51)

The model consists of three parameters, a, b, and c. In this example, a=0.1, b=0.1, and c=14 are used. In contrast to the Lorenz system, the Rössler attractor does not exhibit high excitation. Consequently, the algorithm converges at a slower pace and necessitates a greater number of data points. The diminished excitation in the Rössler attractor poses a challenge for the algorithm, as it requires a more extended observation period to accurately capture and converge to the underlying dynamics. This highlights the system-specific considerations and challenges associated with employing the algorithm across different dynamical systems. The approximation function for this problem is selected as follows:

Ψ(y(k),u(k))=(y1(k)y2(k)y3(k)01×1301×3y12(k)y22(k)y32(k)01×1001×61yi(k)yi2(k)yi(k)yl(k))R3×16 (52)

for (i,l=1,2,3). The estimation results are depicted in Figs. 6 b and 8. In this visualization, the algorithm achieves convergence after 11 s, equivalent to 11000 data points.

Fig. 8.

Fig. 8

Parameter estimation of the Rössler attractor.

In the third example, the Lotka–Volterra equations is considered. The equations represent a set of first-order nonlinear differential equations commonly employed to characterize the dynamics of biological systems involving interaction between two species, one acting as a predator and the other as prey. The model has four parameters and is given by:

p˙(t)=αp(t)βp(t)q(t) (53)
q˙(t)=δp(t)q(t)γq(t) (54)

For the simulation, α=1, β=0.2, δ=0.1, and γ=0.2 are used. The sampling rate is set at 100 Hz. As illustrated in Fig. 9, it is evident that the estimation converges to the actual values within a time frame of 14 s, equivalent to 1400 data points. This observation underscores the efficiency of the estimation process, indicating that the algorithm accurately approximates the desired values within a specific time window and data point resolution.

Fig. 9.

Fig. 9

Parameter estimation of the Lotka–Volterra equations.

The last example is the Van der Pol oscillator. The model is an oscillating system with non-linear damping. The model is given by:

p˙(t)=q(t) (55)
q˙(t)=μ(1p(t)2)q(t)p(t) (56)

This model features a sole parameter, denoted as μ. Given the inclusion of the term p(t)2q(t) in the model, it is judicious to incorporate the combination of p(t)2q(t) into the set of basis functions. In practice, the choice of basis functions can be versatile, allowing for the selection of a broad range to aptly capture the nonlinear dynamics inherent in the system. The results of the estimation are illustrated in Fig. 10, further attesting to the effectiveness of the proposed method. The inclusion of the selected basis function, p(t)2q(t), demonstrates the model’s capacity to accurately capture the underlying dynamics, showcasing the robustness and applicability of the proposed approach.

Fig. 10.

Fig. 10

Parameter estimation of the Van der Pol oscillator.

Table 3 provides a comparison between WyNDA, SINDy, and ARGOS in terms of the number of data observations required for each method to achieve 80% accuracy. Data for SYNDy and ARGOS were taken from Egan et al. [29]. The analysis reveals that WyNDA outperforms the other methods, particularly on systems characterized by high excitation, such as Lorenz system and Lotka Volterra equations. The efficiency demonstrated by WyNDA in accurately capturing system dynamics with a relatively limited number of data points highlights its effectiveness in scenarios where data availability is constrained, particularly in the context of highly excited systems. Notably, WyNDA operates without the need for an optimization package or machine learning, eliminating the necessity for a training phase. This characteristic renders WyNDA computationally more efficient compared to methods involving optimization and machine learning algorithms, such as SINDy and ARGOS. The absence of a training requirement simplifies the computational process, reducing overall complexity and resource demands. This characteristic enhances the practicality and speed of WyNDA, making it a computationally streamlined and effective approach for system identification.

Table 3.

Comparison of the number of data used by WyNDA with SINDy and ARGOS.

System Algorithm n
Lorenz system WyNDA 2000
ARGOS 7944
SINDy NA
Rössler attractor SINDy 1585
ARGOS 1585
WyNDA 11000
Lotka Volterra equations WyNDA 1400
ARGOS 1996
SINDy 1585
Van der Pol oscillator SINDy 795
ARGOS 1000
WyNDA 1200

Example 3: control systems

The first two examples illustrate the method’s capability to accurately discover the mathematical models of dynamical systems. However, it’s essential to note that both examples represent special cases. In the first case, the state is excited by the initial condition, while in the second case, the state demonstrates chaotic solutions for the given parameters. The purpose of this example is to underscore the importance of excitation in the process of discovering mathematical models. In pursuit of this objective, a typical control system are examined. The dynamics of this system are captured by a set of equations, and it is crucial to emphasize that excitation, or an external influence, is necessary to unravel the underlying mathematical structure. The system’s response to excitation provides valuable insights into its behavior, allowing us to identify and understand its mathematical model more effectively. This example serves as a demonstration of the significance of excitations in the context of model discovery for dynamical systems. By showcasing the necessity of external influences for accurate modeling, a fundamental aspect that contributes to the robustness and applicability of the proposed method is highlighted. Let us consider the following control system:

(x˙1(t)x˙2(t))=(10200.42)(x1(t)x2(t))+(02)u(t) (57)

In the context of discovering the control system represented by (57) using measurement data of y1(k) and y2(k), a set of basis functions is employed:

Φj(y(k),u(k))=(y1(k)y2(k)y12(k)y22(k)y1(k)y2(k)u(k)u2(k)) (58)

If the control input u(k) remains constant, the estimation results fail to converge to the actual values, as depicted in Fig. 11. This lack of convergence stems from insufficient excitation of the system states. In dynamic system identification, excitation is essential for obtaining accurate and reliable parameter estimates. When the system experiences variations and changes induced by varying inputs, it allows for a more comprehensive exploration of the state space, enabling the discovery of underlying dynamics. In this specific example, the constant nature of the control input restricts the system’s response, limiting the information available for parameter estimation. Consequently, the adaptive observer algorithm struggles to converge to the actual parameter values. This emphasizes the importance of dynamic excitation in system identification processes, as it ensures a thorough exploration of the system’s behavior and facilitates accurate parameter estimation, ultimately enhancing the reliability of the discovered mathematical models.

Fig. 11.

Fig. 11

Parameter estimation with constant control input.

Fig. 12 illustrates the parameter estimation results when the input is a sinusoidal function. In this case, a convergence of the parameters to their actual values, indicating the successful discovery of the mathematical model represented by (57) was observed. This experiment highlights the crucial role of the persistency of excitation condition for the accurate identification of system dynamics. The sinusoidal input, with its varying amplitude and frequency, provides the necessary excitation to explore different regions of the state space. As a result, the adaptive observer algorithm effectively captures the system’s response to these variations, facilitating the convergence of parameter estimates. The contrast between the outcomes with constant and sinusoidal inputs underscores the significance of dynamic excitation in system identification processes. Ensuring persistency of excitation conditions enhances the robustness and reliability of discovered mathematical models, contributing to a more accurate representation of the underlying system dynamics.

Fig. 12.

Fig. 12

Parameter estimation with sinusoidal control input.

Example 4: parameter estimation

In numerous engineering applications, parameter estimation assumes a pivotal role, serving as a fundamental tool for comprehending the intricacies of a system. Whether employed for condition monitoring or predictive maintenance, accurate parameter estimation is essential for gaining insights into system behavior, facilitating informed decision-making, and enhancing the overall efficiency and reliability of engineering processes. The proposed method exhibits versatility in handling parameter estimation problems, as demonstrated through its application to a magnetic levitation model. The system under consideration can be described by the following equations:

(x˙(t)v˙(t)i˙(t))=(v(t)gCm(i(t)x(t))2RLi(t)+1Lu(t)) (59)

The objective is to estimate the value of C, L, and R. Given our prior knowledge of the dynamical system’s structure, the approximation function is constructed as follows:

Ψ(y(k),u(k))=(y2(k)000100(y3(k)y2(k))2000y3(k)00u(k)) (60)

The parameter vector is defined as follows:

θ=(θ1θ2θ3θ4θ5) (61)

The estimation of L is derived from the estimate of θ5, the estimation of R is derived from the estimate of θ4, and the estimation of C is derived from the estimate of θ3. The outcomes of the state estimation process are depicted in Fig. 13. In this specific scenario, the initial state is set to (511), with corresponding initial estimates initialized at (000). A noteworthy observation is the rapid convergence of the estimates towards the actual state, achieving accuracy within a time frame of less than 1 ms. This compelling result serves as a tangible demonstration of the practicality and efficacy of the proposed method, particularly in the context of real-time applications.

Fig. 13.

Fig. 13

State estimation of the magnetic levitation model.

The comparison of true parameter values and their corresponding estimates is illustrated in Table 4, revealing a high degree of accuracy. Moreover, an insightful observation from Fig. 14 highlights that the convergence of parameter estimates is achieved in a remarkably short span of less than 0.2 s. This swift convergence further underscores the robustness and efficiency of the proposed method in capturing accurate parameter values in a timely manner.

Table 4.

Comparison between the true and estimated parameters.

parameter true estimated
L 3 2.9987
R 6 5.9939
C 1.5 1.508

Fig. 14.

Fig. 14

Parameter estimation of the magnetic levitation model.

Conclusions

In this paper, an innovative methodology for discovering mathematical models of dynamical systems from data based on Wide-Array of Nonlinear Dynamics Approximation, presenting a departure from conventional approaches reliant on machine learning or optimization, has been presented. An essential feature of the proposed method is its ability to eliminate the necessity for data training, resulting in substantial computational time savings. This characteristic makes the proposed method particularly advantageous in scenarios where efficiency and speed are paramount. One notable strength of the proposed methodology lies in its robustness when handling uncertainty in measurement data. The ability to navigate and adapt to variations and imprecision in the data enhances the reliability and applicability of the approach across diverse real-world situations. This robustness contributes to the method’s potential for practical implementation, where data uncertainties are common. The numerical examples provided in the study, featuring four nonlinear mathematical models-namely, the Lorenz system, Rössler attractor, Lotka-Volterra equations, and Van der Pol oscillator-have illuminated the crucial role of persistency of excitation in the process of uncovering dynamical models. The findings emphasize that increased levels of system excitation facilitate a more rapid discovery of the model, underscoring the crucial role of dynamic input stimuli in the identification process. Notably, the main challenge and limitation for WyNDA manifest in the persistence of excitation conditions. In instances where sustained and diverse excitation signals are not consistently present, WyNDA encounters difficulty in achieving accurate and robust model estimates, hindering its effectiveness in certain operational scenarios. Therefore, ensuring a persistent excitation condition becomes a pivotal consideration for the successful application of WyNDA in system identification tasks. Moreover, the proposed method extends beyond model discovery, showcasing its applicability in the area of control and parameter estimation. The ability to identify and characterize the underlying dynamics of control systems adds an additional layer of utility to the proposed method, broadening its scope and potential applications. Additionally, the results demonstrate the effectiveness of the proposed methodology in parameter identification, emphasizing its versatility in extracting meaningful information from dynamic systems. The method’s ability to discern and estimate system parameters accurately reinforces its utility in a range of scientific and engineering applications where understanding system behavior is paramount.

Ethics statements

The methods used in the study did not involve any human or animal subjects. No data was used or collected for this work.

Declaration of Generative AI and AI-assisted Technologies in the Writing Process

During the preparation of this work the author used ChatGPT in order to improve readability and language. After using this tool/service, the author reviewed and edited the content as needed and takes full responsibility for the content of the publication.

CRediT authorship contribution statement

Agus Hasan: Conceptualization, Methodology, Formal analysis, Writing – original draft, Writing – review & editing.

Declaration of competing interest

The author states that he does not have any competing financial interests or personal relationships that could have influenced the work presented in this paper.

Acknowledgements

The author expresses profound gratitude to his wife, Wynda Astutik, whose unwavering support served as a pillar throughout the research journey, inspiring the name WyNDA. Special thanks are extended to colleagues Erlend Coates, Øystein Bjelland, and Robin T. Bye for their invaluable contributions that significantly enriched this paper.

Data availability

No data was used for the research described in the article.

References

  • 1.van den Bosch P.P.J., van der Klauw A.C. Taylor & Francis; 2016. Modeling, Identification and Simulation of Dynamical Systems. [Google Scholar]
  • 2.Nelles O. Nonlinear System Identification. Springer; 2020. Nonlinear dynamic system identification. [Google Scholar]
  • 3.Grune L., Pannek J. Springer; 2017. Nonlinear Model Predictive Control. [Google Scholar]
  • 4.Hasan A., Widyotriatmo A., Fagerhaug E., Osen O. 2023 IEEE Conference on Control Technology and Applications (CCTA) 2023. Predictive digital twins for autonomous ships; pp. 1128–1133. [Google Scholar]
  • 5.Hasan A., Widyotriatmo A., Fagerhaug E., Osen O. Predictive digital twins for autonomous surface vessels. Ocean Eng. 2023;288:116046. [Google Scholar]
  • 6.Bhagavathi R., Kufoalor D.K.M., Hasan A. Digital twin-driven fault diagnosis for autonomous surface vehicles. IEEE Access. 2023;11:41096–41104. [Google Scholar]
  • 7.Brunton S.L., Kutz J.N. Cambridge University Press; 2019. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control. [Google Scholar]
  • 8.Sideris T.C. Springer; 2013. Ordinary Differential Equations and Dynamical Systems. [Google Scholar]
  • 9.Antonova M., Mykola A. 2020 IEEE 7th International Conference on Energy Smart Systems (ESS) 2020. Mathematical model of electromechanical compression system; pp. 306–309. [Google Scholar]
  • 10.Buchalik R., Nowak G., Nowak I. Mathematical model of a thermoelectric system based on steady- and rapid-state measurements. Appl. Energy. 2021;293:116943. [Google Scholar]
  • 11.Liu Y., Qin Z., Chu F. Nonlinear forced vibrations of functionally graded piezoelectric cylindrical shells under electric-thermo-mechanical loads. Int. J. Mech. Sci. 2021;201:106474. [Google Scholar]
  • 12.Du J., Long Y., Yuan S., He J., Yang K., Li S. 2019 IEEE International Electric Machines & Drives Conference (IEMDC) 2019. Mathematical model for a novel electromechanical actuator based on lagrange-maxwell equation; pp. 1929–1936. [Google Scholar]
  • 13.How D.N.T., Hannan M.A., Hossain Lipu M.S., Ker P.J. State of charge estimation for lithium-ion batteries using model-based and data-driven methods: a review. IEEE Access. 2019;7:136116–136136. [Google Scholar]
  • 14.Kuncara I.A., Widyotriatmo A., Hasan A. 2023 8th International Conference on Instrumentation, Control, and Automation (ICA) 2023. A nonlinear state estimation framework for field mobile robots; pp. 137–142. [Google Scholar]
  • 15.Raissi M., Perdikaris P., Karniadakis G.E. Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019;378:686–707. [Google Scholar]
  • 16.Xu X., Jia Y., Xu Y., Xu Z., Chai S., Lai C.S. A multi-agent reinforcement learning-based data-driven method for home energy management. IEEE Trans. Smart Grid. 2020;11(4):3201–3211. [Google Scholar]
  • 17.Ibrahim M.S., Dong W., Yang Q. Machine learning driven smart electric power systems: current trends and new perspectives. Appl. Energy. 2020;272:115237. [Google Scholar]
  • 18.Zhang Z., Zhang D., Qiu R.C. Deep reinforcement learning for power system applications: an overview. CSEE J. Power Energy Syst. 2020;6(1):213–225. [Google Scholar]
  • 19.Kirchgässner W., Wallscheid O., Böcker J. Estimating electric motor temperatures with deep residual machine learning. IEEE Trans. Power Electron. 2021;36(7):7480–7488. [Google Scholar]
  • 20.Wang S., Duan J., Shi D., Xu C., Li H., Diao R., Wang Z. A data-driven multi-agent autonomous voltage control framework using deep reinforcement learning. IEEE Trans. Power Syst. 2020;35(6):4644–4654. [Google Scholar]
  • 21.Haghshenas A., Hasan A., Osen O., Mikalsen E.T. Predictive digital twin for offshore wind farms. Energy Inf. 2023;6:1–26. [Google Scholar]
  • 22.Diget E.L., Hasan A., Manoonpong P. 2022 American Control Conference (ACC) 2022. Fault-tolerant model predictive control for multirotor UAVs; pp. 4305–4310. [Google Scholar]
  • 23.Rudy S.H., Brunton S.L., Proctor J.L., Kutz J.N. Data-driven discovery of partial differential equations. Sci. Adv. 2017;3:1–6. doi: 10.1126/sciadv.1602614. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Zhang J., Ma W. Data-driven discovery of governing equations for fluid dynamics based on molecular simulation. J. Fluid Mech. 2020;892:A5. [Google Scholar]
  • 25.Wentz J., Doostan A. Derivative-based SINDy (DSINDy): addressing the challenge of discovering governing equations from noisy data. Comput. Methods Appl. Mech. Eng. 2023;413:116096. [Google Scholar]
  • 26.S. Atkinson, W. Subber, L. Wang, G. Khan, P. Hawi, R. Ghanem, Data-driven discovery of free-form governing differential equations, 2019. arXiv:1910.05117.
  • 27.Delahunt C.B., Kutz J.N. A toolkit for data-driven discovery of governing equations in high-noise regimes. IEEE Access. 2022;10:31210–31234. [Google Scholar]
  • 28.Brunton S.L., Proctor J.L., Kutz J.N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proc. Natl. Acad. Sci. 2016;113:3932–3937. doi: 10.1073/pnas.1517384113. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.K. Egan, W. Li, R. Carvalho, Automatically identifying ordinary differential equations from data, 2023. arXiv:2304.11182.
  • 30.T̨iclea A., Besançon G. Adaptive observer design for discrete time LTV systems. Int. J. Control. 2016;89(12):2385–2395. [Google Scholar]
  • 31.Zhang Q. Adaptive observer for multiple-input-multiple-output (MIMO) linear time-varying systems. IEEE Trans. Autom. Control. 2002;47(3):525–529. [Google Scholar]
  • 32.Guyader A., Zhang Q. Adaptive observer for discrete time linear time varying systems. IFAC Proc. Vol. 2003;36(16):1705–1710. [Google Scholar]
  • 33.Ţiclea A., Besançon G. Exponential forgetting factor observer in discrete time. Syst. Control Lett. 2013;62(9):756–763. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

No data was used for the research described in the article.


Articles from MethodsX are provided here courtesy of Elsevier

RESOURCES