# Choosing Right Type of Filter for time series data

I am working on a temperature time-series data which is very noisy. I am trying to measure true low and high temperature but because of noise, I can not apply peak detection directly. I need to do some filtering. Since sampling frequency Fs is not known for this data, I have applied two types of filter

1. Kalman filter

1. Median filter

orange lines are the original signal and blue lines are filtered signal. The median filter seems good in this example which is preserving edges.

I want to know what are other types of filters which I can apply to get rid of noise without affecting the sharp edges of the signal.

• I do not understand what do you mean by true low and high temperature. For the given time-series plots, which value you will prefer to call a true low or high? – hari Jan 25 '20 at 15:58
• I mean to say, I want to preserve edges and want to remove noise from signal. Thereafter, peak detection would work properly. – Rheatey Bash Jan 25 '20 at 16:23
• How about if you first take numerical differentiation of your signal and then smooth the resultant signal? – hari Jan 25 '20 at 16:32
• Amplitude would be lost in this case. – Rheatey Bash Jan 25 '20 at 16:37
• You are looking for the location of a peak and amplitude of the signal at that location. You may obtain location from a differentiation scheme which can be used later to gather signal amplitude from the original signal. – hari Jan 25 '20 at 16:39