Author Topic: PID output stays above zero  (Read 13667 times)

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
PID output stays above zero
« on: August 08, 2016, 07:45:38 PM »
I am using a PID function from the recently updated Controls Library and when I run my input (set point) up, with my feedback at zero, the PID output quickly goes to 10000 then when I drop the input back to zero the PID output stays at 9000+ if I reset the controller it goes back to zero and the whole process continues again. I read in one post about exectime changing after first download and causing the PID to lockup but service tool shows os.exectime as 2 the whole time and I can increase the PID setpoint up and cause to PID output to reach 10000.

Suggestions? What is causing this?

Mike

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: PID output stays above zero
« Reply #1 on: August 08, 2016, 10:28:45 PM »
I suspect that it's your I gain that results in the value staying 9,000+.  You need to have some logic making use of the I value reset functionality such that it resets the I value output to zero when you're within tolerance of your set point.

The I gain related to error over time.  It doesn't go down as you get closer to your set point; it just goes up less quickly or stops entirely if you have zero error.
« Last Edit: August 08, 2016, 10:30:20 PM by FluidPowerTom »
Controls Engineer
Hydra-Power Systems

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: PID output stays above zero
« Reply #2 on: August 08, 2016, 11:32:34 PM »
Tom,

I will have to hook the controller into the working machine system to see if it is actually working right. I just go to thinking that I don't have the frequency generator hooked up which might be what is messing with my values.

Mike

EDIT: Once I put my signal generator on the PID worked as it should. I feel really awkward about that one.

« Last Edit: August 09, 2016, 02:09:24 PM by mikeaa12 »

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: PID output stays above zero
« Reply #3 on: August 09, 2016, 02:11:50 PM »
I Put the controller on the machine and realized it should go to 0 even without the input, set rst/hold to 2, output goes to minimum pwm output then 0 after 3 seconds. But now the output doesn't keep ramping up to 100% if no speed (feedback) is detected or speed is less than set point.

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: PID output stays above zero
« Reply #4 on: August 09, 2016, 07:40:56 PM »
If you're holding the I gain to 0 using the rst/hold then there won't be any time-based gain in your output; it will be fully based on the P gain.  Is that what you're experiencing?
Controls Engineer
Hydra-Power Systems

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: PID output stays above zero
« Reply #5 on: August 09, 2016, 08:01:05 PM »
FluidPowerTom,

I ended up putting back the  rst/hold to 0. I belive I was seeing just an output based on P which caused the output to sit just slightly about setpoint which I had issues with in the past that the hydrostat wouldn't ramp up enough. Once I set rst/hold to 0 and had my system fully running and hooked up I watched the speed ramp up to match and slow to match. When I cranked my setpoint to 0 the numbers would go close to 0, bounce around a moment then stop at zero. I still need to fine tune the PID but it might be okay, I was running hydaulic motors with the transmissions in neutral so they were really jumpy without a load. I have been fighting with getting this whole setup to work on 2 machines for almost a year and after more critical thinking I am very close.

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: PID output stays above zero
« Reply #6 on: December 27, 2016, 10:07:26 PM »
I am still having issues with the PID output not going back to Zero when the setpoint it reduced or set to zero. I found two posts

http://www.plus1forum.danfoss.com/index.php?topic=274.msg734#msg734
http://www.plus1forum.danfoss.com/index.php?topic=794.msg2643#msg2643

Both of these suggest increasing the ExecTimeOut. I hanged my ExecTimeOut to 3 then 5 then 10. The PID loop still hold the value near it was before I switched the mode.

Anyone else find a solution to the PID loop not resetting to zero when the set point it set to zero?

When I set my ExecTimeOut back to 1 the ExecTime now shows 3. When I had ExecTimeOut at 5 or 10 it copied the number. What am I missing???

Thanks,
Mike
« Last Edit: December 27, 2016, 10:10:59 PM by mikeaa12 »

Offline jashom1

  • PLUS+1 Expert
  • ****
  • Posts: 80
  • Karma: +6/-0
Re: PID output stays above zero
« Reply #7 on: January 03, 2017, 03:23:26 AM »
Hi Mike,

I have had issues when I turned off the function and the PID would remember the previous state gains when starting again which produced a 'bump' in the hydraulics.  Not sure if this is similar to your issue or not.

I fixed it by when ever the command was zero to set the rst/hld value to 2

Cheers,

John.

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 116
  • Karma: +0/-0
    • Dewind Dewatering
Re: PID output stays above zero
« Reply #8 on: January 09, 2017, 03:00:26 PM »
jashom1,

I don't think that's quite what I have been seeing but I believe the solution is an easy fix. I have 4 PID loops which control 2 drive hydrostats. I think I may convert 4 to 2 here shortly as a bunch of stuff has changed and see if I can make my program simpler.

Thanks,
Mike