How to plot FFT in MATLAB by executing Vibration data recorded in Excel?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
Hi,
I have several recorded vibration measurements in Exel files as Time vs. Acceleration. Now I need to plot Time Vs. Acc and FFT graphs for further analysis.
Thank in Advance for all put their comments and suggestions below!
채택된 답변
Star Strider
2021년 1월 3일
Note that the sampling intervals must be constant, so if they are not, first use the Signal Processing Toolbox resample function to interpolate them to a constant sampling interval. Then use the fft function to calculate the spectra.
댓글 수: 8
I tried an alternative way. First I did the math in the same excel sheet then I plotted the datas (magnitude vs frequency) in matlab. but I am not sure my answer is right. I am getting a symmetric graph. In the youtube tutorials everyone show how to do fft by creating a wave using sin function and then they do fft with (sampling frequency etc...) Where can I find the steps from very basics to call the raw datas form excel and plot Time vs Amplitude, Frequency vs magnitude graphs for my vibration analysis. [Beside all, I am new for MATLAB],
The symmetry in the plot is because you are most likely plotting the complete fft results. The first half of that vector is a ‘one-sided’ Fourier transform, and the second half is the flipped complex-conjugate of the first half. It is only necessary to plot the first half in most instances. If you plot both, you will need to use the fftshift function, and then create an appropriate frequency vector with negative and positive components.
I usually use s version of this to plot a one-sided fft:
t = ...; % Time Vector
s = ...; % signal Vector
L = numel(t); % Signal Length
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
FTs = fft(s)/L; % Normalised Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
plot(Fv, abs(FTs(Iv))*2)
grid
title('Fourier Transform')
xlabel('Frequency (units)')
ylabel('Amplitude (units)')
.
Thank you so much! This reply makes lot of sense for me. I apprecite your time and effort on my question, Is there any way I can contact you? by E-mail?
As always, my pleasure!
Contacting me here is the best option. (I have email set up through my profile page, however I do not frequently look at that account, and almost always do not respond to any MATLAB-related emails sent to it.)
haha.. I got you. I have started my works based on your support. i will keep updating you.
thank you once again
As always, my pleasure!
It really worked Star Strider! You have no idea how much this help worths for me. Thank you so much! Thanks a lot.
As always, my pleasure!
I am happy that you got everything sorted!
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
