Modeling and Real-Time Control of Energy Storage Using HPCS Technologies