Use OPC UA Data to Test Binary Distillation Column Plant Model
This example shows how to use data from an OPC UA server to test composition control of a binary distillation column model.
Prerequisites:
Set up an OPC UA server: To run this example in your MATLAB® session, you must install and start Prosys OPC UA Simulation Server. For more information, see Install an OPC UA Simulation Server for OPC UA Examples.
Configure an OPC UA client: To use the OPC UA Read and OPC UA Write blocks, you must connect at least one OPC UA client to an OPC UA server. For more information on how to create and connect an OPC UA client in Simulink®, see Configure OPC UA Client in Simulink. For information on how to read or write data to nodes on an OPC UA server, see the example Get Started with OPC UA in Simulink.
Model Description
The distillation column controller in this example has been tuned using Simulink Design Optimization™. For more information, refer to distillation_demo.slx
available with the Distillation Controller Tuning (Simulink Design Optimization) example.
The image shows a model where the OPC UA server provides a random signal for the setpoint, and for injecting an output disturbance on the process. The OPC UA Read block labeled as Setpoint
inputs the model with the data read from a node named Random
with an identifier 1002
. The OPC UA Read block labeled as Disturbance
inputs the model with the data read from the nodes named Random
and Sawtooth
with identifiers 1002
and 1003
, respectively. The plant model outputs data to the server using the OPC UA Write block.
Running Simulink Models Faster Than Real-Time
Note that the OPCUABlksDistillation
model provided with this example runs 300 times faster than the real-time, using the Simulation Pacing Options (Simulink) options in Simulink. The distillation column model has very slow time constants (in the order of ~20 minutes), and it is desirable to test the simulation at faster rates than real-time. By using the speedup factor, you can simulate 400 minutes in approximately 80 seconds. You can connect this model to an HMI or SCADA system to train operators in expected plant responses, or to validate the SCADA system against desired performance specifications.