You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 11th, 2017, 12:43 PM   #1
BenL
Member
United States

BenL is offline
 
Join Date: Feb 2015
Location: Florida
Posts: 26
PID Tuning Help

Good afternoon all!

I was wondering if anyone could explain more clearly to me the tuning parameters of a PID instruction on a 1769 AB Compactlogix.

I currently trying to output a Hertz speed reference based of the tracking of a Dissolved Oxygen meter (PV 0-10 ppm) and an operator input setpoint (SP 0-10 ppm)

The PID is currently tracking but overshooting both ways by .3-.10 on average. I've been playing with the Pk Pi and Integral Time but can't seem to make any sense or get it to tune one way or another. I also tried deadband but saw how that wouldn't work either. Tried manipulating the loop execution time too and could notice results, just not the desired ones. I have been and will continue to search the web for clarification on the tuning parameters but thought I would run it by the experts here as well. Any input when you have time would be greatly appreciated.

I've attached screenshots of my PID parameters screens and logic rung.

Thanks a lot!

Ben
Attached Files
File Type: zip PID.zip (280.9 KB, 22 views)
  Reply With Quote
Old January 11th, 2017, 12:55 PM   #2
bjh
Member
United States

bjh is online now
 
Join Date: Jul 2010
Location: Madison, WI
Posts: 203
Is this for a blower application? What is your lag time between a change in your CV before a change in the PV happens? I don't use PID control for blower D.O for this reason alone, because the dead time can be huge.
  Reply With Quote
Old January 11th, 2017, 01:07 PM   #3
BenL
Member
United States

BenL is offline
 
Join Date: Feb 2015
Location: Florida
Posts: 26
bjh,

Thanks for the follow-up. Yes it is for a blower application. The lag time is approximatley on average 6 seconds for a change in VFD output to impact the D.O. The meter is quite some distance from the blower itself.

Unfortunately, I don't have many other easy options. I currently have a manual speed reference input for the operators that keeps fairly steady track, but the idea is for it to be automated. The other input on the VFD is for the hand pot speed ref. Any tuning elements I could focus on to at least tighten it up as much as possible? It doesn't need to be an exact tracking.

Thanks again!
  Reply With Quote
Old January 11th, 2017, 01:23 PM   #4
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,604
Are you triggering the PID instruction at a set interval? If you aren't, you should be. If you are the "Loop Update Time" field should be set to that interval. This will have an effect on the rate of the integral sum.

Is your control variable output ( N7[0] ) really an integer or is it a float? If it is an integer, do you have additional output scaling or is the integer a direct reflection of your output? The reason I ask is that an integer taking an output between 37 and 60 will not provide much resolution.

Without actually evaluating this in detail, your proportional gain seems kind of low to me. A proportional gain of 1 will produce 1 output unit for each error unit. Since your total error probably can't be much more than 1 you will not get much proportional action. Also, your integral gain seems kind of high for an independent equation PID. The longer your drive accel/decel rate and the longer the response of your sensor to a speed command change the lower the integral gain needs to be in a relative sense.

It looks to me like you have a PID bias entered of 100%. The bias value is added to the control output to become part of the total output. Said another way, your output will start at 100% and start adjusting from there.

Finally, if this is a centrifugal blower your system gain is not constant. A 5 Hz change in speed at low speed will have less effect than a 5 Hz change at high speed. Your options are to modify the PID gain as the drive speed command changes or tune the loop at high speed and live with non-optimal response at low speed (it will be a little sluggish).

Keith
  Reply With Quote
Old January 11th, 2017, 01:38 PM   #5
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 3,745
Do not modify the Loop Execution time.....

How are you triggering the PID instruction ?

Are you using a self-resetting timer (usually adequate, but will be slightly affected by scan time variations), or have you got the PID instruction in a Periodic Task (recommended, the execution period will not be affected by the scan time of the other application logic).

Whatever the time-base of the timer is, or the periodic task rate if you are using that, should be written into the loop update parameter (.UPD) of the PID instruction. This tells the PID how much time elapses between executions, which is one thing it definitely needs to know to perform its calculations correctly.

Unless you have the PID triggered at a constant rate, you will find tuning it harder.

For tuning, most people start with I and D terms zero, and then increase the P term until oscillation just starts, then back it off a little. The PV will not be aligned with the SP at this point.

Now start adding Integral to bring the PV to the SP, too much integral will cause overshoot. Make step changes to the SP if possible to aid the tuning of the I term.

Now if you need to speed the loop response, you can raise the I term, but add some D to stop the tendency to overshoot.

