I did fft of a fish's trajectory, because it looks periodic and I tried to find the frequency. However, I can't understand what does the phase spectrum below represent. Does this lower left to upper right curve have any special meaning?

enter image description here

enter image description here

Below is my Matlab code:

L = length(X);  
Fs = 30;            % Sampling frequency  
T = 1/Fs;             % Sampling period  
t = (0:L-1)*T;        % Time vector  
X = X - mean(X);  
y = fft(X);  
z = fftshift(y);  
ly = length(y);  
f = (-ly/2:ly/2-1)/ly*Fs;  
title("Double-Sided Amplitude Spectrum of x(t)")  
xlabel("Frequency (Hz)")  
tol = 1e-6;  
z(abs(z) < tol) = 0;  
theta = angle(z);  
title("Phase Spectrum of x(t)")  
xlabel("Frequency (Hz)")  
  • $\begingroup$ Can you provide more details about what your did to generate this plot? Usually one looks at the amplitude of the FFT output when looking for periodicity. $\endgroup$ Commented May 14, 2023 at 10:39
  • $\begingroup$ Read: Odd Symmetry of Phase Response $\endgroup$ Commented May 14, 2023 at 10:42
  • $\begingroup$ It would be much easier if you put the amplitude on a log scale in dB. $\endgroup$
    – Hilmar
    Commented May 16, 2023 at 11:44

1 Answer 1


A few things to consider here

  1. The DFT of a real signal is conjugate symmetric, i.e. $\varphi(-\omega) = - \varphi(\omega)$ so the left side of the graph is just the negative of the right half. Most people don't bother looking at negative frequencies since there is no independent information there.
  2. Interpreting the phase without looking at the amplitude is tricky. A real measurement will always have some amount of noise and limited signal to noise ratio (SNR) at low frequencies. The phase of $z=0$ is undefined and the phase of a small but noisy amplitude is just a random number. That seem to be the case here below maybe 3 Hz or so.
  3. The sudden jumps at 11Hz or 12 Hz are phase wrapping issues. You constrain the phase to the interval $[-\pi,+\pi]$. That means that if the "real" phase moves a small amount from, say 3.1 to 3.2, in your graph it jumps from 3.1 to -3.08. This can be improved by so-called "unwrapping" algorithms but that's not trivial for measured data with bad SNR at the band edges, so I recommend asking a different question around that.
  4. Above 13 kHz it looks very messy again. Could be a combination of wrapping and noise especially once you hit the frequency range where the anti-aliasing filter kicks in.

So overall it looks you have bad SNR at low frequencies and somewhat noisy but fairly well defined monotically increasing phase up to 13 Hz or so. That could be a property of the signal itself or some artifact of the data acquisition system or post-processing. Without cleaning up the graph first and also looking at the amplitude spectrum at the same time, that's very hard to tell.

  • $\begingroup$ I believe you wrote the definition of Conjugate Antisymmetric for Conjugate Symmetric. Albeit the answer should mention that the phase of the DFT of a real signal is conjugate antisymmetric, no? $\endgroup$ Commented May 14, 2023 at 20:32
  • $\begingroup$ The amplitude is added, sorry that I forgot to provide it. About the phase wrapping issues, thank you for the explanation, is it also the case at around 0Hz? $\endgroup$ Commented May 16, 2023 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.