Announcement

Collapse
No announcement yet.

P2000 PID instruction keeps output on restart.

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

  • P2000 PID instruction keeps output on restart.

    PSuite v3.5.1

    I apologize if there's an obvious answer to this, but I've read and re-read the help docs and searched the forums, and I haven't found a way to make this work correctly:

    I'm using the PID instruction to control flow with a pump and mass flow meter. PID works just fine, but when I stop the pump and restart later the output jumps right back to the last value, that is, if the output was at 50% it jumps right back to 50%. It then works its way back to setpoint, but the initial bump can cause some problems. I've played with bias freeze and initialization mode to no avail. It really looks like the integrated error isn't cleared when I stop and restart the PID. I have this implemented on about 5 different pumps and they all act the same. What am I doing wrong?

    Sample project attached.
    Attached Files

  • #2
    You're in the right area of the configuration. I've had issues as well deciphering the options. Have you tried options (1) and (4)?
    Attached Files
    Last edited by RBPLC; 03-28-2020, 05:25 PM.

    Comment


    • #3
      Try option 1. It will use the current PV for the setpoint on initialize. Then write the setpoint you wish it to be to it. I usually have a slight delay after initializing then write the process setpoint.

      Comment


      • #4
        If the motor is running and close to correct speed when you want to go to Auto PID then use setting 1. The current flow(PV) will be set into the SP of the PID and the current output will be set into the PID bias. (bump-less transfer)

        If the motor is stopped/zero speed and you want to start the motor in Auto PID then use setting 3. Write a zero to the Output before going to auto. This will leave the SP where it was before and set the Bias to the current output (zero) - the Proportional term. This setting subtracts the P term from the output. If you don't subtract the P term there will always be a bump when going to Auto and there is an error, SP - PV <>0.

        If you can tune the PID using only the I term, this would eliminate the P bounce. Try a very small P, like .001. Zero D(you don't need D anyhow). Adjust the I to get the motor to run correctly in Auto. This would be the easiest if you can tune the loop with just I.

        Comment


        • #5
          Originally posted by bsinkovich View Post
          If the motor is running and close to correct speed when you want to go to Auto PID then use setting 1. The current flow(PV) will be set into the SP of the PID and the current output will be set into the PID bias. (bump-less transfer)

          If the motor is stopped/zero speed and you want to start the motor in Auto PID then use setting 3. Write a zero to the Output before going to auto. This will leave the SP where it was before and set the Bias to the current output (zero) - the Proportional term. This setting subtracts the P term from the output. If you don't subtract the P term there will always be a bump when going to Auto and there is an error, SP - PV <>0.

          If you can tune the PID using only the I term, this would eliminate the P bounce. Try a very small P, like .001. Zero D(you don't need D anyhow). Adjust the I to get the motor to run correctly in Auto. This would be the easiest if you can tune the loop with just I.
          To clarify, the application is mixing of two fluids in a continuous process. Two closed-loop pumps feed into a static mixer. Both pumps should start at 0 output and the integral term should cause them to ramp to setpoint. P and D terms are small and just used to smooth minor fluctuations. This works on the first start.

          I'll go through everything again and make sure the output is getting reset between starts.

          Comment


          • #6
            crashkopf I see. Use setting 3. Write a zero to the OUTPUT and also a zero to the BIAS. then go to AUTO. The problem is any BIAS left over from the last run is still in the PID equation. We need to get that to zero or when we go to AUTO the motor will ramp to this BIAS speed instantly. Second, another jump in startup speed is the P calculation. The P term is the P value * the ERROR. So when the Loop is placed into AUTO the first calculation thru we have a large error. The first calculation will not have any BIAS term yet. The I and D terms need a history before any output is added by these terms. So our first calculated output is P * ERROR . I have not used the setting 3 before but as I see it the when the loop goes to AUTO the SP is unchanged. So what ever number in the SP is now the new SP. The second part of setting 3 is BIAS = OUTPUT - (P * ERROR). The idea of this setting is to subtract the bump because of the (P*ERROR) from the output on the first scan. This would give a negative BIAS. This is where I an not sure how the loop will handle this without a little testing. Freeze Bias setting is either ON or Back Calculation. Try both and see how the loop reacts to a negative BIAS.

            Hope this helps. Let me know how it goes.

            Comment


            • #7
              Originally posted by bsinkovich View Post
              crashkopf I see. Use setting 3. Write a zero to the OUTPUT and also a zero to the BIAS. then go to AUTO. The problem is any BIAS left over from the last run is still in the PID equation. We need to get that to zero or when we go to AUTO the motor will ramp to this BIAS speed instantly. Second, another jump in startup speed is the P calculation. The P term is the P value * the ERROR. So when the Loop is placed into AUTO the first calculation thru we have a large error. The first calculation will not have any BIAS term yet. The I and D terms need a history before any output is added by these terms. So our first calculated output is P * ERROR . I have not used the setting 3 before but as I see it the when the loop goes to AUTO the SP is unchanged. So what ever number in the SP is now the new SP. The second part of setting 3 is BIAS = OUTPUT - (P * ERROR). The idea of this setting is to subtract the bump because of the (P*ERROR) from the output on the first scan. This would give a negative BIAS. This is where I an not sure how the loop will handle this without a little testing. Freeze Bias setting is either ON or Back Calculation. Try both and see how the loop reacts to a negative BIAS.

              Hope this helps. Let me know how it goes.
              Thanks for your help. Resetting the output to zero worked. I supposed this is all just user error, but having the PID keep internal state when enable is low and not having any input that can reset it is non-intuitive. It's a shame the docs don't make this clearer, as starting from zero has been the use case I've encountered the most.

              Comment


              • #8
                Great. Glad it worked. PID loop are used for so many controls ,heating, cooling, motors, etc. they have to be generic. In a heating application you would want the heater to turn on 100% at startup. Each application always needs a little tweaking to get it correct. I am just glad AD opens the internal PID numbers to be modified so us users can tweak as needed.

                Comment

                Working...
                X