Sensors based on magnetic fluids