A Stochastic Nonlinear Predictive Controller for Solar Collector Fields Under Solar Irradiance Forecast Uncertainties

Predictive control strategies with implicit feedforward action are known for enhancing solar collector field system performance. Nevertheless, the nature of the systems’ disturbances, such as solar irradiance, is characterized mainly as being stochastic, which compromises the disturbance rejection performance due to the model prediction uncertainties. Therefore, this work proposes a stochastic model predictive control (MPC) based on a chance-constraint (CC) formulation for controlling a real solar thermal plant. The controller is presented as a CC practical nonlinear MPC (CC-PNMPC), and it is implemented in the AQUASOL-II facility located at Plataforma Solar de Almería, Almería, Spain. This work first investigates the solar collector field plant model based on a parameter identification framework and the irradiance model predictions, using three different models for forecasting. After studying the benefits of the CC-PNMPC in distinct simulated scenarios, which presented about 7% less error out of the output limits than the deterministic strategy, the stochastic controller is implemented in the actual AQUASOL-II facility to validate and demonstrate the advantages of the proposed control approach. The results show that the stochastic strategy can straightforwardly account for disturbance uncertainties in the control optimization layer without additional computational cost or mathematical efforts. Furthermore, for the irradiance prediction uncertainties case, simulations demonstrate that the CC-PNMPC systematically reduces the temperature threshold extrapolation compared to the deterministic strategy.

