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 February 12th, 2021, 11:37 AM   #1
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Slow Acting Long Time Interval PID Tuning

Hello,

I have a issue with tuning a slow acting PID loop using AB PIDE instruction. The system is designed to cool a tank after it heats up using a proportional valve that allows glycol to circulate through the tank.

My main issue is that the CV does not begin open to allow cooling until after the PV has passed the SP and does not start to close until after the PV has fallen below the SP. This creates an oscillation that wont correct its self over time.

If attached a picture to show what is happening in the tank right now. The time span is 24 hours For clarity this is the legend.

Blue = Tank Temp (used in the PID loop)
Purple = Secondary Tank Temp (not used in the PID loop)
Red = Setpoint (12C)
Orange = position of glycol valve (its stepped in 1% intervals)

I have a basic tuning parameter already set, information below.

P = 5
I = 8
D = 1.5
Execution Time for PID algorithm = 45 seconds
deadband = 0.01

Control Action = Direct acting (PV-SP)
Gains Equation = Dependent

I'm looking to make the system more predictive to throttle back the valve before the PV goes below the SP line. Any help would be greatly appreciated.

All the best,
Attached Images
File Type: png Tuning Loop.PNG (18.9 KB, 290 views)
  Reply With Quote
Old February 12th, 2021, 11:59 AM   #2
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,356
The dead time seems to be excessively long as in hours. That is too long.
Each oscillation is about 6 hours. WTF?
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 12th, 2021, 12:13 PM   #3
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Indeed, The time is very long. However the problem is similar to this post from 2019. Although a much longer time.

http://www.plctalk.net/qanda/showthread.php?t=122403

I was questioning my choice of a PID execution time of 45 seconds. Perhaps I should return the time back to 1 second.

Other than that any suggestions on how I should change the parameters.
  Reply With Quote
Old February 12th, 2021, 12:14 PM   #4
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
With dependent gains PIDE, the integral term is in units of minutes/repeat. In that configuration, one starting point for tuning a first order system is to use the open-loop time constant as the integral setting.

Based on the trend chart of closed-loop response, it appears that 8 minutes much too fast for this loop. I would recommend increasing this value (for less integral) -- maybe as much as 120 minutes and see if it tamps down the amplitude of the oscillation.

In an ideal situation, you would put the loop in manual and make a step change to observe the response and compute the actual time constant and process gain. It is understandable that it might not be possible to run an open loop test with a process like this.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 12th, 2021, 12:17 PM   #5
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,356
Quote:
Originally Posted by GrizzlyC View Post
I was questioning my choice of a PID execution time of 45 seconds. Perhaps I should return the time back to 1 second.
That is a good start but it isn't your main problem.
Why is the dead time so long?
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 12th, 2021, 12:27 PM   #6
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
The deadtime is so long because the glycol valve is is cooling a tank via 2 cooling jackets with 11000L of media inside and the temperature sensor is located between the two jacket rings. The tank will naturally heat its self up over time.
  Reply With Quote
Old February 12th, 2021, 12:28 PM   #7
thingstodo
Member
Canada

thingstodo is offline
 
Join Date: Feb 2012
Location: Saskatoon
Posts: 445
Quote:
Originally Posted by GrizzlyC View Post
Hello,

I have a issue with tuning a slow acting PID loop using AB PIDE instruction. The system is designed to cool a tank after it heats up using a proportional valve that allows glycol to circulate through the tank.

My main issue is that the CV does not begin open to allow cooling until after the PV has passed the SP and does not start to close until after the PV has fallen below the SP. This creates an oscillation that wont correct its self over time.

If attached a picture to show what is happening in the tank right now. The time span is 24 hours For clarity this is the legend.

Blue = Tank Temp (used in the PID loop)
Purple = Secondary Tank Temp (not used in the PID loop)
Red = Setpoint (12C)
Orange = position of glycol valve (its stepped in 1% intervals)

I have a basic tuning parameter already set, information below.

P = 5
I = 8
D = 1.5
Execution Time for PID algorithm = 45 seconds
deadband = 0.01

Control Action = Direct acting (PV-SP)
Gains Equation = Dependent

I'm looking to make the system more predictive to throttle back the valve before the PV goes below the SP line. Any help would be greatly appreciated.

