Introduction to Variational Methods in Control Engineering