how I can analyze this magnitude of 1D signal

조회 수: 1 (최근 30일)
ZhG
ZhG 2013년 11월 4일
댓글: ZhG 2013년 11월 5일
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)).

채택된 답변

Wayne King
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
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.
ZhG
ZhG 2013년 11월 5일
편집: ZhG 2013년 11월 5일
I did it as you advised,and I obtain this spectrum (the 2nd is 'detrend' on this graphy). But how can I analyze it ? I mean that how I can obtain some useful information from this graph. Thanks for any advice.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Wayne King
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.
  댓글 수: 1
ZhG
ZhG 2013년 11월 5일
Yes, I did the DFT by using 2*pi/N, where N is the length of points number.
x = x-mean(x);
N = length(x); % points number
k = 0:N-1;
w = (2*pi)/N * k;
a1 = [];
xD = 0;
for n=1:N
a1(n,:) = exp(-sqrt(-1)*w*(n))*x(n);
end
xD = -1*sum(a1); % multplied by -1, so that the result equals to fft(a1)
Then, I obtained the abs(xD), as it is shown in the graph. And then I want to obtain one or more measures of this spectrum as a representation or a property of the signal. For example, the maximum magintude in the spectrum. Is this possible?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by