Preprint
Article

Identification of High-Order Nonlinear Coupled Systems Using a Data-Driven Approach

Altmetrics

Downloads

106

Views

36

Comments

0

A peer-reviewed article of this preprint also exists.

Submitted:

08 March 2024

Posted:

08 March 2024

You are already at the latest version

Alerts
Abstract
Most works related to the identification of mathematical nonlinear systems make one suppose that such approaches can always be directly applied to any nonlinear system. This misconception produces a great deal of discouragement when the obtained results are not the expected ones. Thus, the current work hypothesizes that the most information one has about the mathematical structure of the model, the most precise the identification result should be. Therefore, a variant of the Sparse Identification of Nonlinear Dynamics (SINDY) approach is presented to obtain the full mathematical nonlinear model of a high-order system with coupled dynamics, namely, a commercial quadcopter. Furthermore, due to its high sensitivity to inputs, a control system is devised using the identified model to stabilize the quadcopter. This illustrates the effectiveness of the proposed identification method.
Keywords: 
Subject: Engineering  -   Control and Systems Engineering

1. Introduction

1.1. Motivation

Understanding the differential equations that govern the dynamics of nonlinear systems in real-time is always considered advantageous in scientific research. However, the availability of accurate mathematical models for such systems is not always guaranteed. Despite the recognized benefits of having access to these equations, practical limitations and inherent complexities often prevent the simple formulation of mathematical representations for real-world nonlinear systems. Consequently, many authors have focused their efforts on the practical identification of mathematical models for nonlinear systems [1].
On the other hand, the continuously growing capabilities of computing and data acquisition equipment have produced an explosion of data-driven models, which in many cases, are more appealing than those obtained by analytical modelling approaches [2].
Ahead of the data-driven modelling techniques is the Deep Learning (DL) [3,4]. DL has not only shown notable performance in image classification, but is also very effective in predicting the future states of dynamical systems. However, its main drawback is the difficulty relating the DL models to the governing equations of the physical systems. A different data-driven approach is based on symbolic regression to obtain the structure of a nonlinear system from data [5]. Although this method identifies very well the interpretable physical models, its main drawback is the computational cost of working with a symbolic regressor, and it grows significantly as the dimension of the problem does. A genetic algorithm, considering the transition matrix in its fitness function, has been successfully applied to identify the physics-based longitudinal dynamics of an aircraft. However, its main drawback is that it is an iterative process strongly dependent on the size of the search region for parameters [6].
In [7], the problem has been restated as sparse identification combined with the Levenberg-Marquardt (LM) algorithm. Tibshirani first introduced the main idea for robust identification, which combines least squares minimization and discrimination through the L 1 norm, and named it Shrinkage Lasso Selection [8]. However, the problem has been simplified even more by the Sparse Identification of Nonlinear Dynamics (SINDY) which combines sparse regression with the advantages of the verified efficacy of the Least Squares (LS) approach [9,10].
Brunton et al. [9] proposed a method called Sparse Identification of Non-Linear Dynamics in 2016, which transforms a nonlinear model of the form x ˙ = f ( x , u ) into an equivalent linear model of the form X ˙ = Θ ( X , U ) Ξ . This simplifies the nonlinear identification problem to solving a linear system with more equations than unknowns, which is a classical problem in linear algebra, namely, A x = b . This method offers an elegant approach to identify nonlinear dynamics from data. The method can handle complex systems with perfect data from ideal experiments, as demonstrated in [9]. However, for simulations with imperfect data, the method requires some modifications, which are explained in [9].
The robustness analysis of the method with respect to the choice of “hyperparameters” is presented in [11]. The hyperparameters are related to the Lasso type optimization, which is a classical optimization problem that uses the L 1 norm instead of the L 2 norm, as described in [12]. The extension of the method to systems with control inputs is discussed in [9]. SINDY has been applied during the identification of the models of complex systems as chaotic attractors, even in the presence of control signals, in a very successful way [13].
However, the original SINDY algorithm proves inadequate for high-order nonlinear systems with coupled dynamics, even when the structure of the mathematical model is known. The limitation arises from the reliance on the least squares approach, favoring the selection of large values over small ones. Consequently, the SINDY algorithm may exclude functions with small coefficients in nonlinear models where coefficients vary significantly in magnitude. This can result in inaccurate or incomplete models that fail to capture the true dynamics of the system. For instance, in a recent work [14], the authors proposed a modification of the SINDY algorithm aiming to outperform the classical SINDY approach in constructing a system of ordinary differential equations from stochastic simulations.
Thus, despite the simplicity of SINDY, it requires constant modifications and improvements tailored to each new application. As a result, customized variations of the SINDY algorithm have begun to emerge in recent literature [15,16,17,18,19].

1.2. Contribution

