Learning-Based Tuning of Supervisory Model Predictive Control for Drinking Water Networks J.M. Grosso∗ , C. Ocampo-Martínez, V. Puig Institut de Robòtica i Informàtica Industrial (CSIC-UPC). Llorens i Artigas 4-6, 08028. Barcelona, Spain. Abstract This paper presents a constrained Model Predictive Control (MPC) strategy enriched with soft-control techniques as neural networks and fuzzy logic, to incorporate self-tuning capabilities and reliability aspects for the management of drinking water networks (DWNs). The control system architecture consists in a multilayer controller with three hierarchical layers: learning and planning layer, supervision and adaptation layer, and feedback control layer. Results of applying the proposed approach to the Barcelona DWN show that the quasi-explicit nature of the proposed adaptive predictive controller leads to improve the computational time, especially when the complexity of the problem structure can vary while tuning the receding horizons. Keywords: model predictive control, neural networks, fuzzy logic, self-tuning, reliability, drinking water networks, multilayer controller. 1. Introduction Drinking Water Networks (DWNs) are large-scale multi-source/multi-node flow systems which must be reliable and resilient while being subject to constraints and to continuously varying conditions with both deterministic and probabilistic nature. Optimal management of these systems is a complex task and has become an increasingly environmental and socio-economic research subject worldwide (Biscos et al., 2003; Cembrano et al., 2011; El Mouatasim et al., 2012; Pascual et al., 2011; Vieira et al., 2011), with special attention to efficient handling of energetic and natural resources in dense urban areas. Model Predictive Control (MPC) is becoming a strong approach to deal with these challenging multi-criteria problems of supply-chain dynamic systems, see, e.g., Aggelogiannaki et al. (2008); Alessandri et al. (2011); Perea-Lopez et al. (2003). The MPC framework is usually preferred among advanced control techniques because it incorporates performance indices and it is able to cope with constraints and modelling errors in an explicit way (Qin and Badgwell, 2003; Tatjewski, 2007). Nevertheless, the ever growing complexity of networked systems (i.e., dimensionality, information structure constraints, non-linearities, uncertainty) and the higher performance requirements turn these kind of problems costly to solve for real-time control applications as in transport water networks, where current MPC algorithms are not prepared enough to face the important computational burden when design parameters (i.e., set-points, bounds, prediction and control horizons, tuning weights, and system topology size) have to be continually redefined. The tuning task of MPC controllers has been widely investigated and general guidelines are available in the literature (Garriga and Soroush, 2010; Schwartz and Rivera, 2006; Shah and Engell, 2011; Toro et al., 2011; Wojsznis et al., 2003). Some methods propose heuristics while others are based on stability criteria, closed-loop frequencydomain analysis, optimisation-based algorithms, genetic programming, on-line process identification, among others. The general approach in tuning procedures is to fix MPC parameters off-line for all the system operation but this fact could lead to decrease the system performance due to manoeuvrability reduction. Other methods generate the complete Pareto frontier and select the best solution according to an extra criterion, but this approach is computationally Email address: [email protected] (J.M. Grosso∗ ) Preprint submitted to Engineering Applications of Artificial Intelligence March 7, 2013 prohibitive in fast dynamic or large-scale systems. Therefore, implementation of adaptive structures and tractable on-line tuning procedures are necessary to assure economic efficiency and safety of complex multi-variable systems as DWNs. In order to face the aforementioned design issues, MPC algorithms have been extended or replaced with softcomputing techniques in different control architectures (Tatjewski and Ławryńczuk, 2006). Most of these approaches are intended to improve performance by using expert-guidance or iterated experiments in order to simplify models of non-linear systems or to approximate and generalise by learning-based techniques the solution of optimal controllers (Åkesson and Toivonen, 2006; Ali, 2003; Aswani et al., 2012; Parisini and Zoppoli, 1995; Valera García et al., 2012). Intelligent control systems are able to replicate aggressive manoeuvres while performing adaptation, function approximation, knowledge modelling and massive parallel processing. Nevertheless, the main drawback of replacing MPC controllers with predictive soft-controllers is that they may not guarantee safety, stability or robustness due the lack of feedback correction mechanisms to face disturbances so the performance is subject to the limited scenarios used in the learning process. The main contribution of this paper is the synergy of artificial intelligence, supply chain theory and automatic control to devise an adaptive and robust MPC controller for the management of DWNs. Here, a Learning-based Supervisory MPC (LB-MPC) controller with a hierarchical multilayer structure is proposed, where soft-computing techniques (i.e., neural networks and fuzzy logic) are used not to approximate an MPC controller but to tune its design parameters on-line by learning expectation of performance. In contrast to general tuning approaches, the LB-MPC presented in this paper not only adapts the weights of the multi-objective optimisation problem that takes place within the MPC but also the prediction horizon according to the current situation of the plant. Furthermore, operational output constraints are dynamic and governed according to the non-stationary uncertainty of the DWN disturbances to assure service reliability while optimising economic resources. The proposed control scheme is a quasi-explicit MPC with less on-line computational burden, because most of the heavy computations are converted into non-linear explicit modules using neural networks. The benefits, i.e., flexibility and reliability, of this LB-MPC controller as a decision-support tool for the management of DWNs, are shown in this paper through a real case study: the Barcelona DWN. The paper is organised as follows. Section 2 describes a control-oriented flow-based model of DWNs. Section 3 concerns to the enhanced MPC strategy addressed in this paper. Section 4 describes the case study where the effectiveness of the proposed approach is analysed via simulations. Section 5 highlights the concluding remarks that can be drawn from the results presented in this paper as well as some future research directions. 2. Problem Statement 2.1. DWN Control Problem Let N = {1, 2, ...} be the set of natural numbers and N0 , N ∪ {0}. Consider a DWN being represented as the interconnection of n tanks, m actuators, p demands and q intersection nodes (Ocampo-Martinez et al., 2009, 2010). This system may be generally described by the following control-oriented discrete-time dynamic model for k ∈ N0 : S (x, u, d) = ( x(k + 1) = Ax(k) + Bu(k) + B p d(k), 0 = E1 u(k) + E2 d(k), (1a) (1b) where x ∈ Rn is the state vector of water stock volumes in m3 ; u ∈ Rm is the vector of manipulated flows in m3 /s ; d ∈ R p corresponds to the vector of disturbances (water demands) in m3 /s; index k represents the current time instant; A ∈ Rn×n , B ∈ Rn×m and B p ∈ Rn×p are state-space system matrices for mass balances in tanks (1a); and E1 ∈ Rq×m and E2 ∈ Rq×p are matrices for the mass balance in nodes (1b). All vectors and matrices are dictated by the network topology. Consider also that in DWNs control objectives are evaluated by the following performance indices: JE (k) , k(α1 + α2 (k))T u(k)k1 , (2a) JS (k) , kε(k)k22 , (2b) JU (k) , k∆u(k)k22 , (2c) 2 where JE represents the economic cost of network operation taking into account water production cost (α1 ) and water pumping cost (α2 ) which change every time instant according to the variable electric tariff; JS is a performance index which penalises the amount of volume ε that goes down from a safety volume value x s ; and JU represents the penalisation of control signal variations ∆u(k) , u(k) − u(k − 1) to extend actuators life and assure a smooth operation. The performance indices considered in this paper may vary or generalised, with the corresponding manipulation, to include other control objectives. Assumption 1. The states and control inputs are subject to hard constraints due physical limits in tanks and operational limits in actuators, i.e., x(k) ∈ X , {x ∈ Rn : xmin ≤ x(k) ≤ xmax }, u(k) ∈ U , {u ∈ R : umin ≤ u(k) ≤ umax }, m ∀k, ∀k. (3a) (3b) Assumption 2. For safety and service reliability, states are subject to management soft constraints x(k) ≥ x s (k) − ε(k) ≥ 0, ∀k, (4) where x s ∈ Rn is a vector of base stocks in m3 (minimal volume in each tank to avoid stock-outs) and ε , max {0, xs − x}, ε ∈ Rn , is a slack variable which represents the amount of volume that goes down from the desired base stocks. Assumption 3. Disturbances are non-stationary but follow a periodic behaviour and can be forecasted H p times ahead. The prediction error ed is known to lie in a heteroscedastic distribution D, as follows: ed (k) = [d(k) − d̃(k)] ∼ D(µ(k), σ(k)), (5) where d̃ is the vector of disturbances prediction for the time instant k, and µ and σ are vectors of the means and standard deviations of the errors, respectively. Assumption 4. The states x and disturbances d of the plant are exactly measured at each time instant k. Assumption 5. Every source can supply its underlying demand. Assumption 6. All elements operate with a common review period and storage tanks are subject to the same replenishment policy. The main goal of the operational control of water transport networks is to satisfy the demands at consumer sectors, but optimising, at the same time, management policies expressed as a multi-objective control problem. Hence, MPC is a suitable technique to control a DWN because its capability to deal efficiently with multivariable dynamic constrained systems and predict the proper actions to achieve the optimal performance according to a user-defined cost function. Moreover, the MPC design follows a systematic procedure (Maciejowski, 2002), which generates the control input signals to the plant by combining a prediction model and a Receding-Horizon (RH) strategy. Problem 1 (MPC for DWNs). Consider the system (1) at a measured condition. Given a prediction horizon H p ∈ N, and the control objectives in (2) aggregated in a performance index J : RnH p ×m(H p −1) → R, the MPC problem for DWNs consists in solving a finite horizon optimal control problem (FHOCP) given by J ∗ , min ∗ ∗ u ,ε k+H p −1 X i=k i h k(α1 + α2 (i|k))T u(i|k)k1,We + kε(i + 1|k)k22,Wx + k∆u(i|k)k22,Wu , (6) subject to: x(i + 1|k) = Ax(i|k) + Bu(i|k) + B p d(i|k), (7) E1 u(i|k) + E2 d(i|k) = 0, xmin ≤ x(i + 1|k) ≤ xmax , (8) (9) umin ≤ u(i|k) ≤ umax , x(i + 1|k) ≥ x s (k) − ε(i + 1|k) ≥ 0, (10) (11) (x(k|k), d(k|k)) = (x(k), d(k)). (12) 3 Then, according to the RH strategy, apply only the first column vector u∗ (k|k) of the optimal sequence u ∗k (xk ) , → − h i u∗ (k|k), . . . , u∗ (k + H p − 1|k) . At the next time instant, the prediction horizon is shifted one time instant and the optimisation is restarted with new feedback measurements to compensate unmeasured disturbances and model inaccuracies. This scheme is repeated at each future time instant. Remark 1. Despite the intuitive formulation of the RH strategy, on-line tuning of an MPC controller is not trivial or systematic. The MPC tuning parameters for the given cost function usually are prediction horizon H p and weighting matrices We , W x , Wu . This paper also addresses the adaptation of the relaxed boundary x s according to time-variant disturbances. ♦ 2.2. Safety Volumes and Service Reliability Problem There is the need to guarantee a safety water stock in each tank of the network in order to decrease the probability of shortages (when a tank or a node has not sufficient water to satisfy external demands or the transfer request coming from other tank/node) due to uncertain events. To determine the amount of safety water stocks, an inventory planning strategy is addressed here to enrich previous control approaches (Pascual et al., 2011; Toro et al., 2011) with replenishment policies. The goal is to dynamically allocate the minimal volume in each storage unit to avoid stock-outs for a given period of time. Problem 2 (Safety risk and base-stocks). Consider the system (1) with initial condition x(k) = x0 and take into account stochastic disturbances d̃ with a given forecast error probabilistic distribution N(µ(k), σ2 (k)) and a leadtime vector τ(k) ∈ Rn (the time from the moment a supply requirement is placed to the moment it is received). The safety risk problem consists in finding the minimal base-stock vector x s (k) that assures a given customer service level, named γ, for any predicted demand in a short horizon of N time instants ahead. Inventory management for supply chains literature, even in multi-stage multi-echelon schemes, suppose a hierarchical and descendant flow of products, in a way that predicted safety stock changes are easily communicated backwards in order for supporting availability of quantities when they are needed (Kanet et al., 2010), but this behaviour is not true in real large-scale supply networks (i.e., the Barcelona DWN), because a meshed topology with multi-directional flows between tanks and nodes prevails instead of spread tree configurations. To circumvent the aforementioned difficulty, an optimal inventory planning is developed here to dynamically allocate proper amounts of water in the tanks and avoid stock-outs. The planning is based on an economic linear programming (LP) problem that estimates, in each time instant k, future flows û s (k) , [û s (k|k), . . . , û s (k + N − 1|k)] → − over a short-term prediction of demand variance, as follows: û (k) = arg min u → −s k+N−1 X JE (i|k), (13) i=k subject to (7), (8), (9), (10) and (12). The resultant sequence of estimated flows û s (k), allows to virtually decouple the interconnections between tanks → − and estimate their net demand d̂net , and mean forecast demand d̂avg , for a short horizon N ≤ H p , N ∈ N, as follows: d̂net (i|k) = |Bout û s (i|k) + B p d̂(i|k)| ∀i ∈ [k : k + N − 1] , Pk+N−1 d̂net (i|k) , d̂avg (k) = i=k N−1 (14) (15) where Bout û s (i|k) represents the estimated endogenous demands, i.e., the outflow of the tanks caused by water requirements from neighbouring tanks or nodes, and B p d̂(i|k) the estimated exogenous demands for a given time instant. Even if the net demand is predicted with a strong confidence level in a short horizon, it is required to store safety stocks s(k) ∈ Rn in m3 to face uncertainties. The amount of safety volumes is related with the stochastic nature of demands and lead-times, and also with the goodness of the forecasting method. Hence, s(k) is given by s(k) = Φ−1 (γ)σ(k), 4 (16) where Φ−1 (·) is the inverse cumulative normal distribution, γ ∈ (0, 100]% is the desired customer service level (percentage of customers that do not experience a stock-out) and σ(k) , [σ1 (k), . . . , q σn (k)]T ∈ Rn is the vector of total forecast deviations, where each tank forecast deviation is given by σ j (k) , σ2d, j (k)τ j (k) + σ2τ, j (k)d̂avg, j (k), ∀ j ∈ [1, . . . , n], taking into account the sample standard deviation σd, j of the net demands, and the sample standard deviation στ, j of the lead-times error. Finally, the vector x s (k) ∈ Rn of water base-stocks in m3 is computed as follows to solve Problem 2: x s, j (k) = τ j (k)d̂avg, j (k) + s j (k), ∀ j ∈ [1, . . . , n] , x s (k) , x s,1 (k), . . . , x s,n (k) T . (17) (18) The value of x s (k) is re-computed at each time instant before the MPC algorithm is executed and, as stated in Assumption 2, it is introduced in (11) to lead the tank states to be greater than such base stocks (when possible) and let the system employ safety volumes s(k) to face uncertainties (when needed) but penalising the used amount of safety. Remark 2. This strategy deals specifically with tank reliability (assuming its faulty behaviour as the inability to satisfy its own demands), which is affected by both the capacity and reliability of the system supplying it. If the supply capacity is less than the average demand, no tank will be large enough to provide a sustained service. ♦ 3. Learning-based Tuning and Supervisory MPC for DWN In order to achieve a flexible and reliable controller as a decision-support tool for the management of DWNs, a learning-based tuning approach and a supervisory MPC (LB-MPC) with adaptive capabilities and less on-line computational burden is proposed in this section. LB-MPC is a quasi-explicit controller that combines the advantages of conventional MPC with those of knowledge-based soft-control. 3.1. Control System Structure The control strategy addressed in this paper is based on a multilayer (hierarchical) control system structure. The hierarchical architecture has been used in process control with satisfactory results optimising economic profits when disturbances are slowly varying (Tatjewski, 2007). In DWNs, these disturbances follow a pattern in an daily basis and can be well predicted for an hourly sampling time, which makes the hierarchical structure suitable to optimise targets for the policies of the direct control level. The proposed controller is based on a three-layer structure (see Fig. 1). First, a Learning and Planning layer (LPL) executes strategic and on-line determination of the dynamic safety constraints, economic references and demand forecasting by training artificial neural networks (ANNs). Secondly, a Supervision and Adaptation layer (SAL) implements a fuzzy rule-based inference system (FIS) to continually adjust the parameters of the MPC, which computes, through the receding horizon approach, the optimal control policy according to the current status of the plant. Finally, a Basic Feedback Control layer (BFCL), commonly based on PID controllers or direct MPCs, is responsible for real-time operation of the system and has direct access to manipulated variables. The BFCL is not addressed in this paper because it is assumed that the design problem of each local regulatory controller is already solved by the operators of the DWN. Hence, as a common practice in the design of hierarchical controllers, perfect reference tracking of the control loops at the lower layer is assumed in this paper. 3.2. Learning and Planning Layer Classical hierarchical MPC structures exhibit a high computational burden when set-point optimisation, governing of constraints and forecasting of disturbances are required to be executed at the same frequency that the control problem is solved. Sequential optimisations are often required for the planning of actions in top layers but many parameters and non-linear operations cause these tasks to be intractable for on-line tuning of controllers, specially in large-scale systems as DWNs. Therefore, this paper proposes a planning layer that uses ANNs in order to reduce the computational burden of optimisation-based approaches. ANNs have a remarkable ability to derive meaning from complicated or imprecise data and can be employed to extract patterns and detect trends that are too complex to be noticed by other computer techniques. Specifically, this 5 General Management Policies Prices S erviceLevel Constraints Priorities J Weather conditions (Temperature, humidity) Learning and Planning (Neural-Networks based) d̃, x̃e , x̃ s x, J Knowledge base (rules, fuzzy-sets) Supervision & Adaptation (Fuzzy-tuned MPC) u∗ x Basic Feedback Control u Disturbance (Real demand) y d Plant Fig. 1: Multilayer hierarchical intelligent control architecture Input wh11 z1 Output Hidden nh1 Σ b fh yh1 o w b 11 bh1 b b 1 z2 1 b nhj zi b zN b Σ fh yhj b b 1 1 whNS nhs Σ b 1 h fh yhs b woS L bhs nok yo1 fo yok bok noL Σ b fo bo1 Σ bhj b no1 Σ fo yoL boL 1 yh = f (Wh + bh ) yo = f o (Wo yh + bo ) Fig. 2: Feed-forward Neural Network diagram paper uses multi-layer perceptron (MLP) neural models, which as proved in Cybenko (1989) and Funahashi (1989), can represent continuous functions to any degree of accuracy, with at least one hidden layer, provided that the number of neural units is sufficiently large. MLP is considered a universal approximator and has been efficiently used on-line predictive control due to its natural capability for storing and generalising experience-based knowledge, (Fukuda and Shibata, 1992; Ławryńczuk, 2007; Parisini and Zoppoli, 1995). A basic MLP consists in one input layer, one or more hidden layers with several active neurons, and one output layer (see Fig. 2). Learning is a process through which free parameters (i.e., synaptic weights whj , wok and bias levels bhj , bok ) of an ANN are adapted through a continuous process of stimulation by the environment in which the network is embedded. In this paper, three MLPs supervised training structures (see Fig. 3) with one hidden layer are devised in order to forecast water demands and to plan future base-stocks and optimal economic references. Tan-sigmoid and linear activation functions are used for the hidden and the output layers, respectively, following the results presented in Yonaba et al. (2010). The training patterns (i.e., 8640) used in each ANN is divided randomly with a ratio of 60%, 20% and 20%, to form training, validation and testing sets, respectively. Networks with different number of active neurons have been trained off-line in order to find the one with the smallest test data cost. The training of the ANNs is done with the Gauss-Newton approximation to Bayesian regularisation (GNBR) algorithm developed in Dan Foresee 6 d(k) T (k) + d̃(k) − NND RH(k) ed (k) BP JE t(k) d(k) NNE b x̃e (k) − + xe (k) DWN αk X, U Economic MPC u(k) ee (k) BP k+H p d̃k b γ x̃ s (k) − NNS BP b d̃(k) − + ed (k) + x s (k) τ JE D Base Stocks u(k) αk X, U Economic MPC e s (k) DB e0:k d k+H p d̃k d(k) Fig. 3: ANNs training diagrams for Demand Forecasting (top), Economic trajectory (middle) and Base-stocks setting (bottom) and Hagan (1997), which avoids overfitting and improve the generalisation ability of the neural models. This training method performs the Bayesian regularisation employing the Levenberg-Marquardt back-propagation algorithm; it ensures the ANNs provide accurate output values for inputs not represented in the calibration set of the neural network and imposes constraints to get smaller weights and a smoother network. 3.2.1. ANN for Demand Forecasting This module focuses on the problem of water demand forecasting for real-time operation of the DWN. An hourly consumption data analysis is proposed here for training an MLP (see Fig. 3 top) with 100 neurons in the hidden layer. The inputs to the neural model are chosen based on literature review (Babel and Shinde, 2011) and correlation analysis, considering consumption data and meteorological variables such as temperature T and air relative humidity RH. Principal component analysis (PCA) preprocessing is applied to the training patterns in order to reduce the dimension of the input vectors and to obtain uncorrelated values that facilitate the learning process. 3.2.2. ANN for Optimal Economic Trajectory The optimal economic trajectory of water volume in each tank is the one obtained considering only the objective (2a) in Problem 1 related to a DWN, solving an LP constrained optimisation problem on-line. With the intention to reduce computational effort, an MLP with 50 neurons in the hidden layer is trained off-line to emulate the economic MPC controller. A non-linear explicit model of the optimal operation of the network is obtained to compute the economic trajectory x̃e , taking into account the hourly electric tariff α2 and the measured demands d as inputs (see Fig. 3 middle). 3.2.3. ANN for Dynamical Safety Volumes An MLP with 50 neurons in the hidden layer is trained with input-output patterns that are generated using historical records of demand forecasting errors as inputs, while using safety inventories as outputs. These targets have been calculated for a service level γ = 95% and a lead-time τ = 4h, by the stock management methodology shown in Subsection 2.2. The goal with this neural modelling is to avoid on-line optimisations which are required to virtually decouple the tanks for the calculation of the safety stock vector in (18), and to use the non-linear explicit model of the trained MLP to dynamically set the safe base-stock vector x̃ s (see Fig. 3 bottom). 7 Knowledge Base Fuzzification Rules-based Inference Defuzzification R1 (ēE , ēS ) R2 (ēE , ēS ) Rr (ēE , ēS ) ēE , e¯S Linking Heuristic H p , We , W x , Wu Fig. 4: Fuzzy rules-based MPC tuner diagram Remark 3. The number of hidden layers and neuron units depend upon the complexity of the problem and the available computational resources, i.e., both are design parameters. ♦ Remark 4. Neural models may not adapt to all characteristics of the environment, specially when there are uncertainties and no feedback correction mechanisms. The performance of ANNs in any application will be as good as the scenarios and the quality of the training data set are. This lack of guarantees is the reason why this paper enhances a constrained MPC with neuro-learning for tuning purposes instead of implementing a pure neuro-control. ♦ 3.3. Supervision and Adaptation Layer Self-tuning on-line algorithms for MPC of large-scale flow networks is not a widely reported topic in literature. Most of the tuning strategies for the inherent multi-objective optimisation problems take into account the exploration of the complete Pareto front to choose a non-dominated solution in line with the management objectives. The aim behind the Pareto frontier applied to MPC of a DWN is to find a direct relation between the weights of the solution points and the water demands taking d periodic (Toro et al., 2011). To reduce computational complexity of common approaches, this paper presents an adaptation scheme, similar to the one in Ali (2003), where fuzzy logic interacts with MPC by automatically adjusting the tuning parameters of the controller based on the supervision of output feedback and measured disturbances. 3.3.1. Reasoning Mechanism A knowledge-based tuner for the MPC controller is proposed here after a phase of experimentation and understanding of the effect that tuning parameters have on the controlled DWN. The tuning mechanism consists in a fuzzy inference system (FIS) that involves: (i) a fuzzyfication interface, (ii) an a priori rule basis, (iii) a defuzzyfication interface, and (iv) a linking heuristic (see Fig. 4). In this paper, the fuzzyfication phase converts the normalised crisp values of the economic state error, which is defined as ēE , |xk − x̃e |/x̃e ∈ Rn , and the safety volume state error, defined as ēS , (xk − x̃ s )/x̃ s ∈ Rn , into fuzzy values. Indeed, to each input of the supervisor it is associated ni f s input fuzzy sets labelled with ni f s linguistic input variables and described by specific Gaussian membership functions with values in the interval [0, 1]. The universe of discourse for the input ēE is: small (S ), medium (M), large (L); and for the input ēS is: large-negative (LN), mediumnegative (MN), small-negative (S M), very-small-negative (VS N), very-small-positive (VS P), small-positive (S P), medium-positive (MP), large-positive (LP). The fuzzy-logic supervisor involves expert knowledge using the Mamdani’s fuzzy inference system, which applies the set of linguistic rules presented in Table 1 to the fuzzy inputs in order to evaluate the supervisor fuzzy outputs. The inference table associates no f s output fuzzy sets (no f s linguistic output variables), described by specific trapezoidal membership functions, to the supervisor crisp output variables H̃ p , W̃e , W̃ x , W̃u ∈ Rn . The universe of discourse for output H̃ p is: small (S ), medium (M), large (L); and for the outputs W̃e , W̃ x , W̃u is: very small (VS ), small (S ), medium (M), large (L). The min-max inference method is used for the evaluation of the fuzzy rules contribution, and the gravity center method is used in the defuzzyfication phase. For a detailed explanation on fuzzy inference reasoning, the reader could refer to Wata et al. (2000). 8 Table 1: Fuzzy-logic rules for LB-MPC. Rule 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Algorithm 1 Inputs Outputs eE eS H̃ p W̃e W̃x W̃u L L L L M M M M S S S S any any any any LP MP SP VSP LP MP SP VSP LP MP SP VSP LN MN SN VSN L L L L M M M M S S S S L L L L L L M S L L M S L M M S VS VS VS VS VS VS VS S VS VS VS S VS VS VS S L L L L VS S M L VS S M L VS S M L VS VS VS VS Linking Heuristic 1: procedure LinkingHeuristic(W̃e , W̃x , W̃u , H̃ p ) 2: m := number of actuators 3: n := number of tanks 4: we ← 0m×1 5: wu ← 0m×1 6: for {i = 1 → m} do 7: if {u(i) connects node-node or tank-demand} then 8: we (i) ← 0 9: wu (i) ← 0 10: else 11: if {u(i) connects tank-tank} then 12: we (i) ← max{W̃e (tank1 ), W̃e (tank2 )} 13: wu (i) ← max{W̃u (tank1 ), W̃u (tank2 )} 14: else 15: we (i) ← W̃e 16: wu (i) ← W̃u 17: end if 18: end if 19: end for 20: We ← Rm×m diagonal matrix whose diagonal is we 21: Wu ← Rm×m diagonal matrix whose diagonal is wu 22: Wx ← Rn×n diagonal matrix whose diagonal is W̃x 23: H p ← max{H̃ p } 24: return H p , We , Wx , Wu 25: end procedure Remark 5. The fuzzy sets and the logic rules of the fuzzy inference mechanism depend on the application and the desired response of the plant. They are assigned a priori based on the experience the engineer has acquired from the system operation and also on the performance requirements. The practicing engineer may improve the performance of the controller by updating the knowledge base (i.e., logic rules and fuzzy sets). ♦ Remark 6. Outputs from the FIS are in Rn since they are computed for every tank in the network. Therefore, it is necessary to transform the results of weights W̃e and W̃u into an actuator base in Rm×m and the results for H̃ p into an integer value in N. The weight W̃ x is already related to states but have to be transformed into a diagonal matrix in Rn×n . ♦ 3.3.2. Linking Heuristic To obtain the quantitative value of the tuned parameters in the corresponding domain for the MPC problem stated in Section 2, an associative heuristic is proposed in Algorithm 1 based on the interconnection of elements in the DWN. 9 Fig. 5: Case Study: Aggregate model of the Barcelona DWN Remark 7. Most of the tuning guidelines for MPC controllers reported in literature assume weighting matrices with equal elements in the diagonal. The learning-based tuning approach presented in this paper allows to adapt on-line individual elements of the cost function weighting matrices giving more degrees of freedom to the managers of the network. ♦ 4. Simulation and Results In this section, simulation results are presented. The selected case study is, without loss of generality, an aggregate and representative version of the entire Barcelona DWN. In this aggregate model, some consumer demand sectors of the network are concentrated in a single point. Similarly, some tanks are aggregated in a single element and the respective actuators are considered as a single pumping station or valve (Ocampo-Martinez et al., 2009, 2010). The model consists of 17 tanks, 61 actuators, 25 measured demands and 11 nodes (see Fig. 5). All the simulations have considered a time period of four days (96 hours). The selected sampling time is one hour. Simulations have been TM carried out using the CPLEX solver of the TOMLABR 7.6 optimisation package, Fuzzy Logic Toolbox and Neural TM TM Network Toolbox of MatlabR R2010b (64 bits). The computer used to run the simulations is a PC IntelR Core E8600 running both cores at 3.33GHz with 8GB of RAM. 4.1. Demand Forecasting and States Planning with ANNs Table 2 shows the mean absolute percentage error (MAE%) of the ANNs described in Subsection 3.2, that were TM trained using the function trainrb included in the Neural Network Toolbox of MatlabR . The final architecture of 10 Table 2: Performance of the ANNs (MAE%) Neurons 10 20 30 40 50 60 70 80 90 100 110 ANNd 8.8299 7.1257 10.9843 7.8918 8.6294 11.2109 11.3223 7.4649 14.0614 6.6945 14.8369 ANNe 629.4652 87.2827 89.3765 1.4455 1.4098 1.4263 1.4788 − − − − ANNs 3.5512 2.0423 1.5513 1.4124 1.0376 1.0323 1.0206 − − − − each ANN was selected by comparing the performance of experiments varying the number of neurons in the hidden layer. The selected number of neurons were 100, 50 and 50 for the ANNd , ANNe , and ANN s , respectively. Forecasting of demand with the ANNd is based on water consumption and meteorological (temperature and air relative humidity) records available from AGBAR Company and from the Servei de Meteorologia de Catalunya, respectively. The results show the prediction of water demand is reliable and the magnitude of the forecasting error is not a reason to reject the obtained model. In fact, these minimal discrepancies are reflected in an increase of the safety volume. In contrast to ANNd , the ANNe for the economic optimal trajectory and the ANN s for the safety volume trajectory perform with higher accuracy as it could be expected, because both MLPs are trained with the solution of quadratic programming (QP) problems instead of experimental driven data as in the forecasting demand case. The advantage of all of the neural models used in this paper is that the time invested in processing data and training the ANNs will be gained in the on-line solving process once they are accurately validated and tested. 4.2. Fuzzy Tuning of MPC Parameters The tuning parameters of Problem 1 are the prediction horizon H p and the weights We , W x , Wu . These parameters TM were computed and adapted by the FIS described in Subsection 3.3 using the Fuzzy Logic Toolbox of MatlabR . Histograms of their values are shown in Fig. 6. These results were obtained for an unmeasured random disturbance of at most 20% of the nominal demand pattern. Remark 8. In most of the results presented in literature for control of DWNs, tuning is focused on the weighting matrices and most of the times with no adaptation schemes. Nevertheless, for large-scale systems, an efficient selection of the prediction horizon is demanded because the size and complexity of the optimisation problem is based mainly on this parameter. Therefore, this paper adapts the prediction horizon according to a trade-off between risk and economic cost. ♦ 4.3. LB-MPC Controller for DWN The proposed learning-based approach has been implemented for the tuning of a constrained MPC to operate the aggregate model of the Barcelona DWN. Results have been compared with two previous strategies. The controllers are the following ones: • MPCo: the baseline MPC approach presented in Pascual et al. (2011), which uses fixed prediction and control horizons (24h), constant safety water stocks and constant tuning weights for the prioritisation of management objectives. • MPCss: a bi-level MPC which implements analytically the dynamic optimisation of safety stocks following Section 2.2. It considers fixed horizons (24h) and fixed weights as well. 11 Hp Histogram We Histogram 80 20 Frequency 25 Frequency 100 60 40 15 10 20 0 5 0 5 10 15 Hp: Prediction Horizon 0 50 20 25 25 20 20 15 10 15 10 5 5 0 90 Wu Histogram 30 Frequency Frequency Wx Histogram 60 70 80 We: Economic Weight 5 10 15 Wx: Safety Weight 0 20 0 10 20 30 Wu: Smoothness Weight 40 Fig. 6: Histograms of tuning parameters for the LB-MPC Table 3: Key performance indicators for the different approaches Controller MPCo MPCss LB-MPC KPIE (103 ) 183.74 176.77 178.99 KPIS 28.8022 5.0295 5.2138 KPIU 0.1318 0.1340 0.1172 Time [s] 142.01 286.17 132.91 • LB-MPC: the learning-based MPC addressed in Section 3, with adaptive horizons, tuning weights and safety stocks. Table 3 shows the specific key performance indicators (KPI) used to assess the aforementioned controllers over the simulation period (96h). The indicators are defined as follows: KPIE , 96 X k(α1 + α2 (k))T u(k)k1 ∆t, (19) k=1 KPIS , 96 X 17 X εn (k), (20) k∆u(k)k2 , (21) k=1 n=1 KPIU , 96 X k=1 where KPIE is the total economic cost of the DWN operation, KPIS is the addition of all safety level violations and KPIU is the accumulated RMS of control variations. Simulations show that static MPC design parameters (safety stocks, tuning weights and prediction horizon) are a drawback for the management of DWNs, because under uncertain disturbances, the fixed value of these parameters 12 Tank # 12 4 x 10 10 x x 8 x 3 LB−MPC s,MPCo xs,MPCss 7 Volume [m ] MPCo xMPCss 9 x 6 s,LB−MPC dnet 5 xmax x 4 min 3 2 1 0 0 24 48 72 96 Time [h] Fig. 7: Dynamic variation of tanks volumes for the different approaches Economic units [e.u.] x 10 Daily Electric Costs 2.15 2.1 MPCo MPCss LB−MPC 2.05 1 2 Daily Water Costs 4 3 Economic units [e.u.] 4 2.2 3 x 10 2.5 2 1 1 4 Time [days] MPCo MPCss LB−MPC 1.5 2 3 4 Time [days] Fig. 8: Comparison of the daily electric and water costs for the different approaches might cause an undesired restriction of the solution space that degrades the economic performance, and/or increment the risk of constraint violation. In Fig. 7 it is shown the excursion of water in a tank of an important sector of the Barcelona DWN, which behaviour is representative of most storages in the DWN. It can be seen that all of the compared MPC controllers keep the volume in tank within the hard and soft constraints satisfying also the net demand along the simulation horizon but with differences in the computational burden (see Table 3) and the management of safety stocks which impacts the aforementioned KPIs. As expected, the safety stocks of the LB-MPC controller tend to reproduce the ones computed with the MPCss controller because this latter was used to train the ANN that predicts the safety in the LB-MPC. The MPCo controller presents the highest economic cost due to the conservative and static safety volumes that limits the economic optimisation. In general, this approach do not guarantee optimal results for any condition because the safety is fixed heuristically without taking into account demand variations. Instead, the MPCss controller is robust to disturbances by optimising the dynamic safety stocks (see Fig. 7) in accordance to the deviation of the forecasting error. The MPCss presents the best economic performance but the highest computational effort (see Table 3) since it involves more on-line optimisation problems to set those safety stocks. Results show that the LB-MPC controller outperforms the previous strategies. It presents similar results to the MPCss for the economic, safety and smoothness indicators but reduces the computational burden (see Table 3). In addition, Fig. 7 and Fig. 8 show that, despite the similar safety stocks of the MPCss and the LB-MPC, this latter makes 13 better use of hydraulic and economic resources due to its flexibility to self-adapt the parameters of the controller if the operational conditions change (see Fig. 6). This capability helps managers to deal with demand uncertainty and prediction errors in an optimal and economic way, guaranteeing the desired safety and service level with less volume of water and less electric energy. Furthermore, Fig. 8 details that even when the MPCss approach have a lower value than the LB-MPC for the economic performance indicator (see Table 3), which integrates water costs and electric costs, the LB-MPC presents a lower cost in the electric component due to the adaptation of weights by means of the AI techniques used in this application. From an operational point of view, this difference in costs implies that the LB-MPC decides to take water from more expensive sources in order to further reduce the electrical costs by pumping more, with respect to the other approaches, when the electric tariff is cheaper. 5. Concluding Remarks This paper has presented a Multilayer Model Predictive Controller with self-tuning capabilities for the efficient management of water transport systems based on soft-computing techniques. The resultant controller architecture has been applied to an aggregate model of the Barcelona DWN obtaining important improvements in the computation time towards on-line implementation for large scale systems. The selected parameters to be tuned in the MPC problem were the prediction horizon and the weighting matrices of the multi-objective cost function. The main advantage of the fuzzy tuner is that it is able to tune every element independently, which is a difficult task in analytical approaches due their lack of intuitiveness for multivariable large-scale systems. The proposed scheme is a quasi-explicit MPC because most of the heavy computational tasks are converted into non-linear explicit modules using neural networks. The controller also tunes the set-points based on inventory management theory, enriching the controller design with reliability aspects to assure a customer service level under disturbances uncertainty. Further research will be conducted in using other ANNs structures and in reinforcement learning algorithms with two main directions: (i) to implement intelligent distributed MPC of DWNs where shared variables are negotiated using learning techniques, and (ii) to adapt and improve the presented fuzzy inference system. 6. Acknowledgements This work has been partially supported by the Spanish research project WATMAN (CICYT DPI2009-13744) of the Science and Technology Ministry, the EU Project EFFINET (FP7-ICT-2011-8-31855) and the DGR of Generalitat de Catalunya (SAC group Ref. 2009/SGR/1491). References Aggelogiannaki, E., Doganis, P., Sarimveis, H., 2008. An adaptive model predictive control configuration for production–inventory systems. International Journal of Production Economics 114, 165–178. Åkesson, B.M., Toivonen, H.T., 2006. A neural network model predictive controller. Journal of Process Control 16, 937–946. Alessandri, A., Gaggero, M., Tonelli, F., 2011. Min-max and predictive control for the management of distribution in supply chains. IEEE Transactions on Control Systems Technology 19, 1075–1089. Ali, E., 2003. Heuristic on-line tuning for nonlinear model predictive controllers using fuzzy logic. Journal of Process Control 13, 383–396. Aswani, A., Master, N., Taneja, J., Culler, D., Tomlin, C., 2012. Reducing transient and steady state electricity consumption in hvac using learning-based model-predictive control. Proceedings of the IEEE 100, 240–253. Babel, M., Shinde, V., 2011. Identifying prominent explanatory variables for water demand prediction using artificial neural networks: A case study of bangkok. Water Resources Management 25, 1653–1676. Biscos, C., Mulholland, M., Lann, M.V.L., Buckley, C., Brouckaert, C., 2003. Optimal operation of water distribution networks by predictive control using minlp. Water SA 29, 393–404. Cembrano, G., Quevedo, J., Puig, V., Perez, R., Figueras, J., Verdejo, J.M., Escaler, I., Ramon, G., Barnet, G., Rodriguez, P., Casas, M., 2011. PLIO: a generic tool for real-time operational predictive optimal control of water networks. Water Science & Technology 64, 448–459. Cybenko, G., 1989. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals, and Systems 2, 303–314. Dan Foresee, F., Hagan, M., 1997. Gauss-newton approximation to bayesian learning, in: International Conference on Neural Networks, pp. 1930–1935. El Mouatasim, A., Ellaia, R., Al-Hossain, A., 2012. A continuous approach to combinatorial optimization: application of water system pump operations. Optimization Letters 6, 177–198. Fukuda, T., Shibata, T., 1992. Theory and applications of neural networks for industrial control systems. IEEE Transactions on Industrial Electronics 39, 472–489. Funahashi, K.I., 1989. On the approximate realization of continuous mappings by neural networks. Neural Networks 2, 183–192. 14 Garriga, J.L., Soroush, M., 2010. Model predictive control tuning methods: A review. Industrial & Engineering Chemistry Research 49, 3505–3515. Kanet, J., Gorman, M., Stößlein, M., 2010. Dynamic planned safety stocks in supply networks. International Journal of Production Research 48, 6859–6880. Ławryńczuk, M., 2007. Neural models in computationally efficient predictive control cooperating with economic optimisation, in: Proceedings of the 17th international conference on Artificial neural networks, Springer-Verlag, Berlin, Heidelberg. pp. 650–659. Maciejowski, J.M., 2002. Predictive control with constraints. Prentice Hall, Essex, England. Ocampo-Martinez, C., Fambrini, V., Barcelli, D., Puig, V., 2010. Model predictive control of drinking water networks: A hierarchical and decentralized approach, in: Proceedings of the American Control Conference, 2010, pp. 3951–3956. Ocampo-Martinez, C., Puig, V., Cembrano, G., Creus, R., Minoves, M., 2009. Improving water management efficiency by using optimization-based control strategies: the Barcelona case study. Water Science & Technology: Water supply 9, 565–575. Parisini, T., Zoppoli, R., 1995. A receding-horizon regulator for nonlinear systems and a neural approximation. Automatica 31, 1443–1451. Pascual, J., Romera, J., Puig, V., Creus, R., Minoves, M., 2011. Operational predictive optimal control of Barcelona water transport network, in: Proc. 18th IFAC World Congress, Milano, Italy. pp. 10571–10578. Perea-Lopez, E., Ydstie, B., Grossmann, I., 2003. A model predictive control strategy for supply chain optimization. Computers & Chemical Engineering 27, 1201–1218. Qin, S., Badgwell, T.A., 2003. A survey of industrial model predictive control technology. Control Engineering Practice 11, 733–764. Schwartz, J., Rivera, D., 2006. Simulation-based optimal tuning of model predictive control policies for supply chain management using simultaneous perturbation stochastic approximation, in: Proceedings of the American Control Conference, 2006, p. 6. Shah, G., Engell, S., 2011. Tuning MPC for desired closed-loop performance for MIMO systems, in: Proceedings of the American Control Conference, 2011, pp. 4404–4409. Tatjewski, P., 2007. Advanced control of industrial processes. Springer-Verlag. Tatjewski, P., Ławryńczuk, M., 2006. Soft computing in model-based predictive control. International Journal of Applied Mathematics and Computer Science 16, 7–26. Toro, R., Ocampo-Martinez, C., Logist, F., Van Impe, J., Puig, V., 2011. Tuning of predictive controllers for drinking water networked systems, in: Proc. 18th IFAC World Congress, Milano, Italy. pp. 14507–14512. Valera García, J.J., Gómez Garay, V., Irigoyen Gordo, E., Artaza Fano, F., Larrea Sukia, M., 2012. Intelligent Multi-Objective Nonlinear Model Predictive Control (iMO-NMPC): Towards the ‘on-line’ optimization of highly complex control problems. Expert Systems with Applications 39, 6527–6540. Vieira, J., Cunha, M.C., Nunes, L., Monteiro, J.P., Ribeiro, L., Stigter, T., Nascimento, J., Lucas, H., 2011. Optimization of the operation of large-scale multisource water-supply systems. Journal of Water Resources Planning and Management 137, 150–161. Wata, S.S.F., Langari, R., Filev, D.P., 2000. Fuzzy Control: Synthesis and Analysis. John Wiley & Sons, Inc., New York, NY, USA. 1st edition. Wojsznis, W., Gudaz, J., Blevins, T., Mehta, A., 2003. Practical approach to tuning MPC. ISA Transactions 42, 149–162. Yonaba, H., Anctil, F., Fortin, V., 2010. Comparing sigmoid transfer functions for neural network multistep ahead streamflow forecasting. Journal of Hydrologic Engineering 15, 275–283. 15

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement