Here’s a great write-up on building a phase-locked inverter from mitxela.com:
The input is at 50Hz and the output is at 60Hz. So for every 5 input cycles, we want to generate 6 output cycles. We will be synthesizing a sine wave in software, and there’s no reason not to go with a conventional lookup table of 256 bytes. The PWM will be averaged out by the coils in the motor. It may even be possible to drive it with a square wave, but there is a self-starting mechanism I don’t want to interfere with. A synchronous single-phase motor normally will spin in either direction, and if you want it to spin only one way (as is the case with a clock) extra components are needed. It could be a mechanical pawl that stops it starting in the wrong direction, but the rotor spins very freely in either direction when the clock is powered off. More likely, there is a capacitor and/or additional coils which provide the shove in the right direction.
Project info at mitxela.com.