With this in mind, supposing that the structure of a high-order nonlinear system with coupled dynamics is known, the contribution of this work is to provide a simple modification to SINDY, such that the identification of the missing coefficients is achieved [20,21]. Then, a comparison between the performance of the original algorithm and modified one is carried out when both are applied to identify the mathematical model of a commercial quadcopter.

1.3. Manuscript Organization

The rest of this paper is organized as follows: In Section 2, the mathematical and numerical tools considered throughout the study are briefly reviewed. In Section 3, the classical SINDY algorithm is employed to identify the high-order nonlinear system with coupled dynamics. In Section 4, the modified algorithm is introduced and employed for the identification of the same system. In Section 5 some important points are discussed. Finally, Section 6 presents the concluding remarks.

1.4. Notation and Definitions

A 
Coefficient matrix for the least squares problem
b 
Vector of observed or measured values for the least squares problem
x 
Vector of unknowns for the least squares problem
x ^  
Estimate or optimal solution for the least squares problem
X 
Matrix whose columns are the states of the system, and the rows are the values of these states at different sampling instants
X ˙  
Matrix whose columns are the first-time derivatives of the states of the system, and the rows are the values of such derivatives at different sampling instants
U 
Matrix whose columns are the input signals of the system, and the rows are the values of such inputs at different sampling instants
Θ ( X , U )  
Matrix whose columns constitute the library of candidate functions, dependent on the states and/or inputs of the nonlinear system. The rows represent the values of these functions at various sampling instants.
Ξ  
Sparse coefficient matrix that characterizes the importance or contribution of each term in the library of candidate functions (represented by Θ ( X , U ) ) to the dynamics of the system
Ξ 0  
Template for Ξ , representing the structure of the nonlinear systems

2. Mathematical Tools

2.1. LS

The least squares method was introduced by Andrien-Marie Legendre in 1805 [22]. Roughly speaking, the least squares solution for the problem A x = b , where A R m × n , x R n , and b R m , is a vector x ^ such that dist ( b , A x ^ ) dist ( b , A x ) , for all other vectors x R n , where dist ( b , A x ^ ) = b A x ^ is the square root of the sum of the squares of the elements of the vector b A x ^ . Therefore, a least square solution minimizes the sum of the squares of the errors between b and A x ^ , hence its name [23].
When the columns of A are linearly independent, then le least square solution of
A x = b
is unique and it is given by [23]:
x ^ = ( A T A ) 1 A T b .
Equivalently, if the n columns of A, namely, a 1 , a 2 , , a n , are orthogonal, then the least squares solution of (1) is [23]:
x ^ = a 1 · b a 1 · a 1 , a 2 · b a 2 · a 2 , , a n · b a n · a n .
Moreover, the Q R factorization can be applied to the matrix A and the Gram-Schmidt algorithm can be used to obtain the orthogonal Q and upper triangular R matrices, which can be used to obtain the least squares solution of (1). For a thorough analysis of the least squares method, the Q R factorization and the Gram-Schmidt algorithm; the reader can refer to [23,24].

2.2. SINDY

In 2016, Brunton et al. [9] introduced the name of the Sparse Identification of Nonlinear Dynamics (SINDY), which consists in the simple idea of solving the classical linear problem A x = b ; but transforming it into
X ˙ = Θ ( X , U ) Ξ ,
where the nonlinear model to be estimated has the form x ˙ = f ( x , u ) , with x R n and u R p . In this formulation, X R m × n , where the i-th column of X corresponds to a vector formed by the m samples of the i-th state of x, the same applies for X ˙ , and U R m × p , where the i-th column of U corresponds to a vector formed by the m samples of the i-th control input of u. On the other hand, Θ ( X , U ) R m × q , where each column of Θ ( X , U ) is a candidate function depending on x and/or u, which is evaluated at each one of the m sample instants, and the columns of Ξ R q × n are sparse vectors of coefficients.
The goal is to find the Ξ by means of least squares such that: the residual error is minimized. The Ξ is a matrix of coefficients that determine the active terms in the nonlinear model x ˙ = f ( x , u ) , which can be approximated by a linear combination of candidate functions depending on x and/or u.The pseudocode for SINDy is presented below in Algorithm 1 [9,12].
Algorithm 1 SINDY algorithm
Require: Data matrix X, U and derivative matrix X ˙
Ensure: Sparse model x ˙ = Ξ Θ ( X , U )
1:
Construct a library of candidate functions Θ ( X , U )
2:
Solve the sparse regression problem X ˙ = Θ ( X , U ) Ξ using a sparsity-promoting technique (e.g. LASSO)
3:
Identify the active terms and coefficients in Ξ that form the model
The following is a verbal description of the Algorithm 1:
1.
Given a series of snapshots x R n , u R p and the corresponding time derivatives x ˙ of a dynamical system x ˙ = f ( x , u ) , arrange them into matrices X , X ˙ R m × n , and U R m × p where m is the number of samples, n is the dimension of the state vector, and p is the dimension of the input vector.
2.
Construct a library of nonlinear candidate functions Θ ( X , U ) of size m × q , where q is the number of candidate functions. These functions can be constant, polynomial, trigonometric, or more exotic functions of the x and u.
3.
Solve the sparse regression problem X ˙ = Θ ( X , U ) Ξ , where Ξ is a matrix of coefficients of size q × n , by minimizing the objective function
min Ξ X ˙ Θ ( X , U ) Ξ F 2 + λ Ξ 1 ,
where · F is the Frobenius norm, · 1 is the l 1 norm, and λ is a regularization parameter that controls the sparsity of Ξ .
4.
Identify the sparse set of active terms in Θ ( X , U ) by selecting the rows of Ξ that have nonzero entries. These terms form the governing equations of the dynamical system:
x ˙ = f ( x , u ) = i = 1 q ξ i θ i ( x , u ) ,
where ξ i is the i-th row of Ξ and θ i ( x , u ) is the i-th candidate function.

