Design a low pass filter for time domain data

Hi, I wish to design a low pass filter for the time domain response graph and hence filter out the noise. So that, the noise area can be smoothed out but I has no idea on how to design the low pass filter because I don't know what is my sampling frequency. I reads most of the threads are about how to designing the low pass filter with a user-defined sampling frequency, sampling interval and cut-off frequency.
Can I know how to determine the sampling frequency for my time domain data? Link below show the time domain response graph which need to be filter using low pass filter.
https://www.dropbox.com/s/e614o5edodauumr/example.png
Any helps is much appreciate. Thanks you.

 채택된 답변

Pedro Villena
Pedro Villena 2012년 11월 22일
편집: Pedro Villena 2012년 11월 28일

0 개 추천

  • You need the sampling rate to design a digital filter, but if you want to design an analog filter, you don't need the sampling rate, instead you only need the cut-off frequency.
fc = 25; %%cut-off frequency [Hz]
sys = tf([1],[1/fc 1]); %%transfer function in continuous time
velocity = ?; %%your data array in m/s
time = ?; %%your time array in second
lsimplot(sys,velocity,time,0,'zoh'); %%discretization of SYS using ZOH method
Your sampling frequency is around 70Hz

댓글 수: 5

Shawn Chang
Shawn Chang 2012년 11월 22일
Hi, thanks for replied. I simulated the results using your code but the noise parts doesn't seems smoothed out and there is time shift occur at the graph.
If I wish to design a low pass digital filter to clean out the noise, may I know any solution I can determine the sampling rate from the graph?
Shawn Chang
Shawn Chang 2012년 11월 22일
편집: Shawn Chang 2012년 11월 22일
I have two question.
1. since it is a time-shift output, can it be shifting back to its original time with smoothness output.
2. After it has been filter, any solutions to obtain the points of the smoothed output because I need it to predict the transfer function.
Thanks.
Shawn Chang
Shawn Chang 2012년 11월 24일
Actually I am using the system identification toolbox to estimate the model but from the simulation results it shows the system is in the order of 4 or 5 which is differ from expectation. From the response graph, it show the system should be in 1st order system.
Results of model with order of 4 or 5 might caused by the noise. So, this is the purpose of implementing a low pass filter to filter out the noise. But, I had no idea how to design the filter since I didn't know the sampling frequency of the data.
Shawn Chang
Shawn Chang 2012년 11월 26일
편집: Shawn Chang 2012년 11월 26일
May I know how to determine the 70Hz?
I try to design it with 1st order butterworth,with -3dB cut-off freqyency 700Hz and sampling frequency 8kHz using the the below code.
dr=fdesign.lowpass('N,F3dB',1,700,8000);
Hdr = design(dr,'butter');
right_f = filter(Hdr,right_end);
The filter response graph I obtain is the one with green color, does it fine to have the filter output like that? Because that was the smoother filter graph I can obtained and with the least phase shift.
https://www.dropbox.com/s/t37sbb6abls703p/left_right_encoder.png
nam bui
nam bui 2021년 2월 12일
Hello, did you happend to fix it?

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

추가 답변 (1개)

iyad salameh
iyad salameh 2015년 1월 31일

0 개 추천

did you solve your problem ? because am doing the exact same thing , i need to filter it for system identification toolbox. please let me know iyad.salameh.44@gmail.com

카테고리

질문:

2012년 11월 22일

댓글:

2021년 2월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by