  The use of recurrent neural networks to represent the dynamics of unstable
systems is difficult due to the need to properly initialize their internal
states, which in most of the cases do not have any physical meaning, consequent
to the non-smoothness of the optimization problem. For this reason, in this
paper focus is placed on mechanical systems characterized by a number of
degrees of freedom, each one represented by two states, namely position and
velocity. For these systems, a new recurrent neural network is proposed:
Tustin-Net. Inspired by second-order dynamics, the network hidden states can be
straightforwardly estimated, as their differential relationships with the
measured states are hardcoded in the forward pass. The proposed structure is
used to model a double inverted pendulum and for model-based Reinforcement
Learning, where an adaptive Model Predictive Controller scheme using the
Unscented Kalman Filter is proposed to deal with parameter changes in the
system.
