A framework for control, fault detection, state estimation and verification of hybrid systems