Examples described herein include a medical device system comprising an accelerometer circuitry configured to output a signal indicative of variations in accelerations along a single axis of movement of patient; and processing circuitry configured to receive the output signal from the accelerometer, and to rectify the output signal to generate a rectified signal, wherein rectification of the output signal comprises generating a rectified value for each of a plurality of moving windows imposed over the output signal, wherein generating the rectification value for each of the plurality of moving windows comprises determining a current value of the output signal for the window, determining a maximum value for a portion of the output signal enclosed by the window, and subtracting the current value from the maximum value; and analyze the rectified signal to detect the occurrence of a step taken by a patient based on the rectified signal.