LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Derivative limit in PID controller

Hi all,

 

I just learned that if the PID controller does not limit the Derivative then I should not use it (at least as PID, could work as a PI). My question, is limiting the derivative is built in the PID control that LabView provide or it should be done externally (if this is the case How?)

 

regards 

0 Kudos
Message 1 of 10
(5,376 Views)

PI controllers are more common that PID controllers just because of the effect that real-world noise has on the D term.

 

I have used two methods to be able to use true PID control.

 

1) Over-Sample your data. Sample 100X faster than you need to then average the 100 samples into a single reading.

 

2) I have re-written the PID to use a lest square fit to determine the slope and used that as the deriviative.

 

So try over-sampling to start.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 10
(5,362 Views)

Hi,

Thanks for replying. Let me explain what I am doing at the moment. I have a temperature feedback system. I am reading the temperature at 1000 Samples/second. 250 scans are read every 0.25 seconds (cycle time). The VI outputs 4 data points/second. Each data point is an average of 250 readings. The output is fed to a PID VI that in turn controls a power supply responsible for heating. The power supply is the limiting factor since it communicates with labview via RS 232 (hence the 0.25 second cycle time).

 

So, I doubt that sample rate is not high enough, what do you think ?

 

regards

0 Kudos
Message 3 of 10
(5,356 Views)

Does the temperature still look noisy? 

 

Temperature PIDS are notriously slow systems and there is a theory somewhere that says something like "You don't get any benefit from updating a slow PID too fast".

 

So...

 

Have you tried just doing 1 second updates with 1000 sample averaged for each reading?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 10
(5,354 Views)

hi,

 

I do not think it is slow at least at the accuracy level we targeting. The object that we are temperature-controlling is small in size and we would like to stabilize its temperature to less than 1 mKalvin. Currently the Standard deviation is 1.5-2 mKalvin. if we reduce updating rate the object cools fast in the mKalvin range. Nonetheless, I will try what you suggested and see what outcome I get.

 

regards 

0 Kudos
Message 5 of 10
(5,351 Views)

mssm22 wrote:

... we would like to stabilize its temperature to less than 1 mKalvin. Currently the Standard deviation is 1.5-2 mKalvin. ...regards 


Wow!

 

And I thought 1 degree F was good.

 

Your PID is already running tighter than anything I have ever touched, so maybe I should just tip my hat to you and fade into the shadows.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 10
(5,347 Views)

Thanks for the compliment (it is what they call, beginners luck). Yet, I still need to overcome the 1mK. The thing is, I learned that processes like Temperature need the D part for best performance but on the other hand if the controller is not limiting the D part I should not use it, Leading to the main question again: "Is labview PID limits the D part ?"

 

Anyhow, Thanks for your help

Have a nice day

 

0 Kudos
Message 7 of 10
(5,342 Views)

I don't give up easy.

 

It looks like an "in-Range and coerce" at the location indicated below would let you limit the D term's influence.

 

 

 

IF you decide to take this route FIRST do a "save as..." and save the PID as a new name and do NOT update the callers. Then modify your code to use your renamed version. THEN make the code changes. This extra "save as..." will make sure you do not corrupt the NI version.

 

Ben

Message Edited by Ben on 02-10-2009 10:30 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 10
(5,334 Views)

Hi,

 

Save as is not enabled for this VI!

0 Kudos
Message 9 of 10
(5,302 Views)

Yes the new version is part of a library....

 

If you still want to try...

 

open that diagram

 

ctrl a (selects everything)

 

ctrl c (to copy everything)

 

ctrl n (to create new VI)

 

ctrl e (to switch to the diagram)

 

ctrl v (to paste all of the copied code into the BD)

 

Save the VI as anew name and wire up your icon connector and edit your icon.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 10
(5,299 Views)