A CMOS vector lock-in amplifier for sensor applications