one of the most critical situations comes when we want to tune the controllers in microgrid whether it is a voltage controller or current controller. the system has to go a lot of transients including islanding or fault inside the microgrid (anyone DG). so how can I optimize the best value for my plant and my controller also works according to what I want exactly? how can I tune the PI controller while I am considering the voltage and current controller for switching (droop control) of the inverter? I need an example of controllers tuning because the random hit and trial method of tuning is not a viable option.