Skip to main content
Log in

Backpropagation of neural network dynamical models applied to flow control

  • Original Article
  • Published:
Theoretical and Computational Fluid Dynamics Aims and scope Submit manuscript

Abstract

Backpropagation of neural network models (NNMs) is applied to control nonlinear dynamical systems using several different approaches. By leveraging open-loop data, we show the feasibility of building surrogate models with control inputs that are able to learn important features such as types of equilibria, limit cycles and chaos. Two novel approaches are presented and compared to gradient-based model predictive control (MPC): the neural network control (NNC), where an additional neural network is trained as a control law in a recurrent fashion using the nonlinear NNMs, and linear control design, enabled through linearization of the obtained NNMs. The latter is compared with dynamic mode decomposition with control (DMDc), which also relies on a data-driven linearized model. It is shown that the linearized NNMs better approximate the systems’ behavior near an equilibrium point than DMDc, particularly in cases where the data display highly nonlinear characteristics. The proposed control approaches are first tested on low-dimensional nonlinear systems presenting dynamical features such as stable and unstable limit cycles, besides chaos. Then, the NNC is applied to the nonlinear Kuramoto–Sivashinsky equation, exemplifying the control of a chaotic system with higher dimensionality. Finally, the proposed methodologies are tested on the compressible Navier–Stokes equations. In this case, the stabilization of a cylinder vortex shedding is sought using different actuation setups by taking measurements of the lift force with delay coordinates.

