The primary task of an expansion valve in a refrigerating machine is to control the mass flowrate into the evaporator to obtain optimal operation without ‘hunting’ under given conditions. A stepper-motor-controlled expansion valve and an evaporator have been studied. The tests were carried out on a fixed refrigerating machine of cooling capacity less than 6 kW, with constant condensation conditions and variable evaporating temperature (−20 to +10°C) and compressor speed (1000 to 3000 r.p.m). Two control algorithms (proportional/derivative and qualitative optimal regulation) have been developed for opening and closing the valve with the stepper motor. The control parameters depend on both the expansion valve and the evaporator transfer functions. In steady-state conditions, the system is stable with a superheat equal to the set value. Under transient conditions, with step excitations of 300 and 1000 r.p.m as well as for cold-start of the machine, the control algorithms are adequate for regulating the refrigerant flowrate into the evaporator. © 1997 John Wiley & Sons, Ltd.