0% found this document useful (0 votes)
44 views8 pages

Transfer Learning Approach For The Design of Basic Control Loops in Wastewater Treatment Plants

This document discusses using transfer learning to design control loops for wastewater treatment plants. Specifically, it trains a long short-term memory (LSTM) neural network to control the fastest dynamics in a wastewater treatment plant. Then, it transfers the knowledge from that trained LSTM to design the control loops for the rest of the wastewater treatment plant processes. This allows for easier and faster design and training of the overall plant control system compared to training models individually.

Uploaded by

SourabhYadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views8 pages

Transfer Learning Approach For The Design of Basic Control Loops in Wastewater Treatment Plants

This document discusses using transfer learning to design control loops for wastewater treatment plants. Specifically, it trains a long short-term memory (LSTM) neural network to control the fastest dynamics in a wastewater treatment plant. Then, it transfers the knowledge from that trained LSTM to design the control loops for the rest of the wastewater treatment plant processes. This allows for easier and faster design and training of the overall plant control system compared to training models individually.

Uploaded by

SourabhYadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Transfer Learning Approach for the Design of Basic

Control Loops in Wastewater Treatment Plants


Ivan Pisa∗† , Antoni Morell∗ , Jose L. Vicario∗ , Ramon Vilanova†
2021 IEEE 26th International Conference on Emerging Technologies and Factory Automation (ETFA) | 978-1-7281-2989-1/21/$31.00 ©2021 IEEE | DOI: 10.1109/ETFA45728.2021.9613360

∗ Wireless
Information Networking (WIN) Group
† AdvancedSystems for Automation and Control (ASAC) Group
Universitat Autònoma de Barcelona, 08193 Bellaterra, Spain
Email: {Ivan.Pisa, Antoni.Morell, Jose.Vicario, Ramon.Vilanova}@uab.cat

Abstract—The incursion of the Industry 4.0 paradigm and data-driven methods [1]. In addition, it is worldwide known
the Artificial Neural Networks (ANNs) is changing the way that nearly all the industrial processes have to be managed by
as the industrial systems are conceived and controlled. Now, a control strategy in order to assure that the correct industrial
it is more common to talk about data-driven methods either
supporting conventional industrial control strategies, or acting behaviour is assured and maintained over time [2].
as the control itself. Thus, one can find that in the last years it In such a context, Artificial Intelligence and Artificial Neu-
is more common to find control systems which are purely based ral Networks (ANNs) have arisen as not only new tools able
on data leaving aside the highly complex mathematical models. to support conventional control approaches, but also as tools
However, data-driven models and ANNs have to be correctly considered in the control design as such. For instance, ANNs
trained in order to offer a good performance and therefore, be
contemplated as the core part of a control strategy. This can have been adopted in some industrial environments in order
become a time-demanding and tedious process. For that reason, to perform predictive maintenance tasks as well as to detect
Transfer Learning (TL) techniques can be adopted to ease the the malfunctioning of industrial systems. For instance, in [3],
conception, design and training processes of the data-based and ANNs are adopted to detect anomalies present in time series
ANNs methods, since the efforts have to be mainly focused on signals, i.e., the type of signals coming from industrial sensors.
training a unique net which will be then transferred into the other
scenarios. In that sense, we present here a TL approach to design One of the industrial sectors where ANNs have been widely
and implement the whole control of a Wastewater Treatment adopted is the wastewater treatment plants (WWTP). They
Plant (WWTP). First, the control of the quickest dynamics under are industrial scenarios devoted to managing and cleaning
control is performed by means of a Long Short-Term Memory the incoming residual urban waters and spilling them into
cell (LSTM) based Proportional Integral (PI) controller (LSTM- clean receiving waters. In such a context, ANNs have been
based PI). Once the LSTM is trained and tested, its knowledge
will be transferred into the remaining WWTP control loops. In adopted as a complement of conventional controllers such as
that way, an ease and reduction in the time involved in the design the Proportional Integral (PI) and Model Predictive Controllers
and training of the control as well as in its complexity is achieved. (MPC) [4], [5]. In addition, they have also been considered
Results have shown a twofold achievement: (i) the LSTM-based in the implementation of new control strategies mainly based
PI achieves an improvement of the control performance with on data such as the ANN-based Fuzzy control strategies or
respect to a conventional PI controller around a 93.56% and a
99.07% in terms of the Integrated Absolute (IAE) and Integrated the ANN-based Internal Model Controllers (ANN-based IMC)
Squared (ISE) errors between the desired measurement and the [6], [7]. All these control approaches have a common point
obtained one, respectively, and (ii) the LSTM-based PI controller between them: they require measurements of the plant in
achieves an average improvement in the IAE and ISE around a order to determine the actual state of the plant and therefore
9.55% and 15.25%, respectively, when it is transferred into a the corresponding actuation signal [8]. In some cases, these
different WWTP control loop.
Index Terms—Industrial Control, Long Short-Term Mem- measurements can be easily obtained through common sensors
ory cells, Proportional Integral Controller, Transfer Learning, while in other cases there is no a suitable sensor or it is not
Wastewater Treatment Plants feasible to place one in the environment. To solve this, ANNs
have been adopted to implement soft-sensors able to forecast
I. I NTRODUCTION these measurements and therefore, feed the control system
to generate the best control actuation. For instance, in [9] a
In the last decade the industry sector is experiencing a
soft-sensor based on Levenberg-Marquardt neural networks is
change in its operations due to the appearance and the in-
proposed to measure certain components of a petrochemical
cursion of the Industry 4.0 paradigm and the application of
distillation column. However, the adoption of ANNs as tools
This work is supported by the Catalan Government under projects 2017 for implementing soft-sensors, detecting anomalies or act as a
SGR 1202 & 2017 SGR 1670 and also by the Spanish Government under controller complement or as the controller itself has its own
projects TEC2017-84321-C4-4-R, DPI2016-77271-R & PID2019-105434RB-
C33 co-funded with the European Union ERDF funds.
drawbacks [10]. Some of them are related to the hyperparam-
eters selection of the ANNs involved in the control design
while others correspond to the selection of the data-driven
978-1-7281-2989-1/21/$31.00 ©2021 IEEE method or ANN structure and architectures [11]. Here is where

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
Transfer Learning (TL) techniques make the point. Instead of
+
investing a high amount of time in the conception and design
of the sensors and controllers involved in the management of -

