09-11-2012 08:20 AM
Hi all.
I have a system like the one attached in the message.
I have two working VIs: one that receive the temperature values and one which can read and write the voltage values.
Now: I need to control the system to have a sort of temperature value/values definied in the beginning (costant, sine wave, etc) by changing automatically ( I think PID is good to do it) the voltage.
I don't know how to "mix" the VIs to make it work, expecially I don't know how to relate the temperature and the voltage.
Hardware:
Temperature: NI 4351 DAQ traditional (NO DAQmx)
Voltage: HP Agilent 6033A (GP-IB controlled)
Thank you all
09-12-2012 02:21 AM
If I understood correctly, I need to know and compare the desired final value witht he one I have every moment.
Attached I have the program with I can read the temperature values of the termocouple.
How can i have the single "number"?
Thank you
09-17-2012 04:00 AM
Probably the example attached it's a good start point to understand how to use PID control in LabVIEW.
You have to adapt it to your system requirements, adding a software choice between heating and chilling according to PID output.
09-17-2012 04:10 AM - edited 09-17-2012 04:17 AM
well, thank you but I already know how PID works.
I have some issues to apply PID into my system..
I can do a PID control by simulating a system only in temperature but issues if I want a voltage control that depends of temperature value.
Attached here PID subVIs I use and the program with the other subVI.
Hope you can help me apply PID into it.
Thank you
09-18-2012 08:16 AM
little up
09-18-2012 12:42 PM
@ufo900 wrote:
I have some issues to apply PID into my system..
I can do a PID control by simulating a system only in temperature but issues if I want a voltage control that depends of temperature value.
I'm sorry, I cannot understand what you are asking here (and I'm guessing that others cannot as well, based on the lack of response). I'm well aware that it is difficult to explain a technical idea in a foreign language, but could you try to provide more detail about the problem? Are you saying that you will read a temperature but put out a voltage? That's a very standard situation and does not affect the PID at all; you just need to adjust the gains. You can think of proportional gain as a ratio of output units to input units, in this case Voltage to Temperature: a certain difference in temperature (between the setpoint and measurement) produces a certain output (in Volts).
09-18-2012 01:22 PM
so.. i'll try to explain me better.
I have a peltier cell that is like a refrigerator (the hot part isn't involved in the system, so not a problem).
Upon it there's a metal box with the termocouple; in labview I see the state of the temperature.
upon the box there's the heater, connected to the power supply.
the power supply is controlled by the program in labview (by controlling the voltage).
How do I want to control voltage?
I want that the temperature follows a determined wave (a costant, a sine wave, etc...). If I do not give voltage to the heater, the temperature's box is going down and down. So I want that the labview program, controlled by a PID control, adjusts the voltage (controlling the Power supply) to make the temperature following the determined wave..
So:
I don't know how to relation the voltage with the temperature, with the PID attached in this message.
Hope this time i explained good.
09-18-2012 01:51 PM - edited 09-18-2012 01:51 PM
As nathand said, you really do not need to worry about the voltage - heat - temperature relationship. That is part of your system or "plant" model and so long as it is not too extreme, you just tune the PID to get the response you want.
The biggest issue in temperature control systems is the time delay. If there is a long time between the change in the voltage applied to the heater and the corresponding change in temperature, it can be difficult to find stable tuning.
Is there a reason why you are not using the peltier cell for both heating and cooling? That would only require one power supply and controller rather than two. And it is more efficient.
Lynn
09-18-2012 01:52 PM
The PID that you uploaded is an example that was provided with Traditional NI-DAQ in older versions of LabVIEW.
I think you have all the parts that you need. I assume you can read the temperature and set a value on the power supply, and you have the PID function. However, you need to extract the right part of the PID, without all the demo system simulation around it since you're connecting this to a real system. Then it's as simple as creating a loop (with some sort of loop timer inside it), in which you read a temperature, feed that into the PID, and write the controller output as the new voltage. You should also read about controller tuning (a web search for "Ziegler-Nichols" may be a good start).
09-18-2012 02:01 PM
well ok.
Without many words, what i have to connect input and output from/to the PID vi? And which one do i have to use, simple PID or PID with normalized output?
thank you all