Density-functional simulations are used to calculate structural properties and high-symmetry phonons of the hypothetical cubic phase, the stable orthorhombic phase and an intermediate tetragonal phase of magnesium silicate perovskite. We show that the structure of the stable phase is well described by freezing in a small number of unstable phonons into the cubic phase. We use the frequencies of these unstable modes to estimate transition temperatures for cubic--tetragonal and tetragonal--orthorhombic phase transitions. These are investigated further to find that the coupling with the strain suggests that phonons give a better representation than rigid unit modes. The phonons of an intermediate tetragonal phase were found to be stable except for two rotational modes. The eigenvectors of the most unstable mode of each of the cubic and tetragonal phases account for all the positional parameters of the orthorhombic phase. The phase boundary for the orthorhombic--tetragonal transition intersects possible mantle geotherms, suggesting that the tetragonal phase may be present in the lower mantle.