An electronic device, comprising: a reference oscillator generating a reference signal having a reference frequency; a first, second, third measurement oscillator (201, 202, 203) coupled respectively to a first, second, third antenna (231, 232, 233) located at a respective first, second, third position of the electronic device, wherein the first, second, third measurement oscillator (201, 202, 203) respectively generates a first, second, third measurement signal having respectively a first, second, third measurement frequency corresponding to a respective distance of an object from the first, second, third antenna (231, 232, 233); and a comparator coupled to the reference oscillator and the first, second, third measurement oscillators (201, 202, 203) which generates a respective first, second, third comparator output including a difference between the reference frequency and the first, second, third measurement frequency respectively which represents the distance of the object from the first, second, third antenna (231, 232, 233) respectively; wherein the first, second and third antennas (231, 232, 233) are positioned within a common plane and spaced apart from each other; the electronic device further comprising a processor configured to determine from the first, second and third comparator outputs a relative three-dimensional position of the object with respect to the plane of the first, second and third antennas (231, 232 and 233) based on a distance of the object to each of the first, second and third antennas (231, 232, 233); wherein the processor is further configured to: determine whether the position of the object moves over time; when the position of the object moves over time, determine whether the movement of the object matches one of a plurality of input models for a motion gesture to detect the motion gesture; and perform an action associated with the detected motion gesture. a reference oscillator generating a reference signal having a reference frequency; a first, second, third measurement oscillator (201, 202, 203) coupled respectively to a first, second, third antenna (231, 232, 233) located at a respective first, second, third position of the electronic device, wherein the first, second, third measurement oscillator (201, 202, 203) respectively generates a first, second, third measurement signal having respectively a first, second, third measurement frequency corresponding to a respective distance of an object from the first, second, third antenna (231, 232, 233); and a comparator coupled to the reference oscillator and the first, second, third measurement oscillators (201, 202, 203) which generates a respective first, second, third comparator output including a difference between the reference frequency and the first, second, third measurement frequency respectively which represents the distance of the object from the first, second, third antenna (231, 232, 233) respectively; determine whether the position of the object moves over time; when the position of the object moves over time, determine whether the movement of the object matches one of a plurality of input models for a motion gesture to detect the motion gesture; and perform an action associated with the detected motion gesture.