sources is an urgent concern in the scientific community worldwide.In this context, solar thermal energy raises as a crucial key to increase the share of renewable energy sources and diversifying the global power supply.The primary purpose of the solar thermal facilities is to collect the maximum amount of solar energy and direct it to secondary systems, for instance, distillation and fermentation processes [1], [2], [3], indoor thermal comfort systems [4], and electric production [5].As a result, thermal solar systems play an essential role as a primary energy source and contribute to reducing fossil fuel demands and minimizing greenhouse gas emissions.
Although different types of equipment are employed to improve the overall system performance, the solar thermal facilities operation is commonly performed by controlling the solar collector field outlet temperature by manipulating the heat transfer fluid (HTF) flow [6].Nonetheless, this elementary concept is not trivial to be implemented in real scenarios.The unpredictable and intermittent nature of solar irradiance combined with the solar collector field nonlinear dynamics challenge the performance of classical control systems [6], [7], [8].Appropriate control strategies, mainly related to nonlinear and robust frameworks, associated with highly representative mathematical models, stand out as an important tool to improve solar plants' operation, helping to reduce costs and increase the solar plant operational hours [9], [10], [11], [12].
Regarding optimal control solutions, model predictive control (MPC) strategies have demonstrated their potential for high-performance control of solar plants over the past 20 years [6], [13].The MPC formulation employs the process model in order to predict the solar collector field outlet temperature and then computes optimal control actions that lead it to the desired reference trajectory.The controller's internal model must achieve the best compromise between process representativeness and computational effort to accurately calculate control actions relative to actual plant operation within the controller's sampling time [14].Nevertheless, one of the MPC control concerns for controlling solar thermal systems is related to disturbances and their predictions.In fact, the MPC strategy can account for implicit feedforward (FF) action by using disturbance models to estimate the output prediction.However, the stochastic nature of the meteorological disturbances, such as solar irradiance, ambient temperature, and wind speed, drives the predictive control strategies to consider more conservative and approximated 1063-6536 © 2023 IEEE.Personal use is permitted, but republication/redistribution requires IEEE permission.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
solutions.Commonly, the current disturbance measurement is used, and time-series models are implemented to predict the disturbance's future behavior in a deterministic manner, neglecting the handling of uncertainties in the disturbance predictions [10], [15], [16].
Robust MPC (RMPC) frameworks can systematically assess the solar collector field model and its disturbance uncertainties, providing optimal control movements in a reasonable computational time [8].Regardless, the system uncertainties are generally treated by the robust strategies as deterministic and bounded, which makes this assumption extremely conservative in many cases.For instance, min-max MPC strategies rely on always solving the worst case event, even when the probability of this scenario is minimal, leading to an evidently overconservative solution [17], [18], [19].Moreover, it is expected that the uncertainties of real-world systems are often evaluated by probabilistic terms.
Hence, in case their stochastic nature can be characterized, it becomes natural to consider it explicitly in the control optimization problem, culminating in stochastic MPC (SMPC) approaches [20].These strategies are mainly developed as chance-constraint (CC) framework, in which the stochastic nature of uncertainties and their statistical characterization is used to reformulate the deterministic constraints into probabilistic ones, resulting in a closed-loop constraint violation probability [21], [22].This feature is very attractive for consideration in the control of solar thermal plants since the higher performance of these plants is in the vicinity of the system security level or the restricted operating condition of the demand system.Another solution to deal with disturbance uncertainties is to employ extended state observers (ESOs).The ESO and its different designs have been widely studied in the recent literature [23], [24], [25].Nevertheless, using ESO yields different solutions compared to the CC-MPC.First, ESO demands the convergence of the disturbance estimate online, which must be handled appropriately to avoid violating process boundaries.In addition, the ESO does not explicitly consider the violation of the output limits nor the adjustment of the constraint reduction parameter based on prior knowledge of disturbance uncertainties.These features, as well as the disturbance prediction error estimation, can be performed directly offline, employing the CC-MPC stochastic strategy.
Controlling the solar collector field systems based on stochastic control formulations still lacks content in the literature, as more recent works focus on improving the overall management of the renewable system, mainly dealing with smart grids and integrated renewable/conventional energy sources [26], [27], [28], [29], [30], [31], [32], [33], [34], [35].Recently, in [36], a bilevel stochastic model with CC formulation aiming to evaluate the impact of variability in the solar and wind energy source was proposed.Using the CC formulation to consider the uncertainties on the production capacity and associating the solar and wind historical data profiles, the authors have demonstrated that risks above 30% do not correlate with further benefits, such as reduced electricity prices.In turn, Nagpal et al. [37] proposed a CC-MPC controller considering the uncertainties of solar irradiance and ambient temperature for building energy management systems (BEMSs) in smart sustainable building (SSB).As a result, based on simulated results, the CC-MPC reduces the thermal comfort temperature violation at the expense of increased energy cost, culminating in a compromise solution between occupant comfort and cost reduction.Furthermore, emphasis should be placed on the results achieved by Vergara-Dietrich et al. [38], in which they proposed a stochastic CC-MPC considering estimates of solar irradiance and wind and solar energy production for a sugar cane power plant.Hence, Vergara-Dietrich et al. [38] could maximize the energy production of the hybrid system by employing the CC approach for electric power thresholds to keep the system operating within the strict rules defined by contract in order to avoid economic losses.
Therefore, being aware of the potential of stochastic predictive control strategies in dealing with systems uncertainties, the scope of this work is to present a stochastic nonlinear CC-MPC applied to solar thermal plants.The contribution of the work is grounded on the fusion of the stochastic approach of CC with the practical nonlinear MPC (PNMPC) [39] to enhance the control of solar collector fields considering uncertainties in irradiance prediction models.The CC practical nonlinear MPC (CC-PNMPC) is an attractive solution for solar collector fields since it employs nonlinear models and includes an output error filter for robustness purposes, besides having a straightforward implementation framework.In addition, the PNMPC can be extended to assess the implicit FF formulation, which makes it possible to include future disturbance predictions required for the presented stochastic control.The control framework is first studied under several simulation scenarios, considering realistic experiments for different irradiance prediction models.Herein, a clear-day model and two distinct timeseries models, autoregressive with moving average (ARMA) and double exponential smoothing (DES), are employed to forecast solar irradiance.Thus, after examining the proposed stochastic controller's effects and comparing it with its deterministic version regarding feasibility, computational cost, and control performance, the CC-PNMPC is implemented in an existing system at the AQUASOL-II plant at the Plataforma Solar de Almería (PSA), Almería, Spain.The provided real experiments aim to corroborate the beneficial capabilities of the CC PNMPC algorithm.
Based on the literature examination, this work exploits the absence of stochastic chance-constrained control applied in solar collector fields, which offers a promising solution to improve this system's operation.Herein, the advantages of implementing SMPC in thermal solar plants are investigated based on applying representative models for forecasting solar irradiance and incorporating a stochastic formulation in the predictive controller to reduce the temperature threshold extrapolation.To the best of the author's knowledge, the CC-MPC has not yet been implemented in a real case, although comprehensive simulated studies have been developed throughout the years [21].Moreover, as treated in [40], challenging concerns are related to CC-SMPC approaches implementation: 1) obtaining an appropriately accurate model for the probabilistic system uncertainties; 2) determining the amount by which the constraints should be tightened; and 3) studying stochastic nonlinear MPC (SNMPC).Accordingly, aiming to overcome these issues, this work presents the following investigations.
1) The first stage is to obtain a validated nonlinear model of the AQUASOL-II solar collector field by using a parameter identification procedure to identify the nonlinear model coefficients accurately and, hence, perform trustworthy simulated experiments.2) Furthermore, the goal is to investigate the best irradiance prediction model, analyze its statistical error, and define the better adjustment for tightening the process constraints based on the probability density function (pdf) of the prediction errors for the three proposed models.The prediction errors are studied considering several performance indices to measure the precision of the irradiance model.3) In sequence, the SMPC is developed as a PNMPC algorithm with its online model linearization, in which the formulation of CC is included.In this way, the stochastic nature of the disturbance variable is characterized linearly, which can accomplish a closed form for the propagation of the disturbance uncertainties in the prediction of the system outputs.4) Finally, the proposed CC-PNMPC is implemented at the AQUASOL-II facility to demonstrate that the complexity of the SMPC strategy does not necessarily reflect the increasing cost of online computing.Besides, these outcomes demonstrate that SMPC can systematically deal with constraints violations, which contributes to improving the efficiency of solar thermal plants.This article is divided as follows.Section II details the AQUASOL-II model and its parameter identification procedure, as well as the formulation of the deterministic PNMPC and the study of three different irradiance prediction models.In Section III, the stochastic CC-PNMPC formulation is presented, and the irradiance model prediction errors are investigated for the calculation of the CC.Section IV explores the simulation results of the proposed stochastic controller.In Section V, the experimental tests in the actual AQUASOL-II system are presented.Finally, the findings and principal conclusions are presented in Section VI.

II. PRIOR STUDY OF AQUASOL-II AND IRRADIANCE MODELS
Initially, this section details the model of the solar collector field of the AQUASOL-II plant and the model validation results.The goal is to obtain a validated model to accomplish reliable simulations and evaluate the control performance before implementation.Furthermore, the PNMPC formulation is presented since the output predictions of the optimization problem are used as a deterministic scheme.Finally, three distinct irradiance models are evaluated for implementation in the PNMPC with FF action for irradiance forecast.The irradiance model selection is crucial for developing the CC-PNMPC control scheme since the key to the success of the SMPC  approaches is the maintenance of the accurate disturbance estimate [40].

