You are on page 1of 36

Department of Electrical Engineering,

School of Science and Engineering,


Lahore University of Management Sciences, Pakistan

CANAL GATE AUTOMATION FOR


SMART WATER GRIDS
By
Student Name: Muhammad Usama

Roll No: 2012-10-0081

Student Name: Hassan Ilyas

Roll No: 2012-10-0041

Student Name: Ahmad Bilal Asghar

Roll No: 2012-10-0087

Student Name: Ahmed Khalid

Roll No: 2012-10-0082

A thesis submitted in partial fulfillment of the


requirements for the degree of
BS Electrical Engineering
School of Science and Engineering,
Lahore University of Management Sciences
Under the supervision of

Dr. Abubakr Muhammad


Designation: Assistant Professor
Email: Abubakr@lums.edu.pk
May, 2012

TABLE OF CONTENTS

List of Figuresii
List of Tables......iii
Acknowledgementsiv
Chapter 1: Problem Statement....05
Chapter 2: Back Ground and Related Work.. .06
2.1: Terminologies........ 06
2.1.1: Regulator..........07
2.1.2: Pool..........07
2.1.3: Upstream......08
2.1.4: Downstream08
2.2: Current Irrigation System....08
2.2.1: Current Monitoring System..08
2.3: Planned Improvements in Monitoring System...............09
2.3.1: Meetings With PMIU10
2.4: Theoretical Background...10
2.4.1: Distant Downstream Control10
2.4.2: Saint Venant Equations.11
Chapter 3: Design and Implementation.....13
3.1: Project Site .13
3.1.1: Features of the Canal..............13
3.1.2: Location.............13
3.2: Overall System Design............. 15
3.2.1: System..15
3.2.2: Actuator. ...............15
3.2.3: Controller16
3.2.4: Sensor..16
3.3: Gate Actuator Setup.............17
3.3.1: System Level Diagram..17
3.3.2: Motor.................18
3.3.3: Motor Driver.........20
3.3.4: Simulink Controller...20
3.3.5: Linear Potentiometric Encoder.21
3.3.6: Power Supply....22
3.4: Sensor Module23
3.4.1: System Level Diagram...23
3.4.2: Sensor Selection24
3.4.3: Communication Device Selection.26
3.4.4: Microcontroller27
Chapter 4: Results.........29
4.1: Working Actuator and Sensor Module.......................................................................29
i

Canal Gate Automation for Smart Water Grids


4.2: System Identification Experiments............................................................31
Chapter 5: Cost Analysis .33
Chapter 5: Further Work.......34
References35

Department of Electrical Engineering SSE, LUMS

ii

Canal Gate Automation for Smart Water Grids


LIST OF FIGURES

Number
Page
1. Terminologies...06
2. Head regulator of Khaira distributary of BRB canal .......07
3. Water level measurement gauge at project site09
4. Open channel flow in trapezoidal channel..11
5. Google earth image of project site..14
6. Basic feedback system topology..15
7. Overall system design.16
8. System level view of gate actuator setup..17
9. Normal and geared coupler.18
10. The motor assembly19
11. The motor driver.20
12. Linear potentiometric encoder.21
13. The power supply22
14. System level diagram of sensor module23
15. Ultrasonic sensor Max Sonar EZ125
16. SIM 900 Module..26
17. Sensor Module.28
18. Sensor module at the site..30
19. Sensor readings from system ID experiment.32

LIST OF TABLES
5.1 Cost Analysis.. .33

Department of Electrical Engineering SSE, LUMS

iii

Canal Gate Automation for Smart Water Grids


ACKNOWLEDGMENTS

The authors wish to express sincere appreciation to Dr. Abubakr Muhammad for his
supervision during the course of this thesis work and in the preparation of this manuscript.
Thanks also to Mr. Hasan Arshad Nasir for his valuable contribution to the theoretical aspect
of the project.

We would also like to express our gratitude to Mr. HabibUllah Bodla, Chief Monitoring
PMIU (Programme Monitoring & Implementation Unit) for his support and help regarding
the project site.

Department of Electrical Engineering SSE, LUMS

iv

Canal Gate Automation for Smart Water Grids

