'Deadband filter' design - could use some tips! :)