AUTOMATIC SWITCHING STRATEGY OF GRID CONNECTED OFF GRID MODE OF