Grid Tie Inverter Schematic. The third option is an electronic inverter. I don't know for certain, but conversations I've had with an employee of a company that makes what you want lead me to Check out Home Power Magazine - they have good articles ranging from beginner to advanced, typically with schematics.
It uses relays instead of frequency shift to decouple. These grid tied inverters are not Micro inverters though. The relays between the inverter output and grid tie are used to ensure synchronization of the inverter output frequency and phase with the utility , needs to come down further to compete with traditional coal based grid electricity.
Hooking your generator into this system is also possible.
It works so well that my @$+$ power company came in and changed my meter.
Submit an Inquiry to Grid Tie Inverter Experts for free. They had a problem with me running the meter backwards during the day and using power at night. Such a topology can be useful.