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 February 6th, 2010, 04:55 PM   #1
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Allen Bradley PID Tuning Help

Hi Guys,

First off I'll put my hand up and admit this is my first time ever having to tune a PID Loop. I wasn't involved in the project and have being drafted in for a couple of weeks. However its a perfect opportunity and I'd love to learn. I know there is a lot of PID experts here so hopefully I'll get some help.

The purpose of the PID control is by using a variable speed drive to maintain a constant level of 0.7 metres in a tank and hence a steady flow from the tank. The Platform is a Controllogix L-61 PLC using the standard PID instruction.

I know you guys appreciate as much detail as possible to assist in problem solving so with my limited knowledge of PID control I'll do my best.

The commissioning Engineer has advised me that there is a lot of lag in the system due to the distance between the pumps and the flowmeter we are using as the Process Variable.

As this is my first time tuning I really don't know what I should be doing. Rather than just trial and error I would really like to understand this.What I am asking is for any advice on how you guys approach this. I have tried adjust the gain and integral slowly up and down and the best I can get is close to 0.7M but with on/off control of the Pump. The Pump starts ramps up to 100% and then turns off again.

I apologise for such a poor description of the problem. I have made some trends of the system response in RSLogix if someone would be willing to view them.

From some posts here it might appear the PIDE instruction could help? Also a couple of new instructions have been introduced in Logix V17, the IMC, MMC and CC could be of use. Any thoughts? There is an Autotune function that could be beneficial?
  Reply With Quote
Old February 8th, 2010, 04:01 AM   #2
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Just having a browse through the documentation on the IMC instruction in Logix. Has anyone anyone experience in using it?
  Reply With Quote
Old February 8th, 2010, 10:31 AM   #3
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,736
DON'T PANIC! Level controls are easy.

Quote:
Originally Posted by MorphuisOGrady
The purpose of the PID control is by using a variable speed drive to maintain a constant level of 0.7 metres in a tank and hence a steady flow from the tank. The Platform is a Controllogix L-61 PLC using the standard PID instruction.
So you have a flow AND level feedback?

Quote:
I know you guys appreciate as much detail as possible to assist in problem solving so with my limited knowledge of PID control I'll do my best.
Is the in flow or out flow variable?


Quote:
The commissioning Engineer has advised me that there is a lot of lag in the system due to the distance between the pumps and the flowmeter we are using as the Process Variable.
Does the fluid compress in a significant way? If not the fluid going in is equal to the fluid going out of the pipe


Quote:
As this is my first time tuning I really don't know what I should be doing. Rather than just trial and error I would really like to understand this.What I am asking is for any advice on how you guys approach this.
You should be able to get by with just a proportional gain depending on how much error you can tolerate. How much error can you tolerate?

Quote:
I have tried adjust the gain and integral slowly up and down and the best I can get is close to 0.7M but with on/off control of the Pump. The Pump starts ramps up to 100% and then turns off again.
Does the pump actual have a ramp is or that how much time it takes to get to speed? Do you only have on off control?
You need to have some speed control or the motor will need to turn on and off and that will be the best you can do.

Quote:
From some posts here it might appear the PIDE instruction could help? Also a couple of new instructions have been introduced in Logix V17, the IMC, MMC and CC could be of use. Any thoughts? There is an Autotune function that could be beneficial?
Auto tune functions only work if they are designed to tune your type of system. You have an integrating system which means the level is the integration of the net flow. If the autotuner doesn' have that model it will not work.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 8th, 2010, 11:13 AM   #4
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Hi Peter,

Thanks for your reply and taking the time to ask me for specific details I did not include. In response to your questions:

We have flow and level feedback, however it is the level that we are concerned with . This is the Process variable.

The flow variable is an out flow to next stage in process.

The fluid is sludge and does not compress as I understand it.

How much error can I tolerate? Not sure of the answer to that. As it stands the control is on and off and the client does not want this. A VSD has being installed for this purpose. Basically the level is to be at 0.7M. We dont want it to drop below 0.6 or above 0.9M. Does this help?

The pump is ramping to full speed and down to zero as thats what the output of PID is commanding it to do.
  Reply With Quote
Old February 8th, 2010, 11:59 AM   #5
Pandiani
Member
Bosnia

Pandiani is offline
 
Pandiani's Avatar
 
Join Date: Apr 2005
Location: Tz
Posts: 669
Hello,

