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.
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.