## Four inverter microgrid with two voltage sources and two current sources

The circuit files for this case are in these two links:
circuit_files.zip
circuit_files.tar.gz

To begin with let us examine the current drawn by the passive load with respect to the voltage at the load bus. The phase of the load bus voltage and the passive load current are plotted together and it can be seen that the load draws active and reactive power.

Inverter 4 switches on at 0.1s. This is shown by the next set of figures below. First is shown the active power supplied by the inverters. Inverter 1 and Inverter 4 are designed to share active power equally and this can be done by selecting equal active power-frequency droop gains. Until 0.1s, Inverter 4 supplies zero power. As can be seen, at 0.1s there is a transient after which they begin to share the passive load power. In a similar manner, the plot below active power plot, shows how the inverters share reactive power. Again, inverters are designed to share reactive power equally by choosing equal reactive power-voltage magnitude droop control gains.

The next plot shows the output currents of the Inverter 1 and Inverter 4 to compare with the power plots shown above. Only the phase a currents are plotted for clarity and it is clear how the currents begin to merge as they inverters share power almost equally.

To achieve the above power sharing, the droop control laws vary the frequencies and the magnitudes of the inverter output voltages with respect to the active and reactive power supplied respectively. This is seen in the next two plots.

Now Inverter 2 switches on at 0.4s. As stated before, Inverter 2 is controlled such that it is identical to the passive load. Therefore, the total load demand will double. The plot below shows the Inverter 2 currents. As can be seen, the currents are zero until 0.4s and after that as can be seen from the next plot, Inverter 2 phase a currents are equal to the passive load phase a currents.

The tracking performance of Inverter 2 can be seen from the next two plots which show how the d and q component of current injected by Inverter 2 track the references.

Now for the last stage. At 0.7s, Inverter 3 turns on. Inverter 3 acts as a compensator and storage/generator unit. It supplies 25% of the total load active power demand and 75% of the total load reactive power demand. The plot below shows the currents supplied by Inverter 3. The plots below that show the tracking performance of the inverter in d and q domain.

Now to examine how Inverter 1 and Inverter 4 will share this changing power demand in the microgrid. The plots below will show the active and reactive power supplied by these inverters for the entire duration of the simulation. At 0.4s, when Inverter 2 is switched on, the load power demand doubles and as can be seen the active and reactive power supplied by Inverter 1 and Inverter 4 also double though they continue to share the power demand almost equally. At 0.7s, Inverter 3 switches on. Since Inverter 3 supplies 25% of the total load active power demand, there is a small drop in the active power supplied by Inverter 1 and Inverter 4. On the other hand, since Inverter 3 supplies 75% of the total load reactive power demand, there is a significant drop in the reactive power supplied by Inverter 1 and Inverter 4.

This was the first major case simulated with this software and is therefore a significant milestone. The only concern is the time needed for simulation. The next step will be to speed up the simulation by using some optimizing techniques.