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, 05:06 PM   #16
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
Darn. I had a response all written up before I realized I need PVEUMin and PVEUMax, not the corresponding CV scales.

The default for these is also 0 and 100, but a decent chance they were modified depending on your temperature range.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 12th, 2021, 05:31 PM   #17
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,322
Is this a new or an existing installation?


If the latter, has the PID ever controlled the temperature better than this?
  Reply With Quote
Old February 12th, 2021, 05:40 PM   #18
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,322
Quote:
Originally Posted by GrizzlyC View Post

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."

@Mispeld actually wrote "the might not be too much pure deadtime"
  Reply With Quote
Old February 12th, 2021, 05:55 PM   #19
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 597
The parameter that will close the valve before the temperature is exceeded is the derivative factor D that acts not by the error value (PV - SV) but by its variation.

You would have to play with it and see the effect, the dilemma is that there are PID implementations on which increasing D the derivative effect increases and in others it decreases, therefore you will first have to test whether you should increase or decrease it.

If you put excessive effect it can also generate oscillation.

If you manage to stabilize the oscillation but it takes a long time to finally reach the setpoint then you would have to adjust I

Systems with a lot of thermal inertia need derivative effect.
__________________
Suppanel HMI

Last edited by lfe; February 12th, 2021 at 06:04 PM.
  Reply With Quote
Old February 12th, 2021, 07:28 PM   #20
JaxGTO
Supporting Member
United States

JaxGTO is offline
 
Join Date: Apr 2009
Location: Kalieefornia
Posts: 852
With a peak to peak time of 5 hours I would expect the I = (5 * 60)=300 and the D 1/8 * I = 45. That would be my starting point. I am assuming that 'I' is minutes per repeat of course.
__________________
I have to use Rockwell Software!
  Reply With Quote
Old February 12th, 2021, 08:00 PM   #21
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,322
Quote:
Originally Posted by GrizzlyC View Post
...

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

Increasing KsubD will increase the Derivative effect; see below.




yyy.png
  Reply With Quote
Old February 12th, 2021, 08:42 PM   #22
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
You guys are flailing and failing

The first thing I would do is plot the integrator's contribution to the control output. Then it is easy to see if it is winding up or down too much.


I would also model the system. Rockwell PLCs/software can save away the trend. The control output and PV must be recorded as a function of time. Then it is possible compute a model. An accurate model will probably be required because a simple PID may not work by itself.


I would use a Smith Predictor but this will require the use of a long FIFO or queue to record data. Another method that would work is MPC or model predictive control but that method is too complicated to implement in a PLC and it still requires an accurate model.


When the dead time is longer than the time constants the system will be difficult to tune. A thousand curses on the engineers that design systems like this that don't consider how it will be controlled.


Here is an example of of using a PID with Smith Predictor.
In this example the plant is modeled as a SOPDT system with the two time constants being 0.5 and 2 minutes. The dead time is 180 minutes which is MUCH longer than the plant time constants.
To make tuning more realistic I introduce modeling error at the top of page 6.

https://deltamotion.com/peter/Mathca...SOPDT%20SP.pdf


I created this a long time ago. I am sure it has been posted before.

I know the date is wrong.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 12th, 2021, 09:13 PM   #23
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
Darn. I had a response all written up before I realized I need PVEUMin and PVEUMax, not the corresponding CV scales.

The default for these is also 0 and 100, but a decent chance they were modified depending on your temperature range.
Lol thanks for doing that anyways but yeah its default 0-100%
  Reply With Quote
Old February 12th, 2021, 09:15 PM   #24
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by drbitboy View Post
Is this a new or an existing installation?


If the latter, has the PID ever controlled the temperature better than this?
This is an addon to an existing temperature control system. The first system actually had 2 state valves controlling the temperature within a 0.5C deadband, however the large load of glycol shocked the product and was detrimental to the final result and we had to change to a proportional system.
  Reply With Quote
Old February 12th, 2021, 09:21 PM   #25
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by lfe View Post
The parameter that will close the valve before the temperature is exceeded is the derivative factor D that acts not by the error value (PV - SV) but by its variation.

You would have to play with it and see the effect, the dilemma is that there are PID implementations on which increasing D the derivative effect increases and in others it decreases, therefore you will first have to test whether you should increase or decrease it.

If you put excessive effect it can also generate oscillation.

If you manage to stabilize the oscillation but it takes a long time to finally reach the setpoint then you would have to adjust I

Systems with a lot of thermal inertia need derivative effect.
I agree that this system has a lot of thermal inertia which is the cause of all my problems. I started with 35Kp 8Ki and 0Kd Adjusting the Kd parameter in this AB PIDE instruction up from 0.5, 1.5 and then 3 did not result in anything other than random spikes in the opposite direction of the control action. The spikes occurred if the PV went up or down 0.01C then the CV immediately went back to its original value. If the spikes were smoothed out it would have been beneficial.

In order to test this I extended the PID algorithm time from 1 seconds to 45 seconds. This however had none to negligible effects.
  Reply With Quote
Old February 12th, 2021, 09:25 PM   #26
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by JaxGTO View Post
With a peak to peak time of 5 hours I would expect the I = (5 * 60)=300 and the D 1/8 * I = 45. That would be my starting point. I am assuming that 'I' is minutes per repeat of course.
Its Mins/Repeat, sorry should have mentioned that earlier.
  Reply With Quote
Old February 12th, 2021, 09:35 PM   #27
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Peter Nachtwey View Post
The first thing I would do is plot the integrator's contribution to the control output. Then it is easy to see if it is winding up or down too much.


I would also model the system. Rockwell PLCs/software can save away the trend. The control output and PV must be recorded as a function of time. Then it is possible compute a model. An accurate model will probably be required because a simple PID may not work by itself.