Chapter 1
PROBLEM STATEMENT
Pakistan has one of the largest irrigation systems in the world. Currently Pakistan's irrigation system
consists of a massive 90,000 km long network of canals.
Due to inefficient operation of the water networks in Pakistan, a large amount of irrigation water is
wasted, and adds to the shortage of water in the country. In this project, using cyber physical systems
and feedback control technique, we intend to implement the flow and level control of a canal which
will be more efficient and result in saving significant amount of water.
Many countries are in process of automating their irrigation system to save water and use it more
efficiently. Pakistan is also in a dire need of such a system which should not only save water but should
also be robust enough to work in the environment of Pakistan. In this project we intended to provide
gate automation and close the feedback loop to control the canal pools in a more efficient manner.
Once complete, the cyber physical system would be able to improve the current system on the
following lines.

Reduction of water spillage

Detection and localization of theft and leakage

Better flood management

Efficient monitoring

Canal Gate Automation for Smart Water Grids

Chapter 2
BACK GROUND AND RELATED WORK

2.1: TERMINOLOGIES
Some commonly used terminologies related to canals are given below. These terms will be
frequently used in this document.

Fig 1: Terminologies

Canal Gate Automation for Smart Water Grids

2.1.1: Regulator
Structure in a canal which is used to regulate the flow of water is called a regulator. It has gates
installed to control the water flow.

Fig 2: head regulator of Khaira ditributary of BRB canal

2.1.2: Pool
The water body between two consecutive canal regulators is called a pool.
7

Canal Gate Automation for Smart Water Grids

2.1.3: Upstream
Upstream refers to the side of canal towards the source or against the direction of water flow.

2.1.4: Downstream
Downstream refers to the side of canal away from the source or in the direction of water flow.

2.2: CURRENT IRRIGATION SYSTEM


The canals in Pakistan are currently operated manually. The water flow is managed using the local
upstream control method. The water level at the upstream of a canal regulator is maintained using the
gates at that regulator, and those water levels are kept according to a pre-specified schedule, which is
issued before every crop season. Hence, the canals flow at a fixed discharge independent of the
changing demands downstream, and results in mismanagement or loss of water.

2.2.1: Current Monitoring System


Moreover, the measurement and monitoring system is inaccurate and inefficient. All the water flows
are measured manually and once a day. This measurement is then transported to the local irrigation
office from where it is sent to the head office through internet. This measurement and monitoring
system is imprecise and unreliable, since the gauges are not maintained and calibrated properly.
This system also hinders efficient planning of water flow, especially in flood situations as readings
are taken only once a day and water levels can rise drastically during this period. So it is difficult to
predict such anomalies with this frequency of measurements.

Canal Gate Automation for Smart Water Grids


Water theft, spillage or dumping is also virtually undetectable due to slow and inefficient
measurement system. With the readings taken only at the ends of the pools and once a day, it is
impossible to localize the theft or spillage (both in time and in space).
Following is the picture of a gauge used to measure the water level in the Khaira distributary of
BRB canal. The image is taken from the actual project site.

Fig 3: water level measurement gauge at project site

2.3: PLANNED IMPROVEMENTS IN MONITORING SYSTEM


A department of Punjab government, Programme Monitoring & Implementation Unit (PMIU),
supervises the monitoring of water levels in canals. They are planning to automate the flow
measurement system. Therefore they are interested in knowing the ideal sensors, communication
protocols and power sources to use for the monitoring system. The project is in its initial stages.
9

Canal Gate Automation for Smart Water Grids


2.3.1: Meetings with PMIU
In order to acquire an actual canal site for the experimentation, we held meetings with Chief
Monitoring PMIU, Mr. HabibUllah Bodla. The agenda was to convince him to allow us to conduct
our experiments on an actual canal in or near Lahore. After just two meetings, we were allowed to do
our experiments on a canal which is a distributary of BRB canal. We had to provide PMIU with a
report about the monitoring system.
The time and dates of the meetings with PMIU are as under.
Meeting 1: October 15, 2011

12:30 pm 2:00 pm

Meeting 2: October 17, 2011

12:00 pm 3:00 pm

2.4: THEORETICAL BACKGROUND


The two commonly known strategies for the canal water flow control are
1. Local Upstream Control
2. Distant Downstream Control
The current technique used in Pakistan is local upstream control, whereas our project focuses on
distant downstream control.
2.4.1: Distant Downstream Control
In this technique, the water level downstream of a canal pool is controlled or maintained using the
upstream regulators. Since the level of water is maintained downstream that is usually 5 to 20
kilometers away from the regulator, this technique is implemented using feedback control. The water
level measured downstream is communicated to the regulator where control action is taken.
10

Canal Gate Automation for Smart Water Grids


