Jump to content
I2Cdevlib Forums

jdinatx

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by jdinatx

  1. For those interested: I output pitch and roll (euler angles) and the x & y gyros. With these values in excel, I used a complimentary filter to obtain theta(pitch), and phi(roll). I took two derivatives of these values using the 5-point numerical-derivative method (see Wikipedia) The acceleration values were clean-ish but still not very accurate. I ended up performing an FFT on the complimentary data (excel data analysis pack is pretty darn good), obtaining the frequency of the oscillations, and plotting a sinusoid at that frequency overtop of my data. I used this sinusoid for my derivatives. And that worked. It's cheating, but, hey, it's real life. I would really have liked to achieve the precision with the MPU-6050. Seems strange that I couldn't. I wonder if a dedicated inclinometer (like from analog devices) would provide better results... -JD
  2. Thanks again for the reply. If it's oscillating, we can assume the motion is purely rotational, no? I'm not sure I know what this means. I'm outputting only the accel values, these are converted to pitch and roll using an atan2 function ( http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf ). They look really close to sinusoidal. I would like to implement the gyro readings and make a simple complimentary filter, but the gyro values are rubbish. Can't figure out why they are so noisy. The accelerometers are outputting at 1KHz, and I'm guessing the gyros are too. That's plenty oversampled. That's a great idea. Thanks. Will let you know how it turns out. -JD
  3. Yes, the very top and center of the building. The frequencies appear to be no greater than 5-10 Hz. If the building behaves like an inverted pendulum (it should) then pitch and roll can be used to find angular acceleration for the two perpendicular axis. Dividing the acceleration by the position will yield the spring constant (as a = k * theta for a simple pendulum). To make sure I understand: The highest sampling rate is set using .setrate(), and .setDLPFMode() for the Loss-pass filter? Currently I have not modified default setRate(), or Range, and have the DLPF set to 5Hz. So the accelerometers are outputting at 1KHz for +/- 2g, right? The arduino is gathering data at ~400Hz, but I added a delay to pull it to ~100Hz as the data looks a little cleaner. Still, after taking two derivatives, the numbers quickly reach unreasonable values. Is it possible that I need an inclinometer with faster output and higher precision? Thanks for your reply, -JD
  4. Hi everyone, thanks so much for the community, and a particular thanks to those that worked so hard on getting this code up and running (Jeff). I am designing a desktop experiment for a college class that looks at oscillations of a scale-model building. Basically, the math can describe any system oscillating about its equilibrium as a simple harmonic oscillator (using a simple Taylor Series expansion of a potential energy function). i.e. acceleration is proportional to displacement. The goal of the experiment was to verify the math model with sensor data, but this is proving to be very difficult. The scale-building is fairly rigid, so displacements are small. Standard issues: acceleration data is too noisy and gyro data drifts (though it seems to be somewhat noisy as well). And integration is a nightmare. The only shot I have at making it work is that I don't need to filter or fuse sensors in real time. I can use 1000 or so points and use some other program (even excel) to do the processing. I've tried to implement a complimentary filter, a kalman filter, and now the DMP on the MPU all without much success. The DMP pitch and roll output shows the sinusoidal behavior I'm looking for, but it drifts, and taking 2 derivatives to obtain acceleration isn't helping. The complimentary filter basically only works if I reject the accelerometers completely (alpha = 1), and I have no idea how to tune the Kalman filter, though I've certainly tried. I hate to ask for help in solving my problems (rather than hang-ups) but I'm simply out of ideas, or possibly approaching the problem completely incorrectly. I could sure use some help. Integration was brought up in another post here titled "integration" and Jeff mentioned someone by the name of Seb Madgwick, and a cursory google search hasn't provided much information. Any thoughts would be welcome. (on sensors, filters, experiment design issues, etc). Thanks, and seriously great work here. -JD
×
×
  • Create New...