LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID.vi question

I searched and skimmed through the other threads, but I didn't quite see the answer to my question.  Probably because I'm still on a lower level of understanding of this stuff.

Anyway, I'm trying to setup a PID controller for our project here, using the PID.vi.  First let me outline what I'm attempting to do so you can probably help answer the question better.

We're trying to ramp up the heat in a rapid thermal annealing process on a machine we're controlling with LabVIEW/cFP.  We'd like to ramp it up 100 C / second.  The input to the control would be the temperature level (of course), and the output a voltage level, 0-5V to set a lamp power setpoint.  We'd like this to run at 20Hz.

What I'm not sure about is the format of the inputs for output range and PID gains.  What data types are these, and how do I determine the values?

Everything else is connected as follows:

temp from pyrometer -> process variable
process temp -> setpoint
1 -> dt
false -> reinitialize?
ouptut -> lamp power supply

I have it in a while loop that runs on every multiple of 50 msec.  I hope I've explained things clearly enough, but let me know if I haven't.

Thanks for your help!
0 Kudos
Message 1 of 12
(5,402 Views)
The data tyoe on the output range is a cluster indicating the possible range that the output might take. For example, if you had a PWM module on the field point your output range would be the duty cycle for the PWM which would accept a range from 0-100 %. This means that you would wire a cluster of two elements being 0 and 100. Take a look at the examples in the example finder.... This might help.
 
Post your vi... WHat is the output module you are using for this application??? Digital Out, Analog Out, PWM, ???
 
 
0 Kudos
Message 2 of 12
(5,382 Views)
I don't have the VI here at home.  I'm using an analog output on an AIO module to send the 0-5 V setpoint.  I get the output range thing, now.  I'm not as clear on how to set the PID gains (which is a shortcoming of my understanding of PID control in general, because I've never studied it before).
0 Kudos
Message 3 of 12
(5,371 Views)

Looking at the shipping example is an excellent starting point to learn how the PID VIs are used.  You may want to also refer to the following links for more info on PID theory and LV information:

- PID Theory Explained

- FieldPoint PID Interactive Tutorial

- Complete resources for a PID control system with NI M Series devices (this one is for DAQ PID control, but still helpful information)

 

-Mark

Message 4 of 12
(5,348 Views)
Alright, this is another question about the function of the VIs.  I just cobbled together a quick program to test out the Setpoint Profile VI.  I've gotten good results from using the PID.VI on its own, but I have to try and increase the setpoints 100 degrees C every second, instead of just putting in the final setpoint and letting the PID controller ramp to it.  So this program is more about getting that to function.

Anyway, the way I have it now causes all kinds of weird stuff to be spit out.  So I saved the actual setpoints being output from the Setpoint Profile VI as it runs.  I've attached those results, and the main VI itself.  Why is this not functioning properly?

If it's not obvious what I'm doing, just ask.  I'm also gonna attach the pyrometer current output (to show that not much steady heating is being done), and the power output (which is basically flickering all the way on, or all the way off -- output range is 0 to 3V, which is 0 to 60% of what the LPS can supply).

Please temper any criticism with the knowledge that I'm basically self taught, have never taken a controls course, and am probably an idiot. Smiley Very Happy
Download All
0 Kudos
Message 5 of 12
(5,293 Views)
Here's the VI
0 Kudos
Message 6 of 12
(5,291 Views)
100 C/ sec is VERY rapid heating (after all, it is a rapid thermal annealer) so what you are doing is a rather difficult control problem. To get this heating rate you probably need to have your heater near maximum power for most of the heating time. This means that your control vi is operating way out of the linear mode- the evidence for that is the power control signal slamming from full on to completely off.

It MAY be possible to find tuning parameters that will make this work, You are more likely to find them if you approach this by steadily increasing your ramp rate- starting out with something very modest like 1 degree/ second or less. You will develop some insight into how your particular control system reacts and you may find a good set of parameters.

There is actually a considerable literature on control of rapid thermal annealers. The problem is hard in part because of the rapid changes, in part because of the strong nonlinearity, and also because the temperature measurements are not necessarily very accurate. One approach has been to just program the shape of the heater power curve to get the desired temperature profile. This is not closed loop control however.
0 Kudos
Message 7 of 12
(5,279 Views)
Well actually, my specific problem here is in getting the setpoint profile stuff to work.  Earlier, I was able to simply enter in a setpoint, and ramp up to temperatures that were supposed to be around 800 C at 333 (yes, 333) C / sec.  The proportional gain was very high, and I had the lamp going full blast for a second or two.  Which caused one of the guys here to (justifiably) freak out.  So I won't be doing that again.  Which is too bad, I seriously generated curves that ramped that quickly to the setpoint, with no overshoot, and minimal steady state error.  If only I could just go with that.

Anyway, the power curve when I did that looked much more like you would anticipate.  Nice and smooth.  Unlike what's happening here.  I think it's just some problem with using the setpoint profile.  I won't be able to try it again until Monday, but if I remove the setpoint profile stuff, and just put in a normal setpoint there, it will behave normally.  I think with those parameters I got a fair amount of oscillation, but the point is, the power just didn't stutter and flicker from full to nothing and back.

BTW, if you know of a place to find good RTA recipes, let me know.  The process guy that ran this tool before has since left, and they had been using the old Peak computer system, running old, saved recipes (which are stuck on some disk in a proprietary format).  I'm just handling the LabVIEW control stuff.  I don't know a whole lot about the science.

Message Edited by PiMaster on 05-11-2006 04:14 PM

0 Kudos
Message 8 of 12
(5,271 Views)

PiMaster,

Another thing I'd do if I were you... I get my PID loop rate up much higher than 20hz if possible. That's only 20 data points for your whole event -- you can never have too much data, especially when feeding a PID. The D term will act a whole lot better with a more accurate idea of what is going on.

Randy

0 Kudos
Message 9 of 12
(5,262 Views)
-I had the lamp going full blast for a second or two.  Which caused one of the guys here to (justifiably) freak out.

Well it pays to be cautious but some people are just too panicky to stand next to a process tool.

Maybe you should try just a hard limit on the max power to get your desired ramp rate. If you got 333 C/sec with full power you might then be running at something that won't upset people too much. After all, the wafer heat capacity and the optical power pretty much sets your maximum ramp rate.
0 Kudos
Message 10 of 12
(5,261 Views)