Intelligent control and automatic detection/prediction in sensor based systems