Does a PID need to be "online" to be tested? Can the output signal be viewed without it being used? I am taking my first shot at creating and tuning a PID for my software application. The PID I am creating is used to control the temperature of a "thing". The thing is heated by focusing a laser on it and changing the laser's output power in the range of ~0.1W to 1.0W. The temperature is then calculated and is in the range of ~100C to 1000C. 



An example sentence/problem to refer to. I desire the temperature of my thing to be 600C, to start I set the laser's power to 0.5W, then measure a temperature of 500C, the PID is iterated and calculates a output signal of 0.6W (Assuming the PID parameters are tuned correctly).

// Is this the correct terminology?
???            = Laser power of 0.5W
Setpoint       = Desired temperature of 600C
Measured value = Measured temperature of 500C
Output         = Output signal of 0.6W




To test my PID implementation and parameters I have been allowing the PID to iterate and calculate an ouput signal, but I have NOT been allowing this signal to command the system ( In the example I have been calculating the output signal of 0.6W but not setting the laser power to 0.6W; it stays at a constant 0.5W ). This has somewhat worked to hone in on appropriate PID parameters but I think I need to put the PID "online".

Obviously my PID parameters, and maybe implementation, are not going to be correct until they are refined and tuned so I do not want to allow it to control the system for various types of concerns and safety issues it could cause. Is this ok to do? Does it make sense?

I think this is a flawed way to see if the output signal is correct because the Error and Integral from past iterations are going to reflect past commanded signals. The error/integral could continue to grow even though they shouldn't be?



EDIT: Rephrased. Will a PID always produce a sane output whether it is online or not?
The PID can be tested in an open-loop setup, however any integral gain &lt;> 0 will cause the PID output to run away, so you are likely to hit clamping (like control voltage maxima) with your test rig.

What really matters and needs to be tuned is the closed-loop behaviour. This includes your plants behaviour. Stability is prime goal, maximum overshoot and settle time (to set-point change or disturbance) can be tuned.

If you cannot tune in the live system, modeling and simulation is the way to go (look for Simulink Control Design). You would typically start with an empirical plant model, tune your PID for it, then run the actual device with this PID but a set-point well below Tmax. Instrumentation will give you data to improve your plant model. Repeat this development cycle a few times until you are confident to increase to the actual set-point.