Dipole-dipole interactions and incommensurate order in perovskite structures