2.4.2: Saint Venant Equations
Feedback control systems require the model of the system to be controlled. In our case, the system
is flowing water in a canal which is a complex and nonlinear system. The open channel flow is
modeled by Saint Venant equations which are given below

Q: the cross sectional flow magnitude


A: the cross sectional area of canal
x: the distance along the canal bed
g: Gravitational acceleration constant
So: canal bed slope
Sf: Frictional slope coefficient

Fig 4: Open channel flow in trapezoidal channel1

11

Canal Gate Automation for Smart Water Grids


These two nonlinear equations describe the conversion of mass and momentum of water thus
giving the open channel profile in time and space.
These equations can be linearized and used for controller design but we will be using system
identification to find the canal model and control it.
Dr. Abubakr Muhammad and Mr. Hasan Arshad Nasir have used these equations to simulate open
channel flow in their paper, Towards a Smart Water Grid for the Indus River Basin, 2011, LUMS SSE, EE
department.

12

Canal Gate Automation for Smart Water Grids

Chapter 3
DESIGN AND IMPLEMENTATION
3.1: PROJECT SITE
We were allocated a canal by PMIU (Programme Monitoring & Implementation Unit) to conduct
our experiments on. We designed and implemented our gate automation system on the head regulator
of that canal.

3.1.1: Features of the Canal


The said canal was a distributary of BRB canal, named as Khaira distributary. Some of its key
features are as under.
Length: 87000 feet (from head regulator to tail)
Average width: 10 feet
Average depth: 4 feet
Regular discharge from head gate: 87 cusecs
The canal has 3 minors branching from it. It is a perennial canal and irrigates all the villages near
DHA phases 6 to 8. The head regulator has two manually operated gates. We automated one of those
gates for our project.

3.1.2: Location
Khaira distributary is located near jallo Lahore. It branches off from BRB link canal just near the
head regulator of Lahore canal.

13

Canal Gate Automation for Smart Water Grids


The head regulator is about 30 kilometers away from LUMS campus which is almost half an hour
drive. The first downstream regulator is located 5 kilometers away from LUMS campus.

Fig 5: Google earth image of Project Site

14

Canal Gate Automation for Smart Water Grids


3.2: OVERALL SYSTEM DESIGN
To control a canal pool using distant downstream control efficiently, feedback control is to be
employed. So, the basic system diagram of the project will look like a typical feedback control system
topology.

Fig 6: basic feedback system topology

3.2.1: System
The system to be controlled in our case is a canal pool, to which the input is the gate height at the
head regulator and output is the water level downstream. It is a complex system, and the system
transfer function is to be extracted using system identification technique.

3.2.2: Actuator
The gates at the head regulator control the water flow in the pool. So they are used as the actuators.
We installed a motor at the gate to automate the gate control and therefore actuate the system. That
motor was connected to a computer to control the gate height..

15

Canal Gate Automation for Smart Water Grids


3.2.3: Controller
Since the motor used to control the gate height is controlled by a computer, so the same computer
can be used as a controller. Since water is a slow system comparatively, so we do not need high speed
controllers. Microcontrollers can also be used for this purpose. Since this project was to design the
basic feedback system infrastructure, we did not devise a control law for the control of canal pool.

3.2.4: Sensor
We used an ultrasonic sensor to sense the water level of the canal, and used a GSM module to
transmit the readings to the controller or head regulator.
So the overall design looks like the following

Fig 7: Overall system design


16

Canal Gate Automation for Smart Water Grids


3.3: GATE ACTUATOR SETUP
One main part of the project was to automate the canal gate so that it can be used in the overall
system effectively. The details of this setup are as under.

3.3.1: System Level Diagram


The system level diagram of gate actuator setup is given below.

Fig 8: System level view of gate actuator setup

17

Canal Gate Automation for Smart Water Grids

3.3.2: Motor
Usually the gates are operated manually in Pakistan. The regulators have a coupler attached to the
gates. A worker couples a handle to that coupler, and rotates it to open the gate. The gate is a very
heavy structure usually, so a gear ratio is used such that one hundred rotations result in a lifting or
lowering the gate by 1 foot.
We used our own couplers to couple the motor to the gate. We had two types of couplers, a normal
one and a geared one.

Fig 9: Normal and Geared coupler


The motor could not provide enough torque required to lift the gate, so we used a geared coupler
with a gear ratio 1 to 2.
The gate was 9 feet 6 inch wide and 4 feet 6 inch in height. So we used a 1 kW 3 phase induction
motor. The motor had dual windings, or 2 or 8 pole operation. We used it in 2 pole configuration. The
motor ran at a speed of 2700 rpm. The motor was geared with a gear ratio of 1 to 27, so we got a
speed of 100 rpm at the output. The geared coupler doubled the torque and reduced the speed to 50
rpm.

