Amplitude Increase when using bandpass filter

4 ビュー (過去 30 日間)
Haha Hahaha
Haha Hahaha 2023 年 11 月 16 日
コメント済み: Angelo Yeo 2023 年 11 月 17 日
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 Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by