Method for automatically analyzing the energy of human locomotion