Amplitude Increase when using bandpass filter
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Haha Hahaha
il 16 Nov 2023
Commentato: Angelo Yeo
il 17 Nov 2023
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')
0 Commenti
Risposta accettata
Angelo Yeo
il 16 Nov 2023
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 Commenti
Angelo Yeo
il 17 Nov 2023
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)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spectral Measurements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!