Dynamic Study of Inverter-based Resources in Weak Grids