11-16-2009 06:27 PM
Hi,
I'm very new to LabView and am still experimenting but I need to figure out this problem soon. i tried so many things but there are some basics i just don't understand.
I want to control the temperature in a tank and I have a cold and hot water tap. I want to keep the temperature at 65C. the problem is that I don't know how to tell the program to control it for me. I use case structures to define the cases but i don't know how to tell the program to adjust when the case is false.
I also tried using PID (which i know is the simpler way to go) but I just couldn't find a tutorial that would really show me how to set it up step by step. It doesn't even need to be PID, PI or even P should be fine. I just don't know how to go about it.
Any help would really be appreciated.
Also, the cold/hot water ratio is about 0.7. At this flow rate i get the desired temperature.
Thanks
11-16-2009 09:26 PM
Hi
Here is a tutorial for building a PID controller with labVIEW and USB.
(Unfortunaltely, i have not seen this and i dont know is it relevant to what you are asking)
Post back if this doesnt help
11-17-2009 12:20 PM
Hello!
Typically, our customers use PID VI (installed with PID toolkit) to do closed-loop control. If you do not have PID toolkit and only need P control, you may use a constant gain to adjust to the error between your setpoint and process variable (shown below). However, using PID VI has advantages as you can set output limits to avoid actuators beng saturated and provide antiwindup capability.
Hope this helps!
11-17-2009 02:30 PM
A suggestion.
Measure the temperature.
if it is too hot...turn off the hot tap and turn on the cold tap
if it is too cold .... turn off the cold tap and turn on the hot tap.
Set some sort of dead zone...65+1 = upper limit, 65-1 = lower limit
then you can compare temperature to your upper limit and lower limit and select the case you want...(don't forget the do nothing case)
This is pretty much bang bang control .... do you have precise control over the hot and cold valves or just on off?
You might also consider placing a little time delay in the take temperature task so the system doesn't "hunt".
Good luck
Hummer1
11-17-2009 04:12 PM
Thanks for your replies. Things are clearer now. 🙂
I can control the flow from the valves. and also I have to do it using control theory, so the on/off approach wont work. But its a good idea.
11-17-2009 04:20 PM
Well, actualy, you could do some testing by turning on the cold (or hot) for a period of time and see how the temperature changed (a psuedo C). You could use the on and off time of the cold and hot valves as a pulse width control for varying the amount of water at a particular temperature entering the system...but....since you have control of the valves you will want to do something optimum...
By the way, water must be exiting the system at some rate (perhaps variable)...so the sum of the hot and cold rates entering the system must total to the amount of water leaving the system...you probably have a level control issue to deal with as well.
Good luck on the controls stuff.
Hummer1
11-17-2009 05:00 PM
11-17-2009 06:38 PM
I've got it going pretty well 🙂
thanks a lot!