Study on the stability and motion control of a unicycle