To connect them to the grid, each one with connect to the grid and ground via a phase control and mathing box that assures safe transfer of power to the grid.
These are specialised and the grid owners have strict rules on interconnection and reserve the right to approve what connects to their grid. You will have to spek to them, tell them waht you want to do and ask for their rules for this. They will tell you and you then get your system into line with their rules.