Dynamic Modeling of Steam Condenser and Design of PI Controller Based on Grey Wolf Optimizer

Shell-and-tube condenser is a heat exchanger for cooling steam with high temperature and pressure, which is one of the main kinds of heat exchange equipment in thermal, nuclear, and marine power plant. Based on the lumped parameter modeling method, the dynamic mathematical model of the simplified steam condenser is established. Then, the pressure PI control system of steam condenser based on the Matlab/Simulink simulation platform is designed. In order to obtain better performance, a new metaheuristic intelligent algorithm, grey wolf optimizer (GWO), is used to realize the fine-tuning of PI controller parameters. On the other hand, the Z-N engineering tuning method, genetic algorithm, and particle swarm algorithm are adopted for tuning PI controller parameters and compared with GWO algorithm. Simulation results show that GWO algorithm has better control performance than other four algorithms.


Introduction
The condenser is one of the important kinds of equipment in thermal power plant, nuclear power plants, and marine power plant.The reliability of condenser running directly affects the safety and economic operation of the entire power plant or power system [1].A steam condenser is a piece of machinery that turns steam into water.Many steam-based systems use a circuit of water to maximize their efficiency.Water is heated into steam, the steam provides motivation for a process, a steam condenser turns it back into water, and the cycle begins again [2].The failure of the condenser may cause the boiler or steam turbine unit to overheat, which endangers the safety of the whole generating unit or power plant.The power plant has strict requirements on the reliability and the tightness of the condenser.In addition to safety considerations, the condensation process of steam in the condenser is an important part of the system thermodynamic cycle, which greatly affects the economic performance of the system.Therefore, through the computer simulation experiments, the establishment of the dynamic model and understanding the dynamic characteristics of the condenser have a great significance on improving the safety and economic operation level of the steam condenser [3].A hybrid modeling approach is proposed to describe the dynamic behavior of the two-phase flow condensers used in air-conditioning and refrigeration systems based on fundamental energy and mass balance governing equations and thermodynamic principles.The model validation studies on an experimental system show that the model predicts the system dynamic well [4].A method to improve the load change capacity is proposed for the water cooled power plants through controlling the cooling water flow.Then, the CCWCS (condenser cooling water control system) is put forward to execute this method on the premise of unit safety [5].A robust strategy for online fault detection and optimal control of condenser cooling water systems is proposed.The optimal control strategy is formulated using a model-based approach, in which simplified models and a hybrid quick search (HQS) method are used to optimize the performance of the overall system by changing the settings of the local process controllers [6].In the field of computer simulation, the simulation technology is used to simulate the operation of the condenser system and study its working performance.The optimization of the parameters of PID controller can not only satisfy the static accuracy but also make the system have better stabilization.The accurate mathematical model can accurately and comprehensively represent all working conditions in the real running process of steam condenser system (normal conditions, fault conditions, and transient conditions) and make them reappear.On the same time, it can be used to carry through the research on the dynamical characteristic to meet the requirements of different engineering projects.
At present, people by simulating biotic population and their evolution process in nature have developed a variety of intelligence algorithms: particle swarm optimization (PSO) algorithm, ant colony optimization (ACO) algorithm, artificial bee colony (ABC) algorithm, shuffled frog leaping (SFL) algorithm, cuckoo search (CS) algorithm, Dolphin partner optimization (DPO), and Firefly algorithm (FA).
GA is the most typical algorithm of evolutionary branch.This algorithm simulates Darwinian evolution concepts [7].Each new population is created by the combination and mutation of the individuals in the previous generation.Particle swarm optimization (PSO) was inspired from the social behavior of birds flocking [8].The PSO algorithm employs multiple particles that chase the position of the best particle and their own best positions obtained so far.Artificial bee colony (ABC) algorithm mimics the collective behavior of bees in finding food sources [9].There are three types of bees in ABC: scout, onlooker, and employed bees.The scout bees are responsible for exploring the search space, whereas onlooker and employed bees exploit the promising solutions found by scout bees.Ant colony optimization (ACO) algorithm was inspired by the social behavior of ants in an ant colony.In fact, the social intelligence of ants in finding the shortest path between the nest and a source of food is the main inspiration of ACO [10].Cuckoo search (CS) algorithm was put forward by Yang and Deb in 2009 [11].This algorithm is mainly based on two aspects: the cuckoo's parasitic reproduction mechanism and Levy flights search principle.Assume each cuckoo only lays one egg at a time and randomly chooses bird's nest to hatch the egg.
The grey wolf optimizer (GWO) as a new swarm intelligent algorithm is put forward by Seyedali, Mirjalili, and so forth in 2014, which mainly mimics wolf leadership hierarchy and hunting mechanism in nature.Seyedali and Mirjalili, and so forth, have proved that the search performance of basic wolf algorithm is superior to that of PSO, GSA, DE, and FEP algorithm.Due to the wolves' algorithm with the advantages of being simple in principle, having fast seeking speed and high search precision, and being easy to realize, it is more easily combined with the practical engineering problems.
Many kinds of swarm intelligence are inspired by hunting and search behaviors of a population.However, GWO algorithm simulates internal leadership hierarchy of wolves; thus, in the searching process, the position of best solution can be comprehensively assessed by three solutions.So the  GWO algorithm is able to greatly reduce the probability of producing premature phenomenon and falling into local optimum.
Aiming at the steam condenser pressure control problem, based on the Matlab/Simulink simulation platform and the established mathematical model, a closed-loop condenser pressure control system is designed.The GWO algorithm is adopted to optimize the parameters of the PI controller.Simulation results show the effectiveness of the proposed control strategy.The paper is organized as follows.In Section 2, the technique and dynamic modeling of the shell-and-tube steam condenser are introduced.The GWO algorithm is illustrated in Section 3. The parameter optimization of PI controller based on GWO algorithm is described and the simulation experiments and results analysis are introduced in detail in Section 4. Finally, the conclusion illustrates the last part.

