Abstract
The rapid growth in research exploiting deep learning to predict mechanical systems has revealed a new route for system identification; however, the analytic model as a white box has not been replaced in applications because of its open physical information. In contrast, the models generated by end-to-end learning usually lack the ability of physical analysis, which makes them inapplicable in many situations. Consequently, high-accuracy modeling with physical analyzability becomes a necessity. In this paper, we introduce bidirectional dynamic neural networks, a deep learning framework that can infer the dynamics of physical systems from control signals and observed state trajectories. Based on forward dynamics, we train the neural ordinary differential equations in a trajectory backtracking algorithm. With the trained model, the inverse dynamics can be calculated and based on \(\textit{Lagrangian}\) \(\textit{Mechanics}\), the physical parameters of the mechanical system can be estimated, including inertia, Coriolis and centrifugal forces, and gravity. As a result, the model can seamlessly incorporate prior knowledge, learn unknown dynamics without human intervention, and provide information as transparent as analytic models. We demonstrate our method on simulated 2-axis and 6-axis robots to evaluate model accuracy, including physical parameters and verified its applicability on real 7-axis robots. The experimental results show that this method is superior to the existing methods. This framework provides a new idea for system identification by providing interpretable, physically consistent models for physical systems.
Similar content being viewed by others
Data availability
Enquiries about data availability should be directed to the authors.
References
de Wit, C.C., Siciliano, B., Bastin, G. (eds.): Theory of Robot Control. Springer Science & Business Media, New York (2012)
Featherstone, R.: Rigid Body Dynamics Algorithms. Springer, New York (2014)
Jazar, R.N.: Advanced Dynamics: Rigid Body, Multibody, and Aerospace Applications. John Wiley & Sons, New York (2011)
Fu, L., Li, P.: The research survey of system identification method. In: IHMSC ’13 Proceedings of the 2013 5th International Conference on Intelligent Human–Machine Systems and Cybernetics, vol. 2, pp. 397–401 (2013)
Pinkus, A.: Approximation theory of the MLP model in neural networks. Acta Numer 8, 143–195 (1999)
Greydanus, S., et al.: Hamiltonian neural networks. Adv. Neural Inf. Process. Syst. 32, 15353–15363 (2019)
Zhong, Y.D., et al.: Extending Lagrangian and Hamiltonian neural networks with differentiable contact models. In: Annual Conference on Neural Information Processing Systems, pp. 21910–21922 (2021)
Chen, R.T., Rubanova, Y., Bettencourt, J., Duvenaud, D.K.: Neural ordinary differential equations. Adv. Neural Inf. Process. Syst. 31, 6571–6583 (2018)
Lutter, M., Ritter, C., Peters, J.: Deep Lagrangian networks—using physics as model prior for deep learning. In: International Conference on Learning Representations (2019)
Zhong, Y.D., Dey, B., Chakraborty, A.: Symplectic ODE-net: learning Hamiltonian dynamics with control. In: International Conference on Learning Representations (2020)
Finzi, M., Wang, K.A., Wilson, A.G.: Simplifying Hamiltonian and Lagrangian neural networks via explicit constraints. Adv. Neural Inf. Process. Syst. 33, 13880–13889 (2020)
Masarati, P.: Computed torque control of redundant manipulators using general-purpose software in real-time. Multibody Syst. Dyn. 32, 403–428 (2014)
Magrini, E., Flacco, F., De Luca, A.: Estimation of contact forces using a virtual force sensor. In: Intelligent Robots and Systems, pp. pp. 2126–2133 (2014)
Magrini, E., Flacco, F., De Luca, A.: Control Of generalized contact motion and force in physical human–robot interaction. In: International Conference on Robotics and Automation, vol. 2015, pp. 2298–2304 (2015)
Lu, Y., Zhong, A., Li, Q., Dong, B.: Beyond finite layer neural networks: bridging deep architectures and numerical differential equations. In: International Conference on Learning Representations, pp. 3276–3285 (2018)
Krishnan, R., Shalit, U., Sontag, D.: Structured inference networks for nonlinear state space models. In: Proceedings of the AAAI Conference on Artificial Intelligence, pp. 2101–2109 (2017)
Chen, Z., Zhang, J., Arjovsky, M., Bottou, L.: Symplectic recurrent neural networks. In: International Conference on Learning Representations (2020)
Rangapuram, S.S., et al.: Deep state space models for time series forecasting. Adv. Neural Inf. Process. Syst. 31, 7796–7805 (2018)
Lillicrap, T.P., et al.: Continuous control with deep reinforcement learning. In: International Conference on Learning Representations, ICLR Poster (2016)
Perrusquía, A., Wen, Yu.: Identification and optimal control of nonlinear systems using recurrent neural networks and reinforcement learning: An overview. Neurocomputing 438, 145–154 (2021)
Wang, Y.-J., Lin, C.-T.: Runge–Kutta neural network for identification of dynamical systems in high accuracy. IEEE Trans. Neural Netw. Learn. Syst. 9(2), 294–307 (1998)
Gupta, J.K., Menda, K., Manchester, Z., Kochenderfer, M.J.: A general framework for structured learning of mechanical systems. arXiv:1902.08705 (2019)
Lutter, M., Listmann, K., Peters, J.: Deep Lagrangian networks for end-to-end learning of energy-based control for under-actuated systems. In: Intelligent Robots and Systems, pp. 7718–7725 (2019)
Lefebvre, M., Keeler, R.K., Sobie, R., White, J.: Propagation of errors for matrix inversion. Nucl. Instrum. Methods Phys. Res. Sect. A Accel. Spectrom. Detect. Assoc. Equip. 451(2), 520–528 (2000)
Zhong, Y.D., Dey, B., Chakraborty, A.: Benchmarking energy-conserving neural networks for learning dynamics from data. In: Learning for Dynamics and Control, pp. 1218–1229 (2021)
Zheng, H., Yang, Z., Liu, W., Liang, J., Li, Y.: Improving deep neural networks using softplus units. In: International Joint Conference on Neural Network, pp. 1–4 (2015)
Misra, D.: Mish: a self regularized non-monotonic neural activation function. arXiv:1908:08681 (2019)
Negrini, E., Citti, G., Capogna, L.: System identification through Lipschitz regularized deep neural networks. J. Comput. Phys. 444, 110549 (2021)
Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. In: International Conference on Learning Representations, ICLR (Poster) (2015)
Funding
This work was supported by the National Natural Science Foundation of China [Grant numbers 52175029] and the Key Project of Shaanxi Province [Grand numbers 2018ZDCXL-GY-06-07].
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: The key steps in backpropagation of BDNN
Define \(\varvec{\theta }^{(1)}\), \(\varvec{\theta }^{(2)}\) and \(\varvec{\varepsilon }^{(1)}\), \(\varvec{\varepsilon }^{(2)}\) as weights of input and output layer of H and R net in BDNN, define \({\varvec{i}}^{(1)}\) and \({\varvec{i}}^{(2)}\) as the inputs of hidden and output layer neurons, \({\varvec{o}}^{(1)}\) and \({\varvec{o}}^{(2)}\) as inputs of the whole net and outputs of the hidden neurons respectively. In addition, define \(\varphi \) as the activation function. Then the key to Algorithm 1 is \(\frac{\partial f({\varvec{x}},{\varvec{u}})}{\partial {\varvec{x}}^\top }\), \({\mathscr {A}}^\top \frac{\partial f({\varvec{x}},{\varvec{u}})}{\partial \varvec{\theta }}\) and \({\mathscr {A}}^\top \frac{\partial f({\varvec{x}},{\varvec{u}})}{\partial \varvec{\varepsilon }}\). According to Eq. (2), the gradient of f to \({\varvec{x}}\) can be derived as:
The backpropagation for computing \(\frac{\partial {\textbf{H}}}{\partial {\varvec{q}}^\top }({\varvec{u}}-{\textbf{R}})\) with function \({\mathscr {D}}\) has been showed in Eq. (4).
The adjoint sensitivity in neural ODEs is expressed as \({\mathscr {A}}^\top \frac{\partial f({\varvec{x}},{\varvec{u}})}{\partial \varvec{\theta }}\) and \({\mathscr {A}}^\top \frac{\partial f({\varvec{x}},{\varvec{u}})}{\partial \varvec{\varepsilon }}\). For H net in BDNN, the gradient related to the weight of the output layer is directly determined by function \({\mathscr {P}}^{-1}\):
Note that \({\mathscr {A}}_{s}\) represents the N.th to \(2 \times N.th\) elements of adjoint sensitivity \({\mathscr {A}}\). Thus for the hidden layer we have:
Where \(\varvec{\theta }_{H,nb}^{(2)}\) means the weight matrix without elements related to bias, and \({\varvec{i}}\) and \({\varvec{o}}\) with subscript H means elements of the tensor produced by H net. Similar expressions are also used in R net:
and:
Appendix B: Gradients
State estimation is considered as a constrained optimization problem in BDNN:
Define \({\varvec{w}}\in {\{\varvec{\theta },\varvec{\varepsilon }\}}\). According to NODE, the Gradients of BDNN can be derived using \(\textit{Lagrange Multiplier}\):
Then the gradient is:
There is obviously a solution:
Let:
we have:
then there is the gradient of Algorithm 1:
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.
About this article
Cite this article
Li, C., Zhao, F., Lan, X. et al. Bidirectional dynamic neural networks with physical analyzability. Nonlinear Dyn 111, 16309–16324 (2023). https://doi.org/10.1007/s11071-023-08672-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11071-023-08672-8