Scada Configuration and Control Modes
Scada Configuration and Control Modes
SCADA CONFIGURATION AND CONTROL MODES IMPLEMENTATION ON AN EXPERIMENTAL WATER SUPPLY CANAL
M. Almeida *, J. Figueiredo+ & M. Rijo
NuHCC Universidade de vora, apartado 94, 7002-554 vora Fax: 351 266 711 189 http://canais.nuhcc.uevora.pt
*
miguelna@vizzavi.pt
+
jfig@uevora.pt rijo@uevora.pt
In real situations with the traditional management tools, an open-channel water conveyance and Water supply canal, Automatic Canal Control, delivery system is very difficult to manage, Control Modes, PLC and SCADA programming, especially if there is a demand-oriented operation Controllers Field Tests. [2]. Keywords
Abstract
In the last years, digital controllers became a very interesting alternative (low costs and higher accuracy) to the analogue or to the hydrodynamic traditional controllers in water supply canal automation, in order to match water supply to water demands. This kind of hydraulic systems needs particular research for control applications because they are big scale systems, open and characterized by big delays and great inertia. This paper presents several digital control modes tested in an experimental canal that will be used as a research platform on the automatic canal control domain. The canal operation and their control modes selection are supervised by a SCADA system developed and configured for this particular canal.
Remote monitoring and control systems are becoming more and more cost-effective water management tools due to the permanently cost reduction and higher accuracy of the dedicated equipment such as computers, software, controllers, remote terminal units, communication equipments and sensors. Nowadays, canal automation became a significant research area but, most of the research teams, usually only use numerical simulators, not having the possibility to test and verify the several mathematical approaches applied into prototypes or physical models. The paper presents several local control modes developed and installed in an experimental automatic water supply canal, used as physical model and that will support further studies on the field. These local control modes were developed to automatically operate gates and/or offtakes. These control modes are managed by the SCADA (Supervisory Control And Data Acquisition) software. The paper also presents the SCADA configuration developed for the canal supervision and monitoring (security alarms, sensors state and control modes selection).
1 Introduction
The main purpose of the automatic control of openchannel hydraulic systems, such as irrigation canals, is to optimize the water supply in order to match the expected or aleatory water demands at the offtakes level.
2 Brief description of the experimental At the beginning, at the middle and at the end of the four canal pools there are three water level facility
sensors (float and counter-weight type, Figure 1). 2.1 Automatic canal The NuHCC experimental automatic canal (Figure 1) has a total length of 141 m, with trapezium cross section. This shape allows measurements of little changes of canal water depths, due to its small section width. The control elements are four rectangular sluice gates, operated by servomotors, regularly distributed along the canal. The flow in the first three gates is orifice type and, in the fourth gate, is weir type (overshot gate). Associated to each gate is installed (at upstream) an orifice type offtake with a motorized butterfly valve, with 30 l/s as maximal flow, measured by an electromagnetic flowmeter. The canal operates as a closed-loop system. All the outflows are discharged in a traditional canal that turns to a reservoir. This reservoir has two pumps for pumping the water to a higher reservoir equipped with water level control1 : the water level is measured by an ultrasonic sensor and controlled by a PI algorithm. Each pump can operate, alternately, with a direct start (constant speed) or with a variable speed controller, allowing adjustments in frequency from 0 to 50 Hz. Six level floats were installed ins ide the reservoirs, two in the upper reservoir and four in the lower one. The sensors marked as black in Figure 1 were designed for critical water levels (actuate security alarms when there is a lack or excess of water). The additional floats give the discrete levels measurement. A MONOVAR valve controls the inflow to the automatic canal. This kind of particular valves, with its both fixed and slide plates, ensures a fine flow control. The stability of the water flow is ensured through a constant water level at the higher reservoir. The canal automation is managed by Programmable Logical Controllers (PLC) installed in electrical boards near the canal (Ai in Figure 1). Manual operation on each servo-actuator is also mechanically allowed.
All the experimental facility, including the main characteristics of the equipments, can be seen at the site http://canais.nuhcc.uevora.pt.
downstream to the gate. For this reason, it was The installed PLC network (Figure 2) consists of necessary to install the respective sensors in those five PLCs (one for each gate and the fifth to locals, and build up an algorithm that allows to control the pumps and reservoirs) These PLCs are change the controlled and measured variables. The linked to a master PLC with a modbus network. actuation variable remains the gate opening. All Each PLC has the memory and speed capacities for these variables are shown in Figure 3. hosting the several control programs. Its selection Gate is done by an HMI (Human Machine Interface) terminal or in the developed SCADA application.
Upstream Level Downstream Level
Reference
Figure 3: Control considered variables Figure 2: PLC network 2.3 SCADA connection The master PLC is linked to a server PC. In this PC is installed a SCADA application to control and supervise the automatic canal. This PC is simultaneously a server SCADA and an internet server, because the SCADA application is web enable [6]. Any process may be controlled by the Central Post because all the considered variables are available trough a modbus connection protocol. The outflow controller must be able to control the flow at each moment, but also the water volume delivered, in agreement to the offtake demand. 3.2 Control algorithms 3.2.1 Direct control of a gate/offtake The direct control is useful for a canal operation without automatic control. With this control the manager can act arbitrarily on the canal hardware (Figure 4). The security procedure also benefits from this control mode. When the water depths are too high, the generated alarm also turns the control mode to the direct control and opens both the gate and the offtake. Therefore, this is a control mode to perform an operation at any moment. OPEN STOP CLOSE Figure 4: Direct control button
Another control mode is the position setpoint. A gate or offtake position can be selected and the controller acts in order to achie ve the new position. 3.2.3 Upstream/downstream water depth control This control mode is usually connected with a PI controller (Figure 5): the PI calculates the control To control the upstream or downstream water depth action and the actuator ensures the desired position. near the gate, it was designed a reset anti-windup PI controller. The PI loop (Figure 7) calculates the Open gate opening to maintain the water depth reference Position PI through the difference between the setpoint and the Controller measured variable. Close Figure 5: PI and Position Actuator
PLC system
Configuring and Monitoring External Disturbances
measured a hysteresis of 0.5% and 5mm, respectively. This means that for errors smaller than 5 mm (for a gate) there are no operations.
The canal control has local control modes and/or Setpoint Error PI Control action distant control modes. The local ones are installed Process + Calculation on each PLC, and the distant ones are installed on measured variable the central PLC or PC. For a distant PI controller, the output will be the setpoint for the position Figure 7: PI loop controllers. In agreement with the Figure 6, the difference between actual position and reference position give us the error. If this error is higher than For the upstream controller, a positive error the hysteresis, the device (gate or offtake) opens, determines a gate closing; while a negative deviation will be accompanied by a gate opening. otherwise the device closes. For the downstream controller the behaviour is the opposite.
X reference
Hysteresis
Open
TOFF minimum
eX
Open
( X )
Hysteresis Close
X measured
Close ( T )
( X )
This PI controller is able to control the water depth in the presence of a new setpoint value or an external disturbance, as a new flow at the offtake. This PI is a real-time application supported by the canal hardware (see 2). The control action, y, is given by the equation [1]:
Figure 6: Position setpoint controller In both cases, there are time-out hardware requests to avoid consecutive starts without this minimum stop time, in order to protect the equipment from current peaks.
(1)
where e is the error, KP and KI the proportional and The hysteresis is a parameter that turns this integral gains, respectively. program stable. The controller only acts on the e X PI output device if the error is greater than the hysteresis (or h P I minus hysteresis): basically, its defined an error (K , K ) range in which no action will be executed. Without h hysteresis (reference = measured), the controller experimentally tested was unstable: the gate opens X > X ) AND (X < X ) and closes continuously.
h reference estimated measured P I est min est max
For the canal under study, with valves openings from 0 to 100% and gates from 0 to 800 mm, it was
Figure 8: PI design
The proportional gain is always active, but the integral action only acts when the estimated position is within the range xmin < xestimated < xmax (Figure 8). This procedure was proven experimentally and stands for stability: when the estimated position is out of the hardware requirements the integral action will be shut down.
systems for water supply can be accurately estimated, the setpoint controller only have to update its set-points on a regularly time base. The implemented controller is a bang-off-bang type (Figure 10).
Q reference
+
Hysteresis
Open TO F F
The Figure 9 presents the full algorithm for the ( Q ) minimum water depth control, upstream or downstream for Hysteresis Close Close Q measured the gates [3]. The calculated error is first passed ( Q ) ( T ) through a dead band filter. The output of the dead band will generate an input if the change in the error value is smaller than the band width. Figure 10: Flow controller algorithm for the offtake Additionally to the dead band filter, a second-order Similar to the position setpoint (see 3.2.2) also here filter is in place to eliminate measurement noise. a hysteresis block is considered. Accordingly a hysteresis value is selected which regulates the h e x x ~ Q Open ~ operation of the actuator. If the calculated error is PI Position - ( ) ( T ) Controller ( x , x ) h below the defined hysteresis value, no action will (K , K ) Close be taken. According to measurements, for a flow ( , ) (x > x ) AND (x < x ) variation from 0 to 30 l/s, a hysteresis of 0.5 is x suitable.
reference
h est est ref
eQ
Open
measured
min
max
x T
est
min
est
max
measured
Figure 9: Upstream/downstream control algorithm This PI gives an estimated flow which multiplied by the parameter Kx gives the new gate position. In order to ensure that a position out of the hardware range wont be transmitted to the position actuator, a saturation block filters the calculated new gate position. The position controller ensures that the estimated position will be applied to the gate. 3.2.4 Offtake flow control A water supply canal must guarantee a constant flow for the offtakes. This flow must be constant during each time period. In real cases, the users can demand different flows all over the day. So, its necessary to guarantee a dedicated automatic control. The controller should have two functionalities: to guarantee the execution of an aleatory operator setpoint or a schedule adjudication. The first one is similar to the previously described position setpoint (see 3.2.2) where a reference flow is chosen and the actuators operate in order to meet the selected valve. The second one can be easily implemented using the following strategy: knowing previously the hourly water needs which in this type of
The installed flowmeters have a time delay between the measured flow and its transmission to the PLC. This hardware feature from the flowmeters degenerate the system stability. To overcome this problem an additional control was introduced. The calculated error is filtered by two dead bands (Figure 11). If the error is greater than x2 (dead band 2) the response of the controller is direct: open or close the valve in agreement with the error. If error fits to dead band 1, no action will be done, and finally, if the error fits in the middle of both dead bands the action will be restricted by a timer (Figure 12). The valve opens (or closes) during T1 seconds and remains quiet T2 seconds, to guarantee the time-off, T2=Toff.
Open
( x2)
x ref
+
x2
Close
ex
( - x2) ( T2)
xmed
Open
( x1) ( ) x1
Close
( - x1)
( T1, T2)
With this adjustment, the response will be slower, i.e., the re-establishment of a new setpoint value for the flow will happen later. The greater stability achieved with this strategy largely compensates the time loss in the response.
Dead Band 2
+ x2
y = x - x, y = 0, y = x + x,
3.3.2 Second-order Filter Block This digital block filter is implemented between the sensor and the PI controller to reduce the measurement oscillations in the canal free water surface (Figure 14). This brings more stability to the controller because these oscillations mainly due to atmospheric conditions and gate opening, wont be sent directly to the PI controller.
x
- x1 - x2
Dead Band 2
Figure 12: Dead Bands for flow controller The parameter x1 is the higher possible error that the controller doesn't get to reduce. 3.3 Controllers programming The program structure implemented on this experimental water supply canal was a structured one. The standard programming language LADDER diagram defined according IEC 61131 was followed in the PLC programming task [4, 5]. This means that, after defining and implementing a PI block (with its mathematic equations) this same block can be used in another controller that also uses a PI control action. This is applicable for all algorithm components: dead band, saturation, filters
~ ~
Figure 14: Second-order filter For some cases, a second-order filter can be approximated by two serial fist-order filters, without accuracy losses [1]. A classic first-order filter is characterized by the equation
dy(t ) = a y (t ) + a x(t ) dt
(2)
where y is the output, x the input and a the inverse of the time constant . Transforming the Equation (2) in finite differences, Eq uation (3) is obtained. This equation shows that the output at each time 3.3.1 Dead Band Block moment y(t+t ) is dependent on the previous A dead band is characterized by a band width (x ) output y(t ). Thus, the PLC has to be able to store in which its output ( y) remains constant ( Figure the outputs from the previous time moment. 13). If the input (x ) is the water depth, and x=5 y(t + t ) = (1 a t ) y(t ) + a t x(t ) (3) mm, a variation less than 5 mm in the water depth doesnt lead to any change in the output value. A second-order system can also be implemented more easily using the z-transform [1]. y x 3.3.3 PI Block
( x )
The PI is the main component of the implemented algorithm (Figure 8). This block is responsible to re-establish and to maintain the reference value. The PI controller has two actions: Proportional and Integral.
Proportional Action Mathema tically, The output (y1 ) is related to the input (x ) by the proportional gain (KP): y = xmax, y = x, y = xmin , y1 = K P x (4) Usually, the input is an evaluated error and the output is the control action. Integral Action This action is a complement to the proportional action and is described by the equation 3.3.5 Time -Off Block
Figure 16 shows a particular Time-Off implementation with LADDER programming. When the device (gate or valve) stops negative trigger a 4s timer will be initiated. So, the action open or close will be delayed by this temporization.
y 2 (t ) = K I e(t ) dt
0
(5)
where y2 is the integral action output and KI the integral gain. Rewriting, with finite differences it is obtained Figure 16: Time-Off programming 3.3.6 Cycle stability All PLCs have a specific program cycle. This cycle time results from the delays generated by the several tasks performed by the PLC while controlling an industrial plant (to read inputs and internal programs, to perform calculations, to send outputs). Additionally this plant requires the data transmission between local sensors SCADA supervisor local controllers. The tests made on this experimental water supply canal showed a time cycle of about 50ms. Also the minimal time period required for the several control modes implemented on this experimental canal is 50ms. It corresponds to the maximal sampling frequency of 20 Hz, which ensures system stability,
y2 (t + t ) = y2 (t ) + t K I x(t )
(6)
Therefore, here is also necessary the availability of a store mechanism in the PLC to store the output of the last time period (see also 3.3.2). Finally, the output of a PI block ( Y) will be done by the equation Y = y1 + y2 3.3.4 Saturation Block (7)
A saturation block protects the plant equipment from too high control signals (Figure 15).The output actions are limited to a certain domain. For example, if the gate opening domain is between 0 4 Field Tests with SCADA and 800 millimetres, a calculated control action out of this range wont be transmitted to the gate The field tests were performed on the experimental actuator. water supply canal described in section 2. The controller parameters t ested were most developed in [3]. These parameters are shown in the Tables 1 y x and 3. The parameters shown in Table 2 were experimentally evaluated in this work. The PI gains ( x min, xm a x ) (KP and KI) are positive for downstream control and negative for upstream control, due to the need Figure 15: Saturation of opening or closing the gate with the same algorithm.
Position Controller Parameter Value Time Off Hysteresis 4s 0.5% 5 mm Annotation All engines 2 Valves Gates
700
600
500
Flow Controller
Gate Opening Setpoint
time (s)
Figure 17: Gate opening setpoint Figure 18 shows the experimental performance of the offtake setpoint flow controller. Its behaviour is similar to the gate position setpoint. In this case, it is proposed the outflow control. As it can be seen in the figure, the position of the valve was adjusted quickly to allow the new flow setpoint.
Valve Opening (%)
25 20 60 15 40 10 20 5 0 15:41:26 15:42:53 15:44:19 15:45:46
Table 2: Offtake flow control parameters PI controller Parameter t Tf KP KI Kx Value 5 mm 10 s 0.6 (l/s)/mm 0.006 (l/s2 )/mm 7.8 mm/(l/s)
80
0 15:40:00
Valve Opening
Outflow
Setpoint outflow
time (s)
Figure 18: Outflow setpoint The more sophisticated control mode that had been experimentally tested was the water depth management (Figure 19).
Water Depth & Gate Opening (mm)
25 20 15 10 5 0 15:29:00 0 15:34:46 15:40:31 15:46:17 15:52:02
Table 3: PI controller parameters Figure 17 presents the experimental performance of the gate position setpoint controller. The initial gate position was 800 mm. In the presence of a new position setpoint (500 mm) the gate closes until it reaches the new reference position. When this reference is reached, the gate remains in that position. The two straight lines referring both the gate opening and the setpoint value are very good matched, reflecting high accurate performance f or
2
600
400
200
Water Depth
Setpoint
Gate Opening
Outflow
time (s)
outflow (l/s)
800
30
Outflow (l/s)
100
30
With the parameters presented in the previous tables it can be seen that also this controller has a very good performance. When a flow perturbation occurs (by an offtake) the PI action calculates a new position for the gate. As it can be seen (Figure 19) the gate opening was very accurate and stable.
The main menu of the developed SCADA application is presented in Figure 20. This synoptic is a complete representation of the experimental canal, reflecting all inputs and outputs presented in the plant. Others synoptics were created to control and supervise the canal operation (see Figures 21, 22 e 23)
Figure 20: Main synoptic of the SCADA application. The experimental data was obtained by the SCADA application. This application, in addition to its monitoring capacity, stores all results in a hard disk PC data-base, allowing the exportation for other programs, such MS-Excel. The operator can do a simultaneous real-time chart analysis from several processes and view (or print) the data-base values inside the application with menus and synoptics.
6 Acknowledgements
The present studies were performed and partially financed by the Research Project INTERREG II-C, SIDReg-98.01.02.00002.
7 References
[1] N. S. Nise. Control Systems Engineering, John Wiley & Sons, (2000). [2] M. Rijo, SCADA of an Upstream Controlled Irrigation Canal System, In: A.J. Clemmens & S.S. Anderson (eds), Modernization of Irrigation Water Delivery Systems (Proc. Of the USCID Workshop, Phoenix), USCID, pp. 123-136, (1999). [3] M. Rijo et al. Experimental canal for irrigation water delivery and the study of control and operation strategies for the water save (in Portuguese), Final Technical Report of the Research Project INTERREG II-C, SIDReg98.01.02.00002, (2001). [4] TWinsoft 7.00 Getting Started, Techno Trade s.a. (2000). [5] WizPLC for Windows NT Users Guide, eMation Ltd (2000). Figure 23: Synoptic for offtake 1 management [6] Wizcon for Windows and Internet Users Guide, eMation Ltd., (2000)