Latching in a MEMS shock sensor: Modeling and experiments