Is there a way to initialize a filter to the first unfiltered value?
조회 수: 7 (최근 30일)
이전 댓글 표시
I want to filter a data set. Suppose the data set consists of data points which equal 100 plus noise. I want the filtered value to be initialized to the first unfiltered value, instead of zero, so the filter won't have to take a long time to go from zero to the nominal value. Is there a way to do this?
After some thought, I came up with this method: filteredData = filter(b, a, raw - raw(1)) + raw(1); I think this answers my question, but I would welcome any comments.
댓글 수: 0
답변 (1개)
mojtaba rayati
2023년 12월 5일
Be sure that your b array is normalized then for x0 initial condition: y=filter(b, a, x-x0) + x0.
The Reason: In FIR filter case:
if
the above formulation is equal to y=filter(b, a, x-x0) + x0.
Similar reason can be used for IIR Filter
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!