since you have a level control problem, derivative component should be included in your PID controller. I don't think integral component is necessary and think quite good control can be achieved with PD controller only.
If I understand well, VSD is using to control flow out of the tank? In that case manipulated variable is "out flow" from the tank.
You need to at least roughly estimate parameters of your process. Does it have any dead time?
It is very hard from here to say what exactly is causing that ON/OFF behavior (at least for me).

There is also one more thing I don't understand. What exactly is process variable (it seems it is level, but you wrote flow meter in the other post)?
Motor (pump) with VSD should be able to control the level in the tank steadily.

I cannot give you any further advice right now. Please, try adjusting proportional part and derivative part slowly.

Please, have a look at this:
http://www.controlguru.com/wp/p94.html
and also this:
http://www.controlguru.com/2007/042507.html

This will give you idea how to estimate your process parameters. You shouldn't pay too much attention on specific instructions and versions of software, but understand control concepts instead.

Last edited by Pandiani; February 8th, 2010 at 12:22 PM. Reason: Adding controlguru references
  Reply With Quote
Old February 8th, 2010, 12:14 PM   #6
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,736
Quote:
Originally Posted by MorphuisOGrady View Post
How much error can I tolerate? Not sure of the answer to that. As it stands the control is on and off and the client does not want this. A VSD has being installed for this purpose. Basically the level is to be at 0.7M. We dont want it to drop below 0.6 or above 0.9M. Does this help?
It sure does. Obviously the set point is set to 0.7m.
Next you want to adjust the controller gain so it will provide full flow when level reaches 0.9m and you want the motor to turn off when the level drops below 0.7m This means that you want the pump to go from 0 to 100% control output or 0 to 10 volts as level changes 0.2m. Now you have a good estimate of how to scale the controller gain. This will keep you in your operating range.

If the level drops below 0.7m what can you do? The pump can't control the inflow. The pump should stop as soon as the PV ( level ) reaches the SP. You don't want the pump to keep pumping as the level drops below 0.7.

You will see that the level will stay in the desired range but there will usually be an error proportional to the inflow. To reduce this error to 0 you need to adjust the integrator time constant. The shorter the integrator time constant the faster the response. At this time is it good to know the fluid surface area and hopefully it doesn't change as a function of level. It is also handy to know the pump capacity, peak inflow and the tank volume.

Now if you have a flow meter that can provide and estimate of how much fluid is coming in then you can create a feed forward or bias. The advantage of using the flow and bias is that the integrator does not need to wind up.

But first, get the proportional gain working.

I will let my distinguished colleague, Ron Beaufort' help you with the Rockwell PID details.

Quote:
The pump is ramping to full speed and down to zero as thats what the output of PID is commanding it to do.
That may be right depending on what the inflow is doing but only if the in flow is close to maximum. Otherwise It sounds like the gain is a little too high. If the pump speed should change to match the inflow. If the pump has much more capacity than the inflow then you may get by with just the proportional gain.

Knowing the pump capacity, the peak inflow and the tank volume at the set point would be handy. Oh, and the fluid surface area of the tank. Hopefully the tank is a vertical cylinder and it doesn't change as a function of level.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 8th, 2010, 03:26 PM   #7
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Quote:
Originally Posted by Peter Nachtwey View Post
It sure does. Obviously the set point is set to 0.7m.
Next you want to adjust the controller gain so it will provide full flow when level reaches 0.9m and you want the motor to turn off when the level drops below 0.7m This means that you want the pump to go from 0 to 100% control output or 0 to 10 volts as level changes 0.2m. Now you have a good estimate of how to scale the controller gain. This will keep you in your operating range.

If the level drops below 0.7m what can you do? The pump can't control the inflow. The pump should stop as soon as the PV ( level ) reaches the SP. You don't want the pump to keep pumping as the level drops below 0.7.

You will see that the level will stay in the desired range but there will usually be an error proportional to the inflow. To reduce this error to 0 you need to adjust the integrator time constant. The shorter the integrator time constant the faster the response. At this time is it good to know the fluid surface area and hopefully it doesn't change as a function of level. It is also handy to know the pump capacity, peak inflow and the tank volume.

Now if you have a flow meter that can provide and estimate of how much fluid is coming in then you can create a feed forward or bias. The advantage of using the flow and bias is that the integrator does not need to wind up.

But first, get the proportional gain working.

I will let my distinguished colleague, Ron Beaufort' help you with the Rockwell PID details.


That may be right depending on what the inflow is doing but only if the in flow is close to maximum. Otherwise It sounds like the gain is a little too high. If the pump speed should change to match the inflow. If the pump has much more capacity than the inflow then you may get by with just the proportional gain.

