フィルターのクリア

DWT or MODWT with custom frequency bands

6 ビュー (過去 30 日間)
Michael Hadler
Michael Hadler 2024 年 7 月 20 日 16:38
コメント済み: Umar 2024 年 7 月 21 日 12:05
Dear all,
I am analyzing time-series data with a special interest in frequency-band specific crosscorrelation. In the past, I have used modwt and modwtcorr to do so. In my example, the signal is 4001 samples long and the sampling frequency is 20 kHz. When creating the standard filterbank (dwtfilterbank), I am given 10 levels with specific bands (in Hz) [5000 10000; 2500 5000; 1250 2500; 625 1250; 312.5 625; 156.25 312.5; 78.125 156.25; 39.0625 78.125; 19.53125 39.0625; 0 19.53125], coming from the following code:
%determine number of levels
max_levels = wmaxlev(4001,'sym4')
%design filterbank
fb_dwt = dwtfilterbank('SignalLength',4001,'SamplingFrequency',20000,'Level',max_levels)
%extract frequency bands
bands = dwtpassbands(fb_dwt)
I have highlighted the bands of interest to me. Upon further investigation, I would be more interested in shifting these bands towards 50 - 100, 100 - 300 and 300 - 600 Hz. Is it possible to design a filterbank for modwt or dwt that considers this and permits later cross-correlation analysis (such as modwtcorr)? This would be extremely helpful for me.
Thank you very much, and best,
Michael
  1 件のコメント
Umar
Umar 2024 年 7 月 21 日 12:05
Hi Michael,
You asked, “ Upon further investigation, I would be more interested in shifting these bands towards 50 - 100, 100 - 300 and 300 - 600 Hz. Is it possible to design a filterbank for modwt or dwt that considers this and permits later cross-correlation analysis (such as modwtcorr)?”
Yes, you can create a custom filterbank that aligns with your specific bands. In order to do this, you need to define the new frequency bands of interest as mentioned in your posted comments, [50 100], [100 300], and [300 600] Hz. Then, design a custom filterbank by specifying the desired frequency bands. Here's an example code snippet to create a custom filterbank for modwt:
% Define custom frequency bands custom_bands = [50 100; 100 300; 300 600];
% Design custom filterbank
fb_custom = dwtfilterbank('SignalLength', 4001, 'SamplingFrequency', 20000, 'FrequencyBands', custom_bands);
% Extract frequency bands
bands_custom = dwtpassbands(fb_custom);
For more information on these functions, please refer to
https://www.mathworks.com/help/wavelet/ref/dwtfilterbank.html
https://www.mathworks.com/help/wavelet/ref/dwtfilterbank.dwtpassbands.html?s_tid=doc_ta
Once you have the custom filterbank, you can proceed with cross-correlation analysis using modwtcorr or other relevant functions. Ensure that the filterbank aligns with your desired frequency bands for accurate analysis. Here's a simple example of how you can perform cross-correlation analysis using the custom filterbank:
% Perform modwt cross-correlation
[crosscorr_result, lag] = modwtcorr(data1, data2, fb_custom, 'type', 'phase');
For more information on modwtcorr, please refer to
https://www.mathworks.com/help/wavelet/ref/modwtcorr.html?s_tid=doc_ta
Feel free to customize the frequency bands further or adjust the parameters based on your specific needs. Please let me know if you have any further questions.

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by