MPU 9250 accelerometer Digital Signal Processing.

1 回表示 (過去 30 日間)
Mauro Pango
Mauro Pango 2018 年 11 月 27 日
コメント済み: Mauro Pango 2019 年 2 月 28 日
Hello I need to do a digital signal processing of the sensor MPU9250.
I need to find the Discrete Frequency and I have seen the matlab scripts.
My question is if I have two drones, one of them operates with a 11.1V and has vibrations around 252Hz and second operates at 22.4 and has vibrations around 168Hz
when I am computing my Amplitude do I use the following equation?
S = 22.1*sin(2*pi*168*t) + 11.1*sin(2*pi*252*t);
I have wrote a script for my fft
clear all;
close all;
clc;
Fs = 4000; % Sampling Frequency
T = 1/Fs; % Sampling Period
L = 2048 % Lenght of the signal
t = (0:L-1)*T; % Time Vector
% Assuming a sinusoidal wave of 252 Hz and apmlitude of 11.1V (Smsall drone)
%As well as a Sinusoidal wave of 168 Hz with a amplitude of %22.1V (larger
%drone)
S = 22.1*sin(2*pi*168*t) + 11.1*sin(2*pi*252*t);
X = S + 2*randn(size(t));
%Time Domain Plot of noise
figure(1)
plot(Fs*t(1:50),X(1:50))
title('Signal corrupted with zero mean randon noise')
xlabel('t (miliseconds)')
ylabel('X(t)')
%Create FFT of the signal
Y = fft(X);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
%Find the Time Domain
figure(2)
f = Fs*(0:(L/2))/L;
plot(f,P1)
title('Single Sided Amplitude Spectrum X(t)')
xlabel('Frequency (Hz)')
ylabel('|P1(f)|')
%FFT of the original signal
Y = fft(S);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
figure(3)
plot(f,P1)
title('Single sided amplituded spectrum of S(T)')
xlabel('f(Hz)')
ylabel('|P1(f)|')
Now I need to :
-Calculate the Binary numbers (please how do i do this!!!)
-Frequency in Z domain (Any sugestions???)
-Normalization (Help!!!)
  2 件のコメント
Samuel Louise
Samuel Louise 2019 年 2 月 3 日
Hi Mauro,
I am using the same sensor as you. would it be possible for you to share your code online?
thank
Sam
Mauro Pango
Mauro Pango 2019 年 2 月 28 日
Hi Samule,
I can mail it to you, just send me your email.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by