This problem represents the simplest single-degree-of-freedom translational and rotational motion, a vasty simplified version of a mass-spring model.
This example was used to show in a very simple set up the differences in implementation of a method based on the separation principle of control theory, i.e. LQG [1], [2], and a method not using this explicit set of assumptions, i.e. active inference [3], [4]. The implications were first explained in [5], suggesting that the LQG approach fundamentally inspiring most of the work in psychology and neuroscience may present some intrinsic limitations. Active inference is then proposed as an alternative. A more complete version version of this manuscript is near completion.
The code requires at the moment the 'autograd' package for automatic differentiation, see https://github.com/HIPS/autograd.
[1]: Anderson, Brian, and John B. Moore. "Optimal control: linear quadratic methods." (1990).
[2]: Stengel, Robert F. Optimal control and estimation. Courier Corporation, 1994.
[3]: Friston, Karl. "The free-energy principle: a unified brain theory?." Nature reviews neuroscience 11.2 (2010): 127.
[4]: Buckley, Christopher L., et al. "The free energy principle for action and perception: A mathematical review." Journal of Mathematical Psychology 81 (2017): 55-79.
[5]: Baltieri, Manuel and Buckley, Christopher L.. "The modularity of action and perception revisited using control theory and active inference", Proceedings of the 2018 Conference on Artificial Life (2018)