02-21-2010 07:49 PM
02-22-2010 07:09 AM - edited 02-22-2010 07:09 AM
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.
02-22-2010 08:49 AM
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,
02-23-2010 04:36 PM
Can anyone provide any more insight?
Thanks,
02-23-2010 06:47 PM
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?
02-24-2010 09:34 AM
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.