A generalized algorithm to compute response of partial discharge in a transformer winding using its equivalent ladder network