an industrial plant, its operator can decide to focus his/her


efforts in designing and implementing a data-based sensor or
controller for a well-known control process and then transfer
the knowledge of the data-based sensor or controller into other
control loops. For instance, in [11], TL techniques are adopted -

to design and implement Long Short-Term Memory (LSTM) +

based soft-sensors. They will be considered to act in a well-


known scenario, a sulfur recovery unit of a refinery. However,
the scenario presents a data scarcity problem. TL is adopted
to design and train the soft-sensor in a scenario with enough Fig. 1. Benchmark Simulation Model No.1. Q0 , Qa , Qr , Qe and Qw are
data and then transfer it into the target scenario. Once it is the influent, the internal and external recycle, the effluent ans the wastage
flows, respectively. All of them measured in m3 /day.
transferred, a fine-tuning process is performed in order to adapt
its behaviour to this new scenario.
In our case, what we will present in this work is the adoption loop, we will train a unique ANN. Once it is trained and
of the TL principle to ease the implementation and design tested over the scenario, we will transfer its knowledge to
of the control strategies in a WWTP plant. First, we will other control loops easing the design process and reducing
implement a LSTM-based PI controller which will be able the control implementation and design time.
to highly improve the conventional PI controller strategies The scenario considered in this work corresponds to the
devoted to maintain a certain WWTP concentration. Then, this well-known and widely adopted WWTP Benchmark Simu-
controller will be transferred into a different control loop with- lation Model No.1 (BSM1) [13], which models a general
out performing any modification in its LSTM configuration purpose WWTP at the same time it offers generalisation,
or hyperparameters. In this work, only two WWTP control easy comparison and replicability of results. BSM1 structure
loops are analysed, however, this can be extrapolated to any considers five reactor tanks where the biological and biochem-
industrial environment with multiple control loops. Thus, the ical processes defined in the Activated Sludge Models and
larger the number of control loops to implement, the higher specially in the Activated Sludge Model No.1 (ASM1) are
the reduction in the design time and its complexity. replicated. Among the five reactor tanks, the first two work
The rest of the papers is organised as follows, section II under anoxic conditions whereas the last three work under
defines the problem under analysis. The proposed solution, aerated conditions [13]. In that sense, BSM1 considers two
which is based on transferring the knowledge of a LSTM- default Proportional Integral Controllers (PI) which are in
based PI, is explained in section III. Finally, results are shown charge of assuring the correct behaviour of the biological and
in IV whereas V concludes the paper. biochemical processes at the same time that the anoxic and
aerated conditions are maintained (see Fig. 1).
II. P ROBLEM D EFINITION As it is observed, the first control loop is devoted to
Here we will be working with a WWTP scenario, where manage the nitrite-nitrate concentration in the second tank
the cleaning task of residual waters is performed by means (SN O,2 ) by means of modifying the WWTP internal recycle
of highly complex and non-linear biological and biochemical flow (Qa ). The second control loop maintains the dissolved
processes such as the ones described in the Activated Sludge oxygen concentration in the fifth reactor tank (SO,5 ) at the
Models [12]. In order to assure an efficient and good pollutant given set-point. In this case, there are only two PI controllers,
reduction process some of the WWTP parameters and con- however, the topology and amount of control actuations can
centrations have to be maintained at certain levels. This entail vary as a function of the control purpose and the environment
the adoption of control actuation and therefore, their design where they are placed. For instance, in [14], the BSM1 default
and deployment. In that sense, the adoption of data-driven PI controllers are substituted by a MPC controller whose
methods has been considered in some works since they do set-points are determined by a Fuzzy control. On the other
not require a deep knowledge of the different processes. They hand, the Benchmark Simulation Model No.2, an extension
are able to model the control tasks only with input and output of BSM1 which considers the sludge treatment, adopts four
pairs of data [7]. However, this involves a time-demanding and PI controllers as one of its default control strategies. One PI
computationally expensive design process since the structure to control the SN O,2 and three PIs to control the SO,5 [15].
and the hyperparameters of the ANNs implementing the data- As a consequence, the control actuation design becomes more
driven method have to be determined by means of an heuristic complex and therefore, a more time-demanding process.
training process. For that reason, what we will propose here In such a context, we will apply the transfer learning
is the adoption of the TL principle to simplify the design principles to ease the design of the BSM1 control strategy.
of a WWTP control approach. Instead of spending time in We will design and train a LSTM cell to model the behaviour
the design and training of multiple ANNs, one per control of the PI in the SO,5 control loop. Once trained, its knowledge

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
will be transferred into the SN O,2 control loop. Thus, the • x(t): input data vector
considered LSTM cell will be able to control the SO,5 and • h(t): current output of the LSTM cell
the SN O,2 control loops. The main novelty of this work • c(t): current state of the cell storing information about
is that we will be able to control the whole BSM1 plant what has been previously entered in the net
designing one LSTM-based PI controller and replicating it • Input gate i(t): Sigmoid activation layer determining the
instead of designing and implementing two PI controllers. modifications that will be performed to the state of the
Hence, the design phase complexity and its time-consuming cell as a function of the previous cell state and input data.
training process will be halved. This approach is not limited • Forget gate f (t): Sigmoid activation layer determining the
to the BSM1 scenario since only the input and output data of information to be deleted in the cell state as a function
a the controller are required. It is worth noting that the time- of the previous cell state and input data.
demand and design complexity will be reduced even more in • State gate c̃(t): Hyperbolic tangent layer determining the
those scenarios where the amount of controllers is increased as new values of the cell states as a function of the previous
in the BSM2 scenario. Again, the design and implementation cell state and input data.
of a unique LSTM-based PI can be adopted to achieve the • Output gate o(t): Sigmoid activation layer in charge of
control of the whole scenario. computing the output candidates of the cell.
Mathematically, the LSTM behaviour is defined as follows:
III. T RANSFERRED C ONTROL K NOWLEDGE A PPROACH
A. LSTM-based PI i(t) = σ(Wi · x(t) + Ui · h(t − 1) + bi (t)) (1)
The LSTM-based PI controller will be implemented by f (t) = σ(Wf · x(t) + Uf · h(t − 1) + bf (t)) (2)
means of a LSTM cell which will replicate the behaviour of a
PI. The main point is that instead of setting the proportional c̃(t) = tanh(Wc · x(t) + Uc · h(t − 1) + bc (t)) (3)
gain and the integral time constant of this PI controller, the
o(t) = σ(Wo · x(t) + Uo · h(t − 1) + bo (t)) (4)
LSTM cell is directly derived from the relationships between
its input and output data. In that sense, the LSTM cell will c(t) = f (t) ◦ c(t − 1) + i(t) ◦ c̃(t) (5)
learn how to manage the SO,5 concentration accordingly to
these pairs of input and output data. The training process has h(t) = o(t) ◦ tanh(c(t)) (6)
been performed over the SO,5 control loop since it is the one where Wi , Wf , Wc and Wo are the LSTM learnable weights
showing the quickest dynamic. of the input, forget, state and output gates, respectively. All of
The LSTM cell structure consists in a type of recurrent neu- them modifies the input data. Ui , Uf , Uc and Wo are the
ral network which has arisen as the solution to the exploding learnable weights modifying the cell state and bi , bf , bc and
and vanishing gradient problem of recurrent neural networks. bo the LSTM learnable biases. Finally, σ and tanh are the
To solve this, it implements a memory cell able to model the sigmoid and hyperbolic tangent activation functions, respec-
relationships between input and output data preserving their tively. Notice that ◦ corresponds to the Hadamar product, i.e.,
time correlation. For that reason, these networks have been the element-wise product between matrices and vectors. All
widely adopted when dealing with natural language processing these learnable parameters are obtained by means of the LSTM
and time-series forecasting tasks [16, Section 10.10]. In our training process, which mainly consists in an iterative process
case, the topology of signals we are dealing with correspond where the set of inputs and outputs are matched accordingly
to a set of concentration measurements showing a high depen- to the cost function, i.e., the Minimum Square Error (MSE).
dence with respect to the time. For that reason, LSTM cells In terms of the input and output measurements, the LSTM-
have become the best option to model the PI behaviour. The based PI considers exactly the same ones as the PI controller.
LSTM structure is shown in Fig. 2, where the different inputs, In our case, these measurements correspond to the measured
outputs and activation layers can be distinguished: SO,5 (t) and its set-point (SO,5 set−point (t)). Moreover, a Non-
linear Autoregressive Exogenous (NARX) model principle has
been adopted to implement the LSTM-based PI [17]. This
means that the LSTM net implementing the LSTM-based PI
will consider an extra input corresponding to the previously
estimated actuation measurements. This extra measurement
consists in the previously generated oxygen transfer coefficient
KLa,5 (t − 1) which tells how opened the air valve of the
fifth reactor tank has to be. Thus, the KLa,5 corresponds
to the actuation variable of the SO,5 PI control strategy
and therefore, the output of the LSTM-based PI proposed
here. A sliding window has also been proposed to sort the
different concentrations and to preserve their dependence in
Fig. 2. Internal structure of the LSTM cell. time. In this case, the window length, i.e., the amount of time

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
[19]. Moreover, the training process of the LSTM cell has
been conducted during 500 epochs adopting the L2 penalty
regularisation technique with a penalty value equal to 1 · 10−4 .
Early Stopping technique with a patience of 20 epochs is also
adopted [16, Chapter 7].
B. Transferred Control Knowledge
Once the LSTM-based PI structure has been trained in
order to control the SO,5 concentration, its knowledge will be
transferred into the SN O,2 control loop. In that sense, transfer
learning approaches can be split into three different topologies
Fig. 3. LSTM-based PI structure as a function of the data and the training process:
• Inductive Transfer Learning: refers to those situations
considered to determine the actual KLa,5 value, has been set where labelled data are available either in the source and
to 4 hours accordingly to the methodology shown in [18]. the target domain.
Finally, two data processing stages have been introduced just • Transductive Transfer Learning: refers to those situations
before and after the LSTM cell. The first stage corresponds where labelled data is only available in the source do-
to the normalisation stage which is in charge of normalising main. As a consequence, the transferred model should be
all the input measurements towards a zero mean and unit retrained every time that a new set of labelled data is
variance distribution. This is performed to solve the data obtained from the target domain.
heterogeneity. SO,5 concentrations are placed in the range of • Unsupervised Transfer Learning: corresponds to the situ-
[0, 10] mg/L while the KLa,5 measurements are placed in the ation where neither labelled data is available in the source
[0, 360] day −1 range. The last stage, the denormalisation one, domain, nor in the target one.
is proposed to performed the opposite actuation, i.e., take In this work, we face an Inductive Transfer Learning
the predicted actuation values from the zero mean and unit problem since labelled data are available either in the source
variance distribution to their usual range, in this case to the domain (the SO,5 control loop) and the target domain (SN O,2
[0, 360] day −1 range. The LSTM-based PI structure devoted control loop). However, our proposal will not consider labelled
to control the SO,5 concentration is shown in Fig. 3. data of the target domain in the fine-tuning process. We
The training process of the LSTM-based PI structure has will transfer directly the knowledge of the LSTM-based PI
been performed adopting a whole year influent dataset. This designed for the SO,5 control loop into the SN O,2 control
dataset has been virtually obtained adopting the dry, rainy and loop (see Fig. 4) without retraining the LSTM cell. Only the
stormy influents provided in the BSM1 benchmark [13]: the normalisation and denormalisation stages will be modified.
dry weather profile considers a total amount of 14 days without Now, the inputs will correspond to the dissolved nitrite-
any rainy or stormy episodes, the rainy profile differs from nitrate (SN O,2 (t)) measured concentration and its set-point
the dry weather in the fact that it considers a long rain event (SN O,2 set−point (t)). The output of the LSTM-based PI cor-
between the eighth and tenth days. The stormy profile shows responds to the internal recycle flow (Qa (t)). In addition,
two storm episodes, one in the ninth day and the other in the an extra input will also be considered due to the fact that
eleventh day. All these profiles have been sampled every 15 the LSTM-based PI structure has been transferred from the
minutes. Besides, they have been randomly distributed along SO,5 control loop and consequently, it has to follow a NARX
the whole year following a uniform distribution. The input principle. This input corresponds to the previously computed
and output measurements stated before have been gathered internal recycle flow (Qa (t − 1)).
after performing the simulation of the default control strategy All of this entails that the new LSTM-based PI devoted to
already implemented in the same benchmark. However, the controlling the SN O,2 concentration will be the same as the
SO,5 has been arbitrarily changed from a constant set-point one shown in Fig. 3 with the exception of the Normalisation
to a variable one showing changes between 0 mg/L and and Denormalisation stages. They have to be adapted to the
10 mg/L every hour. These changes are introduced in order new inputs and outputs since they show different dynamics
to assure that the complete dynamic of the process under with respect to the components involved in the SO,5 and the
control is captured in the input / output pairs of data. From SN O,2 control loops [4]. For instance, Qa ∈ [0, 1 · 105 ] and
the whole dataset, a 85% of data have been considered in the KLa,5 ∈ [0, 360] while SN O,2 ∈ [0, 20] and SO,5 ∈ [0, 10].
LSTM training process whilst the remaining 15% have been What it is exactly maintained in this transfer learning approach
considered for testing purposes. is the LSTM cell as such. It has been neither unaltered,
The structure of the LSTM cell has been obtained after nor retrained. Therefore, its learnable weights and biases as
performing a grid search where the best performance is given well as its hyperparameters are exactly the same. Thus, what
by a LSTM cell with 100 hidden neurons per gate. Finally, the we are really transferring between control loops are these
hyper-parameters of the cell have been fine-tuned adopting LSTM parameters. In that sense, the efforts in the control
a learning rate equal to 1 · 10−3 and the Adam optimiser design process have been mainly focused in designing and

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
Fig. 4. Transferring the knowledge of the LSTM-based PI. Notice that the coloured Normalisation and Denormalisation stages are the ones which have to
be modified accordingly to the new input and output data.

