Described embodiments include an apparatus, whichincludes a catheter configured for insertion into a body of asubject, the catheter comprising a flexible distal portionconfigured to flex in response to a mechanical force appliedto the catheter, a conducting element, held by the flexibledistal portion of the catheter such that a position of theconducting element changes as the flexible distal portionflexes, at least one transmitting coil, disposed within thecatheter proximally to the conducting element, configured togenerate an alternating magnetic field that induces, in theconducting element, eddy currents that vary with the positionof the conducting element, and one or more receiving coils,disposed within the catheter proximally to the conductingelement, configured to output respective signals responsivelyto a superposition of (i) the magnetic field generated by thetransmitting coil, and (ii) a secondary magnetic fieldgenerated by the eddy currents.