MPU 9250 accelerometer Digital Signal Processing.
Mostrar comentarios más antiguos
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 comentarios
Samuel Louise
el 3 de Feb. de 2019
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
el 28 de Feb. de 2019
Respuestas (0)
Categorías
Más información sobre Transforms and Spectral Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!