An Automatic Frequency Controller for Kotmale Hydro Power Station using Fuzzy Logic

During supply demand mismatches, the system frequency can either fall or rise compared with its previous steady state operating value. In such instances, the generator governors either increase or decrease the generation (in accordance with the governor droop setting) to restore the supply demand balance and stop the ensuing frequency change (fall or rise). However, even after the supply demand balance has been restored and the frequency has reached a new steady state value, there can be a frequency error. The governor action assists to minimize the steady state frequency error. However, zeroing the frequency error and bringing the system frequency back to the rated value need adjustment to the “speed reference” of governors. Although this is normally done by Automatic Generation Controllers (AGC) that are on secondary load-frequency control, in Sri Lanka, the frequency controlling act is performed entirely manually through operator intervention. Such manual frequency control has a number of draw backs, including possible operator errors and longer response times. One of the four power stations designated to perform the frequency control function in the Sri Lankan power system is at Kotmale. This paper presents an automatic frequency controller using Fuzzy Logic to carry out frequency controlling at Kotmale power station. The Fuzzy Logic based controller is designed to replace the action of the operator, who presently controls the frequency manually. The paper presents the modeling and the simulation of the existing frequency control system using relevant parameters of the Kotmale governor and the chronological load curve of the Sri Lankan power system. MATLAB/SimulinkTM 2013 software package is used to calculate the steady state frequency error. Subsequently, the parameters are fine-tuned and the Fuzzy Logic Controller (FLC) is introduced as a secondary loop frequency controller and the study is repeated. Mamdani type fuzzy inference system is employed here to implement this project because of its simplicity, robustness, reliability and intuitive characteristics. Finally the simulation results using the FLC are compared with the existing frequency controlling system of Kotmale power station to prove that the FLC yields improved control performance.


Introduction 1.1 Background
A key objective of a utility is to provide the desired quality of power supply to its customers within a given voltage and frequency tolerance.For optimal performance of equipment and for stable operations, the system frequency must be maintained within certain limits.The nominal frequency in the Sri Lankan power system is 50Hz.The specified frequency tolerance is within the range of ± 1% of its nominal value.The active power (p) control of a power system in response to power system frequency (f) change is known as the load-frequency (pf) control.The pf control in a power system deals with slow changes to demand as well as sudden disturbances that appear under normal operating conditions owing to the stochastic nature of outages of lines and equipment on the supply-side and connection/disconnection of loads on the customer-side.Generator governors which are on primary automatic load frequency control assist to restore supply demand balance during such disturbances and minimize the ensuing steady state frequency error.However, secondary load frequency control, also known as frequency controlling, is required to bring the frequency back to its nominal value.In Sri Lanka, the latter operation is done manually.ENGINEER There are four major frequency control generating stations identified by the System Control Centre (SCC) of Ceylon Electricity Board (CEB) situated at Kotmale, Victoria, Laxapana and Samanalawewa which perform manual secondary frequency control.The SCC decides and selects one of these four generating stations to control the system frequency at a given time.The decision of the SCC is dependent on many aspects such as the available water storage capacity, downstream irrigation requirements and transmission line constraints.While the system is on steady state, when a sudden load is added to the power system, stored kinetic energy of turbinegenerators initially contributes in real time to help avoid the sudden imbalance between generation and demand.As a result, turbinegenerator speeds drop.Following the change in turbine speeds, and hence the frequency, governors intervene and adjust the turbine power in accordance with the pre-determined set value, based on governor droop characteristics.
However, even after governors restore supplydemand balance by adjusting the generated power to match the change in demand, the final steady state frequency could still have a steady state error.To zero the frequency error and bring the supply frequency and turbine speeds to rated values, a secondary control system is required.In Sri Lanka, the correction of the steady state frequency is manually done by operators.The operator adjusts generation using "lower" and "raise" commands, by looking at the system frequency display, until the frequency error is brought down to zero.Complete reliance on the skill of a single individual (as the case is during most of the time) to maintain an important parameter like system frequency is dangerous.Further, when the time taken to correct the frequency error is large, it can affect the operation of certain industrial machineries that are sensitive to frequency.
Therefore, in this study an automatic frequency control strategy is proposed to control frequency error by using fuzzy logic technology.This will not only eliminate "operator judgment" and human error, but also improve response time as shown later.

