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.

New Here? Please read this important info!!!


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

Reply
 
Thread Tools Display Modes
Old October 28th, 2022, 01:08 PM   #1
Robb B
Lifetime Supporting Member
Canada

Robb B is offline
 
Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 290
PID tuning on SLC 5/05

Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a different approach is needed or more information, we can do that. Testing intervals are few and far between, typically days, which makes data collection tricky. I'm using https://literature.rockwellautomatio...m001_-en-p.pdf as a reference, if it helps. Chapter 9.

First, what am I controlling? Air pressure in a treating vessel, in the range of 0 - 180 psi (Pressure Relief Valve setting). The vessel is large, but the volume is relatively low (I don't know exactly what volume, maybe 10 cubic meters?) due to being full of oil and wood.

Second, how is it controlled? The pressure is supplied by a constant speed pump (40 HP motor), pumping the oil from a storage tank. The Control Element is an analog output to a Current to Pressure (I/P) transducer, piloting 3 - 15 psi to a larger valve which modulates the air from the vessel to a vent line. Response time from closed to open is around 8 seconds, if more accurate timing is needed, we can do.

Third, what changed? Current PID settings worked okay when the pressure setpoint was 165 PSI. The process would run up to about 170 PSI, at which time enough error accumulated to drive the valve to a position that maintained setpoint fairly well (around 38 - 40% open), plus or minus a few PSI. The setpoint has now changed to 125 PSI, and results in a lot of overshoot, up to 35 PSI, which is undesirable to the managers.

I have read a lot of the threads here about PID, and I think a complete re-tuning of the PID terms is required, I'm not sure where to start. I have tried a few informed WAG's, and noticed that with increasing D (no D previously used) there is action on the CV before it reaches setpoint, without D, there is no action until the setpoint is reached. Negative error accumulates from the P and I, and doesn't cause any change in the CV. From this, I infer that D is an absolute value, whereas P and I both are a positive, in that negative error produces negative CV. I have also tried the PID in manual mode, entering CV at 40%, then switching to automatic. This provides a very desirable response, although it will increase the time required to get to steady state. I was thinking of implementing feed forward bias, but I can't see how to enter a value into the setup screen, it's grayed out. I tried entering a number directly into word 6 of the control block, but it zeros out. Is it a value that needs to be MOV in by logic? Is a feed forward a reasonable way to proceed if the response is adequate?

I have attached a screenshot of the PID rung. Yes, it is on a conditional rung, this is how I inherited the programming. Ideal results would be the fastest possible PV = SV with minimal overshoot (<5 PSI). Minimal overshoot is more important than time to reach steady state.
Attached Images
File Type: jpg Pressure PID.jpg (115.5 KB, 194 views)

Last edited by Robb B; October 28th, 2022 at 01:12 PM. Reason: added link to manual for PID instruction
  Reply With Quote
Old October 28th, 2022, 02:20 PM   #2
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Summat is not making sense to me: pressure supplied (increased?) by pumping oil but relieved (reduced?) by venting air to a vent line?

What happens when you run out of air i.e. when the oil takes up all of the volume? Or does the incoming oil stop when its level in the vessel reaches some target? Or does the oil contain entrained air?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old October 28th, 2022, 03:40 PM   #3
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: The land of the woke and the home of the broke
Posts: 8,153
Quote:
Originally Posted by drbitboy View Post
Summat is not making sense to me: pressure supplied (increased?) by pumping oil but relieved (reduced?) by venting air to a vent line?

What happens when you run out of air i.e. when the oil takes up all of the volume? Or does the incoming oil stop when its level in the vessel reaches some target? Or does the oil contain entrained air?
I think the OP is saying that the PILOT valve is controlled by oil flow. The PILOT valve controls the position of the main spool that that controls the flow of air. The response of the oil controlled pilot spool should be considered instantaneous relative to the rest of the system response.

The output limit is 0 to 100%. This means if the output wants to go negative to reduce an over shoot, it can't. The system must bleed air by some method without increasing the pressure to the relief valve setting.

Does the system naturally leak air? In this case the air pressure will blead off at some rate until the set point is reached. The output will be zero. The integrator term should not be allowed to wind down. The integrator term should be limited to 0% on the bottom.

A derivative term is not required. Since this is almost a type 1 or integrating system, I would try to tune the P gain first with no integrator. What will happen is that the control will suffer from a little proportional droop. Adding a bias can compensate but usually the integrator is used.

If the tank does not leak air then simply use the P gain since the tank will integrate the air flow into pressure.

The problem is that if the system pressure ( air supply ) is constant, the amount of flow through the valve is going to be a square root function of the pressure drop across the valve. This means the open loop gain is higher when the tank is at 0 pressure and lower when the PV reaches the SP. Therefore the controller gain should be reduced as the PV rises to the SP.

So if you change the CV when the PV is at the normal operating point, the open loop gain will change by Kol(PV) = Kol(SP)sqrt((Supply_pressure-PV)/(Supply_Pressure).)
Kol(SP) is the open loop controller when the pressure is at the SP. Notice that as the PV rises to the supply pressure, the open loop gain drops to 0 because no matter what control signal you send to the valve, there is no flow without a pressure drop.

So the controller gain should be proportional to the inverse the open loop gain. To keep the gain constant.

drbitboy. It is the gains that change, not the poles. However, the poles will change if the amount of material in the tank changes because that changes the volume of air needed to change the pressure in the tank.

I doubt dead time plays much of a part in this system because the air pressure will equalize quickly throughout the system. It is the non-linear flow through the valve as a function of pressure that is the problem.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old October 28th, 2022, 04:44 PM   #4
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Quote:
Originally Posted by Peter Nachtwey View Post
I think the OP is saying that the PILOT valve is controlled by oil flow.



A 40HP constant-speed pump (re-read the OP) for a PILOT valve? Really?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old October 28th, 2022, 05:01 PM   #5
Robb B
Lifetime Supporting Member
Canada

Robb B is offline
 
Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 290
Quote:
Originally Posted by drbitboy View Post
A 40HP constant-speed pump (re-read the OP) for a PILOT valve? Really?
The 40HP pressure pump moves oil from the vessel, through the control valve, and back to the tank. Pressure sensor is detecting air pressure due to being elevated above the vessel's (cylinder on it's side) full liquid level.

