Dynamics of the auroral electrojets and their mapping to the magnetosphere