![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#61 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
Quote:
I really appreciate everyone's input, I've certainly learned a lot about PID and process modelling. |
|
![]() |
![]() |
#62 | |
Lifetime Supporting Member
|
Quote:
Also, I think that the PID will allow any value, regardless of the CV limits, to be written into the CV Output INT when the PID is in manual model (.AM=1). Even if that is not true, you could always add logic, external to the PID, to put 0 into Words 12 whenever the PID is in Manual Mode, and a positive minimum value (3900 was an estimate/guess!) into Word 12 whenever the PID is in Auto mode (.AM=0). That said, the approach suggested so far is to use software (the PLC program) to correct for a problem with the physical system. Once we see that this software fix solves the problem, and therefore confirms the source of the problem (the physical valve positioning system), the next step should then be to re-calibrate the positioning system so the valve is closed (has zero leakage) up to a much smaller CV value (It's been a while since I have worled in that end of the business, so I don't know what is typical. 2%? 5-8%?), and then the software PID CV minimum can be returned to 0 poimnentlee. Another possibility for the source of the problem, instead of mis-calibration, is hysteresis in the valve positioning system.
__________________
_ 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 10th, 2022 at 03:36 PM. |
|
![]() |
![]() |
#63 |
Lifetime Supporting Member
|
The next time the system is to be pressurized, enter a value, say 3500 or even 2500, into Word 12, manually in RSLogix online mode. The worst that could happen is that the valve would be open and the pressurization would take longer than normal; you can always change it back manually.
But I would bet more than pocket change that what actually will happen is that the pressure will peak much sooner after the PV crosses the SP than you have seen in the past, and the overshoot will be noticeably reduced.
__________________
_ 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. |
![]() |
![]() |
#64 | |||
Member
![]() ![]() Join Date: Jul 2022
Location: FrozenHell
Posts: 79
|
Quote:
Quote:
Curves from your post #41 shows nothing happened until control valve opens to ~24% i.e. flow = 0 i.e. DEADBAND. So you have to “cutoff” this useless 24%. If the customer/management tries to show their "qualifications" (they find your "bug" - an "open" control valve). Because I'm too lazy for the RTFM PIDE instruction, I'll add a rung right below the rung where the PID output is applied to the desired control valve position, something like this: If PV (pressure) < k*PID_SetPoint then desired control valve position:=0 (k<1) Or even simpler: If PV (pressure) < MinPressere then desired control valve position:=0 BUT actually it's necessary to find out what’s wrong with control valve. If anyone is willing fix it, it changes plant gain. i.e. necessitate to re-tune PID. Quote:
I tried to explain at #59 setpoint change response and disturbance rejecting response are not the same (especially in your system). If I understand you correctly you’ve got PID settings for nice and smote setpoint change response. I 90% sure you can increase PID gain 3-4 times without negative consequences. Try to multiply PID gain (1,25-1,5) and apply it. See what happened an-1st cycle – I suppose it decreases overpressure without any oscillations. If so – repeat it until "achieve" oscillations or too scared. Last edited by MaxK; November 14th, 2022 at 11:39 PM. |
|||
![]() |
![]() |
#65 |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
Following up with another trend capture. PID values were 10.0, 0.5, 0.0 and loop update at 0.5 seconds. The pressure built up really slowly this time, so the overshoot was minimized in part due to that. The Control Variable output looks a bit unstable, to my eyes.
|
![]() |
![]() |
#66 |
Lifetime Supporting Member
|
The PID is fine and doing exactly what it is supposed to do, although maybe 10 is too high for Kc.
The problem is almost certainly downstream of the PID instruction and of the PLC, and instead in the physical valve e.g. stiction, and/or hysteresis and/or backlash in the mechanisms that position the valve stem. Best guess is stiction or play in the linkages, and Word 12 might not fix that because the resulting hysteresis may work both ways. It's also possible the valve is oversized, but I would chase the others first. The setpoint ramp at the end is still unnecessary.
__________________
_ 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. |
![]() |
![]() |
#67 | |
Member
![]() ![]() Join Date: Jul 2022
Location: FrozenHell
Posts: 79
|
Quote:
I have few questions: 1. What happened at ~12:43? Before process wasn’t good but acceptable, after – inacceptable. CV achieves 100% then PV changes extremely fast. 2. I suppose CV it is PID instruction output. Have you any data of real outflow (control valve position sensor, outflow flowsensor, even inflow sensor data can help)? 3. Post #1: “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” - Is the control valve Response time from closed to open is around 8 seconds? That's for sure? - Is there two valves? Small valve controlling control valve? 4. Please recall very accurately what happened (some valves opened/closed, pump performance increased/decreased etc.) during the cycle shown. Try to understand the "simple" idea: you can't tune a PID controller, you can only tune an entire closed system (closed loop). Sounds simple, but not so easy to really understand. Imagine an open loop, you apply some kind of influence, you get some kind of response, and the influence “goes away”. In a closed loop, ANY influence "continues" in the system. To set up a system (closed loop), you must know (understand) how (when, why, why) each element of the system “works” (pump, valves, pipes, etc. - everything that includes a closed loop). ... I assuming something not such simple with control valve(s) ... |
|
![]() |
![]() |
#68 |
Member
![]() ![]() Join Date: Jul 2022
Location: FrozenHell
Posts: 79
|
Can’t you attach time+PV values at txt/xls file or show more scaled PV curve? I'll try to calculate process input (control valve position).
|
![]() |
![]() |
#69 |
Member
|
A trend with the valve position and control output as a function of time is required. Having the actual pressure would be nice too.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#70 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
Quote:
psi PV is actual pressure as measured by transmitter. |
|
![]() |
![]() |
#71 |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
I'm not sure how to do this in txt/excel format, I have logix 500 for trending. I can do another trend with increased sample rate if that would help.
|
![]() |
![]() |
#72 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
Quote:
2. No other data for the flow through the pipe. I can chart the volume of oil going into the wood over time, but it's relatively small (about 2200 gallons over 12-24 hours) and difficult to measure precisely. There's only a radar level transmitter for that measurement. 3. I will try to capture or measure actual valve action from closed to open while empty and with flow. This will take some time to capture. There is a transducer which pilots air to the larger valve, so I guess technically there is two valves. The transducer action is quite fast compared to the main valve, so I suppose this introduces some dead time. Again, I thank everyone for their contributions, I'm learning some really cool things! I haven't had the courage to try working with this setup before now, but I feel better informed now! |
|
![]() |
![]() |
#73 | |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2011
Location: BC, Canuckistan
Posts: 260
|
Quote:
|
|
![]() |
![]() |
#74 |
Lifetime Supporting Member
|
Is it safe to put someone at the valve with a tape measure or ruler or yardstick? You can be watching the trend, so at the time when the CV reaches a peak or valley, and starts one of it subsequent descents or climbs, respectively, the person at the valve can tell you how long it takes after the time of the peak or valley that the valve starts moving.
I estimate there is backlash of at least 5-10% in the valve positioning system. Look at the data: When the pressure is rising and above setpoint, the CV will be increasing as the PID tries to compensate, e.g. just after at 12:34:02, the actual valve position is some offset in percentage behind the CV. As the valve actually starts opening and the pressure eventually starts dropping, the CV peaks with the valve at some position, call it VPhi. The CV then drops because the [rate of PV (or E) drop] times [Kc] times [update period], i.e. the proportional change per PID update, is more negative than the [E] times [Kc] divided by [Ti], i.e. the integral accumulation, is positive, per PID update. However, as the CV initially drops from that peak, the valve position is not changing, and remains at VPhi. This is obvious in that we see the PV dropping at an essentially constant rate for around 15s or so from its peak while CV is dropping. If the decreasing CV were changing the actual valve position during those 15s, the rate of PV change would decrease, but it does not. After those 15s, the accumulated drop in CV takes out the backlash and starts actually moving (closing) the valve again i.e. reducing the actual valve position from VPhi. And at that point we the PV rate of change decrease. But because of that backlash, the CV overshoots. This happens again and again, as the actual valve position lags the CV after every CV peak and valley. The correct fix is to eliminate the backlash. A possible software solution would be to add or subtract some fraction of the backlash as the Feedforward/Bias term of the PID: positive bias when the CV is increasing; negative bias when the CV is decreasing; zero bias when the CV is level. Perhaps a deadband* model for the CV would work and be not too complicated to implement in a handful of rungs:
* N.B. this has nothing to do with the deadband parameter of the PID instructions.
__________________
_ 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 18th, 2022 at 07:41 PM. |
![]() |
![]() |
#75 |
Lifetime Supporting Member
|
I don't know if this approach would work in the field, but I created a model that takes a CV output as the input, and calculates what the actual valve position would be assuming a fixed amount of backlash in either direction. The code is shown in the first image below.
The second image uses a PID to calculate a bias to be added to a target CV, and the sum of that target CV and the bias is passed to the backlash model to predict a valve position, and finally the error between the predicted valve position and the original target CV is used to drive a PID to calculate the bias. The third image shows a plot of the result. The target CV is the darker blue trend, which is mostly hidden behind the green modeled valve position (VPmodel), and the [CVplus = CV + bias], which is the input to the backlash model and is what would actually be sent to the valve, is the lighter blue trend; all of those are scaled 0 to 16383. The brown and pink plots are the error and the bias (PID output), and are scaled between -2000 and +2000 I used CCW because it has a PID and is easy to make trends, but the same approach could be implemented in the SLC. Whether it would work to drive the actual valve position to the pressure control PID's output CV, when that CV is not as well-mannered as the synthetic sine wave in this example, is another matter entirely. backlash_model.png
__________________
_ 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. |
![]() |
![]() |
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 |