フィルターのクリア

filtered output signal gives high values at the ends when using lowpass function

12 ビュー (過去 30 日間)
After filtering a data signal using the lowpass function in Maltab, the ends of the output signal gives very high values like in the figure below. How should I deal with this?
Light blue is the original data and light green is after the filtering using lowpass function. This also happens when using filter function.

採用された回答

Star Strider
Star Strider 2020 年 5 月 10 日
Filter transients such as those can occasionally occur with any filtering algorithm (and both hardware and digital filters), especially if the signal has abrupt ‘step’ transitions at the ends.
The easiest way to deal with it is to first subtract the mean of the signal from the rest of the signal, filter the signal, then add back the mean to the filtered signal. Another way to deal with it is to pad it at both ends with a vector of ones that is equivalent to the mean of the signal, then use indexing to elimiinate those elements from the ends of the filtered signal. Subtracting the mean and adding it back later is easier.
  4 件のコメント
Dhanushka Palipana
Dhanushka Palipana 2020 年 5 月 10 日
Great. Thank you very much. I'll do so.
Star Strider
Star Strider 2020 年 5 月 10 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by