Next Article in Journal
A Working Conditions Warning Method for Sucker Rod Wells Based on Temporal Sequence Prediction
Previous Article in Journal
CCFD: Efficient Credit Card Fraud Detection Using Meta-Heuristic Techniques and Machine Learning Algorithms
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Learning Transformed Dynamics for Efficient Control Purposes

by
Chady Ghnatios
1,*,
Joel Mouterde
2,
Jerome Tomezyk
2,
Joaquim Da Silva
2 and
Francisco Chinesta
1
1
PIMM Laboratory, Arts et Métiers Institute of Technology, 151 Boulevard de l’Hôpital, 75013 Paris, France
2
SKF Magnetic Mechatronic, 27950 Saint-Marcel, France
*
Author to whom correspondence should be addressed.
Mathematics 2024, 12(14), 2251; https://doi.org/10.3390/math12142251
Submission received: 15 June 2024 / Revised: 1 July 2024 / Accepted: 17 July 2024 / Published: 19 July 2024
(This article belongs to the Special Issue Machine Learning, Control and Optimization for Systems and Processes)

Abstract

:
Learning linear and nonlinear dynamical systems from available data is a timely topic in scientific machine learning. Learning must be performed while enforcing the numerical stability of the learned model, the existing knowledge within an informed or augmented setting, or by taking into account the multiscale dynamics—for both linear and nonlinear dynamics. However, when the final objective of such a learned dynamical system is to be used for control purposes, learning transformed dynamics can be advantageous. Therefore, many alternatives exists, and the present paper focuses on two of them: the first based on the discovery and use of the so-called flat control and the second one based on the use of the Koopman theory. The main contributions when addressing the first is the discovery of the flat output transformation by using an original neural framework. Moreover, when using the Koopman theory, this paper proposes an original procedure for learning parametric dynamics in the latent space, which is of particular interest in control-based engineering applications.

1. Introduction

Learning dynamics for a state’s x i time evolution, which is assumed measurable at different times t i , is a very timely topic in scientific machine learning. By assuming first-order dynamics, the learning problem reduces to learn the nonlinear function f ( x , t ; μ 1 , , μ P ) , where μ j , j = 1 , , P are a series of parameters involved in the dynamics.
For the sake of simplicity, in what follows, the discussion is limited to the case in which the dynamics reduce to their simplest expression f ( x ) . Two learning modalities can be envisaged: (i) the prediction of the state at time t n , with x n , assuming to be known the previous states x i and i < n ; and (ii) learning the dynamics themselves, that is, the nonlinear function f ( x ) responsible for the state time evolution.
Different strategies have been designed for leaning the state predictor; among them, the so-called recurrent Neural Network—rNN [1]—is nowadays widely employed. rNNs infer the present state x n from the state at time t n 1 and x n 1 . Sometimes, larger temporal memory is requested because of the addressed dynamics or because, even if the involved dynamics remain as first order, there are some hidden dynamics whose effects are captured from a time delay according to the Taken embedding theorem [2]. In those circumstances, alternative neural architectures were proposed that enabled larger memory, as LSTM (long short-term memory) [3] provides.
Learning the dynamics, that is, the nonlinear function f ( x ) , can be performed by using residual NN (ResNet) [4]. Assuming that the state time evolution is known, that is, x n , where 0 n N , the time derivative can be easily computed at each time step, x ˙ n , where 1 n N , and from it, we can approximate f ( x ) = x ˙ from an appropriate regression, such as a neural network:
f ˜ ( x ) = x ˙ ˜ = NN ( x ) ,
where the loss reads as follows:
L = n ( x ˜ n x n ) 2 .
When the learned dynamics f ˜ ( x ) are expected be used for time integration purposes, that is, to determine the state time evolution from a given initial condition x 0 , ensuring stability in the learned dynamics is compulsory. This question was deeply discussed in our former work [5], which proposed some alternatives for enforcing it during the learning process. However, alternative schemes were designed for improving the robustness of the learned dynamics to inherit the stability present in the hidden dynamics that produced the data serving to learn it. NeuralODE [6] represents a valuable route for succeeding with the referred issues. However, NeuralODEs present other difficulties related to the adjoint computation, as well as the difficulties of learning dynamics involving different characteristic time scales.
In many cases, dynamical systems are employed within control strategies. In such case, stability constraints are less critical, because, in general, the state is measured at each time step, and only its update must be performed. Here, the main issue is the deployment of control strategies operating on strongly nonlinear dynamical systems. Even if nonlinear control is nowadays largely employed—thus enabling robust and accurate operations—linear dynamics remain the best framework for control, because, in the linear case, a vast mathematical corpus exists and can be applied. Thus, traditionally, research endeavors focused on finding a state transformation enabling, in the transformed space, the use of the established and well-experienced techniques for control. Among the numerous existing technologies, this paper will focus on two of them: (i) flat control [7] and (ii) the Koopman theory [8] at the origin of the so-called dynamic mode decomposition—DMD [9].
The present paper proposes two original contributions—with each one related to each of the previously referred techniques:
  • Concerning flat control, this work proposes a procedure based on the use of a few fully connected neural networks, which are able to learn the so-called flat output while assuring the control performances. Even though the flat output computation has been addressed in several works [10,11], the present work aims at determining it from data measurements, without any prior knowledge of the dynamical system.
  • Concerning the Koopman theory, linear parametric latent dynamics have been learned while expressing them using tensor formats, which are of special interest when operating in multiparametric settings.
