In this work, a new phase-lock algorithm for the Local Oscillator system of the ALMA receiver is presented.
This new algorithm replaced the look-up table based scheme used originally in the ALMA receivers. In
this new scheme all variables are adjusted dynamically on each lock attempt, except for the YIG oscillator
frequency limits. The new developed is able to correct aging and non-linearity of the YIG oscillators used
in the LO system. The provided solution reduces the locking time in up to a factor of ten, improving lock
success rate up to 99.91%.