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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID output correlation

Hello guys,

 

I am a student who currently doing a small project with LabVIEW specifically with PID block. I could not understand the behavior of the PID output perfectly. I have played with the Example VI of PID controller from the library but still it did not help me that much. I have selected a parallel PID controller. I wanted to "turn off" the Integral part by putting in a very large value (10^15) and "turn off" the derivative part by putting in zero as a value.

 

Then when I increase my proportional gain, the steady state error also increase. But what I have learned in lectures is, when I increase the gain, the steady state error will decrease. Anyone could help me with a brief explanation? Smiley Sad

 

Thank you in advance!!

 

0 Kudos
Message 1 of 9
(2,754 Views)

The right way to turn off the integral gain is to set it to 0.  Otherwise you could still have some integral windup issues, which might explain what you're seeing.

 

Can you show a graph of the setpoint, process variable, and controller output?  What type of system is this (motion, temperature control, etc)?  Can you attach your LabVIEW code?

0 Kudos
Message 2 of 9
(2,742 Views)

Hello Nathand,

 

but the algorithm for the I controller is 1/Ti. So setting up the Ti value to 0 will produce infinity gain from the I controller. It is a temperature control program with large lags and time constant. The system is also considered as second order system as the lags are very big and there is oscillation as a steady state condition.

 

I have attached the result as PDF format. The Integral part is 10^15. I doubt that it is due to wind up effect as I could achieve the set points using I controller without any problem. You could use the "advance PID controller VI" in the library to see this effects Smiley Happy

 

I could not share the program due to secrecy and the software is very complex. But the main point is about this basic understanding of what the PID controller in LabVIEW actually do.

 

I hope you could help Smiley Happy

0 Kudos
Message 3 of 9
(2,729 Views)
0 Kudos
Message 4 of 9
(2,728 Views)

michaeltello

 

As nathand said, to swtich off the effect on the PID.vi function and Advanced PID.vi, you have to use the value "0" or "Inf". A large number will actually not completely switch off the anti-windup and integral gain of the algorithm. This is in the code, those VIs are open, you can always look inside it and see what is coded if you have any other doubt.

 

Now, if you are trying to develop a I controller, the PID will NOT work for you. At the moment, the algorithm does not allow the proportional gain to be 0.

 

The oscillations could be happening because you are running into limit cycle induced by your high gains and the anti-windup algorithm of PID. Notice also that the limit of the PID is a control that you can change from +/- 100. In general, I try to match the output to the range of the analog output signal range.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 5 of 9
(2,718 Views)

Hello Barp,

 

That means, if I want to only consider the P-controller in the PID.vi, I have to set the Ti value to Inf and Td value to 0. Then the anti wind up effect will be eliminated and I can tune the controller normaly (e.g. using closed loop, ultimate gain methode)?

 

 

0 Kudos
Message 6 of 9
(2,713 Views)

michaeltello wrote:

That means, if I want to only consider the P-controller in the PID.vi, I have to set the Ti value to Inf and Td value to 0. Then the anti wind up effect will be eliminated and I can tune the controller normaly (e.g. using closed loop, ultimate gain methode)?


Yes, that's right - but you are not setting the integral gain to be infinite.  Inside the PID algorithm it checks if Ti is 0 and if so it disables the integrator.  You could easily have tested this yourself by putting the PID function inside a while loop with constants wired to the setpoint and process variable, and a short wait.  Create an indicator or graph for the controller output, and watch it run.  With Ti set to 0 you will see that the controller output is constant - it is a proportional-only controller.

 

In the graph of your controller response, it would be helpful to show the controller output as well as the process variable for each condition.

0 Kudos
Message 7 of 9
(2,705 Views)

Hi Nathand,

 

Thanks for the quick reply.

 

But if the algorithm for the I controller inside PID block (Parallel Education) is 1/Ti, it would be appropriate to set it to Inf is it?

I will provide the output of the controller later because the data is at the lab (currently at home) Smiley Happy

0 Kudos
Message 8 of 9
(2,701 Views)

michaeltello wrote: 

But if the algorithm for the I controller inside PID block (Parallel Education) is 1/Ti, it would be appropriate to set it to Inf is it?


I don't understand your question.  Are you asking if you can set Ti to +Infinity in order to get no integral control?  It might work.

 

You can open the PID block and see that it divides Kp by Ti, then checks if the result is between +Inf and -Inf (not inclusive).  If it is not within this range, then the integral is not calculated.  Dividing by 0 results in a value that is not within that range, so no integral control when Ti is 0.

0 Kudos
Message 9 of 9
(2,694 Views)