The paper deals with the main problems to solve in order to simulate precisely the behavior of complex power systems with mixed elements (power components and digital regulation devices). A simulation tool developed at the Swiss Federal Institute of Technology is shortly described. Finally, an industrial application of an induction motor fed by a three-level inverter tuned with a DTC (Direct Torque Control) is presented