Existing Frequency Controlling Method at the Kotmale Hydro Power Plant
In Sri Lanka, one of the four frequency controlling stations controls the system frequency at a time, while other stations are operated on a fixed output as determined by the SCC.The "master" frequency controlling station selected for this study is the 67MW unit of Kotmale.Speed droop characteristics of Kotmale hydro power plant are shown in Figure 1.When on frequency control, the power plant generally operates closer to the midpoint of its unit capacity range of 0 to 67MW.When the ENGINEER demand increases or decreases and when the frequency decreases or increases as a result, the operating point is moved first along the normal droop characteristic curve (marked 1) and settles down at a point above or below the set point corresponding to 50Hz.When the steady state operating point moves along the droop characteristic curve (without a change in the speed reference), the wicket gate position is adjusted by the governor controller via hydraulic actuators which adjust the active power delivered by the generator.The wicket gate adjustment is done by an electromechanical governor driven by a PID controller sensing frequency deviation (∆f).
After Kotmale and all other generators connected to the system have changed their outputs to match the change in the demand, the frequency would settle down at a new steady state value along curve "1", which is different to 50Hz.
At that point, operators at the station on frequency control which is Kotmale in this case, adjust the "speed reference", or shift the droop characteristic curve in Figure 1 to another parallel line (either 2 or 3) , until the frequency is brought back to 50Hz.Once the frequency is brought back to 50Hz by Kotmale operator, all other stations that were on fixed load, would once again adjust their outputs to the points in the droop characteristic curve corresponding to the fixed outputs as requested by the SCC prior to the disturbance.
At Kotmale, the frequency controlling is performed by looking at the frequency error ∆f∆ and manually applying appropriate lower or raise commands to the control gear.

Figure 2 -Control Block Diagram of the Primary Load Frequency Controller
The block diagram of a typical primary load frequency controller is shown in Figure 2 where ΔPC is the change to speed reference, ΔPD is the change to system demand and Δf is the frequency error.

3.
Modeling of the existing Frequency Controlling System Computation of Kp and Tp for Sri Lankan Power System KP or power system gain has units of Hz/pu MW, where pu MW is calculated taking the total rated system capacity as the base.As the total system demand varies, the total capacity of machines connected to serve the demand, which is higher than the total demand to meet spinning reserve requirement, also will vary.The chronological load curve of the Sri Lankan power system for a typical day is shown in Figure 3. Here, approximately 5% of the reserve margin can be observed between the load and the total capacity of the connected generators.

Figure 3 -Chronological Load Curve of Sri Lankan Power System
Owing to changes in the total rated capacity of machines connected to the system with time (and hence the MW base used to calculate KP) and changes in the composition of loads, inertia constant of power system (H)and the rate of change of load with respect to frequency (D) , and , too vary with time.Thus, in this study, D is kept at its typical value of 1pu (meaning a 1% change in demand due to 1% frequency change) and H is assumed as 5 seconds.

𝐷𝐷 𝑝𝑝𝑢𝑢 𝑀𝑀𝑊𝑊 𝑝𝑝𝑢𝑢 𝐻𝐻𝑧𝑧 𝑝𝑝𝑢𝑢 𝑀𝑀𝑊𝑊 𝐻𝐻𝑧𝑧 𝐾𝐾 𝑃𝑃 𝐻𝐻𝑧𝑧 𝑝𝑝𝑢𝑢 𝑀𝑀𝑊𝑊 𝑇𝑇 𝑝𝑝 𝑆𝑆
However, once the system is modeled and fuzzy logic controller is designed, the response of same will be tested for different D values ranging from 1pu to 5 pu and H from 5s to 8s.

Frequency Deviation with Load
The behavior of the system frequency is simulated using MATLAB/SIMULINK software package with different step load changes at Kotmale hydro power station.

Frequency Deviation with Step Load Change
The maximum allowable frequency deviation of Sri Lankan power system is 1%, i.e. 49.5Hz-50.5Hz.However, if the frequency error is allowed to remain even within this range, that could affect the quality of the output of some devices such as frequency dependent motor drives, microprocessor based equipment and even electric clocks.Thus, it is the primary responsibility of the utility to maintain its value close to the nominal value of 50Hz as much as possible.
The frequency response of the system for 0.01 pu step increase in the load, is shown in Figure 5.

