Text this: Dynamic optimisation of virtual synchronous generator to enhance stability of power system