A. AQUASOL-II Solar Collector Field Model Validation
The AQUASOL-II facility is located at PSA, a dependency of the Spanish Centro de Investigaciones Energéticas, Medioambientales y Tecnológicos (CIEMAT) and is proposed as the case study system in this work (Fig. 1).The AQUASOL-II solar field is composed of 60 flat-plate collectors with a total thermal power output of 323 kW th under nominal conditions.This facility is devoted to study its behavior with thermal desalination systems at low-temperature levels (60 • C-90 • C).The object of this work comprises one loop of the solar collector field in the primary circuit, composed of four flat-plate collectors in parallel, integrated with a heat exchanger, a centrifugal pump, and an air cooler to simulate energy demand variations.Fig. 2 represents the AQUASOL-II system configuration.The plant model is a simplified lumped-parameter dynamical model with the goal of representing the system dynamic truthfully and providing a reasonable computational effort for solving the PNMPC optimization problem.Equation (1) shows the AQUASOL-II solar collector model where T sc,o (t) and T sc,in (t) are the outlet and inlet temperature of the solar collector field, respectively, I (t) and T a (t) are the solar irradiance and ambient temperature, respectively, and T sc,m (t) is the mean between the inlet and outlet temperature, that is, The delay time d T in is associated with the inlet temperature, and d q is associated with the water flow rate.Herein, the water flow q(t) [L/min] is the manipulated variable, the controlled variable is the system output temperature T sc,o (t) [ • C], and the system disturbances are the inlet temperature T sc,in (t) and the solar irradiance As can be noted from ( 1), the coefficients β [m] and H [J/(s • • C)] are related to the panel absorption efficiency and the heat losses, respectively.The parameter β summarizes the efficiency and geometrical losses of the solar irradiance power, which is a function of the glass cover transmissivity, the absorber surface absorptance, and absorption plate reflectivity.On the other hand, the coefficient H concentrates the thermal losses that occur mainly in the absorber tube and the HTF pipe.Although these coefficients can be explicitly calculated analytically [6], a practical model with concentrated parameters simplifies this formulation by assuming general representations, in which β and H parameters absorb structural modeling uncertainty [4], [41], [42].
Therefore, a parameter calibration procedure is proposed to determine the coefficients β and H and the delay time d T in and d q of the dynamic model.Actual data from the AQUASOL-II plant from February 3, 2022, are used for calibration and from February 4, 2022, for validation, wherein, in both cases, the input flow, solar irradiance, and inlet temperature (and, therefore, the outlet temperature) covered a wide range of operating conditions so that the obtained parameters can be considered valid.Thus, the model is calibrated to determine the optimal values of β, H , d T in , and d q that minimize the mean square error (mse) between the model output temperature T sc,o (t) and the plant data.
Fig. 3 shows only the validation results, wherein an mse index of 0.85 • C and an R 2 coefficient of determination of 0.9883 are achieved.The parameter values and their description are shown in Table I.
It is noteworthy that the scope of the present work is to investigate the effects of the stochastic control strategy applied to control the proposed solar collector field, modeled in (1).The delay times, discussed extensively in [6], [11], [13], play a crucial role in the controller performance, especially when considering the time-varying delay caused by the inlet temperature's HTF flow and the apparent delay linked to the irradiance.Nonetheless, aiming to focus on the CC-PNMPC performance concerning threshold violations, a simplified model formulation is proposed, in which d T in is represented as an average value in the flow range, and no apparent delay is considered for either the inlet temperature or the irradiance [11].As can be noted from Fig. 3 and the mse and R 2 indices, the identified parameters can portray the plant dynamics accurately, which can provide reliable information for developing the CC-PNMPC algorithm.

B. Deterministic PNMPC Formulation
The main idea of the PNMPC strategy is to predict the nonlinear system outputs for a prediction horizon N p , as an approximated linear function of the future control increments u and the estimate disturbances increments d.In this approach, although it considers the forced response as a linear function in relation to the inputs and disturbance increments, the system nonlinearities are accounted into the free-response matrix F, which can fairly represent the real nonlinear system for small changes [39].
Considering that are the future estimated disturbances, the predicted outputs computed by the PNMPC approach can be described as follows: where F is obtained using the set of present and past values of outputs y, inputs u and disturbances d, that is, , in which the notation ← − x refers to the past values of variable x.Moreover, herein, variables noted in bold refer to matrices and vectors, while the nonbold notation is used to define scalar variables.Notice that F is a free response of the system only containing the output values by simulating the nonlinear model while keeping the inputs fixed over the prediction horizon.Matrices Ŷ ∈ R N p •n y ×1 , Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
are formulated considering that n y is the number of outputs, n u is the number of inputs, and n d is the number of disturbances.The linearization is formulated online, at each control sample time, by applying a gradient of the prediction outputs relative to the vector of the input increments G = (∂ Ŷ )/(∂ u) and the prediction outputs relative to the disturbances increments G d = (∂ Ŷ )/(∂ d), that is, to generate the matrices G and G d , by using the nonlinear model, small increments regarding the last collected data are made in the respective input/disturbance past value at each time, while the other input variables are kept constant along the prediction horizon.The resulting output values are collected and form the construction of columns in G and G d .In particular, in this work, the output predictions Ŷ are related to the outlet temperature T sc,o (t) in (1).A comprehensive explanation of the PNMPC approach is detailed in the work of Plucenio et al. [39].
In case there are unmeasured disturbances or model uncertainties, the original formulation includes a low-pass filter in the predicted outputs, intending to increase the robustness of the PNMPC closed-loop response, similar to the dynamic matrix controller (DMC) and the generalized predictive controller (GPC) algorithms [43] , being C and D the numerator and denominator of the discrete-time low-pass filter, respectively.As the output prediction is given by ( 2), the control optimization problem can be formulated as follows: Y min and Y max are the lower and upper limit vectors of the output variables, respectively, and u min and u max are the lower and upper limit vectors of the inputs increments, respectively.In addition, y sp is the outlet temperature set point (reference), R and Q are the positive definite matrices for weighting the output prediction error and the input movements, respectively, and u min and u max are the input vector bounds.As can be seen, the optimization problem can be developed as a QP since the outputs predictions in (3) are linear regarding the decision variable u.As a result, the control optimization problem provides the future optimal input values for the predicted output.Since the control approach employs the future estimated disturbance, it goes without saying that prediction uncertainties compromise the PNMPC closed-loop performance.In addition, carefully modeling the stochastic disturbance strengthens the formulation of the SMPC approaches.Therefore, model estimations for the irradiance disturbance variable are investigated as follows.