All the best,

I don't tune loops. I don't *GET* the whole process. So the discussion below follows NO RULES AT ALL. Just 30 years of occasional observation.


Where the temperature changes slowly and the control variable takes a while to show any change at all... particularly on a long time constant ... I would drop your Kp to maybe 1, your Ki is OK I think, Kd to 30, and your execution time closer to 300 seconds.


If the temperature takes that long to see any change, there is no point letting the outputs execute and 'wind up'. If I read your graphs correctly, the delay between control output and result is at least 3 minutes?


Having your control valve go 'digital' and do full open for 5 minutes, then full closed after the temperature starts to change ... is likely OK. It's the PWM version of PID control
  Reply With Quote
Old February 12th, 2021, 12:29 PM   #8
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
I have not touched the integral time since I started tuning the PID. Increasing the I mins will certainly dampen the oscillation but in the very long term will it also help to make the system more predictive?
  Reply With Quote
Old February 12th, 2021, 01:31 PM   #9
Robb B
Lifetime Supporting Member
Canada

Robb B is offline
 
Join Date: Feb 2011
Location: canuckistan
Posts: 133
Not my forte...

Predictive would be a feed-forward, wouldn't it? I don't think any Integral term will achieve this. You would need something to signal the next change in temperature before it happened. This might able to be achieved with the parameters, or maybe an external sensor upstream of the process.
  Reply With Quote
Old February 12th, 2021, 02:20 PM   #10
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
Based on the trend chart of closed-loop response, it appears that 8 minutes much too fast for this loop. I would recommend increasing this value (for less integral) -- maybe as much as 120 minutes and see if it tamps down the amplitude of the oscillation.
Ill take Mispeld advice and crank the I parameter up to 120 as a start. I can also play with the feedforward control although I would need to create the correct formula in order to predict the changes correctly.

Since it take a day for the tank to show a consistent response on the trending Ill post the results late tomorrow.
  Reply With Quote
Old February 12th, 2021, 02:39 PM   #11
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
Quote:
Originally Posted by GrizzlyC View Post
I have not touched the integral time since I started tuning the PID. Increasing the I mins will certainly dampen the oscillation but in the very long term will it also help to make the system more predictive?
With better tuning it could appear more predictive because there will not be so much overshoot from the integral term. Based on the description of the process and the one trend chart there will be a few challenges (1) pure dead time, (2) long process lag, (3) relatively small process gain.

It can be difficult to sort out (1) from (2) when all you have is closed-loop response. Pure dead time (aka transport delay) is the time it takes for a change in the CV (e.g., valve) to cause any movement in the PV (e.g., temperature). If this time is similar or greater than (2), it will be difficult to get good control without adding an explicit prediction algorithm (e.g., Smith Predictor, model-based control).

Process lag is the time it takes for the PV -- of a first order, non-integrating process -- to reach about 63% of its ultimate response to a CV change once the PV starts changing. You can have very good performance if response is dominated by lag (as opposed to deadtime) and disturbances (external impacts on PV) are not unreasonable.

Your deadtime will be determined by the pipe distance between the control valve and coil, and the fluid velocity. There will also be a component related to heat transfer through the coil and fluid to reach the temperature sensor. This could be reduced with active mixing in the tank as opposed to just heat conduction and convective mixing. Locating the valve closer to the tank is beneficial to reduce the transport aspect, but I'm guessing it is not far enough away to make a big difference.

The lag will have more to do with the fluid volume, heat capacity, glycol/process temperature difference, heat transfer effects (glycol flow, coil details), tank insulation, mixing, etc. Long process lag is not necessarily bad like long deadtime; it can oftentimes be dealt with effectively.

Process gain looks reasonable, but under the (external) conditions when the trend chart was made, the valve is operating close enough to zero such that it fully closes during the oscillation. This is making matters worse from the oscillation standpoint (e.g., average is not at target), but with better tuning it may be able to come off of zero and hover around 4%. Still quite close to one end, but needs to be considered in the context of all external operating conditions.

When I look at the trend and see the PV change direction shortly after the CV reaches zero, my inclination is to think that there might not be too much pure deadtime. If true, and the CV has room to work, it could very well be possible to significantly reduce or eliminate the amplitude of oscillation.