Structure Characteristics and Working Principle of Steam
Condenser.The shell of shell-and-tube type condenser is usually cylindrical or elliptical as shown in Figure 1, which is connected with end closures for constituting the water chambers.Between the end closures and the shells, a perforated tube plate is fixed, in which a lot of cooling water pipes are arranged hierarchically.The entrance pipe of steam is located in the upper part of the condenser shell, which is directly or indirectly connected with the exhaust equipment through the compensator.In the lower part of the shell, there is a gathering tank (or a hot well water tank) of the condensed water.The air outlet port is positioned at the lower part of shell and the air is drawn through this nozzle.
The working principle of the steam condenser is shown in Figure 2.
Steam goes into steam field of the condenser through steam admission pipe.Steam gets in touch with the condenser tube wall to begin the radiate condensation; at the same time, the latent heat is transferred to the cooling water through the surface of the cooling water pipe.Cooling water with inlet temperature is fed into water chamber through the cooling water pipe, where the cooling water is assigned to all pipes of the first procedure in the lower part of the condenser shell.The cooling water flows into another water chamber along the first six cooling water pipes and then enters the next flow pipes and carries through heat exchange with the steam.Through such several procedures in return, the

Cooling Cooling
Condensate water outlet water inlet water outlet cooling water with the outlet temperature is discharged from the outlet pipes.Due to the lack of system sealing property, the air is drawn out from the condenser constantly to ensure the requirements of the system's vacuum degree.The drawn gas contains the air and steam.In the beginning of the condensation, the air volume is very smaller than the total amount of steam.With the steam and air flowing toward the exhaust port, steam is continuously condensed down.Then, the steam quality in the mixture gradually decreases.On the contrary, the relative content of the air increases gradually.
Until the relative content of air fed into the cooling zone air has reached a great numerical extent, the steam condensation process terminates.

