AN INTEGRATED APPROACH FOR THE ANALYSIS AND CONTROL OF GRID CONNECTED