Optimal State Estimation Of Cyber-Physical Systems