I really appreciate everyone's insights!
  Reply With Quote
Old October 28th, 2022, 05:30 PM   #6
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Quote:
Originally Posted by Robb B View Post
The 40HP pressure pump moves oil from the vessel storage tank, [into the pressurized treating vessel, then out of the treating vessel] through the control valve, and back to the [storage] tank. Pressure sensor is detecting air pressure [above the oil level in the treating vessel] due to being elevated above the vessel's (cylinder on it's side) full liquid level.

I really appreciate everyone's insights!
Are the blue additions and red removals correct? I don't see how you can pressurize the treating vessel if it is either between the storage tank and the pump suction, or between the outlet of the control valve and the storage tank.

So as a volume of oil is pumped into the treating vessel, it is incompressible (relative to the air in the treating vessel), so it pushes the air into the remaining volume, which compresses the air into the top 8-10% of the treating vessel.


I.e. for air: PV=nRT => P=nRT/V => if nRT is constant (or close to it), then decreasing V in the denominator of [nRT/V] will increase P?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.

Last edited by drbitboy; October 28th, 2022 at 05:37 PM.
  Reply With Quote
Old October 28th, 2022, 05:36 PM   #7
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Note: earlier I suggested increasing both Kc (Controller gain) and Ti (minutes/repeat), as I thought the gains were independent. But the gains are dependent (cf. here), so mainly increasing Ti by itself is what is needed; Kc may be okay as is.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old October 28th, 2022, 05:47 PM   #8
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Is this a centrifugal pump, or is it positive displacement?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old October 28th, 2022, 05:51 PM   #9
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
This system is slow. I'll bet Kc = 14 and Ti = T = 0 would work well enough, basically bang-bang control and allowing for a little proportional offset.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.

Last edited by drbitboy; October 28th, 2022 at 05:56 PM.
  Reply With Quote
Old November 1st, 2022, 10:44 AM   #10
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: The land of the woke and the home of the broke
Posts: 8,153
Quote:
Originally Posted by drbitboy View Post
A 40HP constant-speed pump (re-read the OP) for a PILOT valve? Really?
my first assumptions where wrong. It was hard to visualize the system after just the first post. The differential equation that I posted before doesn't apply. After seeing the diagram it is clear that the P*V=n*R*T is the way to go The air in the treatment vessel is more like an accumulator in hydraulics.
Anyway the pressure doesn't change linearly with level and if the pump is a centrifugal pump, the pump flow will vary with pressure. At the new lower pressure the pump flow will increase which will increase the pressure faster but this may be offset by the increased air volume will tend to reduce the rate of change in the pressure.

