Renewable generation affects power quality due to its nonlinearity, since solar generation plants and wind power generators must be connected to the grid through high-power static PWM converters. This paper presents active power filter implemented with a four-leg voltage-source inverter. A Novel predictive control scheme is implemented to control the inverter. The main features of this control scheme is  1) To control power converter to inject power generated from RES to the grid, and 2)To act as a shunt APF to compensate current unbalance, load current harmonics, load reactive power demand and load neutral current. The compensation performance of the proposed active power filter and the associated control scheme under steady state and transient operating conditions is demonstrated through simulations results.  3) The results are presented for both wind & solar type renewable power generation systems.