News:

  • August 23, 2026, 12:15:14 AM

Login with username, password and session length

Author Topic: PID closed loop controller Deadband  (Read 7065 times)

Markiematic

  • Newbie
  • *
  • Posts: 3
PID closed loop controller Deadband
« on: February 18, 2020, 07:44:05 PM »
I'm working on a project that has to function correctly before I can install it, so I'm testing with the simulator, so I don't know if this problem will repeat on real hardware.

I have a PID control set up with the error deadband enabled. If I manipulate the PV=SP, and switch the control to auto, the output stays fixed, as expected.
Now, if I move the PV outside the deadband, the output responds accordingly, but, once I bring PV back inside the deadband, the output keeps going in the same direction, until PV reaches the opposite end of the deadband, then the output will change directions and keep going until PV hits the other end, it will oscillate like that as many times as I keep moving PV back and forth.
If I stop manipulating PV, the output will keep moving until it hits max or min.
If I toggle the control to manual and back to auto, while PV is inside the deadband, the output will stay fixed, until I manipulate PV, then the process starts over.
Shouldn't the output stop moving once PV is inside the deadband?
I called AD support with this problem earlier, I was hoping someone here might have a fast answer....
« Last Edit: February 18, 2020, 07:52:48 PM by Markiematic »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: PID closed loop controller Deadband
« Reply #1 on: February 20, 2020, 06:05:47 PM »
Hmmm. I don't remember that working that way but I have duplicated it, and we are looking at it. Stand by...
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: PID closed loop controller Deadband
« Reply #2 on: February 21, 2020, 05:01:18 PM »
Shouldn't the output stop moving once PV is inside the deadband?

The Error Deadband

My discovery is that this is working as intended. The deadband is actually an error deadband, per se, not a deadband around the setpoint. If you think about it, once you go outside the (SP+deadband) or (SP-deadband) then it will oscillate between the upper deadband limit and the lower deadband limit. But over a long period of time, the average PV will be exactly the SP value. This is a solution for some applications. As an example, let's say you had a SP of 72 degF with a deadband of 5 degF. Once the PV got above 77 degF, the output would change to bring it back to less than 77 degF, but would continue to integrate error because it is an error deadband. Thus the output would keep doing that until 67 degF was reached. Then it would change to bring that back up. This oscillation would continue but the average over a long period of time would be 72 degF.

The Setpoint Deadband

However, if it worked like you want it to work, then what would happen is when you go outside the (SP+deadband) or (SP-deadband) range, then the Output would change to bring it back inside the range. But the problem is, as soon as it came back within the deadband range, then the error would be zero, so the PV would end up hanging out at the deadband limits instead of the SP. As an example, let's say you had a SP of 72 degF with a deadband of 5 degF as before. Once the PV got above 77 degF, the output would change to bring it back to less than 77 degF, but as soon as it was below 77 degF the error would drop to zero immediately. So the output would stop driving and it would settle with the PV slightly below 77 degF. There would be no change in the output below 77 degF until it reached 67 degF. As soon as it dropped below that, the output would change to bring it back above 67 degF. But again, as soon as it was above that the error would drop to zero immediately. So the output would stop driving and it would settle with the PV slightly above 67 degF. This may not be what some processes want, but would be the behavior of yours.

A Workaround

Now, in doing PIDs in the past, I've personally never used a deadband on a PID loop. Instead, what I did was put a deadband around the PV, which is usually an analog signal of some kind. By putting a deadband around the analog signal coming into the PV, I think this will get you what you want.

A Firmware Fix

In the meantime, we are going to add the ability to pick between these two forms of error deadband for the PID. "Type 1" will be the way it works now and will oscillate, but average the SP. "Type 2" will be the way you are talking about, and the PV will settle around the deadband limits, if it ever goes outside of them.
« Last Edit: February 21, 2020, 05:04:38 PM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Markiematic

  • Newbie
  • *
  • Posts: 3
Re: PID closed loop controller Deadband
« Reply #3 on: February 22, 2020, 04:40:59 PM »
Thank you very much for your time!
I see your point about how the output would hover at the deadband edges, so yes it makes sense the way it functions.

I'm using the pid output to drive the pump speed for a heating loop in a large multi-tenant building.  Using modbus to control the VFDs, my initial concern was, that with the output constantly moving, that I would have constant modbus writes to update the drive speed.
I have since observed, that the changes in the output are small and slow enough, that the speed signal to the drive (think 0-60) doesn't change inside the deadband.  I had  put a couple of compare instructions on the enable line of the PID to put it in manual mode whenever PV is inside the deadband, stopping the output from moving that way.
I'm still a couple days from putting this in service, so I don't yet know what real world conditions are going to be, I may be worrying about nothing.

I have used the BRX plcs in quite a few different projects over the last 5 years or so, and have become quite fond of them, I hope the projected life cycle is long. At least another 10 years to get me to retirement! ;D

I make a living overhauling old equipment, I never do the same thing twice, thinking inside the box is not an option.
Thanks again for your help!
I'm sure I'll be around again, the next time I'm trying to beat a square peg into a round hole!