Ron Beaufort
Lifetime Supporting Member
Greetings jesus_adan,
first of all, your original forum doesn't do a good job of handling pictures and other attachments ... so I’ve posted something which might help you here ...
as near as I can tell, the problems that you’re having are related to the manner in which the MicroLogix 1500 displays - and interprets - the decimal places for the settings of Kc, Ti, and Td ... this first picture shows how the PID setup screen will appear with the RG (Reset/Gain) bit turned off ... note that this picture is provided for comparison only ... once you’ve taken a quick look at it, just move on to the next picture ... I’ll concentrate only on that one for the rest of this discussion ... notice that with the RG bit turned off, the Kc and the Ti settings each have only one decimal place of resolution ...
normally we turn the RG bit ON because that technique gives us more resolution (one more decimal place) for our Kc and Ti settings ... note: the Td setting is NOT affected by the RG bit status ... as near as I can tell, the RG bit is included in the PID setup in order to make the PID backwardly compatible with older style processors that would not support the higher resolution ... in my opinion, there is no reason to leave the RG bit in its default state of 0 ... personally, I always just set it to 1 and leave it that way ... now note the extra decimal places for Kc and Ti in this picture ...
now let’s look at the actual values which are stored in the data tables for this PID ... keep in mind that these are INTEGER values and so no decimal places are allowed here ...
so ... note that the data table locations contain the following example integer values:
Kc = 123
Ti = 234
Td = 345
but look back at the second PID picture (with the RG bit set to 1) and you’ll see that the PID INTERPRETS these same values as follows:
Kc = 1.23
Ti = 2.34
Td = 3.45
specifically notice that each one of these parameters has TWO decimal places indicated on the screen ... the PID will use these “decimal place” interpretations for its calculations ...
now ... as near as I can tell by what you’ve posted so far, any remaining problems that you’re having will be the result of differences in the “units” that exist between your original calculations for an “Independent Gains” system and the calculations required for a “Dependent Gains” system ... and yes, I am aware that the term “units” doesn’t really fit into a discussion of “unitless/dimensionless” numbers ... still, I have a hunch that your original calculations were NOT done for an Allen-Bradley PLC-5 controller using the “AB/Independent” gains system ... specifically, I think that you are basing your calculations on some type of “mathematical” model - or possibly on some other brand of PID controller ... am I correct in that assumption? ... if so, then the decimal places that you’re showing in your original calculations MIGHT make more sense to that model or that other controller ... but ... the conversions for the MicroLogix 1500 seem “out of line” ...
just as a quick rule of thumb, let me give you a range of numbers which would “make sense” for most PID applications using a MicroLogix1500 controller ... IMPORTANT! ... at this point, I don’t even know what application you’re trying to tune so these are NOT meant to be suggested settings for your parameters ... all I’m trying to do is give you some guidance as to a range of numbers which would seem “reasonable” in a great many cases ... analogy: “6 to 26 miles per gallon” would be a “reasonable” range of values for gas mileage on a passenger car ... but ... the range “126 to 456 miles per gallon” would seem outlandish ... in that regard, some of the numbers that you calculated for your tuning parameters would certainly seem “out of line” in most applications ... with all of that in mind, these are some values which (again in MOST applications) would seem “reasonable” on a PID setup screen for a MicroLogix 1500 system ...
Kc = 0.50 to 2.00 (16.00 would not be unheard of)
Ti = 0.01 to 2.00 (10.00 would not be unheard of)
Td = 0.01 to 0.90 (anything much higher would be rare)
I really hesitate to post these for fear that you or someone in the future might mistake them for “minimum and maximum” values ... they are NOT intended to be that ... they are merely intended to give you a “ballpark” idea from which to work ... I hope that this helps ... if you need more than this, it would be a good idea to tell us something about your application ... and about how you arrived at your original values ...
just as a final tip: MOST problems with PID on Allen-Bradley systems hinge upon “timing” issues ... specifically, in MOST systems the “Time Mode” entry should be changed from its default setting of “STI” to “TIMED” operation instead ... basic idea: if the PID is left in the “STI” mode, then the PID will calculate a new output value each and every time that the PID rung is scanned by the processor ... this will significantly increase the Integral action and make it “run away” ... it will also adversely affect the Derivative action ...
as a rule of thumb ... in MOST MicroLogix applications, the PID rung should be located in a continuously scanned ladder file (ladder file #2 is recommended) ... and the PID rung should be “unconditional” (having no other instructions other than the PID) ... and the “Time Mode” setting should be set for “TIMED” instead of for “STI” ... if you need help with these concepts, please post again ...
I hope this helps ... and welcome to the PLCs.net forum ...
first of all, your original forum doesn't do a good job of handling pictures and other attachments ... so I’ve posted something which might help you here ...
as near as I can tell, the problems that you’re having are related to the manner in which the MicroLogix 1500 displays - and interprets - the decimal places for the settings of Kc, Ti, and Td ... this first picture shows how the PID setup screen will appear with the RG (Reset/Gain) bit turned off ... note that this picture is provided for comparison only ... once you’ve taken a quick look at it, just move on to the next picture ... I’ll concentrate only on that one for the rest of this discussion ... notice that with the RG bit turned off, the Kc and the Ti settings each have only one decimal place of resolution ...
normally we turn the RG bit ON because that technique gives us more resolution (one more decimal place) for our Kc and Ti settings ... note: the Td setting is NOT affected by the RG bit status ... as near as I can tell, the RG bit is included in the PID setup in order to make the PID backwardly compatible with older style processors that would not support the higher resolution ... in my opinion, there is no reason to leave the RG bit in its default state of 0 ... personally, I always just set it to 1 and leave it that way ... now note the extra decimal places for Kc and Ti in this picture ...
now let’s look at the actual values which are stored in the data tables for this PID ... keep in mind that these are INTEGER values and so no decimal places are allowed here ...
so ... note that the data table locations contain the following example integer values:
Kc = 123
Ti = 234
Td = 345
but look back at the second PID picture (with the RG bit set to 1) and you’ll see that the PID INTERPRETS these same values as follows:
Kc = 1.23
Ti = 2.34
Td = 3.45
specifically notice that each one of these parameters has TWO decimal places indicated on the screen ... the PID will use these “decimal place” interpretations for its calculations ...
now ... as near as I can tell by what you’ve posted so far, any remaining problems that you’re having will be the result of differences in the “units” that exist between your original calculations for an “Independent Gains” system and the calculations required for a “Dependent Gains” system ... and yes, I am aware that the term “units” doesn’t really fit into a discussion of “unitless/dimensionless” numbers ... still, I have a hunch that your original calculations were NOT done for an Allen-Bradley PLC-5 controller using the “AB/Independent” gains system ... specifically, I think that you are basing your calculations on some type of “mathematical” model - or possibly on some other brand of PID controller ... am I correct in that assumption? ... if so, then the decimal places that you’re showing in your original calculations MIGHT make more sense to that model or that other controller ... but ... the conversions for the MicroLogix 1500 seem “out of line” ...
just as a quick rule of thumb, let me give you a range of numbers which would “make sense” for most PID applications using a MicroLogix1500 controller ... IMPORTANT! ... at this point, I don’t even know what application you’re trying to tune so these are NOT meant to be suggested settings for your parameters ... all I’m trying to do is give you some guidance as to a range of numbers which would seem “reasonable” in a great many cases ... analogy: “6 to 26 miles per gallon” would be a “reasonable” range of values for gas mileage on a passenger car ... but ... the range “126 to 456 miles per gallon” would seem outlandish ... in that regard, some of the numbers that you calculated for your tuning parameters would certainly seem “out of line” in most applications ... with all of that in mind, these are some values which (again in MOST applications) would seem “reasonable” on a PID setup screen for a MicroLogix 1500 system ...
Kc = 0.50 to 2.00 (16.00 would not be unheard of)
Ti = 0.01 to 2.00 (10.00 would not be unheard of)
Td = 0.01 to 0.90 (anything much higher would be rare)
I really hesitate to post these for fear that you or someone in the future might mistake them for “minimum and maximum” values ... they are NOT intended to be that ... they are merely intended to give you a “ballpark” idea from which to work ... I hope that this helps ... if you need more than this, it would be a good idea to tell us something about your application ... and about how you arrived at your original values ...
just as a final tip: MOST problems with PID on Allen-Bradley systems hinge upon “timing” issues ... specifically, in MOST systems the “Time Mode” entry should be changed from its default setting of “STI” to “TIMED” operation instead ... basic idea: if the PID is left in the “STI” mode, then the PID will calculate a new output value each and every time that the PID rung is scanned by the processor ... this will significantly increase the Integral action and make it “run away” ... it will also adversely affect the Derivative action ...
as a rule of thumb ... in MOST MicroLogix applications, the PID rung should be located in a continuously scanned ladder file (ladder file #2 is recommended) ... and the PID rung should be “unconditional” (having no other instructions other than the PID) ... and the “Time Mode” setting should be set for “TIMED” instead of for “STI” ... if you need help with these concepts, please post again ...
I hope this helps ... and welcome to the PLCs.net forum ...