An optimal two-input approach for impulse measurements in the nanoN-s range produced by contact forces