Some PID Questions...

darrenj

Member
Join Date
Feb 2005
Location
Ottawa
Posts
1,003
O.K. Here is what i have and i have done..

I have a tank about 24" tall 2' round that gets filled with a liquid, The liquid is pumped in from a fitting on the bottom of the tank (Bottom filling prevents foaming) there is a pressure sensor on he side of he tank about 3" from the bottom the pressure sensor is 0-1psi (About 30WC), There is a spring return valve on the inlet to regulate the product going in (0-60psi..60 psi is 100% open) The tank should maintain a level set by the operator,for argument sake lets say 50%, The tank feeds 4 piston pumps that pump product into containers, anywhere from 125ml per pump to 1 liter per pump(Again selectable by the operator)..Now for the hardware part..

Control logix processor
0-60psi IP transducer
10 HP motor pushing the liquid.

What i have done so far..
First off i completely ignored all advise to read up about PID's..I went to site hooked up the pressure sensor and the ip transducer and started to "play" with the P I and D settings.. I got the PID loop working sort of but ran into another problem that i will post at the end..

Now that i got the play part out of my system i went home and just spent the last 4 or 5 hours reading Ron's P I D tutorial also read why P only control wont work and the thread Ron, Peter and Alan had back in 2003 about "How often should i trigger the PID"....Of course now i see why my test didn't work out the way i wanted, But the reading brings up some questions..
First i have read that the PID loop should be scheduled..why?? Is this just to save scan time?..the reading says it should be the same as the loop update time (More questions to come on that one!)..my question is why? What happens if it runs continuously?
Second "update time" and |"steady state"..At the begging of the run the operator plugs in the value he wants the tank to be at, Now i don't care if it takes 10 seconds or 1 minute for the liquid to reach that point..what matters is once its selected it stays close.. the machine fills 1200 cartons an hour, so worst case i am pulling 20 liters of liquid out of this tank per min.. how should i go about selecting an update time?
Third, After reading all this info (BTW Thanks a ton Ron Beaufort..an excellent tutorial, I got the ones from your web site)..(I also must admit while i read P and I word for word i kinda skim read D ) I can see why my test didn't work but i think i also have another problem..I stated out with the tank empty and my P at 1 started the pump and pushed water into the tank.. It was a classic example of why Ron says P alone wont work..It wouldn't hit the set point..it was close but not quite..It would work for this application tho..next i did an "Overflow" (The valve is opened 100% and the tank fills to capacity and the pushes the liquid out the overflow tube..(used for CIP at the end of a shift)..Everything worked o.k... Now when i put in a smaller set point..say back to 50% the valve closed..However i GUESS that caused a slight change in pressure in the tank..The level sensor read -14 so the valve went to full open then the tank read overflow and shut the valve..back to -14 back to valve open 100%..it kept oscillating..i walked away for 3 or 4 Min's to see if it would even itself out but it wouldnt..If i set the set point back to overflow it would take about 1 min for the pressure in the tank to simmer down and i would get the proper reading..
To try and overcome this i took the pressure reading every .5 seconds and MOV it to the PV of the PID block..this didnt do to much, i then tried 1 and 2 seconds..all it did was slow the oscillations down..I THINK again i say THINK that the valve is closing and opening to quickly..I know the PID should be slowed down but still dont quite grasp what loop update time should be or how to calculate..or even if this will help..

My scale on the input card is 4ma=0 and 20ma=28 (For 28WC)
and the ouput card is 4ma=0 20ma=60 (For 60psi)

any help OR nudges would be appreciated

Also as a side note..how does the auto tune feature for PIDE work?? Is it close or more headache? (in relation to to PIDE)

Thanks
Darren
 
Don't understand why you are using a PID, wouldn't it be simpler to just have an on/off valve, let the operator set a level in the tank then open valve till actual >= setpoint?, if the level drops below a certain level say 10% below setpoint then open the valve again.
 
Question, Are you trying to use Pressure to sence leval in the tank or are you trying just to have the tank matain pressure.
 
Rich1955 said:
Question, Are you trying to use Pressure to sence leval in the tank or are you trying just to have the tank matain pressure.

using the pressure sensor for level..the tank cant pressurise becouse of the overflow
 
I got to agree with Parky on this one. I have done a lot of autofill tanks in the past and I have always used on/off valves to fill the tanks. Some applications use level switches, some level transducers and I have even use ultasonic sensors.

As far as the autotune on the PID, I have had mixed results and rarely use it. I have set up PID loops, have them running perfectly and then for the hell of it tried the autotune and it gives totally different settings.
 
For level control with PID you generally don't need D, and in some cases you may not even need I. In many level applications, the actual level does not need to be all that accurate, so a small static error is not a problem. Depending on size of tank and the flow rate, the time constant of the tank may dominate the rest of the system, so what you have is (approximately) a first order system. This will remain stable with any amount of gain, so in theory you can turn the gain up until the static error is low enough for the application.

In practice, there will be other time constants in the system, like the speed of the valve etc, so P will be limited, and a small amount of I may be needed.

If I've understood right, the tank volume is about 170 litres? I would use a loop update of 0.1 seconds, start with P only. See if you can get close enough control by increasing P only. If it starts to oscillate, reduce P by half, and add some I action. Remember that if the integral action is in "minutes per repeat" a big number means small integral action.
 
Well , I'm of the opinion it is the wrong way of doing the job anyway , what is the relationship of pressure (valve position) V flow ? what is the valve seat type , equal percentage , fast opening , linear ?
Again , I can't see what the pressure entering the tank has to do with it - and you have to be very careful that the liquid entering the tank doesn't cause surging and oscillation on the perceived pressure read by the level transducer .
Does it matter if the level rises and falls between two levels ? if not , simple on off control will work .
How many different levels are required by the operator ? and why ?
I personally would use an ultrasonic level detector if it was necessary to have many different levels in the holding tank .
Smoothing is one thing for the PV , but moving the transducer input to the PV every 0.5second ? I don't think so (just out of interest , are you sure that your coding makes sure that there is a value in the PV continuously , rather than just every 0.5 seconds ?

All in all , a good case for designing the system before you build it .
 
Sounds like you have a closed tank with a small overflow line, the pressure drop through the overflow line causes the tank to become slightly pressurized when the fill valve is open, giving a false head pressure reading.

I assume you are using atmospheric pressure as your reference leg on the DP transmitter, to get an accurate level you will need to either reduce the pressure drop through the overflow (bigger line) or connect the reference leg of the DP transmitter to the top of the tank.

With a CIP system, the reference connection may not be possible, then your best bet is to use a sonic sensor.

I have to agree with the others though, this tank is basically a bubble in the line and precise level control is not needed. I believe simple on/off with a deadband may be best.

ken
 
Ultrasnic would be best but i cannot use it fo this application..becouse the cip for this requires it be overfilled to wash to overflow line..the ultrasonic sensor has to "see" the liquid so a hole would have to be cut in the top of the tank..also a hole wouldnt be liked becouse it is food grade..
As for the desighn..Heck its not my design..There is an existing levelmatic air system on it now and they want to remove it,
As for how many levels..anywhere from 5 inches of water up to 20 for production The operator knows he need approx 6 or 7 inches to fill 125ml cartons..It dosnt have to be exact just close..

The on off presents a problem becouse if the valve is turned full on and full off it creates surges in the tank..This churns the milk causing it to foam, The foam would give incorrect level readings in the tank,
 
Darren,

The first thing is to double check your pressure sensor. Connect an instrument tester to it. Apply 28" WC differential pressure to it and see if it reads 20 miliamps, and then 4 mA at 0"WC. You might have to recalibrate. Then in your program, check and recompute your scaling factors, and make sure they are correct. A common error is to set the program scale factors for the possible pressure range of the tank, while the actual pressure transmitter that got installed (or later replaced) is actually calibrated for an entirely different pressure range. Your PID block cannot work correctly unless it has correct inputs.

If you need the PID function for this application, then try "averaging" the pressure readings over some time period (say take a reading every 0.5 second for 5 seconds, add the total, divide by 10). Then use this average as your PID Process Variable. I have successfully used an averaging method for air and liquid control, where the pressure is jumping around. For air pressure control inside a furnace, using the average pressure meant that it suddenly became easy, where before it was almost impossible.

Another factor in this case may be that the act of moving the valve and slowing or speeding up the milk velocity may be upsetting the level sensor reading, due to foaming, vortexing, or swirling. You might try to set up a timimg method to only allow a NEW average level reading to be sent to the PID ONLY when the milk valve is non-moving, neither opening nor closing. For extreme cases you sometimes have to set up timers between the PID output and the valve input and only allow the valve to change position for, say 2 seconds, then wait 2 seconds, then input a new pressure reading, then reactivate the valve again.

If averaging doesn't stabilize the system, then you will probably have to swap the level (pressure) sensor for a different type or a more accurate type.

It sounds like your gain (P) is much too high for your system. Start off with slightly above 0, say 0.01, then increase it slowly and study the response.
 
Last edited:
I don't think you can sence level with pressure, you can maintain pressure with any level. I've had good luck of senceing level of water with a Capacitive proximity sensor through metal and plastic tank. The more dence the product the less expence the sensor.
 
Rich,

There are a LOT of differential pressure transmitters that are "set up" to do exactly that, measure level. Check with Rosemont, Yokogawa, and others to see all the different models of level transmitters that are actually measuring the pressure difference between the top and bottom of the tank.

For this method to work, the DP transmitter must be calibrated correctly, and it must be connected to tubes from top and bottom of tank, and the tank level must not be bouncing around or changing rapidly.
 
Look at what he's got
I have a tank about 24" tall 2' round that gets filled with a liquid
(4 pumps)anywhere from 125ml per pump to 1 liter per pump
10 HP motor pushing the liquid

I don't think that the tank is going to be to stable with the volume that can be prodused from the 10Hp pump in that small of a tank. He has a large volume being taken out of the tank also. I'll be suprised that the tank pressure doen't change raperly every time trying to fill the tank or take product out of the tank.

The osolation in the tank is going to be trouble for him. I have used pressure transdusers to measuere levels in static tanks but we are talking 30,000 gallon tanks.

This is just my opinion Rich
 
Rich1955 said:
I don't think you can sence level with pressure, you can maintain pressure with any level.

This should read I don't think you can sence level with the pressure changes you are going to have. You can't maintain stable pressure with any of your levels.
 

Similar Topics

I am working on a PLC5 that is doing temp control. However the temp control is working more like ON/OFF and not Proportional control. I am not...
Replies
32
Views
8,360
Hi all, I have a project that use 755 drive to control a induction motor(pump) to maintain certain flow rate. Flow meter is promass 100, unit is...
Replies
1
Views
2,193
HI - I have a tough process and have been struggling with controlling my PV using a Micrologix 1400. I uploaded the file, changed .rss to .txt...
Replies
9
Views
1,916
Hey guys, I'm taking a look at some existing code that I've converted from 90-30 to RX3i. I'm trying to figure out the configuration of some PID...
Replies
11
Views
5,800
Hey folks. I am getting ready to light off a large AHU and I have a couple of PID questions that I need answers to right away. I have researched...
Replies
2
Views
1,394
Back
Top Bottom