1 Introduction

A hydraulic transient generated in a pipeline system varies the flow velocity and pressure from its point of origin and propagates into other parts of the system. A large hydraulic transient amplitude can cause weak points or pipe sections to burst, loosen corroded material along vulnerable portions of the pipe wall, or damage pipeline equipment (e.g., joint and pump). Various hydraulic actions, such as sudden valve closure, rapid hydrant operation, and pump failure, are responsible for the generation of dangerous transients.

Reducing the maximum pressure head to relieve the system of high internal forces and relax the minimum pressure head to prevent column separation are the most widely used surge control techniques (Jung and Karney 2019). To arrest surge, most pipeline systems utilize hydraulic devices (such as surge relief valves, surge tanks, air chambers, and bypass lines), which demand additional costs and impose operational restrictions. The appropriate design of surge protection devices and operating conditions has been investigated through means of optimization, such as the utilization of a metaheuristic engine on the discretized approximation platform (e.g., method of characteristics (MOC)) for momentum and continuity equations (Wylie and Streeter 1993; Chaudhry 2014). Further enhancements that consider the tradeoff between cost and security or refined reliability evaluation for cavitation are also based on the MOC (Jung et al. 2011; Zhang et al. 2018).

The use of alternative frequency domain approaches in hydraulic structure design attempts to resolve all system resonance characteristics in the optimal design of hydraulic devices and determine the optimal installation locations along the pipeline (Xu et al. 2019). Additionally, the dynamic behavior of a hydraulic turbine with a surge tank and its control has been investigated, using both frequency domain analysis and particle swarm optimization (PSO) (Liang et al. 2017).

Existing methods of surge protection (e.g., hydraulic devices and system modification) demand additional installation and maintenance costs. The simple engineering assumption of achieving safer performance through over-designing a device may not always be an appropriate countermeasure for unexpected transient events and may even occasionally aggravate the system response (Karney and McInnis 1990; Jung and Karney 2019; Zhang et al. 2008).

In this study, an alternative method for the transient control of an unprotected system, without the necessity of pipeline system modification or installation of hydraulic devices, is proposed. The countermeasure pressure from other valve controls can neutralize the hydraulic transients in the pipeline system. Unlike traditional modeling methods (e.g., MOC), one important prerequisite for these approaches is the linearization of system characteristics, which enables the superposition of pressure signals. The patterns of hydraulic transients in simple systems (such as water supply systems, turbine pipelines, and pump-pipeline-reservoir systems) are relatively regular, and the resonance patterns of their pressure signals tend to be feasibly predictable. However, the pressure response patterns of pipe network systems (e.g., water distribution systems) with multiple loops and junctions are extremely complicated; hence, it is considerably more difficult to predict the resonance combinations of pressure signals. In reality, devices such as pressure relief valves for water distribution networks require further refined control (Prescott and Ulanicki 2008).

To manage unsteady flow in heterogeneous pipe network systems, in the context of a linearized pressure response, the impedance matrix solution scheme (Kim 2007) was further developed for pipe networks with multiple reservoirs and control valves. Several impedance matrix approaches have been developed for transient analysis and abnormality detection; however, the control of hydraulic transients has not yet been explored (Kim 2008). In this study, the platform of the impedance matrix is further developed into a control-oriented impedance matrix (COIM), for controlling the valve maneuver.

Transient control through adaptive valve maneuver in a pipeline system can be achieved via the following procedures. First, the principle of superposition is employed to consider multiple valve maneuvers for the delineation of combined pressure responses at any designated point in the pipe network. The simulation results of the developed method are compared with the MOC computations for a hypothetical pipe network. The application example presented in this paper demonstrates that the COIM method is capable of pressure signal decomposition, depending on the source of the generated water hammer. Second, a metaheuristic optimization algorithm, PSO, is integrated into the COIM solver to objectively delineate the best valve maneuver trajectory and thus achieve a specific pressure control. The impact of a contemporary valve maneuver on extending the future time steps of the pressure response at a designated point can be resolved and its parameter determination procedure for an optimal control strategy can be employed, minimizing undesirable response oscillation. The flexibility of the COIM approach can be further highlighted through the analytical exploration of the pressure response for a point-wise description and the line integrals along the pipeline section and their various combinations, for the evaluation of pipeline vulnerability. Further real-time calculation tests and noise impact evaluations demonstrate the potential of COIM as a platform for supervisory control and data acquisition systems.