Knowing the pump capacity, the peak inflow and the tank volume at the set point would be handy. Oh, and the fluid surface area of the tank. Hopefully the tank is a vertical cylinder and it doesn't change as a function of level.
Thanks Guys for your very helpful input. I'm back on site tomorrow so I'll start with the gain.

The problem is as its a working system I have to be very careful not to drop the level too far below 0.7M or there will be other pumps tripping on suction.

Is it fair to say then that I'm jumping the gun by using the PIDE instruction? The PID will do the job despite this "lag" in the system?

I have attached a .PDF of a 5 minute run of the pump with the P= 0.3, I=1.0 D =0.0. I will chage in the morning and use just D. Would you have a quick look at this and tell me a good point to start?
Attached Files
File Type: pdf Level.pdf (24.0 KB, 177 views)
  Reply With Quote
Old February 8th, 2010, 03:54 PM   #8
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,736
Quote:
Originally Posted by MorphuisOGrady View Post
The problem is as its a working system I have to be very careful not to drop the level too far below 0.7M or there will be other pumps tripping on suction.
The control signal should go to 0 when the level drops to 0. The only thing the pump can do is stop and let the level rise

Quote:
Is it fair to say then that I'm jumping the gun by using the PIDE instruction?
I don't think it is necessary. It is just the tools. Understand standing the system is the important part now.

Quote:
The PID will do the job despite this "lag" in the system?
I think you need to get the P gain going first. Just the P gain. I don't understand what lag you are talking about. When the pump runs the level should go down immediately.

Quote:
I have attached a .PDF of a 5 minute run of the pump with the P= 0.3, I=1.0 D =0.0. I will chage in the morning and use just D. Would you have a quick look at this and tell me a good point to start?
Don't go past go. Do not use the D gain yet. First get the response stable with the P gain only.
BTW, is I a gain or a time constant. People are never clear about that
Also it looks like the SP is at 40. Is that .7 meters?

Answer the question on my previous post. I have solved these types of problems before.
http://www.plctalk.net/qanda/showthr...ghlight=SIGreg
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 8th, 2010, 04:21 PM   #9
Pandiani
Member
Bosnia

Pandiani is offline
 
Pandiani's Avatar
 
Join Date: Apr 2005
Location: Tz
Posts: 669
Peter I agree, but I think that he shouldn't use integral part at all for now.
Normally one would start with P controller only. I would add very small derivative component in the begining. I always use derivative component in level control applications.

MorphuisOGrady, if you look closely to your graph, yu can see that PID controller output is start decreasing only when PV become less than SP. Derivative component could counter this and cause CO to start decreasing (pump speed start decreasing before PV is less than SP).
First, I would decrease proportional gain and put very small derivative gain.

Last edited by Pandiani; February 8th, 2010 at 04:27 PM.
  Reply With Quote
Old February 8th, 2010, 05:02 PM   #10
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Peter,

Just to clarify, your saying that when the level drops below the CV should drop to 0 and the pump should completely stop?

The "lag" in the system I'm told is due to the location of the level transmitter in the channel.(I said it was a tank, but its actually a long channel) THe LT is located on the opposite end of the channel to the Pump. At a guess I think its 500m. Would this cause a delay in your opinion?

The question you want an answer to. Is this in relation to the Pump capabilites? If so I will find out from the commissioning team tomorrow.

Dont know why the trend is showing 40. THe SP is definitely at 0.8!!!

Pandiani,

I think that's what I'm am looking to do. If the pump would gradually decrease before the PV is less than SP then that should at least improve it. SO its the D component of the PID that does this???

You say to decrease the proportional gain and put a very small derivitive on it. The P Gain is at 0.3 which I though was quite low. Shall I start at 0.1??
  Reply With Quote
Old February 8th, 2010, 05:28 PM   #11
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,736
Quote:
Originally Posted by MorphuisOGrady View Post
Peter,

Just to clarify, your saying that when the level drops below the CV should drop to 0 and the pump should completely stop?
I am saying that when the level ( PV ) goes below the set point ( SP ) the pump should stop. You don't want the pump to keep running and emptying out the tank. The pump must wait until more fluid comes into the tank

Quote:
The "lag" in the system I'm told is due to the location of the level transmitter in the channel.(I said it was a tank, but its actually a long channel) THe LT is located on the opposite end of the channel to the Pump. At a guess I think its 500m. Would this cause a delay in your opinion?
No gravity will keep the water level constant in the channel unless the fluid truly is more like mud and doesn't flow easily.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 9th, 2010, 12:57 AM   #12
Pandiani
Member
Bosnia

