A Rotating Reference Signal Based on Nonlinear Control for Multi-bus Single Phase Micro-grids

In islanding Micro-Grids (MGs), distributed generation units are in charge of controlling voltage, frequency, and current of the grid on their own without any assistance from the main grid. Therefore, it is of utmost importance to select and design a controller that is robust against disturbances and load variations. In this study, a new sliding mode controller with a rotating reference voltage algorithm is proposed which improves the load sharing between distributed generators (DGs) in an islanded mode MG. In the proposed algorithm, the amplitude of the reference voltage signal of the controller is adaptively modified to improve the performance and convergence rate of the controller. As a case study, the proposed strategy is studied based on the assumption that there are three DGs in the grid. One of the DGs is in charge of regulating voltage and frequency based on a reference signals, and the two other DGs are responsible for load sharing and loads current control mode. The MG under study consists of three low voltage distributed generation units operating in parallel mode. In order to have a realistic case study, it is assumed that the MG consists of different types of loads such as resistive, inductive and nonlinear loads. Extensive simulations carried out in MATLAB environment indicate that the proposed framework is able to provide more desirable total harmonic distortion (THD), lower steady state error, and faster response compared with classic sliding mode controllers.


Introduction
In any occasions where electricity consumption is far from the main grid, such as remote villages/islands, or isolated communication stations, it is economically inefficient and/or technically difficult to deliver electricity via transmission lines. In such circumstances, an economically reasonable approach is to supply power in a form of islanding mode MG that contains renewable energy resources such as wind turbines, fuel cells, photovoltaic generators and etc. [1]. In such islanding MGs, distributed generation units of the MG are in charge of controlling voltage, frequency, and current on their own without any assistance from the large main grid [1][2][3]. Therefore, it is crucial to design an appropriate controller to be robust against MG's disturbances and load variations. The main goal of this paper is to propose a robust nonlinear controller for MGs.
It is desirable that an MG control (MGC) provides sinusoidal output currents and voltages (that is with low total harmonic distortion) in all operation modes [4]. Additionally, MGC is expected to be robust against grid disturbances, be efficient, of fast dynamic response, and provide proper voltage regulation. So far to achieve such features, many control approaches have already been proposed in the literature especially for pulse width modulation (PWM) based converters: proportional-integral-derivative (PID) control, robust control, model-based linear control, and internal model principle based control [5][6][7]. However, to be more precise, MGC is more of a nonlinear, time-variable system due to uncertainties caused by the operation mode transitions and DG disturbances. Accordingly, conventional control techniques are less likely to reach their ideal control objectives due to highly coupled nonlinearitied and multivariable structure of the system. In fact, majority of the conventional control techniques are able to provide acceptable performance only in some limited operating points. As a result, nonlinear controllers look to be more suitable candidates to overcome the uncertainties issues, and to guaranty global stability and better compensation [8].
Different nonlinear controlling approaches have been investigated in the literature so far. One of the most suitable nonlinear control approaches is Sliding Mode Control (SMC) which is widely believed to be able to provide robust control against uncertainties [9][10][11][12]. In [13], SMC is used to control an AC-to-DC voltage source boost converter while the control objectives are constant output voltage and input unity power factor. SMC is also applied in [14] to a single phase inverters. Ref. [14] presents several control algorithms in both grid connected and stand-alone operation modes. Similarly, in [15], SMC is used for controlling voltage loop in voltage-source rectifiers, which have proven high ability to provide fast dynamic response, quasi unity power factor operation as well as low current harmonic content.
Practically speaking, in the control theory, it is very difficult, if not impossible, to acquire an accurate and precise mathematical model of a system. This is mostly caused by variation in the parameters of the system, some other uncertainties, external disturbances and the limitation caused by detection methods [4]. Therefore, using robust control frameworks are superior over conventional control methods as they can handle such issues more successfully. In this framework, total sliding surface tries to decline the control error through a sliding motion for the state trajectory [16]. The proposed framework also uses fixed frequency PWM modulation. As a result, switching frequency remains constant, which is advantageous over variable switching strategies.
There have been lots of researches in the literature addressing control strategies for the islanding mode operation of MGs [17,18]. Droop control technique is one of the popular control strategies regarding voltage and frequency control in islanded MGs [19,20]. However, there are several shortcomings associated with droop control strategy. For instance, dynamics of the load are not explicitly considered in the control loop which may results in voltage/frequency instability in case of large and/or fast load changes in the system. Additionally, droop control approach includes a tradeoff between power sharing accuracy and frequency/voltage regulations, slow transient response, and high dependency on the link filter impedance of the interfaced converters [21,22]. In order to cope with such deficiencies of droop control method, several modifications on the droop control has been proposed in the literature [23,24]. As an example, in order to improve transient and steady-state performances, the framework proposed in [23] combines droop control method with other control strategies. In [17,18,25], load dynamics are also considered in the MG model as to achieve fast and accurate dynamic response. Above mentioned methods consider the load as a parallel RLC network while its parameters are within pre-specified limits. Feed-forward compensation is also applied in [26] to mitigate the impacts of the load dynamics on the MG stability and performance.
In this study, a new control framework is proposed for islanding MG with several DGs, which is based on a sliding mode controller to control voltage, frequency and current of the power grid as well as load sharing between distributed generation units. Moreover, to improve total harmonic distortion and root mean square (RMS) value of the MG's voltage profile, a new algorithm is proposed which is based on an adaptive rotating the reference signal. One of the DG units is operating in voltage-frequency mode, i.e. it controls the micro-grid's voltage-frequency by forcing the grid's voltage to follow a reference signal and trying to minimize the error between output voltage and the reference signal. The two other DG units are operating in the current control mode or load sharing. The current reference signal is proportional to the load current which should be measured on real-time basis. The proposed scheme is simulated and verified in different case studies using in Matlab/Simulink software.
The remainder of the paper is organized as follows. Section 2 presents the dynamic model of the system. In section 3, we present the sliding mode based controller which is in charge of voltage-frequency, current, load sharing control as well as the rotating reference signal algorithm. In section 4, the simulation results of a low voltage micro-grid is presented and analyzed in different scenarios such as resistor, inductive and nonlinear loads. Finally, concluding remarks are presented in section 5.    Fig.3 [27]. The output LC filter is employed to mitigate the output voltage harmonic components that are generated by the PWM inverter.

