What re the calculations needed to determine the gain for droop control of an Inverter expecially voltage mode control. I want to model a microgrid consist of photovoltaic, wind turbine and storage systems (battery and capacitor) all connected to dc bus and then connect the dc bus to ac bus then connect to grid.