Analytic formulation for the calculation of leakage reactance in wound-core transformers