The essential goal of this research is designing and modeling a speed and position tracking system for driving an electric bike (e-bike) motordrive. This motor is a brushless DC (BLDC) motor as a high-performance drive. It is supplied from twin electric sources to drive it and charge the storage elements (i.e., batteries, super-capacitors, etc.). The first one is a renewable, neat, and clean source photovoltaic (PV) module and the second one is a pedal generator driven by the rider. The submitted design of the controllers is optimized to improve the system’s dynamic stability. The artificial bee colony (ABC) as an artificial intelligent (AI) algorithm is suggested for searching the optimal gains of the proposed proportional-integral-derivative (PID) controllers by reducing the error of its fitness function. The system behavior is studied with that controller when directly feeding from the PV array with and without batteries. The response of the proposed technique - against dynamic troubles and PV oscillations such as irradiance- is also verified. Other evolutionary computational techniques - such as ant colony optimization (ACO) and genetic algorithm (GA)- have been compared with the behavior of the proposed controller to ensure high efficiency in optimized tuning of PID gains. Then, the proposed controller that gives a high performance will be executed in real-time by using OPAL-RT 4510 RT-simulator and rapid control prototyping.