Control Engineering in Water Resources EE361. Lectures on Control Engineering in Environment & Sustainability March 2015 Abubakr Muhammad Director, Laboratory for Cyber Physical Networks and Systems Dept of Electrical Engineering SBA School of Science & Engineering Lahore University of Management Sciences (LUMS), Pakistan
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Control Engineering in Water Resources
EE361. Lectures on Control Engineering in Environment & Sustainability
March 2015
Abubakr Muhammad Director, Laboratory for Cyber Physical Networks and Systems
Dept of Electrical Engineering
SBA School of Science & Engineering
Lahore University of Management Sciences (LUMS), Pakistan
ISLAMABAD: Anticipating a water crisis in the wake of extreme weather conditions, the Indus River System
Authority (Irsa) has asked the government to freeze the country‟s entire development programme for five years
and divert funds for construction of major water reservoirs on war footing as a national priority.
The water regulator, comprising irrigation and engineering experts from all the four provinces and the centre set
up following the 1991 water apportionment accord, did not specifically name the major water reservoirs but
pointed out that at the very minimum 22 million acre feet (MAF) storage capacity should be developed at the
earliest.
“To put an end to the misery faced by the country, the PSDP for all sectors be frozen for at least five years and
funds may be diverted for the construction of mega storages on priority basis in the best interest of public,” Irsa
chairman Raqib Khan wrote to the secretary of water and power.
The letter was issued after a meeting of the Authority, attended by the five members.
• Cyber elements : sensors, controllers, comm., services
What type of problems can be solved?
• Increase of distribution efficiency
• Demand based delivery
• Control of nontechnical losses
– Detection of Leak or unauthorized takeoff
– Detection of unauthorized dumps
• System health monitoring
• Flood/breach security
• Real-time scheduling and planning
• Improvement and enforcement of water rights
Outline
• Motivation
• Water networks : A CPS / IoT perspective
• Open channel hydraulics : physical models
• System identification : theory to experiments
• Sensing: building telemetry networks
• Control: putting it all together
• Conclusions and outlook
Open Channel Flows
Typical Canal Pool Structure
• Pools or Reaches.
• Two gates in each pool/reach.
Models of Open Channel Flows
• Two ways to simulate:
– Simple volume balance equations.
– Navier Stokes in 1D (Saint Venant equations).
(Lumped) Volume Balance Model
( ) ( ),in out
dVQ t Q t
dt
3
20.6 .Q gbh
Where,
(Lumped) Volume Balance Model
).()( tQtQdt
dVoutin
.
,
23
23
hcQ
hcQ
outout
inin
3 31 2 2
, 1, 1
( )( ) ( ).i
i in i i out i
dy tc h t c h t
dt
Distributed Model Geometry
Q: Water flow
A: Cross-sectional area
h: Height
P: Wetted Perimeter
B: Base width
R: Hydraulic Radius
Modeling of flow of water
Saint Venant equations
Continuity Equation
Momentum Equation
Frictional Slope
Hydraulic Radius .
,
,
.0)(2
)(
,0
34
2
22
02
2
P
AR
RA
nQS
where
SSgAx
Q
A
Q
x
A
A
Q
B
gA
t
Q
x
Q
t
A
f
f
Preissmann’s Scheme
Preissmann’s Scheme contd.
).())(1(
),(2
1
),)1((2
1))1((
2
1
11
11
1
1
1
1
1
1
1
1
t
ff
x
ff
x
f
t
ff
t
ff
t
f
fffff
k
i
k
i
k
i
k
i
k
i
k
i
k
i
k
i
k
i
k
i
k
i
k
ip
Discretizing PDE
System of equations
• Solved by Newton-Raphson method
• Applying Preissmann‟s equation to St. Venant equation.
• Boundary equations are given as:
.
,
23
23
hcQ
hcQ
outout
inin
Example: Breaches and Dumps
.)(2
)(
,
02
2
A
QdSSgA
x
Q
A
Q
x
A
A
Q
B
gA
t
Q
dx
Q
t
A
f
For Rectangular
Channel:
Leak Simulations
Dumping Simulation
End of Lecture 1
Outline
• Motivation
• Water networks : A CPS / IoT perspective
• Open channel hydraulics: physical models
• System identification : theory to experiments
• Sensing: building telemetry networks
• Control: putting it all together
• Conclusions and outlook
Model Learning for Control
3 31 2 2
, 1, 1
( )( ) ( ).i
i in i i out i
dy tc h t c h t
dt
Abstraction
Physical Models Data Driven Models
(Lumped) Volume Balance Model
).()( tQtQdt
dVoutin
.
,
23
23
hcQ
hcQ
outout
inin
3 31 2 2
, 1, 1
( )( ) ( ).i
i in i i out i
dy tc h t c h t
dt
Plant Model
• Declare
• W.r.t. inflow, a linear transfer function emerges:
ℎ3/2 𝑡 = 𝑢 𝑡 .
System Identification
Idea prototyped in a LUMS MS Thesis 2011.
System Identification contd.
).()()( 12
3
,12
3
,1thcthcty ioutiiinii
Date extracted
Pool 1 2 3
Time delay
(min)
2 3 1
Wave Period
(min)
8 13 7
Ci,in 0.1090 0.1010 0.2340
Ci+1,out 0.1460 0.0910 0.2010
Sy
ste
m Id
en
tifi
ca
tio
n System ID: Experiments
Location:
– KHAIRA Distributory
– Length 87000 feet
– Width 10 feet
– Max height 4 feet
– 3 Minors
– Discharge 87 cusecs
Tested in a LUMS FYP 2013 !
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Experiments
Procedure: – Water level sensors are placed at appropriate sites along the
canal and communicate through mobile or other networks.
– At the Upstream, Gate is closed and then subsequently
opened to generate a step input.
– The readings are recorded and then used as empirical
output, in conjunction with the input, to perform System
Identification.
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Gate Modeling
Water Flow: Overshot Gate Water Flow: Undershot Gate
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Parametric Equation for the given channel
• The parameters
in 𝜃 matrix are
estimated by
the
minimization of
a least-squares
criterion.
System ID: Experiment
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Least Squares Estimation
• Experimental Setup – Upstream Gate was closed and then opened
– The water level was measured at 50m, 350m and 550m, every 10s.
– The corresponding data was processed and interpolated to obtain a uniformly sampled and synchronized set.
• Estimation – A model was fit to the observed response at 350m and 550m
sensors by linear regression.
– As mentioned earlier, yu was assumed to be constant and p2[k] was taken to be zero to model an „always opened – hypothetical – downstream gate’.
– In addition, yd [k] was taken to be the values of 50m sensor.
– The response delay were inspected from the raw data, which came out be approximately 200s and 350s for the 50m, 350m and 550m sensors respectively.
– Using the above conditions, the response for the sensors at 350m and 550m was estimated
System ID: Least Squares Estimation
System ID: Least Squares Estimation
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Least Squares Estimation
• Results
– For 350m the estimated parameters were: • θ = [0.0160 -0.3271]x10-3
– For 550m the estimated parameters were: • θ = [0.0152 -0.2737]x10-3
• The estimated parameter values make sense from a physical point of view. – θ1 is positive. It is associated with the inflow of water
– θ2 is negative. It is associated with the outflow of water
– θ2 has a greater magnitude than θ1 because there exists no hydraulic structure at the downstream sensor position, and there is always an outflow at the hypothetical downstream end.
Sy
ste
m Id
en
tifi
ca
tio
n
System ID: Model Validation
• Simulation of Model
• Average Squared Prediction Error
• Comparison of predicted water level with the measured one
System ID: Model Validation
Outline
• Motivation
• Water networks : A CPS / IoT perspective
• Open channel hydraulics: physical models
• System identification : theory to experiments
• Sensing: building telemetry networks
• Control: putting it all together
• Conclusions and outlook
Hydrometry for Open Channel Flows
Objective: Measure flows in distributary canal networks
Hydrometry for Open Channel Flows
• Outdated infrastructure
• Gaps in monitoring expertise
• Objective: To develop a low-cost low-power robust flow gauge
Challenges
• Power / energy autarky
• Communication mode
• Physical security
• Cost / scalability
• Calibration / maintenance
• Data dissemination / services
Solution: A smart metering like approach
Smart Water Grid : LUMS-IWMI collaboration
Goal: To install a network of 20+ sensors at a real site
(distributary network on Hakra Branch, Bahawalnagar)
Smart Water Grid in Bahawalnagar
Ref. Ahmad, Muhammad. IECON 2013
Hakra Branch Distributaries
Packaging / Assembly
Circuitry Enclosure
Material die cast
Aluminum
IP 67 Enclosures
Connectors for external
antenna and
temperature sensors
are also IP67 standard
Prototyped in a LUMS FYP 2012 !
Stilling well / Civil Infrastructure
60cm x 90cm
To secure
electronics
High strength PCC
concrete
No steel
reinforcement for
good GSM
reception
Ultrasonic Sensor
• Maxbotix MB7380 Ultra Sonic Sensor
• 1mm resolution, 1% accuracy
Block diagram of Smart Water Meter
Unit Performance
• 10 months data of a field deployed unit (5R) with 10
minutes sampling interval.
• Average signal level -69dBm
• 42,187 samples
Flow Calibration
• Level to flow calibration
• Hydraulic rating equation (Manning equation)
• “Calibrating” flow from level measurements
Model based Filtering for Sensor Data
• Physical models for
– Pipe blockage
– False ultrasound returns
– Sensor failures
Installation at LUMS
End of Lecture 2
Outline
• Motivation
• Water networks : A CPS / IoT perspective
• Open channel hydraulics: physical models
• System identification : theory to experiments
• Sensing: building telemetry networks
• Control: putting it all together
• Conclusions and outlook
Low level downstream control
Controller Design
• Model
Controller Design
• Model
• Root locus (with 2nd order Pade approx. of delay)
Controller Design
• Model
• Root locus (with 4th order Pade approx. of delay)
Model Refinement
• Wave excitations in the channel: damped oscillations.
• Model is approximate. There are higher-order invisible
modes.
Model Refinement
• Model is approximate. There are higher-order
invisible modes.
Introduce damping / friction
Model Refinement
• Model is approximate. There are higher-order
invisible modes.
Oscillatory mode + damping
How to choose a Controller?
• Water off-takes from channel act as disturbances
– Therefore, Integral action needed for disturbance
rejection (PI control)
• At some higher frequencies, waves in channels may
get excited.
– Therefore, controller should have “low gain” at
wave frequency. (LPF with roll-off)
• Both plant and controller (PI) introduce integrators.
– Therefore, need lead compensation.
Controller Design
• Model
• PI-control + low-pass + lead compensator
PI control LPF Phase Lead
)1(
)1().()(
2
1
sT
sT
s
KKsC i
p
Level regulation (physical simulation)
Closed Loop On-Off Control
Gate Controller: Prototyped in a
LUMS FYP 2014 !
(Farwa Akhtar, Shibal Ibrahim,
Muhammad Soban, Usama Munir)
Downstream Control in Other Parts of the World
• Australia, Europe, USA, China
Networked Control Issues
• So far, plant is single pool
• Control problem is downstream water level
regulation for one pool.
• But irrigation networks are extremely complex,
specially in the Indus basin
• Control effects propagate
• Enters Networked Control Systems !
Network effects
TOP VIEW SIDEVIEW
Controller of last gate sends signal of water
scarcity
Network effects
TOP VIEW SIDEVIEW
Controller of a gate sends signal of water scarcity
Network effects
TOP VIEW SIDEVIEW
Controller of a gate sends signal of water
scarcity
Network effects
TOP VIEW SIDEVIEW
Water starts entering the canal
Network effects
TOP VIEW SIDEVIEW
After reaching the set value controller sends signal to close
upstream gate
Network effects
TOP VIEW SIDEVIEW
After reaching the set value controller sends signal to close