A Robust Algorithm for Identification of Motion Artifacts in Photoplethysmography Signals