Thursday, October 29, 2009

Metrigear Vector Pt 8: Pedal Speed (1)

The last post in my Metrigear series I conjectured how the Metrigear determined which direction was propulsive. Since the spindle spins with the pedal stroke, but since acceleration due to orbital motion is always in the same direction, averaging over time indicates which is the direction to the center of the orbit, and the propulsive direction is orthogonal to this in a well-defined way depending on if a pedal is a right pedal or a left pedal. So all that's left is to determine how fast the pedal is moving.

Given a crank length L, each revolution of the pedal the pedal moves a distance 2πL, or using the definition of a radian, each time the pedal moves though an angle of one radian it moves an arc length L. So if we know the angular rate at which the pedal is rotating, and we know the crank arm length, then we know the rate at which the pedal is sweeping out its orbit: its orbital speed which we multiply by the force in the orbital direction to derive propulsive force.

I was going to conjecture about how this is done, but then Metrigear published a blog post in which they showed how two accelerometers per pedal can be used for just this purpose. The two accelerometers in the pedal spindle measure accelerations along each of two directions orthogonal to the axis of the pedal spindle. Of course, the orientation of the spindle, and therefore of these orthogonal accelerometers, cannot be guaranteed relative to the pedal direction due to differences in the thread orientation in different crank arms. So a linear combination of these accelerations is needed to derive the acceleration along the direction to the center of the orbit, and similarly along the pedal's orbital trajectory. The linear transformations to derive these components use directions perhaps derived in a fashion similar to the one I described: over time, accelerations along the pedal's arc of motion diminish with averaging.

I extracted data from the Metrigear plots with g3data, a handy application for this purpose, and did a regression to sinusoids as shown in the following plot:

Reproduction of data from the Metrigear Blog, with fits

These data were recorded from a bike on a trainer, where any accelerations of the bike are insignificant. So the only contributions to the acceleration signal are gravity (which Einstein taught us is indistinguishable from acceleration) and the rotation of the pedal. Gravity manifests itself as an oscillating component with a rotation rate proportional to the cadence. The fit to the data shows a rotation rate of 12.06 radians/second, or a cadence of 115 rpm. This is a bit lower than Metrigear derived from the same data, but they measured the spacing between zero crossings, while I did a regression to the whole data set, which may be more robust.

There are two components to the acceleration: the tangential one (along the direction of pedal motion) and the radial one (which includes the orbital acceleration).

The tangential acceleration signal oscillates with an amplitude of 1 g, which is a standard gravitational acceleration (although effective gravity varies from point to point on the Earth, and the effective gravity will be reduced if the pedal spindles are not perfectly horizontal with respect to the pull of gravity, either of these variations are expected to be small in comparison to the resolution of these data).

The radial component also oscillates. I did regressions on both, each set yielding a similar oscillation frequency. Then I fixed the oscillation frequency at the average of these fits and refit the curves, adjusting the phase and, in the case of the radial curve, the offset from zero. This offset provides the average orbital acceleration rate in these data, which represent smooth steady pedaling. The derived value for this offset was 2.60 g.

Metrigear states the crank length can be derived from these data, and it's true. Using my derived rate of pedal rotation: ω = 12.06 radians/sec, and a value of gravity g = 9.807 m/sec², the crank length L is calculated L = aorbital / ω², where a is the measured acceleration. Running the numbers yields 175 mm. So I think this is the crank length.

However, this approach used a regression of data to derive the rate of oscillation of the gravity component. Better would be to measure the rate of pedal rotation at every discrete point in time, independent of other points in time, so that if the pedal rate changes then we have rapid and accurate estimation of the new rate. For this purpose, if the orbital acceleration can be extracted from the radial acceleration signal, stripping out the offset from the components due to gravity and bike acceleration, then the rate of pedal rotation can be derived:

ω² = aorbital / L

From this we can get the pedal's orbital speed:

ω L = ( aorbital L )

So how do we derive this orbital component? Well, one way is to look at data from th e left pedal and the right pedal together. Assuming the pedals are 180 degrees apart (not always true with Power Cranks!), and that the spindles are parallel (crank arm and pedal spindle flex are within acceptable limits), then the acceleration of gravity and of the bike's accelerations are in the opposite direction relative to the left spindle and relative to the right spindle, with the direction from each spindle to its center of rotation taken as a reference. So taking the average of these radial acceleration components does the job:

ω L = [ aradial,L + aradial,R ) L / 2 ]

Does Metrigear do this? Well, maybe. But they claim the Vector works with just one Vectorized pedal, and I'm sure PowerCrank users will be upset if it doesn't work with their set-up. So there needs to be a back-up scheme.

Hmm....