필터 지우기
필터 지우기

How to effectively remove the DC component from a frequency spectrum analysed using Welch's Method?

조회 수: 5 (최근 30일)
I am looking at ultrasound signals using the Welch Transform in the frequency range 0 - 5 MHz, the section of code for which is below. I am getting peaks around 0-1 MHz in my results that I do not believe are real, I have corrected for the DC component by taking the mean from the data, however there is still a small peak at this frequency even when using an ideal sine wave generated in MATLAB (red box in images, Fig. 1 generated data, Fig 3. actual data). This cause significant problems due to the low signal levels in the actual data. Is there any obvious reason this is still present or how to get rid of it? Thanks
%% sample Welch
sample_line1 = datasample1transpose(1:datareclength, 1);
figure
plot(t, sample_line1);
title('Reference Pulse')
xlabel ('no of points'); grid; zoom;
no_pulses_per_line=input('Enter the number of pulses per line: ','s');
no_pulses_per_line = str2double(no_pulses_per_line);
for k = 1:no_pulses_per_line
figure
plot1 = plot(sample_line1);
title('Reference Pulse')
xlabel ('no of points'); grid; zoom;
disp('Click either side of region to zoom')
[x,y] = ginput(2);
set(gca, 'xlim',[x(1) x(2)]);
clear x y
disp('Click the start point')
[x,y] = ginput(1);
start_point = round(x(1));
%end_point =round(x(2));
end_point = start_point + 4095;
sample_section = sample_line1(start_point:end_point); [size_x, size_y] = size(sample_section); sample_section_mean_matrix = mean(sample_section).*ones(size_x, size_y); %sample_section_std_matrix = std(sample_section).*ones(size_x, size_y); sample_section_zero_mean = (sample_section - sample_section_mean_matrix); sample_section_padded = padarray(sample_section_zero_mean, 512);
Nfft = length(sample_section_padded); sample_sections (1:Nfft, k) = sample_section_padded;
end
frequency = linspace(0,sampling_freq,Nfft); freq_mhz = frequency/1000000;
Sensitivity_mhz_full = interp1(freq_profile, sensitivity, freq_mhz);
wsize = 2048; nover = wsize * 50/100; w = hann(wsize);
[welchsample, f] = pwelch(sample_sections, w, nover, frequency, sampling_freq ); % Welch's periodogram of the data welchsample1 = (sampling_freq./2).*welchsample; %% welchsampleav = mean(welchsample, 2);
welchsample1av =mean (welchsample1, 2);
welchsample1_corrected_recieve = welchsample1av'./Sensitivity_mhz_full; % correcting for sensitivity of receive probe
dBwelch = 10*log10(welchsample1_corrected_recieve);
figure plot(freq_mhz,dBwelch,'k'); title('Welch Spectrum'); xlabel('Frequency(MHz)'); ylabel('Amplitude (dB) '); set(gca,'xlim',[lower_lim upper_lim]);
  댓글 수: 1
David Morrill
David Morrill 2022년 7월 21일
I am having the exact same issue, even when I subtract out the average value of the data.
I then created a dataset with DC only and it still shows the hump that you are describing. Were you able to resolve this?

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

답변 (1개)

Chinmayi Lanka
Chinmayi Lanka 2017년 1월 18일
You can use the 'DCBlocker' system object that is available in the DSP System toolbox to remove the DC Component of the incoming signal. The following documentation provides a few examples on the usage of this system object: http://www.mathworks.com/help/dsp/ref/dsp.dcblocker-class.html
  댓글 수: 1
Chintan Varia
Chintan Varia 2017년 6월 5일
Hi Chinmayi Lanka. Do you have any idea, what should be the Normalized bandwidth of lowpass IIR filter and Order of lowpass IIR elliptic filter in DC Blocker to get output signal of 50Hz? My input signal is in continuous form.

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

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

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