Controlling Devices To Achieve Stability Guarantees On Electric Distribution Grids