Validation and Enhancement of a Three-level Inverter for Applications in Real-time Simulations