The present paper is purely methodological; however, it concerns dynamical systems populating the huge domain of science and engineering. For control purposes, one must first extract (learn) the model from which the measured data are derived and then use such data to control the system evolution by acting appropriately on the system inputs (controls).
In many cases, such as the one addressed in [12], accuracy and rapidity must comply with the extremely fine space and time scales (microsecond and micrometer). The present paper considers two well-established state-of-the-art methods, thereby empowering them through proposing some innovative tools contributing to their performances.
On the one hand, a novel method to discover the flat output is proposed to facilitate the use of the flat control procedures. On the other hand, the Koopman theory, which is nowadays well established and widely used, is here extended to parametric settings based on a tensorial decomposition in the latent space, thus constituting an appealing route to address parametric dynamical systems. Both technologies will be revisited before describing the main proposals that will be illustrated through a few numerical examples.

2. Flat Control

The stability of nonlinear dynamical systems has usually been addressed from the analysis of its associated tangent linearization by invoking the Poincare–Lyapunov theorem. For control purposes, the dynamical system also includes the so-called control variable, which is designed to keep the state trajectory as close as possible to the reference one. In the nonlinear case, it is usual to proceed first with a tangent linearization around the equilibrium states, identifying the Brunovsky variable enabling the state transformation, and finally with an appropriate pole positioning of the stabilizing loop to finally obtain local stability (around the equilibrium state). By changing the equilibrium state, the control will vary consequently. However, that procedure does not allow for the fast transitions that sometimes imply moving away from the equilibrium states. In that case, operating in nonlinear settings seems more valuable.
The so-called flat control enables operating directly on the nonlinear dynamical system, thus avoiding a tangent linearization. To describe the usual procedure in a clear manner, we consider a simple dynamical system, the one considered in Equation (3), and that will serve later to illustrate our main proposal: the discovery of a flat control by using an appropriate neural architecture.
Thus, we consider the problem:
x ˙ 1 = x 3 x 2 u x ˙ 2 = x 2 + u x ˙ 3 = x 2 x 1 + 2 x 2 u x 2
which includes the state x = ( x 1 , x 2 , x 3 ) T and the scalar control variable u. This problem can be written in a more compact form as x ˙ = f ( x , u ) .
Now, all the art reduces to find (assuming that it exists, because it could be not the case) the so-called flat output y (same dimension as the control variable, and in the present case both are scalar) in the following form:
y = G ( x , u , u ˙ , u ¨ , , u ( r ) ) ,
where the superscript ( r ) refers to the r derivative for r > 2 such that y and its successive time derivatives up to order q make it possible to express the state x and the control u. In general, with y 1 = y , its derivatives are noted as y 2 = y ˙ , y 3 = y ¨ , and so on.
Concerning the state, it should be expressed as
x = h ( y , y ˙ , y ¨ , , y ( q 1 ) ) ,
where the superscript ( q ) refers to the q derivative for q > 2 .
Concerning the control u, it should be expressible as
u = I ( y , y ˙ , y ¨ , , y ( q ) ) .
In the numerical example defined in Equation (3), it can be easily proven that
y y 1 = x 1 + x 2 2 / 2
defines a flat output, which can be used for the flat control. In particular, y does not depend on the control u and x = h ( y , y ˙ , y ¨ ) , while u = I ( y , y ˙ , y ¨ , y ( 3 ) ) .
Now, by using the previously introduced notation, y 1 = y , y 2 = y ˙ = y ˙ 1 , and y 3 = y ¨ = y ˙ 2 ; as well, by introducing v, v y ( 3 ) = y ˙ 3 , and we can write
y ˙ 1 y ˙ 2 y ˙ 3 = 0 1 0 0 0 1 0 0 0 y 1 y 2 y 3 + 0 0 v .
It can be noted that y 1 is extending the Brunovsky form to the nonlinear case.

2.1. Application in Control

The previously described theory can be applied to generate trajectories (open loop) or to follow them (closed loop).

2.1.1. Example of Trajectory Generation

