An optimal comfort control concept for variable-speed heat pumps and air conditioners is presented. The control objective is to maximize system performance (COP) while simultaneously satisfying comfort conditions. A multi-dimensional search technique is used to find the optimum compressor speed, indoor airflow rate, and evaporator superheat for given ambient conditions. Preliminary testing of the algorithm has been accomplished by simulating the closed-loop control of a variable-speed heat pump in a house subject to ambient conditions. To illustrate the performance and operation of this control concept, results are presented for a selected ambient condition. The results show that there are an infinite combination of compressor speeds and indoor airflow rates that satisfy the comfort condition, but only one results in the maximum COP. The optimal comfort control strategy is able to locate the desired operating point within six updates of the control parameters. The resulting COP is 7% higher than the COP for a conventional control strategy in which the indoor airflow rate is proportional to the compressor speed. The corresponding input energy savings is 15%. The optimal comfort control strategy has been tested over a range of latent and sensible load conditions. The COP improvement in each case is comparable to the results presented here. Finally, a discussion of implementation issues is given.Units: Dual