Real-Time Digital Simulation of Power Electronic Apparatus Interfaced With Digital Controllers