C. Irradiance Forecast
Solar irradiance is a singular variable of the solar plants, as it is the primary energy source and, in contrast, cannot be directly manipulated.Hence, this variable is assumed as disturbance input for the control design.Due to its stochastic behavior, this disturbance variable is usually represented by time-series models, such as autoregressive (AR), ARMA, AR integrated MA (ARIMA), and AR integrated MA with eXogenous variables (ARIMAX), as a manner to estimate its future values.These methods use past data, which is considered autocorrelated and associated with trend variations, aiming to predict future behavior along the prediction horizon [6].On the other hand, the knowledge of clear-day sky solar irradiance is also fundamental in solar irradiance study, which is extensively used in estimation and forecasting models [44], [45].
It is worth mentioning that although the proposed solar collector model presents three disturbance variables [I (t), T a (t), T sc, and in (t)], the temperature increments present a very slow dynamic in comparison with the system behavior, which does not significantly affect the output prediction within the controller sample time and the prediction horizon.Thus, in the present work, only the irradiance prediction is investigated.
Therefore, based on the historical meteorological data of the location of the proposed studied AQUASOL-II system, which is mainly characterized by having frequent days of clear sky, this work proposes the use of three irradiance prediction models: 1) an empirical seasonal clear-day sky; 2) a time-series ARMA structure model; and 3) a DES model.The purpose is to compare these three distinct models to evaluate the accuracy of disturbance predictions before implementing the control strategy.
In the case of the clear-day sky model, filtered solar irradiance data acquired from a day without passing clouds of the AQUASOL-II plant are chosen.The heuristic method used to determine the clear-day model is proposed as a straightforward formulation to obtain a simpler solution than the theoretical calculations, avoiding several complex variables, for instance, the atmospheric interference that attenuates the solar irradiance that reaches the solar panels.Thus, the dataset from the AQUASOL-II facility is used as a reliable source to define the clear-day sky model that actually influences the solar collector field.For the ARMA approach, AR ( p = 10) and MA (q = 1) models are used, in which p and q are the AR and MA orders, respectively.All models use ten days of irradiance data for calibration from January 15 to January 24, 2022.The ARMA and the DES coefficients are found through an optimization method, and the model details can be reviewed in [15], [46].Fig. 4 shows the validation results of the proposed models for one day of collected data from the AQUASOL-II facility,  although four different days, from January 25 to 28, 2022, are used for validation.For the sake of simplification, the ARMA and DES models are depicted only for 1-s sample time ahead of forecast rather than for every prediction since the models' predictions are updated at each instant, and the predictions are recalculated in a receding horizon manner.
In order to measure the models' prediction accuracy, the following performance indices are proposed as quantitative metrics: mse, root mean square error (RMSE), normalized RMSE (nRMSE), average absolute error ē, and average percent error ē% (see [6] for the indices description).Notice that since the goal is to compare the irradiance prediction, the performance indices are calculated for a prediction horizon of 300 samples ahead at each instant following a receding horizon method, in which the final index is the mean value of the entire dataset.Table II shows the performance indices results.
As can be seen from Table II, the proposed clear-day model can predict the irradiance very well for a day without passing clouds, presenting even better indices than the ARMA model on Days 2 and 3.However, this precision is compromised on a cloudy day.Although it is relatively trivial, this fact can present intriguing alternatives for control implementation.Assuming the plant insights by the operating managers, the clear-day model can be applied as an irradiance model considering meteorological measures of the plant location.As the clear-day model is easy to be calculated and does not require online computation, it can be effortless to be implemented in the control layer.Nevertheless, comparing the prediction error indices in Table II, the DES model can forecast the irradiance with smaller errors among the three models when passing clouds situation attenuates the solar irradiance.As can be observed from the ARMA and DES method, forecasts are produced by weighting the recent past data.However, in the DES technique, the weights decay exponentially as the observations get older, unlike in the ARMA model, which is kept constant (relating to each respective model parameter).As the nature of the irradiance variable is highly unpredictable, weighting recently collected data more than old data can improve the trend prediction of irradiance models.Moreover, these results are in accordance with achieved results in the literature that also presented the DES model as a satisfactory estimate method for predicting solar irradiance over large prediction horizons [15].Therefore, the DES time-series technique is chosen to be implemented in the CC-PNMPC controller.

