Maintaining Stability in an Electricity Network with a High Penetration of Distributed Energy and Inverter Based Resources