training the LSTM to become the SO,5 controller. Once it is penalises more the larger ones. On the other hand, M AE will
implemented and trained, it can be transferred to any other give a wider vision of the errors since it equally penalises the
WWTP control loop without investing too much effort. The errors indistinctively of their magnitude. M AP E is considered
only thing that has to be taken into account is the adaptation to complement the RM SE and the M AE. It corresponds to
of the normalisation and denormalisation stages accordingly a relative metric, i.e., it measures how big or small are the
to the new inputs and outputs. As a summary, we have only errors with respect to the target values. Finally, the R2 has
transferred the knowledge from a control loop to another one been considered to show the correlation between the predicted
(see Fig. 4). However, this will make more sense at industrial and the target KLa,5 measurements. Notice that RM SE,
scenarios plenty of control loops, where the design complexity M AE and R2 are computed with normalised measurements
can be exponentially reduced. towards zero mean and unit variance. M AP E is computed
with denormalised measurements to avoid divisions by zero.
IV. R ESULTS Results show that the LSTM-based PI structure is able to
A. LSTM Performance perform good enough predictions of KLa,5 since it is able to
yield low RM SE and M AE values around 0.026 and 0.016,
Before applying the LSTM as the main core of the LSTM-
respectively. M AP E equals to 1.133% which shows that the
based PI controller, it has to be trained to assure that it is
deviation of LSTM predictions with respect to target values
able to match the inputs with the desired outputs. The LSTM
is very small. This entail that the control performance of the
adopted in the LSTM-based PI has been trained to predict
different control loops being managed by the LSTM-based PI
the actuation signal, the KLa,5 , of the SO,5 control loop as a
will be at least equal to the default PI. The prediction task of
function of the measured SO,5 and the considered set-point.
the LSTM-based PI can be observed in Fig. 6.
The performance will be measured in terms of the Root
Mean Squared Error (RM SE), the Mean Average Error B. Control Performance
(M AE), the Mean Average Percentage Error (M AP E), and The control performance has been computed by means of
the determination coefficient (R2 ) [20]. RM SE and M AE two different tests: (i) when only the SO,5 control loop is
will measure how accurate are the errors between the predicted
KLa,5 values and the target ones (see Fig. 5). RM SE will tell
us the topology of prediction errors we are obtaining since it