By considering two equilibrium states x 0 and x T , with one representing the initial state and the other, the final state, being reachable at time t = T , the flat control theory allows for computing its associated transformed state y = ( y , y ˙ , y ¨ , y ( 3 ) ) , which is associated with x 0 and x T and noted by y 0 and y T , respectively. Then, a polynomial curve t [ 0 , T ] y ( t ) with the sufficient regularity (to ensure the derivatives’ continuity) that verifies the conditions given by y 0 and y T , as well as the extra constraint related to the existence of x ( y , y ˙ , y ¨ ) , could be considered as a potential trajectory.

2.1.2. Example of Path Tracking

In the present section, the existence of a reference trajectory of the dynamical system ( x r ( t ) , u r ( t ) ) is assumed, from which the transformed state ( y 1 r ( t ) , y 2 r ( t ) , y 3 r ( t ) , v ( t ) ) can be obtained by applying the flat control theory that has just been described. Now, v is assumed having the form
v = y ˙ 3 r + a 1 ( y 1 y 1 r ) + a 2 ( y 2 y 2 r ) + a 3 ( y 3 y 3 r ) ,
which allows for rewriting Equation (8) as
y ˙ 1 y ˙ 1 r y ˙ 2 y ˙ 2 r y ˙ 3 y ˙ 3 r = 0 1 0 0 0 1 a 1 a 2 a 3 y 1 y 1 r y 2 y 2 r y 3 y 3 r ,
where the characteristic polynomial related to the matrix representing the dynamical system results in λ 3 a 3 λ 2 a 2 λ a 1 . By choosing three eigenvalues with negative real components (ensuring the stability), one can deduce the value of the three coefficients a 1 , a 2 , and a 3 .
Thus, with y 1 expressed from x according to Equation (7), with y 2 and y 3 implying its time derivatives, with the reference trajectory given, and with the coefficient a i as i = 1 , 2 , 3 known, v becomes fully explicit from Equation (9). Finally, by using u ( y 1 , y 2 , y 3 , v ) , the control u ( t ) becomes fully defined. The only critical point is the discovery of a flat output function y.

2.2. Discovering the Flat Transformation

From the previous analyses, we can conclude that control procedures becomes straightforward as soon as the flat output function y is determined. The present section proposes a procedure to extract it from the available data on any real system. The present section uses of the following notation:
  • The state will be noted by x , x R n , and the control (assumed here to be scalar) will be noted by u.
  • The transformed state will be noted as y . As we are validating the procedure on the previously discussed example, we consider y R n , even if, in general, it could have a different dimension that should be extracted (a sort of hyperparameter). The n derivative will be noted again by v, i.e., v = y ( n ) , with n = 3 in our example.
  • The different transformations, operated by multilayer perceptron neural networks, will be noted by x = h ( y ) , u = I ( y , v ) , and y = G ( x , u ) .
  • The flat control time derivatives make use of the automatic differentiation, as well as of the derivation chain rule. For example, the first derivative reads as follows:
    y ˙ = y x x t + y u u t
    The second derivative is computed using the chain rule:
    y ¨ = 2 y x 2 x t 2 + y x 2 x t 2 + 2 y u 2 u t 2 + y u 2 u t 2
    and so on for the higher derivatives, where the partial derivatives of y with respect to x or u are computed through automatic differentiation on the neural network structure, while the derivatives with respect to time are computed using central finite differences.
The parameters involved in the three neural networks are trained from the data associated with different dynamical system trajectories, which are generated from the initial condition x 0 k and control u k ( t ) , where the superscript k refers to the training dynamical system trajectory. The data set consists of ( x i , u i ) , where the i index refers to the discrete data generated in the previously referred integration.
The proposed autoencoder architecture illustrated in Figure 1 enables training of the three neural networks: h ( ) , I ( ) , and G ( ) simultaneously.
Remark 1. 
This work only addresses SISO (single input–single output) systems. The generalization to MIMO systems (multiple inputs–multiple outoputs) is possible and constitutes a work in progress. There are many possible neural architectures: (i) a separated NN for discovering each flat output or (ii) a single NN that produces as many flat outputs as control inputs. In our work in progress, both routes are being considered and compared. When considering the last route, the neural architecture proposed in the present paper applies to infer the flat outputs (as many as control inputs), with a second architecture that, from the different flat outputs and their time derivatives (the order is at present increased until the training performs), allows for recovering the state. Finally, a third and last NN enables recovering the control inputs.

2.3. Case Study

By considering the nonlinear control problem given in Equation (3), the three different neural networks are built using the architecture described in Table 1, Table 2 and Table 3.

2.4. Neural Network Training and Results

