Anda di halaman 1dari 19

Using Darwin

Calibrator
A Lesson Supplement

2002 Haestad Methods, Inc. All rights reserved.


Using Darwin Calibrator A Lesson Supplement (First Edition)
This booklet is published by Haestad Methods, Inc. and is intended for civil engineers
and hydraulic modelers (including professional engineers, technicians, and students).
This book may not be copied, photocopied, reproduced, translated, or converted to any
electronic or machine-readable form in whole or in part without prior written approval of
Haestad Methods, Inc.
Trademarks

The following are registered trademarks of Haestad Methods, Inc.:


CulvertMaster, Cybernet, FlowMaster, PondPack, SewerCAD, StormCAD, WaterCAD,
and Darwin Calibrator (patent pending).
The following are trademarks of Haestad Methods, Inc.:
HECPack, POND-2, Graphical HEC-1, Graphical HEC-Pack.
Haestad Methods is a registered tradename of Haestad Methods, Inc.
AutoCAD is a registered trademark of Autodesk, Inc.
ESRI is a registered trademark of Environmental Systems Research Institute, Inc.
All other brands, company or product names, or trademarks belong to their respective
holders.

37 Brookside Rd.
Waterbury, CT 06708-1499
Voice: (203) 755-1666
FAX: (203) 597-1488
e-mail: info@haestad.com
Internet: http://www.haestad.com

ii

Table of Contents
Introduction to Darwin Calibrator
How Does Darwin Work?
Example Background
Lesson 1 Entering Field Data
Lesson 2 Setting up the Adjustment Groups
Lesson 3 Calibration
Lesson 4 The Importance of Accurate Field Data
Lesson 5 Adjusting Roughness Factors Exclusively
Lesson 6 Manual Calibration
Conclusion

iii

1
1
2
2
5
7
12
14
15
16

Introduction to Darwin Calibrator


Model Calibration is vital to the creation of an accurate water distribution model
that can successfully serve to both realistically reflect the behavior of the actual
network being modeled and to help predict future changes in network conditions.
This booklet explains, in step-by-step format, the use of the Darwin Calibrator,
and illustrates how Darwin can drastically improve the accuracy of your model,
and do so in much less time than is possible using the older manual techniques.
Also demonstrated is the superiority of the multi-objective calibration utilized by
Darwin that determines pipe roughness, junction demands, and link status, as
opposed to less advanced automated calibration engines that can only determine
roughness.

How Does Darwin Work?


*A full technical description of the Genetic Algorithm methodology behind Darwin
can be found in Appendix B: WaterCAD Theory of the WaterCAD Users Manual,
or online help.
Basically, Genetic Algorithms simulate the natural processes of biological
reproduction and evolution, testing numerous network parameter combinations
for their proximity to user-defined field data (fitness), and allowing the fittest of
these to reproduce, or combine their traits and move on to the next generation.
Darwin Calibrator uses your field data to adjust the pipe roughness C-factors, link
status (open/closed), and junction demands so that the model reflects the realworld behavior of the network that is being simulated.
Calibration is always a trial-and-error process the difference here is that Darwin
can simulate staggering numbers of combinations and rank the resultant
solutions according to their level of error (how closely or distantly they match
your field data), thereby automating this tedious and time consuming process.
Deciding when the model is sufficiently calibrated generally obeys the law of
diminishing returns; when the cost of attaining a higher level of calibration
exceeds the benefit that will be realized with the more accurate calibration, the
model is considered calibrated. Darwin greatly reduces the cost of attaining
very accurate levels of calibration, weighing in heavily on the benefit side of the
cost/benefit equation.

Example Background
The following lessons will lead you through the process of using Darwin to
calibrate a small water distribution model. This model represents a fictitious
network that has grown over the years from its initial construction in 1950.
The model has been constructed using default roughness factors and exact
customer billing data to determine demands. The total metered usage expected
from this information, based on preliminary model runs, falls short of the
measured water leaving the reservoir, so our job is to determine where this loss
is occurring, find more realistic roughness factors for the pipes in the network,
and ensure that no isolation valves are closed unintentionally due to failure or
other reasons.

