PID Setpoint Question

B

Thread Starter

Brady

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.

Brady Matherne
PLC / SCADA Tech
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
As you express the problem there are actually two separate control issues. Let me put it this way. Some one says to the operator, "I want 5000 barrels of RH35 heavy fuel oil.", or "i need 5 tons of 40% caustic solution" This shows you he wants 5000 barrels or five tons of the blended product. This is a batch control problem. If you have a meter in each stream, they each will output a flow total as a pulse per unit volume and you need to sum the pulses from each meter into a batch counter. The batch counter will shut the system down when you have delivered 5000 barels or 5tons or 5 gallons, irrespective of the quality. That this is of RH35 grade heavy fuel oil or 40% caustic tells him the quality he needs. Quality depends on the relative proportions of the ingredients in the final product blend. In pipeline blending this is maintained all the time. In pipeline blending this will be controlled by continuously controlling the ingredient streams to maintain the flow rate ratio of ione ingredient to the other. So you need two pieces of information as set points: the ratio and the batch size. What you seem to be being offered is the right data in the wrong format. You don't want the volume of each ingredient, you want the total volume and the ratio of one to the other. You should ask in what form the operator gets his data. No one these days allows operators independant thought, so i doubt he is calculating these values. If some one wants so many barrels of such and such quality, he will have a chart or a table from which he will read off the volumes of each ingredient necessary. What you need is to have this replaced with something that gives you the information in the form you need it for control. i.e. a ratio set point for the flow rate ratio control and a batch size for total volume delivered control (batch control).(I hope you won't have to calculate this if it is heavy fuel oil blending or lube oil blending or even crude oil pipeline control because the volume ratios are calculated using the very complex ASTM D341 method. Which is only ever right once per set of lab measurements and almost imediately will change as ingredient quality changes. In wild stream pacing the master stream flow rate is uncontrolled. The ratio controller reads the flow rate of the master stream and continuously adjusts the flow rate of the slave stream to maintain constant flowrate ratio, the ratio is manually entered or entered via remote set point as a 4-20mA say. This is the value you are needing each time from the operator. You have a better situation in that once established the master stream is a constant flow rate. This makes control easier. This means that whenever the master stream flows, the slave stream will stay in step at a relatively constant flowrate. Now, the batch function. If the operator wants 5000 barrels or 6000 barrels he just enters this as a value. This is the sum total of the blended product. As the two streams flow, the flow totals from both streams should be added together. This value is then counted in a batch counter and when the value reaches the target value the batch controller shuts down the whole system. Don't forget to interlock pumps and valves to ensure that pumps aren't running against closed valves. You can sharpen the system up by using "remembered" valve positions for the slave stream so that when you start to blend the slave stream valve opens to the last good position. Then, once the flows have stabilised the slave stream goes under control. This helps to prevent undue hunting during start up as the slave stream tries to track a fast changing master stream. Incidentally, ratio control is probably not the objective here, it is a means to achieve an objective. For example, the client may be thinking in terms of how to manage his flow streams so that he can blend in line and do away with a mixing tank. In the past he probably started knowing how big a batch he needed then worked out how much of each ingredient he would need for a given quality. Then he would independantly batch flow each ingredient into the mixing tank. However, in line mixing requires that the quality at all times is correct, not just at the completion og the tank mixing cycle. This is supposedly achieved by controlling the flow rates to make sure they are always in ratio, but good flow rate control is the means, not the end objective. By itself it cannot assure constant quality. It can only assure that whatever the final quality, it was achieved through the exact blending of volume "A" with volume "B". If the individual ingredient qualities change then the final quality will change because the relative volumes of the ingredients were calculated assuming one set of qualities which later changed. This is a common problem in caustic blending applications, for example and in many oil industry blending applications. In caustic blending i know of one pharmaceutical company which had three mass meters and still hadn't gotten rid of the batch tanks or the lab testing and correction in the batch tank.. This is because they started to try and control quality using flow rate ratio control. But the exothermic mixing reaction caused density and viscosity variation which affected both the meter accuracy and the volumetric ratio (which caused them to drop the simple volumetric meters in favour of mass meters)Then they found that despite all this and paying top dollar for raw caustic the quality still varied enough (from raw caustic quality variation)that they had to retain the blended caustic in the old mixing tank, run lab samples and make final adjustments. What they finally did was measure the caustic concentration after it blended in the pipe line (with a density meter) and adjust the slave stream valve position (irrespective of the master stream)to maintain constant quality. In this way not only did they re-deploy the three mass meters, the mixing tank and at least one control valve, they were also able to acept more quality variation in the raw caustic and pay less for it. Now you say you are using turbines. They will give you a 4-20mA proprotional to flow rate and a pulse per unit volume of flow. You need a ratio controller to take in the two flow rate signals and a set point signal (from your Modicon PLC?)and you need a summator to add together the totaliser pulses and a batch counter to add the sumated pulses together and shutdown the system when the sum total raches the target. How much can you do in the Modicon? Some turbine electronics can have all you need in a multistream flow computer.
 
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 %.
 
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]
 
Top