Experimental study of magnetospheric motions and the acceleration of energetic electrons during substorms