Micro-grid Dynamic Modeling
Where = is the inverter output voltage and u is the controller's input signal. Combining equations (1) and (2) results in: where inductive current (i L ) and capacitor voltage (V O ) are selected as state variables. V DC is the voltage of the DC link or UPS. i O and are the output current of the filter and the capacitor, respectively.

Controller Design, Stability Analysis and Rotating Reference Signal Algorithm
As the MG is supposed to be operating in islanded mode, we first design the voltage-frequency controller for one DG unit. Afterwards, we present the current controller and load sharing scheme based on the loads' currents. In this study, loads' currents are assumed to be measurable.

Sliding Mode Theory
Sliding mode control is a variable structure control method in which the controller output considering state variables of the system [28,29]. Well known advantages of SMC are stability against load and line variations, robustness, good dynamic response and simple implementation .
The n th order model of the system which is considered by the sliding mode controller is as follows: where ( ) is system distortion. Distortion can be load variation and/or noises in the MG. The is control input, n is the system order, and x is the system state vector. If the objective of the sliding mode controller is to force the system to track a reference signal, A sliding surface is defined based on the order of the system. In this paper, the system state equation is assumed to be first order or second order; consequently, these types of sliding surfaces are introduced in the following.

Sliding Surface of First Order System
Sliding surface is defined based on the error between output and reference signal as follows: where S and are the sliding surface and reference signal, respectively. The objective of the control method is to minimize the error to track the reference signal. As a result, the control equations are obtained by making the derivative of the sliding surface equal to zero:

Sliding Surface of Second Order System
If the error between output and reference signal is defined as: � = − , then the sliding surface of second order system can be obtained as follows:

32
A Rotating Reference Signal Based on Nonlinear Control for Multi-bus Single Phase Micro-grids where is a positive number. To derive the control equation, the derivative of the sliding surface is posed to zero: Then, in order to boost the robustness of the controller against external distortions, a discrete part is also added to the control law as shown below: Where k is defined based on the corresponding Lyapunov function and sign represents the sign function. In order to validate stability of the proposed control law, a Lyapunov function should be defined; if the derivative of the Lyapunov is negative, the system stability is proved. In this case, the Lyapunov function and consequently its derivative are defined as follow: where is a constant positive number.

