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
Unread October 17th, 2019, 02:06 PM   #1
khelza
Member
Canada

khelza is offline
 
Join Date: Sep 2015
Location: Ontario
Posts: 67
PID CV only changes after SP crossed

AB Rockwell PID function

I am tuning a PID function for a hot water tank. There is a valve (CV) that opens to allow hot water through when the temperature (PV) goes below the setpoint. The valve will close when the PV goes above the temperature (stops adding hot water). But there is a constant overshooting and undershooting ~15deg above and below the SP, without maintaining the SP.

The problem is, when the PID is trying to maintain the temperature, it will keep the valve 100% when it's cold (below SP), and 0% open when it's too hot (above SP). the CV will range in between 0-100% for a short period of time when crossing the setpoint (in either direction), and depending on the Kp, Ki values, I can slow down how fast/slow it takes to get to 100% or 0%, however I have not found a setting that allows the output to maintain CV somewhere in between 0-100% for a more gradual PV change.

Currently, the PV will be somewhere below the SP, and CV is 100% (fully open) to bring in hot water. The PV will slowly creep up to the SP, but the CV is still 100% open. It's not until the PV gets a decimal over the SP that the CV value starts to drop, until it gets to 0% (fully closed), and stays at 0% until the PV reaches a decimal back below the SP, and then it will gradually go back to 100% and stay there.

What I am trying to accomplish is BEFORE the PV reaches the SP, I would like the valve to gradually open or close, so that it is not getting a constantly swinging temp +/-15 from the SP. In this scenario, when the PV is below the SP, the valve starts to open a little. It stays open a little in hopes of achieving the SP, or opens more if the PV continues to drop. As it approaches the SP, the CV closes more and more. Once it reaches the SP, the CV modulates so that the temperature maintains the SP. If it goes over, the valve closes a little, if it continues to climb, the valve closes more, and modulates appropriately to maintain the SP...basically, how a PID is supposed to work.

I have never tuned one of these, but did receive training many, many years ago. Perhaps there is something I am forgetting or missing completely but my changes seem to only affect how long it takes the valve to swing from 0-100% and vise verse, but not WHEN it starts changing.

Apparently this only started not working when the controller was upgraded from SLC to CTL.

These are the settings it is set to currently:
- Output bias: 0.0
- Kp: 0.5
- Ki: 0.005
- Kd: 0.0

- Equation: Independent
- Control A: SP - PV
- Der. of: PV
- Loop Update Time: 0.5s (I changed it from 4 to 0.5)
- Deadband: 0.0

No boxes checked off

----------------

Please let me know your thoughts. Thanks!

Last edited by khelza; October 17th, 2019 at 02:11 PM. Reason: Clarification
  Reply With Quote
Unread October 17th, 2019, 02:19 PM   #2
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is online now
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,564
Quote:
Originally Posted by khelza View Post
Apparently this only started not working when the controller was upgraded from SLC to CTL.
I think you mean SLC to CLX ? do you have the original SLC program? was there a min/max set maybe you need to make one if not and set it to 75% so it will only open/close 75%
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, Fluke Meters, MicroLogix, ControlLogix, Siemens, Allen Bradley and more... all your automation needs... ((NEW)) After Market 1784-U2DHP Allen Bradley USB to DH+ and Gateways
  Reply With Quote
Unread October 17th, 2019, 02:25 PM   #3
V0N_hydro
Member
Canada

V0N_hydro is offline
 
Join Date: Sep 2010
Location: lower mainland
Posts: 513
how long does it take the temperature to increase by 1 degree when it is cold (below sp) and valve is open at 100%?


how long does it take the temperature to decrease by 1 degree when it is hot (above sp) and valve is closed at 0%?
  Reply With Quote
Unread October 17th, 2019, 02:55 PM   #4
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 451
Quote:
Originally Posted by khelza View Post
AB Rockwell PID function
...
Apparently this only started not working when the controller was upgraded from SLC to CTL.
...
- Loop Update Time: 0.5s (I changed it from 4 to 0.5)
...
Please make sure the PID instruction is being scanned at the 0.5-second interval specified in the configuration; otherwise the integral (and derivative, if used) action will be affected. Options include using a recurring timer in a continuous task and conditioning the PID rung with the done bit, or putting the PID instruction in a period task with a 500 ms interval.

