An Optimization Method for a Compressor Standby Scheme Based on Reliability Analysis

: The reliability of the compressor system determines the gas supply safety. An important method to improve the reliability is to set up standby compressors in stations, conducted by the standby compressor or power. A lack of quantitative assessments of standby compressors often results in more spare compressors or power than actually needed, which wastes money. In this study, a reliability-based method is proposed to determine the numbers and positions of the standby compressors, which can reduce investments, and ensure reliability. Firstly, Monte Carlo method was used to calculate the compressor outage probability of the whole pipeline, respectively, through which the initial number of standby compressors was obtained. Further, the standby schemes were designed, in which the positions of the failed compressors were obtained by the Monte Carlo simulation. Moreover, the worst situation in which the compressors were shut down was used to test the standby scheme, calculating the ﬂow reliability, pressure boundary, and total power. Finally, using the Xin–Yue–Zhe pipeline as a case study, the results indicate that the number of standby compressors in the improved schemes was reduced by seven and the pipeline reliability reached 96.86%.


Introduction
The economic recession caused by COVID-19 has become inevitable. Reducing investments and increasing efficiency will be the main focal points for the design, operation, and maintenance of natural gas (NG) pipelines for the managers and operators. Moreover, a reliable gas supply should be guaranteed. The compressor system (CS) is the power source of the long-distance NG pipeline, of which the operating state determines the pipeline flow and pressure, determining the reliability of the pipeline system. The reliability of the CS firstly refers to the operating reliability of a single compressor in a compressor station, and then refers to the reliability of the entire CS. Both depend on the compressor outage probability, including the failure probability and the scheduled outage probability. For the whole pipeline system, an important method to improve the reliability is to set up standby compressor units in the compressor stations, including unit standby and power standby. The unit standby needs the station to be equipped with standby units, resulting in increased investment and a large number of idle units [1]. The power standby has a certain amount of surplus on the basis of the designed power demand. When a unit fails to work, the surplus power is applied to restore the flow and pressure of the entire pipeline, which means that, under normal conditions, the compressor unit with surplus power will work in a low load/efficiency state [2]. In addition, for the actual design or operation of the CS, the way to set up the standby compressors is mainly based on expert experience. In order to increase the reliability of the pipeline, the conducted standby compressor plan is often conservative, which means the number or power of standby compressors is more regulators, valves, and other components. They experienced challenges in evaluating the network capability to withstand the impact of the compressor outage [30].
Catchpole presented British Gas Corporation's experience of gas compressor reliability growth to date and showed the methods that were used to evaluate operational trends, indicating the reliability growth of gas turbine-powered compressor units. Petrova et al. [31] obtained a mathematical model for determining the reliability of the compressor unit based on the compressor failure mode combined with the control and measurement instruments, showing a calculation method for the compressor failure rate. Tran et al. [32] put forward an effective maintenance policy for compressors at the national grid in the United Kingdom to mitigate the loss of network capability. Woo et al. [33] suggested a reliability methodology to improve the lifetime of a mechanical system, such as a compressor, which could contribute to gas supply safety. Gentsch and King [34] contributed to the modeling and supervision of multi-stage centrifugal compressors coping with real gas processes and steady-to-highly transient operating conditions. Li et al. [35] proposed a novel ejector-based detection system for thermodynamic measurements of compressors to promote their reliability. In the present research studies on the reliability analyses of compressors, the reliability of the compressor itself is the main focus. To consider the impact of the compressor stations on the gas transmission network capability, a standby compressor unit is always applied. Sidney Pereira dos Santos et al. [36] noted that a standby compressor unit was determined by the reliability of the compressor, and proposed a periodic/unscheduled maintenance strategy for the Bolivia-Brazil gas pipeline to calculate the reliability of the CS. Chen [37] believed that in order to ensure the pipeline gas supply, each compressor station should be equipped with at least one standby unit. Tang discussed the compressor station plans for the West-East Gas Pipeline. The unit standby and power standby modes were compared, considering factors such as the operation, unit maintenance, and investment. Though the impacts of the compressor unit on the gas pipelines were discussed, the quantitative reliability analysis was little cared about, which led to the fact that the standby plan was always designed according to the experiences, causing great investments in the compressor numbers or power.
The main contribution of this study was to design a method to optimize the standby scheme for the CS based on the reliability analysis. Firstly, the ratio of the actual flow that withstands the compressor outage to the designed flow was defined as the index to evaluate the reliability, in which the flow can be calculated by the combined pipeline and compressor equations after the standby scheme is determined. Then, Monte Carlo method was used to calculate the compressor outage probability of the whole pipeline, respectively, through which the initial number of standby compressors was obtained, considering the gas storage capacity of the pipeline. Further, the standby schemes were designed with the help of the initial number, in which the positions of the failed compressors were obtained by the Monte Carlo simulation, to find out the effective standby scheme that could satisfy the flow and pressure boundary. Moreover, according to the influence of the compressor outage on the pipeline flow, the worst situation in which the compressors were shut down was used to test the standby scheme, calculating the flow reliability, pressure boundary, and total power. Finally, the standby scheme, which has the largest reliability with minimum power, was determined. The results of the case study indicate that for the Xin-Yue-Zhe (XYZ) pipeline, which had 20 standby compressors in the original scheme, the number of standby compressors in the improved schemes was reduced by seven and the pipeline reliability reached 96.86%. This paper is organized as follows. Section 2 presents the methods for the standby compressors based on the reliability analysis, feasibility analysis, and economic analysis, which are flow boundary, pressure boundary, and power, respectively. Section 3 describes the details of the XYZ pipeline project, for which the standby scheme was designed and validated. Finally, the conclusions and future work are provided in Section 4.