Lesson 1 Entering Field Data


Field data is the information Darwin uses as a measuring stick for the solutions it
finds. Accuracy of field data is critical to the successful calibration of the model,
as an error in measurement or data entry can cause Darwin to find a solution that
matches the erroneous field data, but not the actual behavior of the network. This
will be demonstrated later on, in Lesson 4.
The most effective field data is taken during times when there is significant
headloss in the system, such as during a fire flow test. For our model, the ideal
set of field data includes measurements taken during fire flow tests for junctions
in each of the 5 sections into which the model is divided.
To obtain the field data, a 500 gallon per minute fire flow is applied to a junction
in each of the 5 sections, and pressure readings are then taken at this node and
two adjacent nodes. Tank level and pump status at the time of the fire flow is also
recorded. Using junction elevation data from the system maps, these pressures
are then converted to HGLs.
Therefore, 5 field data sets will be entered, each consisting of 3 junction HGL
measurements, 1 tank level measurement, and 1 pump status report.
1) Open the Uncalibrated Lesson 1.wcd model.

As you can see, the model is split into 5 areas, according to the age of the
elements in the model. Darwin allows you to place into groups elements that
have similar hydraulic properties, which can be adjusted together during an
optimized calibration run.
All elements within each of the Demand and Roughness adjustment groups will
be assigned the same roughness or demand values during the calibration runs,
so pipe age is a good attribute to use as a basis for creating the adjustment
groups during our calibration.
button.

2) Click the Darwin Calibrator


3) Click the Field Data button.

4) In the Field Data Sets dialog, click the Add button. You will be
prompted for a name; type in 9 AM, J-150 and click OK. This
naming convention specifies the time the field data was taken, and the
junction that was flowed during the test.
5) In the Field Data Set dialog, the date field is already initialized with
todays date. This information is for recordkeeping purposes and has

no effect on the calibration, so it can be left at the default. Type 9 a in


the time field the calibrator automatically translates this to the
necessary format.
To expedite the completion of the lessons and to save data entry time, formatted
text files have been provided to import the field data. It is possible to manually
enter this data using the tables pulldown menus and data fields. Instructions on
creating these import files can be found in WaterCADs online help.
6) Click the Import button, and select the 9 AM, J-150.txt file.
7) Click the Demand Adjustments tab in the Field Data Set dialog.
Click the Insert button, and select J-150. Type 500 in the Additional
Demand column of this row. Click OK.
8) Repeat steps 4 through 7 for each of the following field data sets:

Data Set Name

Time

Text File to
Import

Additional
Demand

10 AM, J-190

10:00:00 AM

10 AM, J-190.txt

500 gpm

11 AM, J-40

11:00:00 AM

11 AM, J-40.txt

500 gpm

12 PM, J-120

12:00:00 PM

12 PM, J-120.txt

500 gpm

1 PM, J-210

01:00:00 PM

1 PM, J-210.txt

500 gpm

9) In the Field Data Sets dialog, click OK.

Lesson 2 Setting up the Adjustment Groups


1) Open the Uncalibrated Lesson - 2.wcd model.
button.

2) Click the Darwin Calibrator

The Field Data that was entered in Lesson 1 has already been entered in this
model. Again, to save data entry time, most of the Adjustment Groups have
already been entered. So that you can become familiar with the interface, we will
set up one of the adjustment groups.
3) Click the Groups button.
4) With Roughness highlighted in the left pane, click the Add button.
You will be prompted to name the group the default name of
Roughness Group-5 will suffice. Click OK.
5) A dialog appears that allows you to select the elements that will
be included in this adjustment group. Add pipe P-250, the only pipe in
the Phase 5 section of the model to the Selected Items pane of the
5

window group, and click OK.

