Some variational aspects of an automatic control problem