Design of an Electronic Load Controller for Micro Hydro Power Plant Using Fuzzy-PI Controller

Abstract This paper presents the design of an ELC to control the frequency of the MHPP for a purely resistive unbalanced 3-phase load. This is necessary since most of the researches done on ELC in MHPPs considered the design using balanced 3-phase load. However, in real world the 3-phase load at each phase varies due to the different consumers connected to each phase. In this work, a fuzzy-PI controller was designed to reduce the steady state error of the frequency variations and also optimize the gains of the conventional PI controller. These gains were then used to generate equivalent Pulse Width Modulation (PWM) signals to control the firing of Insulated Gate Bipolar Transistors (IGBTs) to dump excess power to the damper loads when the consumer loads change to maintain the power at the generator output constant. Simulation results of the MHPP under varying unbalanced loads showed that the designed ELC was efficient in maintaining the frequency of the MHPP at 50 Hz with a tolerance of ±2. The ELC also maintained the output power of the generator by ensuring the balance of power between the consumer and damper loads.


PUBLIC INTEREST STATEMENT
Micro Hydro Power Plants (MHPPs) are widely used in remote areas for power generation due to their economic advantages coupled with their simple and easy construction. However, like any other power system, MHPP mostly suffers frequency and voltage instability due to varying consumer loads. Again, as a cost-effective solution to control the instabilities, there have been the introduction of Electronic Load Controllers (ELCs) and Automatic Voltage Controllers (AVCs) to control frequency and voltage, respectively. This paper describes the former. It explains how ELC is used to control frequency by maintaining the output of generator constant regardless of varying consumer loads. It mainly addressed the challenge of application of ELC to 3-phase varying resistive loads. This paper designed an ELC using MATLAB/Simulink software and simulated the generator on a 3-phase varying resistive loads. The results showed that the ELC was able to control the frequency under varying conditions of the 3-phase resistive loads.

