A general model for guiding the design of biomechatronic systems implantable into the brain