2 Materials and Methods

2.1 Control-Oriented Impedance Matrix Method

Transient analysis can be performed based on the assumption of steady oscillatory flow with linearized friction to obtain the momentum and continuity equations (Suo and Wylie 1989). The relationship between the upstream and downstream head discharge points, as a function of distance, x, can be expressed in terms of the impedance and complex discharge ratio:

$$ - cosh\gamma l\cdotp {H}_U/{Q}_r+{Z}_c sinh\gamma l\cdotp {Q}_U/{Q}_r+{H}_D/{Q}_r=0 $$
(1)
$$ sinh\gamma l/{Z}_c\cdotp {H}_U/{Q}_r- cosh\gamma l\cdotp {Q}_U/{Q}_r+{Q}_D/{Q}_r=0, $$
(2)

where subscripts U and D denote the upstream and downstream sections, respectively, l is the pipeline length, Qr is the reference discharge at a designated point, \( \upgamma =\sqrt{Cs^{\prime}\left(L{s}^{\prime }+R\right)} \) is the propagation constant, and Zc = γ/Cs′ is the characteristic impedance. The complex frequency is, s = σ + iω, where the capacitance (C) is gA/a2, inertance (L) is 1/gA, σ is a decay factor, ω is the frequency, and R is the resistance (Wylie and Streeter 1993).

By implementing the common head condition and continuity condition in the junction of a pipe network, the impedance matrix can be formulated to solve problems with a considerable number of pipeline elements (Kim 2007). To control the outgoing flow direction of the elemental address, in addition to the incoming flow direction, to allocate an address for both the impedance and complex discharge ratio, the address generation for the impedance matrix composition is reformulated. The foregoing is regarded as an enhanced generalization for determining the COIM address. This new address-assigning scheme enables the feasible incorporation of various boundary conditions (such as additional reservoirs, dead-end pipeline components, or fixed nodal demands) into the impedance matrix.

Therefore, the impedance matrix structure is reformulated as a linearized expression for the feasible implementation of the control boundary. With the new address-assigning scheme, one or more rows can be added to the last row of the impedance matrix. In Eq. (3), the component ∅ of the last added row or rows can be either 0 or 1, depending on the predetermined boundary conditions given for each control combination. The role of the last added row (either one or more) in the impedance matrix is to enforce various boundary conditions, such as the reservoir, the dead end conditions either at the end of the pipeline or intersection, or designated flow rate demand in the evaluation of the COIM, which can be represented as follows:

$$ \left[\begin{array}{ccc}\begin{array}{ccc}{Z}_C\mathit{\sinh}{\gamma}_i{l}_i& 1& 0\\ {}-\mathit{\cosh}{\gamma}_i{l}_i& 0& 1\\ {}0& 0& 1\end{array}& \begin{array}{ccc}.& .& .\\ {}.& .& .\\ {}.& .& .\end{array}& \begin{array}{ccc}.& .& .\\ {}.& .& .\\ {}.& .& .\end{array}\\ {}\begin{array}{ccc}0& -\mathit{\cosh}{\gamma}_j{l}_j& 0\\ {}.& \mathit{\sinh}{\gamma}_i{l}_i/{Z}_C& 0\\ {}.& .& .\end{array}& \begin{array}{ccc}{Z}_C\mathit{\sinh}{\gamma}_j{l}_j& 1& 0\\ {}-\mathit{\cosh}{\gamma}_j{l}_j& 0& 1\\ {}.& .& .\end{array}& \begin{array}{ccc}.& .& .\\ {}.& .& .\\ {}.& .& .\end{array}\\ {}\begin{array}{ccc}.& .& .\\ {}.& .& .\\ {}\begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}\end{array}& \begin{array}{ccc}.& .& .\\ {}.& .& -\mathit{\cosh}{\gamma}_x{l}_x\\ {}\begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{c}\mathit{\sinh}{\gamma}_x{l}_x/{Z}_C\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{ccc}.& .& .\\ {}.& 1& 0\\ {}\begin{array}{c}.\\ {}\begin{array}{c}.\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}& \begin{array}{c}0\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}& \begin{array}{c}1\\ {}\begin{array}{c}\varnothing \\ {}\varnothing \end{array}\end{array}\end{array}\end{array}\right]\cdotp \left[\begin{array}{c}\begin{array}{c}{H}_i/{Q}_r\\ {}{Q}_i/{Q}_r\\ {}{Q}_r/{Q}_r\end{array}\\ {}\begin{array}{c}{H}_j/{Q}_r\\ {}{Q}_j/{Q}_r\\ {}\begin{array}{c}.\\ {}.\end{array}\end{array}\\ {}\begin{array}{c}\begin{array}{c}.\\ {}.\end{array}\\ {}{H}_{cr}/{Q}_r\\ {}{Q}_{cr}/{Q}_r\end{array}\end{array}\right]=\left[\begin{array}{c}\begin{array}{c}0\\ {}0\\ {}1\end{array}\\ {}\begin{array}{c}0\\ {}0\\ {}\begin{array}{c}\begin{array}{c}.\\ {}.\end{array}\\ {}.\end{array}\end{array}\\ {}\begin{array}{c}.\\ {}0\\ {}\begin{array}{c}0\\ {}0\end{array}\end{array}\end{array}\right], $$
(3)