One watch-out is an oscillating external disturbance that overwhelms the control action capability. In that case, it may be a matter of chasing that disturbance with as much active control as possible to dampen its effect. But the cycle may still be significant and require feedforward action if it can be measured and the process model is known and well-behaved.

Last comment is about derivative action. You may be better off without it, even though the gain is so small in that its effect is marginal at these settings. That is especially true if it is the reason for the deadband, which looks like it may be contributing to the stepped CV action. It would be much better if the CV were moving smoothly through the control range instead of stepping by what looks like 1% increments.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 12th, 2021, 03:12 PM   #12
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
@GrizzlyC: One follow-up questions: What are the PIDE configuration values for CVEUMin and CVEUMax?

I ask because the P gain is based on the input range, not directly engineering units. The trend period looks long enough to give some hint about an appropriate P gain, knowing the input scaling values.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 12th, 2021, 03:36 PM   #13
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,317
[Update: combined three posts into one]

1) Is the output clamping happening in the PIDE or is it external (to the PIDE)? If the latter, the PIDE does not know it is being clamped and so (I think) it generates additional wind-up.

2) This is also suspect and a possibly a design issue i.e. measuring the temperature of something (or more specifically, at a location) that is being actively cooled.

Quote:
Originally Posted by GrizzlyC View Post
... and the temperature sensor is located between the two jacket rings. ...
3) Also, what is an acceptable deadband around the temperature setpoint? is it more than the measurement noise?

Last edited by drbitboy; February 12th, 2021 at 03:41 PM.
  Reply With Quote
Old February 12th, 2021, 03:41 PM   #14
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
With better tuning it could appear more predictive because there will not be so much overshoot from the integral term. Based on the description of the process and the one trend chart there will be a few challenges (1) pure dead time, (2) long process lag, (3) relatively small process gain.
All this information is very useful to understanding my process here.

The pure dead time is regrettably an unchangeable variable is this scenario. I must depend on thermal conduction to heat or cool the tank as using an agitator is not practical for this application.

In this closed loop scenario I should not have to work about an external disturbance changing the PV and resulting in unpredictable outputs.

I agree that derivative action may not be required here as at higher D numbers it tends to results in very temporary spikes in CV output when ever the PV changes 0.01 up or down.

Regarding the 1% increments. I have limited the output after the PID output to send whole numbers to the control valve as it tends to not move or get stuck in position if I send it micro increment adjustments. (this is a 4-20ma valve)

I'm interested in your comment about how " there might be too much pure deadtime. If true, and the CV has room to work it could very well be possible to significantly reduce or eliminate the amplitude of oscillation." Can you expand on this topic. I have the valve go to complete closed position 4ma when at 0%CV to ensure the valve is closed and move it to 7ma at 1%CV to just barely crack it open and proportion it up from there in small increments as it is a ball valve.

Also do you think that it worth my time to come up with a feed-forward formula to bias the valve as it approaches the SP. It would be the first time I messed with something like that in my automation career but I hear It can be quite useful for control applications with long pure dead times.

I appreciate the help your giving me on this topic
  Reply With Quote
Old February 12th, 2021, 03:42 PM   #15
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
@GrizzlyC: One follow-up questions: What are the PIDE configuration values for CVEUMin and CVEUMax?

I ask because the P gain is based on the input range, not directly engineering units. The trend period looks long enough to give some hint about an appropriate P gain, knowing the input scaling values.
CVEUmin = 0
CVEUMax = 100

valve full range open and close for 4-20ma
  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
NOP instruction foremanml LIVE PLC Questions And Answers 26 September 8th, 2014 04:40 PM
Sample Time of the PID ISA jcp LIVE PLC Questions And Answers 20 March 10th, 2012 02:29 AM
S7200 Siemens PID Control with dead time Espartaco LIVE PLC Questions And Answers 10 April 21st, 2011 06:18 AM
Cascading Sparky LIVE PLC Questions And Answers 24 February 17th, 2003 12:33 PM
Trying to find a website ganutenator LIVE PLC Questions And Answers 9 January 5th, 2003 04:06 PM


All times are GMT -5. The time now is 05:07 PM.


.