2.3. Mathematical Model of a Quadcopter

A quadcopter or quadrotor is a type of unmanned aerial vehicle (UAV) that has four rotors mounted on a rigid frame. The rotors can generate both lift and torque, which are used to control the position and orientation of the quadrotor. The mathematical model of a quadrotor can be derived using Newtonian and Euler’s laws and applying basic principles of physics. This derivation gives the equations that govern the motion of a quadrotor, both concerning the body frame and the inertial frame.
The configuration space of a quadcopter is defined by six variables: x, y, z, ϕ , θ , and ψ , where ( x , y , z ) are the coordinates of the center of mass in an inertial frame, and ( ϕ , θ , ψ ) are the Euler angles that represent the orientation of the body frame with respect to the inertial frame. The actuation space of a quadrotor is defined by four variables: u 1 , u 2 , u 3 , and u 4 , whrere u i is the angular velocity of the i-th rotor. The schematics of this aircraft is given in Figure 1. In aeronautics, the convention of measuring elevation or altitude through the negative part of the Z-axis is often a matter of mathematical and geometric consistency. The convention is motivated by the right-hand coordinate system commonly used in aviation and engineering: the X-axis points forward (along the longitudinal axis of the aircraft), the Y-axis points to the right (along the lateral axis), and the Z-axis points downward (along the vertical axis) [25].
The dynamics of a quadcopter can be expressed as [26,27,28,29]:
x ˙ = f ( x , u ) ,
where x = x 1 x 12 T , u = [ u 1 u 4 ] T , and
x ˙ 1 = x 7 ,
x ˙ 2 = x 8 ,
x ˙ 3 = x 9 ,
x ˙ 4 = x 12 ,
x ˙ 5 = x 11 ,
x ˙ 6 = x 10 ,
x ˙ 7 = β 1 m sin ( x 4 ) sin ( x 6 ) + cos ( x 4 ) cos ( x 6 ) sin ( x 5 ) ,
x ˙ 8 = β 1 m cos ( x 4 ) sin ( x 6 ) cos ( x 6 ) sin ( x 4 ) sin ( x 5 ) ,
x ˙ 9 = β 1 m cos ( x 5 ) cos ( x 6 ) + 9.81 ,
x ˙ 10 = 1 I x x β 2 + ( I y y I z z ) x 11 x 12 ,
x ˙ 11 = 1 I y y β 3 + ( I z z I x x ) x 10 x 12 ,
x ˙ 12 = 1 I z z β 4 + ( I x x I y y ) x 10 x 11 ,
with β 1 as the force responsible for throttle movement, β 2 as the torque responsible for roll movement, β 3 as the torque responsible for pitch movement, and β 4 as the torque responsible for yaw movement, given by
β 1 = b ( u 1 2 + u 2 2 + u 3 2 + u 4 2 ) ,
β 2 = b ( u 4 2 + u 3 2 u 1 2 u 2 2 ) ,
β 3 = b ( u 2 2 + u 3 2 u 1 2 u 4 2 ) ,
β 4 = d ( u 1 2 + u 3 2 u 2 2 u 4 2 ) , and
Ω = u 1 u 2 + u 3 u 4 .
Notice that u 1 , u 2 , u 3 and u 4 are the frequencies of rotors 1, 2, 3 and 4, respectively, i.e., they are the implicit control inputs and they are given in r a d / s . The variables x 1 , x 2 and x 3 represent the linear displacements along the earth fixed axes X e , Y e and Z e , respectively, and they are in meters. On the other hand, the variables x 4 , x 5 and x 6 describe the angular displacements around the body axes Z b , Y b and X b , respectively, and they are in radians. The remaining state variables describe the linear and angular velocities, and they can be easily deduced from (7)-(24).

2.4. Simulink Support Package for Parrot Minidrones

