why envelope by hilbert increasing in tail of signal?

22 views (last 30 days)
nirwana
nirwana on 16 Dec 2024 at 6:27
Commented: Mathieu NOE on 16 Dec 2024 at 11:00
I have decay sinusiodal signal that I want to fit in, I use hilbert
% Extract the ACF data
% Calculate the starting and ending indices dynamically
half_length = floor(length(data) / 2); % Second half starts here
portion_len = floor(0.1 * half_length); % 10% of the second half
% Extract the 10% of the earlier data in the second half
y_obs = data(half_length:(half_length + portion_len - 1))';
y_obs_square= y_obs.^2;
t = 1:length(y_obs);
% Compute the squared envelope of the ACF
envelope = abs(hilbert(y_obs_square));
but what I don't understand is why envelope giving increasing aplitude in the tail of signal as figure below?
can someone explain? Thanks in advance

Answers (1)

Mathieu NOE
Mathieu NOE about 2 hours ago
hello again
here 3 suggestions appart from the traditionnal hilbert transform
see the 2 functions in attachment
t = 0:0.001:2;
x = cos(2*pi*10*t).*exp(-5*t);
% obtain the envelope data
%--------------------------------------------
[up1,down1] = envelope(abs(x),07,'peak'); % option 1 with regular (TMW) envelope function
[up2,down2] = envelope2(t,abs(x),'linear'); % option 2 with envelope2 (see function attached)
[env] = env_secant(t, abs(x), 50, 'top'); % option 3 with env_secant (see function attached)
tf = islocalmax(x,'MinProminence',1e-4,'MinSeparation',5); % option 3 with islocalmax (you can also try with find peaks)
tt = t(tf);
xt = x(tf);
plot(t,x,t,up1,t,up2,tt,xt,t,env)
legend('signal','envelope','envelope2','islocalmax','env secant');
  3 Comments
Mathieu NOE
Mathieu NOE 7 minutes ago
yes you can use hilbert transform for signal envelope but it's not the sole and only way to do it.
and I prefer sometimes other alternatives because the result with hilbert does not please me.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!