필터 지우기
필터 지우기

How the increase the affect of lowpass filter on a field data?

조회 수: 2 (최근 30일)
Cakil
Cakil 2023년 11월 28일
댓글: Star Strider 2023년 11월 30일
Hello,
I would like to apply lowpass filter to my temperature data to remove the high frequency noise. I have applied simply 'lowpass' and could not see a significant affect on my data. I have seen several question regarding the lowpass but I am quite new to this area, so maybe missed the point.
sampling_rate=10; %seconds
fs=1/sampling_rate; %Hz
fpass=0:0.01:fs/2;
T35_lp=lowpass(T35,0.01,fs);
Here you can see the applied filter and original data below. They are almost same.
Is there any way to improve the affect of lowpass filter? I appreciate any suggestions.
Thanks!

채택된 답변

Star Strider
Star Strider 2023년 11월 28일
The cutoff frequency of the lowpass filter is too high.
Try these —
LD = load('T35.mat');
T35 = LD.T35;
sampling_interval = 10;
Fs = 1/sampling_interval;
L = numel(T35);
t = linspace(0, L-1, L)/Fs;
[FTT35,Fv] = FFT1(T35, t);
figure
semilogx(Fv, abs(FTT35)*2)
grid
xlabel('Frequency')
ylabel('Magnitude')
title('T35: Fourier Transform')
xlim([0 Fs/2])
Fco = 1E-5;
T35_filt1 = lowpass(T35, Fco, Fs, 'ImpulseResponse','iir');
Fco = 8E-7;
T35_filt2 = lowpass(T35, Fco, Fs, 'ImpulseResponse','iir');
figure
plot(t, T35, 'DisplayName','Original (Unfiltered)')
hold on
plot(t, T35_filt1, 'DisplayName','Filtered (F_{co} = 1\times 10^{-5})', 'LineWidth',2)
plot(t, T35_filt2, 'DisplayName','Filtered (F_{co} = 8\times 10^{-7})', 'LineWidth',2)
hold off
grid
legend('Location','best')
function [FTs1,Fv] = FFT1(s,t)
s = s(:);
t = t(:);
L = numel(t);
Fs = 1/mean(diff(t));
Fn = Fs/2;
NFFT = 2^nextpow2(L);
FTs = fft((s - mean(s)).*hann(L), NFFT)/sum(hann(L));
Fv = linspace(0, 1, NFFT/2+1)*Fn;
Iv = 1:numel(Fv);
FTs1 = FTs(Iv);
end
.
  댓글 수: 4
Cakil
Cakil 2023년 11월 30일
Thank you for the brief information about how to approach and where to start to processing data. It might be confusing to decide which method to use, so it is really a valuable feedback for me. Also I will definitely using the FFT1. If I understand correctly, spectrogram is an alternative to Fourier transform to understand the frequency variation of the time series data.
Star Strider
Star Strider 2023년 11월 30일
As always, my pleasure!
Your interpretation of the spectrogram is correct.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by