Announcement

Collapse
No announcement yet.

PID Loop Alarms and Stage Programming

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • PID Loop Alarms and Stage Programming

    Hello,

    I have a PI loop regulating the temperature of a resistive heater. I want to jump to the next stage in the ladder program when the process variable (PV) is within +/- 2% of the setpoint (SP). One way to do this is to have two compare instructions in the same rung i.e IF PV >= 0.98*SP AND PV <= 1.02*SP JMP to next stage. Is there any other way to do this?

    I have noticed that PV overshoots SP a lot in the beginning and finally converges to steady state and is held around SP. I want to use the ALDEV command to halt the PID subroutine if there is a large deviation from SP. The problem, however, is when to check for this deviation. If I check for the deviation as soon as the PID loop starts, I get false "ON" flags since PV overshoots SP in the beginning before stabilizing. Is there a way to enable ALDEV only after PV has settled with +/- 2% of SP?


  • #2
    Use the compare to trigger a timer to accumulate. Then use the done bit from the timer in the stage jump logic. You could even do two timers one for in tolerance and one for out of tolerane and have them interlocking.

    Comment



    • #3
      Originally posted by g.mccormick View Post
      Use the compare to trigger a timer to accumulate. Then use the done bit from the timer in the stage jump logic. You could even do two timers one for in tolerance and one for out of tolerane and have them interlocking.

      But, to what value would the timer accumulate to? The time taken for PV to stabilize at SP may vary sometimes. Is there a way to activate ALDEV only when PV is within +/- 2% of SP? This is to ensure that I don't get a deviation alarm during initial overshoot.

      Comment



      • #4
        Just a wild thought... Why not just disable the 'I' until the PV is +/- 10% or so for SV? The problem sounds like the 'I' is woundup high and has to dissipate, thus throwing the output too high on startup.

        Comment



        • #5
          I found a workaround for this. I compare if PID.lasterror is between the margin of acceptable error (in my case about 2 degree C). If true, set a bit. The bit is then used as an input to TMR function and I count up to 30 seconds (Preset value). This gives me enough time to decide that PV has stabilized over SP and is within the margin of acceptable error (+/- 2 degree C). Any deviation larger than 2 degree C in either direction will reset the timer since the bit goes LOW. The done bit of the timer can then be used to activate any alarms (Eg: ALDEV or ALRATE) and jump to the next stage.

          Comment



          • #6
            Originally posted by genebond View Post
            Just a wild thought... Why not just disable the 'I' until the PV is +/- 10% or so for SV? The problem sounds like the 'I' is woundup high and has to dissipate, thus throwing the output too high on startup.
            There will always be some overshoot even for a well tuned (Auto Tuned) PID loop. I can try decreasing proportional gain but my system performance would slow down. The I is important is reducing the steady state error.

            Comment



            • #7
              Originally posted by RockB View Post

              There will always be some overshoot even for a well tuned (Auto Tuned) PID loop. I can try decreasing proportional gain but my system performance would slow down. The I is important is reducing the steady state error.
              Exactly. By eliminating the Integrator portion, the Proportional Gain gets you into the ballpark quickly, then when you enable the Integrator, it will pull in the last few % of error. This works very well on high inertia systems to get to SP w/o overshoot and excessive output error. The Proportional gives a quick on/off output, and the Integrator filters it out.

              Comment

              Working...
              X