Heart rate variability (HRV) is an important and useful index to assess the responses of the autonomic nervous system (ANS). HRV analysis is performed using electrocardiography (ECG) or photoplethysmography (PPG) signals which are typically subject to noise and trends. Therefore, the elimination of these undesired conditions is very important to achieve reliable ANS activation results. The purpose of this study was to analyze and compare the effects of preprocessing on the spectral analysis of HRV signals obtained from PPG waveform. Preprocessing consists of two stages: filtering and detrending. The performance of linear Butterworth filter is compared with nonlinear weighted Myriad filter. After filtering, two different approaches, one based on least squares fitting and another on smoothness priors, were used to remove trends from the HRV signal. The results of two filtering and detrending methods were compared for spectral analysis accomplished using periodogram, Welch's periodogram and Burg's method. The performance of these methods is presented graphically and the importance of preprocessing clarified by comparing the results. Although both filters have almost the same performance in the results, the smoothness prior detrending approach was found more successful in removing trends that usually appear in the low frequency bands of PPG signals. In conclusion, the results showed that trends in PPG signals are altered during spectral analysis and must be removed prior to HRV analysis. (C) 2012 Elsevier Ltd. All rights reserved.