loading the series converter behaves like a variable

loading conditions and transients. It is assumed that a non-linear unbalanced load is connected to three-phase balanced source voltages. Lower output voltage reference = (Undistorted utility voltage VG, Normal) – (Distorted measured utility voltage VG)VG (Ref) = VG, Normal – VG, ActualIII. DUAL-OUTPUT FOUR-LEG INVERTER USED IN THE MICROGRIDThe system of Dual-Output Four-Leg Inverter used in the microgrid is displayed in figure 1. The use of dual-output four-leg inverter reduces use of two separate inverters. Henceforth, in addition to reducing the number of semiconductor switches, gate drive and control circuits, and consequently cost, it give an integrated structure and removes the need for two inverters of different ratings. The diagram shows two sources one is utility and other is microsource. Microsource consisted of various renewable sources like solar plant, small wind plant, small hydro and non-renewable like small diesel power station etc. In normal condition, the load is supplied both by the utility and the microsource. The inverter lower output is connected in series with the microgrid, and inverter upper output is connected to the microsource and microgrid. The upper output converts the microsource dc voltage to constant and balanced three-phase voltages irrespective of the utility conditions. The lower output however acts in communication with the utility as a compensator and power quality conditioner to reduce/remove its sag and unbalance, and to reduce occurrence of island operation. All above problems avoided by restricting the flowing current between grid and microgrid during fault. This objective is achieved by injecting voltage through series transformers.Using two separate inverters, under fault condition, the series converter plays no role in supplying the microgrid loads and is solely generating reactive power to make up utility voltage sag, whereas the reduced power delivered by the utility is wholly provided by the microsource through the parallel converter. For this purpose, flux control algorithm is employed so as the series converter behaves like a variable inductor to restrict the fault current while no active power is produced. However, in this report, in addition to restraining the fault current, preventing island operation and enabling utilization of grid power though at a reduced rate, the lower output which is placed in series with the utility also conducts a portion of active power from the microsource to the load. In other words, during fault, in addition to reactive power, active power is supplied by both outputs for the microgrid loads. As will be explained in the following discussions, an outcome of this strategy is that when both outputs are active the limitation of modulation index would be minimized by reducing the phase difference between the output references.Since the lower output reference is defined as the difference between ideal undistorted utility voltage VG, NORMAL and measured utility voltage  VG, upper and lower output voltages have equal frequencies, and hence, the EF mode is suitable for this application. The only limiting factor in modulation indices in EF mode is the phase difference between the output voltages and hence their references. Due to the important consequence of this limitation which is reduced dc bus utilization, i.e., increased dc bus voltage level, next section is designated for investigation of this issue and its influence on the converter performance. It will be demonstrated that under most common fault conditions, the limitation of the converter modulation indices for both outputs is confined in an acceptable range imposing the least negative effects on the system operation.IV. OUTPUT CONTROLLER DESIGNProportional Resonant (PR) controller The Laplace transform of the ideal PR controller is:C(S) = KP + (2 (KR).s / (S2+ ?2)) (5)Where KP the proportional is gain and ?, KR are the resonant frequency and gain, respectivelyThe PI controller provides an infinite gain with a constant variable; it get a quick response to a step reference without steady-state error, but is unable to track a sinusoidal reference. On the contrary, the PR controller provides an infinite gain at the selected frequency (resonant frequency) and zero phase-shift.The two upper and lower outputs should generate a set of three-phase voltages according to their references. For this purpose, a simple dual-loop control algorithm incorporating an outer voltage control loop and an inner current control loop is employed. Figure 3 displays the control block diagram of all inverter phase and leg. GV(S) and Gi(S) are, respectively, voltage and current controllers and M is the modulation index. Passing through GV(S) in the voltage control loop, the reference current is derived from the error of the output voltage. 8To design current and voltage controllers, the system transfer functions,  GV(S) and Gi(S) respectively, for voltage and current loops, are obtained in (6) & (7)GV(S) = (LLS + RL) / (RLCfS + 1) (6)Gi(S) = x / y (7)Where,x = (VDC / 2) (LLCf S2) + (RLCf S + 1)y = (LLLfCf S3) + (RLLfCf S2 + (LL + Lf)S + RLTuning the PR controller, desirable phase margin and gain margin can be achieved and the steady-state error can be prevented. Table 1 lists the PR gains of the upper and lower output controllers which are equal for the three phases.Table 1 Gains of the PR Controller Upper Output Lower  OutputGain KP KR KP KR Current Control Loop 0.05 5 0.05 5 Voltage Control Loop 0.08 20 0.8 50