Figure 5 -Simulation of 0.01 pu Step Load Increase
Here a steady state error of -0.02Hz can be observed when the load is increased by 0.01 pu.Hence, a secondary loop controller is needed to maintain a steady state error-free frequency for better quality and a more reliable power system.
It has been found from recent studies that using artificial intelligence, more advanced controllers than conventional controllers can be designed.Hence, a fuzzy logic controller is ENGINEER 13 5 ENGINEER used to control the secondary loop in this study.

5.1
What is fuzzy control?Fuzzy logic is a problem solving technique found in the field of control system engineering.This technique has been widely used to control dynamic systems, especially when the inputs are either imprecise or when the mathematical models are not available.The fuzzy logic control design can be divided into three main areas, namely, identification of inputs, determination of rules and defuzzfication of output in to real values.[6].

A Typical Fuzzy Control System
There are two types of fuzzy systems, viz., Mamdani and Takagi Sugeno.Mamdani System: Mamdani system expects the output membership functions to be fuzzy sets.After an aggregation process, a fuzzy set for each output variable that needs defuzzification can be computed.Takagi Sugeno System: Takagi Sugeno system is similar to the Mamdani method in many respects.The first two parts of the fuzzy inference process, fuzzifing the inputs and applying the operators are exactly the same.The main difference between Mandani and Sugeno is that the Sugeno output membership functions are either linear or constant.In this study, Mamdani type fuzzy inference system is employed because of its simplicity and intuitive characteristics, and also because it has been commonly used for computational problems with two inputs and one output.

5.3
Operation Process of Mamdani FLC In contrast to conventional control techniques, Fuzzy Logic Control (FLC) is best utilized in complex and not so clearly described processes that can be controlled by a skilled human operator without much knowledge of system dynamics.The basic idea behind FLC is to incorporate the expert experience of a human operator in the design of the controller that controls a process whose input and output relationship is described by a collection of fuzzy control rules involving linguistic variables rather than a complicated dynamic model.[5]  The utilization of linguistic variables, fuzzy control rules and approximate reasoning provides a means to incorporate human expert experience in designing the controller.
A typical architecture of a Mamdani FLC is shown in Figure 6, which comprises three principal elements viz., the fuzzifier, fuzzy rule base and the defuzzifier.Defuzzifier: Converts the fuzzy output of the inference engine to a crisp value.

Design of the Proposed Fuzzy Logic Controller
6.1 Input Variables For load frequency changes, the process operator is assumed to respond to variables such as frequency error (∆f) and the rate of change of frequency error (

𝑑𝑑 ∆ 𝑑𝑑𝑡𝑡
).They are the inputs to the FLC.A triangular-shaped membership function was used owing to its simple implementation and fast computation behavior.In this study, the following five triangular membership functions have been identified and applied : NB -Negative big NM -Negative medium PM -Positive medium PB -Positive big ZE -Zero

Membership Function of Frequency Error (∆f)
The limits of the power system frequency error (∆f) were decided based on the variation of the system frequency of the existing power system.This is shown in Figure 7.The universe of discourse is taken from -0.2 to 0.2. ) Here, a derivative has to be used to predict the error in future, based on the current slope of the error.The limits of membership values are used to reflect the frequency error ∆ exactly.The universe of discourse here too is selected from -0.2 to 0.2 as shown in Figure 8.Output Variable The output variable identified here is the reference power (∆Pc).

6.2.1
Membership Function of the Reference Power (∆Pc).Since the unit capacity of Kotmale power plant is 67 MW, the plant is initially loaded and retained at 27 MW for the absorption of system load variations.Universe of discourse selected here is from -0.1 to 0.1 as shown in Figure 9 below.

6.3
Fuzzy Control Rules Fuzzy control rules can be considered as the knowledge of an expert in any related field of application.The fuzzy rule is represented by a sequence of IF-THEN, leading to algorithms describing what action or output should be taken in terms of the currently observed information, which includes both inputs and feedback if a closed-loop control system is applied.

6.3.1
Fuzzy Inference Rule for the Proposed Controller In this study, input and output membership functions are same and five segment triangular membership functions are used as stated earlier.Since each input has five membership functions, the number of fuzzy based rules is twenty five and they are presented in Table 1.

