Abstract
Optimal control theory allows finding the optimal input of a mechanical system modelled as an initial value problem. The resulting minimisation problem may be solved with known direct and indirect methods. We propose time discretisations for both methods, direct midpoint (DMP) and indirect midpoint (IMP) algorithms, which despite their similarities, result in different convergence orders for the adjoint (or co-state) variables. We additionally propose a third time-integration scheme, Indirect Hamiltonian-preserving (IHP) algorithm, which preserves the control Hamiltonian, an integral of the analytical Euler–Lagrange equations of the optimal control problem.
We test the resulting algorithms to linear and nonlinear problems with and without dissipative forces: a propelled falling mass subjected to gravity and a drag force, an elastic inverted pendulum, and the locomotion of a worm-like organism on a frictional substrate. To improve the convergence of the solution process of the discretised equations in nonlinear problems, we also propose a computational simple suboptimal initial guess and apply a forward–backward sweep method, which computes each set of variables (state, adjoint and control) in a staggered manner. We demonstrate in our examples their practical advantage for computing optimal solutions.
Similar content being viewed by others
References
Bayón, L., Otero, J., Suárez, P., Tasis, C.: New developments in the application of optimal control theory to therapeutic protocols. Math. Biosci. 272, 34–43 (2016)
Benzi, M., Golub, G., Liesen, J.: Numerical solution of saddle point problems. Acta Numer. 14, 1–137 (2005)
Betsch, P., Becker, C.: Conservation of generalized momentum maps in mechanical optimal control problems with symmetry. Int. J. Numer. Methods Eng. 111, 144–155 (2017)
Betts, J.: Practical Methods for Optimal Control and Estimation Using Nonlinear Programming, 2nd edn. SIAM, Philadelphia, USA (2010)
Bijalwan, A., Muñoz, J.J.: On the numerical stability of discretised Optimal Control Problems. IUTAM Bookseries, Springer. Under review. Available at http://arxiv.org/abs/2302.02464
Bottasso, C., Croce, A.: Optimal control of multibody systems using an energy preserving direct transcription method. Multibody Syst. Dyn. 12(4), 17–45 (2004)
Bryson, A., Ho, Y.: Applied Optimal Control. Optimization, Estimation and Control. Taylor & Francis, New York, U.S.A. (1975)
Djukić, D.S.: Noether’s theorem for optimum control systems. Int. J. Control 18(3), 667–672 (1973)
Flaßkamp, K., Murphey, T.: Structure-preserving local optimal control of mechanical systems. Optim. Control Appl. Methods 40(2), 310–329 (2019)
Fletcher, R., Reeves, C.: Function minimization by conjugate gradients. Comput. J. 7(2), 149–154 (1964)
Gonzalez, O.: Time integration and discrete Hamiltonian systems. J. Nonlinear Sci. 8, 449–467 (1996)
Gray, J., Lissmann, H.: The locomotion of nematodes. J. Exp. Biol. 41(1), 135–154 (1964)
Huang, K.-M., Cosman, P., Schafer, W.R.: Machine vision based detection of omega bends and reversals in C. elegans. J. Neurosci. Methods 158(2), 323–336 (2006)
Hull, D.G.: Optimal Control Theory for Applications. Mechanical Engineering Series. Springer, New York (2003)
Karrakchou, J., Rachik, M., Mostafa, S.: Optimal control and infectiology: application to an HIV/AIDS model. Appl. Math. Comput. 177(2), 807–818 (2006)
Kelley, C.T.: Iterative Methods for Optimization. SIAM, Philadelphia (1999)
Koch, M., Leyendecker, S.: Energy momentum consistent force formulation for the optimal control of multibody systems. Multibody Syst. Dyn. 29, 381–401 (2013)
Krieg, M., Stühmer, J., Cueva, J., Fetter, R., Spilker, K., Cremers, D., Shen, K., Dunn, A., Goodman, M.: Genetic defects in ß-spectrin and tau sensitize C. elegans axons to movement-induced damage via torque-tension coupling. eLife 6, e20172 (2017)
Lasdon, L., Mitter, S., Waren, A.: The conjugate gradient method for optimal control problems. IEEE Trans. Autom. Control 12(2), 132–138 (1967)
Lauß, T., Oberpeilsteiner, S., Steiner, W., Nachbagauer, K.: The discrete adjoint gradient computation for optimization problems in multibody dynamics. J. Comput. Nonlinear Dyn. 12(3), 031016 (2017)
Leyendecker, S., Ober-Blöbaum, S., Marsden, J.E., Ortiz, M.: Discrete mechanics and optimal control for constrained systems. Optim. Control Appl. Methods 39(6), 505–528 (2009)
McAsey, M., Mou, L., Han, W.: Convergence of the forward-backward sweep method in optimal control. Comput. Optim. Appl. 53, 207–226 (2012)
Miller, M., Trouvé, A., Younes, L.: Hamiltonian systems and optimal control in computational anatomy: 100 years since D’Arcy Thompson. Ann. Biomed. Eng. 17, 447–509 (2015)
Muñoz, J.J., Condamin, L., Doste, D.: On the net displacement of contact surface centroid in contractile bodies. Mech. Res. Commun. 119, 103809 (2022)
Nachbagauer, K., Oberpeilsteiner, S., Sherif, K., Steiner, W.: The use of the adjoint method for solving typical optimization problems in multibody dynamics. J. Comput. Nonlinear Dyn. 10(6), 061011 (2015)
Nocedal, J., Wright, S.: Numerical Optimization, 2nd edn. Springer, New York (2006)
Ober-Blöbaum, S., Junge, O., Marsden, J.: Discrete mechanics and optimal control: an analysis. ESAIM Control Optim. Calc. Var. 17(2), 322–352 (2011)
Pesch, H., Plail, M.: The cold war and the maximum principle of optimal control. Optimization Stories. Documenta Mathematica (2012)
Pikuliński, M., Malczyk, P.: Adjoint method for optimal control of multibody systems in the Hamiltonian setting. Mech. Mach. Theory 166, 104473 (2021)
Purcell, E.: Live at low Reynolds number. Am. J. Phys. 45(1), 3–11 (1977)
Rao, A.V.: A survey of numerical methods for optimal control. Adv. Astronaut. Sci. 135(1), 497–528 (2009)
Saad, Y.: Iterative Methods for Sparse Linear Systems, 2nd edn. SIAM, Philadelphia (2003)
Schmitthenner, D., Martin, A.: Comparing system identification techniques for identifying human-like walking controllers. R. Soc. Open Sci. 8(12), 211031 (2021)
Schwind, W., Koditschek, D.: Approximating the stance map of a 2-DOF monoped runner. J. Nonlinear Sci. 10(5), 533–568 (2000)
Sharma, H., Patil, M., Woolsey, C.: A review of structure-preserving numerical methods for engineering applications. Comput. Methods Appl. Mech. Eng. 366, 113067 (2020)
Sharp, J., Burrage, K., Simpson, M.: Implementation and acceleration of optimal control for systems biology. J. R. Soc. Interface 18, 20210241 (2021)
Simo, J., Tarnow, N.: The discrete energy-momentum method. Conserving algorithms for nonlinear elastodynamics. Z. Angew. Math. Phys. 43, 757–792 (1992)
Stengel, R.: Optimal Control and Estimation. Dover, New York, USA (1994)
Stephens, G., Johnson-Kerner, B., Bialek, W., Ryu, W.: Dimensionality and dynamics in the behavior of C. elegans. PLoS Comput. Biol. 4, e1000028 (2008)
Sussmann, H., Willems, J.: 300 years of optimal control: from the brachystochrone to the maximum principle. IEEE Control Syst. Mag. 17(3), 32–44 (1997)
Timmerman, P., van der Weele, J.P.: On the rise and fall of a ball with linear or quadratic drag. Am. J. Phys. 67(6), 538–546 (1999)
Acknowledgements
The authors acknowledge Dr. Michael Krieg and Dr. Ravi Das from the Institute of Photonic Sciences (ICFO, Spain) for their helpful discussions. This work is financially supported by the Spanish Ministry of Science and Innovation under grants CEX2018-000797-S and PID2020-116141GB-I00, and by the Generalitat de Catalunya local government, under grant 2021 SGR 01049.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing Interests
The authors declare that they have no conflict of interest.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
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
Bijalwan, A., Muñoz, J.J. A control Hamiltonian-preserving discretisation for optimal control. Multibody Syst Dyn 59, 19–43 (2023). https://doi.org/10.1007/s11044-023-09902-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11044-023-09902-y