Graphic abstract

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. Alyoussef, F., Kaya, I.: A review on nonlinear control approaches: sliding mode control back-stepping control and feedback linearization control. In: International Engineering and Natural Sciences Conference (IENSC 2019), vol. 2019, pp. 608–619 (2019)

  2. Brunton, S.L., Noack, B.R.: Closed-loop turbulence control: progress and challenges. Appl. Mech. Rev. 67(5), 050801 (2015)

    Article  Google Scholar 

  3. Shi, S., Xu, S., Gu, J., Min, H.: Global high-order sliding mode controller design subject to mismatched terms: application to buck converter. IEEE Trans. Circuits Syst. I Regul. Pap. 66(12), 4840–4849 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  4. Baek, S., Baek, J., Han, S.: An adaptive sliding mode control with effective switching gain tuning near the sliding surface. IEEE Access 7, 15563–15572 (2019)

    Article  Google Scholar 

  5. Zulu, A., John, S.: A review of control algorithms for autonomous quadrotors. arXiv preprint arXiv:1602.02622 (2016)

  6. Egidio, L.N., Deaecto, G.S., Hespanha, J.P., Geromel, J.C.: Trajectory tracking for a class of switched nonlinear systems: application to PMSM. Nonlinear Anal. Hybrid Syst. 44, 101164 (2022)

    Article  MathSciNet  MATH  Google Scholar 

  7. Gad-el-Hak, M.: Modern developments in flow control. Appl. Mech. Rev. 49, 365–379 (1996)

    Article  Google Scholar 

  8. Bewley, T.: Flow control: new challenges for a new Renaissance. Prog. Aerosp. Sci. 37, 21–58 (2001)

    Article  Google Scholar 

  9. Gad-el-Hak, M.: Flow control: the future. J. Aircr. 38, 402–418 (2001)

    Article  Google Scholar 

  10. Kim, J., Bewley, T.: A linear systems approach to flow control. Annu. Rev. Fluid Mech. 39, 383–417 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  11. Semeraro, O., Bagheri, S., Brandt, L., Henningson, D.: Feedback control of three-dimensional optimal disturbances using reduced-order models. J. Fluid Mech. 677, 63–102 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  12. Ren, F., Rabault, J., Tang, H.: Applying deep reinforcement learning to active flow control in weakly turbulent conditions. Phys. Fluids 33(3), 037121 (2021)

    Article  Google Scholar 

  13. Högberg, M., Bewley, T., Henningson, D.: Linear feedback control and estimation of transition in plane channel flow. J. Fluid Mech. 481, 149–175 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  14. Fabbiane, N., Bagheri, S., Henningson, D.S.: Energy efficiency and performance limitations of linear adaptive control for transition delay. J. Fluid Mech. 810, 60–81 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  15. Choi, H., Moin, P., Kim, J.: Active turbulence control for drag reduction in wall-bounded flows. J. Fluid Mech. 262, 75–110 (1994)

    Article  MATH  Google Scholar 

  16. Berger, T., Kim, J., Lee, C., Lim, J.: Turbulent boundary layer control utilizing the Lorentz force. Phys. Fluids 12, 631–649 (2000)

    Article  MATH  Google Scholar 

  17. Pastoor, M., Henning, L., Noack, B., King, R., Tadmor, G.: Feedback shear layer control for bluff body drag reduction. J. Fluid Mech. 608, 161–196 (2008)

    Article  MATH  Google Scholar 

  18. Ramos, B.L.O., Wolf, W.R., Yeh, C.-A., Taira, K.: Active flow control for drag reduction of a plunging airfoil under deep dynamic stall. Phys. Rev. Fluids 4, 074603 (2019)

    Article  Google Scholar 

  19. Déda, T.C., Wolf, W.R.: Extremum seeking control applied to airfoil trailing-edge noise suppression. AIAA J. 60, 823–843 (2022)

    Article  Google Scholar 

  20. Gautier, N., Aider, J., Duriez, T., Noack, B., Segond, M., Abel, M.: Closed-loop separation control using machine learning. J. Fluid Mech. 770, 442–457 (2015)

    Article  Google Scholar 

  21. Bieker, K., Peitz, S., Brunton, S.L., Kutz, J.N., Dellnitz, M.: Deep model predictive flow control with limited sensor data and online learning. Theor. Comput. Fluid Dyn. 2020, 1–15 (2020)

    MathSciNet  Google Scholar 

  22. Morton, J., Witherden, F.D., Jameson, A., Kochenderfer, M.J.: Deep dynamical modeling and control of unsteady fluid flows. arXiv preprint arXiv:1805.07472 (2018)

  23. Brunton, S.L., Noack, B.R., Koumoutsakos, P.: Machine learning for fluid mechanics. Annu. Rev. Fluid Mech. 52, 477–508 (2020)

    Article  MathSciNet  MATH  Google Scholar 

  24. Lee, C., Kim, J., Babcock, D., Goodman, R.: Application of neural networks to turbulence control for drag reduction. Phys. Fluids 9(6), 1740–1747 (1997)

    Article  Google Scholar 

  25. Fan, D., Yang, L., Wang, Z., Triantafyllou, M.S., Karniadakis, G.E.: Reinforcement learning for bluff body active flow control in experiments and simulations. Proc. Natl. Acad. Sci. 117(42), 26091–26098 (2020)

    Article  Google Scholar 

  26. Tokarev, M., Palkin, E., Mullyadzhanov, R.: Deep reinforcement learning control of cylinder flow using rotary oscillations at low Reynolds number. Energies 13(22), 5920 (2020)

    Article  Google Scholar 

  27. Xu, H., Zhang, W., Deng, J., Rabault, J.: Active flow control with rotating cylinders by an artificial neural network trained by deep reinforcement learning. J. Hydrodyn. 32(2), 254–258 (2020)

    Article  Google Scholar 

  28. Rabault, J., Kuchta, M., Jensen, A., Réglade, U., Cerardi, N.: Artificial neural networks trained through deep reinforcement learning discover control strategies for active flow control. J. Fluid Mech. 865, 281–302 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  29. Arbabi, H., Korda, M., Mezić, I.: A data-driven Koopman model predictive control framework for nonlinear partial differential equations. In: 2018 IEEE Conference on Decision and Control (CDC), pp. 6409–6414 (2018). IEEE

  30. Kuramoto, Y.: Diffusion-induced chaos in reaction systems. Prog. Theor. Phys. Suppl. 64, 346–367 (1978)

    Article  Google Scholar 

  31. Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., Zheng, X.: TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. Software available from tensorflow.org (2015)

  32. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. In: Proceedings of the 3rd International Conference on Learning Representations (ICLR) (2014)

  33. Agarap, A.F.: Deep learning using rectified linear units (relu). arXiv preprint arXiv:1803.08375 (2018)

  34. Proctor, J.L., Brunton, S.L., Kutz, J.N.: Dynamic mode decomposition with control. SIAM J. Appl. Dyn. Syst. 15(1), 142–161 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  35. Kaiser, E., Kutz, J.N., Brunton, S.L.: Sparse identification of nonlinear dynamics for model predictive control in the low-data limit. Proc. R. Soc. A 474(2219), 20180335 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  36. Sivashinsky, G.I.: Nonlinear analysis of hydrodynamic instability in laminar flames—i. Derivation of basic equations. Acta Astronaut. 4, 1177–1206 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  37. Kuramoto, Y.: Diffusion-induced chaos in reaction systems. Prog. Theoret. Phys. 64, 346–367 (1978)

    Article  Google Scholar 

  38. Fabbiane, N., Semeraro, O., Bagheri, S., Henningson, D.S.: Adaptive and model-based control theory applied to convectively unstable flows. Appl. Mech. Rev. 66(6), 060801 (2014)

    Article  Google Scholar 

  39. Nagarajan, S., Lele, S.K., Ferziger, J.H.: A robust high-order compact method for large eddy simulation. J. Comput. Phys. 191(2), 392–419 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  40. Berkooz, G., Holmes, P., Lumley, J.L.: The proper orthogonal decomposition in the analysis of turbulent flows. Annu. Rev. Fluid Mech. 25(1), 539–575 (1993)

    Article  MathSciNet  Google Scholar 

  41. Dawson, S.T.: Reduced-order modeling of fluids systems, with applications in unsteady aerodynamics. PhD thesis, Princeton University (2017)

