Automation · reverse engineering · digital twin
Recovering and rebuilding the control system of a process rig
A control system from around 2010 had stopped, and its I/O communication was undocumented. The application was recovered, the communication worked out and the control rebuilt. The system is in use today on the original hardware.
Situation
The control system of a water-process rig used for teaching had been lost. The rig has pumps on frequency converters, control valves, a heater, tanks, and flow, level, pressure and temperature transmitters.
The control was a proprietary distributed control system (DCS) from around 2010. The engineering and boot server and the operator stations were gone, and the diskless controller could no longer start.
What was done
- The original application was recovered read-only from the dead server's disk image: 36 control loops and modules, 49 physical I/O signals, interlocks, alarms and the operator process picture.
- The undocumented I/O link, from Ethernet to a proprietary fieldbus, was worked out from the controller's own driver and from network captures. The old controller was booted over the network again, from a Linux server.
- The control was rebuilt on Linux and .NET 10: a control engine with the original function blocks (PID, motor and valve, logic), a driver for the original I/O cards, and alternative drivers for Modbus TCP and ADS I/O stations.
- A process simulator, or digital twin, to test the control before it was connected to the rig.
- A browser-based operator interface: process picture, loop windows, alarms, trends and a teacher panel.
- Real actuators were only driven with a person at the emergency stop, and every hardware step could be reversed.
Result
The system is in use today on the original hardware, with its original I/O cards. It consists of about 16,000 lines of C# and about 350 automated tests, including integration tests that run the control engine against the simulator. It runs on a small single-board computer and a kiosk laptop.
Technologies Linux, .NET 10, C#, network boot, fieldbus protocol analysis (HDLC), Modbus TCP, ADS, Raspberry Pi 5, browser-based HMI