Pandiani is offline
 
Pandiani's Avatar
 
Join Date: Apr 2005
Location: Tz
Posts: 669
MorphuisOGrady,

Try setting P at low value than gradually increase it. D component would be small at first and then it should be increased too. Also, it is very important to know which form your AB PID controller is using.

Quote:
Originally Posted by MorphuisOGrady
If the pump would gradually decrease before the PV is less than SP then that should at least improve it. SO its the D component of the PID that does this???
Yes, please have a look at this too.
http://www.controlsoftinc.com/mailing/message60.htm
  Reply With Quote
Old February 9th, 2010, 06:36 AM   #13
ydtech
Member
Brazil

ydtech is offline
 
ydtech's Avatar
 
Join Date: Jul 2008
Location: Guaiba - RS
Posts: 116
The set-point is at 40%. If this is 0.7 m then the range is 1.75 m. Now, since the minimum is 0.6 m, or 34%, you'll want the pump to halt at this level and go at full speed at 0.8 m (46%). The difference between minimum and maximum is 12%, so you'll use this value for proportional band which is a gain of 8.3.

Get rid of the I term pronto, it's way too fast and is what causes the brutish oscillation in the graph. Don't bother with the D term. Set fixed bias to 50%.

The limits of 0.6 and 0.8 m are to keep the set-point symmetrically between them. Since the max level is 0.9 m (51%), you might get away with a set-point of 0.75 and a gain of 5.9.

If a constant offset bothers you, you can restore the integral with a very long TC, but be aware that if there's a major sudden disturbance the system may go off-limits.

You haven't told the width of the channel nor the flow, nominal and max, but anything 500 m long will have a pretty long time constant.

The gain may be a bit high-ish if the liquid is sloshing about. That can be helped by filtering the LT with a TC of about 5% of the channel TC.

Also, if you have the time and the access, set up a "dummy" PID in the software. Adjust PV and SP manually, play around with the parameters and watch the output until you understand how it reacts under various conditions.
  Reply With Quote
Old February 9th, 2010, 08:35 AM   #14
Pandiani
Member
Bosnia

Pandiani is offline
 
Pandiani's Avatar
 
Join Date: Apr 2005
Location: Tz
Posts: 669
We all recommended to turn off I part of the controller. First step would be to try to adjust proportional gain. It is likely that there would be a constant offset which could be eliminated with I part but that may introduce oscillations as ydtech suggested. That is why I always use derivative part on level control loops because this overshoot can be avoided.

Anyway, we need to wait for the feedback.
  Reply With Quote
Old February 10th, 2010, 04:31 PM   #15
MorphuisOGrady
Member
Sweden

MorphuisOGrady is offline
 
Join Date: Jul 2007
Location: Soderhamn
Posts: 544
Gentlemen,

Once again, thanks for all your input. I'm on site and working on a couple of other things so I haven't got a chance to get back to my PID tuning. I hope to resume tomorrow.

I have being unable to find out the pump capacity or channel volume yet however I have made one mistake. I mentioned the LT was located 500m from the pump. This in fact is only 88Metres from Pump.

I have a couple more questions/observations you may be able to assist my understanding.

The PID instruction in RLL in Logix offers 2 Equations, Dependent or Independent. At present it is set at Independent. Is this correct?

The control action is PV-SP. Is this correct?

The PID is fired off a 500ms timer. The loop update time of the PID instrction is set to 500ms too. DO these have to match? Is every 500mS sufficent? Insufficient?

The VSDs mimium speed and Fieldbus minimum speed is clamped at 25Hz. I'm told if the pump is running any lower than this the pump is doing no work. Surely this is going to have an effect on my PID? Should I set my CV High Limit to 50%??

ydTech, you mentioned fixing the bias to 50%. Is this the output bias parameter in the PID instruction?
  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 Instruction (Allen Bradley) sutton LIVE PLC Questions And Answers 3 July 15th, 2008 12:13 PM
PID tuning feedback..graph included;) Paully's5.0 LIVE PLC Questions And Answers 8 January 25th, 2008 09:12 PM
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 02:18 AM
Allen Bradley PID Peter Honey-Jones LIVE PLC Questions And Answers 6 October 25th, 2004 08:33 AM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 11:57 AM


All times are GMT -5. The time now is 12:35 AM.


.