The Simulink Support Package for Parrot Minidrones is a toolbox that enables users to design and deploy flight control algorithms for Parrot minidrones using Simulink. Users can wirelessly connect to the minidrones via Bluetooth and access their onboard sensors and camera. Users can also use additional tools such as Aerospace Blockset and Simulink Coder to enhance their simulations and code generation. The toolbox also includes an example that shows how to model and simulate the 6-DOF equations of motion for the minidrones [30,31]. In Figure 2, the physical quadcopter simulated by the Simulink Support Package for Parrot Minidrones is depicted.
This package includes a Controller Project template designed as a framework for crafting a personalized controller or adapting it to specific needs. The template integrates a robust plant model simulation for both the Parrot Rolling Spider and Parrot Mambo drones. This simulation streamlines the evaluation of model outcomes before deployment, empowering users to scrutinize and refine their controller designs prior to applying them to the physical hardware. The template supports the modeling of six degrees of freedom (6-DOF) equations of motion, facilitating the simulation of aircraft behavior under diverse flight and environmental conditions. Figure 3 depicts the VRML environment employed by the Simulink Package for Parrot Minidrones.
In the context of this study, the Simulink package’s simulation results are utilized to gather data for identifying the mathematical model of the quadcopter.

3. Identification of a High-Order Nonlinear Systems with Coupled Dynamics Using the Classical SINDY Algorithm

In this section, the Algorithm 1 is used to obtain the mathematical model of a quadcopter from the data generated by the Simulink Support Package for Parrot Minidrones.
For the sake of simplicity, throughout the remainder of this study, it is assumed that the Rolling Spider MiniDrone depicted in Figure 2 can be effectively modeled using equations (7)-(19). In other words, the drone’s controls are considered to be β 1 , β 2 , β 3 , and β 4 , instead of u 1 , u 2 , u 3 , and u 4 . Adopting this perspective streamlines the required library of functions for SYNDY, specifically the matrix Θ ( X , U ) . Despite this simplification, the resulting nonlinear system maintains sufficient complexity to reveal the limitations of the conventional SINDY approach. This underscores the advantages of the proposed modification, particularly in the identification of high-order nonlinear systems with coupled dynamics.
The Simulink Support Package for Parrot Minidrones is employed to simulate a 10-second flight sequence of the drone, with the samplig time T = 0.005 s . Throughout this duration, the drone undergoes takeoff and ascends to an altitude of 1.5 meters. Meanwhile, the controls β 1 , β 2 , β 3 , and β 4 are subtly perturbed to excite all four independent degrees of freedom of the drone. These inputs are shown in Figure 4.
During this simulated flight, the vectors x 1 , , x 12 , x ˙ 1 , , x ˙ 12 , β 1 , , β 4 R m are formed by reading the linear and angular displacements, linear and angular velocities, linear and angular accelerations, and controls. Clearly, m = 2001 .
So, to correctly formulate equation (4), consider that the matrix X ˙ is:
X ˙ = x ˙ 1 , , x ˙ 12 ,
while the matrix Θ ( X , U ) is
Θ ( X , U ) = f 1 f 2 f 16 ,
with f 1 = 1 , f 2 = x 7 , f 3 = x 8 , f 4 = x 9 , f 5 = x 10 , f 6 = x 11 , f 7 = x 12 , f 8 = β 1 · ( sin ( x 4 ) · sin ( x 6 ) + cos ( x 4 ) · cos ( x 6 ) · sin ( x 5 ) ) , f 9 = β 1 · ( cos ( x 4 ) · sin ( x 6 ) cos ( x 6 ) · sin ( x 4 ) · sin ( x 5 ) ) , f 10 = β 1 · cos ( x 5 ) · cos ( x 6 ) , f 11 = β 2 , f 12 = x 11 · x 12 , f 13 = β 3 , f 14 = x 10 · x 12 , f 15 = β 4 , f 16 = x 10 · x 11 , where as mentioned above, x ˙ 1 , , x ˙ 12 , f 1 , , f 16 R 2001 . Thus, the unknown matrix Ξ has a dimension of 16 × 12 .
Now, the MATLAB code for the classical SINDY algorithm, with T h e t a = Θ ( X , U ) , d X d t = X ˙ , l a m b d a = 1 × 10 3 , and n = 12 , is:
Listing 1: Matlab function for the classical SINDY
Preprints 100871 i001
The matrix Ξ produced is:
Ξ = 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.01 0.18 4.8 1.1 1.1 0.076 0.21 0.2 0.13 1.2 5.6 0.053 9.1 e 3 0.018 1.5 e 3 0.12 2.4 0.095 0.051 2.3 e 3 0.096 0.63 1.3 0.21 0.034 0.14 0.093 0.67 1.2 0.4 0.12 0.071 0.11 0.12 3.8 0.12 0.072 0.064 0.18 1.7 0.14 1.1 15.0 1.3 0.1 8.3 8.5 2.0 0.066 14.0 1.0 5.5 1.6 1.1 0.015 0.27 7.5 2.0 2.9 0.11 1.1 0.52 5.7 8.2 e + 3 90.0 6.7 0.068 0.027 0.054 2.5 6.2 0.46 0.77 1.1 6.4 2.0 5.9 e + 3 84.0 0.033 0.13 0.041 4.5 9.6 0.48 2.4 2.3 6.4 30.0 39.0 4.1 e + 3 0.048 0.069 0.073 1.7 2.2 0.2
Notice that, in this case, the obtained identification is not sparse because every function considered in Θ ( X , U ) appears from the seventh to the twelfth equation in the identified model, even when the parameter lambda is not very small, i.e., 1 × 10 3 . But, even if one wants to suppose that the identified model is a possible representation of the nonlinear dynamics of the drone, the main drawback arises when it is realized that the obtained model is non-controllable, which must be incorrect, as the drone is, in fact, a controllable system [32].
This example demonstrates that, in general, it is not sufficient to know the functions appearing in the model to be identified for SINDY to yield correct results. The following section addresses and mitigates this drawback.

