I have a system that is forced by a sinusoidal function with specific amplitude, phase and frequency. I get a deformation of sinusoidal form as well, and I would like to find the phase lag. I use FFT and isolate the phase lag numerically, it says it is pi/2 however when I look at the plots, it is not pi/2 at all. What can I do? Thank you. PS:Can provide FFT code if needed.