To perform the training, a data base of K = 200 control sequences u k ( t ) was created according to
u k ( t ) = r 0 k + r 1 k t + r 2 k t 2 ,
with the time t [ 0 , 10 ] sampled with a time step Δ t = 0.01 s, thus resulting in n t data points. The coefficients r 0 , r 1 , and r 2 are obtained from three random numbers p 0 , p 1 , and p 2 , thus resulting in a uniform probability distribution in the unit interval according to
r 0 = p 0 r 1 = 0.1 p 1 r 2 = 0.005 p 2 .
Once the sampling of u is available, the solutions u k ( t ) , k = 1 , , 200 are calculated by integrating Equation (3) numerically using the s c i p y library from the same initial condition x 0 x ( t = 0 ) = ( 1 , 1 , 1 ) T .
From those solutions, the training is performed using batch gradient descent (being N b the number of batches) and the Adam optimizer. The loss function L used in the training reads as
L = k = 1 N b j = 1 n t x j k x ^ j k 2 + u j k u ^ j k 2 ,
where · ^ are the predicted autoencoder outputs.
After convergence of the learning, the other 20 control sequences are generated, and the dynamical system (3) is solved to define the so-called test set.
Figure 2 shows the solution associated with a sample in the test set along with the autoencoder output, where a very good accuracy can be noticed.
The decoded control u ^ is shown in Figure 3 for the same test sample, where again an excellent accuracy can be noticed.
The flat control produced by our autoencoder is shown in Figure 4 along with the one proposed in Equation (7) and previously reported, which we will be naming as y a n a l y t i c a l . The functions shown in Figure 4 are different, but both them verify all the flat control constraints. The difference is due to the fact that the neural architecture considers u and ( x 1 , x 2 , x 3 ) as inputs for generating y, while the analytical expression of the flat control only involves x 1 and x 2 .

2.5. Path Tracking

The learned flat output y was used to follow a reference trajectory x r ( t ) , which was first generated from the same initial condition and a given control time sequence u r ( t ) . At each time instant t i , as introduced earlier, v i reads as
v i = v i r e f + a T y i y i r ,
where vector a contains the three coefficients a 1 , a 2 , and a 3 , which are calculated to ensure that the three eigenvalues of the transformed linear dynamical system have negative real parts, and with the control given by
u i + 1 = I ( y i , v i ) .
The control robustness can be improved by considering a positive β < 1 , and we define the control updating as follows:
u i + 1 = ( 1 β ) I ( y i , v i ) + β u i .
The introduction and use of the β coefficient improves the integration stability when the state update goes too far from the training domain (extrapolation). An enhanced robustness was noticed from the performed simulations.
The test was performed on the same test sample as depicted in Figure 2, which constituted the reference trajectory. The controlled state and the associated control are both shown in Figure 5, which considers the correct initial state and control.
The procedure was also tested when considering a initial condition, for both the state and the control, thus differing from the reference ones. The associated results of the control with the initial conditions differing from the required reference ones are depicted in Figure 6.
The results illustrate a delay envolved in the control. This delay is due to the use of the relaxation introduced in Equation (18). The relaxation delays the response of the system but ensure robustness in the case where the trained neural network operates outside the trained region.

3. Koopman Theory for Efficient Parametric Dynamics Modeling

The Koopman theory has recently attracted great interest from both the model order reduction and machine learning communities [8]. It states that for a given state x , x R d , there exists a mapping into a target space, x z R D , in general of higher dimensionality, i.e., D d such that nonlinear dynamics in the departure space
x ˙ = f ( x ) ,
become linear and then expressible from the discrete form
z n + 1 = K z n ,
where the superscript n refers to the state at time t n .
Therefore, the simplest procedure consists of learning from the available data x n , n = 1 , 2 , , N the NN-based autoencoder ensuring
x n z n x n , n ,
under the constraint
z n + 1 = K z n ,
where the NN-based encoder and decoder and the constant linear matrix K are computed simultaneously from the available data.
Dynamic mode decomposition—DMD [9]—is a particular variant in which a linear dynamic K is identified by enforcing x n + 1 = K x n , n .

3.1. PCA-Based Reduced Order Modeling versus Koopman-Based Procedures for Linear and Nonlinear Control

This section addresses dynamical systems control in different scenarios: (i) the one concerned by dimensionality reduction; (ii) its learned counterpart; and (iii) the use of the Koopman theory addressed in the previous section but now within a control framework.
The general time update writes as
( x n , u n ) x n + 1 ,
where x n and u n refer, respectively, to the state and control variables—both at time t n .

3.1.1. Linear Dimensionality Reduction

