Microcomputer based self-tuning and self-selecting controllers