A demagnetization circuit for forward converters