I'm working on a project in which a rod is attached at one end to a rotating shaft. So, as the shaft rotates from 0 to ~100 degrees back-and-forth (in the xy plane), so does the rod. I mounted a 3-axis accelerometer at the end of the moving rod, and I measured the distance of the accelerometer from the center of rotation (i.e., the length of the rod) to be about 38 cm.
Below is the plot of both relevant dimensions collected from the accelerometer (after filtering). I am neglecting to include the third up and down dimension as the accelerometer shows a near constant ~1 G, so I think its safe to say its not capturing much rotational motion. Red is what I believe is the centripetal component, and blue is tangential.
Note that I'm also colleccting position and time data, though I don't know if that helps any.
My questions pertain to the following:
1) How do I "combine" these data to fully capture the rational motion taking place? I know it's not as easy as summing the squares and taking the sqrt, but I've been having a really hard time on finding a way to do this throughout all the research I've done.
2) How do I correct for the offset in the data? After some research and asking others, it may have to do with the orientation of my accelerometer (its not perfect). Apparently I should use rotation matrices to transform the measurements to a different coordinate system - one where one axis feels an acceleration of g and the rotation of the rod influences another axis only, but I'm unsure of how to do this.
Can someone help me use rotation matrices on the data? Will using rotation matrices fix the problem listed in number 1 as well? I'd appreciate any kind of assistance I can get. Here are links to both dimensions captured from the accel (the full data):