Envelope extraction of a time domain signal

5 次查看(过去 30 天)
I have a signal like this: t=[-10*10^(-9):0.0001*10^(-9):10*10^(-9)]; dt=394*10^(-15); betaL=1.2378*10^(-21); tao=15*10^(-12); i=0.5*exp(-(t./betaL.*dt).^2./(4*log(2))).*(1+cos(tao.*t./betaL)); I want to get its envelop so I tried Hilbert Transformation in this way: Y = hilbert(i); am = abs(Y); but it is not what I want, I want the envelope that goes through the peaks smoothly. Is there anybody know about this problem? Thank you very much!
CODE: t=[-10*10^(-9):0.0001*10^(-9):10*10^(-9)]; dt=394*10^(-15); betaL=1.2378*10^(-21); tao=15*10^(-12); i=0.5*exp(-(t./betaL.*dt).^2./(4*log(2))).*(1+cos(tao.*t./betaL)); Y = hilbert(i); am = abs(Y); plot(t,i,t,am)

采纳的回答

Mark Schwab
Mark Schwab 2018-1-26
If you are not concerned with the length of the envelope signal you can use the "findpeaks" function.
[pks, locs] = findpeaks(i); % Where pks is a vector with amplitude of peaks and locs is a vector of peak indeces
envelope = interp(pks,floor(length(i)/length(pks)); % Interpolate peaks to vector close in size to i
Please note that the interpolation function only works with integer multiples of length so this will not produce an envelope vector equal in size to the original signal. You can refer to the following MATLAB answers post for more information on this:
Also, I have included a link to the findpeaks function documentation for your convenience:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 描述性统计量 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!