Need help for Envelope analysis problem
Show older comments
Hello everyone.
I need a little help concerning an issue on an envelope analysis code and I'll be grateful for anykind of assistance. I'm trying to do the envelope of the FFT of an acquiered faulty bearing signal but the results are wrong.
At first, I tested the code with a simple sinusoidal signal. The code is based on two different methods for envelope analysis (using a low pass filter on one hand and a Hilbert Transform on the other) such as :
close all;
clear all ;
clc;
f0= 50;
n1 = 1024;
Fs = 10240;
t = (0:n1-1)/Fs;
s = sin (2*pi*f0*t);
%s = dlmread('x.txt','\t'); %(for reading my signal)
%Envelope Analysis based on a low pass filter
[a,b]=butter(2,0.1);
sig_abs=abs(s);
y = filter(a,b,sig_abs);
N = length(s);
NFFT = 2^nextpow2(N);
f = Fs/2*linspace(0,1,NFFT/2+1);
Y1 = fft(y,NFFT);
Y2= Y1/(norm(Y1));
figure
plot(f,abs(Y2(1:NFFT/2+1)))
title('Low Pass Filter Envelope analysis')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
%envelope analysis based on Hilbert transform
analy=hilbert(s);
y2=abs(analy);
T=N/Fs;
sig_f=abs(fft(y2(1:N)',N));
sig_n=sig_f/(norm(sig_f));
freq_s=(0:N-1)/T;
figure
plot(freq_s,sig_n);
axis ([0 5000 0 1])
title('Hilbert transform Envelope analysis')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
Here, the results are somewhat convincing aside from the fact that the signal frequency was doubled by the EA. Can you explain to me why the frequency is 100 and not 50 Hz. Is the EA supposed to this (and why exactly ?) or is something wrong here ?
But beyond that, my biggest problem is when I use this code for my particular signal. Because here the results don't make any sense at all and there's obviously something wrong with it. I attached my signal for you to see that the results plot with both methods are inexploitable. I really need you help to slove this problem and obtain a proper Envelope analysis for my signal.
Thanks for your help
Accepted Answer
More Answers (0)
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!