Definition of Reliability Index
For the compressor, there are many indices for reliability analyses, such as reliability, cumulative failure probability, failure rate, average life, etc. [38]. Because the reliability of the CS will influence the reliability of the pipeline system, the gas supply safety will also be influenced [39]. For the gas supply, the commonly used reliability index can be defined as: where R is the reliability index; Q is the designed or planned transportation flow of the pipeline; and q is the flow under the standby plan of the CS, which can be obtained by solving the following equation: where p Z is the end pressure of the pipeline; p Q is the starting pressure of the pipeline; s Z is the height difference between the end point and the starting point of the pipeline; s i−1 and s i are the heights of the i segment, of which the length is l i ; q is the flow under standard conditions; C p is the flow coefficient; E is the efficiency coefficient, which is generally 0.9~0.95; a is the correction coefficient for the flow state, which equals to 1 when the flow falls in the fully developed turbulence state.
The simplified structure of the gas pipeline network is shown in Figure 1.

Definition of Reliability Index
For the compressor, there are many indices for reliability analyses, such as reliability, cumulative failure probability, failure rate, average life, etc. [38]. Because the reliability of the CS will influence the reliability of the pipeline system, the gas supply safety will also be influenced [39]. For the gas supply, the commonly used reliability index can be defined as: where R is the reliability index; Q is the designed or planned transportation flow of the pipeline; and q is the flow under the standby plan of the CS, which can be obtained by solving the following equation: where Z p is the end pressure of the pipeline; Q p is the starting pressure of the pipeline;  According to Kirchhoff's first law [40], the flow balance equation can be written as follows: where i Q is the gas flow into i node;  According to Kirchhoff's first law [40], the flow balance equation can be written as follows: where Q i is the gas flow into i node; M ij is the absolute flow in the pipeline between i,j nodes, and M ij = M ji ; α ij is the coefficient, when there is no pipe connection at the node, α ij = 0, and when the gas flows from i to j, α ij = −1, otherwise α ij = 1.
The intake gas volume of the pipeline depends on the gas supply source, and the offtake volume should be able to meet the user's demand. Therefore, where Q in(i) is the intake volume of node i; Q out(i) is the offtake volume; Q in(i)min is the allowable minimum intake volume; Q in(i)max is the allowable maximum intake volume; Q out(i)min is the allowable minimum offtake volume; Q out(i)max is the allowable maximum offtake volume.
The intake and offtake pressure of the gas pipeline are constrained by the design pressure. The maximum pressure should not be larger than the design pressure. In addition, the minimum intake pressure is affected by the supply source, and the minimum offtake pressure needs to meet the user's requirements. Therefore, where P in(i) is the intake pressure of the node i; P out(i) is the offtake pressure; P in(i)min is the allowable minimum intake pressure; P in(i)max is the allowable maximum intake pressure; P out(i)min is the allowable minimum offtake pressure; P out(i)max is the allowable maximum offtake pressure.
Because most of the compressor units in the stations for the long-distance gas pipelines adopt the parallel mode, a parallel model for the compressor units in the station was applied in this study.
When solving the equations above, the nonlinear equations should be solved by the iteration method, which will become more complicated, especially when the CS is also considered. To accurately calculate the gas flow, pressure, and power for the standby scheme, a commercial software SPS was applied for further calculation.

