why envelope by hilbert increasing in tail of signal?

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

 Respuesta aceptada

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 comentarios

nirwana
nirwana el 16 de Dic. de 2024
Editada: nirwana el 16 de Dic. de 2024
thanks @Mathieu NOE for providing the envelope function. but what suggest by book that I've read is using hilbert, (while your function is trying to get envelope by connecting peak of input signal, CMIIW).
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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 16 de Dic. de 2024

Comentada:

el 16 de Dic. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by