Observer Design for Detection of Attack Patterns in Cyber-Physical Systems