From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-01-2015 01:19 AM
I am using the PID Advanced VI to effect a pressure controller, and had attempted to vary the proportional gain input to the VI by means of an equation based on other parameters, such that the behaviour was similar to gain scheduling, only contiguous versus stepwise. Unfortunately, it appears that the PID VI cannot handle PID gains which are continuously variable from iteration to iteration. The output is zero, and digging into the block diagram of the PID VI, it is barely readable, but appears to do something different upon detection of a change in PID gains. So, my question is, is there any simple way to do what I'm trying to do with the NI-supplied VIs, or am I limited to fixed PID gains? Could I get around the problem by allowing the algorithmically calculated proportional gain to persist for some number of iterations before allowing an update?
Solved! Go to Solution.
04-01-2015 02:05 AM
Hi STS,
Unfortunately, it appears that the PID VI cannot handle PID gains which are continuously variable from iteration to iteration.
That function "resets" internal buffers on change of PID parameters…
digging into the block diagram of the PID VI, it is barely readable, but appears to do something different upon detection of a change in PID gains.
Yes to both statements: it is "barely readable" and it does reset internal buffers on PID change…
So, my question is, is there any simple way to do what I'm trying to do with the NI-supplied VIs, or am I limited to fixed PID gains?
The simple way is as usual: when you have a VI that does not all that you want it to do you can create your own copy of that VI and change the things that annoy you…
I did it for the advanced PID for exactly the same reason…
04-01-2015 02:09 AM
04-01-2015 03:54 AM
Hi STS,
the PID has internal buffers, especially for the integral behaviour.
When the PID parameters change those internal buffers can act wired (depending on the parameter change) so it is (more) safe to reset the PID and start with fresh/cleared buffers!
04-01-2015 04:00 AM
04-01-2015 04:03 AM
06-02-2015 05:26 PM - edited 06-02-2015 05:26 PM
Hey,
I am having the same problem, but I still don't know how to fix it.
My problem is that I want to change the gain parameters of a PID controller based on the output of a fuzzy controller.
So the output of the fuzzy has the three gains, and when I connect it to the PID gains, the output will be constant.
Can you show me a screenshot on how to fix it.
Thank you,
I have my code attached
06-03-2015 03:37 PM
Just for more clarification I think that the way that Gerd is describing is to go into the PID VI and change what happens when the PID gains are changed from one run to the next. One way to do this is force the case structure inside the VI to always be true so it never gets to the false case which states "PID gains have changed since last iteration".
10-25-2017 02:11 PM
Hi, I am agree with you, as you mention is a easy solution, but however When you modify the PID gains you gonna affect the actual error value (in the case of Integral) because you are multiplying your actual error times the new gain value. This is not desireable because the accumulated error has to be independent of your new gain.
Has anyone implemented a PID vi. that enables Gains changes in an easy way?
Thanks
10-26-2017 03:39 AM - edited 10-26-2017 03:40 AM