Mathematical Model of Shell Side of Condenser
(1) Steam Zone (i) Steam mass equation is as follows: where   is the steam content in the shell side of the condenser (kg/s),  st is the exhaust volume of steam turbine (kg/s),  ost is the other steam inlet of the condenser (kg/s),   is the main steam condensate (kg/s), and  ss is the amount of steam drawn out by vacuum pumping equipment (kg/s). ss and   are calculated by the following equations: where  ao is the quality of the gas mixture pumped by the pumping unit (kg/s),  is the share air ratio in the condenser,   is the average enthalpy of steam (kJ/kg), and  cw is the enthalpy of saturated water corresponding to the condenser pressure (kJ/kg).
(ii) Vapor pressure equation is as follows: where   is the internal steam pressure of condenser (Pa),   is the steam gas constant (0.4615 kJ/(kgK)),  is the space volume of gas in the condenser (m 3 ), and   is the temperature of saturated gas ( ∘ C).
(iii) Average enthalpy of steam in the condenser is as follows: where   is the average enthalpy of steam (kJ/kg),  st is the enthalpy of steam turbine exhaust (kJ/kg), and  ost is the other inlet enthalpy (kJ/kg).
(2) Air Zone (i) Air mass equation is as follows: where  vb is the air quantity of the condenser from the vacuum break valve (kg/s),   is the air volume of the normal drain condenser (kg/s),   is the air amount from the seal leakage of the condenser (kg/s), and   is the air quantity from air extractor (kg/s).
(ii) Air pressure equation is as follows: where   is the air pressure in the condenser (Pa) and   is the gas constant of the air (0.287 kJ/(kgK)).
(iii) Absolute pressure of the condenser is as follows: where   is the absolute pressure in the condenser (Pa).
(3) Hot Water Area (i) Hot well water level equation is as follows: where   is the hot well water level (m),   is the hot well water quality (kg/s),  is the hot well water density (kg/m 3 ), and   is the hot well cross-sectional area (m 2 ).
(ii) Hot water quality equation is as follows: where type  gp is the bubbling oxygen exhaust volume (kg/s) and  wo is the condenser water outlet quantity (kg/s).
(iii) Enthalpy equation of hot well water is as follows: where  gp is the bubbling oxygen exhaust steam enthalpy (kJ/kg),   is the enthalpy of hot well water (kJ/kg), and  cw is the enthalpy of saturated water corresponding to the condenser pressure (kJ/kg).

Mathematical Model of Condenser Tube
Side.The dynamic heat balance equation of the circulating water is described as follows: where   is the circulating water quality (kg),   is the circulating water heat capacity (kJ/(kg * C)),  is the steam outlet heat (kJ),   is the circulating water heat absorption quantity (kJ),  is the condenser heat transfer coefficient (W/(m 2 * ∘ C)), Δ  is the logarithmic mean temperature difference ( ∘ C),  is the condenser heat transfer area (m 2 ),  cw is the circulating water flow (kg/s),  cw is the circulating water inlet temperature ( ∘ C), and  is the circulating water outlet temperature ( ∘ C).
The logarithmic heat transfer temperature difference is calculated by The overcooling of condenser is calculated by where   is the saturated water temperature of the vapor pressure in the condenser ( ∘ C) and   is the condenser hot well water temperature ( ∘ C).
The heat transfer error of the condenser is calculated by where   is the saturated gas temperature corresponding to saturation pressure in condenser ( ∘ C).

