Description - PumpPidStag

Overview

The PumpPidStag function block consists of a PID control function and a stage / destage function to execute the following main tasks:

oGenerating a PID control value with the PID control function. This value is used for the speed reference for the VSDs.

oGenerating a pump stage value with the stage function. The stage value indicates the demand of the number of pumps that is needed to maintain a constant pressure in a water distribution network. The stage value calculation is based either on pressure values (pressure, pressure setpoint influenced by other functions) or on the flow in the network. Both stage solutions use the control value as a speed reference for the VSDs.

PID Control Function

The PID control function of the PumpPidStag function block is used to generate a control value. This value is used for the speed reference for the VSDs and the stage function.

To achieve this, the PID control function of the PumpPidStag function block executes the following tasks:

oGenerates a control PID control value in the range of 0...100% with the PID control function. This value is used for the speed reference for the VSDs.

oLimits the integral (I) part of the control as follows:

Imax = 100% – P (proportional) part value if P = positive.

This limitation of the PID control value leads to a saturation and helps to avoid long reaction times.

oLimits the I-part incremental to maximal increment = stPidInit.rMaxErrForInt. If the calculated increment is greater than stPidInit.rMaxErrForInt, then the value configured for this parameter is used as the incremental value for the I-part calculation. This function helps to limit the gradient of the I curve.

oDefines a dead band value for the error value e to help to reduce the frequency of switching the VSDs and thus to help limit wear. The dead band value reduces oscillation of the control value that is caused by disturbances of the discharge pressure. Oscillation of the control value by reaching a limit leads to superfluous switching actions.

oAccepts a setpoint that has been entered manually (with the input variable i_rManSp) if the PID control function is running in manual operating mode (stOpMode.xPidMan = TRUE (1)). This allows you to run the system with a high pressure in an exceptional situation, for example, to extinguish a fire.

oVerifies specific initialization data.

oSwitches off the derivative part (D) if the PID control function is running in manual operating mode (stOpMode.xPidMan = TRUE (1)).

oReinitializes the output and process variables to the default values if a reset is executed.

oReinitializes the I part of the PID if a stop command is executed.

oGenerates status bits (reporting the status) for the different modes and status situations.

Stage Function (Based on Pressure)

The stage function based on the control value is enabled by setting the input pin i_esiStag to the constant value esiStag.Stage.

This function calculates the number of pumps that is needed to maintain a constant pressure in the water distribution network based on the PID control value and a two-level control function (hysteresis-function). When the PID control value exceeds a limit, the stage value is increased or decreased.

The number of pumps is increased or decreased sequentially by using delay timers to avoid a high switching frequency and to allow the requested operation to be executed before the next operation is requested.

The delay principle works if one or more pumps are running and the PID parameters are adjusted correctly. However, up to the starting point of the first pump, the system has a delay, which can cause a fall below the pressure value under the tolerance range. To help avoid that, the function starts the first pump (stage value = 1) with the help of a deviation limit in percent (%). If the pressure value falls below this limit, the first pump is started (the stage value is set to the value 1).

Increase / decrease demand limits:

Stage limits for the control value of the PID controller

Limit

Description

stStagInit.rLimStagPlus

plus stage limit (0...100%)

stStagInit.rLimStagMnus

minus stage limit (0...100%)

The detection of the limit undershooting of the PID control value which is used to switch-off the last running pump is done by a dedicated PID control limit. This value should be lower than the stage minus limit value.

Limit

Description

stStagInitC1.rLimPump1SwcOff

control value limit pump 1 switch-off

As soon as the control value is beyond outside of these limits, the respective delay time is started. This delay time has to elapse before a switching process is executed. No switching processes are executed if the control value is between the 2 limit values (principle of a two-level PID controller).

Increase / decrease demand limits:

G-SE-0046884.1.gif-high.gif

 

1   limit for decreasing stage value, if stage value = 1 (stStagInit.rLimPump1SwcOff)

2   limit for decreasing stage value, if stage value > 1 (stStagInit.rLimStagMnus)

3   limit for increasing stage value (stStagInit.rLimStagPlus)

This principle allows running the pumps in an energy efficient speed range (working range).

Exceeding the increase demand limit:

The switch-on delay timer (stStagInit.tDlyStagPlus) is started as soon as the control value exceeds the plus stage limit (stStagInit.rLimStagPlus).

After the switch-on delay time has elapsed, the stage value is increased by 1 until the stStagInit.siStagPumpMax value is reached. With this switching procedure, the switch-on delay timer (stStagInit.tDlyStagPlus) is re-started if the PID control value still exceeds the plus stage limit (stStagInit.rLimStagPlus).

As soon as the PID control value falls below the plus stage limit (stStagInit.rLimStagPlus), the switch-on delay timer (stStagInit.tDlyStagPlus) executes a reset.

Increase demand limit exceeded

G-SE-0021204.1.gif-high.gif

 

1   start switch-on delay timer (stStagInit.tDlyStagPlus)

2   switch-on delay time elapsed and stage value increased by 1

3   reset switch-on delay timer (stStagInit.tDlyStagPlus)

Falling below the decrease demand limit:

The switch-off delay timer (stStagInit.tDlyStagMnus) is started as soon as the PID control value falls below the minus stage limit (stStagInit.rLimStagMnus).

