An improved method for hardware-based complex demodulation