Resilient Control in Cyber-Physical Systems