It should be possible to get reasonable control with just a P gain. There will be an offset but then an integrator can fix that.
I don't see why the system is so difficult to control.
Any this thread has exceeded the 20 questions limit.

weird system.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old November 1st, 2022, 10:57 AM   #11
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Quote:
Originally Posted by Peter Nachtwey View Post
my first assumptions [were] wrong.
Join the club; we're having jackets made up.

Quote:
Originally Posted by Peter Nachtwey View Post
It should be possible to get reasonable control with just a P gain. There will be an offset but then an integrator can fix that.
I don't see why the system is so difficult to control.
Any[way] this thread has exceeded the 20 questions limit.

weird system.
^this

Yeah, I suggested stiff P-only control over two dozen posts ago (#18).
Quote:
Originally Posted by Peter Nachtwey View Post
After seeing the diagram it is clear that the P*V=n*R*T is the way to go The air in the treatment vessel is more like an accumulator in hydraulics.
I thought so too for some time, but consider that the vessel is vented until it is full of oil, and look at the final liquid:gas volume ratio: 106-107; PV = nRT is out the window.

This is more like a hydraulic system, perhaps with some undissolved air, so it's solidly in @Peter Nachtwey's wheelhouse.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.

Last edited by drbitboy; November 1st, 2022 at 11:28 AM.
  Reply With Quote
Old October 28th, 2022, 04:55 PM   #12
Robb B
Lifetime Supporting Member
Canada

Robb B is offline
 
Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 290
whew, hopefully I have this all correct...

Quote:
Originally Posted by Peter Nachtwey View Post
I think the OP is saying that the PILOT valve is controlled by oil flow. The PILOT valve controls the position of the main spool that that controls the flow of air. The response of the oil controlled pilot spool should be considered instantaneous relative to the rest of the system response.
The pilot valve uses 3 - 15 psi of instrument air to control the larger valve. The larger (Control) Valve modulates the flow of oil from the pressure pump.

Quote:
The output limit is 0 to 100%. This means if the output wants to go negative to reduce an over shoot, it can't. The system must bleed air by some method without increasing the pressure to the relief valve setting.

Does the system naturally leak air? In this case the air pressure will blead off at some rate until the set point is reached. The output will be zero. The integrator term should not be allowed to wind down. The integrator term should be limited to 0% on the bottom.
Yes, everything around here leaks a little bit.

Quote:
A derivative term is not required. Since this is almost a type 1 or integrating system, I would try to tune the P gain first with no integrator. What will happen is that the control will suffer from a little proportional droop. Adding a bias can compensate but usually the integrator is used.

If the tank does not leak air then simply use the P gain since the tank will integrate the air flow into pressure.

The problem is that if the system pressure ( air supply ) is constant, the amount of flow through the valve is going to be a square root function of the pressure drop across the valve. This means the open loop gain is higher when the tank is at 0 pressure and lower when the PV reaches the SP. Therefore the controller gain should be reduced as the PV rises to the SP.
The system pressure is applied by the pumping of oil into the cylinder through the Control Valve, the idea is to push oil into the wood cells, and replace what is absorbed with new oil to maintain an approximate level. About 2300 US gallons goes into the wood each cycle. The pressure applied is not constant, as it builds from 0 PSI to setpoint in a bit of an S curve. When I get a chance, I will trend some cycles.

Controller gain being reduced as PV rises to the SP sounds more like Sliding Mode Control? Maybe PID is not appropriate to this task?

Quote:
So if you change the CV when the PV is at the normal operating point, the open loop gain will change by Kol(PV) = Kol(SP)sqrt((Supply_pressure-PV)/(Supply_Pressure).)
Kol(SP) is the open loop controller when the pressure is at the SP. Notice that as the PV rises to the supply pressure, the open loop gain drops to 0 because no matter what control signal you send to the valve, there is no flow without a pressure drop.

So the controller gain should be proportional to the inverse the open loop gain. To keep the gain constant.

drbitboy. It is the gains that change, not the poles. However, the poles will change if the amount of material in the tank changes because that changes the volume of air needed to change the pressure in the tank.

I doubt dead time plays much of a part in this system because the air pressure will equalize quickly throughout the system. It is the non-linear flow through the valve as a function of pressure that is the problem.
I would like to go back and correct my initial post. I got some of it confused.
  Reply With Quote
Old November 1st, 2022, 04:34 AM   #13
MaxK
Member
Czech_Republic

MaxK is offline
 
Join Date: Jul 2022
Location: FrozenHell
Posts: 120
Quote:
Originally Posted by Robb B View Post
The pressure applied is not constant, as it builds from 0 PSI to setpoint in a bit of an S curve.
Is pressure curve looks this way: almost linear at the beginning then k(1-exp(-t/T))-shaped ?
Attached Images
File Type: png Pvess.png (1.7 KB, 47 views)
  Reply With Quote
Old November 19th, 2022, 07:43 AM   #14
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,414
Another Hail Mary

Quote:
Originally Posted by Robb B View Post
The pilot valve uses 3 - 15 psi of instrument air to control the larger valve. The larger (Control) Valve modulates the flow of oil
If there is a pilot valve downstream of the current-to-pressure transducer and upstream of the oil control valve, then it might be a pneumatic valve positioner (see image below; source here). A valve positioner's job is to ensure any friction or sticking (stiction) in the the final control element ([Valve Actuator] below) does not prevent its position from matching the 3-15PSI input signal, which signal is coming from the SLC PID and the I-to-P transducer.

However, if the linkages in the valve positioner are worn, then the positioner adds hysteresis (backlash) into the system. One possible, possible (and temporary) solution might exist if the valve postioner has a bypass lever. A valve positioner bypass would send the [Controller Pressure] directly to the [Actuator Output], taking the [Pilot Relay] and its worn positioning linkages out of the process. The I-to-P transducer's output pressure would then directly control the [Valve Actuator] position, which would only improve the situation if any stiction in the final Valve Actuator has less of an effect than any backlash in the Valve Positioner mechanism.

One problem with this is that OP said there is no feedback of the valve position, so maybe the pilot valve is not a valve positioner. Or it could be that OP means there is no available electronic feedback of the valve position to the SLC.

That's a lot of IFs ...
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old November 25th, 2022, 02:18 PM   #15
Robb B
Lifetime Supporting Member
Canada

Robb B is offline
 
Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 290
Quote:
Originally Posted by drbitboy View Post
If there is a pilot valve downstream of the current-to-pressure transducer and upstream of the oil control valve, then it might be a pneumatic valve positioner (see image below; source here). A valve positioner's job is to ensure any friction or sticking (stiction) in the the final control element ([Valve Actuator] below) does not prevent its position from matching the 3-15PSI input signal, which signal is coming from the SLC PID and the I-to-P transducer.

However, if the linkages in the valve positioner are worn, then the positioner adds hysteresis (backlash) into the system. One possible, possible (and temporary) solution might exist if the valve postioner has a bypass lever. A valve positioner bypass would send the [Controller Pressure] directly to the [Actuator Output], taking the [Pilot Relay] and its worn positioning linkages out of the process. The I-to-P transducer's output pressure would then directly control the [Valve Actuator] position, which would only improve the situation if any stiction in the final Valve Actuator has less of an effect than any backlash in the Valve Positioner mechanism.

One problem with this is that OP said there is no feedback of the valve position, so maybe the pilot valve is not a valve positioner. Or it could be that OP means there is no available electronic feedback of the valve position to the SLC.

That's a lot of IFs ...
There's no interposing device. The Current/Pressure transducer modulates the proportional actuator directly. I tried to find more info on the valve, but nothing. It's a jamesbury actuator, series C12S II. Picture of label attached. I don't know enough about this valve to know if there's a potential problem with the rating of "Min supply pressure" being 20 (Psi?) in combination with the transducers 3 - 15 psi output. I don't think so, since we do get action on the valve with changes in the transducer. Your discussion of backlash got me looking into the valve itself.
Attached Images
File Type: jpg PXL_20221125_155251394.jpg (417.7 KB, 42 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


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 Position to Velocity Equation Tuning Parameter Conversion JLand LIVE PLC Questions And Answers 7 January 18th, 2022 05:15 PM
SLC 5/05 Communication Problem with Serial Port.. pranav.mistry003 LIVE PLC Questions And Answers 2 August 23rd, 2012 03:41 PM
Reading L32E with SLC 5/05 24fretslater LIVE PLC Questions And Answers 7 February 23rd, 2012 11:26 AM
Control Slc 5/04 PID The Plc Kid LIVE PLC Questions And Answers 1 August 6th, 2009 03:41 PM
SLC 5/05 PID Time Mode Question Dwarfer1 LIVE PLC Questions And Answers 7 December 15th, 2004 04:52 AM


All times are GMT -4. The time now is 11:28 PM.


.