A digital twin of CUT’s water bottling plant was developed to provide a comparative research platform for evaluating PLC, Stateflow, and reinforcement learning control strategies in smart manufacturing.
CLIENT
Central University of Technology
sector
Education
Read time
7 Min
Overview
The Challenge
The Solution
The Results
The numbers
Challenge
At the Central University of Technology (CUT) in Bloemfontein, Prof Rangith Kuriakose leads research into smart manufacturing and control strategies using a full-scale water bottling facility installed on campus. While the plant operates using a traditional PLC-based control system, there was a need to explore AI-driven control strategies to modernise the operation and provide a platform for academic comparison.
The project set out to address several challenges:
Compare control methods — Evaluate traditional PLC, event-driven control using Stateflow, and AI-based reinforcement learning (RL) within the same simulation environment.
Build a decision-capable digital twin — Simulate bottling operations with varying bottle sizes (330 ml and 500 ml), inventory dynamics, water availability, and real-time order inputs via the cloud.
Shift decision-making from rigid control logic to AI — Move beyond fixed rules such as refilling the tank at 50% and enable AI to dynamically decide based on available resources and order requirements.
Enable future research and scalability — Provide an extendable platform for postgraduate research and long-term comparison studies.
Below is the CAD diagram of the physical Water Bottling Plant facility headquartered on CUT’s main campus. It consists of a water tank and water replenishment system, a bottle production and storage facility so that new bottles are ready to be filled, and a water filling station where the bottles are eventually filled based on orders received. Acknowledgement goes out to Prof Rangith Kuriakose for the picture.
Figure 1: CAD model of the Water Bottling Plant Facility
The physical plant can be modelled, tested, and enhanced in a simulation environment such as Simulink where block diagrams are used to represent physical aspects of the Water Bottling Plant. This is shown in the diagram below.
Figure 2: Simulink model of the Water Bottling Plant Facility
Model-Based Design is an engineering approach that assists technical teams in designing more robust systems and experiment with ideas within a simulation environment before building prototypes. The Model-Based Design approach was used throughout this study.
Solution
Opti-Num developed a digital twin of the water bottling plant using MATLAB and Simulink, layered with different control strategies for rigorous comparison and academic application.
Three simulation environments were created:
Reinforcement Learning Model
An RL agent controls the tank refill process and selects the next order to process based on system state and resource availability.
Although the RL agent for full order management was not fully developed within the project budget, a foundational model was delivered for future expansion
Traditional Control +Event-Driven Order Selection
A classic PID-style controller governs the water pump.
A Stateflow chart manages the sequencing of bottle orders based on inventory and availability.
Fully Stateflow-Driven Model
Both the water tank control and order selection process are handled via Stateflow logic, simulating event-driven decision-making without AI.
The digital twin includes a cloud-based order system, stochastic modelling for 330 ml and 500 ml bottles, and real-time simulation of operational constraints such as water, bottle, and cap availability.
Outcome
A working digital twin of the water bottling facility was delivered to CUT, enabling control strategy evaluation within a virtual, safe-to-test environment.
The RL-based model demonstrated dynamic tank refilling and resource-driven decision-making—laying the foundation for full AI-managed production control.
CUT now has three comparative Simulink models:
Reinforcement Learning control
Traditional + Stateflow hybrid
Fully event-driven (Stateflow-based)
These models are being used for ongoing postgraduate research and can be expanded further by CUT students or with additional consulting support from Opti-Num.
The platform supports CUT’s long-term academic goals and positions the university to explore AI in process automation, with an emphasis on Simulink, Stateflow, and reinforcement learning.
Below is the final simulation model of the Water Bottling Plant. Equipped with controllers that control the water pump and order selection using Reinforcement Learning, this study serves as a beacon for new ideas and comparison studies to come together by comparing traditional plant controllers with those driven by Artificial Intelligence.
Figure 3: Simulink model of Water Bottling Plant driven by Reinforcement Learning