It seems ..you want to understand Phase locked loop control systems. Would suggest to edit your q as "I want to understand ..PLL control for single phase invertor grid synchronization" Consider the following..
1. Basically the single phase utility grid needs to be tracked in phase.. So use this as your reference
2. The output from your investor is to be phase adjusted with 1. above, So use this as your feedback.
3. Now you need a phase detector which outputs a voltage proportional to the phase difference. so use a phase detector. process this information further to delay/ advance your invertor output wave.