how I can analyze this magnitude of 1D signal
조회 수: 1 (최근 30일)
이전 댓글 표시
This is a DFT magnitude graph of a set of 1D points. How can I analyze it? Can I say that the lowest frequency contribute most or the 0 frequency contribute most? It is not 0 frequency, isn't it? The 0 frequency is DC component before getting magnitude with abs(fft(s1)).
댓글 수: 0
채택된 답변
Wayne King
2013년 11월 4일
If the large value shown in the figure corresponds to 0 frequency, then that simply means the signal has a nonzero DC value. The 0 frequency component in the DFT is simply the sum of all elements in the input signal, or N times the mean value of the signal, where N is the number of elements in the signal.
Quite often, the zero frequency component is not of interest when doing a frequency analysis. To remove that, simply remove the mean from the signal.
For example, compare:
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = 20+cos(2*pi*100*t)+randn(size(t));
xdft = fft(x);
xdft = xdft(1:length(x)/2+1);
plot(abs(xdft))
% remove mean
xnew = x-mean(x);
xdftnew = fft(xnew);
xdftnew = xdftnew(1:length(x)/2+1);
plot(abs(xdftnew))
댓글 수: 3
Wayne King
2013년 11월 4일
Yes, I would say so, because you don't need to have the DFT to know what the zero frequency component is, sum(x) will give you that information.
추가 답변 (1개)
Wayne King
2013년 11월 5일
편집: Wayne King
2013년 11월 5일
You have a real-valued signal, so you only need 1/2 your magnitudes. I can't tell from your graph if your signal has even length or odd length. I'll assume length 52
Each frequency bin has spacing Fs/N Hz where N is the length of the signal and Fs is the sampling frequency. If you are just using normalized frequency, then the spacing is (2*pi)/N radians/sample.
n = 0:51;
x = cos((2*pi)/13*n);
xdft = fft(x);
xdft = xdft(1:length(x)/2+1);
stem(abs(xdft))
The sine wave has a frequency of (2*pi)/13 radians/sample. The spacing of the "bins" in the DFT is (2*pi)/52 radians/sample. Because the first bin xdft(1) corresponds to zero frequency, you expect the frequency of (2*pi)/13 radians/sample to fall on xdft(5), which it does.
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!