![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
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. Last edited by Robb B; October 28th, 2022 at 02:12 PM. Reason: added link to manual for PID instruction |
![]() |
![]() |
#2 |
Lifetime Supporting Member
|
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 (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Apr 2020
Location: NC
Posts: 15
|
I have never used FF in a SLC but it sounds like it may help your situation. The manual (https://literature.rockwellautomatio...m001_-en-p.pdf)
states use word 6 of the control block (MOV a value into N16:6 in your case if I read correctly), valid values -16383 to +16383...It appears that FF will always keep that offset in the CV so may have to be careful if you need your I/P to be able to fully close, the offset may prevent that from happening, but I am not sure about that. Perhaps the easiest way to reduce overshoot would be to reduce controller gain, which also may increase your time to steady state... One thing to watch out for is to make sure your I/P is keeping up with the PID output. If you have position feedback this should be easy to check, and if you have a considerable lag, you may have to slow down your PID (reduce Kc, Ti) or even increase your loop update time so your PID is not making further changes to the CV before the valve has reached the previous position requested by the CV of the PID. If your valve is moving at a rate of 0-100% in 8s that means that it can only move about 3.125% (assuming its response is linear) per PID loop update (0.25s) so if your CV is changing faster than that, your PID is probably too fast for your system. Also, I would make sure that the two timers triggering the PID execution in different conditions are set to the same rate if possible, otherwise you probably should have two separate PID instructions each with their own settings...well that's my opinion from afar without really knowing your system. Hope this helps. It has been a while since I used a PID with an SLC. |
![]() |
![]() |
#4 | |||
Lifetime Supporting Member
|
Quote:
* though not in sign Also, error does not accumulate: the magnitude of the contribution to the CV accumulates from the the I action. Td is zero, so there is no D action, but if it did it would work in the same way as the P and I. Quote:
Quote:
![]() But I don't see what you have to feedforward from. The problem seems to be that a new setpoint changing the (time) response characteristics of the process (how varying the CV affects PV over time) invalidates the model implicit in the PID tuning parameters (Kc, Ti, Td). In @Nachtwey-speak, the setpoint (i.e. operating point) change has moved the system** poles around. ** system = process + PID I am pretty sure you need to, at a minimum, increase Kc by ~ √(165/125), because Pressure is proportional to accumulation (pv = nRT for low pressure), so dpressure/dt is proportional to dn/dt, but dn/dt is proportional to √pressure (again assuming critical flow). You probably also need to increase Ti, because the lag time, for a fixed change in PV (CV?), is longer at the lower pressure.
__________________
_ 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 (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. Last edited by drbitboy; October 28th, 2022 at 04:07 PM. |
|||
![]() |
![]() |
#5 | |
Member
|
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. 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 |
|
![]() |
![]() |
#6 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
Quote:
|
|
![]() |
![]() |
#7 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
Quote:
I have not timed the response of the system to a full closed to open cycle of the control valve, I will try to do. Your point on update rate may apply. The two timers are separate steps in the process. The timer done bit is a delayed start, and stays true the entire pressure cycle. The timer timing bit is from the next step, which is to bleed off pressure safely and slowly. |
|
![]() |
![]() |
#8 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
Quote:
There is no error before the pressure reaches the setpoint, so there is no action from the proportional and integral terms. When I have a value for derivative in, I do see some change in the Control Variable (CV) before the setpoint is reached, but there is unsatisfactory control of the Process Variable, the CV output stays around 20-25% which causes a slow rise above the setpoint. I am searching for a way to get Control Variable response to "anticipate" the value to be at before reaching the setpoint. As I mentioned, bumping the CV to 40% manually, then switching to automatic seemed to give a reasonable response. |
|
![]() |
![]() |
#9 | |
Lifetime Supporting Member
|
Quote:
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 (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
|
![]() |
![]() |
#10 | ||||
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
whew, hopefully I have this all correct...
Quote:
Quote:
![]() Quote:
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:
|
||||
![]() |
![]() |
#11 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
Controlling oil pressure, not air. Sorry!
Quote:
|
|
![]() |
![]() |
#12 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 340
|
Quote:
I really appreciate everyone's insights! |
|
![]() |
![]() |
#13 | |
Lifetime Supporting Member
|
Huh?
Error = PV[i.e. pressure] - SP[i.e. setpoint]. So, if I can assume "before the pressure reaches setpoint" means "pressure is some value other than the value of setpoint," then there will definitely be error. I think we are talking about different things here. Quote:
There is also more negative CV motion calculated as long as PV is below SP, because Error (E=PV-SP) is negative, on each update, although anti-windup reset (CVmin = 0) throws that away each time. There is also a negative Proportional contribution as long as, which decreases as E becomes less negative, but the valve will not crack open until an update when this decrease is not swamped by the I-action. Only a bit before, or even at, the time PV crosses SP will the valve finally crack open from 0%; exactly when that actually occurs is a function of the time slope of PV, and the Kc and Ti values. Once PV crosses to be above SP (E becomes positive), the valve will open from both P and I action,
__________________
_ 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 (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
|
![]() |
![]() |
#14 |
Member
![]() ![]() Join Date: Oct 2016
Location: Ontario
Posts: 203
|
I would :
1. get rid of D....set it to 0, you don't need it 2. Reduce P by 70% 3. Change I...(make it a slower system) by 50% or more (on an AB PLC I can't recall if this means the number for I should be increased or decreased.) 4. Generally, once the overshoot is eliminated, you can gradually change I to make the system faster once again, and increase P to also make it faster but if go too far with P it will start to overshoot again and remain unstable and fluctuate.. A small amount of overshoot is OK temporarily as it will prove the system is as fast as you can make it. All 3 strategies can eliminate overshoots, especially # 2 and 3. Last edited by Skidood; October 28th, 2022 at 06:19 PM. |
![]() |
![]() |
#15 | |
Lifetime Supporting Member
|
Quote:
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 (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. Last edited by drbitboy; October 28th, 2022 at 06:37 PM. |
|
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 06:15 PM |
SLC 5/05 Communication Problem with Serial Port.. | pranav.mistry003 | LIVE PLC Questions And Answers | 2 | August 23rd, 2012 04:41 PM |
Reading L32E with SLC 5/05 | 24fretslater | LIVE PLC Questions And Answers | 7 | February 23rd, 2012 12:26 PM |
Control Slc 5/04 PID | The Plc Kid | LIVE PLC Questions And Answers | 1 | August 6th, 2009 04:41 PM |
SLC 5/05 PID Time Mode Question | Dwarfer1 | LIVE PLC Questions And Answers | 7 | December 15th, 2004 05:52 AM |