4. Identification of a high-order nonlinear systems with coupled dynamics through the modified SINDY algorithm

4.1. GenesisXi algorithm

At this point, it is obvious that, in addition to knowing the functions that should appear in the model to be identified, it is important to know in which differential equation each of them should appear. This transforms the task of identifying the nonlinear model into a coefficient identification problem, which proves highly advantageous for a wide range of real-world nonlinear problems.
Therefore, the modification to the classical SINDY algorithm involves incorporating this additional information in a manner that the obtained result approaches the known models, specifically in this case, the models of the quadrotors.
To achieve this objective, it is necessary to formulate an initial matrix Ξ 0 wherein the positions of all candidate functions contained in Θ ( X , U ) within the differential equations of the mathematical model are defined. To automate this process, the Algorithm 2 for obtaining the aforementioned matrix Ξ 0 is proposed.
Algorithm 2 GenesisXi algorithm
Require: Data vector Θ L and n
Ensure: Initial matrix Ξ 0
1:
Ξ 0 0 [ q , n ]
2:
for k = 1 toqdo
3:
     Ξ 0 ( k , Θ L ( k ) ) 1
4:
end for
The following is the description of the Algorithm 2:
1.
Given the vector Θ L R q , whose elements contain the number of the differential equation where the corresponding candidate function should be located, and n, which is the dimension of the nonlinear system to be estimated, then the matrix Ξ 0 R q × n is set to zero. For this case, Θ L = [ 9 1 2 3 6 5 4 7 8 9 10 10 11 11 12 12 ] .
2.
The vector Θ L is traversed from its first element to the last using the index k, simultaneously placing a "1" at the position ( k , Θ L ( k ) ) in the matrix Ξ 0 .
The MATLAB code corresponding to Algorithm 2, with T h e t a _ L = Θ L , is given in Listing 2.
Listing 2: MATLAB function for the GenesisXi algorithm
Preprints 100871 i002
Thus, after applying Algorithm 2, and in accordance with (7)-(19), the resulting matrix Ξ 0 is:
Ξ 0 = 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 .
Notice that the columns of Ξ 0 represent the differential equations in the nonlinear model, while the rows of Ξ 0 represent the candidate functions included in Θ ( X , U ) . Thus, the matrix (28) indicates that f 1 appears in the ninth differential equation, f 2 appears only in the second differential equation, and so forth.

4.2. Modified SINDY Algorithm

