A new real-time ergometric system, ERGORAT, for measuring the energy expenditure due to muscular activity of small mammals is described. The method is based on measuring the vibrations induced by a freely moving rat to a platform on which it is living. Six accelerometers placed on the platform detect all the vibrations produced by the rat. The co-ordinates of the centre of mass of the animal are located by an optoelectronic device. This location and the six accelerations are fed to a microprocessor-based data acquisition and processing system. Using a Lagrangian dynamic model, the values of the mechanical energy transferred to the platform are computed every second. ERGORAT is used as part of an experimental setup allowing the measurement of the energetic balance of lean and obese rats. The results clearly show that the increase in metabolic rate of obese rats during cold exposure can be entirely explained by the cost of their increase in locomotor activity, whereas for lean rats, this cost accounts for only 41.5 per cent of their metabolic increase, the remaining being the contribution of their active brown adipose tissue.