Rotating Reference Signal Algorithm
In this proposed sliding mode controller, the steady state error between desired voltage and output voltage is minimized by means of an adaptive rotating reference signal, . It will be shown later that the proposed rotating reference algorithm will reduce the THD and also will improve the voltage profile compared to the conventional SMC controllers with a constant reference signal. The proposed method improves the controller's performance by adaptively adjusting varying the reference voltage of the controller. More precisely, the proposed method continuously updates the amplitude of the reference signal based on the voltage and current errors. The proposed algorithm can be formulated as follows: Where is the sinusoidal reference signal and is the amplitude of the inverter output voltage signal. is the amplitude of reference signal that the output voltage of inverter should tend to it. z is the Proportionality between output voltage and reference signal. The value of _ is related to the z to force the error between and output voltage to tend to zero.

Voltage-frequency Controller
The goal of voltage-frequency control unit is to control the voltage-frequency by minimizing the voltage error: Where 2 x is derivative of 1 x , and ref V is the reference signal defined as: where m V and ω are denoted as amplitude and angular frequency, respectively. In this study, m V is not considered to be constant; instead, its value is changing adaptively based on the algorithm explained by equation (11).
According to (12) and (13), the state-space equation (3) can be rewritten as follows: As appears in (15) system state-space equation is second order; as a result, the switching surface can be defined as below: where λ is a positive real constant.
Then the equivalent control energy should be retrieved. Thus, the sliding surface is derived and set to zero so that the equivalent control energy is calculated as follows: Finally, voltage control law is obtained as follow: To evaluate stability, the Lyapunov function given in (19) is examined: As already mentioned, to ensure stability of the system, derivative of the Lyapunov function derivative should be negative.

Current Controller
In this section, a sliding mode controller is designed to control the current of the rest two DG units; moreover, a pair of gains is defined for the two DG units which will be used to share the load current between them. Based on the output current and equation (2 and 3), the system state-space is first order. Accordingly, the model of the system is as indicated in (21): So, the switching surface is defined as follow: Then, the equivalent control energy must be retrieve. Thus, the sliding surface should be derived and set to zero so that equivalent control energy is calculated as: Finally, the current controller is obtained as follows: To keep stability, the Lyapunov function introduced in (19) is used to calculate boundaries of parameter Ks: where S η is a positive constant. Each one of the current controllers of DG units has a cap on power generation capacity, thus, the output current amplitude should be limited. Equation (26) shows the limitation on the reference current signal. It should be noted that a factor of the load current is used as the reference signal; when the reference signal peak violates the upper limit, the upper limit will be considered as the reference signal. This way the constraints of the system are taken into account. The proposed formulation is as below: Where max I is the maximum current that can be produced by the inverter. load i is the load current and 'm' is the gain of the reference signal corresponding to each unit. Fig.4 illustrates the flowchart of the overall proposed sliding mode controller regarding load sharing, as well as voltage and current control.

Simulation Results
In this section, the performance of the algorithm is investigated under different load scenarios such as resistive, inductive and nonlinear loads. Fig.5 shows an islanded MG with three distributed generation units. Simulations are carried out by Matlab/Simulink software. Parameters of the electric power grid and control parameters are shown in table 1.
As shown in Fig.6, the nonlinear load consists of different elements such as resistor, capacitor and diodes. As shown in Fig.5, the parameters of system are measured, to be used as the input of the controller. For each DG, an appropriate controller shown in Fig.4 is chosen. According to Fig.5, DG 1 is selected as the voltage-frequency control which is responsible for regulating voltage-frequency of the micro-grid whenever the system faces any load variations. On the other hand, DG 2 and DG 3 are controlled output current whose gains are used for sharing the load between them. The control signal is used as the input of the PWM to control the inverter. A factor of the load's current is used as the reference signal for each DG.    20 5 In this case, the performance of the sliding mode controller with rotating reference signal is investigated under resistive load. The parameters of the load are described in table 2. At t=0.2s, the second load is connected to the system. The reference current signal is measured from the load. It should be noted that 50 percent of load current is produced by DG 2 while the remaining 50 percent is generated by DG 3 . Fig.7 illustrates the simulation results. Fig.7(a) and Fig.7(e) illustrate the micro-grid voltage and the zero steady state values of voltage, respectively. It can be simply inferred that the proposed algorithm is successfully able to track the reference signal with low error that implies robustness of the control framework against resistive load variations. The load current used as the reference current signal is depicted in Fig.7(b). Fig. 7(c) and 7(d) also show the reference signal and output current of DG2 and DG3, respectively. Fig. 7(c) and Fig. 7(d) also demonstrate the robustness of the proposed current controller against resistive load. It can simply be observed that, in the proposed algorithm, the rotating signal depends on the error between main reference signal and the output voltage signal. If the error between main reference signal and output voltage signal is increased, the proposed algorithm in turn increases the rotating reference signal to reduce the error.

