Jump to content

PID


greml1n

Recommended Posts

Can anyone elaborate on sample time in PID configuration? If an autotune is not performed this value is zero and the value entered via my linked numeric box for Integral time has no effect on the rate of change of the control value integral. Once I enter a value for sample time in the AT run parameters it works as it should. If an autotune is not feasible for certain control processes how would I go about choosing a value for sample time?

 

One other thing I notice with PID is if I change the Integral time to "0" the control value integral remains at its last value. If I change Derivative time to zero the control value derivative reverts to zero immediately. I was wondering if a reset numeric linked to any change in integral time value would remedy this?

 

Also, can anyone tell me what PID mode is or does in the PID configuration?

Link to comment
Share on other sites

Even when you perform an autotune there are certain PID config parameters that must be defined. They are the physical input and output of the PID loop, the input low and high limit, the output low and high limit, the reverse action bit, and the sample time.

 

If either the integral or derivative time is changed to 0, then that specific action will be disabled. It is possible to run any combination of proportional, integral, or derivative action.

 

When you changed the integral value to 0, was the proportional and derivative actions still running? Was the loop still working as you would expect?

 

When you changed the derivative value to 0, was the proportional and integral actions running? If they were all 0 then you would have disabled all PID action and this would drop the output to 0 as well.

 

The PID mode is currently reserved for future applications within the PID struct. It can currentlyn be ignored.

Link to comment
Share on other sites

All of the config parameters except sample time were defined. Running an autotune defined sample time and the loops worked fine. There are some loops in my application that autotune wont be feasible because of long dead/lag times of the process so a sample time was not defined. I didn't notice at first because I only entered a P value to get the loops working with a signal generator input. Once I started making changes to integral values it wasn't responding to any value I entered. I realized I need a sample time for timed based integral/derivative to work properly. Im wondering how I might choose a powerup sample time for a loop with big dead/lag times or if it matters?

 

P value was always defined or loops wont run. While loops were running and a change was made to integral value=0, the control value integral would remain at its last value in the control output. It would eventually goto zero after some big changes via my signal generator above or below setpoint.

 

The same scenario changing derivative value=0 causes the control value derivative to immediately change to zero and not be reflected in the control output. I would expect the same from the Integral scenario

Link to comment
Share on other sites

How long are the dead/lag times?

 

In general the reason for using PID is for dynamic output response in order to maintain a set point. However, the PID loop does not have to always be running. The sample time will only be used with the loop is being actively run. You can define a fast sample time (10ms) which will only be run when necessary. If there is a long dead period you can disable the PID loop if you are not trying to maintain a set point.

Link to comment
Share on other sites

In this case you can utilize a large sampling time, every couple of minutes if you wish. Sampling the values quicker than every 5-10 min should not negatively affect the system.

 

Also you will need to ensure that the Integral time isn't set too aggressively. The integral time should be the complete amount of time from when the PID output is activated (when it first reaches the border of the proportional band) up until it reaches the set point. This value is in units of seconds. If this value is set too low then you can have the integral error wind up which could cause the process value to overshoot the set point.

Link to comment
Share on other sites

Are you changing the value of the integral tag to 0 before the process value reaches the set point?

 

You can always force the Integral Error to 0. The value will gradually decrease over time so that the process value does not drop once achieving the setpoint (this could occur if the Integral Error is immediately reset upon reaching the set point.

Link to comment
Share on other sites

Integral time isn't required but can tighten up this control process. If integral time is set to zero I would like it to reset immediately to avoid any confusion when manually tuning the loop. If integral time is changed to another value I would rather reset the control value integral immediately to observe the difference. I guess its just a preference. I am newbie to PLC programming and know only what I have learned at UNI-versity

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...