필터 지우기
필터 지우기

Smoothing the time series data (x-axis is time in seconds, y-axis is Pressure)

조회 수: 17 (최근 30일)
Teja Reddy
Teja Reddy 2023년 2월 6일
답변: Meet 2023년 2월 8일
Hi,
I would like to smooth my y-axis data, it has too much of fluctuations now. I am trying to smooth the data. I have seen many methods in |MATLAB to smooth. But, I heard FFT is the best suitable to smooth the time series data. Can some help me how to do it? I am attaching my data file here.
x-axis is time in seconds, y-axis is pressure.
Many thanks
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2023년 2월 7일
smoothdata is a good option to smooth the data
format long
data=readtable('fluct.txt');
x=data.Var1;
y=data.Var2;
figure
plot(x,y)
xlim([0 500])
title('Original')
figure
y1=smoothdata(y);
plot(x,y1)
xlim([0 500])
title('smoothdata')
figure
%adjust window as per need
win=10;
y2=movmedian(y,win);
plot(x, y2)
xlim([0 500])
title('movmedian')
Or do you want a polynomial like smoothness/fitting?
Teja Reddy
Teja Reddy 2023년 2월 7일
Hi, thank you for your reply.
I read that FFT is the best method to smooth the time series data. Is it correct?
Thank you

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

답변 (1개)

Meet
Meet 2023년 2월 8일
Hi,
The usage of FFT to filter the signal depends on the signal that is being processed.
You can refer to the below link to select the type of smoothing that need to be implemented based on your use case.
If you want to use FFT based filtering technique, then you can use fftfilt function from the signal processing toolbox.
Below are some other references that might be helpful :

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by