Standby Scheme Design
The number and position of the standby compressors for each scheme should be confirmed, which means the number and position will determine the flow reliability. The purpose of the standby scheme is to turn on the standby unit when the working unit is shut down with failure or scheduled maintenance, by which the flow and pressure in the pipeline can be ensured. Therefore, the steps for the standby scheme can be carried out as follows: (1) Input the total number m of the compressors. NG pipelines have large gas storage capacities, which can stand for a certain period of time t 1 after the compressor is shut down. We confirm the outage probability for the single compressor and calculate the outage time t 2 using Monte Carlo simulation method. When t 1 equals t 2 , the number j of compressors can be regarded as the maximum number of compressors out of working together, which can also be regarded as the initial or minimum numbers of the standby compressors. (2) After the initial number is confirmed, C j m standby schemes can be obtained. For each standby scheme, there are C j m faulted situations, which can be simulated by the Monte Carlo simulation, in which the position that has the larger influence on the pipeline system should be set as the faulted compressor position.
(3) We use SPS to simulate the standby scheme with the worst faulted situation to calculate the flow and pressure, by which the reliability index R can be obtained. If R i ≥ R, the standby scheme can be available. If i < C j m , step (3) should be repeated to validate the standby scheme (i+1). All available plans will perform a set Y . (4) When the set Y is empty, steps (2)~(3) are repeated. (5) We calculate the power for each scheme in set Y and output the scheme with the minimum power.
The steps for the standby scheme can be seen in Figure 2.  (3) should be repeated to validate the standby scheme (i+1). All available plans will perform a set Y ′ . (4) When the set Y ′ is empty, steps (2)~(3) are repeated. (5) We calculate the power for each scheme in set Y ′ and output the scheme with the minimum power.
The steps for the standby scheme can be seen in Figure 2.

Outage Probability of Single Compressor
According to the North American Electric Reliability Commission, in 2005 [41], the outage probability of a single compress was determined as 7.06%.

Monte Carlo Simulation
The outage probability and time for the CS can be calculated using the Monte Carlo simulation method, which can be further used to calculate the initial number of standby units. The detailed steps of the Monte Carlo simulation can be seen in the S1 section of Supplementary Materials.

Outage Probability of Single Compressor
According to the North American Electric Reliability Commission, in 2005 [41], the outage probability of a single compress was determined as 7.06%.

Monte Carlo Simulation
The outage probability and time for the CS can be calculated using the Monte Carlo simulation method, which can be further used to calculate the initial number of standby units. The detailed steps of the Monte Carlo simulation can be seen in the S1 section of Supplementary Materials.
After the initial number is confirmed, C j m standby schemes can be obtained. For each standby scheme, there are C j m faulted situations, which can be simulated by the Monte Carlo simulation.

Feasibility and Economic Analysis of the Standby Scheme
After the standby scheme is confirmed, the flow of the pipeline for each standby scheme can be calculated, by which the flow reliability can be obtained. Further, the pressure boundary for each standby scheme can be used to validate the feasibility of the scheme. Moreover, an economic analysis of the power of the scheme should be conducted.

Feasibility Analysis with Pressure Boundary
The feasibility of the standby scheme means that when some of the compressor units are shut down, the normal operation of the pipeline can be guaranteed by turning on the standby unit.
After the standby scheme is obtained, the set of commonly used units is D, the set of faulted units is F, and the set of compressor units in the standby scheme is S. For the unit, the compressor set in the operating state is R = D − F + S. Moreover, the working condition of the standby scheme should be calculated using SPS. If none of the following boundaries exist, the standby scheme can be regarded as satisfied.
(1) The inlet pressure of the compressor is lower than the required inlet pressure; (2) The operating pressure over a long distance is significantly lower than the designed one.

Economic Analysis with Power
After the feasibility analysis of the standby scheme, the flow and power of different schemes will vary, through which, the following index can be defined: where N i is the power of the i-th compressor; n is the number of compressors; Q is the pipeline flow; E is the economic parameter.