III. CC PRACTICAL NONLINEAR CONTROL
In this section, the CC-PNMPC is formulated considering the stochastic behavior of the solar irradiance DES model.Furthermore, DES prediction errors are studied concerning its statistical data.

A. CC-PNMPC Formulation
Consider the outlet temperature prediction of the AQUASOL-II solar collector field as follows: For a stochastic characterization of the irradiance disturbance, the irradiance increments at one sample time can be modeled as where I d (k) is provided by the DES model and I s (k) is the uncertain component of the model prediction.Consider that the stochastic component is a random Gaussian variable, with mean µ I and variance σ 2 I , I s ∼ N (µ I , σ 2 I ).This stochastic term can be represented as standard form by replacing for a random variable z(k) of mean µ z = 0 and variance σ 2 z = 1, z ∼ N (0, 1), as follows: Using the proposed substitution, the output prediction can be calculated not as a deterministic value but as an expected value due to the random variable z.The final output prediction equation is expressed for the prediction horizon as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
in which is the diagonal matrix containing the variance values.As can be seen in ( 9), the terms G µ I and E[ σ I • z] are the only ones related to the stochastic formulation, while the other terms are the previously deterministic form formulated in (3) considering the three disturbance variables (irradiance, inlet, and ambient temperatures).
It is important to note that the nonlinear process model is treated as a linear function of the input and disturbances, wherein the nonlinearities are accounted into the free-response matrix and the online linearization method of the forcedresponse matrices.Thus, the stochastic term of the irradiance model uncertainty component is characterized linearly, allowing to obtain a closed form of the disturbance uncertainties propagation along the prediction horizon for nonlinear models.Therefore, based on ( 9), the CC-PNMPC optimization problem is expressed as subject to (5c), (5d), and ( 9) Equation ( 11) is described as being the probability that the predicted outputs do not violate the output limits, in which this probability is defined by tuning the parameter δ.The expression Pr{h ≤ v} is the probability of the variable h being less or equal to a given value v, which is equivalent to calculating the cumulative density function (CDF) for the given value v. Hence, with the goal of formulating the CC and considering just the output upper limit inequality, (11) can be written as in which ϕ(−) is the CDF.Consequently, the equivalent deterministic CCs are expressed as follows: Similarly, the lower limits are defined as where ϕ −1 (δ) is the inverse of the CDF.Notice that, in practice, the output limits are restricted by the terms , which is a function of the predicted disturbance errors.This is the main achievement of the CC approach: the formulation systematically accounts in the control formulation for the required back-off value that the constraints must be shifted to obey the probability of threshold violation based on a statistical analysis of the forecast error.
In addition, the parameter δ directly affects the size of the constraints back-off, which is used as a tuning parameter for the CC formulation.This study combines two distinct solutions, namely, the PNMPC and CC approaches, both of which have already been individually validated in theoretical works [21], [39].Moreover, their joint implementation has been demonstrated in [38].Hence, this current work focuses on the practical aspects of the implementation, while the audience is directed to the mentioned works for theoretical validation.

B. Irradiance Statistical Analysis
For developing the CC in ( 13) and ( 14), the DES irradiance model is studied concerning its prediction errors following a conservative control formulation, employing a prediction horizon of 80 samples for a sample time of 20 s.Notice that the errors between the DES model and the collected data are those used for developing the stochastic components of the CC-PNMPC, not the predicted DES model outputs, which are essentially different.Therefore, by comparing historical data of ten days of operation in the AQUASOL-II facility with the DES model prediction, it is possible to obtain the histogram, the empirical pdf, and the CDF of the irradiance prediction error.Figs. 5 and 6 show the statistical results.It is possible to see that the proposed DES model presents minor errors since most of the data are near zero.The calculated mean value is µ I = −0.9891and the standard deviation is σ I = 9.7259.However, from Fig. 6, it can be noticed that the greater the probability δ, the greater ϕ −1 (δ), and thus, the greater the constraint back-off, which makes this Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.adjustment factor critical for the control optimization problem as its tuning can lead to infeasible closed-loop solutions.Consequently, the following investigates the effect of the CC violation and control parameters tuning concerning the control tradeoff between feasibility and performance proposed for controlling the solar collector field system.

IV. STOCHASTIC CC-PNMPC ANALYSIS
This section investigates the proposed CC-PNMPC applied in a simulated scenario of the AQUASOL-II plant to analyze the behavior of the stochastic controller before real implementation.The resulting discussions are presented in sequence, comparing the performance of the proposed stochastic controller with the same control strategy formulated as a deterministic solution.

