Effacer les filtres
Effacer les filtres

DWT or MODWT with custom frequency bands

6 vues (au cours des 30 derniers jours)
Michael Hadler
Michael Hadler le 20 Juil 2024 à 16:38
Commenté : Umar le 21 Juil 2024 à 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 commentaire
Umar
Umar le 21 Juil 2024 à 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.

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by