Online dynamic security control in a large scale power system