R-PEAK detection apparatus and control method thereof