## Need help with FFT of sensor data

Hello.

For my thesis, I am required to analyse one of the five links of 5 DOF robotic arm. The said link has also been designed in solidworks and was imported in Ansys software to find first 4 natural frequencies/mode shapes through Finite Element Analysis (FEA). The natural frequencies are as follows :

0.05934

188.22

476.19

558.74

Ansys also provides the Displacement Time data which can be exported for further analysis. I am currently trying to obtain a magnitude – frequency graph through FFT to find the natural frequencies of the link through exported data.

My understanding is, if I can recreate the natural frequencies given by Ansys through my MATLAB program, I will be able to find acceptable natural frequencies of any link by aquiring acceleration time data through sensors. But in order to do that, I need a program that finds close to accurate natural frequencies through FFT.

I have made/replicated a program, which is attached, by researching online. However, I am obtaining peaks at incorrect frequencies. Furthermore, my plot does not cover all the frequencies on the X-Axis as well.

Summary : I want to make a program that can give me a Magnitude Frequency graph through FFT for a link of a 5 DOF robotic arm. I want to recreate the results comparable or similar to precalculated and correct values of natural frequencies through my program. However, the results through my program are incorrect.

I am sure I must be doing something wrong but I cannot seem to figure it out.

Would appreciate any and all help.

Cheers.

X=readmatrix(‘accl.xlsx’) %importing data

fs=20; % sampling frequency

L=138; % length of signal

nfft=2^nextpow2(L); % next power of 2 from length of freq signal

f=(fs/2)*linspace(0,1,nfft/2+1);

timefft = fft(X(:,2),nfft)/L;% frf of displacement

fre=2*abs(timefft(1:nfft/2+1));% frf of displacement

figure(1),plot(f,fre); grid on % fig A

% Natural frequencies without any scale adjustment

frf=fft(X(:,2));

figure(2),plot((abs(frf))); % fig BHello.

For my thesis, I am required to analyse one of the five links of 5 DOF robotic arm. The said link has also been designed in solidworks and was imported in Ansys software to find first 4 natural frequencies/mode shapes through Finite Element Analysis (FEA). The natural frequencies are as follows :

0.05934

188.22

476.19

558.74

Ansys also provides the Displacement Time data which can be exported for further analysis. I am currently trying to obtain a magnitude – frequency graph through FFT to find the natural frequencies of the link through exported data.

My understanding is, if I can recreate the natural frequencies given by Ansys through my MATLAB program, I will be able to find acceptable natural frequencies of any link by aquiring acceleration time data through sensors. But in order to do that, I need a program that finds close to accurate natural frequencies through FFT.

I have made/replicated a program, which is attached, by researching online. However, I am obtaining peaks at incorrect frequencies. Furthermore, my plot does not cover all the frequencies on the X-Axis as well.

Summary : I want to make a program that can give me a Magnitude Frequency graph through FFT for a link of a 5 DOF robotic arm. I want to recreate the results comparable or similar to precalculated and correct values of natural frequencies through my program. However, the results through my program are incorrect.

I am sure I must be doing something wrong but I cannot seem to figure it out.

Would appreciate any and all help.

Cheers.

X=readmatrix(‘accl.xlsx’) %importing data

fs=20; % sampling frequency

L=138; % length of signal

nfft=2^nextpow2(L); % next power of 2 from length of freq signal

f=(fs/2)*linspace(0,1,nfft/2+1);

timefft = fft(X(:,2),nfft)/L;% frf of displacement

fre=2*abs(timefft(1:nfft/2+1));% frf of displacement

figure(1),plot(f,fre); grid on % fig A

% Natural frequencies without any scale adjustment

frf=fft(X(:,2));

figure(2),plot((abs(frf))); % fig B Hello.

For my thesis, I am required to analyse one of the five links of 5 DOF robotic arm. The said link has also been designed in solidworks and was imported in Ansys software to find first 4 natural frequencies/mode shapes through Finite Element Analysis (FEA). The natural frequencies are as follows :

0.05934

188.22

476.19

558.74

Ansys also provides the Displacement Time data which can be exported for further analysis. I am currently trying to obtain a magnitude – frequency graph through FFT to find the natural frequencies of the link through exported data.

My understanding is, if I can recreate the natural frequencies given by Ansys through my MATLAB program, I will be able to find acceptable natural frequencies of any link by aquiring acceleration time data through sensors. But in order to do that, I need a program that finds close to accurate natural frequencies through FFT.

I have made/replicated a program, which is attached, by researching online. However, I am obtaining peaks at incorrect frequencies. Furthermore, my plot does not cover all the frequencies on the X-Axis as well.

Summary : I want to make a program that can give me a Magnitude Frequency graph through FFT for a link of a 5 DOF robotic arm. I want to recreate the results comparable or similar to precalculated and correct values of natural frequencies through my program. However, the results through my program are incorrect.

I am sure I must be doing something wrong but I cannot seem to figure it out.

Would appreciate any and all help.

Cheers.

X=readmatrix(‘accl.xlsx’) %importing data

fs=20; % sampling frequency

L=138; % length of signal

nfft=2^nextpow2(L); % next power of 2 from length of freq signal

f=(fs/2)*linspace(0,1,nfft/2+1);

timefft = fft(X(:,2),nfft)/L;% frf of displacement

fre=2*abs(timefft(1:nfft/2+1));% frf of displacement

figure(1),plot(f,fre); grid on % fig A

% Natural frequencies without any scale adjustment

frf=fft(X(:,2));

figure(2),plot((abs(frf))); % fig B natural frequencies, fft, fourier transform MATLAB Answers — New Questions