Fig. 5. Structure to obtain KLa,5predicted and KLa,5target . Fig. 6. KLa,5 prediction performance.

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
TABLE I
R ESULTS OF THE CONTROL PERFORMANCE - SO,5 CONTROL LOOP

PI and LSTM-based PI Performance - SO,5 control loop


Fix Set-point
Dry Weather Rainy Weather Stormy Weather
Structure IAE ISE IAE ISE IAE ISE
PI 0.1152 0.0041 0.0875 0.0022 0.1094 0.0035
LSTM-based PI 0.0064 1.4301 · 10−5 0.0053 9.3171 · 10−6 0.0063 1.2352 · 10−5
Improvement [%] 94.44 99.65 93.82 99.58 94.24 99.65
Variable Set-point
Dry Weather Rainy Weather Stormy Weather
Structure IAE ISE IAE ISE IAE ISE
PI 0.1855 0.0163 0.1545 0.0141 0.2055 0.0186
LSTM-based PI 0.0121 1.7070 · 10−4 0.0127 2.7824 · 10−4 0.0152 2.7400 · 10−4
Improvement [%] 93.48 98.95 92.78 98.03 92.60 98.53

being managed by the LSTM-based PI, and (ii) when the SO,5 Results of the first test are shown in Table I, where the IAE
and SN O,2 control loops are controlled by the LSTM-based and ISE metrics are computed when only the SO,5 concentra-
PI and its transferred version, respectively. The performance tion is being managed by the LSTM-based PI controller. At
of the default WWTP control loops (PI controller) has been first sight it is clearly observed that the control performance
also considered as a baseline performance for comparison is highly improved in all cases when the LSTM-based PI is
purposes. In both tests, the three influent profiles, dry, rainy considered. The IAE and ISE metrics are improved for all the
and stormy weathers, have been used to compute the whole cases around a 93.56% and a 99.07% in average, respectively.
control performance. Besides, two type of set-points have been These improvements are achieved due to the training process
adopted, a fixed set-point and a variable one. In terms of the and the sliding window considered in the new ANN-based
fix set-point, the default values are considered, i.e., set-points controller. Now, the LSTM-based PI has learned how to correct
of 2 mg/L and 1 mg/L for the SO,5 and SN O,2 control loops, small changes and variations like the ones observed in Fig. 7.
respectively [4]. When talking about the variable set-point, the Focusing on the fix-set point results, we can observe that
Fuzzy Controller designed and implemented in [14] has been the highest improvement is achieved when the dry weather
considered. It is devoted to determining the SO,5 set-point as a condition is considered. This makes sense since the dry
function of the ammonium of the fifth reactor tank (SN H,5 ) in weather is the most common weather observed in the training
order to achieve the reduction of either the WWTP operational data. Remember that stormy and rainy conditions consist on
costs, or the effluent quality. In such a context, in this work dry weather conditions showing some storm and rain events
the minimum and maximum input and output values of the during a short lapse of time. The lowest IAE now equals to
Fuzzy Controller have been set to obtain the lowest WWTP 0.0064 and the lowest ISE to 1.4301 · 10−5 .
operational costs without increasing the effluent quality, i.e., In terms of the variable set-point, one can observe that now
without increasing the pollutants present in the output of the the IAE and ISE metrics are slightly increased with respect to
WWTP [14]. These values have also been set accordingly to the fix set-point ones, being the IAE the metric suffering more
the simulated weather profiles. the change of set-point topology. This is motivated by the fact
The metrics considered to evaluate the control performance that the changes in the SO,5 set-point, which are proposed by
are the Integrated Absolute Error (IAE) and the Integrated a Fuzzy Controller, are abruptly performed. In that sense, the
Squared Error (ISE). The former will evaluate the evolution highest IAE improvement is achieved when the LSTM-based
of the errors committed by the controllers penalising them PI is adopted with dry weather conditions (see Fig. 7, notice
indistinctly. The latter will penalise more the large errors that the given set-point is nearly overlapped by the output of
than the lower ones. The amount of time considered in the the LSTM-based PI). Now the IAE changes from 0.1855 to
evaluation of the control performance equals to the last 7 days 0.0121, showing that the LSTM-based PI is able to largely
out of the 14 days being simulated in the BSM1 framework. reduce the IAE values yielded by the default PI. The same is
In that sense, IAE and ISE are computed as follows: observed in terms of the ISE values, however, the improvement
Z t=14 days is reduced 1.12 percentage points in average. As a summary,
IAE =