A. Simulation Results
The AQUASOL-II solar collector field is treated as the identified model in Section II-A.The purpose is to control the solar collector field outlet temperature at 78.5 • C, simulating an energy demand required for a secondary circuit.In addition to the solar collector field, the AQUASOL-II plant is simulated as the existing system, using a heat exchanger model as the load system (detailed in [4]) and an actuator set model composed of a pump and a frequency inverter (identified as a first-order system).The temperature limits of the load system are proposed as very stringent to evidence the effects of the CC strategy.Thus, a condition of ±1.5 • C around the reference is imposed.Fig. 7 details the control scheme.Notice that the control strategy is in a cascade formulation, in which the primary CC-PNMPC controller provides the water flow reference q ref for a classical proportional-integral (PI) secondary controller, which takes care of setting % of frequency for the pump frequency inverter.Moreover, notice that the CC-PNMPC FF action accounts only for the irradiance prediction, considering that the ambient and inlet temperatures have slow dynamics and their values are kept constant along the prediction horizon.
First, the stochastic behavior of the irradiance prediction error is studied regarding the output predictions and the resulting CC thresholds.As seen previously, the computation of G µ I and σ I • ϕ −1 (δ) results in a contraction of the output restrictions along the control horizon.Notice that since σ I is positive and the chosen value of δ should represent a large probability, by using the model evolution of the irradiance Open-loop effects of the stochastic variable z on the output prediction and variations on the tuning parameter δ for the CC formulation.
disturbance, these values tend to increase along the prediction horizon.It culminates that, for an extensive prediction horizon, the CC formulated in ( 13) and ( 14) will result in an increasingly more restricted constraint, leading to an infeasible solution.This effect can be noticed in the studied application for controlling the solar collector field.The AQUASOL-II model is simulated using the open-loop prediction equation, and the CC is calculated considering the irradiance errors presented previously.In Fig. 8, the outlet temperature is at a steady-state point at 78.5 • C, and its prediction is calculated considering variations only on the stochastic part of the irradiance model for 50 random scenarios.In addition, the output constraints are computed considering ϕ −1 (δ) for four values of δ (0.95, 0.9, 0.7 and 0.55).As noted from Fig. 8, the output prediction tends to disperse, while the constraints become tighter along the prediction horizon, including being crossed over earlier at the start.As treated in [47], the necessity to limit the prediction horizon to attend the CC formulation is challenging since the MPC horizons are linked to the system's dynamic properties.Thus, the authors propose the concept of closed-loop variance based on the receding horizon MPC algorithm.In this formulation, the first computed value of matrix σ I • ϕ −1 (δ) is repeated along the prediction horizon, which avoids using limited horizon or reduced constraints violation probabilities.In order to illustrate the effects of closed-loop covariance, the CC-PNMPC optimization problem is simulated considering the AQUASOL-II model in the same steady state presented in Fig. 8.For the 50 random scenarios, δ is chosen to be 0.95, and the control horizon is chosen as 60.As can be seen in Fig. 9, in all scenarios, the first output prediction respects the constraints, which is the basis of the closed-loop covariance concept as only the first covariance prediction value plays a role in modifying the constraints based on the receding horizon formulation.
The convergence analysis of the presented approach follows the same basis of previous work that can be found in the literature [22], [40], [47].Notice that as the pdf is already known, the formulated probabilistic constraints are substituted by a deterministic one, and the entire optimization problem can be handled as typical quadratic programming, wherein no convergence issue is encountered.Still, on this matter, the feasibility of the problem solution is increased compared to conventional CC solutions since the closed-loop covariance method overcomes the case of crossed-over limits and Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Closed-loop results using the closed-loop covariance for CC formulation.
short prediction horizons, as is thoroughly surveyed in [47].Therefore, based on the previous concepts, the proposed CC-PNMPC is formulated following the closed-loop variance assumption for controlling the AQUASOL-II plant.The stochastic controller is simulated in three different scenarios, seeking to analyze the effects of the irradiance prediction for: 1) clear day (Scenario 1); 2) passing cloud day (Scenario 2); and 3) cloudy day (Scenario 3).Moreover, the CC-PNMPC performance is compared with two deterministic PNMPCs: the first uses the DES irradiance model to calculate the future irradiance values and the second uses the exact irradiance future values in the control disturbance increments.The goal is to compare the effect of applying the CC-PNMPC when disturbance prediction errors occur, given the PNMPC with a perfect prediction as a reference.For the simulated scenarios, the controller tuning parameters are chosen based on the system dynamics and the time delays after preliminary simulated tests.Hence, the prediction horizon is defined as N p = (4 • τ + d q )/Ts CC-PNMPC and N c = (3 • τ )/Ts CC-PNMPC , for a time constant τ ≃ 200 s considering an specific system's operating condition.The applied tuning parameters are shown in Table III.Notice that the chosen PNMPC prediction horizon is shorter than that selected for irradiance model analysis, which results in a conservative approach for the stochastic variables since the variance increases with the forecast horizon.This choice allows the formulation of a predictive controller by considering adjusting its tuning parameters without compromising the solution of the optimization problem to achieve the desired control performance concerning the plant dynamics.Regarding the PNMPC low-pass filter of the output prediction error, (z) = 0.8647/(z−0.1353), it is chosen by an empirical method after several simulation experiments considering the compromise of eliminating the steady-state error and control effort.
Fig. 10 shows the meteorological conditions and the inlet solar collector field temperature, and Fig. 11 presents the controllers' performance with the outlet temperature and the water flow for all scenarios only during the operating periods, wherein the system has enough energy to achieve the desired reference.Intending to provide quantitative information, Table IV presents the sum of the absolute error (SAE), considering an error only when the temperature is out of the output thresholds, the sum of the control increment (SCI) indices, and the mean processing time during the controllers' computation (t proc ).The total indices are calculated for the  Outlet solar collector field temperature and water flow for Scenarios 1-3 comparing the CC-PNMPC, the PNMPC using the DES irradiance model, and the PNMPC with ideal prediction.(The time axis is out of scale to demonstrate only the operating time period of the results.)