18

Canal Gate Automation for Smart Water Grids


Since one hundred rotations at the coupler translated to 1 foot movement of gate, so it took almost
8 minutes to lift or lower the gate completely (about 4 feet).

Fig 10: The Motor Assembly

19

Canal Gate Automation for Smart Water Grids


3.3.3: Motor Driver
We used an off the shelf motor driver to drive the motor. It was a MOVIMOT SEW Eurodrive. It
was a variable frequency drive but we used it at a constant speed. It was used to turn the motor on or
off using Simulink or to change the direction of the motor.

Fig 11: The Motor Driver

3.3.4: Simulink Controller


A simple Simulink model was used to control the motor driver through some relays. National
Instruments DAQ card was used to acquire data from linear potentiometric encoder attached to the
gate and to output signals to the motor driver.

20

Canal Gate Automation for Smart Water Grids


3.3.5: Linear Potentiometric Encoder
A linear potentiometric encoder was used to measure the current height of the gate. It was
interfaced with Simulink to control the gate height.

Fig 12: Linear Potentiometric encoder

21

Canal Gate Automation for Smart Water Grids


3.3.6: Power Supply
We needed 3 phase power supply for the gate actuator setup at the regulator. Fortunately, irrigation
department had a setup there and allowed us to use the supply which was about 160 feet away from
the regulator. We used a circuit breaker at both ends for safety purposes.

Fig 13: The Power Supply

22

Canal Gate Automation for Smart Water Grids

3.4: SENSOR MODULE


Since this was a feedback control project, we had to close the loop. A standalone battery operated
module was designed to be installed in the canal at the desired points. This module measured the water
level and transmitted the readings to the head regulator.

3.4.1: System Level Diagram


Following is the system level diagram of the sensor module.

Fig 14: System level diagram of sensor module

23

Canal Gate Automation for Smart Water Grids

3.4.2: Sensor Selection


There are different types of sensors available to measure open channel water level. Some of them
are analyzed below.
1. Submerged Ultrasonic Flow Sensors are sensors that are attached at the bed of the canal.
They are also very precise but can only be used where the silt content and concentration are
pretty much constant.
2. Submerged Pressure Based Level Sensors are simple pressure transducers placed at the
canal bed and the water level is computed by just the pressure at the bed. This sensor in cheap
but only works is silt concentration does not vary.
3. Float based Level Sensors are level sensors which use floats to calculate the height. One unit
usually costs around 50,000 PKR. Power consumption is considerable and precision is
moderate. They require gauge well for proper operation.
4. Ultra-Sonic Range sensors can also be used for level measurement. These sensors are low
on accuracy but consume less power and are cheap. One problem with these sensors is that to
achieve better precision, temperature compensation has to be used.
Our Sensor Choice amongst all the options was the Ultra-Sonic range sensors for the following
reasons.
1.
2.
3.
4.

We do not require laboratory precision


We want a low power design because we want to run it using small solar panels
We want low cost
We want a sensing system which works independent of silt concentration and can be
installed easily

24

Canal Gate Automation for Smart Water Grids

The sensor we chose was Max Sonar EZ1 by Max-Botix shown below.

Fig 15: Ultrasonic sensor Max Sonar EZ1


We used its outdoor use version. It has a precision of 1cm.

25

Canal Gate Automation for Smart Water Grids

3.4.3: Communication Device Selection


The two devices that could be used for communication were
1. Long Range Zig-Bee are of the shelf and easy to install communication systems. For our

project they can be used but if this system was to be implemented on any larger scale, it
would be too expensive to use them.
2. GSM Modules are also easily available and cost reasonable.
We chose GSM modules due to the following reasons.
1.
2.
3.
4.

We have good GSM coverage in the irrigated parts of Pakistan


GSM modules are cheap
We do not require continuous communication for which SMS is ideal
It is easily scalable

We used SIM 900 module which is shown below. Zongs SIMs were used for the project.

Fig 16: SIM 900 Module

26

Canal Gate Automation for Smart Water Grids

