フィルターのクリア

How to convert accelerometer data from excel into frequency

12 ビュー (過去 30 日間)
Alexander Tan
Alexander Tan 2020 年 3 月 10 日
コメント済み: Yash Kadu 2022 年 5 月 31 日
Hello I am trying to convert the accelerometer data I collected from the MPU 6050 in the Z axis to vibrational frequency. I am powering a small vibration motor at 82 duty cycle expected 130 hz according to the data sheet. I got some advice from my teacher to get a live recording instead of my previous post. So I got the live value in ardunio and wrote it to excel. Using this previous post "How to use FFT in matlab using importated data in time domain excel file." I got my data. However I am not even close to my expected frequency. Can someone help me figure out what is wrong?
I used this excel file the first column is time in miliseconds and the last column is what im interested in which is accel readings in the Z axis in gravitational force.
My current output is in Z Readings below but im expecting something closer to the image below with the frequency at 130 hz.

採用された回答

Star Strider
Star Strider 2020 年 3 月 11 日
The sampling frequency is too low to detect a 130 Hz vibration:
A = readmatrix('DutyCylce82Vals2.csv');
A(:,1) = A(:,1)*1E-3; % Convert To Seconds
Ts1 = mean(diff(A(:,1)));
Fs1 = 1/Ts1;
This calculates the mean sampling frequency (note that the signal is also not regulalrly sampled, and it needs to be) to be about 41 Hz. In order to detect a 130 Hz vibration, the sampling frequency must be at least 260 Hz (sampling interval at most 3.84 ms), and ideally much higher than that, for example 300 Hz, with a sampling frequency of 3.33 ms.
  3 件のコメント
Star Strider
Star Strider 2020 年 3 月 11 日
My pleasure.
Looking at your work and the variables in MATLAB I would need to lower the time between each sample to increase the sample frequency?
Yes.
(1) The sampling intervals have to be constant, and
(2) The sampling frequency has to be more two times the highest frequency you want to recover from your data.
Yash Kadu
Yash Kadu 2022 年 5 月 31 日
Hey can you help me in converting the accelerometer data into frequency data?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMeasurements and Feature Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by