TABLE III CONTROL TUNING PARAMETERS FOR THE CC-PNMPC
AND PI CONTROLLERS period of operation of the simulation, starting from the initial time t i until the end time t f .The simulation results are obtained in an Intel Core i7-7700 CPU 3.6 GHz, 16-GB RAM computer using MATLAB R2019b from MathWorks, with the quadprog solver and the YALMIP toolbox [48] to solve the CC-PNMPC and PNMPC optimization problems.

B. Discussion
First, as can be observed from Fig. 11, the performance of CC-PNMPC is very similar to that of the deterministic strategies, even when strong irradiance disturbances occur, and they can satisfactorily deal with such disturbances, which Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE IV CONTROL PERFORMANCE INDICES
demonstrates that the PNMPC is an attractive solution for real implementation.Likewise, the controllers' processing time is equivalent for all controllers with negligible differences due to multitasking computer usage, demonstrating that the stochastic approach does not necessarily increase the computational effort and can be perfectly employed in existing systems considering the controller sample time.In addition, it is noteworthy to mention that the output threshold is only violated when there is insufficient solar energy, which escapes from the strategies' performance as they cannot overcome this issue.
Furthermore, also from Fig. 11, it can be noted that all controllers can keep the temperature at the desired reference, which is the main control objective since it offers a degree of freedom for the optimal inputs to deal with disturbance variations without extrapolating the temperature limits.Due to this control performance, the CC back-off effect could not be clearly evidenced in these simulated scenarios.Nevertheless, still, in this context, the stochastic CC-PNMPC plays an important role.Notice that the CC-PNMPC is slightly shifted from the temperature reference, 78.5 • C, and remains above the other PNMPC deterministic outputs.This point can also be noted from the input values, wherein the CC-PNMPC keeps the water flow lower than the PNMPC's strategies.This fact can be positive regarding economic aspects, as operating at a lower water flow rate reflects lower electrical consumption by the pump.This issue is directly related to the formulation of the optimization problem of the stochastic CC-PNMPC, the output prediction formula, and the calculated irradiance prediction errors.Notice that the obtained irradiance mean value is µ I = −0.9891,which is small concerning acceptable prediction errors but sufficient to change G µ I matrix.For being a negative value, the predicted outlet temperature is always denoted slightly lower, which causes the optimization problem to calculate a lower water flow for the real system to achieve the reference.Although operating in low HTF flow can difficult controllers' performance due to the system's nonlinearities, this effect is very advantageous for the CC-PNMPC, as can be seen in Table IV, wherein the stochastic strategy presents a lower error performance index compared to the PNMPC using the irradiance DES model.It results that, by keeping the temperature slightly above, when strong irradiance disturbances occur, CC-PNMPC spends less time outside the temperature lower limit (see the zoomed graphic in Fig. 11).
A critical comment must be placed on the irradiance disturbances and their prediction errors.Due to the irradiance nature, strong disturbances only happen when the clouds block the solar rays, which reduces the irradiance and generates negative errors in the forecast models.The advantage of the stochastic CC-PNMPC is that it can systematically account for this particularity in the control optimization problem and compensate for disturbance prediction errors.In addition, since the irradiance prediction errors can be previously characterized by using the validated model and historical data, it allows calculating the CC parameters, such as δ and the CDF, offline, avoiding any additional computational cost during the optimization problem solution.Moreover, the PNMPC algorithm permits the use of a linearized formulation for nonlinear models, contributing to compute the propagation of the covariance along the prediction horizon straightforwardly for complex nonlinear systems.
Concerning the control effort estimated using the SCI index, since the control strategies use a disturbance model, the computed optimal inputs may differ from those calculated using an exact prediction.This issue requires a controller's additional effort to correct the mismatch values calculated in the past instant by using the receding horizon concept.In addition, the stochastic CC-PNMPC uses a random variable z, which affects the control signal by randomly including multiples of σ I in the output prediction.All these outcomes are observed in Table IV, wherein the CC-PNMPC presents a higher SCI value, and the PNMPC with exact prediction presents a lower index.
Finally, from the comparison of the three proposed cases, it can be noteworthy that when better irradiance models are used, the results approximate the ideal case, which is knowing precisely the disturbance's future values.As the disturbance model precision increases, the computed back-off values of the CC reduce, approaching more from the system's original constraints.Nevertheless, since the irradiance model uncertainties are intrinsic to the system nature, formulating predictive controllers as a stochastic solution, as presented herein in the CC-PNMPC, is an attractive alternative for controlling solar collector fields.
Based on the previous discussion, the stochastic CC-PNMPC is implemented in the AQUASOL-II plant, as presented in the following.

