# Rejecting sensor noise in tank level control

A
Thread Starter

#### Antony Hilliard

I'm having some serious trouble with flow/level control in a large tank. The tank is fed constantly, the tricky bit is that it's aboard ship and as the boat rolls, the level indicator changes value, and the PI-controlled pump ramps up and down to compensate. These variations in flow speed are hurting our process.

These variations in the apparent tank level have a period of about five minutes and an amplitude of between +- 2 to 5 cm depending on what kind of seas the ship is in.

Flow in is governed by a magmeter, at a constant rate of around 5m3/hr. The tank has a cross sectional area of 7m2 and the pump can run at between 2 and 7 m3/hr. So an apparent ten centimeter level change from ship's roll represents a volume equal to about ten minutes of system flow or an hour and a half of the inlet and discharge pumps running within 10% of each other (an acceptable value).

Right now we have a guess-and-tested P-I loop implemented to control the discharge pump. It maintains level well but at the cost of ramping the pump up to full speed then down to stopped, and repeating. Decreasing the integral component only makes it worse. Really, we don't care about the level in the tank varying +- 10 cm, so long as the flow is more or less constant.

Big tank, small pump, lots of signal noise. What should I do?

M

#### matt hyatt

How are you measuring the level?
Have you tried to average the level reading prior to going to your PID control?
Have you tried to set a lower discharge flow rate setpoint and then set upper and lower limits so your pump will not ramp up to full speed and down to stooped or 0 speed? It may be possible to maintain a more consistent flow rate (output) by slowing down the PID control (make it less sensitive), this way you can ride through the changing tank levels as the ship rolls and pitches about.

If your using an ultra-sonic level transmitter, most good ones have agitator elimination and averaging compensation options to reduce noise or false level signals or to reduce erratic level reading due to a sloshing effect inside a tank.
Pressure transmitters may only be able to give you a 10 second avergage at best, some prehaps longer, but I don;t think out to the 5 minute range.

matt

C

#### calvin smith

Where in the tank is the sensor located?
The closer to the center of the tank the better.
Have you tried to baffle the tank to reduce the
amount of change in the level. You could use a buffer to average the sensor signal. The only problem with a buffer is if it is to large there might be to muuch lag on the pump. hope this helps.

A

#### Antony Hilliard

The tank depth is measured with a bubbler-type hydrostatic pressure sensor on the side of the tank. It is all existing ship's equipment and there is no practical way to modify the level sensor nor to add any baffling to the inside of the tank.

Matt, by 'slowing down the PID control' do you mean using smaller coefficients or actually decreasing the frequency of the controller updates?

Averaging the signal is a good idea, but with these oscillations happening over five minute periods I wonder if what Calvin said about time-lagging the system will be a problem.

Upper and lower limits would also be okay but if we could get the PI loop to work properly I'd be happier.

I've tried to put together a theoretical analysis with transfer functions and process flow schematics but have become quite rusty since getting out of school! How frustrating.

Thanks for the quick feedback! Please keep it coming.

M

#### matt hyatt

Anthony,

I would try reducing the coefficients, if that does not work slow down the frequency of controller updates. I will continue some thought on this and do some reading, perhaps I will come up with something to assist you further.

There are some good post on here re: PI control and for sure do some searching. Does the bubbler have needle valves? if so, try turning them in a little at a time, this should reduce the amount of air/liquid in the unit and perhaps act as a why to average the signal, also, perhaps adding a way to pulse the air through the bubbler every 4 to 6 mins would help, I am trying to think of ways to average the signal, which would preclude change out of equipment.

Matt

B

#### Ben Janvier

If you want to get rid of a sine wave that has a 5 minutes cycle, you will need a 1st order filter of 8 minutes (90% attenuation). You CANNOT filter faster than your closed loop time constant. Also the selection of your closed loop time constant is dependent on you process constraints: if the time to overflow is 10 minutes, your closed loop time constant will be 10 minutes and the maximum filter time will be 3 minutes for your loop to be stable.

The first question to ask yourself is your retention time and your overflow time. The smallest time will set your time constant (the idea on a level is typically to keep it floating so that the inner flow controller is not going nuts). From the time constant, you can calculate PI settings. If the closed loop time constant is too small you HAVE TO FORGET about filtering. One of the solution might be to analyse the sine wave on-line and then predict the level disturbance that you do not want the controller to act upon. Simply take this predicted sine wave, substract the PV and control this new level measurement.

