DYNAMIC ANALYSIS OF A MICROGRID POWERED WITH AN INVERTER AND MACHINE-BASED DISTRIBUTED RESOURCES