Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A core feature of the ProCoDA software is the user programmable feature that facilitates customization of the control logic for specific tasks. The rule editor provides a programming environment for setting up states, control logic, set points, variables defined by links to external code, and selecting which user defined parameter controls each output in each state.

States

Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:control settings for each state}[!ProcessProCoDA Controller^stateoutputsoftware^stateoutput.jpg|width=300px!|ProcessProCoDA Controller^stateoutputsoftware^stateoutput.jpg]
h5. View of the controls used to set all of the Stamp® Microprocessor outputs. These controls can have different values for every state. The "output settings" in the middle column are drop down menus containing a list of all the defined constants and variables.
{float}
States represent different control configurations. For example, rapid sand filters could have several operating states including normal down flow operation, backwash, and filter to waste. Each of these states has different control settings (valves are in different positions) and each of the states has different rules determining when the state ends and which state is next. The ProCoDA software has independent #control settings for each state. The rule editor is used to set the value of each output control. Outputs can be set either to 0 (grey lightbulb) or 1 (lightbulb) or they can be set to intermediate values. If a fractional value between 0 and 1 is assigned to a Boolean output (such as solenoid valves) the ProCoDA software will toggle between 0 and 1 to attain the target value. If a fractional value is assigned to a pump speed control the pump will operate at the fractional value of its maximum speed. The parameters that are assigned to each output can be either constants or variables.

Rules

Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:exit rule}[!ProcessProCoDA Controller^variabledefinitionsoftware^variabledefinition.jpg|width=300px!|ProcessProCoDA Controller^variabledefinitionsoftware^variabledefinition.jpg]
h5. Rule that ends the state named "BW filter after challenge" when the time in that state exceeds the set point "backwash (filter) time". The rule also indicates that the next state will be "Acid wash".
{float}
Rules are used to set the exit conditions for states. A common #exit rule might be based on elapsed time in the current state, but it could also be based on sensor values or on a parameter that is calculated from a combination of sensors and other parameters. At a water treatment plant, backwash might be automatically initiated after 72 hours in the down-flow state, when pressure drop across the filter exceeds 1 m, or when the filtered turbidity exceeds 0.05 NTU. Each state can have multiple exit rules and the rules can have multiple conditions. The rules are executed and the output settings are updated approximately 20 times per second with the execution speed controlled by the software running on the Stamp microprocessor. Rules with multiple conditions are used when both conditions must be true simultaneously and thus create a logical "and" condition. Multiple rules are executed sequentially and the first rule that is true will cause the state to change to the state selected by that rule. Thus, multiple rules create the logical "or" condition, but with the added feature that each condition can have a different outcome. This feature is useful for handling emergency conditions that then cause the process to shutdown or for creating programs that cycle through different states depending on measured process values.

External logic

Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:math functions}
[!ProcessProCoDA Controller^addfunctionvisoftware^addfunctionvi.gif|width=300px!|ProcessProCoDA Controller^addfunctionvisoftware^addfunctionvi.gif]
h5. LabVIEW block diagram showing the external code that adds two variables or set points and returns the result.
{float}
LabVIEW executables can be enabled to connect to external code. This capability makes it possible to easily extend the capabilities of the ProCoDA software. The external code must be designed to meet specific requirements for the data types of inputs and outputs. An external code interface has been created to take a variable number of numeric inputs and produce a single numeric output. The external code can be used for a wide variety of functions including simple #math functions, a specialized function (such as one which sets a #coagulant dose based on raw water turbidity proportional-integral-derivative control that can be used to force a controlled parameter to a desired set point, and data acquisition functions that acquire digital data from instruments.
Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:coagulant dose}
[!ProcessProCoDA Controller^variabledefinitionsoftware^variabledefinition.jpg|width=300px!|ProcessProCoDA Controller^variabledefinitionsoftware^variabledefinition.jpg]
h5. Screen shot from the Process Controller showing how inputs are sent to external code. In this case the external code estimates an alum dose based on measured raw water turbidity and a simple model that relates turbidity and alum dose.
{float}
The programming environment for creating rules that determine exit conditions for states and which state to go to readily facilitates setting up the algorithms for controlling simple repetitive processes such as a sequencing batch reactors or rapid sand filters. For experimental purposes it is desirable to have the capability to systematically vary a parameter to test the performance of the process over a range of input values. This is accomplished via an external code that compares the number of specified replicates to a parameter that increments when the ProCoDA enters a specified state. The output parameter can be used to control pump speeds, times, or can be an input to subsequent calculations.

...

The parameter, x, is an integer that increments from zero to a maximum value set by the user. The output parameters, ylinear and ypower could be used to vary a flow rate, a chemical dose, or any other parameter.

Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:increment functions}
[!ProcessProCoDA Controller^incrementfunctionsoftware^incrementfunction.gif|width=300px!|ProcessProCoDA Controller^incrementfunctionsoftware^incrementfunction.gif]
h5. Increment functions showing how the parameter varies as a function of the state. In this example the state cycled between states 1, 2, and 3. The increment state was 2, the number of replicates was 2, the reset state was 0, the y intercept was 200, the slope was 50, and the maximum value of x was 4. The power law relationship used a coefficient of 100 and a base of 1.5.
{float}
The two #increment functions are dependent on the state cycles. The state was set to cycle between states 1, 2, and 3 with the exception of a manual reset to state 0 and then to state 1 to illustrate how the increment function is reset. The power law function is useful when it is desirable to explore a larger parameter space. However, care must be taken to ensure that the controlled processes have the ability to deliver the desired range of the varied parameter.

...

Filter Test Apparatus

Wiki Markup
{float:right|border=2px solid black|width=300px}
{anchor:photo}[!ProcessProCoDA Controller^photofiltrationapparatussoftware^photofiltrationapparatus.jpg|width=300!|ProcessProCoDA Controller^photofiltrationapparatussoftware^photofiltrationapparatus.jpg]
h5. Photo of the filter test apparatus.
{float}

Results and Discussion

Over the past 10 years ProCoDA software and hardware have been used by students to automate bench scale drinking water treatment plants, activated sludge sequencing batch reactors, temperature controllers, flow controllers, pH controllers, and a large number of other experimental configurations. These experiments were conducted as part of the Cornell University undergraduate curriculum in Environmental Engineering including the AguaClara program. In addition, the ability to automatically vary a parameter over a range of values has significantly increased our ability to characterize performance in research on unit processes for water treatment. As an example of this capability we present data from an experiment that was conducted to determine the effect of an aluminum hydroxide coating on porous media to enhance the removal of kaolin clay. The aluminum concentration in the feed during the pretreatment step was 2.5×10^-4^ mole/liter. The amount of aluminum applied to the filter was varied using the power law increment function to adjust the duration of the pretreatment state. Each of the pretreatment conditions was replicated and the results from the two tests were almost identical. The #data surface is from the particle challenge state from the 6 treatment levels and a replicate for a total of 12 tests.

...