Half-Wave Rectifier and Voltage Calculation