where the subscript cr represents the control boundary condition. In reality, the control variables (for example, Hcr and Qcr) are not always the last components of the solution vector, but may be any nodal point where the control device is located. If the number of controls in the pipe network is nc, then the number of added rows for enforcing the boundary condition is nc − 1.

To solve the COIM, a lower-upper decomposition matrix solver for complex linear systems is implemented. If one or more solution vectors are obtained, the impedance or complex discharge ratio in the pipe network can be calculated by simply dividing the two solution vectors.

The pressure response function for the ith control, rhx, i(t) (i is an identifier of a specific control), can be obtained by applying the Fourier transform to the delineated impedance from the solution vector, as follows:

$$ {r}_{hx,i}(t)=\frac{1}{\pi}\cdotp \mathit{\operatorname{Re}}\left[{\int}_0^{\infty }{\left(\frac{H_x}{Q_{cr}}\right)}_i{e}^{i\omega t} d\omega \right], $$
(4)

where Re denotes the “real part,” superscript i is an imaginary number, ω is the frequency, and subscript x represents a designated point.

If the control impulse is a pressure head, then the pressure response function can be expressed as follows:

$$ {r}_{hx,i}(t)=\frac{1}{\pi}\cdotp \mathit{\operatorname{Re}}\left[{\int}_0^{\infty }{\left(\frac{H_x}{H_{cr}}\right)}_i{e}^{i\omega t} d\omega \right]. $$
(5)

If there are multiple transient drivers, the time series of the pressure head or discharge at a designated point can be obtained through the summation of convolutions between the discharge or pressure head impulse from multiple controls and the corresponding pressure response functions, as follows:

$$ \Delta {h}_x(t)={\sum}_{i=1}^{nc}{\int}_0^t{r}_{hx,i}\left(t-\tau^{\prime}\right)\left(\Delta h{\left({\tau}^{\prime}\right)}_i or\Delta q{\left({\tau}^{\prime}\right)}_i\right) d\tau^{\prime }, $$
(6)

where ∆h(τ′)i and ∆q(τ′)i are the pressure head and discharge impulse yielded by a specific control, respectively, and τ′ is a dummy variable for the convolution integral.

2.2 Transient Control through Alternative Transient Generation

If a transient introduces one of the control boundaries in a pipe network, the other controls (e.g., the end control valve) can also serve as a transient source. Assuming that an abrupt pressure change at a point can be predicted or measured by a pressure sensor or forward transient analysis, transient mitigation for this point can be achieved from another control boundary with a certain travel time between them. This travel time, tpath, can be estimated as follows:

$$ {t}_{path}={\sum}_{j=1}^{cn}\frac{l_j}{a_j}, $$
(7)

where cn is the number of connecting elements between two points, lj is the length of each pipeline element, and aj is the wave propagation speed for each pipeline element.

