DWPT based sleep apnea detection