Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 7, No. 1, 2024 1 Research and Simulation of Fuzzy Expert Anti‐surge Control System for Compressor Yanan Yi, Mingge Sun School of Information and Control Engineering, Jilin Institute of Chemical Technology, Jilin 132022, China Abstract: In order to solve the problem of compressor surge caused by flow fluctuations that cannot be effectively solved by conventional PID control, a fuzzy expert PID controller was designed based on the analysis of the working principles of fuzzy controllers and expert controllers. This controller has the advantages of good stability and high control accuracy of fuzzy control, as well as the advantage of fast response time of expert controllers. The MATLAB simulation results show that the fuzzy expert PID control algorithm has the characteristics of high stability, fast response speed, and small overshoot compared to conventional PID. Keywords: Compressor; Anti-surge Control; Fuzzy-Expert PID Control. 1. Introduction Compressor as the main unit component of catalytic cracking unit, in its use process, surge phenomenon is very easy to appear, surge will not only cause instability of process parameters, bring great chaos to production, but also greatly shorten the service life of the compressor. In recent years, there have been many researches on compressor surge control methods. Qin Xiao dong [1] et al. proposed the constant pressure approximation control method, which effectively expands the compressor operating range and adopts fuzzy PID output control to accelerate the system response speed. However, this method has high requirements on the selection of initial conditions and the parameter setting is more complicated; Tian Hai and Liang Mao yu [2] adopt a method that combines synchronous frequency conversion of two wind turbines with minimum extreme flow method and fuzzy PID control, effectively avoiding the occurrence of surge. Due to the need for parameter tuning in both synchronous frequency conversion and fuzzy PID control, the combination of the two makes parameter adjustment more difficult; Fang Lin [3] uses an expert PID algorithm combined with a PLC controller to achieve blower surge prediction and anti-surge control, ensuring the stable operation of the unit, but has poor adaptability to nonlinear systems. A method combining fuzzy PID control with expert PID control is proposed to address the flexibility issue of parameter adjustment in the compressor control system mentioned above. 2. Compressor Surge 2.1. Impact on Compressor Surge The surge generated by compressors is mainly determined by two factors, internal and external. Internal cause: Under abnormal operating conditions, the unit causes the flow rate to be less than the minimum value, resulting in a decrease in the flow rate of the compressor, and even a state of no flow; External cause: The pressure of the pipeline network is higher than the outlet pressure provided by the compressor, causing gas backflow and causing significant vibration [4] The surge characteristic curve of the compressor is shown in Figure 1, where the horizontal axis represents the compressor flow rate Q, the vertical axis represents the compressor outlet pressure P, and N represents the compressor speed [5]. A1-A4 are the surge points at different speeds. When at a certain speed, the compressor enters the surge zone (to the left of the surge point), the outlet pressure gradually decreases, and the flow rate also decreases. At this time, the surge phenomenon will also follow. The relationship between compressor flow rate and speed is proportional, and as the compressor flow rate decreases, the speed will also decrease accordingly. From the graph, it can be seen that as the speed increases, the surge zone becomes larger. In addition, inlet pressure, temperature, gas molecular weight, and pipeline capacity are also factors that affect compressor surge [6]. Fig 1. Compressor characteristic curve 2.2. Main Performance Parameters of Compressor in Catalytic Cracking Unit Taking the main fan unit of a catalytic cracking unit in a certain refinery as an example, the main equipment is a compressor. In order to prevent compressor surge, it is necessary to maintain the main performance indicators of the compressor within the fluctuation range of the values listed in Table 1, with a margin of 5-10%. 2 Table 1. Main performance parameters of the compressor Parameter inlet pressure Inlet flow speed Outlet pressure Outlet flow numerical value 0.098MPa 3262Nm3/min 5848r/min 0.4MPa 3200Nm3/min 3. Compressor Anti-surge Control The anti-surge control methods for compressors can be divided into active and passive anti surge control, but usually passive anti surge control is used for anti-surge control of large compressors. The control principle of the passive control method is to adjust the opening of the anti-surge valve based on the inlet flow rate of the compressor, thereby achieving the purpose of anti-surge [7]. The schematic diagram of the traditional compressor anti- surge control system is shown in Figure 2. Fig 2. Schematic diagram of traditional compressor anti-surge control system The flow regulator FC is a conventional PID controller, and according to the compressor characteristic curve, the set value of FC must be greater than the surge flow value. When the system load decreases, the inlet air flow rate of the compressor decreases, the FC output decreases, and the anti- surge valve gradually opens to ensure that the inlet flow rate of the compressor is not lower than the surge flow rate, thus achieving the purpose of anti-surge [8]. Although conventional PID controllers can achieve anti surge, they are only suitable for low load situations and not suitable for other load situations. Therefore, based on the conventional PID controller, a fuzzy expert PID controller has been proposed to improve the shortcomings of the conventional PID controller and achieve online parameter tuning. 4. Fuzzy Expert PID Control System 4.1. Fuzzy PID Controller Fuzzy PID controller is based on conventional PID controllers and utilizes fuzzy theory to construct a fuzzy relationship between error e and error change rate ec, as well as the three parameters kp, ki, and kd of PID, in order to achieve more accurate control. Its structure is shown in Figure 3. The fuzzy controller needs to first fuzzify the input quantity, then go through fuzzy reasoning, and finally clarify the fuzzy reasoning results, outputting three parameters kp, ki, and kd to achieve online tuning of PID controller parameters [9]. Fig 3. Structure diagram of fuzzy PID controller 4.1.1. Fuzzification and Membership Function Due to the fact that the fuzzy PID controller is a two input and three output controller, with e and ec as input variables and kp, ki, and kd as output variables, with compressor flow rate as deviation e and compressor flow rate change rate as ec. Using fuzzy sets {NB, NM, NS, ZO, PS, PM, PB} to fuzzify e and ec [10]. The domains for selecting e and ec are both [- 3,3]; According to the regulation law of the compressor flow PID, the domain of kp is taken as [-0.3,0.3]; The domain of ki is [-0.05,0.05]; The domain of kd is [-2,2], at which point the control performance of the system is optimal. Among them, the input and output variables are represented by triangular membership functions. 4.1.2. Establishment of Fuzzy Rules Table 2. Fuzzy Rule Table for kp Variables ec e NB NM NS ZO PS PM PB NB PB PB PM PM PS ZO ZO NM PB PB PM PS PS ZO NS NS PM PM PM PS ZO NS NS ZO PM PM PS ZO NS NM NM PS PS PS ZO NS NS NM NM PM PS ZO NS NM NM NM NB PB ZO ZO NM NM NM NB NB The fuzzy control rule table determines the control effect of the fuzzy controller and is the core of the fuzzy controller. When the deviation e and deviation change rate ec are large, in order to reduce system overshoot and oscillation, kp should be increased while reducing the effects of ki and kd; When the deviation e gradually decreases, in order to reduce steady- state error and improve system accuracy, it is necessary to appropriately reduce kp while increasing the effects of ki and kd [11]. Determine the magnitude of the corresponding effects of kp, ki, and kd based on the deviation e and deviation change 3 rate ec at different response stages. Based on the above experience, the fuzzy PID control rule tables for kp, ki, and kd are shown in Tables 2, 3, and 4. Table 3. Fuzzy Rule Table for ki Variables ec e NB NM NS ZO PS PM PB NB NB NB NM NM NS ZO ZO NM NB NB NM NS NS ZO ZO NS NB NM NS NS ZO PS PS ZO NM NM NS ZO PS PM PM PS NM NS ZO PS PS PM PB PM ZO ZO PS PS PM PB PB PB ZO ZO PS PM PM PB PB Table 4. Fuzzy Rule Table for kd Variables ec e NB NM NS ZO PS PM PB NB PS NS NB NB NB NM PS NM PS NS NB NM NM NS ZO NS ZO NS NM NM NS NS ZO ZO ZO NS NS NS NS NS ZO PS ZO ZO ZO ZO ZO ZO ZO PM PB PS PS PS PS PS PB PB PB PM PM PM PS PS PB 4.2. Expert PID Controller 4.2.1. Expert PID Control Structure Diagram Expert PID controller is a controller that utilizes an expert rule library to adjust and modify PID parameters in real time[12]. The expert PID control structure diagram is shown in Figure 4. Fig 4. Expert PID control structure diagram 4.2.2. Expert Control Rule Design e(k) represents the sampling error value at the current moment, and if e (k-1) and e (k-2) are the error values of the first two moments, the relationship is as shown in formulas (1) and (2) [13]. △e(k)=e(k)-e(k-1) (1) △e(k-1)=e(k-1)-e(k-2) (2) Based on the error and its variation, the design rule for expert PID is [12]. 1)When |e(k)|>M1, the error value at this time is very large. No matter how the error trend changes, the compressor will experience surge. The anti-surge valve should be fully opened and the speed should be appropriately reduced. 2)When e(k) △ e(k)>0, it indicates that the error is increasing or is a constant value. The design rule in this state is: when |e(k)|≥M2, M20,or e(k)=0, it indicates that the anti-surge control of the compressor is in a stable operating state, and the input and output of the control system have reached balance or there is a trend of error reduction. At this time, the output of the controller remains unchanged. 4) When e(k)△e(k)<0 or e(k)△e(k-1)<0, the current error is at the extreme position, and the control action should be selected based on the size of the error. If |e(k)|≥M2, the control effect is strong, and the controller output is as shown in formula (5). u k =u k-1 +k1kpem(k) (5) On the contrary, |e(k)|M2>0; K1>k2>0; Em(k) represent the k-th extreme value of error e;△e(k) is the rate of error change of the k-th value; u (k) represents the output of the controller for the kth time; K1<1; 00 or e(k)=0 (i.e. when the deviation is at the extreme position) and |e(k)|>M1 Select an expert PID controller (i.e. when the deviation is large). 2) In other cases, a fuzzy PID controller is used to adjust kp, ki, and kd, and corresponding control is implemented to control the flow rate of the compressor. Fig 5. Structure diagram of fuzzy expert PID controller 5. Analysis of Simulation Results 5.1. Transfer Function Through the analysis of the working principle of the above control system, the controlled object can be equivalent to two pure lag inertial links connected in series, and its transfer function is shown in formula (7). G s = k (Ts+1)2 e-τs (7) T is the time constant of the inertial link; K is the amplification coefficient of the inertial link; τ Is the delay time of the lagging link. Where K=3.85, T=16 τ= 27. 5.2. Simulation Result The simulation curves of conventional PID controller and fuzzy expert PID controller in MATLAB for anti-surge control of compressors are shown in Figure 6. Fig 6. PID and Fuzzy - Expert PID Control Simulation Results Table 5. Comparison of conventional PID, fuzzy PID and fuzzy-expert PID control data Control mode PID Fuzzy PID fuzzy-expert PID Overshoot (%) 22 3 0.8 Adjust the time(s) 420 400 210 Rise time(s) 75 82 70 It is evident from Figure 6 that the fuzzy-expert PID controller is significantly superior to the conventional PID 5 controller and the fuzzy PID controller in terms of control time, response speed and overshoot. Comparison of specific control data is shown in Table 5. 6. Conclusion Simulation results show that compared with conventional PID controller, fuzzy-expert PID controller significantly speeds up the response speed of the system, shortens the time for the system to reach stability, significantly enhances the control capability of the system, effectively improves the stability of the unit operation, and reduces the probability of surge. Ensure the safe operation of the entire unit. References [1] Xiao dong Q, Linna D, Bohan L et al. Research on anti-surge optimization control technology of natural gas centrifugal Compressor [J]. Petroleum and Chemical Equipment,2021, 24 (09): 87-88. [2] Hai T, Mao yu L. Design of Anti-Surge Control System for Wind Turbine Based on Network [J]. Computer Measurement and Control,2015,23(05):1575-1577. [3] Lin F. Application Research of Blower Anti-surge Control System [D]. Kunming University of Science and Technology, 2019. [4] Xuan C, Song qin Y, Xin C. Research on Surge Margin Technology of Compressor [J]. Modern Industrial Economy and Information Technology,2022,12(08):73-74. [5] Wen qi D, Zhao Lian X, Heng G et al. Design and Application of Blower Control System in sewage plant [J]. Journal of Jilin University of Chemical Technology,2022,39(05):77-82. [6] Yun fei W. Anti-surge Control System of Blower based on Hollysys LK Large PLC [J]. Automation Expo, 2019,328(10): 92-95. [7] Lin X. Research on Surge Control and Interlock Protection Method of MVR Water Steam Compressor [D]. Beijing University of Chemical Technology,2018. [8] Lin P. Prevention and Solution of Centrifugal Compressor Surge [J]. China High-tech Enterprises,2010,157(22):82-84. [9] Xiao xu Z, Yan H. Design of Anti-gravity Casting expert- Fuzzy PID Pressure Control System Based on PLC [J]. Hot Working Technology,2018,47(11):179-182. [10] Xin Ren jing Z, Ya nan M, Si hang G, etc. Design and simulation of Fuzzy PID Control in circulating Fluidized Bed boiler Combustion System [J]. Journal of Jilin University of Chemical Technology,2022,39(09):52-54. [11] Ai juan Z, Muyi H, Ya nan H. Application of dual-mode improved Smith Predictor based on expert PID and fuzzy PID in causticizers [J]. China Paper,2016,35(03):43-48. [12] Yong hua T, Yi xin Y, Lu sheng G, etc. New PID Control and Its Application [M]. China Machine Press,1998,9:81-94. [13] Jin kun L. MATLAB Simulation of Advanced PID Control [M]. Publishing House of Electronics Industry,2016,6:307-310.