Process Controls - PLC programming

B

Thread Starter

Bill

I am doing a project where I have a steady water flow that changes no more than 200,000 gallons a day. There is a clorine analyzer that I am controlling with a 3705 Tele PLC using PL7 software. The specs are 0 to 10mgd of water flow and 0 to 10 mg/L of clorine. I get a 4-20 mA signal input from the flow transmitter and I put out a 4-20 mA signal to control the pump. I have written PID loop using the water flow and another using the clorine flow as the process varible but they will not pay for a start up I can not be there to tune the loop. So the analog output wanders and never settles as I would suspect since there is very little change in water flow. I want to rewrite the program not using a PID loop. I want to do a 1 to 1 ratio proportional program that would look at the water flow and adjust the analog out set point to match the rise or fall of water flow. At this time 3mg/l is where they want it to track but I have it adjustable from 0 to 10 mg/l just incase they need to add more of less. Has anyone written a program simular to this? Can anyone help?
 
B

Bill Clemons

You are correct in your approach to provide PID control to your chlorinator as a result of two variations: Total Plant Flow and Residual Chlorine Content.

To effectively address both variations in the control loop some manufacturers utilize a feed-forward PID algorithm. The algorithm can combine the flow measurement and the residual measurement as a sum or product to the controller output.

Another method, compound control, applies proportional band to the amount of Plant Flow and a reset (Integral Gain) based on the error between Residual Chlorine Content and Chlorine Setpoint. The algorithm is: (Flow * Proportional Band)+ (Reset + (Residual - Set Point)).

Other considerations include: Fixed Lag on the Residual portion to compensate for the Analyzer dead time, typically 2-5 minutes; Variable Lag on the Flow portion (seconds/MMGPD) to compensate for changing time constant based on throughput. Updates to the controller output should be scheduled, respectively, to these Lag times.
 
I am not familiar with the the PLC that you listed or it's capabilities.

Why couldn't you use a timer, some less than / greater than logic, and a binary add or subtract on the analog output? The timer would set the update time.

Start a timer. When it times out check the water flow rate. Store the flow rate in register 1 then reset and restart the timer. Compare the current stored flow rate to a setpoint (in a register?) to see if the flow rate is above or below the setpoint. If it's above add a 1 to the output word (or whatever increment value you want), if it's below, decrement the output by 1 (or whatever you want). You'll need low and high limit logic so that you don't increment above or below the analog output range. This method is simple and it has the added benefit of allowing a different increment rate vs decrement rate. You can put your increment and decrement factors in registers and set them from an operator interface.

I use something like this for control where the PV is from an analyzer. It seems to work well.

Michael Lloyd
DEFS
[email protected]
 
Top