A Biologically Inspired Framework for the Intelligent Control of Mechatronic Systems and Its Application to a Micro Diving Agent. (30th December 2018)