3.4.4: Microcontroller
We used PIC 16F452 microcontroller in the sensor module. It communicates with the sensor using
RS232 protocol and acquires readings, then sends the reading in an SMS using the GSM module.
The microcontroller pseudo code is as under.
1. Acquire 100 readings from the sensor
2. Value=sum of the readings
3. Communicate with GSM module to send SMS to a phone number
4. Send value to GSM module as content of the text message
5. Wait for some time (in our experiments it was 1 minute)
6. Go to step 1.

27

Canal Gate Automation for Smart Water Grids

Below is the image of the final completed Sensor module

Fig 17: Sensor Module

28

Canal Gate Automation for Smart Water Grids

Chapter 4
RESULTS

In this chapter, we will be presenting the results obtained so far during the course of this senior
project.

4.1: WORKING ACTUATOR AND SENSOR MODULE


We have provided the basic infrastructure for the cyber physical system. The sensor module and the
gate actuator complete the control system and now the control law needs to be devised after the
system identification.
We have experimented with both the modules installed at the project site, and they worked as
expected. The sensor module continuously kept sending measurements of the water level. The Gate
actuator setup set the height of the gate to the desired value fed to the laptop. The control law, once
devised, can give that value depending on the sensor readings and the gate will be set to that height.

29

Canal Gate Automation for Smart Water Grids

Following is the image of sensor module in working condition at the site.

Fig 18: Sensor module at the site

30

Canal Gate Automation for Smart Water Grids


4.2: SYSTEM IDENTIFICATION EXPERIMENT
We performed some experiments with our sensor modules to get an estimate of the system transfer
function. We had two working sensor modules which we installed at the site and provided an input to
the system by operating the head regulator gates.
The sensors were installed 65 meters and 279 meters downstream from the head regulator. We were
allowed to operate the gates for a limited time by the irrigation department. The gates were fully
lowered for some time so that a step could be applied to the system, but the system did not reach a
steady state before we opened the gates, since the water level was 40 cm and decreasing at that time.
The gate was then fully lifted and the readings of the sensors were recorded. It took almost 7
minutes to open the gates completely from a fully lowered position. The measurements from both the
sensors are shown below.
Readings from the sensor 65 meters downstream

31

Canal Gate Automation for Smart Water Grids

Readings from the sensor 279 meters downstream

Fig 19: sensor readings from system ID experiment


These readings were not enough to identify the system as the frequency of the readings was 1
reading per minute which turned out to be low for the said experiment and the system had not
reached its steady state before the input was applied. Therefore, more experiments need to be done
before the system transfer function is identified.

32

Canal Gate Automation for Smart Water Grids

Chapter 5
COST ANALYSIS
ITEM
3 phase

UNIT COST (Rs)


30,000

AMOUNT
2

COST (Rs)
60,000

induction

DESCRIPTION
Automation of
gates

motors
Motor pedestals

10,000

20,000

& couplers

Assembly of
motors at the site

GSM modules

8,000

24,000

communication

Ultra-sonic

9,000

45,000

Water level

range sensor

measurement

NI DAQ

Used for Simulink


interfacing

Solar panels

400

1,200

Used in sensor
module

Microcontrollers

350

1,050

Used in Sensor
modules

Li-ion battery

100

300

Power supply to
sensor module

Plastic boxes

500

1,000

Encapsulation of
sensor module

Total

152,550

Table 5.1: Cost Analysis

33

Canal Gate Automation for Smart Water Grids

Chapter 6
FURTHER WORK
This project just laid the foundations for a lot of work to be done on smart water grids in Pakistan.
First of all, thorough system identification experiments need to be carried out with more sensors and
longer experiment duration. Once the system is identified, the control systems theory is to be applied
to it, so that distant downstream control can be implemented and demonstrated.
This control project then can be used to improve the current irrigation system and to solve a lot of
water issues in Pakistan. Some of the useful fields of study branching out from distant downstream
control are:

Reduction of water spillage

Detection and localization of water theft and leakage

Better flood management

Efficient monitoring

We hope that our work will be useful for these studies and that our project can serve as a basis to a
lot of future work done for the prosperity of Pakistan.

34

Canal Gate Automation for Smart Water Grids

REFERENCES
[1] Nasir, H.A. & Muhammad, A. 2011, Towards a Smart Water Grid for the Indus River Basin,
Department of Electrical Engineering, LUMS School of Science & Engineering, Lahore, Pakistan
[2] Nasir, H.A. & Muhammad, A. 2011, Feedback control of very-large scale Irrigation networks: A CPS
approach in a developing-world setting, IFAC World Congress
[3] Litricio, X. & Fromion, V. 2009, Modeling and Control of Hydrosystems, Springer Verlag

35

You might also like