In the linear case, Equation (23) can be expressed as
x n + 1 = K x x K x u x n u n .
By considering a linear dimensionality reduction—for instance, the PCA—the state can be expressed as
x n = B y n , n ,
with y R m , with in general m d , and where orthonormality of the PCA modes entails B T B = I m × m .
By introducing Equation (25) into Equation (24), it results in the following:
B y n + 1 = K x x K x u B y n u n .
which, by premultiplying by B T and taking into account the previously referred orthonormality property, becomes
y n + 1 = B T K x x B T K x u B y n u n ,
or
y n + 1 = B T K x x B B T K x u y n u n ,
which can be finally written as
y n + 1 = k y y k y u y n u n .

3.1.2. Learning Procedure

From the available data, y n ( y n = B T x n ) and u n , n , one can identify both of the reduced matrices k y y and k y u under the stability constraint related to the spectral radius of k y y , where ρ ( k y y ) 1 .

3.1.3. Nonlinear Settings

The same rationale can be applied in nonlinear dynamics. For that purpose, it suffices again to look for a nonlinear mapping:
x n z n x n , n ,
where z R D , with D large enough and D d in general, under the constraint
z n + 1 = k z z k z u z n u n ,
where the NN-based encoder and decoder and the constant matrices k z z and k z u defining the linear dynamics in the latent space must all them be computed simultaneously from the available data and under the stability constraint.
However, the process can be expressed in a more compact neural architecture, such as the one illustrated in Figure 7, which consists of three main coupled neural blocks expressed as
z i = ϕ ( x i ) z i + 1 = K ( u ) z i x i + 1 = ψ ( z i + 1 )
which enable learning the control-dependent state updating.
Remark 2. 
An alternative route, which is specially appealing for control purposes, consists of augmenting the latent space of dimension D with the physical state x such that the resulting dynamical system reads as
z = ϕ ( x ) z i + 1 x i + 1 = K ( u ) z i x i
which, at the price of excessively increasing the latent space dimension, enables employing linear control strategies.

3.2. A First Simple Numerical Test

This section analyzes the performances of the Koopman operator learning algorithm proposed in Equation (32) when again addressing the problem expressed by Equation (3). The same data used when addressing the flat control were used again for training the Koopman operator K ( u ) , the encoder ϕ , and the decoder ψ simultaneously.
Figure 8 shows the results on a sample selected from the training set, with d = 3 and D = 50 . It can be noticed that for every output x i + 1 , the reference inputs x i and u i were provided to the algorithm, which is the usual control procedure. The results revealed excellent performance of the Koopman operator approach for updating x i + 1 from the known x i and u i .
Figure 9 shows the results on a sample of the test set involving a control sequence u ( t ) that was unseen during the training. The predictions are again in perfect agreement with the reference solution.

3.3. Stability against Noisy Data

The proposed algorithm was tested against noisy data, where a white noise of maximum amplitude 0.1 was added to x . The noise was generated using Python’s numpy random function. The architecture proposed in Section 3.1.3 was trained using the noisy data. Figure 10 illustrates the results of the Koopman training on the noisy data using a training sample, while Figure 11 illustrates the results on a testing sample. It can be noticed that the algorithm did not find major difficulties to learn the dynamics in a very convenable way, with an appreciable filtering seen in Figure 10b and Figure 11b.

3.4. Koopman-Based Modeling of Electromagnetic Bearings

The present section applies the proposed Koopman operator algorithm to a more complex problem. The selected problem consists of some quantities of interest quantifying the magnetic bearing performances, in particular the levitation force F and the magnetic flux Φ . The model and associated problem was detailed in [12].
The considered magnetic bearing geometry is shown in Figure 12. The electromagnetic problem is solved for different sequences of the applied voltage values of u k ( t ) , where k = 1 , , 14 .
In this example, the state, levitation flux F, and magnetic flux Φ define the problem state x = ( F , Φ ) T to be controlled by acting on the voltage u from the use of Equation (32). In this example, d = 2 , while D = 250 , which is quite large to account for the strong nonlinearities of the system.
With respect to the strategy previously presented, an LSTM was considered here for modeling K ( u ) in order to consider at a given time step the previous 10 values of the applied voltage.
From the 14 available solutions, 10 were used for training the data-driven model, while the remaining 4 were used for quantifying the learned model performances.
Figure 13 and Figure 14 show the levitation force results on the training set, while Figure 15 concerns the testing set. These figures prove the high performance of the proposed algorithm and its ability to predict the levitation force from the applied voltage.

4. Discovering Parametric Koopman Operators

