Amplitude Increase when using bandpass filter

4 次查看(过去 30 天)
Hello,
I am trying to filter "Signal" (I attached only cell {1, 4} as the rest of the cell data is too large to attach here) using an appropriate filter. The frequency of the excited wave is 50 kHz, and the sampling frequency of the received wave is 60 MHz. I used a lowpass filter, with fpass as 5e4, fs as 6e7, and the signal returns as smooth and undistorted.`
I also attempted to use a bandpass filter, with upper and lower bands as 6e4 and 4e4 respectively, so as to try and keep the band close to 50 kHz. The high frequency oscillations are removed, but the signal returns is also distorted. Why is that? Any problems in my code? In addition, is my implementation valid, in both the lowpass filter and bandpass filter? What filter should I use, and why?
actuator = 1;
sensor = 4;
dt = 1.6667e-8;
endTime = 500e-6;
t = 0:dt:endTime;
fs = 6e7;
fpass = 5e4;
%%
a = Signal{actuator, sensor}(:, sensor);
for i = 1:1:10
Signal{actuator, sensor}(:, i) = Signal{actuator, sensor}(:, i) - Signal{actuator, sensor}(actuator, i);
end
a_filtered = bandpass(Signal{actuator, sensor}, [40000 60000], fs);
%a_filtered = lowpass(mean(Signal{Actuator, Sensor}, 2), fpass, Fs);
figure;
plot(t, a, '-r')
hold on
plot(t, a_filtered, '-b')
ylabel('Signal (V)')
xlabel('Time (s)')
title('50 kHz')

采纳的回答

Angelo Yeo
Angelo Yeo 2023-11-16
Can you clarify what you mean by "distorted"? I think the filter works well. I don't understand what you mean by "distorted".
load("Signal.mat")
dt = 1.6667e-8;
endTime = 500e-6;
t = 0:dt:endTime;
fs = 6e7;
fpass = 5e4;
%%
bandpass(Signal1(:, 1), [40, 60] * 1e3, fs)
P.S. Nice nickname though :p
  4 个评论
Haha Hahaha
Haha Hahaha 2023-11-17
In addition, how do I deduce from the power spectrum plot, that the signal has been successfully filtered/denoised?
Angelo Yeo
Angelo Yeo 2023-11-17
I would say "visually" first. In your example, the signal is mainly of under 1MHz component so it's hard to know if it's filtered well or not. However, in some cases, you can understand the result from power spectrum. See the example below, and you can clearly see that the signal is filtered as expected.
fs = 1e3;
t = 0:1/fs:1;
x = [2 1 2]*sin(2*pi*[50 150 250]'.*t) + randn(size(t))/10;
bandpass(x,[100 200],fs)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by