In addition to pipe roughness, Darwin can also adjust the junction demands of
nodes placed within demand adjustment groups. In this example, our metered
usage is less than the amount of water that is leaving the reservoir, which means
that there is unaccounted for water leaving the network. Because this is most
likely due to leakage, we have used the same age-based criteria to place the
junctions in our model into adjustment groups.
The other type of adjustment group is the Status group. Unlike the other
adjustment groups, in which Darwin applies the same roughness or demand
value to every element in a group, the links contained in the status adjustment
group can be changed independently from one another. This is because it is
unlikely that all of the pipes contained in the group will be closed, so it must be
possible for adjustments to be made to the individual pipes in the group.
In this situation, we can assume that not all of the links (in this model, just pipes)
need to be tested for open/closed status. All demands are being met and billed,
so the only links that could be closed are pipes that are part of a loop. Pipes that
form part of a loop have been included in a single adjustment group.

Now that the adjustment groups have been set, we can move on to the next
Lesson:

Lesson 3 Calibration
Now that we have seen how the Field Data and Adjustment Groups are created,
we can begin the calibration process. The first step in performing an optimized
calibration is specifying ranges for roughness factors and demands from which
Darwin can choose.
1) Open the Uncalibrated Lesson 3.wcd model.
button.

2) Click the Darwin Calibrator

3) Click the New Base


button. The New Calibration dialog will
appear. Click OK to accept the default label and create an optimized
calibration.
4) With the Roughness tab selected, right-click over the Operation
column and select Global Edit. Change the operation to Set and
click OK.
The Multiply adjustment operation is most suitable when you are reasonably
confident that only relatively small adjustments need to be made to the pipe
roughnesses. In our example, since the model was created using the default
roughness values for the corresponding pipe materials, the Set operation is
more appropriate.
7

5) Enter the Minimum and Maximum C factors as they appear in the


screenshot below:

Darwin will determine the fitness of the simulated calculations using each of the
discrete values allowed by this range and increment. For example, the pipes in
Roughness Group 1 will allow C factors of 60, 80, and 100 to be applied to all
of the pipes in that group.
The default increment of 20 is sufficient for this calibration run.
Next, we will specify the range for Demand adjustments. Because we know that
there is more water leaving the reservoir than is being metered as junction
demands, we can assume that the minimum demand multiplier should be 1.
6) Click the Demand tab. Right-click over the Minimum column and
select Global Edit. Change the value to 1. Right-click over the
Maximum column and select Global Edit. Change the value to
1.50. Right-click over the Increment column and select Global
Edit. Change the value to .05.

The only possible settings for the pipes in the Status group are Open or Closed,
so ranges do not need to be specified. The ranges for this calibration have now
been set. The number of possible combinations allowed by this set of ranges is:

3 possible values for each of 5 roughness groups


11 possible values for each of 5 demand groups
2 possible values for each of 13 status elements

(3 5 )(115 )(213 ) = 320,597,142,336


Thats well over three hundred billion possible combinations!
7) Click the Go button.

A Calibration dialog appears, displaying the status of the calibration. The


Generation, Fitness, and Trial are dynamically updated as the calibration
progresses. Depending on the speed of your computer, the calibration run should
be completed in well under a minute.
The Fitness number displayed next to the calibration name is a unitless number
that indicates how closely the results of the calibration match your field data. It is
based upon the combined difference between the field data and the simulated
result, so the lower the number the more closely the solution matches your
field data. The results pane in the bottom right of the calibrator dialog displays
the adjusted values found by the calibration.
A bit further down, under the heading HGL Observations, the calculated results
found when using these adjusted values can be displayed by clicking the plus
buttons next to each field data set. As you can see, the simulated results using
the adjusted values that Darwin produced do not quite match the field data,
particularly the first two data sets.
One of Darwin Calibrators great strengths is the ability to generate multiple
solutions from a single calibration run, and rank these according to fitness. The
solution that most closely matches the field data is the one that is initially
displayed, but the next closest solutions (as many as are specified by the
Solutions to Keep value in the Options tab) are also kept to incorporate the
engineers judgment in the calibration process.
9

Above the results pane, there is a pulldown bar that specifies the solution that is
being displayed, along with its fitness.
Review the other solutions that were generated; as you can see, all three of the
solutions that were produced fall within the following ranges:
Roughness C Factors:
Demand Multipliers:
Status Adjustments:

Between 80 and 120 (inclusive)


Between 1.00 and 1.25 (inclusive)
P-1 and P-60 are closed

