It is not easy to explain cam timer1 to young engineers, nor to locate an installation still with this device. In water treatment works (WTW), it is used for sequential control of filter backwash, replacing the older design of hardwired relay and timer logic. Cam timers are in fact programmable, but they are not as convenient as they should be.
Programmable logic controllers (PLCs)2 were invented in the late 1960s for automobile manufacturing, which required flexibility and productivity optimisation. The first Modicon 484 PLCs were commissioned for filter backwash controls and washwater recovery in two WTWs in the mid-1980s. Since then, PLCs have been ubiquitous for industrial controls and can be found on almost every control panel in a typical treatment plant. Other reasons for its popularity include the cost, availability, and ease of use of programming software or tools.
Discrete controls commonly found in WTW: level, flow, pressure, temperature, positions, etc. There are not too many applications of closed-loop controls. Typical applications involve flow control and constant filter level or flow control using single-input, single-output (SISO) proportional-integralderivative (PID)3 controllers. In the old days, even such controllers were pneumatic.
Chemical dosing is an essential part of a typical WTW. A typical WTW in the early 1980s, minimally, required only four chemicals: alum for coagulation, lime for pH correction, fluoride for final water fluoridation, and chlorine for sterilisation. Other chemicals have been introduced over the years to address the challenges of raw water qualities and to improve final water quality. For example, powdered activated carbon (PAC) was introduced for taste and odour control, and polyelectrolyte to aid flocculation. Since 2000, still more chemicals have been introduced, such as ammonium sulphate and sodium phosphate for biological nitrification, ozone for Cryptosporidium and Giardiasis inactivation, hydrogen peroxide or sodium bisulfite for ozone quenching.
Traditionally, chemical dosing requires only flow proportional control (also known as flow pacing control), and the operator determines the appropriate dosage based on raw water quality changes. Dosage decision is normally supported by jar testing4, which is a bench-scale batch simulation of the process, in the control room or laboratory of the WTW. This setup has been considered adequate for the industry due to the relatively stable raw water quality at most of the WTWs and the presence of skilled operators with hands-on experience. To modernise the operation of a modern WTW involving coagulation, clarification, ozonation, biological nitrification, filtration, sterilisation, residual management (recovering as much water as possible before disposal of sludge), and UV treatment, a more sophisticated control system is required in the new digital era.
According to Schlenger et al.5, process control can be classified into three stages: supervisory control, automatic control, and advanced control. Automatic control, without explicitly defined, by mere flow pacing was deemed adequate in the last few decades. The first WTW that has automatic open-looped feedforward control for coagulant dosing was commissioned only a few years ago.
With the digitisation of almost the entire control ecosystem of the WTW from field instrumentations, distributed local control panels equipped with PLC, and proprietary subsystems such as ozonation (on-site oxygen and ozone generation, and dispersion), On-site Generation Chlorine Gas Generation (OSCG) and UV communicating to the host PLC in TCP/IP, advanced control is logical for some processes.
With more chemicals involve more complicated control and optimisation challenges in the treatment process, and traditional PID controllers may not be able to effectively manage it. In their paper6, Ratnaweera et al. provided a table of online sensors applied to monitoring and controlling of the coagulation. There is no doubt a debate on the return on investment for providing and maintaining the instrumentation for optimal control. It is common to see at least six to eight raw water quality parameters specified for a modern WTW with process trains involving coagulation/flocculation, biological nitrification, ozone for iron/manganese oxidation, and post chemical dosing. A controller capable of multi-input, multi- output (MIMO) for optimisation of settled water quality is required.
Table 1: Online sensors applied for monitoring and control of the coagulation process, according to experiences and applications in Northern Europe and Scandinavia
In his blog, Tariq Samad7 summarised a 2015 survey by the members of the International Federation of Automatic Control (IFAC) on the impact of advanced control and challenges, showing that PID control has the highest (100%) multi-industry impact. Model Predictive Control (MPC) comes second in the survey.
What is MPC and how does it help process automation and optimisation?
MPC is an advanced method of process control that is used to control a process while satisfying a set of constraints. It has been in use in the process industries in chemical plants and oil refineries since the 1980s.8
MPC describes a set of advanced control methods, which make use of a process model to predict the future behavior of the controlled system. By solving a potentially constrained optimisation problem, MPC determines the control law implicitly. MPC can even control systems, which cannot be controlled by conventional feedback controllers. MPC is based on a repeated real-time optimisation of a mathematical system model.9
Figure 1: Simplified diagram of an MPC-based control loop
Figure 2: Function principle of a model-based predictive with horizons N1, N2, Nu
According to Schwenzer et al.9 , when MPC was first introduced in 1978 it was also called Model Predictive Heuristic Control (MPHC), and it did not claim to obtain optimal control. Instead, future controls were determined iteratively until constraints are met. In addition, the term “heuristic” stressed the missing explicit control law. The paper states that “for a long time, the process industry used MPC almost exclusively”. An early example, Shell, developed Dynamic Matrix Control (DMC) and used it in a fluid catalytic cracker10 in 1979. A quoted reference acknowledged that MPC is “the standard approach for implementing constrained, multivariable control in the process industries today”.
The model is the essence of MPC. In his Tutorial Overview of MPC, Rawlings puts it in this way: “models are not perfect forecasters, and feedback can overcome some effects of poor models, but starting with a poor process model is akin to driving a car at night without headlights; the feedback may be a bit late to the truly effective”12.
How is MPC related to digital twin (DT)?
Zhou et al.10 believe that DT originated from Virtual Manufacturing (VM) some 30 years ago11 and that DT is essentially an Advanced System Modelling and Simulation Environment (ASM&SE). Two other essential building blocks of DT are MPC and Building Information Modelling (BIM). In the last decade or so, many industries, mainly lucrative ones like aerospace, manufacturing, pharmaceutical, oil or gas, and energy sectors, have adopted different flavours of DT to assist in the building environment, operation optimisation and simulation, operator training, and asset management. The trend has accelerated in part by the extensive adoption of BIM in construction projects, Artificial Intelligence (AI), and Machine Learning (ML). With DT in place, the operator can handle a huge volume of data for analytics, operator training, failure analysis, performance simulation, predictive control, and predictive maintenance.
All in for digital twin?
Further to the publication of an American Water Works Association (AWWA) article13, DT becomes a trend for all new WTW (water and waste) projects in Hong Kong. Zhou et al.10 attempted to locate the origin of DT and even described the fad as “commercial propaganda”.
In the Institute of Electrical and Electronics Engineers (IEEE) Proceedings in 200114, Cox et al. said, “the technology employed by the water industry is of a relatively low level”. With DT on the horizon, there is no going back, and the best opportunity is here for the industry to step up. Living in a digital era surrounded by a virtual replica of our physical assets, there are numerous benefits for the industry with DT on the horizon.
When planning a DT project, critical thinking is crucial, especially when one encounters “propagandas from promotors and vendors”. Below are the reminders:
- DT is not advanced control.
DT and advanced control are complementary technologies that can be used in combination to achieve optimal performance in an automated system. DT is a virtual replica of a physical system or process that does not necessarily need advanced control.
- More is not better.
A modern WTW would have around 160 or more field instruments as the data source. Failure such as malfunction or calibration shift of some of the sources that are essential for the process model will be perilous to the operation. If a budget permits, one may consider duplicating or even triplicating redundant units, but one must also consider recurrent maintenance and replacement costs. Some advanced online instruments, for example Streaming Current Detector (SCD) and zeta potential, are notoriously difficult to calibrate and maintain. Outlier detection and pre-processing of data could also help to ensure model integrity and prediction accuracy.
The use of virtual (aka software) sensors has been found useful in research15 and full-scale projects. Virtual sensors can circumvent the inherent problems of long hydraulic retention time and imperfect mixing of flocculation and sedimentation process tanks that impose dead time in the system when feedforward-feedback model is used. Advanced techniques using artificial neural network (ANN) and fuzzy logic have been applied as estimator (aka software or virtual sensors) in chemical processes; Ali et al. in their article16 provided a comprehensive literature survey on this subject. Virtual sensors are also cheaper in terms of the overall cost of ownership although they require setting up by specialists, ongoing data-driven calibration, and validation.
- Overreliance on models
According to Liu’s 2016 thesis15, a few full-scale projects that have experienced performance problems when raw water quality parameters exceed the limits for which the model was trained. In addition, Qin et al. warned in their survey on industrial MPC technology17 that neural networks can be unreliable when extrapolating beyond their training range. Models will typically be trained or calibrated using one to two years of historical data. However, due to changes in raw water sources and adverse weather conditions, downtime or operator intervention will be required for recalibration or retraining of models. Fallback arrangements must be allowed unless operators are comfortable reverting back to simple flow pacing control.
Key learnings from the article of Ratnaweera et al.6 is that “there is no comprehensive or universally accepted mathematical description of the coagulation process has been developed so far” and “theoretically it should be possible to develop predictive simulations for the flocculation process that could be used for real-time process control, but there are no practical solutions in this respect so far”.
- On the cloud or not?
Market-leading software vendors, such as IBM, Amazon, Google, Huawei, and Microsoft, offer data science and machine learning tools and services on the cloud. Therefore, it is attractive for DT vendors to leverage such services on the cloud instead of on-premise servers which require in-person attention and maintenance. However, one must be extremely careful about cybersecurity when real-time data is transmitted via a public network.
- Choose wisely for fallback options
PID controllers, with their simple structure and robust performance, are suitable as a fallback solution. To improve on the performance of a simple feedforward (FF) model, one could consider pairing Fuzzy PID controllers (for their heuristic nature and effectiveness for nonlinear systems) with Streaming Current Detectors (SCDs), which provide feedback. Fuzzy Logic Controllers can simulate an experienced operator’s thought process by using linguistic control algorithms.18
- Specialist input for life?
The moment you hand over your data to a service vendor, switching to another one is extremely difficult. Raw data should always remain yours, but optimisation technique and process models, which are continually refined and/or recalibrated, remain the vendor’s proprietary intellectual property. Software as a Service (SaaS) pricing model is very popular for cloud-based software delivery. With SaaS, changing vendor is possible. However, a fallback arrangement must be allowed beforehand to avoid disruption to the operation since it is not as simple as replacing a faulty cam timer or panel mount PID controller.
- How to choose?
This is perhaps the most challenging part. The service is a black box from the facility owner’s perspective because of its proprietary nature. Explicitly defined performance index of the system, mean time before human intervention, downtime for recalibration and regular software updates and review should be agreed upon before fixing the price. Performance incentives and retainer fees can also be included so that side-projects on the same site can be easily managed.
What lies ahead for young engineers?
The days of vinyl, floppy disk, and CD-ROM are gone. Likewise, it is hard to find a panel mount physical PID controller. These things are artifacts that belong in the museum, and it is unlikely for cam timers and physical PID controllers to be found in large-scale project. To survive and excel in work in the digital era, one must constantly stay abreast of development. Irrespective of their trade training and previous exposure, engineers are encouraged to explore new things around them and learn new vocabulary so that they can confidently work with new vendors and clients. Being a Python coder or data scientist may not be your career goal, but in the new digital era, your understanding of the basics of digital technologies and the vocabulary associated with them will be crucial.
In the long run, contractors and facility owners should develop their own qualified in-house team that is capable of starting an MPC project. The maintenance team is not expected to call an external service vendor to retune a PID controller. Foresight to acquire and retain knowledge, skills, and experience is essential, and there is no time to waste in getting started.
References
- ‘Cam timer’ (2022). Wikipedia. Available at: https://en.wikipedia.org/wiki/Cam_timer. [Accessed 19 May 2023].
- ‘Programmable logic controller’ (2023). Wikipedia. Available at: https://en.wikipedia.org/wiki/Programmable_logic_controller. [Accessed 19 May 2023].
- ‘PID controller’ (2023). Wikipedia. Available at: https://en.wikipedia.org/wiki/PID_controller. [Accessed 19 May 2023].
- American Water Works Association (2011). ‘Jar Testing’ in Operational Control of coagulation and Filtration Processes M37, 3rd edn.
- Schlenger D L, Riddle W F, Luck B K and Winter M H (1996). Automation Management Strategies for Water Treatment Facilities. Denver: AWWARF and AWWA.
- Ratnaweera H and Fettig J (2015). ‘State of the Art of Online Monitoring and Control of the Coagulation Process’. Water, 7, 6574-6597.
- International Federation of Accountants (2016). A survey on industry impact and challenges thereof. Available at: https://web.archive.org/web/20170824081208/http:/blog.ifac-control.org/2016/10/03/a-survey-on-industry-impact-and-challenges-thereof/. [Accessed 19 May 2023].
- ‘Model predictive control’ (2023). Wikipedia. Available at: https://en.wikipedia.org/wiki/Model_predictive_control. [Accessed 19 May 2023].
- Schwenzer M, Ay M, Bergs T and Abel D (2021). ‘Review on model predictive control: an engineering perspective’. The International Journal of Advanced Manufacturing Technology, 117, 1327-1349.
- Zhou J, Zhang S and Gu M (2022). ‘Revisiting Digital Twins: Origins, Fundamentals and Practices’. Frontiers of Engineering Management, 9, 668–676.
- Onosato M and Iwata K (1993). ‘Development of a virtual manufacturing system by integrating product models and factory models’. CIRP Annals, 42(1), 475-478.
- Rawlings J B (2000). ‘Tutorial Overview of Model Predictive Control’. IEEE Control Systems Magazine, 20(3), 38-52.
- Curl J M, Nading T, Hegger K, Barhoumi A and Smoczynski M (2019). ‘Digital Twins: The next generation of water treatment technology’. Journal - American Water Works Association, 111(12), 44-50.
- Cox C, Fletcher I and Adgar A (2001). ‘ANN-based Sensing and Control Developments in the Water Industry: A Decade of Innovation’. Proceedings of the 2001 IEEE International Symposium on Intelligent Control, September 5-7.
- Liu W (2016). Enhancement of Coagulant Dosing Control in Water and Wastewater Treatment Processes. PhD Thesis. Norwegian University of Life Sciences. Available at: https://nmbu.brage.unit.no/nmbu-xmlui/handle/11250/2497481. [Accessed 19 May 2023]
- Ali J M, Hussain M A, Tade M O and Zhang J (2015). ‘Artificial intelligence techniques applied as estimator in chemical process systems – a literature survey’. Expert Systems with Applications, 42(14), 5915-5931.
- Qin J and Badgwell T A (2003). ‘A survey of industrial model predictive control technology’. Control Engineering Practice, 11(7), 733-764.
- Ahmed D F (2015). ‘Fuzzy Logic Control of Chemical Processes’. Engineering and Technology Journal, 33 (A), No.1