At a micro-CHP unit the target size of the engine controller is not mechanical torque but thermal and mechanical power. Accordingly, these demands must be implemented by the engine controller. This means that on the one hand a mechanical demand is answered under the boundary condition of the highest actual efficiency and that on the other hand thermal demands have to be processed.Since the thermal- and mechanical power output is coupled with the actual efficiency, exceeding the nominal load of the thermal power, the actual efficiency can be regulated in order to answer the demand. This can be done in consideration of the maximum achievable actual efficiency. Limits are set by the combustion stability and thermal protection functions.The functions are modelled with Matlab/Simulink and the ECU code for a rapid control prototyping system is generated.A dynamic engine test bed for internal combustion engines up to 12 kW was built to verify the motor control functions. The measurement technology for all standard measurements of combustion engines has been selected accordingly to the expected measurement range of small engines.All measured values together with an interface for test automation are accessible via CAN bus. Because of this the rapid control prototyping controller is able to set any operating point parameters and uses the entire measurement devices from the test bed sensors. The integration of test bed automation in the CAN bus system enables the rapid control prototyping controller to get accesses to electrical quantities such as the actual motor current. This option is also available in CHP units with corresponding control. An efficiency optimization can be shown by adjusting the ignition angle with the active current of the generator as feedback information.