Grey Wolf Optimizer
The grey wolf optimizer is a new metaheuristic intelligent algorithm proposed by Mirjalili et al. in 2014 [12], which is successfully applied in many fields, such as security smart grid power system management [13], parameter estimation [14], reactive power dispatch problem [15], flow shop scheduling problem [16], combined heat and power dispatch [17], and automatic control [18].For immigrating the wolves' internal leadership hierarchy, the wolves are divided into four types: alpha (), beta (), delta (), and omega (Ω).According to the principle of the wolves hunting, the hunt process is divided into three stages: searching prey, surrounding prey, and attacking prey.In the four groups of wolves, , , and  are seen as the three best wolves; they guide the other wolf (Ω) trending in the search space in the best region.In the iterative searching process, , , , and Ω wolves are used to realize the assessment of prey possible positions in the optimization process.The positions of wolves are updated in accordance with the following equations: where  is the current iteration number, ⃗  and ⃗  are the coefficient vector,   →   is the position vector of the prey, and ⃗  is the position of the wolf.The vectors ⃗  and ⃗  are expressed as follows: where the coefficient ⃗  linearly increases from 2 to 0 with the increase of the iteration number and  →  1 and  →  2 are the random vector located in the scope [0, 1].
The principle and concept of the position update (15) are described in Figure 3 [7].
It can be seen from Figure 3 that the wolf in the position (, ) can be arranged a new location on the basis of the above formula.While Figure 3 shows only the 7 possible positions of the wolf, the randomly adjusting parameters ⃗  and ⃗  can make the wolf move to anywhere in a continuous space.In GWO algorithm, the positions of wolves , , and  are likely the prey (optimal) position.In the searching process, the previous three best solutions are assumed to be , , and , and then the others are regarded as the Ω wolves.The positions of , , and  are used to update their positions.
The following mathematical formulae are used to adjust the position of Ω wolf again, and the position update schematic graph is shown in Figures 4 and 5:  17) are used to calculate the approximate distance between the current position and , , and , respectively.After defining the distance between them, the final position of the current solution is calculated by the following: where  →  1 ,  →  2 , and  →  3 are random vectors and  represents the number of iterations.
Seen from the above equations, ( 17) define the step size of the wolf Ω tending to the wolves , , and .Equations ( 19)-( 21) define the final position of Ω wolf.It can be seen from Figure 4 that the random and adaptive vectors ⃗  and ⃗  can be used to balance the exploration and development capabilities of the GWO algorithm.When | ⃗ | > 1, the wolf has detection ability.On the other hand, when the value of vector ⃗  is greater than 1, it can also promote the enhancement of the detection ability of the wolf.In contrast, when | ⃗ | < 1 and  < 1, the wolf 's information mining capacity is enhanced.In order to enhance the ability of the wolf, with the increase of the iteration number, ⃗  is decreased linearly.However, ⃗  is randomly generated in the whole optimization process, which can make the detection and exploitation ability of the wolf to reach equilibrium at any stage, especially in the final stage of the iteration, and prevent the algorithm from falling into local optimum.
The procedure of the GWO algorithm is described as follows.
Step 2. Calculate the fitness of each wolf, and choose the three wolves with best fitness as wolves , , and .
Step 3. Update positions.Based on ( 17)-( 21), update the positions of the other wolves, that is to say, the positions of the Ω wolves.
Step 5. Judge whether to meet the termination conditions or not.If satisfied, the position of  wolf and the fitness value are the optimal output.If the termination condition is not satisfied, return to Step 2.

Parameter Optimization of PI Controller
Based on GWO Algorithm

Dynamic Model of Steam Condenser
Based on Matlab/Simulink Simulation Software.The establishment of the dynamic mathematical model of the condenser is based on the following assumption that the total amount of condensation, the circulating water flow, and the condenser volume are certain.So it is set up based on the dynamic heat balance and mass balance of the condenser water.
4.1.1.Dynamic Heat Balance.In the dynamic heat balance, it is assumed that the total amount of condensation is certain and that the input steam and the output condensate are saturated.Therefore, the heat from steam to the circulating water and the steam potential heat are equal.So the steam released heat can be approximated, calculated by the following equations: The heat transfer coefficient  and the heat transfer area  can be replaced by the following exponential equation approximately: where  1 and  2 are constants.
When  cw → ∞ ,  2 is determined by .In this case,  is determined by the heat transfer ratio between the steam and the tube wall and the thermal resistance of the tube wall.Thus, by assuming the outlet temperature of the circulating water,  2 can be determined.Based on the above assumptions and equations, the dynamic heat balance equation of the condenser is described as follows: 4.1.2.Mass Balance.The mass balance of steam and condensate is based on the assumption that the space  is constant, and the volume of the steam and air is constant.That is to say, in order to maintain the vapor condensation level of the condenser (certain vacuum degree), the output flow of condensate water needs to be controlled in a certain range.So, in order to simplify the model, we assume that the inlet and outlet of the condensate are saturated.Therefore, the ideal gas model equation is expressed as where   is the steam flow (kg/s) and   is the condensate water flow (kg/s).Among them, the condensation water temperature   and the condenser pressure  have a unique relationship.In order to simplify the model, it is approximated by the following linear relationship equation: The steam condenser model given above has five equations, among which two are dynamic equations.Here, there  2 under the assumption that the system is stable.
Based on the above model equations and the software Matlab/Simulink, a simulation model of PI controller for condenser pressure closed-loop control system is established as shown in Figure 6, which includes a first-order delay unit used to represent the actuator with a time constant  = 10 (s) and a lag unit caused by the pressure sensor with the time constant  = 5 (s).

