Signal processing for sensors