필터 지우기
필터 지우기

Fundamental of power spectral density PSD?

조회 수: 9 (최근 30일)
Mary Jon
Mary Jon 2013년 12월 28일
편집: Wayne King 2013년 12월 29일
,How can specifying the Fundamental?can I take mean value? How can I specifying all other harmonic in this signal ,first ,second harmonic and so on? for this code ?
Fs = 150;
t = 0:1/Fs:1;
x = cos(2*pi*10*t);
%filter from DC component
x=x';
Sig2=x;
w333 =kaiser(151,3.5); %windowing by kaiser window
Sig2 = Sig2.*w333;
SigDFT = fft(Sig2,512);
SigDFT = SigDFT(1:257);
plot(abs(SigDFT))
plot(Sig2); grid on;

채택된 답변

Wayne King
Wayne King 2013년 12월 28일
Are these two peaks harmonically related? In other words, is the second peak an integer multiple of the first peak. In that case, it is customary to call the lower frequency peak the fundamental and subsequent integer multiples of that peak are the higher harmonics.
  댓글 수: 5
Wayne King
Wayne King 2013년 12월 28일
And I need to know how you obtained that PSD estimate. In other words, what is the sampling frequency of the time data, show the MATLAB code you used, without that information nobody knows what the physical frequencies are.
Mary Jon
Mary Jon 2013년 12월 28일
편집: Mary Jon 2013년 12월 28일
this is code
%c1 particle size=2hy,2hx---d=1hy---tc=4-----permittivity=4
c1=[3.4579e-016 3.455e-016 3.4588e-016 3.4646e-016 3.4707e-016 3.4754e-016 3.4788e-016 3.4811e-016 3.4828e-016 3.4837e-016 3.4836e-016 3.4818e-016 3.4783e-016 3.4744e-016 3.4715e-016 3.4701e-016 3.4701e-016 3.4715e-016 3.4744e-016 3.4783e-016 3.4818e-016 3.4836e-016 3.4837e-016 3.4828e-016 3.4811e-016 3.4788e-016 3.4754e-016 3.4707e-016 3.4646e-016 3.4588e-016 3.455e-016 3.4579e-016];
A=sum(c1);
AVE1=A/32;
w=c1-AVE1; %filter from DC component
w=w'
Sig2=w;
w333 =kaiser(32,3.5); %windowing by kaiser window
Sig2 = Sig2.*w333;
SigDFT2 = abs(fft(Sig2,512).^2); %FFT &PSD
SigDFT33=circshift(SigDFT2 ,size(SigDFT2 ,1)/2+1)
plot(SigDFT33);

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

추가 답변 (2개)

Wayne King
Wayne King 2013년 12월 28일
편집: Wayne King 2013년 12월 28일
The answer is you are only seeing one peak in your signal. When you obtain a two-sided (negative and positive frequencies) PSD estimate of a real-valued signal, each real-valued sine wave results in two peaks (it is a sum or difference of two complex exponentials).
You can remove this redundancy by just retaining one side, which I show you how to do below.
A=sum(c1);
AVE1=A/32;
w=c1-AVE1; %filter from DC component
w=w';
Sig2=w;
w333 =kaiser(32,3.5); %windowing by kaiser window
Sig2 = Sig2.*w333;
SigDFT = fft(Sig2,512);
SigDFT = SigDFT(1:257);
plot(abs(SigDFT))
Now to determine the physical frequency corresponding to that peak, you must tell me what the sampling frequency or sampling interval is. For each pair of elements in your signal, cl, what is the separation between them in time or space?
You can clearly see just by plotting the "time" signal
plot(Sig2); grid on;
That the period is about 12 samples, but without knowing the difference between those samples, nobody can tell what that frequency is other than saying it's about 1 cycle per 12 samples.
  댓글 수: 5
Wayne King
Wayne King 2013년 12월 28일
There really doesn't appear to be other harmonics present, but do you have the Signal Processing Toolbox? If so there is a function for that thd()
Mary Jon
Mary Jon 2013년 12월 29일
for this code ,how calculat the harmonic?
Fs = 150;
t = 0:1/Fs:1;
x = cos(2*pi*10*t);
%filter from DC component
x=x';
Sig2=x;
w333 =kaiser(151,3.5); %windowing by kaiser window
Sig2 = Sig2.*w333;
SigDFT = fft(Sig2,512);
SigDFT = SigDFT(1:257);
plot(abs(SigDFT))
plot(Sig2); grid on;

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


Wayne King
Wayne King 2013년 12월 29일
편집: Wayne King 2013년 12월 29일
There is only one sine wave in this signal. There are no harmonics.
Fs = 150;
t = 0:1/Fs:1;
x = cos(2*pi*10*t);
%filter from DC component
x=x';
Sig2=x;
w333 =kaiser(151,3.5); %windowing by kaiser window
Sig2 = Sig2.*w333;
NFFT = 512;
SigDFT = fft(Sig2,NFFT);
SigDFT = SigDFT(1:NFFT/2+1);
plot(abs(SigDFT))
To create a meaningful frequency vector.
df = Fs/NFFT;
freqvec = 0:df:Fs/2;
plot(freqvec,abs(SigDFT))
Now you see in the above plot that the peak is at 10 Hz. This is what I have been trying to tell you. You have to know the sampling frequency.

카테고리

Help CenterFile Exchange에서 Frequency Transformations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by