Resilient Control And Intrusion Detection For Scada Systems