Download references

Acknowledgements

The authors acknowledge the computational resources used in this work which were provided by CENAPAD-SP (Project 551) and by LNCC via the SDumont cluster (Project SimTurb).

Funding

Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP): Grants No. 2013/08293-7, 2021/06448-0, 2019/19179-7 and 2022/00469-8; Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq): Grants No. 407842/2018-7 and 304335/2018-5.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tarcísio Déda.

Ethics declarations

Ethical Approval

Not applicable.

Conflict of interest

The authors declare that they have no competing interests.

Authors’ contributions

T.D. contributed to conceptualization, methodology, software development, validation, formal analysis, investigation, and writing original draft; W.W. contributed to conceptualization, formal analysis, supervision, resources, and writing & review; S.D. contributed to conceptualization, formal analysis, supervision, and writing & review.

Availability of data and materials

Datasets are available as discussed in the various Appendices.

Additional information

Communicated by Karen Mulleners.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary file (ZIP 1763 KB)

Appendices

Appendix A: Datasets

The datasets used to train the dynamical models are provided as a supplemental material. These sets are referenced along the following files:

  • data_nn_lv.txt: Lotka–Volterra training data.

  • data_nn_vp.txt: Van der Pol training data.

  • data_nn_li.txt: Liénard training data.

  • data_nn_lo.txt: Lorenz training data.

  • data_nn_ks.txt: Kuramoto–Sivashinsky training data.

  • data_dmdc_lv.txt: Alternate training data for Lotka–Volterra. This dataset was built with very small control inputs, so the system response is approximately linear. This is done in order to show that DMDc provides good models for nearly linear systems (see Appendix D). In cases where the operating point is unstable, building such type of dataset is not possible, as shown in the Van der Pol and Lorenz examples.

  • data_nn_cyljet_01.txt - data_nn_cyljet_11.txt: Data used for blowing/suction actuated cylinder flow.

  • data_nn_cylrot_01.txt - data_nn_cylrot_20.txt: Data used for rotation actuated cylinder flow.

