Using wavelet toolbox.

4 views (last 30 days)
Goutham Ganesh M H
Goutham Ganesh M H on 24 Sep 2021
Answered: sanidhyak on 2 Sep 2025
I have data on modal analysis of plate with and without crack. I want to use this two sets of data in wavelet toolbox and compare and find the difference between the two data sets. Can any one let me know how can I do this? Thank you in advance.

Answers (1)

sanidhyak
sanidhyak on 2 Sep 2025
I understand that you are trying to compare the modal analysis data of a plate with and without crack using MATLAB’s “Wavelet” Toolbox.
When working with such signals, a direct comparison in the time domain may not highlight the differences effectively. So, you can use time-frequency analysis (Continuous Wavelet Transform) and wavelet coherence, which will provide you a clearer comparison of the two datasets.
Please refer to the following example code that shows how to use CWT, wavelet coherence, and DWT-based energy comparison:
% Example code for comparing plate vibration data with and without crack
% Replace with your actual signals
load plate_data.mat % Suppose you have 'signal_no_crack' and 'signal_crack'
fs = 1000; % Sampling frequency (Hz) - update as per your data
% Continuous Wavelet Transform
figure;
subplot(2,1,1);
cwt(signal_no_crack,'amor',fs);
title('CWT of Plate Without Crack');
subplot(2,1,2);
cwt(signal_crack,'amor',fs);
title('CWT of Plate With Crack');
% Wavelet Coherence
figure;
wcoherence(signal_no_crack, signal_crack, fs);
title('Wavelet Coherence Between Healthy and Cracked Plate');
% Energy Distribution using Discrete Wavelet Transform
wname = 'db4'; % Daubechies wavelet
level = 5;
[C1,L1] = wavedec(signal_no_crack, level, wname);
[C2,L2] = wavedec(signal_crack, level, wname);
E1 = zeros(1,level);
E2 = zeros(1,level);
for i = 1:level
D1 = detcoef(C1,L1,i);
D2 = detcoef(C2,L2,i);
E1(i) = sum(D1.^2);
E2(i) = sum(D2.^2);
end
figure;
bar([E1' E2']);
xlabel('Decomposition Level');
ylabel('Energy');
legend('Without Crack','With Crack');
title('Energy Distribution at Different Wavelet Levels');
Here, we are doing the following:
  • We use "CWT" to visualize differences in time-frequency patterns.
  • Apply wavelet coherence to compare correlation between healthy and cracked signals.
  • And finally, we compute energy distribution across wavelet levels to quantify changes caused by the crack.
For further reference, please check the following official MATLAB documentations:
Cheers & Happy Coding!

Categories

Find more on Wavelet Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!