필터 지우기
필터 지우기

helperWPHarmonicFilter function performs poorly on larger datasets

조회 수: 5 (최근 30일)
I'm trying to use the helperWPHarmonicFilter function to filter 60Hz interference from my data. The function seems to work well when I input a subset of my data ~4000 data points, but progressively gets less effective as I increase the number of data points (see power spectrums below). Is there something I can manipulate in the function that will allow it perform better on larger datasets?
Thanks!
4000 data point
25000 data points

채택된 답변

Yatharth
Yatharth 2023년 9월 28일
Hi Chris,
I understand that you are trying to filter 60Hz interference from your data using "helperWPHarmonicFilter" which is working fine for a sample size of <4000 but doesn’t give the expected output for a large sample size.
I was able to find the helper function you mentioned in one of the examples from Wavelet Packet Harmonic Interference Removal.
Could you help me with the model and data that you are running so that I can reproduce the issue at my end?
I have few other approaches that you can try from your end and see if it works.
To improve the performance of the function on larger datasets, you can try the following approaches:
  1. Down sampling: If your data has a high sampling rate, you can consider down sampling it to reduce the number of data points. This can help reduce the computational load on the function.
  2. Windowing: You can divide your data into smaller windows or segments and apply the "helperWPHarmonicFilter" function to each window individually. This can help mitigate the performance degradation by processing smaller chunks of data at a time.
  3. Optimization: Review the implementation of the "helperWPHarmonicFilter" function and check if there are any opportunities for optimization. Look for any unnecessary calculations or redundant operations that can be removed or simplified.
  4. Parallelization: If your programming environment allows it, you can consider parallelizing the filtering process. By distributing the computation across multiple processors or threads, you can potentially improve the performance on larger datasets.
Alternatively, to filter out 60Hz interference from your data you could also look into:
  1. Notch Filter https://www.mathworks.com/discovery/notch-filter.html
  2. Fast Fourier Transform https://www.mathworks.com/discovery/fft.html#
I hope this helps.
  댓글 수: 1
Chris Patrick
Chris Patrick 2023년 9월 28일
Thank you Yatharth! I switched to windowing the data as you suggested and that has worked well.

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

추가 답변 (0개)

카테고리

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