Process Controller

Terminology/Background

Many of the lab experiments run by the AguaClara team use Process Controller, a LabVIEW based program, to run methodically run experiments and collect data. Users can configure sensors to control the system and collect data simultaneously. Before any experiments are run, Process Controller must be programmed correctly to control the processes of the experiment. There are four types of things that need to be defined in Process Controller in order for the program to control any process. These are States, Rules, Sensors, and Set Points.

For a more general guide to Process Controller (with tutorials), see the ProCoDA Software page.

Basics

Experimentation

Before running process controller for the day, you first must create a new folder to save data collected on this day. To do this, go to Datalog directory path and click the folder icon to the right. Create a new folder titled with the days' date in the format of MM.DD.YY and save by selecting Current Folder. Process Controller will save two excel files of the experiment in this folder: a datalog file and statelog file. The first column in both files is a time stamp that records time as a fraction of the day. The statelog file tracks when a state changes and what caused it to change; whether it was a rule or it was changed by an operator.

Upon opening Process Controller, click edit rules to see all the available states and rules.

Click on either the Set Points or Rules and States tab to view a list of each.

Under the Rules and States tab is a list of the states that control which pump is turned on and the amount of liquid coming in from each pump into the tank. These states include OFF, Turn pump on, Both Alum and Water Pump On, Change Location-stay, Residence Time of Tank, Hold, Change Location-leave, Increment Alum, and Run Increment Alum. These states have different rules that determine when the state ends and which state is next.

For example in the figure above, when Process Controller is switched to Change Location-Stay, the rules governing this state allows Process Controller to run in this state until the Elapsed time in current state is greater than the residence time of tube settler. When that happens, then the next state that Process Controller switches to is Hold.

After all modifications are made in process controller for the day the days setup should be saved. To save, click the disk icon (shown by the red arrow) and save in the setup in format of Setup Month DD in the folder created for the day

Set Points

As seen in the figure above, residence time of tube settler is a set point created to hold the value of the residence time of the tube settlers. Set points can be either variables or numerical values.

States:

Alum pump on: Set point

HMI VI Path

This is an application that displays a visual representation of the system and system sensors after the system has been programmed in. We generally do not use it so HMI Failure is not a problem.

States

To toggle between states, click on the Plant Operation tab after opening process controller. On the upper left corner, the states can be changed by clicking the up or the down arrow.

Every pump is turned off. Nothing is running during this state.

This state turns only the water pump on. Process controller stays in this state unless changed by an operator.

This state turns on both the alum pump and the water pump. For the alum dosing, the A + Blog(NTU) formula for dosage is used. Process controller stays in this state unless changed by an operator.

Both pumps are on in this state. After the residence time of the tank has passed by, Process Controller switches to the Hold state. For the alum dosing, the A + Blog(NTU) formula for dosage is used.

Process Controller runs both pumps for the residence time of the tank then shuts the tank OFF. The A + Blog(NTU) formula for dosage is used for the alum dosing.

This state is the idle state. Leave Process Controller in this state when modifications are being made to the tank. It functions the same way as Both Alum and Pump On except data recorded while in this state are ignored.

Both pumps are on in this state. After the residence time of the tank has passed by, Process Controller switches to the Both Alum and Pump On state. The A + Blog(NTU) formula for dosage is used for the alum dosing.

Both the alum and water pump are on in this state but a different dosing of alum is used that starts the alum dosage at a set level and increases it by a preset amount. Process controller runs on this state until the residence time of the tank has elapsed, then Process Controller switches to the Run Increment Alum state.

This state is the same as Increment Alum except Process Controller switches to the Increment Alum state after the residence time of the tank has elapsed.

Set Points

OFF- if "if" statement reads true, whatever is running (plant, alum pump, etc.) is turned off. (unit: none, Type: Constant, value: 0)

ON- if "if" statement reads true, whatever is running (plant, alum pump, etc.) is turned on (unit: none, Type: Constant, value: 1)

a (for alum dose) - Constant for alum dosing equation (unit: mg/L, Type: Constant, value: varies). See: Alum dose

b (for alum dose) - Constant for alum dosing equation (unit: mg/L, Type: Constant, value: varies). See: Alum dose

