You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 10th, 2005, 09:04 PM   #1
darrenj
Member
Canada

darrenj is offline
 
Join Date: Feb 2005
Location: Ottawa
Posts: 1,003
Some PID Questions...

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
  Reply With Quote
Old December 11th, 2005, 06:12 AM   #2
parky
Member
United Kingdom

parky is offline
 
Join Date: Oct 2004
Location: Midlands
Posts: 965
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.
  Reply With Quote
Old December 11th, 2005, 06:51 AM   #3
Rich1955
Member
United States

Rich1955 is offline
 
Rich1955's Avatar
 
Join Date: Dec 2004
Location: Delaware
Posts: 247
Question, Are you trying to use Pressure to sence leval in the tank or are you trying just to have the tank matain pressure.
  Reply With Quote
Old December 11th, 2005, 07:15 AM   #4
darrenj
Member
Canada

darrenj is offline
 
Join Date: Feb 2005
Location: Ottawa
Posts: 1,003
Quote:
Originally Posted by Rich1955
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
  Reply With Quote
Old December 11th, 2005, 07:27 AM   #5
Mark Buskell
Member
United States

Mark Buskell is offline
 
Mark Buskell's Avatar
 
Join Date: Sep 2003
Location: Florida
Posts: 891
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.
__________________
"Take whatever idiot they have at the top, give me a better idiot. Give me a caring idiot. Give me a sensitive idiot. Just don't give me the same idiot."
  Reply With Quote
Old December 11th, 2005, 07:42 AM   #6
AutomaticLeigh
Member
United Kingdom

AutomaticLeigh is offline
 
Join Date: Jan 2005
Location: Kent
Posts: 104
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.
  Reply With Quote
Old December 11th, 2005, 08:01 AM   #7
10baseT
Member
United Kingdom

10baseT is offline
 
Join Date: Nov 2005
Location: wrexham
Posts: 271
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 .
  Reply With Quote
Old December 11th, 2005, 08:12 AM   #8
Ken Moore
Member
United States

Ken Moore is offline
 
Ken Moore's Avatar
 
Join Date: May 2004
Location: Upstate South Carolina
Posts: 2,325
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
__________________
"To give real service you must add something that cannot be bought or measured with money; and that is sincerity and integrity."
- Donald A. Adams

  Reply With Quote
Old December 11th, 2005, 08:46 AM   #9
darrenj
Member
Canada

darrenj is offline
 
Join Date: Feb 2005
Location: Ottawa
Posts: 1,003
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,
  Reply With Quote
Old December 11th, 2005, 10:02 AM   #10
Lancie1
Lifetime Supporting Member
United States

Lancie1 is offline
 
Lancie1's Avatar
 
Join Date: Jul 2003
Location: Alabama
Posts: 10,000
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 by Lancie1; December 11th, 2005 at 10:34 AM.
  Reply With Quote
Old December 11th, 2005, 10:06 AM   #11
10baseT
Member
United Kingdom

10baseT is offline
 
Join Date: Nov 2005
Location: wrexham
Posts: 271
You could set the tank up on load cells......
  Reply With Quote
Old December 11th, 2005, 10:40 AM   #12
Rich1955
Member
United States

Rich1955 is offline
 
Rich1955's Avatar
 
Join Date: Dec 2004
Location: Delaware
Posts: 247
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.
  Reply With Quote
Old December 11th, 2005, 10:58 AM   #13
Lancie1
Lifetime Supporting Member
United States

Lancie1 is offline
 
Lancie1's Avatar
 
Join Date: Jul 2003
Location: Alabama
Posts: 10,000
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.
  Reply With Quote
Old December 11th, 2005, 12:28 PM   #14
Rich1955
Member
United States

Rich1955 is offline
 
Rich1955's Avatar
 
Join Date: Dec 2004
Location: Delaware
Posts: 247
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
  Reply With Quote
Old December 11th, 2005, 12:42 PM   #15
Rich1955
Member
United States

Rich1955 is offline
 
Rich1955's Avatar
 
Join Date: Dec 2004
Location: Delaware
Posts: 247
Quote:
Originally Posted by Rich1955
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PID for MicroLogix 1500 - conversion issues ... Ron Beaufort LIVE PLC Questions And Answers 5 November 8th, 2005 09:03 AM
learning PID for Allen-Bradley ... Ron Beaufort LIVE PLC Questions And Answers 9 August 23rd, 2005 01:40 PM
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 01:18 AM
Use a PID? MarBa LIVE PLC Questions And Answers 4 May 8th, 2003 08:31 PM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM


All times are GMT -5. The time now is 02:34 PM.


.