Power grids, which form the cornerstone our technical infrastructure, will undergo a revolutionary change in the upcoming decades driven by the advancement of renewable energy sources. Large centralized power plants are put out of operation in favor of many small, distributed and potentially fluctuating generators. To face this enormous challenge for the reliable operation of the power grid, both the structure and control of the grid must undergo a radical change. This development must be supported by a great advancement of our theoretic understanding of complex networked systems. In this talk I discuss the collective dynamics of power grids using an idealized oscillator model that model grid dynamics on coarse scales. This model bridges the gap between abstract large-scale, basically structural network models from physics on the one hand and detailed simulations of small electric engineering systems on the other. I analyze self-organized synchronization of the grid depending on the network topology and study the impact of dynamical perturbations and the influence of topological changes. I find that, contrary to common intuition, the addition of new transmission lines may reduce the overall grid capacity and explain this phenomenon by geometric frustration in the oscillator model.