A major problem of control in a Controlled Ecological Life Support System (CELSS) is to maintain and manage a stable diet for its human crew. In this paper, the development and mathematical basis of a “diet” control subsystem, functioning as a well characterized expert program, is described. The general formulation of the expert program, which is named Ceres, is presented. The method can provide both steady-state and dynamic solutions for the problem of diet in a CELSS. The distinction between Ceres and the nutritional modeling methods is demonstrated for the case of a three-component, potato-wheat-soybean food system. The significance of food processing in providing added flexibility in the management and planning of diet is discussed. It is shown that diet solutions, obtained by simple optimizations, are not necessarily best suitable for the optimum operation of the CELSS. It is further shown that an expert system can find near optimal solutions that may better satisfy the requirements of a CELSS.