A multi-string grid-connected two-stage photovoltaic system acting as an active power filter with antiislanding and fault protection is presented. The inverter is current controlled for harmonic compensation. Harmonics in the load current are detected by a time-domain technique. A time-domain technique based anti-islanding method is proposed. Moreover, our time-domain technique is also utilized to detect faults in the dc bus of the inverter. The simulations were performed in PSCAD/EMTDC, and experimental results are provided to validate the concept. Figure 18. APF operation under balanced supply and load, a) and b) current of the inverter in dq-domain c) nonlinear load current d) sinusoidal grid voltage and current.