All datasets are organized in text files containing \(1+m+n\) columns. The first column corresponds to the dimensionless time array. The next m columns are the control input values, and the last n columns contain the states. In all cases studied in this work \(m=1\) and, therefore, the second column represents the only control input.

Appendix B: Training of neural network models

The datasets employed for training the neural network (NN) dynamical models are referenced here and provided as supplementary material. Tables 1 and 2 present the hyperparameters chosen for each trained model.

Table 1 Hyperparameters used in the NNMs. All networks are trained using the ReLU activation function and the ADAM optimizer with a constant learning rate
Table 2 Hyperparameters used in the NNMs for cylinder flows. All networks are trained using the ReLU activation function and the ADAM optimizer with a constant learning rate

Appendix C: Control parameters

Table 3 presents the chosen control parameters for each technique and system studied. NNC training for the low-order systems is performed by gathering data randomly sampled from a normal distribution to build \({\textbf{X}}_0\). For the Kuramoto–Sivashinsky (KS) equation, the data are the same one used to train the NNM (Dataset 5). Therefore, the distribution parameters for the KS case are not applicable (N/A).

Table 4 presents values of hyperparameters used in NNC for cylinder flows. In these cases, instead of using a random dataset for training the controller, datasets built from open-loop simulations are used. The specific file used in each case is pointed in the table. For the linear control case applied to the cylinder flow, the control saturation is set to 0.4 rad/s\(^2\). Figure 12 presents the chosen closed-loop poles for stabilization.

Table 3 Control parameters employed in the solution of different dynamical systems for different techniques
Table 4 NNC hyperparameters used in cylinder flows
Fig. 12
figure 12

Pole map for the linearized cylinder flow model. The closed-loop poles are placed inside the unit circle aiming stabilization

Appendix D: Dynamic mode decomposition with control

We compare control results from pole placement through the linearized NNM with dynamic mode decomposition with control (DMDc) [34]. A data matrix

$$\begin{aligned} \varvec{\Omega } = \begin{bmatrix} {\textbf{X}} \\ \varvec{\Upsilon } \end{bmatrix} \end{aligned}$$
(27)

is built, where \({\textbf{X}}\) and \(\varvec{\Upsilon }\) correspond to the states and the control inputs, respectively, as follows:

$$\begin{aligned} {\textbf{X}}&=\begin{bmatrix} \text {|} &{} \text {|} &{} &{} \text {|}\\ {\textbf{x}}_0 &{} {\textbf{x}}_1 &{} \dots &{} {\textbf{x}}_{q-1}\\ \text {|} &{} \text {|} &{} &{} \text {|}\\ \end{bmatrix}, \end{aligned}$$
(28)
$$\begin{aligned} \varvec{\Upsilon }&=\begin{bmatrix} \text {|} &{} \text {|} &{} &{} \text {|}\\ {\textbf{u}}_0 &{} {\textbf{u}}_1 &{} \dots &{} {\textbf{u}}_{q-1}\\ \text {|} &{} \text {|} &{} &{} \text {|}\\ \end{bmatrix}. \end{aligned}$$
(29)