The present section aims to extend the rationale to define a parametric Koopman operator in a parsimonious way.
The extended procedure reads as
z i = ϕ ( x i p ) a i + 1 = j = 1 N K j ( u ) c j : z i x i + 1 p = ψ ( a i + 1 )
where ⊗ refers to the tensor product, : refers to the tensor product twice contracted, x i + 1 p is the parametric output at time step i + 1 for a a given known input x i p at time step i, and we have a parameter μ varying in the interval μ [ μ m i n , μ m a x ] .
The fact that the Koopman operator is defined as a sum of separated variables helps in creating a parsimonious neural network, where at each enrichment iteration j, the previously trained networks for K l ( u ) and c l , l < j are set to nontrainable with their weights fixed, and the two new networks K j ( u ) and c j are trained to minimize the loss function. When training at iteration j, the networks ϕ and ψ are trainable. Figure 16 illustrates the parametric Koopman operator.
To test the algorithm, a parametric heat transfer problem defined in a 2D unit square Ω = [ 0 , 1 ] 2 equipped with a uniform boundary condition and heat source Q was considered. The problem reads as
T t μ 2 T s 1 2 + 2 T s 2 2 = Q ,
with T being the temperature, ( s 1 , s 2 ) being the space coordinates, t being the time and Q being the heat source considered here as the problem control.
In the considered problem, μ represents the thermal diffusivity, thus taking values in the interval μ [ 0.1 , 1 ] and being uniformly discretized by using 10 nodes in that parametric dimension.
The problem is first solved using the finite elements method—FEM—in Ω for each discrete value of μ . Four nodes are then selected, and their temperature time evolution are recorded. The location of the virtual sensors and the temperature solution for a selected heat source and time step is illustrated in Figure 17.
The sensor data were then used to train the algorithm over the first 80% of the selected time interval and then tested on the remaining 20%. The latent space dimension was set to D = 250 , while the state dimension (number of sensors) had the dimension d = 4 .
Figure 18 and Figure 19 show the results on both the training and the test sets, respectively, for the four selected sensors. The results prove the ability of the proposed algorithm to update the solution with high accuracy.

5. Conclusions

This work aimed at illustrating the benefits of state transformation for modeling and control purposes. The first approach leverages the use of a flat control. The flat output function is automatically discovered using a machine learning algorithm. Flat control represents a very valuable and powerful technique widely used in nonlinear systems control. However, identifying an analytical flat output transformation is not always obvious, and it can become a tricky issue. Here, a procedure that learns the flat output transformation in a transparent manner has been proposed, where the resulting flat output satisfies all the requirements by construction. If a system is not flat, the proposed autoencoder will never converge, that is, the loss function never reduces sufficiently. In the case where the system admits a flat output, the autoencoder will provide one among the eventually many flat transformations, thus depending on the initialization, neural networks parameters, and hyperparameters, among others, but this means that any flat output performs similarly.
In the second proposed approach, the Koopman operator in a large latent space is used while extending it to address the parsimonious learning of parametric dynamics. The Koopman theory and Koopman operators are commonly used to perform a linear approximation of a nonlinear system, which can later on be controlled and evaluated faster with less computational effort. One of the applications is magnetic levitation, which must be controlled within a frequency of 11 kHz at least to achieve a reliable control. The linearization using Koopman theory is an effective tool to address the control and approximation of the magnetic levitation problem in a fast and reliable manner.
Both proposals performed very well, thus exhibiting very good predictive ability and control performance outcomes for the selected use cases. The Koopman-based strategy also applied in the case of noisy data, without compromising accuracy or stability, with the neural architectures filtering the noise when preventing overfitting. In the case of flat control, data filtering seems to be the best option to ensure optimal performance outcomes.
Another important point deserving additional comments concerns the scalability of both techniques with the dimension of the dynamical system. When addressing control applications, more than considering the state itself, they are the time evolution of the quantities of interest that are concerned, whose size remains quite reduced to be manageable by the previously discussed techniques. Thus, the discussed techniques will proceed as discussed, without major difficulties. However, the Koopman operator was also considered for modeling the dynamical system state evolution, and in that case, the size increased with the size of the state. When the state corresponds to a discretized field represented by a finite element mesh, its size could be of millions. In that case, the procedure proposed in this paper cannot be directly applied. First, a data reduction, linear or nonlinear, must be performed to reduce the state to its reduced counterpart, at the latent space, which then makes it manageable by using the techniques proposed in the present paper.

Author Contributions

Conceptualization, C.G., J.T., J.D.S. and F.C.; Methodology, C.G., J.M., J.T., J.D.S. and F.C.; Software, C.G. and F.C.; Validation, C.G. and F.C.; Formal analysis, J.M. and J.T.; Writing—original draft, C.G.; Writing—review & editing, C.G., J.M., J.T., J.D.S. and F.C.; Visualization, C.G.; Supervision, C.G., J.M., J.T., J.D.S. and F.C.; Project administration, C.G., J.D.S. and F.C.; Funding acquisition, J.M., J.D.S. and F.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author due to restrictions related to SKF Magnetics Mechatronics’ applications.