Introduction
Electrical power generation has been a great contributor towards the economic growth of a nation. Concerns over high cost and rapid depletion of fossil fuel have led to the developments of other alternative sources to power generation. Among such new developments are the solar and hydro energy. Solar energy lags behind hydropower due to its dependency on weather conditions. Within hydro energy, cost-effective developments have been made to provide power to rural communities that are not connected to the national grid due to farther locations of those communities. One of such development is the Micro Hydro Power Plant systems (MHPPs). MHPP is a kind of a hydropower system that produces power in the range of 5 kW-100 kW from runoffs of rivers (Anaza et al., 2017, 5-12). In operation, the potential energy of the falling water is converted to mechanical energy by the turbines that in turn convert from mechanical energy to electrical energy using the synchronous generators. Considering no losses in the system, the total available power through the turbine can be defined in terms of the product of water head and flow as shown in equation where, P = output power or potential from flowing water (W); Q = flow rate in the pipe (m 3 /s); H = water head (m); g = gravitational constant (9.81 m/s); ρ= density of water (1000 kg/m 3 ), η = efficiency of the turbine.
Since MHPPs are small-sized type of hydro-power plant system, they do not require the construction of expensive dams and so this cuts down the overall cost. Moreover, due to its small size, it is easily deployed and require less maintenance unlike the large hydro-power plants and are generally used to power homes and small industries isolated from the national grid. However, just like any other power system, the MHPP has a major drawback in terms of power quality. Synchronous generators that are used, have poor frequency regulation as a result of the varying load conditions by the consumers. When the consumer loads decreases, the frequency increases, which causes the rotor of the generator to rotate at a high speed (Ofosu et al., 2019, 13-20). This speed can result in damage of the rotor or any other component connected to the generator. Contrastingly, an increase in consumer load can cause the frequency to decrease, which can also cause damage to consumer loads, especially machines that operates under a fixed frequency.
These drawbacks have resulted in the implementation of speed governors, to control the frequency by regulating the flow of water to the turbine based on the load variations. However, this method of control has over the years been seen as expensive and require frequent maintenance. As a result, Electronic Load Controllers (ELCs) which are cost effective have been used to replace the speed governors. An ELC is an electronic device used to control the output power and hence the frequency of a MHPP system by maintaining a near constant load on the generator. It therefore acts as an electronic governor to regulate the frequency of a generator. The ELC works based on the principle explained mathematically by equation (2).
where; P G = power generated (W); P C = power dissipated through damper load (W), P D = power consumed by consumers (W).
It is observed from equation (2) that, the power generated is equal to the summation of dissipated power by damper loads and power used by consumers. Additionally, Figure 1 (Nan & Aung, 2015, 6-12) shows that as P C increases, P D also decreases to maintain the generated power at a constant value.
Several research works have been reported in the literature regarding the development of ELC to control the frequency of MHPP. Notable amongst them are using phase angle control, binary load configuration, PWM control and mark-to-space ratio control method. Erika et al. (2013) designed an ELC consisting of six series-arranged ballast loads to divert excess power to maintain frequency and power output of a single-phase permanent magnet generator. Ponnam et al. (2014) designed an ELC for frequency control of self-excited induction generator using fuzzy and PI controllers. In their work, an independent PWM signal without a controller was used to control switches to 3-phase balanced ballast loads. Raj and Kumar (2014) investigated the robustness of selfexcited induction generators under 3-phase linear and non-linear loads using phase angle technique with Fuzzy-PID strategy to control frequency. Yadav et al. (2015) implemented an ELC to control the frequency of synchronous generator using a closed loop PWM generator. However, their work did not consider the use of a controller to check steady state error of frequencies. Clark et al. (2016) conducted phase angle, PWM, mark-to-space ratio and binary control methods for controlling frequency of a single-phase synchronous generator. Ofosu et al. (2016) implemented a BFA optimized fuzzy ELC to control frequency of an MHPP with 3-phase balanced loads.
By comparing a PWM wave with the output of PI controller, Sanampudi and Kanakasabapathy (2020), controlled the switching of chopper to dump surplus power through ballast loads. This was used in controlling frequency and voltage of 3-phase synchronous generator connected to balanced loads. Karmakar (2020) designed an ANN-built ELC using the Scaled Conjugate Gradient (SCG) and Bayesian Regularization (BR) algorithms. The performance of these methods was studied and compared with conventional PI controller during the frequency control of Self-Excited Induction Generator (SEIG) feeding single-phase loads. Chaurasia et al. (2020) developed an ELC to control the performance of SEIG on varying load conditions. Different parameters such as voltage, current and power characteristics were represented for different balanced load conditions. Chandran et al. (2021) studied the voltage and frequency performances of a single-phase permanent magnet synchronous generator using improved third-order generalized integrator. A voltage source converter was used to control reactive power compensation, whiles the duty ratio from the frequency controller was used to control IGBT switches connected in series with diode bridge rectifier circuit to dump excess power to auxiliary load. Praptodiyono et al. (2021) implemented an ELC prototype for a single-phase Pico hydropower system. In this work, for every change in frequency, a programmed microcontroller increases or decreases firing delay of TRIAC so that output power to dummy loads is controlled.
The common subject of matter amongst these literatures is the application of controllers on 3-phase or single-phase balanced loads. However, in real world, the existence of balanced loads is highly unlikely. Hence, these previous works on balanced loads cannot be applied to real-world power systems. Therefore, the novelty of this work is the application of an artificial intelligence technique to design an ELC to control the frequency of unbalanced 3-phase loads to address the applicability of study findings in real-world power systems.

Proposed methodology
In this section, the design concept of frequency control in MHPP is presented. The design concept encompassed the design of synchronous generator for providing AC power to the consumer loads. The design of frequency sensor to sense the frequency of the synchronous generator at any instantaneous time. The sensed frequency was then passed through a designed Fuzzy-PI controller to find an error in frequency in order to reduce the steady state error of the frequency. This reduction of steady state was possible due to the ability of the designed controller to obtain optimal PI gains of the conventional PI controller. The output of the Fuzzy-PI controller was then passed through a designed PWM circuit, which took the optimal gains and converted them into equivalent PWM signal to control the firing angle of the IGBTs. Finally, the ELC itself was designed to divert excess power to the damper loads. This ELC presented comprised an uncontrolled rectifier which rectified the dump power, and the IGBTs which controlled the amount of dump power to the damper loads. Figure 2 shows the design concept of the frequency control in MHPP.

