Detectability based state space reductions for hybrid systems