Control Analysis for Grid Tied Battery Energy Storage System for SOC and SOH Management