Principles of Cyber-Physical Systems