If the time interval of the convolution integral in Eq. (6) is ∆t, then the number of marching time steps, namely, the integer of backward (IBACK), for an alternative transient from another control is the integer of tpath/∆t plus 1. This indicates the time lag between the alternative control and pressure at a designated point.

The initiation time of the transient control (ti) differs from that of the transient introduction. Moreover, the combined pressure head response, ∆hx, com(t), between the original and alternative transients can be expressed as follows:

$$ \Delta {h}_{x, com}(t)={\int}_o^t{r}_{hx,t}\left(t-\tau^{\prime}\right)\Delta {q}_t\left(\tau^{\prime}\right) d\tau^{\prime }+{\int}_{t_{ic}}^t{r}_{hx,c}\left(t-\tau \right)\Delta {q}_c\left(\tau^{\prime}\right) d\tau^{\prime }, $$
(8)

where rhx, t is the pressure head response function of the original transient, rhx, c is the pressure head response function of an alternative control transient, and ∆qt and ∆qc are the discharge impulse responses of the original and control transients, respectively. The initiation control time can be defined as tic = tc − tpath, where tc is the time required for the transient control recognition at a designated point. Transient control recognition depends on a predefined level of pressure management or the available option of neutralizing the transient from another control. In this study, the inverted pressure signal phase is adopted for control recognition as the basis for cancelling the transient.

2.3 Flexible Pressure Head Representation in a Pipe Network

The pressure head response at any nodal point (e.g., junction or boundary point) can be estimated from the solution vector of Eq. (3), and an arbitrary point within each pipeline element can be calculated as follows:

$$ \frac{H_x}{Q_r}=\frac{H_{dn}}{Q_r}\mathit{\cosh}{\gamma}_{el}x+\frac{Q_{dn, el}}{Q_r}{Z}_c\mathit{\sinh}{\gamma}_{el}x, $$
(9)

where Hdn/Qr is the hydraulic impedance downstream of the pipeline element; Qdn, el/Qr is the complex head ratio at a downstream node for a specific pipeline element el, x is the distance from the downstream node to an arbitrary point, and subscripts dn and el represent the downstream node and corresponding element, respectively.

The accumulated pressure in a designated section can be integrated through point estimation for an arbitrary point (for example, Eq. (9)) as follows:

$$ \frac{H_{dn}}{Q_r{\gamma}_{el}}\left(\mathit{\sinh}{\gamma}_{el}{x}_2-\mathit{\sinh}{\gamma}_{el}{x}_1\right)+\frac{Q_{dn, el}}{Q_r{\gamma}_{el}}{Z}_c\left(\mathit{\cosh}{\gamma}_{el}{x}_2-\mathit{\sin}{\gamma}_{el}{x}_1\right), $$
(10)

where x2 and x1 are the distances to the ends of a designated section from the downstream node (x2 > x1).

If Eq. (10) is multiplied by the internal circumference of the corresponding pipeline element, the total force caused by the transient can be precisely estimated for the designated section. This is feasible as the COIM approach describes the spatial variation in the pressure head response through an analytical expression.

If multiple points and sections in the pipeline system are vulnerable, a generalized pressure head evaluation can be expressed as follows:

$$ {\sum}_{i=1}^{np}{w}_i\left(\frac{H_{dn,i}}{Q_r}\mathit{\cosh}{\gamma}_{el,i}{x}_i+\frac{Q_{dn, el,i}}{Q_r}{Z}_c\mathit{\sinh}{\gamma}_{el,i}{x}_i\right)+{w}_i\left\{\frac{H_{dn,i}}{Q_r{\gamma}_{el},i}\left(\mathit{\sinh}{\gamma}_{el,i}{x}_{2,i}-\mathit{\sinh}{\gamma}_{el,i}{x}_{1,i}\right)+\frac{Q_{dn, el}}{Q_r{\gamma}_{el,i}}{Z}_c\left(\mathit{\cosh}{\gamma}_{el,i}{x}_{2,i}-\mathit{\sin}{\gamma}_{el,i}{x}_{1,i}\right)\right\}/\left({x}_{2,i}-{x}_{i,i}\right), $$
(11)

