The equilibrium structures of cubic, tetragonal and orthorhombic phases of magnesium silicate perovskite are found from first principles electronic structure calculations. Zone centre and zone boundary phonons of each phase are also calculated from ab initio forces from finite displacments, and phase transitions between the phases are analysed in terms of phonon instabilities, and coupling between modes. Both the cubic and tetragonal phases have strongly unstable modes dominated by rotation of the SiO6 octahedra, which freeze in to ultimately form the orthorhombic phase. First priniciples molecular dynamics simulations at finite temperatures are used to further investigate the stability of the intermediate tetragonal phase and the coupling between participating phonon modes. The implications for a transition temperature between orthorhombic and tetragonal phases are discussed.