PID Control of Distillation System

Geoff White

Member
Join Date
Oct 2005
Location
Brisbane
Posts
461
Hello All,

I have been PLC programming for a long time but I am doing my first process control project and it's a doozy. I have been reading up on the PID control thing for some time and I thought I would start trying to get some advice on control strategy and implementation.

I am working on a distillation water treatment plant. It heats up brine using steam and then uses a compressor to recover the latent heat and a heat exchanger to recover the sensible heat from the distillate back into the feed water.

The condensate collects in a tank. The tank level is controlled using a level controller which should produce a flow equal to the amount of condensate being produced.

The first problem I have is to control the level of brine in the "kettle". The kettle has a large volume compared to the flow in and out of it. Because of the heat exchanger, the flow into the kettle needs to be closely matched to the flow exiting in order to maximise the heat recovery.

Because of this I was proposing to control the flow of brine into the system using the measured flow of condensate leaving the system and try an modulate this based on level.

I have flow meters on the inlets and outlets as well a pressure transducers for level measurement. Fine control of the level is not needed but should help with balancing the flows as there is a need to remove some of the concentrated brine to stop the concentration from climbing too high with time.

So I now have a measured flow of distillate leaving the system. (Based on Level control of condensate tank)
A calculated flow for brine entering the system based on distillate flow.
A PID loop for controlling the flow into the system using the calculated value above as its setpoint.

How do I implement level control of the kettle (PID?) on top of the mass balance system in such a way that they don't fight each other?

Do I need to under drive calculated feed flow so that error in the level controller is able to lower the level?

I am using compactlogix PLC if that helps.

TIA
 
A simple picture (P&ID) would help

I see two PID loops and a feedforward
Condensate level PID
Brine Level PID
Distallate Flow out (the Feedforward)

ie Flow in = Condensate Flow out + Brine level PID output.

The flow into the brine tank - is mathematically related to the level
Flow in - Flow out via condensate = change in volume of the Brine tank
which also = X-sectional area * change in level

There are time delays due to filling the condensate tank etc.
 
You are on the right track, typically during a startup you will be ramping things up then look for the right conecntration before switching to PID.

Work out a P&ID diagram, post it here and we can take a look.
 
The condensate collects in a tank. The tank level is controlled using a level controller which should produce a flow equal to the amount of condensate being produced.
Yes

The first problem I have is to control the level of brine in the "kettle".
Is this the same as the tank above?

The kettle has a large volume compared to the flow in and out of it. Because of the heat exchanger, the flow into the kettle needs to be closely matched to the flow exiting in order to maximise the heat recovery.
So what you are saying is that differences in flow will only show up as slow changes in the level. If the in and out flows must be matched that exactly then the only purpose for having a big tank is the heat exchanger?

Because of this I was proposing to control the flow of brine into the system using the measured flow of condensate leaving the system and try an modulate this based on level.
Because the tank is so big compared to the flow it is hard to measure the difference in flows by looking at the rate of change in the level. What you are doing with your flow meter is creating a disturbance rejection feature to add to the level PI controller. This should be MUCH MORE ACCURATE derivative term for your PI level control. The out flow should be used to generate a bias for your level control PI controller. What you want to do is adjust the scale factor on the out flow to the PI bias until you see the that the output of the PI is close to the output of the PI. This means that the output flow bias is doing most of the work and the PI level control is doing little.

If the there is a level error and the tank level PI controller has the integrator enabled, the integrator will wind up enough to change create and error in the flow so the tank level matches the set point. This may cause the flow rates to have a bigger than desired difference.

How do I implement level control of the kettle (PID?) on top of the mass balance system in such a way that they don't fight each other?
You can't and they will. You have only ONE valve to control the in flow. It is impossible to change the level of the tank without changing the rate of flow in and out. They are tied together because the change in level is the integral of the error in flow.

Do I need to under drive calculated feed flow so that error in the level controller is able to lower the level?
You can't. You can't change one without changing the other. What you can do is change the level slowly enough so that the difference between the in-flow and out-flow is within a tolerable limit. This means that the integrator term must be very slow when correcting level errors to keep the differences in flow small.

What is worse, an error in flow difference or an error in the level?
 
It seems to me that trying to control both flow and level in a tank is like trying to change current and voltage simultaneously.

I think I would control on tank level only and let the feed valve control the level.

Are you distilling from sea water or from brine or from a mix of fresh and sea water ie at river mouth to sea?
One thing I think you have overlooked is brine dilution. You must drain off some of the brine to keep your brine concentration within reasonable levels. I may not have the ratios correct but it would look like this
2X FEED = X Brine out (dilution) + X CONDENSATE

You may also have to inject some kind of descaling chemical.

Dan Bentler
 
Attached is a thumbnail sketch of the process. The P&ID is massive. There are over 40 analog instruments on the beast. I think there is about 50% more than can ever be used by the program.

The brine is pumped in via proportional valve. The condensate is pumped out via proportional valve also. The concentrated brine is discharged by pump and non-proportional valve. (yes it has a flowmeter)

I realise that flow and level cannot be satisfied simultaneously. I stated before that consistent flow is more important than tight level control. Steady state error is even acceptable. I am more concerned about keeping the energy balance as even as possible to reduce the amount of steam required. Trying to add steam to keep the whole lot at the right temp is a later problem. The better the flow balances work the easier the steam problems will be.

