Extending phased array techniques to optical frequencies is challenging because of the considerably smaller wavelengths and the difficulty of stabilizing the optical path lengths of multiple emitters to this level of precision. This is especially true under real-world conditions where thermal and vibrational disturbances cause path length variations that are considerable in relation to the wavelength. Earlier attempts have relied on an external mechanism to sense and compensate for any unwanted variations in the outgoing beams. Here we propose and demonstrate a method that does not rely on any external components. The method combines a pseudo-random noise phase modulation scheme together with conventional heterodyne interferometry to simultaneously measure phase variations between emitters. This information is then used to control the relative phases between the emitters and compensate for any unwanted disturbance. Experimental results are presented that support the viability of this design.