MODELING A RESIDENTIAL GRID CONNECTED PV SYSTEM WITH BATTERY