Controlling transient stability through dynamic series compensation