where np is the number of points and sections to be considered, subscript i represents the corresponding point or section, and wi is a weighting factor that depends on the importance of a point or section, for example, \( {\sum}_{i=1}^{np}{w}_i=1 \).

2.4 Valve Maneuver for Current and Future Pressure Responses

The impact of the valve maneuver on the present time step, i.e., τ(t), influences the pressure response at a corresponding time step and also partially affects the pressure response of the future time steps. In other words, the determination of the optimal dτ (Fig. 1) at a contemporary time step (t) depends not only on the convolution integral of Eq. (8) but also on the convolution from future time steps (except for the impact of one or more future τ operations on a specific future time), as expressed by

$$ {\displaystyle \begin{array}{c}\sum \limits_{k=0}^{nt}\left\{\Delta {h}_{x, com}\left(t+k\Delta t\right)\right\}=\sum \limits_{k=0}^{nt}\Big\{{\int}_o^{t+k\Delta t}{r}_{hx,t}\left(t-{\tau}^{\prime}\right)\Delta {q}_{t,0}\left({\tau}^{\prime}\right)d{\tau}^{\prime}\\ {}+{\int}_{t_{ic}}^{t+k\Delta t}{r}_{hx,c}\left(t-\tau \right)\Delta {q}_{c, ic}\left(\tau^{\prime}\right) d\tau^{\prime}\end{array}}, $$
(12)

where subscript k is the iterative future time step; nt is the number of future time steps to be considered; and ∆qt, 0 and ∆qc, ic are the discharge impulses of the valve maneuver for the current time step and corresponding control valve time step obtained through optimization, respectively. Eq. (12) calculates the impact of the contemporary dτ at the current step and those of several succeeding time steps (nt) that provide a wider temporal window for the evaluation of the optimal valve control to achieve a specific objective.

Fig. 1
figure 1

Integration of PSO scheme into convolution integral to identify the optimal valve maneuver

2.5 PSO Integration for Optimal Valve Maneuver

The valve trajectory can be determined by updating dτ and adding it to the previous τ, indicating that dτ optimization for each time step is important for transient control. Considering the highly nonlinear and extremely complicated pressure response feature of pipe network systems, a widely used metaheuristic engine, PSO, is incorporated into the proposed method. Figure 1 illustrates the flowchart of PSO incorporation tasks for the delineation of the optimal dτ to maximize the transient neutralization potential for the current computation step and for future impacts. As illustrated in Fig. 1, the performance of the candidate dτ can be verified using various criteria, depending on the objective function, which may be formulated differently. Depending on the purpose and pipeline features, the transient control objective function may be the generation of most appropriate counter measuring pressure; thereby reducing the maximum pressure or relaxing the minimum pressure to prevent cavity generation.

2.6 Transient Simulation and Control Task Procedure

Figure 2 illustrates a holistic flowchart for transient simulation and its control through alternative transient generation. The address, row, and column for the nonzero matrix elements and COIM are generated from pipe network information, including the number of connecting elements for each junction and the flow direction of each connecting element. For all COIM combinations, the generated addresses for all pipeline elements are identical. All solutions can be derived for all combinations of impedance matrixes (nc), which can be obtained by utilizing a solver developed for complex matrixes. Various pressure response functions can be represented from the generalized pressure head evaluation of Eq. (11); thereafter, the pressure response of the original transient can be calculated. Using Eq. (7) and the designated control criterion, appropriate scheduling for alternative transient control can be arranged. Based on a specific objective function, the PSO integration scheme for convolution evaluation provides the time series of the best alternative valve maneuver for transient mitigation. Superimposing the original and alternative transients from the optimized valve trajectory provides a controlled pressure response to a specific part of the pipeline.

Fig. 2
figure 2

Flowchart of transient simulation and optimization of alternative transient generation for transient control; the gray box represents Fig. 1

3 Results

3.1 Sample Pipe Network

A hypothetical heterogeneous pipe network, i.e., an extended pipe network of [25] with 13 pipeline elements, 10 nodal points, 3 reservoirs, and 2 downstream control valves, is assumed, as shown in Fig. 3. The connectivity information of pipeline elements (e.g., upstream and downstream nodes), dimensions of each element (e.g., internal diameter, pipe length, and Darcy–Weisbach friction factor), and properties (e.g., material and elastic modulus) are summarized in Table 1. The water in the pipeline system flows from a constant head supply reservoir (40 m) to two downstream reservoirs with lower constant heads. A transient is assumed to be introduced by an instant valve closure located at nodal point 9 at the downstream reservoir. Based on the generated address for the COIM, two sets of 35 × 35 impedance matrixes can be formulated for the control conditions at nodes 9 and 10.

Fig. 3
figure 3

Hypothetical heterogeneous pipe network with three reservoirs and two control valves

Table 1 Parameters for the hypothetical pipenetwork in Fig. 3

3.2 Forward Transient Analysis by Superimposition of Distinct Valve Control

To perform a forward transient analysis on the MOC platform, further division of the 13 pipeline elements is necessary to satisfy the Courant number criterion. The pipe network shown in Fig. 3 can be further divided into 898 elements and 895 nodal points to satisfy the Courant number (0.939), making the computational time step 0.00067 s. The pressure heads of the two downstream reservoirs were set to 39.8 m, which was determined to check the impact of the transient, even for an extremely small surge. Transients are generated by multiple valve closures at nodes 9 and 10 with different valve maneuvers, as shown in Fig. 3. The relative opening (τ) of the downstream valve is changed from 1 to 0.1 in 0.5 s and from 1 to 0.2 in 1.0 s, for nodes 9 and 10, respectively. The pressure variation within 2 s was calculated, and that at node 3 was recorded for comparison.

Based on the generated address for the COIM, two sets of impedance matrixes can be formulated for two independent control conditions at nodes 9 and 10. This indicates two different response functions: rh3, 9(ω) and rh3, 10(ω). The first subscript, h3, denotes the pressure head at node 3; the other subscripts, that is, 9 and 10, pertain to control nodes 9 and 10, respectively. To evaluate the frequency response, the maximum frequency (Ωmax) was set to 290 rad/s. To transform the above functions into time domain response functions, the number of fast Fourier transforms was set to 8192. Two distinct valve maneuvers were also applied to the convolution integral to calculate the two pressure responses.

Figure 4 depicts the normalized pressure responses computed via the Joukowsky pressure equation at node 3. The pressure given by the impedance matrixes for node 3 (IM3) was estimated by the superimposed responses generated by nodes 9 (IM3_9) and 10 (IM3_10). Figure 4 shows that the pressures given by the MOC and COIM are well matched. Unlike the MOC, the solutions obtained by the COIM provide the capability of decomposing the transient pressure head into multiple unique pressure signals associated with the generation source. Using a 1.51-GHz CPU (Intel(R) Core(TM) m3-6Y30), the computational costs of a 5 s long transient calculated by the MOC and COIM methods were 70.01 and 1.05 s, respectively.

Fig. 4
figure 4

Normalized pressure head responses at node 3 calculated by MOC (Nor. MOC3) and impedance matrix (IM3) consisting of different contributions from nodes 9 (IM3_9) and 10 (IM3_10)

3.3 Transient Mitigation Using Alternative Valve Control

Depending on the location in the pipe network, the phase and amplitude of the transient originating from node 9 varies and another transient from node 10 can either increase or decrease the resulting transient. To demonstrate the potential of the proposed method for surge mitigation, the constant reservoir pressure heads at nodes 9 and 10 are assumed to be 37.66 and 37.53 m, respectively. The downstream valve at node 9 is closed from τ = 1to τ = 0.2 for 0.4 s, and the corresponding transient at node 3 is calculated. The objective function for neutralizing the transient is the minimization of pressure variation at node 3 by controlling the downstream valve at node 10. The optimal trajectory for the valve at node 10 is obtained using the procedures shown in Figs. 1 and 2. Figure 5(a) presents the pressure head time series of node 3 from the initial and controlled transients from nodes 9 and 10, respectively. The transient mitigation can be initiated within 0.86 s as this is the first instance that a wave reflected from the upstream reservoir has a lower pressure than the steady pressure at node 3. The mitigation initiation time also indicates the control time for node 10. The high pressure generated by valve closure at node 10 is operated by the IBACK time step earlier than the first compensated transient. As shown in Fig. 5(a), the phase of the counteracting transient is approximately the inverse of the initial transient phase. However, their amplitudes do not perfectly match to eliminate the initial transient from node 3. This is because of differences in the pipe network layout and wave propagation patterns between nodes 9 and 10. In other words, the generated wave for transient compensation from other valves cannot be perfectly counteracted by the original transient. Figure 5(b) shows the valve trajectories at node 9 and optimized valve control at node 10. The valve behavior at node 10 exhibits minor oscillation with repeated closing and opening; this can be explained as a minor valve modulation to obtain the best possible inverted signal at node 3; this resulted from the instant metaheuristic optimization of complex wave responses from a pipe network with valve manipulation. The substantial mitigation of the combined pressure response at node 3 indicates that the optimized control of the alternative downstream valve can moderate the surge without hydraulic devices, such as surge tanks.

Fig. 5
figure 5

a Pressure head responses of node 3 caused by a partial valve closure (from τ = 1 to τ = 0.2) for 0.4 s at node 9, optimized valve control at node 10, and combined pressure signal; b) time series of relative valve opening at node 9 and controlled valve maneuver at node 10

