PID control: Implementation
We will now get down to the actual details of implementing a PID controller for your process.
In this chapter I will take you through a step by step procedure. The underlying principle of this procedure is as follows:
- You first characterize your process, i.e. measure, study and quantify the dynamics of the process, be it pH control in fish tank (warning, could be very nonlinear) or temperature control in an autoclave. You do this using a SPLat board, interfaced to your system, as a data logger. You use Excel spreadsheets to analyse the readings.
- You then model (simulate) the process using PIDassist, using the parameters determined in step 1. The reason for modelling that it is usually easier, quicker and safer to experiment on a computer than in a real life situation. You will use the model, along with a simulation of the SPLat PID program, to establish values for the various PID controller parameters.
- You commit to a real program running live on a real system, but still using PIDassist to fine tune parameters and log results.
- You generate “production” PID code using the built in code generator in PIDassist and integrate it into the rest of your SPLat program.
- Finally, you recheck the tuning of your control system on the real system using the SPLat controller, including comprehensive testing across the full range of operation of the device. You should NEVER, EVER omit this step or deal with it cursorily.
A couple of these steps are split into 2 separate sections.