After the switch-off delay time has elapsed, the stage value is decreased by 1 until the value reaches zero. With this switching procedure, the switch-off delay timer (stStagInit.tDlyStagMnus) is re-started, if the PID control value is still inferior to the following minus stage limits:

ostStagInit.rLimStagMnus and the stage value is > 1 or

ostStagInit.rLimPump1SwcOff and the stage value is 1

As soon as the PID control value exceeds the minus stage limit (stStagInit.rLimStagMnus, respectively stStagInit.rLimPump1SwcOff), the switch-off delay timer executes a reset.

Decrease demand limit undershot

G-SE-0021201.1.gif-high.gif

 

1   start switch-off delay timer (stStagInit.tDlyStagMnus)

2   switch-off delay time elapsed and stage value decreased by 1

3   reset switch-off delay timer (stStagInit.tDlyStagMnus)

Extended Stage Function (Based on Flow and Pressure)

The extended stage function based on flow and pressure is enabled by setting the input pin i_esiStag to the constant esiStag.Flow.

NOTE: A flow meter is required in your system to use this function.

This function calculates the number of pumps that is needed to maintain a constant pressure in the water distribution network based on the PID control value and on the flow.

If the flow value becomes unavailable during operation, the application automatically activates the stage function using the calculated PID control value of the PID controller and the pressure value. In this case, the recording of the external value detects an error and the stage functions set a corresponding status flag (stPidStagSta.xEmgyStagMode), and the system continues operation.

Prerequisite

The flow value cannot be used to start the first pump. Due to this, the first pump is started if the PID control value exceeds the first pump switch-on limit (stFlowStagInit.rCtrlVal­Pump1OnLim). After a delay time has elapsed (stFlowStagInit.tDelTimeSwcOn), the first pump is started. As soon as the first pump is running, the extended stage function, based on flow, is available.

Starting the first pump

If the PID control value exceeds the limit defined with the parameter stFlowStagInit.rCtrlValPump1OnLim, then the delay time (stFlowStagInit.tDelTimeSwcOn) is started. After the delay time has elapsed, the first pump is started. With the start of the first pump, the flow value is rising.

The figure shows the switch-on condition for the first pump:

G-SE-0021202.1.gif-high.gif

 

1   PID control limit (stFlowStagInit.rCtrlValPump1OnLim) to start the first pump

2   switch-on delay time (stFlowStagInit.tDelTimeSwcOn)

3   start of the first pump

Switching the pumps according to the flow

If the extended stage function is active, the pumps are switched according to the flow limits defined for a maximum of 8 pumps. Since there is no delay time used in this procedure, the reaction times are greater than for the stage function based on pressure. This kind of staging immediately stops the pumps in case of a pipe-burst, except the last pump.

Staging / destaging according to the flow value:

G-SE-0046886.1.gif-high.gif

 

1   stage flow limit (stop) for a pump (here pump number 4)

2   stage flow limit (start) for a pump (here pump number 4)

3   maximum flow of one pump

4   maximum flow of two pumps

5   maximum flow of three pumps

Avoiding a deadlock by using the following principals

The speed of the running pump(s) must be reducible to a speed that is under the switch-off limit of the last pump to allow stopping the last fixed speed pump (FS pump), if FS pumps are used. Therefore, you must consider the minimum speed that is configured for the drive(s) to make sure that it is not greater than the switch-off limit.

Further, you need to have a minimum of 2 variable speed drives (VSDs) in the combination of variable speed pumps (VS pumps) and fixed speed pumps (FS pumps).

If the number of operational VSDs is reduced to under the 2 VSD minimum required by the stage flow method, the function DevSwcPumpCtrl sets the state of the output pin q_xFlowStagEn to FALSE. This pin is linked to the input pin i_xFlowStageEn of the PumpPidStage function. In this case, the stage function is switched to the method based on the pressure as opposed to the flow.

NOTE: Be sure that the stage function based upon pressure has been configured with the appropriate parameters to support this case.

Switching off the last pump:

Before switching off the last pump, there must be reserve pressure in the expansion tank to compensate for the delayed starting of the first pump when coming out of sleep mode. Therefore, it is not the simple matter of switching off the last pump when the flow value reaches a specific setpoint. When the flow reaches the lower limit, a new setpoint is calculated to create the required reserve pressure that is to be maintained by the auxiliary pump while in sleep mode. This new setpoint is the sum of the pressure reference value (i_rSp) plus a pressure increment that is configurable via stFlowStagInit.rPresIncPump1SwcOff. This new value is then used as the pressure lower limit for the purpose of switching off the last pump.

This incremental pressure value used to calculate the sleep mode pressure described above must be within the configured pressure limits of the auxiliary pump. A valid working value for the increment would correspond to the average of the limits of the auxiliary pump ((rPresAuxLimOn + rPresAuxLimOff) / 2).

In addition, once the sleep mode pressure has been reached, a switch off delay timer is started before the last running pump is switched off. The delay timer is used to maintain a minimum runtime of the pump and minimum time between sleep mode intervals.

Switching off the last pump:

G-SE-0046887.1.gif-high.gif

 

1   pressure for switching of the last pump (stFlowStagInit.rPresIncPump1SwcOff (2) + i_rSp (3))

2   configured pressure increment (stFlowStagInit.rPresIncPump1SwcOff (2))

3   pressure reference value (i_rSp)

4   switch-off demand based on flow for the last pump (stFlowStagInit.rMinFlowLimPump1Off)

5   sleep mode is executed

6   last pump is switched-off