Polynomial Decomposition for a P-wave Detection and Analysis