Photovoltaic energy systems have an important role in electricity generation. Although photovoltaic systems are renewable, environmentally-friendly, silent and non-fuelled, they still have various disadvantages such as high investment cost and low efficiency. In order to get highest efficiency from photovoltaic systems in different operation conditions, solar panels and arrays should be operated at maximum power points. At maximum power point, solar arrays generate the electric energy at maximum efficiency and minimum losses. Some algorithms are used in photovoltaic systems to provide maximum efficiency and minimum losses. The perturbation and observation (P&O) algorithm have been well known algorithm. Although it is an easily applicable algorithm, it has important ripple problems when it reaches to maximum power point. This paper introduces an improvement on conventional P&O algorithm to eliminate ripple problem and it applied on grid connected system. In this approach, ripples are eliminated by obtaining reference current value under variable and constant solar irradiation conditions. This algorithm proposes variable power perturbation with fill factor. In the end, it was evaluated along with simulation, experimental results