greml1n Posted October 26, 2014 Report Share Posted October 26, 2014 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 More sharing options...
Alexander Posted October 27, 2014 Report Share Posted October 27, 2014 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 More sharing options...
greml1n Posted October 27, 2014 Author Report Share Posted October 27, 2014 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 More sharing options...
Alexander Posted October 28, 2014 Report Share Posted October 28, 2014 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 More sharing options...
greml1n Posted October 30, 2014 Author Report Share Posted October 30, 2014 There could be upto 5-10 minutes of dead time in some applications. Its a chemical process where once the chemical pump turns on it can take that long for the process value to increase. I am trying to maintain a setpoint Link to comment Share on other sites More sharing options...
Alexander Posted October 30, 2014 Report Share Posted October 30, 2014 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 More sharing options...
greml1n Posted October 31, 2014 Author Report Share Posted October 31, 2014 Thanks Alexander Can you address the circumstance of the control value integral remaining as part of the control output after changing the integral term to O. Is this normal? As I said, this isn't how it works when the derivative control value is changed to 0 Link to comment Share on other sites More sharing options...
Alexander Posted November 3, 2014 Report Share Posted November 3, 2014 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 More sharing options...
greml1n Posted November 4, 2014 Author Report Share Posted November 4, 2014 Yes, I am changing the value to 0 before process value reaches setpoint Link to comment Share on other sites More sharing options...
Alexander Posted November 5, 2014 Report Share Posted November 5, 2014 Is there a reason you are setting the integral value to 0 before a setpoint is reached? Setting the value to 0 will not automatically stop the error integral as it has already been calculated. If you wish to completely stop integral action you can manually force this value to 0 also. Link to comment Share on other sites More sharing options...
greml1n Posted November 6, 2014 Author Report Share Posted November 6, 2014 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 More sharing options...
Alexander Posted November 7, 2014 Report Share Posted November 7, 2014 You could trigger this operation using a math compare function to the integral operand. When this operand value is 0 you can then trigger the integral error rest and load a value of 0 into that PID parameter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now