raw water 1 ID - Method that identifies the raw water turbidimeter (unit: none, Type: Constant, value: 1)

floc sample 2 ID - 4 ID- Methods that identify turbidimeters 2-4. These are connected to the tube settlers. (unit: none, Type: Constant, value: 2-4 depending on which turbidimeter it is connected to.)

raw water turbidity 1 - Method that connects the turbidimeter to process controller and allows data collection. (unit: none, Type: Variable, value: turbidity reading) Uses set point "raw water 1 ID".

floc turbidity 2-4 - Methods that connect the turbidimeters to process controller and allows data collection. (unit: none, Type: Variable, value: turbidity reading) Uses set point "floc sample _ ID" .

plant flow rate - Place to keep track of incoming flow. This effects alum dose and is used throughout process control. (unit: mL/min, Type: Constant, value: determined flow rate of plant. MAKE SURE UNITS MATCH ACTUAL VALUE)

alum stock concentration - Keeps track of concentration of alum stock solution. Used for alum dosing. (unit: mg/L, Type: Constant, value: determined stock concentration. MAKE SURE UNITS MATCH)

alum dose - Method for alum dosing, based on equation: y = a + b*log(NTU). (unit: mg/L, Type: Variable, value: matches current dosing value). Set points: a (for alum dose), b (for alum dose), raw water turbidity.

tubing size (for alum pump) - Size of tubing being used with alum pump. Important for proper alum dosing. (unit: none, Type: Constant, value: depends on type of tubing used. Usually 16.)

alum pump control - Method that controls alum pump. Essential for alum dosing. (unit: none, Type: Variable, value: equivalent to current alum dose) Set points: plant flow rate, alum stock concentration, alum dose, tubing size (for alum pump)

residence time of tube settler - Residence time of tube settler. (unit: s, Type: Constant, value: actually 7, but 14 minutes used. Must be in seconds)

Residence time of tank - Residence time of tank. (unit: s, Type: Constant, value: 18 mintus, or 1080 seconds.)

Alum dose increment - Method that allows for a state to automatically vary the alum dosing according to specified parameters. (unit: none, Type: Variable, value: 0) Uses set points: reset state, state to increment, slope, intercept, max x. The method automatically starts at -1.

Reset state - state that automatically sets to 0 when entered. (unit: none, Type: Constant, value: 6. This is the position of the Hold State. The state was picked randomly.)

State to increment - identifies which state is being incremented. In our case it is the state "Increment Alum" (unit: none, Type: Constant, value: 8 - this is the position of the state "Increment Alum" in the State list.)

Slope - Runs the equation y = mx + b. x is automatically incremented by 1 so it must be changed if you want otherwise. For our case we are using 5 because we are incrementing from 0-30 and do not want 30 data points. (unit: mg/L, Type: Constant, value: 5)

Intercept - Runs the equation y = mx + b. Defines what you want the y intercept to be. In our case we are using it to vary the alum dosing. We want results for values between 0-30 meaning the first data point is at 0 so we have a y intercept of 0. (units: mg/L, Type: Constant, value: 0)

Max x - Maximum value of incrementation. In this case it is being used by "Increment Alum". We are incrementing by five and want a maximum dose of 30, so our max value is 6 but since x starts at -1 instead of 0 the value is increased by 1 to compensate, leaving us with a value of 7. (unit: mg/L, Type: Constant, value: 7)

Found residence time of tank - is the residence time for the tank when done visually by turning off alum, letting the tank run for a while, then turning the alum back on and watching how long it took for flocs to exit. This came out to be 39 minutes. This is currently irrelevant and not used. (unit: s, Type: Constant, value: 39 minutes)

Increment alum time - time that increment alum spends in increment alum. State doesn't actually control x but allows for a loop. State where alum is incrementing, no testing is done.

Alum pump control increment - Method that controls alum pump, uses alum dose increment instead of alum dose. (unit: none, Type: Variable, value: 0) Set Points: plant flow, alum stock concentration, alum dose increment, tubing size.

Tubing size (for alum pump) - same as other, but used by alum pump control. Selected Set Points must be in same order as in Required Set Points so this was created to have proper sequencing.