With the development of new technologies and electronic devices, one of the main topic of special concern is the aspect of power quality, amongst which control and prediction of harmonics are of utmost importance. The presence of harmonics caused by nonlinear loads which are common in Industrial plants and large scale office buildings means a threat to the sensitive equipments like that of computers, adjustable speed drives, power electronics load etc. Harmonic pollution causes electrical noises, sensitive equipment malfunctioning, tripping of circuit breakers, accelerated ageing of equipments, excessive temperature rises in motors which ensures the importance of harmonic mitigation in power system, also its mitigation is important in order to avoid the fines & costs associated with the poor power quality they are responsible for. The proposed technique discussed in this paper uses P,Q theory and PI controller to mitigate the Grid connected Solar DG unit harmonics with closed loop power control. It is a current controlled technique basically an Active Harmonic Filtering Technique. The proposed DG unit also achieves Zero Steady state tracking error. Simulated results in MATLAB validates the correctness of this method.