Acknowledgments

Authors acknowledge the support of the SKF research chair at ENSAM.

Conflicts of Interest

Authors J.M., J.T. and J.D.S. are employed by the company SKF Magnetics Mechatronics. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Elman, J.L. Finding Structure in Time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
  2. Takens, F. Detecting strange attractors in fluid turbulence. In Symposium on Dynamical Systems and Turbulence; Springer: Berlin, Germany, 1981; pp. 366–381. [Google Scholar]
  3. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  4. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef]
  5. Ghnatios, C.; Kestelyn, X.; Denis, G.; Champaney, V.; Chinesta, F. Learning Data-Driven Stable Corrections of Dynamical Systems—Application to the Simulation of the Top-Oil Temperature Evolution of a Power Transformer. Energies 2023, 16, 5790. [Google Scholar] [CrossRef]
  6. Chen, T.Q.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D. Neural Ordinary Differential Equations. In Proceedings of the NeurIPS, Montreal, QC, Canada, 2–8 December 2018; Bengio, S., Wallach, H.M., Larochelle, H., Grauman, K., Cesa-Bianchi, N., Garnett, R., Eds.; pp. 6572–6583. [Google Scholar]
  7. Tarasov, E. Estimation des Entrées Inconnues Pour le Diagnostic et la Commande. Approche Bond Graph. Ph.D. Thesis, Université de Lille, Lille, France, 2015. [Google Scholar]
  8. Brunton, S.L.; Budišić, M.; Kaiser, E.; Kutz, J.N. Modern Koopman Theory for Dynamical Systems. SIAM Rev. 2022, 64, 229–340. [Google Scholar] [CrossRef]
  9. Schmid, P.J. Dynamic Mode Decomposition and Its Variants. Annu. Rev. Fluid Mech. 2022, 54, 225–254. [Google Scholar] [CrossRef]
  10. Fliess, M.; Jean LéVine, P.M.; Rouchon, P. Flatness and defect of non-linear systems: Introductory theory and examples. Int. J. Control 1995, 61, 1327–1361. [Google Scholar] [CrossRef]
  11. Franke, M.; Röbenack, K. On the computation of flat outputs for nonlinear control systems. In Proceedings of the 2013 European Control Conference (ECC), Zurich, Switzerland, 17–19 July 2013; pp. 167–172. [Google Scholar] [CrossRef]
  12. Ghnatios, C.; Rodriguez, S.; Tomezyk, J.; Dupuis, Y.; Mouterde, J.; Da Silva, J.; Chinesta, F. A hybrid twin based on machine learning enhanced reduced order model for real-time simulation of magnetic bearings. Adv. Model. Simul. Eng. Sci. 2024, 11, 3. [Google Scholar] [CrossRef]
