This example system shows how the preparation for resynchronization of Generator 2 to the grid. Note that at 2 seconds, a signal is triggered so voltages between buses 3 and 4 should be equal.
Simulate the system for 10 seconds. Variables of interest are:
B3.v
B4.v
G1.gen.SPEED
G2.gen.SPEED
Note the behavior of those variables before and after the connection of generator G2 to the main grid.