Phase synchronization is an important phenomenon of nonlinear dynamics and has recently received much scientific attention. In this work a method for identifying phase synchronization epochs is described which focuses on estimating the gradient of segments of the generalized phase differences between phase slips in an experimental time series. In phase synchronized systems, there should be a zero gradient of the generalized phase differences even if the systems are contaminated by noise. A method which tests if the gradient of the generalized phase difference is statistically different from zero is reported. The method has been validated by numerical studies on model systems and by comparing the results to those published previously. The method is applied to cardiorespiratory time series from a human volunteer measured in clinical settings and compared to synchrogram analysis for the same data. Potential problems with synchrogram analysis of experimental data are discussed.