A phase-based TOF system preferably generates an optical waveform with fast rise and fall times, to enhance modulation contrast, notwithstanding there will be many high order harmonics. The system is preferably operated with an odd number of phases, to reduce system bias error due to the higher order harmonics, while maintaining good modulation contrast, without unduly increasing system memory requirements. Preferably the system can dynamically calibrate (and compensate for) higher order harmonics in the TOF generated optical energy waveform, over time and temperature. Within the optical energy transmission channel, or within the optical energy detection channel, detection amplifier gain may be modified, and / or detector signal integration time may be varied, and / or digital values may be employed to implement calibration and error reduction The resultant TOF system can operate with improved phase-vs-distance characteristics, with reduced calibration requirements.