# How to find the phase lag between a sinusoidal input force and the response?

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.

-
It would be best if you could show a plot of your data and/or any code that you're using. – Jason R Jan 31 '13 at 18:02
If the system is known, the phase lag is directly found from the system equation. Otherwise, you must find the system's impulse response, and if it has a linear phase vs frequency dependance, then the intercept of the linear term at zero frequency would be the phase lag. – mbaitoff Jan 31 '13 at 18:16
To measure what the phase lag is you have to cross-correlate the input and output. Is that what you are doing with the FFT? – Jim Clay Jan 31 '13 at 19:50
Do you know the frequency ahead of time? is it a single frequency and no other noise factors at that frequency? – thang Jan 31 '13 at 20:38
You stated "I get a deformation of sinusoidal form as well". Can you clarify this statement, if you are distorting the signal, you have a nonlinear process and linear techniques to recover phase information arn't going to work. – user2718 Feb 1 '13 at 15:41