All posts Signals

Rebuilding the pen tip's path: the hardest easy-sounding problem we work on

In short

Reconstructing the written stroke from motion means fighting three enemies at once: double-integration drift that compounds errors, a gravity signal a thousand times larger than the writing signal, and the geometric fact that the sensors are not at the tip.

The pen's answer is structural: two IMUs whose separation reveals rotation, a force channel that resets drift at every touch, and integration windows kept as short as a stroke.

The short version. The full post has the detail and the why.

In this post

  1. Enemy one: drift compounds
  2. Enemy two: gravity dwarfs the signal
  3. Enemy three: the sensor is not the tip
  4. Structure beats cleverness

Enemy one: drift compounds

Position from acceleration requires integrating twice, and integration is an error amplifier. A tiny constant bias in acceleration becomes a growing velocity error, then a position error growing with the square of time. Uncorrected, the reconstructed path curls away from truth within seconds. Drift cannot be eliminated, only contained, so the whole design is about giving it as little time as possible to grow.

Enemy two: gravity dwarfs the signal

The accelerations of handwriting are tiny, thousandths of the acceleration of gravity that the sensor also feels at every instant. To recover the writing signal you must subtract gravity, and to subtract it you must know the pen's orientation precisely. Tilt the estimate by a single degree and the leaked gravity is already bigger than the strokes you are trying to see. Reconstruction accuracy is orientation accuracy.

solid: true path · dashed: estimate · dots: anchors that pull it back
The estimate (dashed) drifts from the true path (solid) inside each stroke, and every force-sensed touch-down (dots) snaps it back before the error can compound.

Enemy three: the sensor is not the tip

No sensor sits at the ballpoint. Sensors ride in the barrel, centimetres from the paper, and when the pen rotates, barrel and tip move differently, the lever-arm effect. This is where the dual-IMU design earns its keep: two sensors at known positions along a rigid body feel the same rotation with different accelerations, and that difference reveals the rotation cleanly enough to project motion down to the tip itself.

Structure beats cleverness

Each enemy meets a structural answer, not a heroic algorithm. Drift meets the force sensor: every touch-down is a fresh anchor, so integration windows last a stroke, not a page. Gravity meets disciplined orientation from fused gyro, gravity and compass. Geometry meets the second IMU. The result is a system where errors are repeatedly caught, reset and cancelled, which is the only way integration-based reconstruction stays honest.

Key takeaways

  • Double integration amplifies error; drift must be contained, not wished away.
  • Gravity is ~1000x the writing signal; reconstruction accuracy is orientation accuracy.
  • Two IMUs turn lever-arm geometry from a problem into the measurement itself.
  • Force-anchored, stroke-length integration windows keep errors from compounding.

This problem is why the pen looks the way it does inside. The architecture is the algorithm.

Read next