Everyone has their own trusted way of tuning, and I'm sure you'll get multiple replies on how to tune a PID, some will suggest you actually time the oscillations that you induce by having too much P. That time is used to calculate some "starting-point" P, I and D terms. Look at the Ziegler-Nichols method
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old January 11th, 2017, 02:50 PM   #6
BenL
Member
United States

BenL is offline
 
Join Date: Feb 2015
Location: Florida
Posts: 26
Thanks all for the great feedback! I am no expert on this stuff by any means. daba, I think I will try your steps from a base point to try again.

Correct me on bad form here. The PID is executing solely off Rung scans. I tried a timer.dn the same as the loop execution time and got inverse effects.

I am using the PID output% into an analog scale converting the float % to a 4-20 mA scaling for input to the VFD speed ref.

VFD min run speed is 37, hence the 37 min 60 max for the PID CV high and low. I also may try slowing down the accel/decel of the VFD's, so there will be some latency of the speed ref to the actual speed response.

Thanks again for all the good info. Seems like this is quite a task in this application. I've done one before for a pressure application and it seemed fairly cut and dry. It's actually the PID parameters exactly copied from that one.

I'll still welcome any thoughts on my plans or maybe being incorrect on the lack of timer triggering the PID.

Thanks all again!

Ben
  Reply With Quote
Old January 11th, 2017, 05:41 PM   #7
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 3,745
Quote:
Originally Posted by BenL View Post
Thanks all for the great feedback! I am no expert on this stuff by any means. daba, I think I will try your steps from a base point to try again.

Correct me on bad form here. The PID is executing solely off Rung scans. I tried a timer.dn the same as the loop execution time and got inverse effects.

I am using the PID output% into an analog scale converting the float % to a 4-20 mA scaling for input to the VFD speed ref.

VFD min run speed is 37, hence the 37 min 60 max for the PID CV high and low. I also may try slowing down the accel/decel of the VFD's, so there will be some latency of the speed ref to the actual speed response.

Thanks again for all the good info. Seems like this is quite a task in this application. I've done one before for a pressure application and it seemed fairly cut and dry. It's actually the PID parameters exactly copied from that one.

I'll still welcome any thoughts on my plans or maybe being incorrect on the lack of timer triggering the PID.

Thanks all again!

Ben
Absolutely the wrong thing to do.

Take a look at the RPI and RTS rate of the analog input serving the PV. There's no point executing the PID faster than either of those, it'll just be calculating that nothing has changed since it made its last adjustment to the OP, and will "overcompensate".

I can't think of any time I've needed a PID update rate (interval) of faster than 100mS, I think most of the ones I've worked on over many years were of the order of 500mS.

May I recommend that you create a Periodic Task of 500mS period, and put your PID instructions in the main routine in that task on unconditional rungs... You only need the PID instructions themselves, none of the other control logic, that can stay in the continuous task. Then write a rung of code to put 0.5 (seconds) into the .UPD of the PID tag. That tells the PID it is being updated every 500mS.... EDIT : If you feel brave, you can read the periodic task rate with a GSV instruction (Task, THIS, Rate), do a bit of math with it DINT mS to REAL Seconds), and put that into the PID.UPD parameter, then you can adjust the periodic task rate, and the PID will be set accordingly.

It's all in the instruction Help....
Attached Images
File Type: jpg 2017-01-11_223917.jpg (50.9 KB, 59 views)
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem



Last edited by daba; January 11th, 2017 at 05:48 PM.
  Reply With Quote
Old January 13th, 2017, 08:18 AM   #8
BenL
Member
United States

BenL is offline
 
Join Date: Feb 2015
Location: Florida
Posts: 26
Quote:
Originally Posted by bjh View Post
Is this for a blower application? What is your lag time between a change in your CV before a change in the PV happens? I don't use PID control for blower D.O for this reason alone, because the dead time can be huge.
bjh:

What had you found to work well with tracking D.O. with any sort of accuracy? Over two days and it is very hard to get this tightened up. Any input is appreciated.

Thanks,
Ben
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
RSLOGIX 5000 PID Tuning Parameters and Thermal PID Loop Tuning msohaibbutt LIVE PLC Questions And Answers 1 July 31st, 2016 09:03 AM
PID Tuning Problems scthor LIVE PLC Questions And Answers 18 June 1st, 2014 11:00 PM
PID tuning feedback..graph included;) Paully's5.0 LIVE PLC Questions And Answers 8 January 25th, 2008 08:12 PM
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 01:18 AM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM


All times are GMT -5. The time now is 11:45 AM.


.