PID characterization: Scaling your process
You now have your time constants. The next thing to do is establish the scales for your process and controller. This is simply a matter of determining how many volts into your process translate to how many whatchamacallits out of your process, and how many volts or whatevers they in turn result in at the input of the SPLat. These are all established as steady state values, meaning the process output for a given input, once it has settled (stopped changing).
Lets think a bit about the units we use.
Let’s say your process produces “floobies”. In fact, you have invented a very nifty flooby generator, or Floobion, which you are rightly proud of, and you need to automate it. The floobion production cell is controlled by a 0-10V control signal, and requires PID control. (There are logic controls as well, which is why you picked a SPLat. You know that once you get into volume production of your Floobion we good folks at SPLat can make you a customized SPLat controller that will be a perfect match for your needs, including a direct flooby cell interface complete with negative warp ion generation. During prototyping you are buying that separately, at great expense). Anyhow, you sit down and make a plot of floobion output versus cell control voltage. It looks like this:
| Input V | Output F/hr |
|---|---|
| 0 | 0 |
| 0.5 | 0 |
| 1 | 10 |
| 2 | 130 |
| 5 | 500 |
| 10 | 1000 |
If you plot those numbers as a scatter diagram in Excel, you can use “Add Trendline” (right click the curve) to fit a straight line to the data and discover the equation is
F = 105V – 51
Now, you obviously need a flooby sensor to get feedback from your process into the SPLat. The best one you can find has a full range sensitivity of 1500F/Hr for 10V out. With 0F/Hr it gives 1V out, and it is (thankfully!) linear in between. Lets add those facts to our table:
| Process I/P V | Process O/P | Sensor O/P V |
|---|---|---|
| 0 | 0 | 1 |
| 0.5 | 0 | 1 |
| 1 | 10 | 1.06 |
| 2 | 130 | 1.78 |
| 5 | 500 | 4 |
| 10 | 1000 | 7 |
Now, PIDassist works with all numbers normalised to the range 0-1. Because we are above working with 10V either end, that means dividing the first and last columns by 10
| Process I/P Normalised | Process O/P | Sensor O/P Normalised |
|---|---|---|
| 0 | 0 | .1 |
| 0.05 | 0 | .1 |
| .1 | 10 | .106 |
| .2 | 130 | .178 |
| .5 | 500 | .4 |
| 1 | 1000 | .7 |
Again we enlist the help of Excel and its “Add Trendline” function to find the relationship between process control input and sensor output as
Sensor = 0.6322Control + 0.0691
This last equation is the one we are after, because it gives the final numbers we need to feed into PIDassist. The number 0.6322 is the process (output) gain and 0.0691 is the process output offset.
It is interesting to note that the largest number you can get as an input to the SPLat is 0.6322+0.0691=0.7013 (slightly different to 0.7 because the trendline is a best-fit to a function that is not an absolutely straight line). That is the normalised sensor output at a process output of 1000 floobies/hr. Now, because our controller will eventually be seeking to adjust that value to equal the setpoint, the setpoint should never be set higher than 0.7. That is something to keep in mind when doing simulation runs.
By the way, the fact that the sensor has an offset of 1V or 0.1 normalised unit means that if you want to display the output or the setpoint in engineering units (i.e. Floobies), you will have to do some extra sums in your program. Be very careful how you do this so you don’t change the gain seen by the controller function.
It may be that your process is inverting. That means its output decreases when the control input increases. If that is the case you should wind up with a negative value for process gain and an output offset that is equal to the maximum output of the process. In this context the “output of the process” is actually the output of whatever sensor you have measuring floobies.