Real-time Intrusion Detection of Cyber Physical Systems