Now, the location of the candidate functions in the matrix Ξ 0 is passed as a parameter to the modified SINDY function, as illustrated in the MATLAB code presented in Listing 3.
Listing 3: MATLAB function with modifications to classical SINDY
Preprints 100871 i003
Roughly speaking, the modifications consist of removing the functions that wrongly appear in the differential equations after the first guess of the matrix Ξ in line 4. To achieve this, the MATLAB operator " . * " is applied to multiply each element of the matrix Ξ obtained in line 4 by the corresponding element of the matrix Ξ 0 . In other words, Ξ 0 is used as a template for the desired matrix Ξ . The remainder of the program follows exactly the structure of the classical SINDY function presented in Listing 1.
The matrix Ξ obtained by applying the MATLAB function provided in Listing 3 to the data described in the previous section is:
Ξ = 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.725 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14.32 0 0 0 0 0 0 14.29 0 0 0 0 0 0 7.302 0 0 0 0 0 0 8169.0 0 0 0 0 0 2.442 0 0 0 0 0 0 5939 0 0 0 0 0 7.961 0 0 0 0 0 0 4087 0 0 0 0 0 0.09223 .
This matrix corresponds to the sparse identification of the high-order nonlinear system with coupled dynamics, specifically, the drone. The identified nonlinear system is given by:
x ˙ 1 = x 7
x ˙ 2 = x 8
x ˙ 3 = x 9
x ˙ 4 = x 12
x ˙ 5 = x 11
x ˙ 6 = x 10
x ˙ 7 = 14.32 β 1 ( sin ( x 4 ) sin ( x 6 ) + cos ( x 4 ) cos ( x 6 ) s i n ( x 5 ) )
x ˙ 8 = 14.29 β 1 ( cos ( x 4 ) sin ( x 6 ) cos ( x 6 ) sin ( x 4 ) sin ( x 5 ) )
x ˙ 9 = 7.302 β 1 cos ( x 5 ) cos ( x 6 ) + 4.725
x ˙ 10 = 8169 β 2 2.442 x 11 x 12
x ˙ 11 = 5939 β 3 7.961 x 10 x 12
x ˙ 12 = 4087.0 β 4 + 0.09223 x 10 x 11 .
Notice that the gravity value in equation (38) is calculated as 4.725, which is 2.076 times smaller than 9.81. This implies that the entire equation is scaled by 2 . 076 1 . However, as per equations (14)-(16), when the identified model is analyzed at the equilibrium, i.e., when all linear and angular displacements, velocities, and accelerations are zero, and the mass m is computed using equations (36), (37), and (38) multiplied by 2.076, it results in m = 0.0698 , m = 0.0699 , and m = 0.0659 , respectively, which are very close to the nominal value found in literature of m = 0.068 [30,31].
Now, based on these equations, a linear stabilizer is designed. To achieve this, equations (30)-(41) are linearized at the equilibrium x e q = [ 0 0 0 0 0 0 0 0 0 0 0 0 ] T , resulting in:
x ˙ = A x + B u ,
with
A = 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1.0 0 0 0 0 0 0 9.27 0 0 0 0 0 0 0 0 0 0 0 0 9.247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ,
and
B = 0 0 0 0 0 0 0 0 7.302 0 0 0 0 0 0 0 0 0 0 0 0 8169 0 0 0 0 0 0 0 0 0 0 0 0 5939 0 0 0 0 0 0 0 0 0 0 0 0 4087 T .
The stabilizer u = K x is obtained using the Linear Quadratic Regulator (LQR) approach, which combines the control energy and the state deviations in the cost function of the form:
J = 0 x T Q x + u T R u d t ,
where Q and R are positive definite matrices determining the compromise between minimizing the state deviations and the control energy [32]. In this case, Q = I [ 12 × 12 ] , and R = 1 × 10 6 · I [ 4 × 4 ] . Thus, with matrices A, B, Q, and R as above, the gain K is computed using the MATLAB function l q r , resulting in:
K = 0 0 0.001 0 0 0 0 0.001 0 0 0 0.006795 0.001 0 0 0 0.007291 0 0 0 0 0.001 0 0 0 0 0.01658 0 0 0 0 0.001571 0 0.001632 0 0 0.001604 0 0 0 0.001859 0 0 0 0 0 0 0.00122
Then, the stabilizer u = K x is applied to the nonlinear model within the Simulink Support Package for Parrot Minidrones to assess the effectiveness of the identified model. In this example, the quadcopter reaches an altitude of 1m using the linear stabilizer. The numerical results are presented in Figure 5 and Figure 6. Figure 5 illustrates the drone’s response to the linear stabilizer, while Figure 6 displays the corresponding input signals.
Please note that the goal of this work is not to design sophisticated controllers aiming for complex behaviors in the drone. Instead, the primary contribution of this work is to introduce an alternative method for obtaining the mathematical model of high-order nonlinear system with coupled dynamics based on real-time measured data.

5. Discussion

1
In the specific case study, the outcomes achieved through the classical SINDY algorithm do not align with physics-based identification. Moreover, they do not qualify as sparse identification, as all candidate functions are present in the matrix Ξ .
2
Based on the knowledge of the structure of the complex system to be identified, a more precise algorithm has been introduced without a significant increase in computational cost.
3
Although the identified model appears to have significant differences from the related model found in the literature, it enables the design of a controller capable of stabilizing the original high-order nonlinear system with coupled dynamics. This, in turn, demonstrates its notable approximation degree.
4
The primary drawback of the proposed approach is that the identification problem transforms into a coefficient identification task. Nevertheless, in many real-world applications, this outcome may still be appealing because, in numerous cases, it is impossible to precisely determine the coefficients of a specific system, even when the structure of its mathematical model is available.

6. Conclusions

This work introduces a modification to the classical SINDY algorithm, enabling the identification of the mathematical model for high-order nonlinear systems with coupled dynamics. The computational cost of the modification is negligible compared to the advantages gained. However, a drawback is the requirement to know the structure of the nonlinear model to generate the template Ξ 0 for placing the nonlinear functions in the appropriate differential equations. The proposal was validated by applying a linear controller designed based on the identified model to the real system.

Author Contributions

