Dynamic modelling and simulation of electric power systems using the Newton-Raphson method