EMD function: boundary treatment

4 Ansichten (letzte 30 Tage)
Emanuele Spinosa
Emanuele Spinosa am 13 Okt. 2020
Beantwortet: Shubham am 3 Dez. 2024
I would like to have some precise information on how the MATLAB function EMD treats the boundary of the input signal.
There is no such information oin the help, and I believe this is a very important point.
Thanks in advance

Antworten (1)

Shubham
Shubham am 3 Dez. 2024
Hi Emanuele,
Here's a simplified explanation of how MATLAB's EMD function handles boundaries:
  • Envelope Interpolation: This function identifies local maxima and minima to create upper and lower envelopes using methods like spline or pchip. This helps avoiding artifacts when there aren't enough extrema for smooth interpolation.
  • Boundary Extension: To reduce edge effects, the signal is extended by reflecting it at the edges. The emdWaveExtension method helps simulates continuation of the signal at both ends.
% extended waves on the left
[lpksLoc, lpksVal, lbtmLoc, lbtmVal] = signalwavelet.internal.emd.emdWaveExtension(t(1), rsigL(1),...
pksLoc(1), rsigL(pksIdx(1)),...
btmsLoc(1), rsigL(btmsIdx(1)),...
-1);
% extended waves on the right
[rpksLoc, rpksVal, rbtmLoc, rbtmVal] = signalwavelet.internal.emd.emdWaveExtension(t(end), rsigL(end),...
pksLoc(end), rsigL(pksIdx(end)),...
btmsLoc(end), rsigL(btmsIdx(end)),...
1);
  • Extrapolation using interp1: The interp1 function is used for extrapolation, choosing spline for smoothness or pchip to avoid overshoots.
Here's a code example of how to do the interpolation:
% Interpolate the upper envelope using spline or pchip
upperEnvelope = interp1(uLoc, uVal, t, 'spline'); % or 'pchip'
% Interpolate the lower envelope using spline
lowerEnvelope = interp1(bLoc, bVal, t, 'spline');
For more informatin on spline and pchip, refer to the following documentation links:
Hope this helps.

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by