Modeling, simulation and control of an electric diwheel