MATLAB Answers

How do I switch from Level to Frequency when performing discrete wavelet transforms?

3 views (last 30 days)
Zjuv9021
Zjuv9021 on 29 Apr 2021
Edited: Wayne King on 4 May 2021
Hello,
I am working with some EEG data and performing some discrete wavelet transforms by obtaining the detail and approximation coefficients and it returns to me the output I would expect:
However, in EEG applications, I would like to try to understand how I can turn this scalogram from the discrete levels of wavelet to the frequency bands they represent (I am assuming it is the FFT of the wavelet passed through the signal, ultimately?).
Can I do this? My goal is to try to understand the impact and influence of relevant physiological freqeuncy bands in EEG signals (e.g. a beta wave ~14-30 Hz activity as it relates to wavelets would tell me the impact in this particular band of interest).
Is there any advice here on how to best do this or tackle?
Let me know if more information is needed, this isn't really coding related but rather concept and how to tackle going from a discrete level to frequency bands.
Thank you.

Answers (1)

Wayne King
Wayne King on 4 May 2021
Edited: Wayne King on 4 May 2021
Hi, The discrete wavelet transform divides the signal energy into octave bands. So the wavelet filtering at level J, approximates a bandpass filter for (Fs/2^(J+1), Fs/2^J] where Fs is the sample rate in Hz. Now, how well the transform actually approximates that bandpass filtering depends on the wavelet filter. For the Haar wavelet, it is not as good as say the Daubechies least asymmetric 'sym4' filter. If you want to get this answer in software, you can use dwtfilterbank()
fb = dwtfilterbank('Wavelet','sym4','SamplingFrequency',1e3);
fb.dwtpassbands()
You can set the level to get them by level. The last row of fb.dwtpassbands() is the passband for the scaling (lowpass) filter, or what you have called the approximation.
Let's say you only had a 3-level transform
fb = dwtfilterbank('Wavelet','sym4','SamplingFrequency',1e3,'Level',3);
fb.dwtpassbands()
If you want to see the frequency responses for a particular wavelet passband, you can use the frequency response method.
fb.freqz()
The legend is interactive, if you click on the line it activates-deactivates the plot for that item.

Community Treasure Hunt

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

Start Hunting!

Translated by