The system is a brine concentrator. It is used to reduce the volume of salty waste water by increasing its concentration. When the concentration reaches a set level some of the brine will need to be removed from the kettle to stop is getting too high and precipitating. So initially the flow in should be very close to the flow out. Once at target levels there will be volume drawn off disturbing the balance. The volume drawn off will probably be a ratio of the distillate coming out rather than try and add another loop to control the concentration.

By underdriving the flow in I meant that if I add the Level PID output to my calculated flow I need the base flow to be low so when the PID output is 0 it can actually cause a drop in level.

dumies_pid.PNG
 
Brilliant Schematic

No Integrator - So why use a PID?
Peter is suggesting the level control is a PI with No Integrator
The Bias is the feedforward or D term that is not in use here.

Peter is this what the maths ends up with?

Feed in(l/s) = Condensate out (l/s) + Brine discharge(l/s) + Level Error * Gain

The Gain (or P) is to convert level into flow so I would expect to be directly related to cross sectional area of the kettle and the desired level response.

Note Level Error is signed so that when feedback is above the setpoint it reduces the Feed in requirement to lower the kettle level
 
Last edited:
What about temperature? Isn't that the root reason for the caution on the flow rates aside from level?

Doesn't this system have an ideal operating temperature range that needs to be maintained or at least monitored?

I visualize two major outer process variables to be regulated perhaps by inner PID loop(s) with some select case type logic to maximize efficiency. Temperature and flow.

What adds heat to the kettle? Is that missing from the drawing?

What are the typical (or targeted) temps seen by the heat exchanger for each fluid at the inlet and outlet?

Also, I could be wrong, but one main purpose of the compressor may be to draw a partial vacuum on the kettle to reduce the vapor point thereby saving energy.
 
Last edited:
Brilliant Schematic

No Integrator - So why use a PID?
All that is needed is the P gain and the bias. Yes, one could roll their own but if you make it conform to the way Rockwell does their PIDs it would be easier for the next guy to figure out how it is scaled.

Peter is this what the maths ends up with?

Feed in(l/s) = Condensate out (l/s) + Brine discharge(l/s) + Level Error * Gain
Yes but the details of the units are missing. I think Rockwell controllers do everything in counts but if you roll your own then the counts can be converted to liters/second as you have shown. At the very end the InFeed flow is controlled by a sending a count to a digital to analog converter.

Note Level Error is signed so that when feedback is above the setpoint it reduces the Feed in requirement to lower the kettle level
In other words the gain is negative.

I would adjust the gain so the that proportional gain will cause the valve to be fully open when the error is at the maximum permissible.

This shouldn't be to hard.
 
There is need to add heat to the system and it is done using boiler fed from the condensate prior to the hx. There is also a 350kW motor on the compressor adding energy to the system. I think the theory of steam only being used in start up is sf (sales fiction)

The compressor lowers the boiling point of the brine and compresses the steam in the shell of the falling film condenser to transfer the heat back to the brine.

Adding steam will be interesting. I need to find a way to add it to the brine to bring it up to near boiling point. I know the temp and flow rate of the water entering but how much steam to add. If you add too much steam you still only go to the boiling point. The plan is to allow the pressure to bleed from the deairator (to dump non condensables) and control the pressure in there.

So for this I end up with a pid loop controlling the pressure. I don't know how to feed forward the flow and temperature of the water leaving the hx.
 
This project is also a rebuild of a machine that was rotting in pieces in a paddock. There is some very vague documentation about how it was supposed to work including using proportional control for the level. But they were saying they were using a deadband of about 50% of the level. I imagine this would introduce a significant change to the flow when it crossed the deadband!
 
The simplified schematic seems to depict a single-effect evaporator with mechanical vapor recompression. (How you refer to something drastically affects your search outcomes). Evaporators and their control is a chapter topic in Liptak's book, 'Optimization of Industrial Unit Processes'.

I'm still not clear which flowstream does not have a flowmeter (feedwater, purified water, brine). Note that some coriolis mass meters can also be used to provide a density reading as well; this would be great on the brine flow. Otherwise, some assumption of vapor-liquid equilibrium and using temperature (at a fixed pressure) may be used to infer concentration.

The schematic you provide, though helpful in determining what we're talking about, is insufficient for devising an effective control strategy for the overall unit. Likely, the throughput and turndown will be determined by the compressor capacity and characteristics (energy input via speed control) as well as whether you use steam to supplement this (or just for startup).

Good luck
 
The plant has flowmeters and pressure and temperature transducers everywhere there even seems to be redundant units. Part of the problems I am anticipating is that differential pressure units have been replaced with pairs of liquid and vapour pressure transducers. The The concentration is measured using a conductivity transducer on the recirculation line that pumps the brine through the pipes of the condenser. Just the difference in noise and response time of the units are going to make it hard to get a stable level measurement. I anticipate using a rolling average to make them seem sensible.
Thanks for the heads-up on the book. It does look pretty good. I have ordered a copy. Hopefully it will help alleviate some of my work-mares.
 

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
5
Views
217
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
844
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
384
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
891
Hey guys! I'm a newbie in the control area, so I'm gonna drop some thoughts here... We want to control the opening of big silos (about 1900...
Replies
6
Views
1,466
Back
Top Bottom