Case Study
The Xin-Yue-Zhe (XYZ) pipeline was used for the case study; it runs from the first station in Yining, Xinjiang, to the last station in Shaoguan, Guangdong, with a total length of 8372 km. Passing through 13 provinces, the pipeline has 1 main line and 6 branch lines, of which 23 compressor stations are applied to transport NG with 30 billion m 3 per year. The total length of the main line is 4160 km, which has 20 compressor stations and 14 distribution stations. According to the design plan, each of the 20 compressor stations is equipped with 2 to 3 commonly used compressors, and with one standby compressor, which means 20 more compressors should be equipped as the standby units. The pipeline system is shown in Figure 3.  The square blocks represent the compressor station and the ellipse blocks represent the distribution station. The detailed information of the compressor station can be seen in Table 1. SPS can be applied to calculate the pressure and flow along the pipeline. The boundary conditions are set as follows: gas sources 1 and 2 have the same parameters, which can be regarded as one source with the pressure boundary; gas source 3 and each distribution point are set as the flow boundary; the outlet pressure and maximum power for the compressor are set. The results can be seen in S2 of Supplementary Materials section.
The results of the numerical simulation indicate that the flow meets the design requirements and the power for each compressor satisfies the power consumed by gas transportation. The outlet pressure falls into the design pressure range, and the inlet pressure meets the need for the compressor. These indicate that the numerical model can be applied for further simulations.
In Figure 3, there are three gas sources for the XYZ pipeline, which are the inlets from the A001 and A002 stations, respectively. If the compressors in these two stations fall in an outage, the pipeline will not work. Therefore, stations A001 and A002 must be equipped with standby compressor units. The optimization of standby scheme is only for the remaining 18 stations. The square blocks represent the compressor station and the ellipse blocks represent the distribution station. The detailed information of the compressor station can be seen in Table 1. SPS can be applied to calculate the pressure and flow along the pipeline. The boundary conditions are set as follows: gas sources 1 and 2 have the same parameters, which can be regarded as one source with the pressure boundary; gas source 3 and each distribution point are set as the flow boundary; the outlet pressure and maximum power for the compressor are set. The results can be seen in S2 of Supplementary Materials section.
The results of the numerical simulation indicate that the flow meets the design requirements and the power for each compressor satisfies the power consumed by gas transportation. The outlet pressure falls into the design pressure range, and the inlet pressure meets the need for the compressor. These indicate that the numerical model can be applied for further simulations.
In Figure 3, there are three gas sources for the XYZ pipeline, which are the inlets from the A001 and A002 stations, respectively. If the compressors in these two stations fall in an outage, the pipeline will not work. Therefore, stations A001 and A002 must be equipped with standby compressor units. The optimization of standby scheme is only for the remaining 18 stations.

Boundary Conditions for the Compressor Stations
(1) Pressure boundary conditions.
There are 27 distribution points that serve as the gas sources for the downstream users. The pressure boundaries for each distribution station can be obtained as shown in Table 2. In Table 2, the pressure boundaries in most of the distribution stations should be larger than 4 MPa, and the pressures of E003, G003, G004, and H002 stations are higher, which should be considered in priority.
The designed power for the compressor in Table 1 can be used to calculate the shaft power, considering the efficiency of the driving mode, which is 55% for the electric driving mode and 85% for the combustion mode, respectively. In addition, the shaft power of the compressor can vary within a range of 110% for the upper limit, and 75% for the lower limit, respectively. The calculated shaft power limits can be seen in Table 3. When the gas sources and all of the compressor stations fail, the gas storage capacity of the XYZ pipeline can withstand the gas transportation for a period. Using the pressure boundaries for each distribution station, the pressure distribution of the whole pipeline can be seen in Figure 4.
In Figure 4, as the time went for 220 min after the compressors were shut down, the pressure of station G003 decreased to 8.69 MPa, which would not supply the gas if the pressure continued to decrease. Therefore, the longest time to withstand the gas due to gas storage capacity was 220 min. In Figure 4, as the time went for 220 min after the compressors were shut down, the pressure of station G003 decreased to 8.69 MPa, which would not supply the gas if the pressure continued to decrease. Therefore, the longest time to withstand the gas due to gas storage capacity was 220 min.
(2) Number of compressors in the outage.
The outage probability for the single compressor unit was 7.06%. The outage probability and time calculated by the binomial distribution method and Monte Carlo method can be seen in Table 4.  (2) Number of compressors in the outage.
The outage probability for the single compressor unit was 7.06%. The outage probability and time calculated by the binomial distribution method and Monte Carlo method can be seen in Table 4. In Table 4, the probability of 10 compressors being shut down at the same time was 0.12%, of which the outage time was 0.45 days or 648 min; the probability of 11 units being shut down at the same time was 0.03%, and the time was 0.12 days or 172.8 min. Likewise, the outage time of 10 compressors was 0.4015 days or 578.16 min; the outage time of 11 compressors was 0.146 days or 210.24 min. Therefore, according to the withstanding time by the capacity, the maximum number that was shut down at the same time was 11, which means the number of standby compressors should be more than 11.

