There would be three motors total on this vehicle.
1) The driving motor
- An obvious purpose for this one: hook it up to the back wheel and make it spin. Perhaps we could do something clever like utilize the 21-speed transmissions standard on most bikes nowadays in conjunction with an electric shifter such as the one Nico Paris is trying to develop.
2) The steering motor
- It'd be nice to be able to point the bike where we want it to go. Again, pretty obvious here. We'd hook up a nice torque-ful motor with position feedback and she'd steer up a storm.
3) The balancing motor
- The trickiest of all the bits that make up a self riding bicycle I'd say. So, some physics explanations- human riders balance the centripetal force acting on them and their bikes by leaning into turns. Same goes for perturbations- if someone comes up and tries to push a rider off his or her bike all the rider needs to do is lean in the direction of the push and they'll recover if the push wasn't too hard.
- So, we need a leaning device. This leaning device needs to be pretty massive, but just how massive is still up in the air. The real kicker is figuring out how quickly we can accelerate this leaning device, because the faster the mass is accelerated the less mass there needs to be to generate that necessary torque, err lean.
- The clever part kicks in here. Since we need batteries and other weighty stuff to make this bike roll on its own, why not swing that otherwise dead weight around to act as our counterbalance? I thought it was clever anyway... I'm actually kind of excited to get into the numbers of this problem, figuring out just how much torque needs to be generated to get the bike to a) stand up on its own and b) react to outside disturbances.
[ τ = I⍺ ]