Optimal Analysis and Construction of Computerized Door Controller