Here, q is the number of sampled snapshots. A delayed states matrix \({\textbf{X}}'\) is also built as

$$\begin{aligned} {\textbf{X}}'=\begin{bmatrix} \text {|} &{} \text {|} &{} &{} \text {|}\\ {\textbf{x}}_1 &{} {\textbf{x}}_2 &{} \dots &{} {\textbf{x}}_{q}\\ \text {|} &{} \text {|} &{} &{} \text {|}\\ \end{bmatrix}\text{. } \end{aligned}$$
(30)

Since no dimensionality reduction is needed for the current problem, we simply estimate

$$\begin{aligned} {\textbf{X}}'=\begin{bmatrix} {\textbf{A}}&{\textbf{B}} \end{bmatrix} = {\textbf{X}}'{\textbf{G}}^\dagger \text{. } \end{aligned}$$
(31)

Figure 13 presents results for three of the systems studied in this work. For the Lotka–Volterra equations, we build a new data set with very small control inputs (Dataset 6) (although the NNM is still the same shown in the main text, which is trained with Dataset 1). This is done in order to sample a nearly linear response. The datasets for the Van der Pol and Lorenz systems are the same ones used for training the NNMs (Datasets 2 and 5). In such cases, due to the unstable equilibrium points, even small perturbations would imply in responses that grow until nonlinearities are activated. Since the Lorenz system dataset is built from highly nonlinear responses, the control design based on the model obtained with DMDc does not work well. In the examples shown in Fig. 13, the gain matrices obtained through pole placement using the DMDc and the linearized NNMs are used to compute the closed-loop poles of an analytical linearization. The comparison shows that DMDc works better for linear systems and starts to fail when nonlinearities are more prominent. Table 5 presents the resulting \({\textbf{A}}\) and \({\textbf{B}}\) matrices found through each method. An analytical version is also presented as reference, which is computed directly through differentiation of the ordinary differential equations.

Fig. 13
figure 13

Comparison of linear models. The closed-loop poles are calculated through the eigenvalues of \(A-BK\), where A and B are relative to the analytically linearized model and the gain matrix K results from pole placement design using the other models (DMDc and NNM linearization). At the bottom row, the thin lines show the responses for the systems with controllers designed using the linearized NNMs. The thick (thin) lines refer to compensators obtained by the DMDc (NN)

Table 5 Comparison of linearized models

Appendix E: Computational costs

Figure 14 presents a comparison of time per iteration for different values of \(n_h\) for the proposed Lotka–Volterra model with the other control parameters set as in case II. It depicts both nonlinear techniques studied in this work, MPC and NNC. For the tested \(n_h\) values, the MPC cost grows approximately linearly. Since only a direct evaluation of the NNC is required after training, the cost does not change as \(n_h\) grows. Also, further reduction in evaluation times could be achieved by implementing the trained NNC in a compiled software for real world applications. In the present work, \(n_h\) is chosen by trial and error avoiding very small values that would compromise control performance as well as excessively large values, which would make the training process expensive. To illustrate the relevance of not using very small values of \(n_h\), Fig. 15 presents a comparison of the responses to different horizon lengths using NNC. For small values of \(n_h\), the system performance is compromised. The figure also shows that the response improvements are not significant after a certain value, i.e., a large value of \(n_h\) will only impact the training cost (or the evaluation cost in case of MPC).

Fig. 14
figure 14

Time per control iteration as a function of the discrete horizon \(n_h\)

Fig. 15
figure 15

Lotka–Volterra system response to NNC with different values of the time horizon \(n_h\). The responses show are computed by simulating the NNMs in closed loop

Appendix F: Results for cylinder flow ROM

This appendix presents the complete responses for the cases studied in Sect. 4.3.1. The temporal evolution of the 12 POD modes is shown in Figs. 16 and 17.

Fig. 16
figure 16

ROM-controlled response where \({\tilde{F}}\) learns the dynamics of mode \(x_1\) through its time delays. The vertical dashed line indicates when the controller is turned on. Complete convergence is not achieved

Fig. 17
figure 17

ROM-controlled response where \({\tilde{F}}\) learns the dynamics of modes \(x_1\) and \(x_6\) through their time delays. The vertical dashed line indicates when the controller is turned on. The modes converge as the system is stabilized

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Déda, T., Wolf, W.R. & Dawson, S.T.M. Backpropagation of neural network dynamical models applied to flow control. Theor. Comput. Fluid Dyn. 37, 35–59 (2023). https://doi.org/10.1007/s00162-023-00641-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00162-023-00641-6

Keywords

Navigation