r(t) − y(t) dt (7) the LSTM-based PI managing the SO,5 control loop is able
t=7 days to show a better control performance than the default PI.
Z t=14 days 2 Therefore, this motivates us to transfer its knowledge into
IAE = r(t) − y(t) dt (8) a different control loop in order to determine if designing a
t=7 days unique data-based controller showing such a good performance
where r(t) refers to the considered set-point and y(t) to is enough to implement all the other control loops (remember
the measured concentration of the variables involved in the that at this point, the unique control loop being managed by
different control loops, i.e., the SO,5 or the SN O,2 . the LSTM-based PI corresponds to the SO,5 one).

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
TABLE II
R ESULTS OF THE CONTROL PERFORMANCE - SO,5 AND SN O,2 CONTROL LOOPS

PI and LSTM-based PI Performance - SO,5 and SN O,2 control loops


Fix Set-point
Dry Weather Rainy Weather Stormy Weather
Structure IAE ISE IAE ISE IAE ISE
PI - SO,5 0.1152 0.0041 0.0875 0.0022 0.1094 0.0035
LSTM-based PI - SO,5 0.0071 1.6486 · 10−5 0.0058 9.3261 · 10−6 0.0069 1.3762 · 10−5
PI - SN O,2 1.8401 0.9167 2.5850 1.5182 2.2525 1.2914
LSTM-based PI - SN O,2 1.6153 0.7190 2.3529 1.2903 1.9744 1.0342
Variable Set-point
Dry Weather Rainy Weather Stormy Weather
Structure IAE ISE IAE ISE IAE ISE
PI - SO,5 0.1855 0.0163 0.1545 0.0141 0.2055 0.0186
LSTM-based PI - SO,5 0.0121 1.7070 · 10−4 0.0127 2.7824 · 10−4 0.0152 2.7400 · 10−4
PI - SN O,2 1.7922 0.8577 2.1320 1.0895 1.8842 0.9899
LSTM-based PI - SN O,2 1.6642 0.7774 1.9598 0.9511 1.7237 0.8587