Design of a conventional pi controller
The conventional PI controller was designed using derived values of K p and K i gains. These gains were derived using the Ziegler-Nichols first method of tuning. With this method, when the openloop transfer function of the synchronous generator was plotted, the time delay L and the time constant T were 12.15 ms and 4.05 ms, respectively. Hence, using equation (3) and equation (4; Kushwah & Patra, 2014, 2924-2929, the values of the gains were calculated as 0.3 for K p and 40.5 for K i .
These gains were used to design the conventional PI controller in Simulink using a unit step input as reference. As shown in Figure 3, the Simulink model of the conventional PI controller included the transfer function of the synchronous generator. The values of inertia constant H and the damping factor k d were 0.05 and 1.3, respectively. These values were arbitrarily chosen to suit the simulation.

Design of fuzzy-pi controller
The block diagram of the designed Fuzzy-PI controller is shown in Figure 4. The Fuzzy-PI controller measures the output frequency of the generator and compares it with the reference frequency.
The results of the subtractive comparison are called error (e) and a derivative of the error (ė) is called the rate of change in error. These two parameters were used as antecedents in the fuzzy rule-based system to tune the gains to produce optimal gains, which are termed as ΔK p and ΔK i .
Using fuzzy to obtain the optimal gains is necessary because the fixed gains of the conventional PI controller are not often properly tuned for non-linear systems (MHPP) which results in unpredictable parameter variations (Pandey, 2010).

Fuzzification
For simplicity sake, seven triangular membership functions were used in this work. Each of these membership functions was mapped to a unique linguistic value. The two fuzzy inputs named error (e) and rate of change in error (ė) and the two outputs, ΔK p and ΔK i were each fuzzified using The ranges of input variables e and ė were −2 to 2 and −2 to 2, respectively. The ranges of output variable ΔK p and ΔK i of the controller were 0 to 10 and 0 to 5, respectively. The range of the input error (e) represents the acceptable range of frequency in Ghana. The ranges of the rate of change in error (ė) and the output variables ΔK p and ΔK i were generated using try and error process. Figure 5 and Figure 6 show the membership functions for the two inputs whiles Figure 7 and Figure 8 shows the membership functions for two outputs, respectively.

Formulation of fuzzy rule base
In this work, the fuzzy inference system was made using the Mamdani type inference system because it is more intuitive, easier to understand and has widespread acceptance. The rules were made to have the IF-THEN rules format. The optimization due to the formulation of the rules were because of the operation of the PI controller. The K p constant of the PI controller offers an effective control action when the error is high. The K i constant also offers an effective control action when the system is operating near the set point. Consequently, it is expected that, when the error is large, the K p must be increased and vice versa. The same way, the K i value is expected to be minimum when the system operates away from the set point and vice versa.
With the input variables having seven memberships functions, the total number of rules for the output variables are 49 rules. The rules are in the if-then format as illustrated below.
• If error is NB and rate of change in error is NB, then ∆K p is PB and ∆K i is NB • If error is Z and rate of change in error is Z, then ∆K p is Z and ∆K i is Z • If error is PM and rate of change in error is PM, then ∆K p is NM and ∆K i is PB With this analogy, the control rules for ΔK p and ΔK i were formulated as shown in Table 1 and  Table 2 respectively.     The adaptive updating approach to modelling a fuzzy-pi controller was employed to determine the new K p and K i values. These new values were calculated as (Ofosu et al., 2016;Wang-Xiao et al., 2008), where, K pðinitialÞ = initial proportional gain and K iðinitialÞ = initial integral gain

PWM firing circuit
In this work, a firing circuit was used to fire the IGBTs. Figure 9 shows how the firing circuit was used to produce PWM signals for firing the IGBTs. It can be observed form the circuit that, the output of the Fuzzy-PI controller, which was sinusoidal, was converted to PWM signals by comparing that signal to a sawtooth signal. The sawtooth signal acted as the carrier wave, which was made to have a higher frequency than the reference wave to make the comparison viable, hence, the frequency of the sawtooth signal generator was set to 1000 Hz and the amplitude was set to 1.

Design of ELC using PWM control
For the PWM method of control, due to the different loads in each phase, the power dumped through each damper load should be different. That is each phase was connected to a separate ELC as shown in Figure 10. Due to that, mathematical computations were done for each phase to determine the power to dump in each phase. Since each phase is controlled by a damper load, a single-phase ELC formula was used. The following steps were used to design the ELC: (1) Without any ELC connected the 3-phase unbalanced resistive load was connected to determine the maximum output voltage and current that could give a constant frequency of 50 Hz.
(2) The product of this voltage and current of a particular phase was assumed to be the maximum output power of that phase. Hence, each phase had a certain main load.
(3) The main load together with their recorded voltage and current of a particular phase were used to calculate for the parameters of the capacitor, diode and IGBT used in that phase. Also, the main load in each phase was used to determine the resistance of damper loads for that phase. The voltage and current values for each were phase A = 372 V, 9.8 A; phase B = 660.1 V, 20.7 A; and phase C = 717.7 V, 40 A. With these values, the main load for each phase was calculated by multiplying the voltage and current in each phase. For phase A, the main load was 3645.6 W, phase B was 13,662 W and phase C was 28,708 W. Since each phase was controlled, the design of the ELC was considered singly for each phase, hence in each phase the same formulas were used to calculate important parameters such as the snubber resistance, snubber capacitance, DC link voltage, resistance of damper loads and maximum current due to overvoltage and harmonics. Hence, for a single-phase ELC, the DC link voltage (Singh et al., 2006, 293-295) is: Hence for Phase A: A single-phase uncontrolled rectifier including a diode, snubber resistance, and a capacitor were used to rectify the AC signal from the generator into a DC signal. The snubber resistance withholds any overshoot in current or voltage during operation. Hence, assuming a 10% overvoltage of V LL , then, the new V LL will be 409.64 V. This over-voltage was used to calculate the maximum current and hence the snubber resistance. The maximum current was calculated as: where P rated = main load for phase A (3645.6 W), V max = overvoltage (409.64 V), I r = maximum current due to overvoltage. (Singh et al., 2006, 293-295) included a distortion factor in PWM control to reduce the effect of harmonics in the MHPP system. Hence, taking a distortion factor of 0.9, the new maximum current I max caused by harmonics will be: Snubber resistance (SR) as defined as: For these computations, the resistance of each damper load was considered. For phase A, the resistance of the damper load was: For an uncontrolled rectifier a capacitor is used to smoothen the ripple effect of the rectified signal such that it approaches the waveform of a DC signal. The capacitance for each is also calculated considering a 5% ripple as (Singh,Murthy,and Sushma,(293)(294)(295); where, f = frequency (50 Hz), R D = resistance of damper loads (Ω), R f = Ripple factor. For phase A, the capacitance is: Following through, the same mathematical computations were done for phases B and C, respectively, as shown in Table 3.

Simulink model of MHPP system
The combined Simulink model of the MHPP system is shown in Figure 11. It summarises all the various design concepts discussed earlier into one MHPP system. In the diagram, the ELC design for each phase was made into subsystems for simplicity and clarity. The design of the MHPP encompasses the design of the synchronous generator. In this work, a default modelled synchronous generator in Simulink was used as power source to the loads. As a result, certain parameters such as rated power, line-to-line voltage, number of poles and frequency were changed to suit the simulation purpose. With regard to these changes, an unbalanced 90 kVA, 400 V, 4-pole, 50 Hz, 1500 rpm synchronous generator was used. Also, an inertia constant of 0.05, damping factor of 1.3 and generator's mechanical input of 0.7516 pu, respectively, were used.
The unbalanced nature of the generator was observed because of the different voltages and currents in each phase. This unbalanced 3-phase generator was able to show its stator voltage (V d ), rotor speed (w m ) rotor speed deviation (d w ) and the electrical output power (P eo ). These generator parameters were fed to the excitation system to control the field excitation to the generator. The reference voltage (V ref ) of the excitation system had great impact on the frequency of the generator, hence this value was obtained by a try and error process such that a 50 Hz was recorded as the consumer loads were varied. After the try and error process, the value of the field exciter was obtained as 2.1 pu. Also, as seen from Figure 11, the reference mechanical power (P ref ) and the reference speed of the turbine (w ref ) in the Hydraulic Turbine and Governor (HTG) block were maintained at constant values of 1 pu to mimic the absence of the speed governor.

Results and discussion
In this work, a fuzzy-PI controller was designed and simulated. The ΔK p and ΔK i values were 7.766 and 0.83, respectively. The initial K p and K i values used for the design of the conventional PI controller were 0.3 and 40.5, respectively. Using the adaptive updating gain equation (5) and (6), the new values for K p and K i form the fuzzy-PI controller were calculated as shown in Table 4.
The performance of the synchronous generator using a unit step under conventional PI controller and the Fuzzy-PI controller is shown in Figure 12.
From Table 4 and in Figure 12, it can be observed that the Fuzzy-PI controller gave a good control response in terms of settling time, rise time and overshoot as compared to the conventional PI controller. Hence, from Table 4, the percentage improvement of the Fuzzy-PI controller in terms of settling time was 16%. Also, there was a 100% improvement in terms of overshoot with the Fuzzy-PI controller. Lastly, there was a 40% reduction in rise time as compared to the  conventional PI controller. Obviously, these results show that using an AI technique like fuzzy logic to optimally tune the gains of a conventional PI controller can greatly improve the performance of the controller in frequency control of MHPP. That is, the problem of high overshoot and long rise and settling time associated with the conventional controllers are reduced thereby resulting in stable frequency control.

Generator's load variation without ELC
Considering a 90 kVA, 400 V, 4-pole, 1500 rpm, Table 5 shows the behaviour of frequency of the synchronous generator under varying consumer load when no ELC was connected to the MHPP. To mimic the unbalanced varying consumer loads, different values were taken for each phase. These values were used in decreasing order to observe the behaviour of the frequency of the generator. The graphical representation of Table 5 is shown in Figure 13 It can be observed that as the loads in each phase were decreased, the frequency of the synchronous generator increased and this was due to the reduced load on the synchronous generator. It can be observed from the last values in Table 5 that, the lowest consumer loads gave a dangerously high frequency of 58.21 Hz. This frequency can cause damage to both the consumer loads, the rotor of the generator and the components connected to the generator. In Figure 13, the power in each phase was added to represent a single 3-phase power for easy plotting against the frequency. It can be observed from Figure 13 and Table 5 that they show the same behaviour of frequency.

Generator's load variation with ELC
The variations of consumer loads, damper loads, main load, frequency and power across the capacitor in each phase are shown in Table 6. In the table, P C represents consumer loads; P D represents dump power; P ML is the main load whiles P S represents the power across the capacitor. It is observed from Figure 14 that, as the load is decreased to lower values, the damper loads, together with the power across the capacitors also showed a corresponding increase in power.
Again, from the table, the main load or output power of each of the phases was maintained within permissible limits. The main load in phase A was maintained between 3622.4 W and 3645 W. In phase B, the main load was between 13,406 W and 13,918 W. However, phase C's main load increased significantly between 25,443 W and 30,846 W. Another observation from Table 6 is that, power dumped is not only across the resistive damper loads but across the capacitors too, which contributed greatly to maintain a constant frequency. The relation between these four parameters is shown by equation (13) P ML ¼P C þP D þP S (13) Figure 13. Frequency variations of generator without ELC. The graphical representation of frequency variation with consumer and damper loads are shown in Figure 14, Figure 15 and Figure 16. Figure 14 shows the relation between the consumer loads and the damper loads in phase C when that phase was loaded with 28,400 W. It can be observed that as the consumer load decreased or increased, the damper load increased or decreased respectively to maintain the main load in that phase. This same effect was observed with many other consumer loads in phase A and phase B. Figure 15 and Figure 16 also show the graphical representations of the frequency behaviour without and with the ELC, respectively. These results were obtained from phase C when a consumer load of 30,000 W was connected in the case of no ELC and 28,400 W was connected in the   case of an ELC. It can be observed from Figure 15 that, frequency increased sharply from 50 Hz to 55.2 Hz. However, when the ELC was connected and the load was further reduced to 28,400 W, the frequency rather maintained at a value of 49.3 Hz as shown in Figure 16. All these results shown from, Figure 14 to Figure 16 indicate that the ELC was effective in dumping excess power to the damper loads to maintain a constant frequency and output power. Also, the minimum frequency obtained was 49.3 Hz and a maximum frequency of 51.92 Hz, which fell within the range of ±2 as, depicted in the fuzzy inference system and the frequency tolerance of Ghana.

Conclusion
In this work, the design of ELC to maintain the frequency of MHPP using purely resistive unbalanced 3-phase loads has been achieved. The ELC was able to dump excess power to the damper loads when the consumer loads were varied, thereby maintaining the frequency of the synchronous generator between 49.3 Hz and 51.92 Hz. Also, the Fuzzy-PI controller made it possible to design the ELC to maintain the frequency within a tolerance of ± 2. The Fuzzy-PI controller also showed good stability performance of the generator as compared to the conventional PI controller, hence its ability to stabilise the frequency of the generator within that specified range or tolerance.