This paper treats the problem of primary and secondary control design in low-inertia power grids with mixed lines and a large amount of inverter-interfaced generation. A dynamic phasor model is developed that represents the electromagnetic and electromechanic dynamics of lines, inverters, synchronous machines and constant power loads. The model offers a straightforward way to combine white-, grey- and black-box models, and its structure lends itself well to control design. In a next step, a novel method to design fixed-structure robust controllers based on the frequency response of multivariable systems and convex optimization is presented. The method offers an intuitive way to define the control performance specifications, and is able to directly design discrete-time controllers. Finally, the potential of the control design method and the dynamic phasor model is demonstrated in a comprehensive example. In three scenarios it is illustrated how the approach can be used to significantly improve frequency and voltage transient performance in low-inertia power grids. Decentralized as well as distributed architectures for primary and secondary control are studied, and results are validated in simulation.