This paper describes a prototype expert system being developed for maintaining autonomous operation of a Mars oxygen production system. System and sensor failure modes and their corresponding symptoms are identified. For a set of operating condition definitions, a knowledge-based diagnostic algorithm is developed to handle several housekeeping functions. These functions include self-health checkout; an emergency shutdown program; failure detection and isolation and active control commands. Finally, a computer simulation using BASIC language has demonstrated the feasibility of the expert system and verifies its rule-based diagnosis and decision making algorithms.