Distribution static compensator is based on power electronic devices technology which is utilized to supply rapid changes in active power as well as reactive power of utility grids. This is useful to achieve corrections in power factor, balancing of load, compensation of current and filtering of harmonics. Therefore, proposed work investigates the improvement of the power quality by utilizing the distribution static compensator, which is equipped by battery energy storage system and interfaced to distribution network with solar photo voltaic (PV) energy integration. In the present study, distribution static compensator is controlled using a control strategy based on the synchronous reference frame theory. Customised IEEE-13 nodes test system incorporating solar PV generation and distribution static compensator, is utilized to perform the harmonic mitigation and power quality analysis. Disturbances of power quality and harmonics have been investigated due to abrupt changes in the insolation of solar radiation, outage of PV plant from grid and synchronization of PV plant to grid. MATLAB/Simulink environment is utilized to perform the study. Effectiveness of a developed approach is validated by comparing results of simulation with results extracted in real time using real time digital simulator. Results indicate that the developed method is more effective for harmonic mitigation and improving power quality of electrical power in distribution network integrated with solar PV generation. Performance of the approach is compared with the performance of methods reported in the literature to establish the suitability of the method for harmonics mitigation and power quality improvement in grid with solar energy. 1 INTRODUCTION In recent years, renewable energy (RE) sources have captured global interests among academic institutions, industries, and governments due to their numerous advantages for improving energy reliability, efficiency, and minimizing carbon emission [1, 2]. RE resources like wind energy and solar photovoltaic (PV) are extensively used for generation of power at the grid level due to their capability of minimum impact on the environment, sustainability, zero fuel cost, minimum operation cost of the plant, and pollution-free electricity generation [3, 4]. The solar This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.