This is a good solution with a low fitness number; however, by narrowing the
ranges that Darwin must consider, we may be able to obtain an even better
result. Using the preliminary findings of the first calibration, we can narrow the
ranges and see if we can obtain a better fitness number.
8) Right-click the calibration name in the left pane and select AddChild
Calibration. Choose an Optimized Calibration and click OK to accept
default name.
In addition to narrowing the ranges for Roughness values, we will also reduce the
Increment to allow Darwin to achieve a more precise evaluation.
9) Click the Roughness tab and change the Minimum, Maximum, and
Increment values to match those in the screenshot below:

Because all of the demand adjustments suggested by Darwin are 1.25 or below,
we can narrow this range to reduce the size of the solution space that Darwin
must consider.
10) Click the Demand tab. Right-click over the Maximum column and
select Global Edit. Change the value to 1.25.
11) Click the Go button.

10

Darwin finds the optimal solution with an extremely low fitness number, and stops
calibrating when it finds a solution with a fitness that falls within the Fitness
Tolerance, which can be specified from the Options tab.
The same two pipes, P-1 and P-60, are again reported as being closed. The
highest reported demand adjustment is now 1.15.
This, the fittest solution arrived at by Darwin Calibrator, is in fact the exact set of
roughness C factors, demand multipliers, and link statuses that were applied to
the original model to generate the fictitious field data used in the calibration.
The amount of control you have over the calibration process is one of Darwins
great advantages. With your guidance, Darwin quickly focuses in on the best
solution to produce realistic and appropriate results.
Darwin Calibrator also provides a means to graphically display the proximity of
the results produced with the calibration adjustments to the field data. Click the
button on the toolbar next to the solution selection box. The red
Plot
diagonal line represents a perfect match between the simulated results and the
field data. The simulated results of this solution are almost an exact match to the
field data the miniscule difference is only visible if you increase the display
precision of the HGL output.

11

Now that we have an excellent calibration candidate, this solution can be


exported to a new scenario in the model. Click the Export to Scenario
button on the toolbar next to the Solution pulldown. In the Export Calibration to
Scenario dialog that appears, you can name the scenario that will be created,
and specify and name the alternatives that will be created. You can export as
many solutions you would like, each to their own scenario and alternatives.

Lesson 4 The Importance of Accurate Field Data


Accurate field data is crucial to the accuracy of the calibration adjustments that
are generated from it. To illustrate this, we can introduce an error into our field
data.
1) Open the Uncalibrated - Lesson 4.wcd model.
2) Click the Darwin Calibrator

button.

This model contains the same adjustment group, field data, and calibration
information that your model did at the end of Lesson 3, with one exception the
field data set 9 AM, J-150 is missing.
3) Click the Field Data button.
4) Click the Add button, and enter the name Bad Data. Click OK.
5) Type 9 a in the time field.
6) Click the Import button, and select the Bad Data.txt file.
7) Click the Demand Adjustments tab. Select J-150 in the Junction
column, and type 500 in the Additional Demand column. Click OK.
8) In the Field Data Sets dialog, click OK.
The only difference between the field data contained in the Bad Data field data
set and the 9 AM, J-150 set that was used successfully in Lesson 3 is that in
Bad Data, the pressure reading that was used to calculate the input HGL was
recorded incorrectly by the engineer who performed the flow test.
Rather than the correct pressure of 103.9 psi at 755 feet, the pressure was
recorded as 108.9 psi at 755 feet, resulting in an HGL of 1007 rather than the
correct HGL of 995. Lets see what effect this error will have on the calibration.
9) In the Darwin Calibrator dialog, highlight Optimized Calibration -1
and click the Go button.

12

This calibration generates a solution with a fitness of over 500, as opposed to the
fitness of a less than 1 produced using accurate field data, as in Lesson 3. More
importantly, this error prevents Darwin from finding the correct solution on the
second calibration run, as it did in Lesson 3:
10) Highlight Optimized Calibration 2 and click GO.
As can be seen by this example, the more precise the field data is, the more
precise the resultant calibration will be.
Darwin Calibrator, however, assists you in finding and eliminating these errors.
button above the results pane of the Calibrator window. In
Click on the Plot
the upper right-hand corner of the plot, you can see that the most significant
deviation from a 1:1 correlation is caused by the Bad Data data set. As in this
example, this graph can point you in the right direction when looking for errors in
your field data.

