Signals acquisition:
Two proximity sensors are positioned Orthogonal to each other. These would be measuring the vibrations of a rotating shaft.
Problem:
Each of these 2 signals has two dominant frequency components (2441 Hz & 762.9 Hz ) in it. I don't know the phase and amplitude information. I'm interested in finding the phase of the signal at 2441 Hz and 762.9 Hz. I did the following process to achieve amplitudes and phases in MATLAB
Applying FFT to the raw signal and calculating Amplitude and Phase.
%fft for X signal fftx=fft(X,NFFT); % absolute value of the signal Xn = abs(fftx); A = mean(Xn); % I took the mean to get single value. phase = unwrap(angle(fftx)); phase_mean = mean(alpha);
Filtering raw signal to specific frequency prior to applying FFT using Butterworth filter. ( In this example I filtered to 2441 Hz)
[b,a] = butter(2, [ 2440/(fs/2),2441/(fs/2)],'bandpass'); X_filtered = filter(b,a,X); % Applying FFT to filtered signal fft_filtered = fft( X_filtered,NFFT); Xn_filtered = abs(fft_filtered); A_filtered = mean(Xn_filtered); phase_filtered = unwrap(angle(fft_filtered)); phase_filtered_mean = mean(phase_filtered);
I did the same process as point 2 to filter to another frequency say 762.9 Hz.
My sampling frequency and other things are defined as follows.
L = length(X); % 50050 is length of signal NFFT = 2^nextpow2(length(X)); % Zero padding to nearest N power 2 %Define frequency axis fs = 1e7; % Sampling frequency df = fs/NFFT; % frequency resolution dt = 1/df; % time resolution X_detrend = detrend(X,0); % Removing DC Offset
I've been reading a lot of other posts on the FFT phase and Amplitude.But I'm confused with most of them. In my case, I need to extract frequency particular information (amplitude and phase) to do further calculation. I'm still unsure if using the filters is right way? Will FFT and filters alter the signal information in any way? Could someone enlighten in understanding the efficient way to extract amplitude and phase information from a signal of particular frequency component.