Calculating the output voltage of Rectifiers