If you distrust the accuracy of data contained in a data set, you have the option to
remove that set from the calibrators consideration. Click on the Field Data tab
and uncheck the corresponding box in the Active? column, as shown in the
screenshot below:
13

Lesson 5 Adjusting Roughness Factors Exclusively


As seen in the previous lesson, Darwin Calibrator has the ability to calibrate a
water distribution model very quickly and to a high degree of accuracy. How does
this ability compare to less advanced automated calibrators that can only adjust
pipe roughness? To simulate one of these calibrators for comparison purposes,
we can perform a calibration that does not contain demand or status adjustment
groups.
1) Open the Uncalibrated lesson 5.wcd model.
button.

2) Click the Darwin Calibrator

3) Click the Groups button and highlight Demand. Delete all of the
demand adjustment groups.
4) Highlight Status and delete the status adjustment group. Click OK.
5) Click the New Base
settings.

button, and click OK to keep the default

6) On the Roughness tab, right-click over the Operation column and


select Global Edit. Change the operation to Set.
7) Keep the default values of 65 minimum, 195 maximum, and increment
of 20. Click the Go button.
The fitness of this calibration is over 2700, and the roughness values are not
correct. When the calibrator picks values at the extreme high or low end of the
range, it generally means that the range is not large enough for the calibrator to
work with. We can expand the range to see if more reasonable solutions can be
found.

14

8) On the Roughness tab, change the minimum for all adjustment


groups to 10 and the maximum to 500. Change the increment to
10.
9) Click the Go button.
While the fitness is much better, the adjusted C factors are still not reasonable,
and there is a relatively large disparity between the simulated results and the
field data. Expanding the range further may improve the fitness, but would do so
by suggesting even less credible C factors.
This inability to produce accurate or even reasonable numbers is not surprising
without the ability to find the closed pipes or adjust demands, the calibrator can
only adjust roughness values in an attempt to account for the network conditions
that are in actuality also influenced by these additional factors.

Lesson 6 Manual Calibration


In addition to optimized calibrations, Darwin Calibrator also provides the ability to
manually calibrate your model.
1) Open the Uncalibrated Lesson 6.wcd model.
2) Click the Darwin Calibrator
3) Click the New Base
Click OK.

button.

button, and choose Manual Calibration.

Rather than setting ranges for Darwin to assign to the various adjustment groups,
you set the value that will be assigned to each group. In the case of the Status
group, you set the status for each element in the group. Leave the default
settings as they are, or input some values and click Go.
Darwin then applies these adjustments to the model and reports the proximity of
the simulated run to the field data, and provides a fitness rating. All of the tools
that are available for use with optimized calibrations are also available for manual
calibrations to assist you in assessing field data validity and to find the optimal
calibration for your model.
Manual calibration can be used in conjunction with optimized calibration to test
various adjustment combinations, allowing you to contribute your knowledge of
the network to the calibration process.

15

Conclusion
As the preceding lessons have demonstrated, Darwin can greatly expedite the
calibration process by harnessing the power of Genetic Algorithms to automate
the time consuming and tedious task of trial-and-error model adjustments. This
results in allowing you to quickly and easily calibrate your model to a previously
unattainable level of accuracy, making the model much more valuable as a
planning and decision support tool.
The ability to produce an unlimited number of solutions from a single calibration
run, as well as to create manual calibrations, provides unlimited flexibility to
incorporate the engineering judgment that is critical to the calibration process.
Tools such as the plotting feature and the ability to deactivate field sets during
calibration runs assist you in assessing the accuracy of the field data to ensure
the precision of the calibration.
Darwin works with the engineer, providing tools to eliminate the tedious aspects
of the trial-and-error process, to improve efficiency and result visualization, and
to test many more possible adjustment combinations than is possible to test
manually.

16

Anda mungkin juga menyukai