Cyber risk modeling and attack-resilient control for power grid