Logic-based switching control of nonlinear systems using high-gain observers