Reliability Analysis
The 13 standby schemes obtained in Table 5 were reduced from 20 standby compressors, of which, the flow reliability should be calculated, using the SPS simulation.
To calculate the flow, the position of the faulted compressor should be confirmed first. Considering that, for each standby scheme there are C 11 18 = 31, 824 kinds of faulted compressor schemes, which can be simulated by the Monte Carlo method. If the standby scheme satisfies the worst situation, the standby scheme can be regarded as reliable.
When two or more compressors in one station fail, the probability is 0.5% or 1%, respectively. Therefore, in most of the actual situations, the outage with one compressor in a station has the highest probability. When there is only one compressor shut down in a station, reduced flow and power can be obtained, as seen in Figure 5. According to the reduced flow in Figure 5, the outage compressor stations should be set as the following sequence: G003, G001, D001, E004, E006, B001, A004, A003, B004, B005, B003, C002, B002, B007, C001, E001, B008, F003. If the compressor in the station without the standby compressor fails, which will lead to more severe consequences, the faulted compressor should be set in the station without standby compressors. Both aspects being taken into consideration, the worst compressor positions shutting down-corresponding to the standby compressors-should be set, as shown in Table 6. If one compressor (from the stations shown in Table 6) is shut down, and the standby compressor starts, the number of compressors under working conditions can be seen in Table 7.  According to the reduced flow in Figure 5, the outage compressor stations should be set as the following sequence: G003, G001, D001, E004, E006, B001, A004, A003, B004, B005, B003, C002, B002, B007, C001, E001, B008, F003. If the compressor in the station without the standby compressor fails, which will lead to more severe consequences, the faulted compressor should be set in the station without standby compressors. Both aspects being taken into consideration, the worst compressor positions shutting down-corresponding to the standby compressors-should be set, as shown in Table 6. If one compressor (from the stations shown in Table 6) is shut down, and the standby compressor starts, the number of compressors under working conditions can be seen in Table 7.
When the compressors in Table 7 are working, the pressure, flow, and temperature of the pipeline can be obtained, of which, the pressure of stations E003, G003, G004, and H002 are obtained in Table 8. The pressures in Table 8 are higher than the pressure boundaries, which means the standby schemes are available.
The flow of the main pipeline can be seen in Table 9. In an actual situation, the flow volume with negative fluctuations of 5% can be accepted, which means the reliability index of the pipeline can be determined as R = 95% [42]. Therefore, the standby schemes in Table 9 are all reliable.

Economic Analysis
Through the above analyses based on the flow reliability and the pressure boundary, 13 standby schemes are reliable and available. However, since the power for different schemes is different, the economic analysis should be conducted by calculating the power; the results can be seen in Table 10. Moreover, E can be calculated using the power in Table 10, of which the results can be seen in Table 11. In Table 11, Scheme 2 has the smallest cost, indicating that Scheme 2 is the optimal standby scheme. A total of 13 standby compressors are required, which is reduced by 7, and the pipeline reliability can reach 96.86%.

Conclusions and Policy Implications
In this study, an optimization method for the compressor standby scheme was designed and developed using the reliability analysis and economic analysis based on the Monte Carlo simulation. The following conclusions and policy implications were drawn: (1) The flow reliability was proposed according to the ratio of the actual flow, which withstands the compressor outage to the designed flow. (2) The binomial distribution method and Monte Carlo method were used to calculate the compressor outage probability of the whole pipeline, respectively, through which the initial number of standby compressors was obtained, considering the gas storage capacity of the pipeline. (3) The standby schemes were designed with the help of the Monte Carlo simulation, to find out the effective standby scheme that could satisfy the flow and pressure boundaries. (4) According to the influence of the compressor outage on the pipeline flow, the worst situation in which the compressors were shut down was used to test the standby scheme, calculating the flow reliability, pressure boundary, and total power. The standby scheme that had the largest reliability with minimum power was determined. (5) The proposed method was applied in the case study of the Xin-Yue-Zhe (XYZ) pipeline. The number of standby compressors was reduced to 13 from 20 and the pipeline reliability reached 96.86%. (6) In the future, because the outage probability determines the final compressor system, the outage probability of the single compressor should be noticed as the historical data are recorded. Moreover, the operation styles and the number of compressors in stations should be considered according to the actual situation. In addition, a method to calculate the flow of the pipeline more precisely will be required to accelerate the standby scheme design process.

Supplementary Materials:
The following supporting information can be downloaded at: https:// www.mdpi.com/article/10.3390/en15218305/s1, Figure S1: Flow diagram of the optimal multiplier; Figure S2: Principle diagram of importance sampling method; Figure S3: Principle diagram of modified importance sampling method; Figure S4: Main line graph under design condition; Table S1: Compressor shaft power.