I would use a Smith Predictor but this will require the use of a long FIFO or queue to record data. Another method that would work is MPC or model predictive control but that method is too complicated to implement in a PLC and it still requires an accurate model.


When the dead time is longer than the time constants the system will be difficult to tune. A thousand curses on the engineers that design systems like this that don't consider how it will be controlled.


Here is an example of of using a PID with Smith Predictor.
In this example the plant is modeled as a SOPDT system with the two time constants being 0.5 and 2 minutes. The dead time is 180 minutes which is MUCH longer than the plant time constants.
To make tuning more realistic I introduce modeling error at the top of page 6.

https://deltamotion.com/peter/Mathca...SOPDT%20SP.pdf


I created this a long time ago. I am sure it has been posted before.

I know the date is wrong.
I took a look through your Mathcad document with the smith predictor in it. I won't lie that this is way over my head. I did however send off some screen captures of some trend displays to our engineering department. A screen capture can only give you so much information but our engineer returned with our original parameters of,

P=35
I=8
D=0

Which was not a bad start. Now that we have been going for about a week I connected an SQL database to the factorytalk application to get some refined data. That chart I showed earlier on has been compiled into an excel spreadsheet with a pivot table. I sent off that information to our engineer to further refinement.

Ill have to ask him if he uses a smith predictor to determine the gains, im sure he uses something close to that.

Without imposing I still have the spreadsheet if anybody is interested is seeing the recorded data in CSV form.
  Reply With Quote
Old February 13th, 2021, 12:34 AM   #28
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 took a look through your Mathcad document with the smith predictor in it. I won't lie that this is way over my head. I did however send off some screen captures of some trend displays to our engineering department. A screen capture can only give you so much information but our engineer returned with our original parameters of,

P=35
I=8
D=0
What are the units for the proportional gain?
The integrator usually is a time constant or has units of minutes.
Quote:
Which was not a bad start.
The integrator time constant is way too short for a system like yours.
Are you going to plot the integrator's contribution to the control output?
The RS5000 can save the trend data and export it as en excel spread sheet.
Quote:
Now that we have been going for about a week I connected an SQL database to the factorytalk application to get some refined data. That chart I showed earlier on has been compiled into an excel spreadsheet with a pivot table. I sent off that information to our engineer to further refinement.
I doubt they know what they are doing.
Quote:
Ill have to ask him if he uses a smith predictor to determine the gains, im sure he uses something close to that.
A Smith Predictor is not used to calculate gains. It is used to predict what the system will do 5 hours in advance in your case. This keeps the integrator from winding up when the actual system isn't responding.


Quote:
Without imposing I still have the spreadsheet if anybody is interested is seeing the recorded data in CSV form.
Yes, if you can display it in 3 columns
Time, Control Output , PV
I will use this program to estimate the plants SOPDT parameters.
https://deltamotion.com/peter/py/SysID%20SOPDT.zip
I have posted this a few times. It should be stickied somewhere obvious.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old February 13th, 2021, 08:10 AM   #29
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 597
Quote:
Originally Posted by GrizzlyC View Post
I agree that this system has a lot of thermal inertia which is the cause of all my problems. I started with 35Kp 8Ki and 0Kd Adjusting the Kd parameter in this AB PIDE instruction up from 0.5, 1.5 and then 3 did not result in anything other than random spikes in the opposite direction of the control action. The spikes occurred if the PV went up or down 0.01C then the CV immediately went back to its original value. If the spikes were smoothed out it would have been beneficial.

In order to test this I extended the PID algorithm time from 1 seconds to 45 seconds. This however had none to negligible effects.
I have seen some PID algorithm in PLCs and also in panel temperature controllers in which the derivative effect makes that rebound that you describe but the sum of both corrections usually goes in the correct direction of the control action.

But if you only regulate every 45 seconds, it may be that the first correction in the opposite direction has an effect that is too long and harmful.

I installed in the past about a hundred large industrial furnaces with tens of tons of material inside and always used a fixed PID run period of 3 seconds.
__________________
Suppanel HMI
  Reply With Quote
Old February 13th, 2021, 08:42 AM   #30
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 lfe View Post
I have seen some PID algorithm in PLCs and also in panel temperature controllers in which the derivative effect makes that rebound that you describe but the sum of both corrections usually goes in the correct direction of the control action.

But if you only regulate every 45 seconds, it may be that the first correction in the opposite direction has an effect that is too long and harmful.

I installed in the past about a hundred large industrial furnaces with tens of tons of material inside and always used a fixed PID run period of 3 seconds.

The problem is that very few really understand PIDs. The teachers teach what they were taught but it is very shallow.
Most people are taught what the different gains do. This is OK but it they are not taught what they really do. That is the problem.


The PID gains and time constant place poles and zeros but were are mostly concerned with poles. Closed loop poles are the roots of the denominator of a closed loop transfer function. The closed loop poles determine the response. Negative closed loop poles cause the error to decay. The more negative they are the faster the errors will disappear. Imaginary poles will result in over shoot. All of this can be calculated.


Way back in the 1990s there were newsgroups where people would brag about tuning a large number of systems that were all the same. That was no big deal. I was not impressed. It showed no real understanding of closed loop control. I ruffled a lot of feathers by saying it could all be calculated.


In this application the update time isn't that critical. The update time should be at least 10 times shorter than the plants shortest time constant but in the OP's case the plant appears to have a very long time constant. 45 seconds would do since it appears the plants time constant is more than 10 minutes long, it is just an odd ball value. 3 seconds or 10 seconds would do. That isn't the main problem. It is the dead time.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  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 09:20 PM.


.