Case B: Performance under Inductive Load
In this case, the performance of the sliding mode controller using rotating reference is investigated under inductive load. Parameters of the inductive load are described in table 3. At t=0.2 s, an inductive load is connected to the system. 50 percent of load current is generated by DG 2 and the remaining 50 percent is generated by DG 3 . Fig.8 illustrates the simulation results.  Fig.8 (a) shows the proposed MG voltage while Fig.8(e) illustrated the zero steady state of voltage which demonstrates that the proposed algorithm is able to track the reference signal with a low error. Robustness against connection of inductive load is shown as well. It should be noted that the phase angle difference observed between the voltage and the current does not have any negative effect on the voltage-frequency controller. Load current used as the reference current signal is also shown in Fig.8(b). Fig.8(c) and 8(d) also illustrate the reference signal and output current of DG 2 and DG 3 , respectively. As observed from Fig.8(c) and 8(d), at t=0.2 s, an inductive load is connected to the system; robustness of the proposed current controller against inductive load connection and phase angle variation between current and voltage signal are demonstrated. In this case, performance of the sliding mode controller with rotating reference is explored under nonlinear load. Parameters of the nonlinear load are tabulated in Table.4. At t=0.2 s, an nonlinear load is connected to the system. It should be addressed that 60 percent of load current is generated by DG 2 while the remaining 40 percent is generated by DG 3 . Fig. 9 illustrates the simulation results.   Fig.9(e) shows the zero steady state error of voltage of phase c. Fig.9(a) and 9(e) demonstrate that the proposed algorithm is able to track the reference signal with a low error. Robustness of the algorithm against nonlinear load variation and other parallel DG units is also demonstrated. At t=0.2 s, a nonlinear load is connected to the system which causes voltage drop. The proposed controller has a fast response and decrease the steady state error of output voltage to zero. Load current used as the reference current signal is shown in Fig.9(b). Fig.9(c) and 9(d) show the reference signal and output current of DG 2 and DG 3 , respectively. Robustness of the proposed current controller against nonlinear load is also shown in Fig.9(c) and (d). Fig.9(c) and (d) also show that the controller is able to track the reference current signal. At t=0.2 s, a nonlinear load is connected to the system, the error is increased, so the rotating reference signal is changed to decrease the error faster.

Case C: Performance under Nonlinear Load
In part 'a' of Fig.7, 8 and 9, it is shown that the proposed method is able to provide stable voltage for the MG. Moreover, the proposed method is robust against disturbances caused by different load types under different load connection. The zero steady state error between reference signal and MG's voltage in different load connections (such as resistive, inductive and nonlinear load) is shown in part 'e' of Fig.7, 8 and 9, respectively. Part 'e' of the above-mentioned figures demonstrate that the proposed controller is able to provide a desirable performance in tracking the reference voltage signal. Moreover, it can be observed that the controller is able to demonstrate a suitable response to load variations. Finally, the proposed method can successfully regulate the output voltage waveform to the reference voltage waveform.
Part 'b' and 'c' of Fig.7, 8 and 9 demonstrate the reference current and generation current of DG 2 and DG 3 while facing resistive, inductive and nonlinear load connections, respectively. It can be observed that the controller is able to provide a good performance in tracking reference signal, and the load sharing between each DG unit is carried out by defining a gain to share the load current. Moreover, it is shown that loads variations and phase angle variations do not have negative effects on the controller's performance and also the controller has a fast response.
Performance of the proposed sliding mode controller with rotating reference is compared with that of classic sliding mode controller is mentioned in Table 5. For the sake of fair and through comparison, different values for λ (such as 8000 and 15000) are considered. It can be inferred that the proposed algorithm is able to provide improved output peak voltage and total harmonic distortion as well as reduced steady state error.

Conclusions
In this paper, a novel sliding mode controller with adaptive rotating reference is proposed to control an islanded micro-grid. The micro-grid consists of three low voltage distributed generation and different types of load such as resistive, inductive and nonlinear load. It is assumed that the load current is measurable and used as the reference current signal for controlling DGs. It is shown that the proposed controller is able to track reference signal with a low steady state error. Moreover, using the proposed rotating reference signal has shown to be able to improve the steady state results of the controller, such as output voltage peak, RMS and THD. Simulations results also indicate that the proposed controller is robust against different load connections. The proposed controller scheme is simple and can be easily implemented on the FPGA/DSP board for implementing the controller.