# PID Setpoint Question

B

I'm currently working on a project whereby a customer wants to blend two products in a pipeline. The operator will enter the required
quantity of each product in barrels on a touchscreen, and amounts of each product will be measured with turbine meters. The rate at which
one product is pumped is constant, and the rate of the other can be throttled with a control valve. The customer wants the process to
operate such that the products will mix evenly throughout the pumping cycle. So, at the end of the run both pumps will finish at the same time having pumped just the right amount of each. I'm attempting to accomplish this through the use of a PID block in a Modicon PLC. My question is this: What is the better way to establish a setpoint for the loop? I can use the values input by the operator to find the percentage of variable rate product to constant rate product. Then should I measure the current volume pumped by the constant rate pump, find the volume the variable rate pump should have pumped and use
this as the setpoint, or should I express the setpoint as a flowrate based on the rate of the constant rate pump? As this is my first
experience with PID control any help would be greatly appreciated.

Panel Specialists, Inc.
[email protected]

A

#### Arnold Dillon

This sounds like a ratio controlled batch setup. The product that pumps at a constant rate in the uncontrolled variable. The second product is
controlled as a ratio of the flow of the first. You'll probably have to do some more arithmetic to get the display setpoint to show up to the
operator correctly.

J

#### Johan Bengtsson P&L Automatik AB

Well, I am probably loosing something in the translation, but as I understand your alternatives they sound the same and are right.

Anyway:
Since you don't have any way to change one of the flows you have to accept whatever that flow is right? Call that one flowA.

You can then control the oter flow, flowB, and you want that to be:

flowA*amountB/amountA, that is your setpoint for flowB amountA and amountB is of course the total amount you want for each substance.

There can be some small error during startup and shutdown when the controller for flowB lags behind the other flow. I don't think this will be a problem however if you can make the PID tuning quite fast.

/Johan Bengtsson

----------------------------------------
P&L, Innovation in training
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------

G

#### gerald beaudoin

We are using a similar process to inject material A into a variable flow of material B. The flow of B is measured with a mass flow meter and fed
to a ABB C300 series controller. This controller works very well for this application as it allows remote setpoint input (flowB) and also allows the controlled output to be expressed as a ratio. This allows the operator to just key in the percentage of product A that he wants added to the flow of B and the controller does the rest. No touch screens but it its cheap and dirty and it works!

Gerald Beaudoin

B

#### Blunier, Mark

> I'm currently working on a project whereby a customer wants to blend
> two products in a pipeline. The operator will enter the required
> quantity of each product in barrels on a touchscreen, and amounts of
> each product will be measured with turbine meters. The rate at which
> one product is pumped is constant, and the rate of the other can be
> throttled with a control valve. The customer wants the process to
> operate such that the products will mix evenly throughout the pumping
> cycle. So, at the end of the run both pumps will finish at the same
> time having pumped just the right amount of each. I'm attempting to
> accomplish this through the use of a PID block in a Modicon PLC. My
> question is this: What is the better way to establish a setpoint for
> the loop? I can use the values input by the operator to find the
> percentage of variable rate product to constant rate product. Then
> should I measure the current volume pumped by the constant rate pump,
> find the volume the variable rate pump should have pumped and use
> this as the setpoint,

I think you'd have difficulty getting it to work. When you start out, you've pumped 0 gallons of A, so set point of B is 0. A starts to to pump, now B is behind, If you don't put integral in the equation, B will always be behind. If you add integral, you will end up with B overshooting A, if you a able to get it tuned enough to be remotely stable.

> or should I express the setpoint as a flowrate
> based on the rate of the constant rate pump? As this is my first
> experience with PID controll any help would be greatly appreciated.

This would be much better. However, if B does not come up to flow as fast as A, the flow that you were shorted, you won't get back.

A third way, do it like about, but keep recalculating how much of A is left to pump, how much of B is left to pump, so that you have a dynamic ratio. Then use your dynamic ratio along with the flow rate of A to determine the set point for B. This way, the ratios will be close, and the totals will come out right as well.

Mark Blunier
Any opinions expressed in this message are not necessarily those of the company.

O

#### Orsini Livio S.

I belive that the best way to solve your problem is to work with feed forward plus feed back.
If "A" is the products with the pumped rate constant, and "B" is the products with the pumped rate that can be throttled with a control valve, the operator will enter the required quantity of each product. The control system (PLC plus HMI device) by a simple equivalence will compute the ratio A / B and the percentage of the control valve set point . This value is the feed forward value and the PID set point. The PLC will measure the total volume pumped of "A" and "B" and the deviation will be processed by a PID function. The PID output will be added to feed forward.
For example we suppose that the final product requested will be composed by 1250 barrels of "A" and 875 barrels of "B"; the pumping rate of "A"
is 3 barrels /min. and the maximum pumping rate of "B"(100%) is 3.5 barrels /min. The ratio "A"/"B" is 70% and this is the set point
(reference level) for PID function, but the "B" flow is 116.66 % of "A" flow: the control valve set point will be equal to 60% of the maximum.
Now the PLC must mesure, or compute, the total amount of "A" and "B" products pumped, and computes the ratio "A"/"B" in percent, this value
is the feed back of PID function; the PID output will be scaled (1/10 f.e.) and added to set point of control valve.
If you want increase the regulator efficiency, You can impose a threshold on integral part and increase or decrease the set point of control valve until integral part comes back under the threshold.
I have applied this regulation stategy on several differrents regulation always with very good results.
If You need I can send a blocks diagram.

Livio S. Orsini
LSO Engineering
Software and Automation Consultant
[email protected]

J

K

#### Koen Verschueren

This is a standard ratio controller. Calculate the ratio and use this value as the PV of the PID controller. ((FlowA/FlowB)*100) This formula gives you the flow ratio in %. In the SP of the controller fill in the desired ratio in %.

D

#### D Cates

Brady, you may have a solution by now but I just noticed your question. I did this with the PID2 function in 1989 blending three fluids
using PDMs, the valves were three stage solinoid units which made it a bear at first. If you still need any ideas contact me off-list.
[email protected]