Project: Biopharmaceutical filtration automation, August 8, 2005
August 9, 2005
Over the past week we have been involved with process simulations to allow developers to run sequences, test alarm conditions, execute recipes, and generate operational data that can be used for development of data analysis applications for this project. Historically, we have developed simulations inside the control system. Recently, however, we have developed a simple simulation application in VB.Net that uses OPC to manipulate module parameters based upon a simulation calculation defined by the user. The application reads user-defined OPC inputs, performs a simulation calculation, and writes to OPC outputs based upon the calculation results. Calculations are written in VB Script and the entire simulation is saved to disk as an XML file. However the simulation is written, the purpose is not to verify proper I/O connectivity, but verify software functionality of control modules, interlocks, graphics, equipment sequences, phases, and recipes.
We always parameterize simulations that allow us to speed up or slow down the response. For this process, a typical batch may take two days—much too long for effective testing. We'll tune our simulation so a batch can be filtered in a few minutes or as long as a couple of hours.
Liquid flows are the easiest of analog processes to simulate. A flow controller PID output can be used to represent the flow transmitter signal after proper range scaling between the two values. Personally, I like to add a simple non-linear relationship to make the simulation a bit more life-like. The value is calculated as the SIN of the PID output rescaled between 0 and PI/2. The result is a value between 0 and 1 that follows a non-linear path.
Simulate a discrete valve by adding a time delay after a change of state from the valve control module output. The time delay should be easily configurable to permit simulating valve failures or slow acting valves. It may be tempting to have a single time constant for all valves, but eventually you'll want different values for different valves, therefore I recommend on having a unique time delay for each individual valve.
Temperature simulations are also relatively simple to simulate by calculating a temperature increment for each simulation scan. The increment is a number to add or subtract from the current temperature to create the new temperature value. On each scan, the temperature is increased or decreased by an increment. The increment should generally be the combination of multiple increments, each representing a process condition that influences temperature. For example, nearly every temperature simulation we include an ambient effect that will eventually bring the temperature to ambient conditions if no other driving force is active. The increment can be calculated as follows:
Da = Ka x (Tc– Ta)
Da is an incremental change to the process temperature caused by ambient conditions;
Ka is the relative ambient driving force (a parameter to be tuned by trial and error to get a realistic ambient effect relative to other temperature effects);
Tc is the current process temperature; and
Ta is the ambient temperature which can be a static value of say 20 °C.
The same calculation will be used for any other process condition that affects the process temperature such as jacket heating/cooling with steam or glycol. Each process effect will have a unique Ka and Ta that can be tuned to impart the desired response.
Next week we’ll address HMI aspects of this project.
- Events & Awards
- Magazine Archives
- Digital Reports
- Global SI Database
- Oil & Gas Engineering
- Survey Prize Winners