08-10-2012 01:24 PM
Hello everyone,
I've been meaning to create a PID heater controller through LabVIEW. I am using an NI9265 digital output and I have written the VI and it seems to work well. However, I am having some difficulty with the tuning. I am new to PID tuning and so when I did some research, I came across the popular Ziegler-Nichols method. After setting Ti and Td to 0, I messed around with Kp in order to obtain my ultimate gain (~1.5). Using the method, I found Kp and Ti and plugged them in to see how a PI controller's temperature profile compares to the P controller. Upon testing, the temperature fluctuated all over the place. When I used a P-controller using a Kp value of 0.75, it worked great but the PI seemed to fail. Does anyone have any suggestions on how to make this method work? I feel like with my current system, the ultimate gain is hard to find because changes in Kp when Ti and Td are 0, do not seem to affect the output curve much. The oscillations seem pretty stable over a wide range of Kp values. When I first tried a Kp of 1, it didn't differ too much from 1.5 other than that it seems a little less consistent. Could it be that I am choosing an unsuitable value as my ultimate gain? Any help will be appreciated :).
Thanks,
Justin
08-13-2012 06:09 PM
Hi Justin,
Are you experiencing any issues with the NI products that you are using? Are you using the PID and Fuzzy Logic Toolkit? If you are having an issue with the hardware or navigating through certain functions in LabVIEW (and its toolkits) then I can provide guidance in resolving these types of issues. Unfortunately, I would not be able to provide much assistance as far as recommending appropriate values for gain in a PID controller.
Please let me know if I can help with troubleshooting any issues in the LabVIEW environment or with your NI hardware.
Regards,
08-15-2012 08:25 AM
Hello,
Usually I use this simple and nice guide:
http://www.chem.mtu.edu/~tbco/cm416/zn.html
Did you try to start from a very small P value? Like much below 1? Start the closed-loop tuning with a small P parameter (@ I=D=0), when there is no oscillation only some drift up or dawn in the PV. When your system starts to go to oscillate, be carefull, increase your P parameter very slowly/gradually (small steps!). First you should see an oscillation with decreasing amplitude in time. Increase P a tiny bit more, until you get an oscillation with constant (ensure this waiting longer time) amplitude.
When you are at this point, record this signal, your recent P value is your ultimate gain (Pu), and the period time of your oscillation is the ultimate period time (Tu).
After this use any PID chart to calculate P,I,D.
Good luck!
08-15-2012 08:57 AM
I started the P parameter at 1 and went up in rather large increments... I shall start at a much lower value and go up very slowly and see what happens! Thank you for the suggestion! 🙂
Justin
08-22-2012 12:31 PM
It seems like the oscillations are steady no matter how low the P constant is. I set it to 0.1 and the temperature first overshoots then comes down and from there oscillates pretty consistently... does this mean that my ultimate gain is found when the Kc constant is much below 0.1?
08-22-2012 12:43 PM - edited 08-22-2012 12:45 PM
Can you explain your temperature controller hardware in details? What do you use for heating? What are the hardware elements? The problem can be with the implementation. (you only mentioned a digital output, but how do you drive your heating element (resistor wire?) ) You turn on and off a relay in a circuit? Also some info about temp. sensor? Location? Heat capacity of components, and location of sensor, heating point , etc....?
08-22-2012 01:34 PM
The digital output is used in a relay circuit in order to turn on and shut off the heating element which is a 520W heat 'tape'. The heat tape is wrapped around a 2 foot stainless steel pipe which is then wrapped in insulation. Both openings of the pipe also have some insulation stuffed in them and the temperature is read through a thermocouple that is inserted through one of the stuffed openings. The length of the thermocouple is abouy 6" and therefore goes into the pipe about 6".
08-22-2012 01:59 PM - edited 08-22-2012 02:00 PM
I have only experience with Peltier-elements, where the implementation is very simple.
But have you looked at some similar threads?:
Maybe the duty cycle is not implemented properly? (it looks like your system starts to swing, maybe the frequency too low?) Anyhow, I am not familiar with digital output driven controls, but maybe you find an answer in those posts above...Like this?: http://forums.ni.com/t5/LabVIEW/PID-Control-to-turn-Heater-On-Off/m-p/898764
08-22-2012 03:30 PM
Is that a half inch pipe or 6 inches? How fast is the flow through the pipe? What material is flowing? How much does the input temperature vary? How big a temperature change are you trying to accomplish? What is the form of the thermocouple (bare wire, sheathed, in thermowell)? What is your update rate for the relay?
All of these can have significant effects on the control system. Without information like this predicting values for the controller is rather meaningless.
Lynn