Energy management of internet data centers in smart grid