Mechanical design and analytic solution for unfolding deformation of locomotive ferromagnetic robots