LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RTD + PID Temperature Control of Peltier Device

Hi all LabView geniuses,

 

I am currently trying to improve temperature control in a microscope stage bioreactor (initial heat up / stability). I am using an NI USB-9162 for the RTD sensor, an NI BNC-2110, a DC/DC Solid State Relay, an Agilent DC Power Supply, a Peltier Device, and Aligator connectors, etc. I was given an initial VI that is not very stable and has a large overshoot. I am trying to implement a PID controller into the VI to possibly stabilize the temperature. My temperature doesn't seem to match with the PID control I am using, and thus, the temperature control isn't quite working. I don't have access to the PID control toolkit, so I am using a make-shift PID Controller.

 

Can anyone take a look at the vi's I've posted and maybe help me out?

 

Thanks,
Download All
0 Kudos
Message 1 of 6
(6,482 Views)

What is the SSR for?  TECs work best with a clean DC. If your agilent DC source has digital (RS232, 488, USB, ??) or analog (control Voltage) input to control the output voltage (better: power): use it!!

Instrument LabVIEW driver to control nearly every Agilent device can be found in the NI driver network. 

 

If you are stuck with the SSR (solid state relay): Use PWM instead of a 2 point control 😉 

 

For a first PID setup measure a step response and use it for a first set of parameters.

 

Message Edited by Henrik Volkers on 02-22-2010 02:09 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 6
(6,462 Views)

Dear Henrik Volkers,

 

Thanks so much for your reply.

 

I am using this Agilent DC: http://www.home.agilent.com/agilent/product.jspx?pn=e3630a . I do not think I have the input to control output voltage, just outputs. 

 

I have also attached the type of SSR I am using. My main idea was that the DC just 'completes the circuit' so I can send a boolean to it to either go on or off to heat the Peltier Device.

 

I actually started on using PWM because I was stuck with where I was before you suggested I use it. 🙂 I'm glad I was on the right track with that. I used the PWM provided by NI and incorporated it into my code. I've also uploaded what I've been working with, but I'm not quite sure I implemented it correctly.

 

As far as setting up the PID, how exactly can I get the step response? I'm new to this, so any help would be appreciated.  

 

I don't really care which method I use, just as long as I can successfully maintain the temperature at 37ºC for an extended period of time.

 

If you can help me through this process I'd really appreciate it. 

 

Thanks, 

 

Download All
0 Kudos
Message 3 of 6
(6,453 Views)

Can anyone provide any more insight?

 

Thanks, 

0 Kudos
Message 4 of 6
(6,402 Views)

Hi,

      What results are you seeing from the code that you posted?   Is it not maintaining the temperature you've used as a set point? I'm curious if you've tried implementing something like the PID that's listed in the example here. Is that kind of what yo're looking for?

0 Kudos
Message 5 of 6
(6,394 Views)

I'm not so sure about your PWM implementation because it's hard to read - you have implicit coercion and rounding, hidden wires, and unnecessary wire bends.  You will probably find it worthwhile to write it cleanly into a subVI so that you can test it thoroughly without needing to connect it to your device.  There's no need for a for loop, nor to update the relay output on every cycle - you only need to write to the output when it changes.  I also don't understand why you're using a single-element array when you could just use a single boolean and configure your task for a single channel.

 

Do you have an analog output that can output current (4-20mA) available?  If so, you might find a device like this PCM4 from Omega to be an easier way to handle PWM generation.

 

As far as using the step response to tune the controller, what you want to do is remove the PID from the loop and go from 0% duty cycle (off) to some reasonable percentage (say 20%, if that won't cause overheating).  This is a step input - a step up in power - and you want to look at the temperature response.  Graph the temperature versus time, until the temperature reaches steady state.  You can then use this data to obtain good tuning parameters.  There are many resources available on the NI site, and the internet in general, about open-loop PID tuning.  Two common methods are Ziegler-Nichols and Cohen-Coon.

Message 6 of 6
(6,347 Views)