07-01-2010 01:21 PM
Hello,
I'm trying to use a PID controller to regulate the emission current of a filament in an ion gauge, but I'm running into several problems.
The first, and least important, is that the PID controller VI takes at least 5 minutes to get the current to where it needs to be. Is there any way of speeding this up?
The second, and most important, is that the PID controller tends to zero the process variable before it begins the process of getting the process variable near to the set point. This can be seen in the attached VI: I write 5.8 volts to the filament voltage--something I did initially to try to get the PID controller to get the process variable near to the set point faster--but when the PID controller starts doing its thing, it kills the voltage before anything rather than ramping up from 5.8 V.
The attached VI is a simple one that exhibits these problems. The actual ion gauge controller VI that I've written has the same issues, but in an even more frustrating form. I have a while loop set up to get the filament voltage to where it needs to be (using a PID controller) before anything else, and then a data acquisition loop that also includes a feedback loop in the form of a PID controller to maintain the filament voltage. When the second PID controller starts running, it zeroes the voltage that the previous one had set, taking yet another 5+ minutes to reach the point where we can take data, and giving us 5 minutes of bad data in the process!
Does anyone know why the PID controllers are behaving like this, and what I can do to fix/work with this behavior?
Solved! Go to Solution.
07-01-2010 05:14 PM
I did not look at the vi, but in general when PID loops are slow to reach setpoint, you need a greater value for the P element.
-AK2DM
07-02-2010 11:34 AM
I see; thanks. This is my first encounter with PID controllers, so I'm not incredibly familiar with their nuances.
I have found, unfortunately, that raising my P element results in oscillations that are hard to stabilize otherwise. Do you have any ideas as to why the PID controller zeroes the preset filament voltage when I start the VI? If I could start the filament at 5.8 volts like I want to, it would speed things up, because the PID controller would only need to increase the voltage about .2 volts or so.
07-02-2010 03:05 PM - edited 07-02-2010 03:06 PM
Hi Ali,
Can you please clarify? I ran your code and didn't see the output start at zero. The PID output starts at around 7.
07-13-2010 11:23 AM
Hello Tejinder,
Sorry for the late reply. I ended up turning the PID controller into a PI controller, which gave me much better speeds, so fixing the issue isn't as big of a problem as it used to be.
As far as the test VI goes, the output starts at .7 for me. In the first frame of the flat sequence structure, I write a voltage of 5.8 V to the emission filament, because that's close to the voltage required to get an emission current of .5 mA. When the PI controller outputs a voltage of .7, my emission current drops to zero/just above zero. I was hoping for a way to keep the PI controller from killing the headstart I gave the filament by starting it out at 5.8 V.
Ali H.
Research Assistant
University of Texas at Austin
07-14-2010 04:54 PM
Hello,
It looks as though the PID VI will always output 0 for the first iteration. You can, however, use the PID Advanced VI and set the first iteration to manual mode. After subsequent iterations, you could then set it to automatic mode and it will have a bumpless transition. I believe this will give you the behavior you are looking for.
-Zach
07-15-2010 01:04 PM - edited 07-15-2010 01:10 PM
That worked great, Zach! Thanks a lot.
Ali H.
Research Assistant
University of Texas at Austin