- #1
jblc
- 10
- 0
Q: How do you find the phase between an input and output signal? These signals are swept-sin (chirp: https://en.wikipedia.org/wiki/File:Linear-chirp.svg) signals for system identification, so I'm looking to find a transfer function.
Background: A frequency-domain Transfer Function's magnitude is found by taking the ratio of the output/input FFTs:
FFTratio = Complex{FFT out} / Complex{FFTin}, ∴ Magnitude = abs(FFTratio).
To find the phase, take the angle between the complex FFTs:
atan2( Imag{FFTratio}, Real{FFTratio} )
As a test, in Matlab's System Identification Tool, with two simple, 140 deg shifted and noisy 10 Hz sinusoids -- NON-swept, just simple sines -- the answer is as expected, and the phase is appr. -140 deg at 10 Hz in the phase plot.
Question: BUT when using two simulated constant-phase-shifted chirps, for system identification (chirp), the phase isn't a constant -140 Hz.
The phase drops dramatically from -140 deg near 1 Hz, and above 10 Hz it goes towards -5000 deg. See the attached images. The chirps are 0.01 Hz sinusoid at t=0, and a 400 Hz sinusoid at t=200s.
A zoomed 20s signal is shown for clarity. yc is output (top), uc is input (bottom).
Why is the phase not a constant -140 deg up until ~400 Hz? Why does the phase drop to -5000 deg? The swept-sin (chirp) peaks continue to remain at a constant phase relative to each other, so it should stay at -140
Attachments:
2x time-signals
1x FFTs of output(top) and input (bottom), called "Periodogram"
1x transfer function estimate, magnitude on top, phase on bottom
Background: A frequency-domain Transfer Function's magnitude is found by taking the ratio of the output/input FFTs:
FFTratio = Complex{FFT out} / Complex{FFTin}, ∴ Magnitude = abs(FFTratio).
To find the phase, take the angle between the complex FFTs:
atan2( Imag{FFTratio}, Real{FFTratio} )
As a test, in Matlab's System Identification Tool, with two simple, 140 deg shifted and noisy 10 Hz sinusoids -- NON-swept, just simple sines -- the answer is as expected, and the phase is appr. -140 deg at 10 Hz in the phase plot.
Question: BUT when using two simulated constant-phase-shifted chirps, for system identification (chirp), the phase isn't a constant -140 Hz.
The phase drops dramatically from -140 deg near 1 Hz, and above 10 Hz it goes towards -5000 deg. See the attached images. The chirps are 0.01 Hz sinusoid at t=0, and a 400 Hz sinusoid at t=200s.
A zoomed 20s signal is shown for clarity. yc is output (top), uc is input (bottom).
Why is the phase not a constant -140 deg up until ~400 Hz? Why does the phase drop to -5000 deg? The swept-sin (chirp) peaks continue to remain at a constant phase relative to each other, so it should stay at -140
Attachments:
2x time-signals
1x FFTs of output(top) and input (bottom), called "Periodogram"
1x transfer function estimate, magnitude on top, phase on bottom