SacMan Control Tuning Bert Clemmens Agricultural Research Service.
-
Upload
tatum-pownall -
Category
Documents
-
view
217 -
download
0
Transcript of SacMan Control Tuning Bert Clemmens Agricultural Research Service.
SacMan Control Tuning SacMan Control Tuning
Bert ClemmensBert ClemmensAgricultural Research ServiceAgricultural Research Service
Canal Control ProblemCanal Control Problem• Balance supply with demand.Balance supply with demand.
• Maintain desired delivery rate.Maintain desired delivery rate.
• Above are accomplished byAbove are accomplished by– Control of pool water levelsControl of pool water levels
•which in turn requires control of pool volumeswhich in turn requires control of pool volumes
Demand
Supply
Water-level Control
Gravity Offtakes
Three Aspects Three Aspects of Canal Automation of Canal Automation
• Flow controlFlow control – Ability to control flow rates at key pointsAbility to control flow rates at key points
• Feedforward control of flow ratesFeedforward control of flow rates – Ability to route known major flow changes Ability to route known major flow changes
through the canalthrough the canal
• Feedback control of water levelsFeedback control of water levels – Ability to adjust to disturbances and flow Ability to adjust to disturbances and flow
rate errors with downstream water-level rate errors with downstream water-level feedbackfeedback
Tuning RequirementsTuning Requirements• Gate calibration are important, but not critical when Gate calibration are important, but not critical when
feedback control is used. We use handbook feedback control is used. We use handbook calibration or calibrations provided by operators. calibration or calibrations provided by operators. Nothing special!Nothing special!
• Delay times for routing are important to transient Delay times for routing are important to transient performance. We manually adjust Manning n to performance. We manually adjust Manning n to match predicted and observed delay time for match predicted and observed delay time for feedforward.feedforward.
• We use optimal control methods to obtain water We use optimal control methods to obtain water level feedback control parameters. Canal properties level feedback control parameters. Canal properties are determined from simulation or on-line tests.are determined from simulation or on-line tests.
Typical Check Structure Typical Check Structure HardwareHardware
Automata Hardware
Gate Position Sensor• Two SensorsTwo Sensors
– Digital Digital Output for Output for fine fine resolution of resolution of gate gate movementmovement
– Analog Analog Output for Output for coarse coarse resolution of resolution of gate gate openingopening
Optical Encoder Pulsed Optical Encoder Pulsed OutputOutput
• Pulses count down to zero and motor stopsPulses count down to zero and motor stops
0.95 mm
Calibration of gates at Calibration of gates at CAIDDCAIDD• District has determined from experience, District has determined from experience,
relationship between relative gate position relationship between relative gate position change and flow rate changechange and flow rate change
• This is assumed linear. Then they correct when This is assumed linear. Then they correct when flows do not balance.flows do not balance.
• Sometimes they take into account non-linearity in Sometimes they take into account non-linearity in initial opening.initial opening.
• We use this calibration to determine the amount We use this calibration to determine the amount of gate movement (number of pulses) for a of gate movement (number of pulses) for a desired flow change.desired flow change.
• This is programmed into the SCADA system for This is programmed into the SCADA system for manual controlmanual control
• SacMan also considers upstream water level in SacMan also considers upstream water level in determining gate position changedetermining gate position change
Flow control issuesFlow control issues
• Canal headgates are often not Canal headgates are often not accurate for flow measurementaccurate for flow measurement
• Separate meter downstream can be Separate meter downstream can be used to adjust headgateused to adjust headgate
• Downstream Water-Level Feedback Downstream Water-Level Feedback adjusts for flow errors upstreamadjusts for flow errors upstream
• Incremental flow control allow gradual Incremental flow control allow gradual adjustment to match downstream adjustment to match downstream flowsflows
• Free flow gate downstream can be Free flow gate downstream can be used to adjust head gateused to adjust head gate
If gate is close to head-gate If gate is close to head-gate and is free-flowing, it can be and is free-flowing, it can be alternative measurement alternative measurement devicedevice
SimpleFeedback
ControlCheck Gate tobe Adjusted
Level to beControlled
Canal properties significantly affect the Canal properties significantly affect the performance of any canal automation scheme.performance of any canal automation scheme.
– pool delay times •which limits the responsiveness of the canal and thus the control which limits the responsiveness of the canal and thus the control
possiblepossible
– pool volume changes with flow rate •which influences the routing of flow changes through a canalwhich influences the routing of flow changes through a canal
– downstream water level response to pool volume changes over time•which influences the strength of feedback corrections to water which influences the strength of feedback corrections to water
level errorslevel errors
– Reflection Wave FrequencyReflection Wave Frequency•Which is needed to avoid unstable feedback controlWhich is needed to avoid unstable feedback control
Control Engineering PracticeControl Engineering Practice
• Most industrial controllers use simple Most industrial controllers use simple ““ClassicalClassical”” control, such as PID. control, such as PID.
• So called So called ““ModernModern”” control theory, which control theory, which uses optimization, has never caught on.uses optimization, has never caught on.
• AdaptiveAdaptive-classical control has received -classical control has received more coverage in the literature.more coverage in the literature.
• Several simple Several simple controllers in seriescontrollers in series continues to be a difficult control continues to be a difficult control problem.problem.
Optimization with State-Optimization with State-Feedback Control of Water Feedback Control of Water
LevelsLevels• State-Transition RelationshipState-Transition Relationship
– we use the we use the Integrator-Delay ModelIntegrator-Delay Model
– where, where, y(t)y(t) is the downstream water level at is the downstream water level at time time t t in response to a step change in in response to a step change in upstream flow rate, upstream flow rate, QQ, ,
– is the is the pool time delaypool time delay, and , and – AA is the is the pool backwater surface areapool backwater surface area..
y t y for t
y t tQ
Afor t
( ) ( )
( )
0
Integrator Delay ModelIntegrator Delay Model
• Time delay, Time delay, • Backwater surface area, ABackwater surface area, Ass
Uniform Flow
Backwater
Integrator-Delay ModelIntegrator-Delay Model
Time
Ch
ang
e in
Dep
th
0
0
t
DQ
As
Canals under normal depth follow Canals under normal depth follow this model well this model well (SRP Arizona Canal - (SRP Arizona Canal - Pool 1)Pool 1)
393.5
394.0
394.5
395.0
0:00 1:00 2:00 3:00 4:00 5:00 6:00
Time (hours)
Ele
vati
on
(m
)
Computed response
Linear model
State Transition EquationsState Transition Equations
• Derived from integrator-delay modelDerived from integrator-delay model
x x u
e Cx Du
( ) ( ) ( )
( ) ( ) ( )
k k k
k k k
1
Optimization with State-Optimization with State-Feedback Control of Water Feedback Control of Water
LevelsLevels
• State-Feedback Control LawState-Feedback Control Law
where where uu(k)(k) is the is the control actioncontrol action (change in (change in flow rate) at time step k, flow rate) at time step k,
KK is the is the controller gain matrixcontroller gain matrix, and , and
xx(k)(k) is the is the state vectorstate vector..
u K x( ) ( )k k
Optimization with State-Optimization with State-Feedback Control of Water Feedback Control of Water
LevelsLevels• Linear Quadratic Regulator (LQR)Linear Quadratic Regulator (LQR) with with
Penalty FunctionPenalty Function
where where JJ is the is the costcost, , e(k)e(k) is the is the water level errorwater level error at time step k, at time step k,
and and QQ and and RR are are penaltiespenalties on the water level on the water level
errors and control actions, respectively.errors and control actions, respectively.
J k k k kT
k
T
e Q e u R u( ) ( ) ( ) ( )0
Controller TuningController Tuning
• Centralized PI-controller (with full Centralized PI-controller (with full gain matrix) can be found from gain matrix) can be found from solution of Riccati equationsolution of Riccati equation
• Gradient search procedures are used Gradient search procedures are used to optimize other, more simple to optimize other, more simple controllers, such as a series of local controllers, such as a series of local PI controllersPI controllers
Proportional-Integral Proportional-Integral ControllerController
• We can We can optimally tune a PI controlleroptimally tune a PI controller with the above scheme, with the above scheme, – provided that the state vector, provided that the state vector, xx(k), is (k), is
properly chosen and properly chosen and – when only certain elements are chosen when only certain elements are chosen
within the gain matrix, within the gain matrix, KK..
u k K e k K e kp I( ) ( ) ( ) 1
Three local PI Controllers Three local PI Controllers in seriesin series
u( )
( )
( )
( )
k
u k
u k
u k
1
2
3
K
K K
K K
K K
P I
P I
P I
1 1
2 2
3 3
0 0 0 0
0 0 0 0
0 0 0 0
x( )
( )
( )
( )
( )
( )
( )
k
e k
e k
e k
e k
e k
e k
1
2
3
1
2
3
1
1
1
Expansion of simple PI Expansion of simple PI controllercontroller
• Additional terms are added to state Additional terms are added to state vector to account for vector to account for delaysdelays (as in Smith (as in Smith Predictor used in control theory)Predictor used in control theory)
• Off diagonal elements allow Off diagonal elements allow “decoupling” and “decoupling” and centralized controlcentralized control
Feedback
??
??
• Full gain MatrixFull gain Matrix– Top version highlights PI termsTop version highlights PI terms– Bottom version highlights delay (L) termsBottom version highlights delay (L) terms
e1(k) u1(k-3) u1(k-2) u1(k-1) e2(k) u2(k-2) u2(k-1) e3(k) e4(k) e1(k-1) e2(k-1) e3(k-1) e4(k-1)
Cfs/ft - - - cfs/ft - - cfs/ft cfs/ft cfs/ft cfs/ft cfs/ft cfs/ftu1(k) 59 0.03 0.13 0.13 56 0.05 0.10 51 60 3.6 2.0 1.6 1.0
u2(k) -21 -0.01 -0.05 -0.04 54 0.05 0.10 43 25 -2.6 3.1 1.6 0.9
u3(k) -5 0.00 -0.01 -0.01 -21 -0.02 -0.04 53 27 -0.4 -2.5 3.6 1.2
u4(k) -1 0.00 0.00 0.00 -3 0.00 -0.01 -10 43 -0.1 -0.3 -1.3 3.3
e1(k) u1(k-3) u1(k-2) u1(k-1) e2(k) u2(k-2) u2(k-1) e3(k) e4(k) e1(k-1) e2(k-1) e3(k-1) e4(k-1)
cfs/ft - - - cfs/ft - - cfs/ft cfs/ft cfs/ft cfs/ft cfs/ft cfs/ftu1(k) 59 0.03 0.13 0.13 56 0.05 0.10 51 60 3.6 2.0 1.6 1.0
u2(k) -21 -0.01 -0.05 -0.04 54 0.05 0.10 43 25 -2.6 3.1 1.6 0.9
u3(k) -5 0.00 -0.01 -0.01 -21 -0.02 -0.04 53 27 -0.4 -2.5 3.6 1.2
u4(k) -1 0.00 0.00 0.00 -3 0.00 -0.01 -10 43 -0.1 -0.3 -1.3 3.3
Comparison of Controllers - Test 1-Comparison of Controllers - Test 1-11
40
60
80
100
120
0 100 200 300
Number of Coefficients
Pe
na
lty
Fu
nc
tio
n,
JPI
PI+S
PI+
PI+S+
PI-1+1
PI-1+
PI+S-1+1
PI+S-1+
PI+S-+
PI-+
PI+1
PI+S+1
Conclusions from Conclusions from OptimizationOptimization
• Series of simple PI controllers can be Series of simple PI controllers can be greatly improved upongreatly improved upon
• Adding Smith Predictor should improve Adding Smith Predictor should improve controller performance for this canalcontroller performance for this canal
• Decoupling or sending control signals to Decoupling or sending control signals to other pools should improve controlother pools should improve control
• Sending information to one pool Sending information to one pool downstream and one (or more) pools downstream and one (or more) pools upstream is a good control compromiseupstream is a good control compromise
Simulation TestingSimulation Testing
• Controllers tested with CanalCADControllers tested with CanalCAD
• Tested under tuned and untuned Tested under tuned and untuned conditionsconditions
• 12 different controllers tested for 12 different controllers tested for each test caseeach test case
Test 1-1 with Test 1-1 with NONO gate movement gate movement restrictionsrestrictionsCentralized PI Controller (PILCentralized PI Controller (PIL--
++))
Change at 2 hours had feed-forwardChange at 2 hours had feed-forward
Change at 14 hours was only feed-backChange at 14 hours was only feed-back
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m
) 4 5 83
2
Test 1-1 with gate movement Test 1-1 with gate movement restrictionsrestrictionsCentralized PI Controller (PILCentralized PI Controller (PIL--
++))
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m) 4
1
1
8 5
Test 1-1 untuned (gate move. restr. Test 1-1 untuned (gate move. restr. implied)implied)Centralized PI Controller (PILCentralized PI Controller (PIL--
++))
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
4
2
5
5
8
8
5
Test 1-1 untuned Test 1-1 untuned Simple PI ControllerSimple PI Controller
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
2/1
2 5
5/2
Test 1-1 untuned Test 1-1 untuned PI PI-1-1
+1+1 Controller Controller
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m) 2
5/2 6 78
2/5
Test 1-1 Comparison: relative to Test 1-1 Comparison: relative to PI+SPI+S--
++
0.0
0.5
1.0
1.5
2.0
PI+S-1+1 PI-1+1 PI
Rel
ati
ve P
erfo
rma
nce
MAE 0-12 Max
MAE 0-12 Ave
MAE 12-24 Max
MAE 12-24 Ave
IAE 0-12 Max
IAE 0-12 Ave
IAE 12-24 Max
IAE 12-24 Ave
StE 0-12 Max
StE 0-12 Ave
StE 12-24 Max
StE 12-24 Ave
IAQ 0-12 Max
IAQ 0-12 Ave
IAQ 12-24 Max
IAQ 12-24 Ave
Test 1-1 Comparison: LQR / Test 1-1 Comparison: LQR / PI+SPI+S--
++
0.00
0.50
1.00
1.50
2.00
MAE0-12Max
MAE0-12Ave
MAE12-24Max
MAE12-24Ave
IAE 0-12Max
IAE 0-12Ave
IAE12-24Max
IAE12-24Ave
StE 0-12Max
StE 0-12Ave
StE12-24Max
StE12-24Ave
IAQ 0-12Max
IAQ 0-12Ave
IAQ12-24Max
IAQ12-24Ave
Rel
ati
ve P
erfo
rma
nce
Test 1-2 untuned Test 1-2 untuned Centralized PI Controller (PILCentralized PI Controller (PIL--
++))
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
84
6/7
2
4/24/5
4 6/5/4
5
Test 1-2 untuned Test 1-2 untuned Simple PI Controller (PI)Simple PI Controller (PI)
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
25
6/5/22
8 7
5
2
61
Test 1-2 untuned Test 1-2 untuned PI PI-1-1
+1+1 Controller Controller
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
6/5
4 2/6/7
8
67
42
5/3
2
Test 1-2 untuned Test 1-2 untuned PIL PIL-1-1
+1+1 Controller Controller
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 4 8 12 16 20 24
Time (hours)
Wat
er le
vel e
rror
(m)
24
5
87
2
2/4/3
6
4
2/1
32
Test 1-2 Comparison: relative to Test 1-2 Comparison: relative to PI+SPI+S--
++
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
PI+S-1+1 PI-1+1 PI
Rel
ativ
e P
erfo
rman
ce
MAE 0-12 Max
MAE 0-12 Ave
MAE 12-24 Max
MAE 12-24 Ave
IAE 0-12 Max
IAE 0-12 Ave
IAE 12-24 Max
IAE 12-24 Ave
StE 0-12 Max
StE 0-12 Ave
StE 12-24 Max
StE 12-24 Ave
IAQ 0-12 Max
IAQ 0-12 Ave
IAQ 12-24 Max
IAQ 12-24 Ave
Test 1-2 Comparison: LQR / Test 1-2 Comparison: LQR / PI+SPI+S--
++
0.00
1.00
2.00
3.00
4.00
5.00
MAE0-12Max
MAE0-12Ave
MAE12-24Max
MAE12-24Ave
IAE 0-12Max
IAE 0-12Ave
IAE12-24Max
IAE12-24Ave
StE 0-12Max
StE 0-12Ave
StE12-24Max
StE12-24Ave
IAQ 0-12Max
IAQ 0-12Ave
IAQ12-24Max
IAQ12-24Ave
Rel
ati
ve P
erfo
rma
nce
ConclusionsConclusions
• Gate movement restrictions have a big influence on Gate movement restrictions have a big influence on controller performancecontroller performance
• Tuning to actual canal conditions can improve controller Tuning to actual canal conditions can improve controller performanceperformance
• Results suggest passing control actions one pool Results suggest passing control actions one pool upstream and one pool downstream may be good upstream and one pool downstream may be good compromise.compromise.
• While optimization suggests Smith predictor always While optimization suggests Smith predictor always improves performance, simulation results suggest that improves performance, simulation results suggest that it often doesn’tit often doesn’t
• Control with centralized PI controller comparable to Control with centralized PI controller comparable to traditional LQR controllertraditional LQR controller
Simulation results for Upper Arizona Canal when controlling
entire network
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 50 100 150
Time (hr)
Wat
er L
evel
Err
or (
m)
Granite Reef 1-00.61-01.9 1-03.01-03.4 1-05.01-08.0 1-10.0
-0.30
-0.20
-0.10
0.00
0.10
0.20
0.30
0 50 100 150
Time (hr)
Wat
er L
evel
Err
or (
m)
Granite Reef 1-00.61-01.9 1-03.01-03.4 1-05.01-08.0 1-10.0
-0.50
-0.40
-0.30
-0.20
-0.10
0.00
0.10
0.20
0 50 100 150
Time (hr)
Wat
er L
evel
Err
or (
m)
Granite Reef 1-00.61-01.9 1-03.01-03.4 1-05.01-08.0 1-10.0
-0.50
-0.40
-0.30
-0.20
-0.10
0.00
0.10
0.20
0 50 100 150
Time (hr)
Wat
er L
evel
Err
or (
m)
Granite Reef 1-00.61-01.9 1-03.01-03.4 1-05.01-08.0 1-10.0
Centralized PI w/ feedforward MPC w/ feedforward
Centralized PI w/ feedback only MPC w/ feedback only
Manning n is used to adjust Manning n is used to adjust delay times for volume-based delay times for volume-based
feedforward routingfeedforward routing
0
1
2
3
4
5
6
7
0 20 40 60
Inflow Rate (m^3/s)
Vol
ume
(X 1
00,0
00 m
^3)
0.0140.0180.0220.0260.030
Manningn
Some canal pools do not follow the ID Some canal pools do not follow the ID model. They have “effectively” no model. They have “effectively” no delay, a backwater area, and reflection delay, a backwater area, and reflection waveswaves
463.555
463.56
463.565
463.57
463.575
200 240 280 320 360 400
Time (min)
Ele
vati
on
(m
) .
Influence of reflection wavesInfluence of reflection waves
•Reflection waves can destabilize Reflection waves can destabilize an otherwise stable controlleran otherwise stable controller
•Water level filtering can be used Water level filtering can be used to to
–Minimize the influence of reflection Minimize the influence of reflection waves on controlwaves on control–Remove transducer noiseRemove transducer noise–Provide Anti-aliasingProvide Anti-aliasing
Pseudo-random binary signal can be Pseudo-random binary signal can be used to obtain frequency response of used to obtain frequency response of canal poolcanal pool
Bode (Frequency) Diagram can Bode (Frequency) Diagram can be used to design filtersbe used to design filters
Frequency
Resonance Peak
ActualSignal
FilteredSignal
Filter
ID Model is straight line
Resulting filtered water Resulting filtered water levelslevels
Manual Supervisory Control
• Standard Supervisory Control Standard Supervisory Control Features using iFix Dynamics from Features using iFix Dynamics from Intellution, Inc.Intellution, Inc.
• Added features for canal Added features for canal managementmanagement
Manual Supervisory Control
• iFix allows many types of displays (CAIDD)iFix allows many types of displays (CAIDD)
• Screen allows incremental flow change at gateScreen allows incremental flow change at gate