The solution obtained by COIM also provides the pressure head response at any point inside the pipeline element. Eq. (9) can be employed to obtain the pressure response function for point A, which is located 20 m from node 7 along pipeline element 8.

The spatial distribution of pressure is important for optimal control; hence, the control objective can be continuous and comprehensive if transient control is implemented both for a point and an extensive section along the pipeline element. Eq. (10) can be used for the integration of the pressure response along the pipeline and the corresponding objective function can be formulated. The application of Eq. (10) to pipeline element 8 enables the evaluation of the total force variation for three transients. Figure 6(a) presents the time series of the total force (kN) for the identical initial transients of Fig. 5(b) and its control results. The variation in total force at pipeline element 8 tends to stabilize substantially after 2 s. The optimized valve control shown in Fig. 6(b) provides a trajectory with a smaller irregularity than those of point pressure controls, such as in Fig. 5(b). Compared to control for pressure at a point, the integrated pressure over the designated section addresses the average pressure for all points at element 8, resulting in less variation in optimized valve control.

Fig. 6
figure 6

a Total force for pipeline element 8 caused by a partial valve closure (from τ = 1 to τ = 0.2) for 0.4 s at node 9, optimized valve control at node 10, and combined total force; b time series of relative valve opening at node 9 and controlled valve maneuver at node 10

