A Method For Evaluating Grid Stability With High Penetrations Of Renewable Energy And Energy Storage