Frequency Analysis of Linear and Nonlinear Systems for Applications in Fault Detection and Medical Diagnosis