Half wave controlled rectifier simulation