A mechanical CPR device, comprising: a piston having a suction cup attached at an end thereof; a driving component configured to, in use, extend the piston toward a patient's torso and retract the piston away from the patient's torso; and a controller configured to determine a reference position by controlling the driving component to at least: extend the piston until a first position at which the suction cup comes into contact with the patient's torso, further extend the piston to cause air to be forced out from an area between the suction cup and the patient's torso until a first threshold is reached; and retract the piston until the suction cup is at the first position, further retract the piston from the first position until a second threshold is exceeded, and extend the piston to a point at which the second threshold is no longer exceeded, the reference position being based at least in part on the point; wherein the controller is further configured to perform mechanical CPR by controlling the driving component to at least: compress the patient's torso by extending the piston from the reference position to a depth and retracting the piston from the depth to the reference position; and actively decompress the patient's torso by retracting the piston from the reference position to a height above the reference position, whereby the patient's torso is decompressed above the torso's natural resting position and above the reference position; and wherein the reference position is the position from which the depth of CPR compressions and the height of decompressions are measured. a piston having a suction cup attached at an end thereof; a driving component configured to, in use, extend the piston toward a patient's torso and retract the piston away from the patient's torso; and a controller configured to determine a reference position by controlling the driving component to at least: extend the piston until a first position at which the suction cup comes into contact with the patient's torso, further extend the piston to cause air to be forced out from an area between the suction cup and the patient's torso until a first threshold is reached; and retract the piston until the suction cup is at the first position, further retract the piston from the first position until a second threshold is exceeded, and extend the piston until a first position at which the suction cup comes into contact with the patient's torso, further extend the piston to cause air to be forced out from an area between the suction cup and the patient's torso until a first threshold is reached; and retract the piston until the suction cup is at the first position, further retract the piston from the first position until a second threshold is exceeded, and extend the piston to a point at which the second threshold is no longer exceeded, the reference position being based at least in part on the point; wherein the controller is further configured to perform mechanical CPR by controlling the driving component to at least: compress the patient's torso by extending the piston from the reference position to a depth and retracting the piston from the depth to the reference position; and actively decompress the patient's torso by retracting the piston from the reference position to a height above the reference position, whereby the patient's torso is decompressed above the torso's natural resting position and above the reference position; and wherein the reference position is the position from which the depth of CPR compressions and the height of decompressions are measured. compress the patient's torso by extending the piston from the reference position to a depth and retracting the piston from the depth to the reference position; and actively decompress the patient's torso by retracting the piston from the reference position to a height above the reference position, whereby the patient's torso is decompressed above the torso's natural resting position and above the reference position; and wherein the reference position is the position from which the depth of CPR compressions and the height of decompressions are measured.