Borrar filtros
Borrar filtros

Integration of numerical data

9 visualizaciones (últimos 30 días)
Himalay Desai
Himalay Desai el 20 de En. de 2020
Comentada: Himalay Desai el 29 de En. de 2020
Good evening!
I have a set of data collected from a gyroscope collected against time with a timestamp of 0.1 seconds. It contains both, positive and negative values. In order to obtain the angle, we have to integrate the angular velocity (data collected from MEMS and FIber Optic gyro) against time such. in this experiment, I have turned the gyroscope from 0 degrees to 30, from 30 degrees to 60 and then from 60 degrees to 0 again. theoretically, the answer of this integration should be zero as we are returning to the point where we originally started. but, the answer I'm getting here is 57.3920 degrees. It is understood that the funtion ' trapz() ' only evaluates the positive data points, thereby resulting to figure close to 60 degrees rather than zero. What funtion should I use in order to integrate this numeric data. Given below is the code for the same:
T30 = (deg30.Time);
M30 = (deg30.Mems);
F30 = -(deg30.Fiber);
intM30 = trapz(M30);
intF30 = trapz(F30);
note: also notice that the negative sign in the F30 function is for transponding the negative data points to the same side of the axis.
all attempts, successful or not, are appreciated!

Respuesta aceptada

Sindar
Sindar el 20 de En. de 2020
It does not appear that trapz ignores negative data. Instead, I think you just need to give it your time data so that it can accurately integrate:
intM30 = trapz(M30,T30);
intF30 = trapz(F30,T30);
  1 comentario
Himalay Desai
Himalay Desai el 29 de En. de 2020
thank you so much for the answer. i tried this one and it worked.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by