Analysis of the automatic frequency control in heterodyne optical receivers