V. EXPERIMENTAL RESULTS
The presented CC-PNMPC controller is implemented to control the actual AQUASOL-II solar thermal plant in order to demonstrate the performance of the proposed stochastic predictive controller.As presented previously in Section II, the real system is configured, as shown in Fig. 2. The CC-PNMPC parameters slightly differ from those presented in the simulation results in Section IV-A due to the actual system conditions related to the secondary circuit temperatures on the days of experimental tests.In addition, model uncertainties and unmodeled dynamics led to a fine-tuning of the control's aggressiveness compared to the tuning adjustments performed in the simulated scenario.Therefore, the choice of parameter R was adjusted after a preliminary experiment in the existing Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.plant, aiming to achieve a smooth and adequate behavior of the CC-PNMPC in the actual AQUASOL-II system.Thus, the input variation weight is adjusted to R = 100 • diag(N c ), while the matrix Q is kept as in Table III.Moreover, the input maximum limit is now u max = 15.4L/min and the temperature reference is 75 • C.
The tests occur in two days, the first one on February 16, 2022, when passing clouds disturb the system, and the second on February 17, 2022, for a clear-day test.Figs. 12 and 13 show the control variables and the meteorological conditions for both tests.The CC-PNMPC satisfactorily maintains the system's outputs in the reference for both sunny and cloudy days.These results are in line with expectations, based on the simulation results described in Section IV.As observed in simulated scenarios, on the first day of tests, the outlet temperature only extrapolates its limits when the control signal is saturated at the minimum, which increases the SAE index, achieving the total of 1026.8 • C for a sample time of 1 s and an SCI of 21.11.Moreover, shortly after 13 h, there is a disturbance in the inlet temperature, which requires a control effort to keep the temperature within the proposed limits.The oscillations presented on the first test day come from unmodeled dynamics of the entire AQUASOL-II plant, which causes a mismatch scenario between the internal CC-PNMPC model and the real system.On the other hand, the CC-PNMPC has no struggles in keeping the outlet temperature at the reference regarding the sunny day test, keeping the SAE error index zeroed, with an SCI of 11.37.In this scenario, no strong disturbance occurs, which simplifies the outlet solar collector field temperature control, and the CC-PNMPC keeps the outlet temperature always within its limits with less control effort compared to the first day.
The experimental results reinforce the proposal that stochastic predictive control strategies can be advantageous for controlling the solar collector field since this approach can be formulated with no extra computational effort for the control optimization problem.Furthermore, there no complications in calculating stochastic variables, as direct substitutions can be made to transform probabilistic expressions into deterministic ones, and in this way, the resulting control strategy presents an elegant solution that systematically considers the output prediction uncertainties.

VI. CONCLUSION AND FUTURE WORKS
This work presents a stochastic model predictive controller for controlling a thermal solar collector field.The control strategy has been developed following the CC-PNMPC formulation and the closed-loop covariance concept, wherein the CC back-off value is calculated using the irradiance prediction errors.For that, three distinct models are investigated in order to determine the best irradiance prediction model considering clear and cloud days.First, the CC-PNMPC is tested in different simulation scenarios using a validated AQUASOL-II solar collector field model and a DES irradiance model.After a comprehensive investigation of stochastic strategy effects on temperature control performance, the CC-PNMPC is implemented in the real system.
The results demonstrate that the irradiance errors tend to be negative since the irradiance disturbance is due to the block of the solar way, which reduces its magnitude.As a result, the irradiance error has a negative mean value, which affects the temperature prediction and results in a slight offset between the output and the reference.This essential fact must be considered before implementing the CC with irradiance model uncertainties in case precise reference tracking is required.Nevertheless, considering output threshold extrapolation, the irradiance error characterization prevents the solar collector field temperature from overpassing the lower limit, which is advantageous to implement the CC-PNMPC for controlling such systems.As can be noted in the simulated scenarios, the CC-PNMPC presents approximately 7% less error considering the output limits extrapolation compared to the deterministic PNMPC.
Furthermore, the present work applies the stochastic controller strategy with a satisfactory result in an actual AQUASOL-II solar plant, which had not yet been employed in an existing facility, demonstrating that the CC-PNMPC can compute optimal input movements considering the disturbance uncertainties systematically into the optimization problem without increasing the computational effort.In addition, the ability of the PNMPC to deal with nonlinearities is a promising solution to consistently consider the covariance propagation of nonlinear systems along the prediction horizon.Another concern regarding the performance of the stochastic CC-PNMPC is the use of the random variable in the optimization problem.As noted in Section IV, the control effort is increased in comparison to the deterministic approach due to the effect of random values associated with the stochastic behavior of the predicted irradiance.This effect can result in noisy input behavior and compromises control performance in sensitive systems.
Future studies must consider several disturbance variables to formulate the stochastic strategy.Although the ambient temperature presents slow dynamics for the proposed application in a low level of solar system control, this variable must be evaluated over forecast uncertainties and large prediction horizons, mainly when hierarchical controllers are developed.In addition, solar collector model parameter uncertainties are an essential field to be evaluated for stochastic control strategies, in which model coefficient variations can be studied following the CC formulation.Finally, as previously concluded, the more representative the disturbance model, the better the control performance, demonstrating that the investigation of solar irradiance models associated with predictive control strategies and faithful solar field models, mainly considering varying and apparent transport delays, is a promising field to improve the solar thermal system performance.Furthermore, although this work has focused on solar field application, the developed methodology and technique can be extended for different stochastic processes.

Fig. 3 .
Fig. 3. Model validation results for the parameter identification procedure.

Fig. 8 .
Fig. 8.Open-loop effects of the stochastic variable z on the output prediction and variations on the tuning parameter δ for the CC formulation.

Fig. 9 .
Fig. 9.Closed-loop results using the closed-loop covariance for CC formulation.

Fig. 11 .
Fig. 11.Outlet solar collector field temperature and water flow for Scenarios 1-3 comparing the CC-PNMPC, the PNMPC using the DES irradiance model, and the PNMPC with ideal prediction.(The time axis is out of scale to demonstrate only the operating time period of the results.)

TABLE I MODEL
PARAMETERS DESCRIPTION FOR THE SOLAR COLLECTOR FIELD.THE TERMS DENOTED WITH * WERE FOUND BY THE OPTIMIZATION PROCEDURE

TABLE II PERFORMANCE
COMPARISON FOR THE CLEAR-DAY, ARX, AND DES MODELS