Conceptualization, R. D. V.-S. and J. A. M.-C.; formal analysis, R. P.-G., R. D. V.-S., J. O. E.-A. and R. T.-H.; investigation, J. O. E.-A., R. T.-H. and J.A.M.-C.; methodology, J. O. E.-A., R. T.-H. and J.A.M.-C.; project administration, J. A. M.-C.; writing—original draft, J. A. M.-C.; writing— review and editing, R.D.V.-S. J.O.E.-A., R.P.-G., R.T.-H. and J. A. M.-C. All authors have read and approved this version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The authors gratefully acknowledge the partial support provided for this research by the Consejo Nacional de Humanidades Ciencias y Tecnologías (CONAHCYT) through the SNI (Sistema Nacional de Investigadores) scholarship. Additionally, the Instituto Politécnico Nacional contributed to this work through research projects 20230023 and 20240025, as well as by providing scholarships under the programs EDI (Estímulo al Desempeño de los Investigadores), COFAA (Comisión de Operación y Fomento de Actividades Académicas), and BEIFI (Beca de Estímulo Institucional de Formación de Investigadores).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Editorial. The rise of data-driven modelling. Nature Reviews Physics 2021, 3, 845–855. [Google Scholar] [CrossRef]
  2. Moghadas, S.M.; Jaberi-Douraki, M. Mathematical Modelling: A Graduate Textbook; John Wiley & Sons, Inc.: River Street, Hoboken, NJ, 2019. [Google Scholar]
  3. Montáns, F.J.; Chinesta, F.; Gómez-Bombarelli, R.; Kutz, J.N. Data-driven modeling and learning in science and engineering. Comptes Rendus Mécanique 2019, 347, 845–855. [Google Scholar] [CrossRef]
  4. Devo, A.; Mao, J.; Costante, G.; Loianno, G. Autonomous Single-Image Drone Exploration With Deep Reinforcement Learning and Mixed Reality. IEEE Robotics and Automation Letters 2022, 7, 5031–5038. [Google Scholar] [CrossRef]
  5. Schmidt, M.; Lipson, H. Distilling Free-Form Natural Laws from Experimental Data. Science 2009, 324, 81–85. [Google Scholar] [CrossRef] [PubMed]
  6. Peña-García, R.; Velázquez-Sánchez, R.; Gómez-Daza-Argumedo, C.; Escobedo-Alva, J.; Tapia-Herrera, R.; Meda-Campaña, J. Physics-Based Aircraft Dynamics Identification Using Genetic Algorithms. Aerospace 2024, 11, 1–18. [Google Scholar] [CrossRef]
  7. Haring, M.; Grøtli, E.I.; Riemer-Sørensen, S.; Seel, K.; Hanssen, K.G. A Levenberg-Marquardt Algorithm for Sparse Identification of Dynamical Systems. IEEE Transactions on Neural Networks and Learning Systems 2022, pp. 1–14. [CrossRef]
  8. Tibshirani, R. Regression Shrinkage and Selection Via the Lasso. Journal of the Royal Statistical Society: Series B (Methodological) 1996, 58, 267–288. [Google Scholar] [CrossRef]
  9. Brunton, S.L.; Proctor, J.L.; Kutz, J.N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the National Academy of Sciences - Applied Mathematics 2016, 113, 3932–3937. [Google Scholar] [CrossRef] [PubMed]
  10. Hansen, P.C.; Pereyra, V.; Scherer, G. Least Squares Data Fitting with Applications; Johns Hopkins University Press: Baltimore, 2013. [Google Scholar]
  11. Bertrand, Q.; Klopfenstein, Q.; Blondel, M.; Vaiter, S.; Gramfort, A.; Salmon, J. Implicit differentiation of Lasso-type models for hyperparameter optimization. In Proceedings of the Proceedings of the 37th International Conference on Machine Learning; III, H.D.; Singh, A., Eds., Virtual Event, 13–18 Jul 2020; Vol. 119, Proceedings of Machine Learning Research, pp. 810–821.
  12. Brunton, S.L.; Kutz, J.N. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control; Cambridge University Press: Cambridge, MA, 2019. [Google Scholar] [CrossRef]
  13. Brunton, S.L.; Proctor, J.L.; Kutz, J.N. Disco2vering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the National Academy os Sciences of the United States of America 2018, 113, 3932–3937. [Google Scholar] [CrossRef]
  14. Burrage, P.M.; Weerasinghe, H.N.; Burrage, K. Using a library of chemical reactions to fit systems of ordinary differential equations to agent-based models: a machine learning approach. Numerical Algorithms 2024. [Google Scholar] [CrossRef]
  15. Cao, R.; Lu, Y.; He, Z. System identification method based on interpretable machine learning for unknown aircraft dynamics. Aerospace Science and Technology 2022, 126, 107593. [Google Scholar] [CrossRef]
  16. Callaham, J.L.; Brunton, S.L.; Loiseau, J.C. On the role of nonlinear correlations in reduced-order modelling. Journal of Fluid Mechanics 2022, 938. [Google Scholar] [CrossRef]
  17. Sargsyan, S.; Brunton, S.L.; Kutz, J.N. Nonlinear model reduction for dynamical systems using sparse sensor locations from learned libraries. Phys. Rev. E 2015, 92, 033304. [Google Scholar] [CrossRef] [PubMed]
  18. Loiseau, J.C.; Brunton, S.L. Constrained sparse Galerkin regression. Journal of Fluid Mechanics 2018, 838, 42–67. [Google Scholar] [CrossRef]
  19. J.-C. Loiseau, S.L.B.; Noack, B.R., 9 From the POD-Galerkin method to sparse manifold models. In Volume 3 Applications; De Gruyter: Berlin, Boston, 2021; pp. 279–320. [CrossRef]
  20. Zavialov, V.; Lobok, O.; Mysiura, T.; Popova, N.; Chornyi, V.; Pohorilyi, T. Identification of unknown parameters of the dynamic model of mass transfer. Mathematical Modelling and Analysis 2023, 459–468. [Google Scholar] [CrossRef]
  21. Hritonenko, N.; Satsky, C.; Yatsenko, Y. Integral model of COVID-19 spread and mitigation in UK: identification of transmission rate. Mathematical Modelling and Analysis 2022, 573–589. [Google Scholar] [CrossRef]
  22. Dodge, Y. The Concise Encyclopedia of Statistics - Least-Squares Method; Springer: New York, NY, 2008. [Google Scholar] [CrossRef]
  23. Margalit, D.; Rabinoff, J. Interactive linear algebra; Georgia Institute of Technology: Atlanta, GA, 2019. [Google Scholar]
  24. D. C. Lay, S.R.L.; McDonald, J.J. Linear algebra and its applications; Pearson: New York, NY, 2016.
  25. Phillips, W.F. Mechanics of Flight; John Wiley and Sons, Inc.: New Jersey, 1980. [Google Scholar]
  26. Meda-Campaña, J.A.; Torres-Cruz, R.E.; Rojas-Ruiz, A.J.; Tapia-Herrera, R.; Hernández-Cortés, T.; Páramo-Carranza, L.A. The Output Regulation and the Kalman Filter as the Signal Generator. IEEE Access 2023, 11, 90825–90838. [Google Scholar] [CrossRef]
  27. Jennie, Y.; Fathurrahman, A.; Arifianto, O.; Sasongko, R. Mathematical modelling and simulation of a quadrotor unmanned aerial vehicle with automatic altitude and speed control. AIP Conference Proceedings 2020, 2226, 020011. [Google Scholar]
  28. Collazos Morales, C.A.; Ospina, J.P.; Sánchez, J.F.; Caro-Ruiz, C.; Grisales, V.H.; Ariza-Colpas, P.; De-la Hoz-Franco, E.; González, R.E. Mathematical Modelling and Identification of a Quadrotor. In Proceedings of the International Conference on Computational Science and Its Applications. Springer; 2020; pp. 261–275. [Google Scholar]
  29. Mohamed, A.; Elsayed, M.; Elshafei, M. A Comparative Study Between a Classical and Optimal Control of a Quadrotor UAV. arXiv 2020, arXiv:2009.13175 2020. [Google Scholar]
  30. MathWorks. Parrot Minidrones Support from Simulink, 2023. https://www.mathworks.com/hardware-support/parrot-minidrones.html.
  31. MathWorks. Simulink Support Package for Parrot Minidrones Documentation, 2023. https://www.mathworks.com/help/supportpkg/parrot/.
  32. Kailath, T. Linear Systems; Prentice–Hall, Inc.: New Jersey, 1980. [Google Scholar]
Figure 1. Body diagram of the quadcopter.
Figure 1. Body diagram of the quadcopter.
Preprints 100871 g001
Figure 2. Rolling Spider by Parrot Minidrones.
Figure 2. Rolling Spider by Parrot Minidrones.
Preprints 100871 g002
Figure 3. Capture of the VRML environment provided by the Simulink Support Package for Parrot Minidrones.
Figure 3. Capture of the VRML environment provided by the Simulink Support Package for Parrot Minidrones.
Preprints 100871 g003
Figure 4. Input signals used to excite the four degrees of freedom of the drone.
Figure 4. Input signals used to excite the four degrees of freedom of the drone.
Preprints 100871 g004
Figure 5. Quadcopter’s four degrees of freedom with the linear stabilizer.
Figure 5. Quadcopter’s four degrees of freedom with the linear stabilizer.
Preprints 100871 g005
Figure 6. Input signals produced by the linear stabilizer.
Figure 6. Input signals produced by the linear stabilizer.
Preprints 100871 g006
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated