Showing results for 
Search instead for 
Did you mean: 

Autotuning PID temperature not working

I'm trying to use the Autotuing PID for a temperature system and for some reason it's not working properly. I've attached my vi. Thanks!

0 Kudos
Message 1 of 9

What do you mean, "It's not working properly"?  What are the symptoms?

0 Kudos
Message 2 of 9

It causes all the gains to go to zero and does not reach the desired temperature point. Bascially, it doesn't seem like it's autotuning the system.

0 Kudos
Message 3 of 9

I had a look on the VI which you attached. Your process variable (PV) is a constant in this VI. Autotune is set to False. This does not make any sense to me. Where do you measure the real temperature? So this input should be either a simulated or a real measured variable.


Actually in the past I had several problems with the PID toolkit's autotuning features. However usually I got nice results using the standard manual Ziegler-Nichols closed loop tuning method: you set your I and D terms zero, and you play first only with a pure P-control. Gradually increasing it, bring the system into a stable oscillation. Plot this stable oscillation in time, and measure the period time or ultimate time parameter T_u (time in minutes between two points are in the same phase in the osciallation curve). The ultimate gain P_u is the actual P value.

From T_u and P_u calculate the PID parameters:

P = P_u / 1.7

I = T_u / 2

D = T_u / 8


I hope it helps...


edit: actually do you understand the basics of PID control? Do you understand the concept, and the terms: Process Variable, Setpoint, Output? The process variable in this case a measured temperature. The output of the PID VI is a value which you should send to a thermostat for example. It can be a current which drives a heater, or a Peltier-module, etc...


edit2: so please describe your hardware configuration, otherwise it is pretty difficult to help...


0 Kudos
Message 4 of 9

Hi mr123456789,


                  It seems that you are not using the autotune vi  the way it should be used in order to get the correct PID gains.

PID autotuning in Labview is different to the PID autotunning of some embedded systems. You need to configure the operation mode of the PID autotuning VI (initial PID gains should not be 0, autotunning input should be true, the output range for the process control should be set,  the VI should be reinitialize the first time it runs, etc...) and let the system learn the correct values that control the system the way you want. When the system finishes this learning it outputs a TRUE value (tuning completed?) that shows that the PID output gains shown are the gains the user should use to control the plant.


Attached to this post is a VI (very similar to the one you posted) that  you can use to play and get the PID gains of  your temperature control system. (you need to move the process variable knob and make the system reach the desire setpoint to turn on the "tuning completed?" led.

Hope this helps you to understand better this VI, good luck.



Erwin Franz

Certified LabVIEW Architect, Certified TestStand Developer
0 Kudos
Message 5 of 9

I have the process variable as a constant because the input is simulated using heat transfer equations, but I wanted to get the controller to work first.


Could you please send me a VI or image of the closed loop tuning method you are talking about? I've tried the method you mention and am unable to get a stable oscillation no matter what P value I set it at.


I want to output the temperature over time which will reflect how I change the flow rate through a valve over that period of time until I get to my desired temperature.



I have an older version of Labview and am unable to open that file.

0 Kudos
Message 6 of 9

What version of Labview are you using?

Erwin Franz

Certified LabVIEW Architect, Certified TestStand Developer
0 Kudos
Message 7 of 9

Labview 2001 version 11.0

0 Kudos
Message 8 of 9

Attached is the VI with instructions in Labview version 2011.

Hope this helps.

Erwin Franz

Certified LabVIEW Architect, Certified TestStand Developer
0 Kudos
Message 9 of 9