02-10-2009 05:01 AM
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
02-10-2009 08:01 AM
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
02-10-2009 09:27 AM
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
02-10-2009 09:33 AM
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
02-10-2009 09:44 AM
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
02-10-2009 09:50 AM
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
02-10-2009 10:06 AM
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
02-10-2009 10:28 AM - edited 02-10-2009 10:30 AM
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
02-11-2009 08:42 AM
Hi,
Save as is not enabled for this VI!
02-11-2009 08:56 AM
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