The Real Time Digital Simulation of a Single Phase Voltage Source Converter and its Application