Results (Simulation of FLC)
A steady state frequency drop of 0.02 Hz was observed earlier when a system disturbance of 0.01 p.u step load is applied to the existing power system and it requires a secondary control loop to eliminate same.The proposed fuzzy logic controller is introduced here as a secondary loop controller to see its performance characteristics.

Simulation Block
Diagram for Frequency Control with the Proposed FLC The proposed fuzzy logic controller could be connected to the existing power system as a secondary control loop to eliminate steady state frequency error.The block diagram of the frequency controller using FLC is shown as Figure A1  Kotmale power plant governor PID control parameters have to be closely examined and fine-tuned.Such fine-tuned parameters for PID governor controller at Kotmale power station is shown in Table 2.

Table 2 -Fine-Tuned Values of PID Controller
The frequency deviation after introducing the secondary loop fuzzy logic controller is shown in Figure 10.It should be noted that the steady state frequency error has been damped out and smoothly eliminated here.Comparison of Frequency Deviation with and without FLC It can be seen from both simulations that the proposed fuzzy logic controller gives better performance with a zero steady state error compared with the existing primary loadfrequency controlling method installed at Kotmale power station.This is shown in Figure 11

Conclusion
It is revealed from this study that the introduction of fuzzy logic to the secondary loop controller not only completely eliminated the steady state frequency error but also improved the dynamic response of the frequency controlling quality on the basis of dynamic parameters such as settling time, overshoots and undershoots and that the same can be effectively used to replace the manual operator-controlled frequency controlling method used at Kotmale power plant.
The proposed frequency controlling method with fuzzy logic can be applied to other power frequency controlling power plants as well which contribute to controlling the steady state frequency error at different times.

Figure 1 -
Figure 1 -Speed-droop characteristics of Kotmale Hydro Power Plant The Transfer Function of the electromechanical governor PID controller installed at Kotmale power plant, represented by the block titled "Governor" in Figure2can be represented by the transfer function (TF)[2]:          gain = 2.9 f = System frequency Kf = Proportional gain = 9.99 R = Speed Regulation = 2.15% (While on frequency control) Ki = Integrator gain = 6.53.1.2Turbine Transfer Function The Transfer Function (TF) of the vertical shaftFrancis turbine installed at Kotmale power plant is: −   *   … …where:Tw = 1 second = Time constant of the hydro turbine3.1.3PowerSystem Transfer Function A power system can be represented by the typical transfer function (TF)[3]:

Figure 4 -
Figure 4 -Simulation Model for the Existing System Figure 6 -Typical Architecture of a Mamdani FLC Fuzzifier: Converts the crisp input to a linguistic variable using membership functions.Fuzzy Rule Base: Using If-Then type fuzzy rules converts the fuzzy input to the fuzzy output.
Figure 7 -Membership Functions of Input Variable for Frequency Error

Figure 8 -
Figure 8 -Membership Functions of the Input Variable for the Rate of Change of Frequency Error6.2Output VariableThe output variable identified here is the reference power (∆Pc).

Figure 9 -
Figure 9 -Membership Functions of the Output Variable (∆Pc) in the Appendix.However, to eliminate over shoots, under shoots and to achieve fast and smooth response,

Figure
Figure 10 -Frequency Response for a Step Load Change after introducing Fuzzy Logic Controller as a Secondary Loop 7.2Comparison of Frequency Deviation with and without FLC It can be seen from both simulations that the proposed fuzzy logic controller gives better performance with a zero steady state error compared with the existing primary loadfrequency controlling method installed at Kotmale power station.This is shown in Figure11for better comparison.The response of the system tested for different D values ranging from 1 to 5 and H values ranging from 5S to 8S is shown in Appendix as Figure B-1 to B-4.
for better comparison.The response of the system tested for different D values ranging from 1 to 5 and H values ranging from 5S to 8S is shown in Appendix as Figure B-1 to B-4.

Figure 11 -
Figure 11 -Comparison of Frequency Deviation with and without FLC

Figure A1 - 5 Figure B4-Response for H=8s and D=1- 5 FigureB1-
Figure A1 -Simulation Block Diagram for Frequency Control with the Proposed Fuzzy Logic Controller