the SN O,2 fix set-point is considered. When a variable set-


point is adopted, the IAE and ISE improvements are reduced
until a 7.91% and a 11.77%, respectively. Focusing on the
variable set-point results, one can observe that the best SN O,2
control performance is offered again by the transferred LSTM-
based PI, which is able to offer a minimum IAE and ISE equal
to 1.6642 and 0.7774, both when the dry weather influent is
considered. Notwithstanding, the rainy and stormy IAE and
ISE values do not differ too much from the dry ones: the IAE
and ISE are increased from 1.6642 and 0.7774 to 1.9598 and
0.9511, respectively, when the rainy weather is adopted. When
the stormy influent is considered, the IAE and ISE values
are increased until a 1.7237 and 0.8587, respectively. Finally,
one can observe in Fig. 8 that neither the default SN O,2 PI
controller, nor the proposed LSTM-based PI are able to follow
the 1 mg/L SN O,2 set-point. However, the transferred LSTM-
based PI is able to reduce the mismatch between the measured
SN O,2 concentration and the desired set-point. This shows
Fig. 7. SO,5 control performance offered by the default PI and the LSTM- that transferring the control knowledge without retraining the
based PI.
ANNs can be considered when the dynamics of the control
In such a context, the default PI controlling the SN O,2 has loops are different at expense of reducing the improvement.
been substituted by the transferred version of the LSTM-based
PI where only the normalising and denormalising stages have
been adapted to the new scenario. Results are shown in Table
II, where the control performance offered by the LSTM-based
PI as the SO,5 controller and its transferred version as the
controller of the SN O,2 control loop are observed. At first
sight, we can observe that the control performance in the SO,5
control loop is slightly degraded 0.43 percentage points, from
a 93.56% to a 93.13%, and 0.02 percentage points, from a
99.07% to a 99.05%, in terms of the IAE and ISE, respectively.
This effect is motivated by the changes performed in the SN O,2
loop, where the PI has been substituted by the transferred
version of the LSTM-based PI, therefore, the outputs of the
controller will differ from the default version. At this point is
where we can observe the power of transferring the knowledge
of the LSTM-based PI controlled managing the SO,5 into the
SN O,2 control loop. The SN O,2 IAE and ISE metrics are
improved around a 11.18% and a 18.83%, respectively, when Fig. 8. SN O,2 control performance offered by the default PI and the
transferred LSTM-based PI.

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.
Finally, results show that data-driven controllers are able R EFERENCES
to perform control tasks at the same time they are able to [1] M. Wollschlaeger, T. Sauter, and J. Jasperneite, “The future of industrial
even improve the default and classical PI controllers. However, communication: Automation networks in the era of the internet of things
the most important points are that the proposed LSTM-based and industry 4.0,” IEEE Ind. Electron. M., vol. 11, no. 1, pp. 17–27,
2017.
PI controller and the concept of transferring its knowledge [2] K. Ogata, Modern control engineering. Prentice hall: New Jersey, USA,
allows us to: (i) simplify a lot the control design process since 2010.
we have to design only a controller; (ii) reduce the required [3] M. Munir, S. A. Siddiqui, A. Dengel, and S. Ahmed, “DeepAnT: A deep
learning approach for unsupervised anomaly detection in time series,”
knowledge of the plant being controlled since this information IEEE Access, vol. 7, pp. 1991–2005, 2018.
is intrinsically present in the data adopted to train the LSTM [4] J. Alex, L. Benedetti, J. Copp, K.-V. Gernaey, U. Jeppsson, I. Nopens,
cell; and (iii) we are able to largely improve the control M.-N. Pons, L. Rieger, C. Rosen, J.-P. Steyer, and P. Vanrolleghem,
“Benchmark simulation model no. 1 (BSM1),” Department of Industrial
performance of the control loop for which the LSTM-based Electrical Engineering and Automation, Lund University, Tech. Rep.,
PI is designed at the same time we are slightly improving 2008.
the control loop where this controller is transferred. Again, [5] I. Santin, C. Pedret, and R. Vilanova, “Fuzzy control and model predic-
tive control configurations for effluent violations removal in wastewater
this improvement will be even larger in those cases where treatment plants,” Ind. Eng. Chem. Res., vol. 54, no. 10, pp. 2763–2775,
the industrial plant requires a huge number of PIs: training 2015.
a unique LSTM-based PI and transferring it into the other [6] J.-F. Qiao, Y. Hou, L. Zhang, and H.-G. Han, “Adaptive fuzzy neural
network control of wastewater treatment process with multiobjective
control loops will simplify the control design task at the same operation,” Neurocomputing, vol. 275, pp. 383–393, 2018.
time that the default control performance is at least achieved. [7] I. Pisa, A. Morell, J. L. Vicario, and R. Vilanova, “Denoising Au-
toencoders and LSTM-Based Artificial Neural Networks Data Process-
ing for Its Application to Internal Model Control in Industrial Envi-
V. C ONCLUSIONS ronments—The Wastewater Treatment Plant Control Case,” Sensors,
vol. 20, no. 13, p. 3743, 2020.
In this work, we have proposed the application of transfer [8] I. Santı́n, M. Barbu, C. Pedret, and R. Vilanova, “Dissolved Oxygen
Control in Biological Wastewater Treatments with Non-Ideal Sensors
learning approaches to design and implement the control and Actuators,” Ind. Eng. Chem. Res., vol. 58, no. 45, pp. 20 639–20 654,
strategies of an industrial scenario. The main contributions 2019.
presented here are not directly related to the control strategy [9] A. Rani, V. Singh, and J. Gupta, “Development of soft sensor for neural
network based control of distillation column,” ISA T., vol. 52, no. 3, pp.
itself, but to its design and deployment. Instead of designing a 438–449, 2013.
controller per control loop, we will design a unique data-based [10] F. A. Souza, R. Araújo, and J. Mendes, “Review of soft sensor methods
controller and then we will transfer its knowledge into the rest for regression applications,” Chemom. Intell. Lab. Syst., vol. 152, pp.
69–79, 2016.
of control loops present in the industrial scenario. [11] F. Curreri, L. Patanè, and M. G. Xibilia, “RNN-and LSTM-Based Soft
In this case, we have designed a data-based control strategy Sensors Transferability for an Industrial Process,” Sensors, vol. 21, no. 3,
to substitute the conventional PI controller managing the SO,5 p. 823, 2021.
[12] M. Henze, W. Gujer, T. Mino, and M. C. van Loosdrecht, Activated
control loop of a WWTP facility. The controller has been im- sludge models ASM1, ASM2, ASM2d and ASM3. IWA Publishing,
plemented by means of a LSTM cell structure which is able to 2000.
model the input and output relationships of a conventional PI [13] J. B. Copp, The cost simulation benchmark: Description and Simulator
Manual (cost action 624 and action 682). Office for Official Publica-
controller. In that sense, results have shown that this new data- tions of the European Union: Luxembourg, 2002.
based control is not only able to replicate the PI behaviour, [14] I. Santı́n, C. Pedret, and R. Vilanova, “Applying variable dissolved
but also to improve it. In that sense, the IAE and ISE metrics oxygen set point in a two level hierarchical control structure to a
wastewater treatment process,” J. Process Contr., vol. 28, pp. 40–55,
have been improved in average a 93.56% and a 99.07%, 2015.
respectively. The main point is that the controller is able to [15] I. Nopens, L. Benedetti, U. Jeppsson, M.-N. Pons, J. Alex, J. B.
offer this such a good control performance indistinctively of Copp, K. V. Gernaey, C. Rosen, J.-P. Steyer, and P. A. Vanrolleghem,
“Benchmark Simulation Model No 2: finalisation of plant layout and
the weather condition and the set-point topology. default control strategy,” Water Sci. Technol., vol. 62, no. 9, pp. 1967–
Moreover, the knowledge of this data-based controller has 1974, 2010.
been transferred into the other control loops to decrease the [16] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press
Cambridge, 2016, vol. 1.
control design complexity at the same time that the imple- [17] Z. Boussaada, O. Curea, A. Remaci, H. Camblong, and N. Mrabet Bel-
mentation of the control strategies is speed up. In that sense, laaj, “A nonlinear autoregressive exogenous (NARX) neural network
designing and transferring the knowledge of a unique data- model for the prediction of the daily direct solar radiation,” Energies,
vol. 11, no. 3, p. 620, 2018.
based controller will allow us to obtain at least the same [18] I. Pisa, A. Morell, R. Vilanova, and J. L. Vicario, “Noisy Signals
control performance as in the case where the default PI control in Wastewater Treatment Plants data-driven control: Spectral Analysis
strategies are adopted. Results corroborate this since they have approach for the design of ANN-IMC controllers,” in 2020 IEEE
Conference on Industrial Cyberphysical Systems (ICPS), vol. 1. IEEE,
shown that the WWTP control performance is also improved 2020, pp. 320–325.
when the previous data-based controller is transferred into [19] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,”
the SN O,2 control loop. The transferred controller is able to arXiv preprint arXiv:1412.6980, 2014.
[20] M. D.S. and A. K. Thalla, “Artificial intelligence models for predicting
show an average improvement of the IAE and ISE around a the performance of biological wastewater treatment plant in the removal
9.55% and 15.25%, respectively, when it is compared to the of Kjeldahl Nitrogen from wastewater,” Appl. Water Sci., vol. 7, no. 7,
traditional PI option even though it has not been designed to pp. 3783–3791, 2017.
manage the SN O,2 concentration.

Authorized licensed use limited to: Indian Institute of Technology Hyderabad. Downloaded on June 11,2023 at 14:24:31 UTC from IEEE Xplore. Restrictions apply.

You might also like