Author Topic: PID tuning with a delay  (Read 6306 times)

Offline A.Fitz

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
PID tuning with a delay
« on: August 28, 2023, 08:00:07 PM »
We have been asked to implement a PI / PID loop on a cylinder controlled gate, but the feedback is delayed by about 30 seconds.
I assume this will cause some issues with tuning and operation of the system.
Has anyone done a system like this with a Danfoss controller?

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: PID tuning with a delay
« Reply #1 on: August 29, 2023, 01:27:02 AM »
I've done plenty of PI / PID loops with Danfoss controllers but not something with such a long delay in the feedback.  Does the gate just move very, very slowly, or does it actually take 30 seconds before your controller is sent the position of the gate?  Does it get new feedback every 30 seconds only, or is it continuous feedback but 30 seconds delayed?

The PID loop has a sample time input, and the highest value is 32,767 ms.  So, haha, perhaps you just put 30,000 in there?  I wouldn't expect that to work very reliably, but it might be worth a try for fun.

If this truly is a case where the cylinder moves, and your controller won't know it moves for 30 seconds then you'll need to consider other system dynamics.  Fortunately, since it sounds like position control you're probably only dealing with P-gain which is not time based.  If the signal to the valve doesn't change for 30 seconds is that long enough that you could overshoot your setpoint significantly?  Worst case scenario is perhaps you are right outside the tolerance for your setpoint, and your loop thinks the gate is where it was 30 seconds ago.  In that scenario how far will the gate move in 30 seconds?  Can you limit the speed to where in 30 seconds you will not have overshot your setpoint?  If not then perhaps you'll need to oscillate your valve signal on and off with the on duration set to result in a cylinder movement roughly equivalent to your position tolerance.

That's probably how I'd start out.


Controls Engineer
Hydra-Power Systems

Offline A.Fitz

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
Re: PID tuning with a delay
« Reply #2 on: August 29, 2023, 02:18:49 PM »
Hey thanks for the input! That gives me a few things to experiment with.

We are controlling a gate which allows material onto a conveyor belt, and measuring the resultant fill level of a bin.