Why does pwelch signal magnitude change with frequency?
4 views (last 30 days)
Show older comments
I am sampling a signal with high and low frequency components that I know should occur. My sampling rate is 2.56*10^4 Hz, and I have 577664 data points in the input vector x.
I am using pwelch and a blackman-harris window with 50% overlap to estimate the magnitude of my signal in the frequency domain with the code example below.
When I use the code below, the low frequency magnitudes (0 to 200 Hz) are about 30 dB greater than what I expect and the high frequency components (600 to 1000 Hz) are about 20 dB lower than I expect. Why would this happen and how can I fix it?
Thank you.
Code Example:
fs = 2.56*10^4;
n = fs/2;
win = blackmanharris(floor(n)); % Window Function
[magFFTX,f] = pwelch(x,win,floor(n/2),[],fs); % Calculate Mag and f
fbin = f(2,1) - f(1,1); % Calculate frequency bin
%CG = 0.5400; % Coherent Gain of Hamming Window
%NG = 0.3974; % Noise Gain of Hamming Window
%CG = 0.5000; % Coherent Gain of Hanning Window
%NG = 0.3750; % Noise Gain of Hanning Window
CG = 0.3587; % Coherent Gain of Blackman-Harris Window
NG = 0.2580; % Noise Gain of Blackman-Harris Window
scalingFactor = NG.*fbin./(CG.^2);
magFFTX = magFFTX.*scalingFactor;
magFFTX = magFFTX ./(10^-6); % Convert to micro g
magFFTX = 20.*log10(magFFTX ); % Convert to dB
plot(f,magFFTX);
xlim([0 1000]);
12 Comments
John BG
on 10 Jan 2017
Edited: John BG
on 10 Jan 2017
ok,
1.
is the comb of tones you supplied as example, just an example, or is it the real signal you want to analyse?
I ask this because the window to apply depends upon the type of signal you want to analyse.
2.
would you consider splitting the input spectrum into smaller bands and analyse them separately?
3.
If the supplied signal is not the signal you want to analyse, would it be possible to have a look at the the actual signal?
4.
what kind of signals are you working with
Are you analysing coupled interference across different loops?
or are you monitoring wireless traffic picked by a mobile communications tower?
Answers (0)
See Also
Categories
Find more on Spectral Estimation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!