Encoding and Fitness Function.
Because the design of the PID controller is actually a multidimensional function optimization problem, the GWO algorithm adopts the real number coding.So, for the parameters optimization of the PI controller, each wolf can be directly coded as (  ,   ): The control parameter optimization is designed to make the control error tend to zero and has a faster response speed and smaller overshoot.So the evaluation of the performance of each set of control parameters is good or bad; the integral of the product of absolute error and time is selected as the fitness function:

Simulation Experiments and Results
Analysis of PI Controller.On the basis of the above established model of steam condenser, the GWO algorithm is adopted to optimize the parameters of the adopted PI controller.The self-tuning performances are compared with the Z-N engineering tuning method, genetic algorithm (GA), and particle swarm optimization (PSO) algorithm.Respectively, run GWO, PSO, and GA algorithm 30 times, and then select the best PID parameters of each algorithm.The output response curves of cooling water outlet temperature, circulating water flow, steam discharge heat, and condenser pressure are shown in Figures 7-10.The parameters of PI controllers are listed in Table 3.As seen from the above simulation results, the PI controller under the optimization by the proposed GWO algorithm has the best control performance, that is to say, small overshoot and short rise time and adjustment time.The Z-N engineering self-tuning method has the worst performance, where the overshoot is the largest, and the rise time and adjustment time are the longest.The GWO algorithm can effectively improve the system control quality and achieve the desired effect.
Because the Z-N method belongs to engineering setting method, setting the PID parameters depends on experience Mathematical Problems in Engineering value, so the effect of PID control is poor.The GA algorithm and PSO algorithm are intelligent method, so control effect of PID controller whose parameters are optimized by these two methods has been greatly improved, relative to the Z-N setting method.But because of their inherent search mode and the defects, the search accuracy is not high enough; thus, result of parameters setting is poorer than that of grey wolf optimizer.It can be known from searching way of GWO algorithm above that the grey wolf optimizer is going to search solutions in the comprehensive evaluation by three wolves.Therefore, the GWO algorithm has a high search precision, which can make it sure to search a better solution value.Thus, the GWO algorithm increases the probability of searching a better group of PID parameters.

Conclusions
In this paper, a dynamic model of steam condenser and the closed-loop control system are established on the basis of the lumped parameter model of the condenser.For the pressure closed-loop control system, in order to improve the system performance, the GWO algorithm is adopted to optimize the PI parameters.Through the simulation experiments and performance comparison of cooling water outlet temperature, circulating water flow, steam discharge heat, and condenser pressure, the introduction of the GWO algorithm makes the steam condenser PI controller have better control effect.In order to have a better control effect of steam condenser, we can try to improve the design of PID controller.Since the research of grey wolf optimizer is just in its infancy, the GWO algorithm should be improved to obtain better PID parameters in the further study.Other superior algorithms should be exploited for PID parameter optimization.

Figure 3 :
Figure 3: Position vector of wolf and next moving position in twodimensional space.

Figure 4 :
Figure 4: Sketch map of position update of the wolves.

Figure 5 :
Figure 5: Exploration and development of wolves.

)Figure 6 :Figure 7 :
Figure 6: Matlab/Simulink simulation model of PI controller for condenser pressure closed-loop control system.

Figure 8 :Figure 9 :
Figure 8: Output response curves of circulating water flow under different algorithms.

Figure 10 :
Figure 10: Output response curves of pressure under different algorithms.

Table 1 :
Parameters of steam condenser.

Table 3 :
Parameters of PI controller.