Sigma parameters of Morlet wavelet in CWT function
16 次查看(过去 30 天)
显示 更早的评论
Hi
I am a newbie in signal processing. Based on my understading the sigma parameters or number of cycles of a morelet wavelet is used to tune the time-frequency resolution tradeoff. Therefore, im currently trying to tune the parameters of sigma for morlet wavelet in CWT. However, i found that the cwt function only support the default analytical morelet wavelet "amor". Hence, would like to ask if there is any other way tune the sigma parameters of the morlet wavelet in cwt function.
Thanks in advance and sorry if this is a dumb quetion.
2 个评论
Jan
2023-7-1
Please avoid the term "urgent". Your question is not more urgent than others and therefore it reduces the motivation to post an answer.
回答(1 个)
akshatsood
2023-9-7
编辑:akshatsood
2023-9-7
Hi Nigel,
I understand that you want to tune the sigma parameter of a Morlet wavelet using cwt function which has a significant role in determining the time-frequency resolution trade-off. In the context of the amor Morlet wavelet, the sigma parameter refers to the standard deviation of the Gaussian window function used to modulate the complex sinusoid. It determines the width of the Gaussian window and, consequently, influences the time-frequency localization properties of the wavelet. A smaller value of sigma results in a narrower Gaussian window, leading to better frequency resolution but poorer time resolution. On the other hand, a larger value of sigma widens the Gaussian window, improving time resolution but sacrificing frequency resolution.
As per my understanding, cwt function does not support tuning the sigma parameter and you need to manually update the value and verify the same by visualizing the plots. I have worked on a code snippet attached below, which works on determining and plotting the real and imaginary segments of the Morlet wavelet. It does not entail the use of cwt function and instead take in consideration the definition of the Morlet wavelet which is referred from the article attached the end of the answer. The article states that,
A complex Morlet wavelet w can be defined as the product of a complex sine wave and a gaussian window.
Mathematically, it can be expressed as follows
The parameter that defines the time-frequency precision trade-off is n , which is often referred to as number of cycles.
samplingRate = 1000;
time = -2:(1/samplingRate):2; % time vector
freq = 6.5; % frequency of wavelet
n = 5; % number of cycles
s = n/(2*pi*freq); % sigma parameter
% create complex sine wave
sine_wave = exp(1i*2*pi*frex.*time);
% create gaussian window
gaus_win = exp((-time.^2)./(2*s^2) );
% creating a Morlet wavelet
mor = sine_wave.*gaus_win;
tiledlayout(2,1);
nexttile;
plot(time,real(mor))
xlabel('Time (s)'), ylabel('Amplitude')
title([ 'Real part of Morlet wavelet at ' num2str(freq) ' Hz' ])
nexttile;
plot(time,imag(mor))
xlabel('Time (s)'), ylabel('Amplitude')
title([ 'Imaginary part of Morlet wavelet at ' num2str(freq) ' Hz' ])
The above script outlines the workflow for plotting the Morlet wavelet. You can tweak the value of n which in turn modifies the value of sigma parameter.
Have a look at below references for better understanding
I hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!