Figure 1. The architecture of the network used to discover a flat control transformation.
Figure 1. The architecture of the network used to discover a flat control transformation.
Mathematics 12 02251 g001
Figure 2. Predicted outputs x ^ and the reference solution x for a test sample.
Figure 2. Predicted outputs x ^ and the reference solution x for a test sample.
Mathematics 12 02251 g002
Figure 3. The control u used in the input and the output of the flat control autoencoder u ^ .
Figure 3. The control u used in the input and the output of the flat control autoencoder u ^ .
Mathematics 12 02251 g003
Figure 4. The discovered flat control y and the analytical transformation y a n a l y t i c a l .
Figure 4. The discovered flat control y and the analytical transformation y a n a l y t i c a l .
Mathematics 12 02251 g004
Figure 5. Predicted controlled outputs x ^ associated with the right x 0 and u 0 , shown along with the reference solution x r , on a case in the test set.
Figure 5. Predicted controlled outputs x ^ associated with the right x 0 and u 0 , shown along with the reference solution x r , on a case in the test set.
Mathematics 12 02251 g005
Figure 6. Predicted controlled outputs x ^ associated with x 0 and u 0 differing from the reference ones, shown along with the reference solution x r , on a case in the test set.
Figure 6. Predicted controlled outputs x ^ associated with x 0 and u 0 differing from the reference ones, shown along with the reference solution x r , on a case in the test set.
Mathematics 12 02251 g006aMathematics 12 02251 g006b
Figure 7. The architecture of the network used to discover the Koopman operator.
Figure 7. The architecture of the network used to discover the Koopman operator.
Mathematics 12 02251 g007
Figure 8. Predicted Koopman outputs x ^ and the reference solution x r on a sample of the training set.
Figure 8. Predicted Koopman outputs x ^ and the reference solution x r on a sample of the training set.
Mathematics 12 02251 g008
Figure 9. Predicted Koopman outputs x ^ and the reference solution x r on a sample of the test set.
Figure 9. Predicted Koopman outputs x ^ and the reference solution x r on a sample of the test set.
Mathematics 12 02251 g009
Figure 10. Predicted Koopman outputs x ^ and the reference solution with noise on a sample of the training set.
Figure 10. Predicted Koopman outputs x ^ and the reference solution with noise on a sample of the training set.
Mathematics 12 02251 g010
Figure 11. Predicted Koopman outputs x ^ and the reference solution with noise on a sample of the test set.
Figure 11. Predicted Koopman outputs x ^ and the reference solution with noise on a sample of the test set.
Mathematics 12 02251 g011
Figure 12. Problem geometry related to the considered magnetic bearing.
Figure 12. Problem geometry related to the considered magnetic bearing.
Mathematics 12 02251 g012
Figure 13. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 1 , , 5 .
Figure 13. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 1 , , 5 .
Mathematics 12 02251 g013aMathematics 12 02251 g013b
Figure 14. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 6 , , 10 .
Figure 14. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 6 , , 10 .
Mathematics 12 02251 g014aMathematics 12 02251 g014b
Figure 15. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 11 , , 14 (test set).
Figure 15. Predicted levitation force F ^ and the reference solution F r associated with u k ( t ) , where k = 11 , , 14 (test set).
Mathematics 12 02251 g015
Figure 16. The parsimonious parametric Koopman operator.
Figure 16. The parsimonious parametric Koopman operator.
Mathematics 12 02251 g016
Figure 17. Virtual sensors locations in Ω and temperature at a given time and for a given thermal conductivity.
Figure 17. Virtual sensors locations in Ω and temperature at a given time and for a given thermal conductivity.
Mathematics 12 02251 g017
Figure 18. Predicted temperature T ^ and the reference solution T r at the four sensors for μ k taken from the training set.
Figure 18. Predicted temperature T ^ and the reference solution T r at the four sensors for μ k taken from the training set.
Mathematics 12 02251 g018aMathematics 12 02251 g018b
Figure 19. Predicted temperature T ^ and the reference solution T r at the four sensors for two values of parameter μ unseen during the training (test cases).
Figure 19. Predicted temperature T ^ and the reference solution T r at the four sensors for two values of parameter μ unseen during the training (test cases).
Mathematics 12 02251 g019
Table 1. Neural network G ( x , u ) , where t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Table 1. Neural network G ( x , u ) , where t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Layer NameLayer InputLayer TypeActivation
a i , i [ 1 , n ] x i , i [ 1 , n ] A dense layer with 60 neurons per input t a n h
buDense with 60 neurons t a n h
cAll a i , i [ 1 , n ] and bConcatenate layer-
dcDense with 200 neurons r e l u
edDense with 60 neurons r e l u
feDense with 1 neuron l i n e a r
Table 2. Neural network h ( y ) , where t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Table 2. Neural network h ( y ) , where t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Layer NameLayer InputLayer TypeActivation
a i , i [ 1 , n ] y i , i [ 1 , n ] A dense layer with 60 neurons per input t a n h
ball a i , i [ 1 , n ] Concatenate layer-
cbDense with 200 neurons r e l u
dcDense with 60 neurons r e l u
edDense with n neurons l i n e a r
Table 3. Neural network I ( y , v ) , where with v = y ( n ) y n + 1 , t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Table 3. Neural network I ( y , v ) , where with v = y ( n ) y n + 1 , t a n h stands for the hyperbolic tangent, and r e l u stands for the rectified linear unit.
Layer NameLayer InputLayer TypeActivation
a i , i [ 1 , n + 1 ] y i , i [ 1 , n + 1 ] A dense layer with 60 neurons per input t a n h
bAll a i , i [ 1 , n + 1 ] Concatenate layer-
cbDense with 200 neurons r e l u
dcDense with 60 neurons r e l u
edDense with 1 neuron l i n e a r
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.

Share and Cite

MDPI and ACS Style

Ghnatios, C.; Mouterde, J.; Tomezyk, J.; Da Silva, J.; Chinesta, F. Learning Transformed Dynamics for Efficient Control Purposes. Mathematics 2024, 12, 2251. https://doi.org/10.3390/math12142251

AMA Style

Ghnatios C, Mouterde J, Tomezyk J, Da Silva J, Chinesta F. Learning Transformed Dynamics for Efficient Control Purposes. Mathematics. 2024; 12(14):2251. https://doi.org/10.3390/math12142251

Chicago/Turabian Style

Ghnatios, Chady, Joel Mouterde, Jerome Tomezyk, Joaquim Da Silva, and Francisco Chinesta. 2024. "Learning Transformed Dynamics for Efficient Control Purposes" Mathematics 12, no. 14: 2251. https://doi.org/10.3390/math12142251

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop