Electrical vehicle fed by photovoltaic energy represents a complex system, which needs a high-performance control algorithm. Regarding the real situations, mostly the electric vehicle will be moving inside the city. If this system is covered by photovoltaic cells, the efficiency of this renewable energy source will depend on various factors. The shade areas or sunlight zones which exist in the city make the solar system unstable. Resolving this problem can increase the battery autonomy and allow addition of some running kilometers to the vehicle. Based on this objective, this study deals with the problem of solar variation and its influence on vehicle efficiency within the city. The problem is how to extract the maximum energy in this case. In order to maximize the global energy performance and increase vehicle autonomy, the optimal control method will be applied to this photovoltaic system taking into account some performance indicators such as the obtained power, the tracking speed, and the chattering level. Therefore, this study explores two control techniques in order to extract the maximum power from the solar energy system, which are the incremental method and the particle swarm optimization method. Simulink/MATLAB tool is used for simulation and comparison study based on the offered performance indicators. The obtained results show that the particle swarm optimization method has high global performance and an energy gain is obtained.