The synchronization is done through a PLL block that senses the voltage of the grid and obtains the phase angle to be used in the PWM control of the DC-AC converter. This PLL is inside the VSC control, if you use a shipped demo as a base for your work. So that would solve the synchronization aspect.
When it comes to the battery, you may need a DC-DC converter between battery and DC link to regulate the flow of energy to/from the DC solar system.But the location seems correct to me.
Best of luck / Juan