Help - Search - Members - Calendar
Full Version: PID timer trigger
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Conor
Hi all,

I have a PID running on a Combustion chamber. I have got a lot of "over-shoot" in the PID. I see that the system integrator that originally set up the PID has a timer triggering the PID every 2 seconds. I have reduced this to 1 second. Can anyone explain why there is a timer in the code? Is it to make sure that the PID triggers (changes the output)?

This program is running on a CompactLogix 5335E controller.

Thanks, Conor
MikeSmith
QUOTE (Conor @ Nov 13 2009, 10:18 AM) *
I have a PID running on a Combustion chamber. I have got a lot of "over-shoot" in the PID. I see that the system integrator that originally set up the PID has a timer triggering the PID every 2 seconds. I have reduced this to 1 second. Can anyone explain why there is a timer in the code? Is it to make sure that the PID triggers (changes the output)?


Hi Conor,
-When you say "trigger" do you mean the PID block is in a routine that only gets called every X seconds.
-Is it PID or PIDE?
-Can you please give me the configuration parameters of the block?
-[time constant estimate] If you hand the combustion chamber at full power from minimum to maximum PV.. how long would it take?
-Have you checked the tuning of the P,I,D parameters by using something like Zeigler-Nichols or some other tuning procedure?
Thanks,
Mike
Conor
QUOTE (MikeSmith @ Nov 13 2009, 06:22 AM) *
Hi Conor,
-When you say "trigger" do you mean the PID block is in a routine that only gets called every X seconds.
-Is it PID or PIDE?
-Can you please give me the configuration parameters of the block?
-[time constant estimate] If you hand the combustion chamber at full power from minimum to maximum PV.. how long would it take?
-Have you checked the tuning of the P,I,D parameters by using something like Zeigler-Nichols or some other tuning procedure?
Thanks,
Mike

Hi Mike,

-By trigger I mean, a timer in the rung above PID. Then PID rung has timer.dn bit then the PID.

-It is PID. I am not sure if we have the licence to run the PIDE (I have read that you need a licence to us the PIDE function block).

-Config of PID is as follows;
Dependent
SP-PV
PV
Loop update 1 sec
100%
0%
0%
No Bias calc is ticked.

The PID settings are;
P: 2
I: 0.75
D: 0.1

-Running temp is 950, and it takes about 15 mins to heat up, depending on the starting temp

-re tuning the PID, I am not 100% sure about how to do this. It was set up the the system integrator originally. I don't know what they used to do this. I have always thought that the set-up of a PID is a kind of "black art" (I know Bob or Paul will probably scould me for saying that!?!?!)

Thanks again, Conor

PS. I checked the temps out. It took about 45 mins to get from 350 to 950 degrees
JohnM
The timer is there to make sure that the PID updates at the same rate as the setting in the loop. If you changed that timer to 1 second you need to change the Loop Update Time unde the Configuration Tab to 1.0 seconds. This may be done in the code automatically if the timer preset is multiplied by 1000 and written to the tag xxxxx. UPD (where xxxxx is the PID tag).

The timer is required unless you are running the PID in a scheduled task (which is the preferred way but not always done). This information is all in the manuals.

Without this timer and matching of the loop update time the tuning parameters are meaningless in that they will have no real world relationship to your process time contant.
Conor
QUOTE (JohnM @ Nov 13 2009, 09:10 AM) *
The timer is there to make sure that the PID updates at the same rate as the setting in the loop. If you changed that timer to 1 second you need to change the Loop Update Time unde the Configuration Tab to 1.0 seconds. This may be done in the code automatically if the timer preset is multiplied by 1000 and written to the tag xxxxx. UPD (where xxxxx is the PID tag).

The timer is required unless you are running the PID in a scheduled task (which is the preferred way but not always done). This information is all in the manuals.

Without this timer and matching of the loop update time the tuning parameters are meaningless in that they will have no real world relationship to your process time contant.

Hi JohnM,

As per reply above, the Loop update time is 1 sec. Is this correct then??
Ron Beaufort
Greetings Conor ...

see if the TWO posts which start here:

http://www.plctalk.net/qanda/showthread.ph...73609#post73609

are any help ... the original platform in that discussion was a PLC-5 - but the concepts are the same for the system that you're dealing with ...
Conor
QUOTE (Ron Beaufort @ Nov 13 2009, 11:37 AM) *
Greetings Conor ...

see if the TWO posts which start here:

http://www.plctalk.net/qanda/showthread.ph...73609#post73609

are any help ... the original platform in that discussion was a PLC-5 - but the concepts are the same for the system that you're dealing with ...

Hi Ron,

Thanks for that, I will check it out

JohnM
QUOTE (Conor @ Nov 13 2009, 09:40 AM) *
QUOTE (JohnM @ Nov 13 2009, 09:10 AM) *
The timer is there to make sure that the PID updates at the same rate as the setting in the loop. If you changed that timer to 1 second you need to change the Loop Update Time unde the Configuration Tab to 1.0 seconds. This may be done in the code automatically if the timer preset is multiplied by 1000 and written to the tag xxxxx. UPD (where xxxxx is the PID tag).

The timer is required unless you are running the PID in a scheduled task (which is the preferred way but not always done). This information is all in the manuals.

Without this timer and matching of the loop update time the tuning parameters are meaningless in that they will have no real world relationship to your process time contant.

Hi JohnM,

As per reply above, the Loop update time is 1 sec. Is this correct then??


Yes - the timer time should match the Loop update time.
Ron Beaufort
from JohnM:

QUOTE
Yes - the timer time should match the Loop update time.


absolutely correct ... but ...

if the two settings (Loop Update Time and the "trigger") do NOT match, it is possible (but not recommended) to compensate for the mismatch by "fudging" the tuning parameters (especially the Integral setting and the Derivative setting) ... whoever set up the system originally might have done that ...

from Conor:

QUOTE
I see that the system integrator that originally set up the PID has a timer triggering the PID every 2 seconds. I have reduced this to 1 second.


smart money says that when you changed the trigger setting to "correct" it, then the existing tuning changed also ...

in simplest terms, by "fixing" the mismatch, you might (well, actually "probably") will now have to retune (at least) the Integral and the Derivative settings to accommodate the new trigger setting ...

possible scenario:

suppose that the original tuning was working OK ... suppose that you just happened to notice the discrepancy between the trigger and the Loop Update Time settings ... suppose that you simply "fixed" the trigger to match the Loop Update Time – but did nothing else ... in that case, the tuning is probably NOT going to be OK anymore ...

analogy: suppose that the thermostat knob on Granny's oven is installed "crooked" ... but Granny is aware of that – and knows that to bake at 350 degrees F. she just needs to set the knob to 400 degrees instead ... she's been compensating that way for years - and doing very well ... now suppose that you come in and "fix" the knob for Granny – but you neglect to tell her about the change ... oops! ... until she figures out the new "correct" setting, the cakes aren't going to turn out right at all ...

major point: if TWO things are "wrong" (Granny's knob position and her compensating setting) then fixing just ONE of those things is probably not a good idea ...

in your case, the TWO things that were "wrong" were (apparently) the "trigger" setting and the "compensating" tuning ... so ... you really can't just fix ONE of those things and expect the system to keep working the same way that it was ... in simplest terms, it might not get "better" – it might get "worse" ...

suggested plan of action: if the previous tuning wasn't all that great to begin with, then grit your teeth and "fix" the trigger and the Loop Update Time to match – and then retune the system ... on the other hand, if the original tuning worked (more or less) OK, then you're probably not going to see any improvement by "fixing" the trigger timing ... indeed, you might end up worse than you were before ...

big questions: (1) when you "fixed" the trigger setting, did the system response change? ... (2) if the system response changed, did it improve – or did it get worse? ...

all of this should make a lot more sense after you read (and understand) the part about Bubba's paycheck in those posts that I linked above ...

hope this helps ...
Conor
Hi lads,

I have checked out the PID loop as it ran over the weekend, and it seems to be a lot better than before I changed the timer.

I will keep an eye over the coming days.

Thanks again, Conor
Conor
QUOTE (Ron Beaufort @ Nov 13 2009, 04:48 PM) *
big questions: (1) when you "fixed" the trigger setting, did the system response change? ... (2) if the system response changed, did it improve – or did it get worse? ...

Hi Ron,

I have read your attached post, with regard to Bubba'a pay check. It does make sense.

From above
Question (1) & (2)
As I posted earlier, I can see an improvement in the system responce.

I suppose my biggest problem is that I have never really set-up a PID loop from scratch. I did find the difference betwen the Lopp update timer and the PID "trigger" timer, and this seems to be a big help to the process.

I will have to look up more of your posts Ron to try and get my head around the PID loop tuning.

Many thanks again, Conor
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.