Multiple objectives in pressure responses can also be considered in transient control using Eq. (11). The sections and points in the pipe network can be incorporated into the objective function. Generally speaking, the pattern of optimized valves for multiple objectives may not be completely suitable for any section or point because of the differences in travel times and pressure paths with distinct phases (not shown). However, it is apparent that the valve control’s counteraction can relax the surge, even with this multi-objective-based approach.

4 Discussion

4.1 Parameter Determination

The successful control afforded by the alternative valve depends on the proper determination of a few important parameters. The maximum or minimum allowable position, such as the relative opening of the valve (∆τ in Fig. 1), is a sensitive parameter in the optimization. If the parameter ∆τ is greater than a certain threshold, the optimization scheme tends to overshoot τ(t). This will cause unstable behavior for future τ operations, as well as introduce severe vibrations as a response to the pressure; otherwise, a small ∆τ cannot generate sufficient control to mitigate the surge. The optimal ∆τ depends not only on the computation time step (∆t) determined by parameter Ωmax but also on the pipe network layout (e.g., complexity, extension, and wave speed). Therefore, a heuristic approach is necessary for a pipe network with a specific maximum frequency. In this study, ∆τ is determined to be 0.01 by an iterative loop of the proposed scheme to obtain the optimal objective function. Another important parameter, nt, is used to evaluate the current valve impact on future pressure variations. The primary function of this parameter is to reduce the pressure oscillation caused by a large ∆τ; this is because the consideration of future pressure impacts provides a wider temporal window to access the valve’s influence on the pressure response. However, if the parameter nt is large, the impact of the existing valve control tends to be underestimated and the potential for achieving immediate surge mitigation can be reduced. Similar to parameter ∆τ, the optimal parameter, nt, also depends on ∆t and various pipe network features. In this study, parameter nt is determined as 5 via an iteration-based heuristic approach.

