Design and modeling of a MEMS-based accelerometer with pull in analysis