An incorrect loop update time acts as a scaling factor on the time-dependent gains.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Unread October 17th, 2019, 02:55 PM   #5
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,974
Tell us more about the valve.
Is the valve opening proportional to the control signal or is the speed of the valve opening or closing equal the the control signal. This makes a HUGE difference.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Unread October 18th, 2019, 09:51 AM   #6
saultgeorge
Lifetime Supporting Member
United States

saultgeorge is offline
 
Join Date: Jul 2015
Location: Detroit
Posts: 236
Hi, hope I can help a little. I wouldn't dare to get crossways with Peter; it would be great if I knew what he forgot. I had trouble with valves until I basically did what he posted here. Anyway, I did a lot of PID's' on a project this last 2 years and one thing jumped out at me in your settings. Change "independent" to "dependent". Mine all work well that way. I made my ki 0.016 on all my loops. I played with the kp and most of my valves are something like 0.007 and such. This way the CV sort of creeps up and then "lands" on the SP. One last thing, as Mispeld wrote, be sure the update time and what you have as update time match. Many folks have suggested a periodic task, I don't do that. I just put a free running timer at 500 mS setpoint and use the done bit to run the PID. All other conditions I do elsewhere in logic. I'm sure there are a myriad of better ways, but all my stuff is working and I get no callouts. Hope this helps.
__________________
4 out of 5 Great Lakes prefer Michigan.
  Reply With Quote
Unread October 18th, 2019, 09:39 PM   #7
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,974
The reason I want to know about the valve is because the control is much different between the two cases. If the valve spool position is speed is proportional to the control signal then the valve is acting like an integrator. This will definitely be a potential problem if you don't take this into account. This is much different from the hydraulic servo valves I work with most of the time where the control signal is controlling the position.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Unread October 19th, 2019, 05:03 PM   #8
mister x
Member
Canada

mister x is offline
 
Join Date: Jan 2019
Location: Canada
Posts: 86
Have you verified in the field the valve will hold an output sent in manual? Almost sounds like open loop on the positioner, I'm assuming there is one.
  Reply With Quote
Unread October 24th, 2019, 04:21 PM   #9
khelza
Member
Canada

khelza is offline
 
Join Date: Sep 2015
Location: Ontario
Posts: 67
Hey guys, just wanted to give an update. My apologies for the delay, I wasn't able to look at this again until today.

I added a timer.DN bit that matched the Loop update time, and it worked a lot better, and then did some tuning and adjusting of the Kc = 5.0, Ti = 0.5, Td = 0.3
I also changed the PID Equation to Dependent, and the Derivative to Error.

It's seems a lot smoother, with still some, but a lot less overshoot, and not having the valve jumping to 100% open or close.

I plotted my CV, PV and SP, which I will upload for interest.

Couple questions:
Would the new plot be considered acceptable for PID standards, with a little overshoot?
- it doesn't matter in real life for this application
Does RSLogix have a trending capabilities comparable to the Pi software I used?
- I know it can trend, but can I use a shared or separate axis? Or am I better off using the software I am now?
OLD
https://i.lensdump.com/i/izugJM.jpg
NEW
https://i.lensdump.com/i/izuZ8A.jpg
  Reply With Quote
Unread October 25th, 2019, 08:40 AM   #10
mylespetro
Supporting Member
Canada

mylespetro is offline
 
mylespetro's Avatar
 
Join Date: Dec 2015
Location: NS
Posts: 167
Quote:
Originally Posted by khelza View Post
Couple questions:
Would the new plot be considered acceptable for PID standards, with a little overshoot?
- it doesn't matter in real life for this application

Looks a lot better, but it looks to me like it could use a little bit of fine tuning. It definitely smooths out toward the end, but the initial response is a bit oscillatory in my opinion. As always, it depends on what's acceptable for the process and the customer, but objectively it looks like it could use a bit of additional tuning. Great job so far!
  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
Resetting PID CV so only active on +error dburnum LIVE PLC Questions And Answers 3 August 24th, 2018 06:56 PM
Rslogix5000 PID CV Low Limit adjusting p_logix LIVE PLC Questions And Answers 17 February 27th, 2017 12:57 PM
PID Question ToddM LIVE PLC Questions And Answers 41 July 12th, 2005 12:23 AM
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 02:18 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 10:23 AM.


.