4.2 COIM Strengths

One primary strength of COIM is that the principle of superposition is applicable to both transient flow analysis and control. The system response linearization based on each controller results in the decomposition of pressure signals for the independent control of a complex pipe network. Simple and effective implementation of the COIM scheme allows either pressure or flow to be the control driver. Among the different response functions, that between the controller and designated point is formulated to be basically independent, although they have a common driver and response timing.

Another notable strength of COIM is its distinctive role in the computational procedure between the solution and formulation of the response function, as shown in Fig. 2. Once the solution vector of COIM is obtained, no further consideration is required for the network solution and the response function can be formulated depending on the operator’s preference. In other words, the procedure starting from the beginning to the end of the COIM solution, as shown in Fig. 2, can be separated and preprocessed for storage (e.g., a binary format) to save on computational cost. The foregoing can be useful in the implementation of a centralized control system.

The computational cost of the 5 s hypothetical pipe network control example is less than 5 s (4.95 s) using a 1.51-GHz CPU (Intel(R) Core(TM) m3-6Y30). This low computational cost can be achieved under a parameter condition with 10 population sizes and 10 generations. The dimensions or layout of a pipe network are independent of the valve operation optimization. This procedure can be separated, precomputed, and acquired as a preprocess. This implies that the proposed COIM control structure has a strong potential for real-time control of transients in pipe network systems.

The proposed scheme also has the advantage of flexibility in the response function formulation, as described in Eqs. (9)–(11). Unlike discretized approaches, such as the MOC, the analytical expression of COIM of an independent spatial variable (x) enables the precise identification and integration (in the spatial context) of pressure head responses. This affords substantial flexibility in the composition of objective functions, including those for multi-objective optimization. This capability is among the unique features of the COIM approach.

4.3 Robustness of COIM against Pressure Sensor Noise

Another advantage of COIM is its robustness in withstanding sensor noise. The boundary condition for transient introduction via a valve closing may not be completely accurate because of the nonlinear and unique relationship between the relative valve opening and discharge impulse for each setup. Overcoming the problems encountered in flow rate measurement with high temporal resolution (e.g., >100 Hz) is difficult, and error bounds using commercially available instruments for the accurate implementation of discharge impulse seem undesirable. Accordingly, the pressure head impulse equation (Eq. (6)) is employed by installing a pressure transducer in the downstream valve location. It is observed that the results of the forward transient analysis and transient control between the discharge impulse and pressure head impulse do not vary. To further verify the robustness of the proposed technique, the error bounds (±0.1%) of commercially available pressure transducers and uniformly randomized numbers (±0.1%) were considered. It is assumed that these are included in the pressure impulse of the original transient and convoluted response of pressure heads to represent the impact of noise on pressure head measurement. It was found that there were negligible differences in the transient and optimized valve control results between noise-free and noise-added signals, indicating the robustness of the proposed method in overcoming noise in real systems.

5 Conclusion

The use of flow control valves for water hammer mitigation has not been investigated because such a strategy does not require surge arresting devices, and the signal canceling technique has not yet been employed to manage pressure in a pipe network system. Herein, a control-oriented impedance matrix is developed to obtain a transient relaxation method by controlling the valve without traditional surge arresting devices. The applicability of the superposition principle for multiple linearized solutions provides substantial flexibility in determining the counteracting transient for any specific objective function, based on the vulnerability of the system. The optimal control of other downstream valves can be obtained by incorporating a metaheuristic engine into various solutions of the control-oriented impedance matrix. The proposed method is found to be feasible for real-time calculations and is observed to be robust in successfully overcoming the pressure in impulse operations with sensor noise. This indicates that the proposed control method, which is based on several response function formulations, can serve as a suitable platform for designing the supervisory control and data acquisition system of pipe network systems.

In future research, existing hydraulic structures (e.g., pump and various inline valves) and their optimal control will be investigated in depth. Experimental validations on a pilot-scale level and field pipe networks are also identified as important future research subjects.