Hope this helps,

Ben Janvier, Process Control Consultant,
EnTech Controls

A

#### Andrey Romanenko

Hmm... even if the meter has no averaging function,
it can be implemented externally as, say, moving average
filter. If the time constant of the rolling process is much smaller than the time constant of the system itself, this approach should do the trick. Otherwise, the performance of the flow control will be undermined.

Andrey

J

#### John G. Boland

Hi Antony,

It is easier for me to visualize a mechanical analog of your problem:

A car follows another along a road. The lead car's speed is accurately controlled. A "bungie" cord connects the rear bumper of the lead car to the front bumper of the second. The tension in the bungie is used as the process variable to adjust the second car's throttle (no speed control). No one cares how far apart the cars are, except the bumpers must not collide or the bungie stretch to breaking.

This springy system is stable on smooth terrain, but rapid uphill and downhill changes are problematic. Averaging the tension readings will cause the distance between the cars to vary more, while increasing the responsiveness of the second car's throttle to the tension will cause it to "gun" and "idle".

At least one control loop, of some kind, is missing. In this example, it might be a tight speed control on the second car, with a supervisory setpoint (long time constant) from the tension. An even tighter system would be to feed the lead car's speed as a supervisory input, modified by a very heavily averaged tension, to the second car's speed control.

Anyway, in the case of your tank, as the ship rolls and the physical depth of the liquid changes, the outlet pump's inlet charge pressure changes and, subsequently, the outlet flow may also change at constant pump speed. Making this worse, from a modeling point of view, is that the tank cross-section may change as the liquid sloshes (I am guessing that the tank is cylindrical, but you do not say - or whether the slosh is lengthwise, crosstank or both).

Would you consider a second magmeter on the outlet flow, with a PI loop controlling the outlet pump speed, with a supervisory setpoint from the inlet pump flow, modified by a very long-time-constant level control PI loop? Rough guess, five or ten times the cycle time - 30 to 90 minutes? The best might be the time required for a given number of complete sloshes, updated as conditions change. The outlet pump speed control time constant should be less than one-tenth as long, or around 3 minutes or less.

A mechanical approach would be to install a second level detector in the tank, cross-axis from the existing sensor and average the two readings. By and large, one will increase as the other decreases, but you would have to very careful (and lucky) to get the location correct.

Best,

John G. Boland, president
[email protected]

M

#### mat hyatt

Well, sounds like some improvement was made, that is good, where do you presently stand as far as system stability? Just to be sure everyone is one the same page, completely discribe the control loop and what you are attempting to acheive. It may help all of us who are responding help you in solving your issue.

Look forward to hearing back from you.

Matt

J

#### John G. Boland

Hi Antony,

The dimensions are good news, indeed.

You may be able to get a performance improvement without any new equipment (well, sensors etc.) by feeding the existing inlet magmeter flow signal, as an "RPM" setpoint, to the outlet progressive-cavity pump electronic drive.

Modify the flow signal with the existing level measurement, that is, the result of the level control loop is a multiplier between (for example) 0.5 and 2.0 times the magmeter flow signal, before the outlet pump electronic drive. The level control loop will primarily function as a slow "automatic correction" to minor differences between the theoretical and actual pump differential flows. The value of the multiplier, after the level control loop runs a while, mathematically becomes the conversion factor between m^3/hr and RPM for the outlet pump. Theoretically unity, it will vary with wear and tear and sensor drift.

Remember to make the level control loop *very* slow (30 to 90 minutes) (or more?), ramping the level setpoint and paying attention to the initialization of the level loop.

HTH. Interesting problem.

Best,

John G. Boland, president
[email protected]
Strateg!c Method$Corporation One Parker Square Suite 408 2525 Kell Boulevard Wichita Falls, Texas 76308 940.322.9922 940.723.1478 fax #### PhilCorso John Boland, Excellent reply. You certainly provided a very good analysis & solution... "out of the box" in today's problem-solving jargon"! I lost interest when the "can't do anything" comeback was made. I interpreted it to mean... "someone screwed up, and now it has to be fixed, but for$0.00!" Sorry Antony.

Regards,
Phil Corso, PE
Boca Raton, FL
[[email protected]] ([email protected]) {[email protected]}

Similar threads