 Research
 Open Access
 Published:
Modelling and control of solardriven humidification–dehumidification desalination plant
Journal of Electrical Systems and Information Technology volume 6, Article number: 7 (2019)
Abstract
This article reports on mathematical modelling and control of a solardriven humidification–dehumidification desalination plant. Mathematical models for the components are constructed using CARNOT toolbox in MATLAB environment. Model validation has been shown by comparison with published experimental data. Solar collector outlet temperature control is a key parameter to optimize plant performance. In this study, solar field pump flow rate is controlled to maintain the collector outlet temperature at a predetermined set value. Three types of PID controllers are tested. These include PID, nonlinear PID and fractionalorder PID. Controllers’ gains are optimized using genetic algorithm technique. The results show that FOPID controller offers a superior dynamic and static performance and can be automatically adjusted to compensate for weather changes.
Introduction
Water and energy crises are major challenges in many places of the world. The lack of drinkable water is often intensified in arid regions. Fortunately, this is generally accompanied with abundant sources of solar energy which can be used to drive desalination and water treatment systems. Solar powered humidification–dehumidification desalination systems (HDH) have attracted much attention in recent years [1,2,3,4,5]. The basic idea of solardriven HDH systems is that when hot salt water is exposed to hot dry airflow, a specific quantity of vapour can be extracted by the dry air. Fresh water is retrieved by humid air condensation in a cooling coil in the dehumidifier section. Thus, the basic components of HDH cycle include a heat source, air humidifier and dehumidifier. Nafey [6] carried out an experimental investigation of HDH processes using a solar water heater and a solar air heater to heat the water and the air streams, respectively. Air humidification was carried out using an induced fan cooling tower. Orfi [7] presented a theoretical study of a HDH solar desalination system. The seawater was preheated in the dehumidification condenser and then heated in the solar collector before entering the humidification chamber. Antar [8] experimentally investigated an airheated HDH desalination system with single and twostage heat recovery systems.
The main concern of the previous research work was focused on performance analysis of the HDH systems. In practice, the productivity of the HDH plant depends on maintaining the outlet temperature of the solar collector field at a desired set value. The set value can be optimized as function of the incident solar, radiation, ambient conditions, storage size and fresh water production. Gopi and Divya [9] studied the response of PID and fuzzy controllers in a solar water pumping system with closedloop feedback. The results showed that the fuzzy controller had a better response in comparison with the PID controller. Beschi et al. [10] used a differential algorithm controller based on switch on and switch off principal to achieve the optimal water flow in solar thermal systems. Simplicity and ease of implementation are some of the advantages of proportional–integral–derivative (PID) controller. Recently, fractionalorder PID (FOPID) is used by many researchers to improve the performance of PID controller. FOPID controller uses a noninteger order of derivative and integral gains [11]. Nonlinear PID (NPID) is one of several types of enhanced PID controllers. NPID creates a continuous dynamic nonlinear function by using a nonlinear gain function with combination of e, \( \int_{\text{to}}^{t} {e{\text{d}}t} \) and è to achieve a better response and better disturbance rejection [12]. Optimization techniques for tuning have been discussed in [13]. The design of these techniques is based on minimizing some performance standard such as integral of square error (ISE) or integral of time multiplied by absolute error (ITAE).
It is evident that modelling and simulation of solardriven HDH desalination plants are important tools in the design and operation phases. In the present article, mathematical models for HDH desalination plant are driven by vacuum tube solar collectors as developed using CARNOT toolbox in a MATLAB environment. Models have been validated by comparison with experimental data of a typical plant. Also the development of an efficient plant controller is essential for optimization of plant performance under daily and seasonal variations in solar radiation, ambient conditions and water demand. Three types of PID controllers are implemented and tested for this purpose. These include PID, nonlinear PID (NPID) and fractionalorder PID (FOPID). The set of gains of all the controllers are optimized using genetic algorithm technique (GA). These controllers can be automatically adjusted to compensate for the variation in solar radiation and ambient conditions.
Methods
Figure 1 shows a schematic diagram of the HDH desalination plant considered in the present study. The plant was designed and contracted within the framework of SunWater Project [14]. The main features of the plant include [15]:
 1.
Heating subsystem:
 (a)
Solar thermal roof of 240m^{2} solar vacuum tube collectors, the vacuum tube collectors used are OEM Vario 3000. They have a doublesided coating of TiNOX, a stagnation temperature of 192 °C, maximum operation pressure of 10 bar and an absorption coefficient of α = 96%.
 (b)
Two insulated epoxycoated steel storage tanks with a volume of 5 m^{3} each with an inner diameter of 1500 mm and an outer diameter of 1700 mm.
 (c)
Solar pump, which is used for delivering the water from the tanks to the collector.
 (a)
 2.
Heat exchanger subsystem between the solar field and salt water in the HDH unit.
 3.
Water desalination unit (WDU):
 (a)
WDU, from the German company Terrawater, which uses the heat energy from the tanks to produce fresh water. This WDU can produce up to 209 L/h, when the input temperature is 95 °C and thermal power per hour is 50 kW_{th}.
 (b)
Raw water tank to supply the WDU with salt water.
 (c)
Product water tank, which is used to collect the produced fresh water.
 (a)
Mathematical modelling
The model is constructed using the CARNOT toolbox in MATLAB environment. This toolbox can be used to calculate and simulate different components of heating systems [16]. Mathematical models of different components are described below.
Solar collector
The solar collector is divided into a number of nodes. Using a quasidynamic model, the node temperature T_{node} is calculated using Eq. (1) [16]. The solar collector model parameters are listed in Table 1.
Heat storage tank
The heat storage tank is modelled with a multiport onedimensional node. The node temperature (T_{N}) can be calculated using Eq. (2) [16]. The storage tank model parameters are listed in Table 2.
Solar field pump
A 3phase 400W Grundfos (UPS32120F) centrifugal pump is used for water circulation in the solar field. Control of collector outlet temperature is achieved by modulating the pump flow rate using a variable speed drive.
Pump similarity laws can be used to extend the information given by the pump manufacturer of discharge (Q), head (H) and power (P) as function of the rotating speed (ω). According to [17], when the fluid density and the pump impeller diameter are constant, the pump similarity laws can be reduced to:
where subscripts 1 and 2 refer to pump parameters at two different speeds.
The threephase induction motor model can be formulated, following [18]. The torque is proportional to the square of speed:
where T is the electromagnetic torque produced by the motor, ω is the speed of the rotor and K is a constant of proportionality. Since the supply frequency is 50 Hz, Eq. (7) is used to determine the synchronous speed for the 2pole machine [19]:
where N_{s} is the synchronous speed of the motor, f is the frequency of the supply voltage and p is the number of poles. Thus, the synchronous speed is 3000 rpm, or 314.16 rad/s. The nominal torque of the motor can be calculated as shown in Eq. (8). This yields a value of 1.27 N m for the 400W motor.
where T_{n} is the nominal torque, P_{n} is the horsepower rating and ω_{n} is the synchronous speed of the motor. Hence, the value of k in (6) is found to be 1.29 × 10^{−5} N m s^{2}. This value of k is multiplied with the square of the rotor speed and fed back to the torque input of the motor, to create the model for a centrifugal pump type load [19].
HDH unit
The model of the system consists of different heat exchangers and other components like a flow mixer and a flow diverter. The present model uses the methodology and governing equations suggested in [14]. Figure 2 shows the model components of HDH unit. The saltwater enters the WDU in the condensation chamber in which the saltwater is preheated by the hot air and then passes a flow mixer where it is mixed up with a part of the hot water coming from the evaporating chamber. After passing the flow mixer, the water passes again another heat exchanger to raise its temperature even more before entering the external heat exchanger of the WDU in which the water is heated up with an external heat source to the maximum temperature in the system. It leaves the external heat exchanger and sprays down in the evaporating chamber in which the energy is transferred from the hot water to the cold air. Then, it passes a flow diverter, which splits the saltwater flow into two different volume flows.
The heat exchangers are modelled using the following differential equation:
HDH model parameters are listed in Table 3. The flow diverter and the flow mixer are implemented using CARNOT toolbox.
Model implementation in MATLAB
The abovementioned models of HDH unit and solar collectors are implemented in MATLAB Simulink. Figure 3 represents the model representation of HDH unit in MATLAB Simulink. This includes modules for water/air heat exchangers, flow mixers and flow diverters. The external heat exchanger models used to heat the saline water by using the hot water coming from the solar field are also integrated with HDH unit Simulink model. Other submodules shown in figures include modules for calculating the density correction of air as function of temperature, dependence of water content in the air and heat transfer characteristic for heat exchanges. The module for fresh water prediction calculation is shown in Fig. 4 depending on air temperatures and volume flow rates. The flow diverter can be set in the range of 0 to 1. For 1, the whole flow can continue without diverters, and for 0 value the bypass is activated. A value of 0.5 is used throughout the present study.
MATLAB Simulink model representations of solar collector, heat storage tank and circulation pump are shown in Fig. 5. This also includes controller modules and input data of solar variation, ambient temperature and wind speed.
Model validation
Validation of the developed mathematical models has been performed by comparison with the experimental data reported in [15]. The operation of the solar collectors is simulated for the first 6 days of September. The solar radiation and ambient conditions have been calculated using the data in [14].
Figure 6 shows that the collector outlet temperature calculated using the present models is in good agreement with the experimental data.
Figure 6 shows that the present model is capable of predicting the transient variation in the collector outlet temperature in response to variation in incident solar radiation. In this simulation, the pump flow rate is maintained constant at 0.67 L/S. The hourly fresh water production of the plant is calculated to be 174 L/h. Experimental measurements reported in [15] show a daily production of 209 L/h. The difference can be attributed to the need for increasing the temperature inside the WDU from ambient conditions to the maximum working temperature. This takes a few minutes, and therefore, the freshwater output is lower. If the temperature inside the WDU has the right working temperature at the beginning, the calculated freshwater output is much higher.
The control of collector outlet temperature for efficient operation of the HDH plant shall be analysed in the following section.
Control of solar field
The hourly variation in incident solar radiation and its abrupt changes during cloudy days represents a major difficulty for stable operation of the plant. Plant production can be enhanced by proper control of collector outlet temperature and choice of storage tank size. This calls for an efficient controller of the solar field that can be automatically adjusted to compensate for the variation in solar radiation and ambient conditions. In the present study, the solar field pump flow rate is controlled to maintain the collector outlet temperature at a predetermined set value. The implemented control techniques and optimization algorithm are described in the following section.
Genetic algorithm (GA)
Genetic algorithm (GA) is an optimization technique that impersonates the representation of normal natural development [20]. Autotuning of the present control techniques has been performed using (GA). Genetic algorithm uses the fitness function (CF1) as shown in Eq. (12) to test the individuals and find the fittest one. It is popular to use zero as the best fitness score. Equation (12) minimizes the integrated square error e(t).
Optimum PID controller
PID controller is used widely in different fields in engineering because of its simplicity and reliability. The transfer function of the PID controller is:
Figure 7a shows the block diagram of GAPID control tuning system. MATLAB genetic algorithm toolbox has been used. Constructing the population is the most critical step. It is recommended that chromosome range in every population is between 20 and 100. However, because the simulation time is 24 h, 20 chromosomes in each generation have been selected and used. Each chromosome consists of three parameters, namely K_{p}, K_{i} and K_{d}, with value limits varied based on the cost function used. In order to get the best results, Ziegler–Nichols rule was used to obtain the starting values of K_{p}, K_{i} and K_{d} [23].
The used steps in tuning the parameters of a PID controller follow the procedure described in [22].
Optimum FOPID
The most used form of a fractionalorder PID controller (FOPID) is the PI^{λ}D^{μ} controller. It allows us to adjust derivative (λ) and integral (μ) order in addition to the proportional, integral and derivative constants where the values of λ and μ lie between 0 and 1 [11].
The differential equation (DE) of the PI^{λ}D^{μ} controller can be described as follows:
Figure 7b shows the block diagram for GAFOPID controller. The various steps in finding the parameters of a FOPID controller are performed as presented in [22]. Also, MATLAB genetic algorithm toolbox was used. Each chromosome consists of five parameters, namely K_{p}, K_{i}, K_{d}, λ and μ, with value limits varied based on the cost function used.
Optimum NPID
Figures 7c, 8 show the general form of NPID controller and GANPID block diagram. The various steps in finding the parameters of a NPID controller are performed as presented in [22]. Also, MATLAB genetic algorithm toolbox was used. Each chromosome comprises of six parameters, namely K_{p}, K_{i}, K_{d}, α_{p}, α_{i} and α_{d,} with value limits varied based on the cost function used.
NPID controller’s main algorithm depends on a nonlinear function [12]. NPID controller is used to get a better response in the output of the system in comparison with conventional PID. For this reason, the PID controller has been reconstructed using a nonlinear function as follows:
where ψ (e, α, δ) is the nonlinear function:
Results and discussion
Comparison of different control techniques
The performance of different controllers has been examined for two different cases: Case 1 represents solar field operation under normal weather condition and Case 2 investigates the control performance under sudden change in solar radiation.
Operation under normal conditions (Case 1)
In the simulation, the weather data for first day in March have been used, see Fig. 9, the maximum solar irradiance is 800 W/m^{2}, wind speed is 6.1 m/s, and humidity is set to 50%. The goal is to maintain the outlet temperature of the collector at 90 °C regardless of the solar radiation and weather variations.
The three controllers have been tested for this purpose. Figure 10 shows the temperature response of the controllers from 11:30 AM till 1 PM. The three controllers showed a good response with slight difference of about 0.4 °C from the required set value. The best static and dynamic responses have been achieved using GAFOPID controller.
Operation under abrupt changes in solar radiation (Case 2)
In this case, a sudden reduction in solar radiation of 5% and 10% for 16 min at noon time, 12 PM, has been tested to represent the effect of cloud coverage on the controller’s response, see Figs. 12, 14. Figure 11 shows the responses with 5% disturbance from 11:30 AM till 1PM. Figures 11 and 13 show that the collector outlet temperature starts decreasing below the set value due to reduction in solar radiation at 12 PM. The controller responds by decreasing the collector pump flow rate to maintain the set value of outlet temperature. The collector outlet temperature continues decreasing and start increasing again to approach the set value after an overshoot. The maximum drop in temperature is 0.2 °C and 1.5 °C for 5% and 10% sudden reduction in solar radiation. It should be noted that the pump speed reaches its minimum allowable value to maintain the collector outlet temperature at its set value for 10% reduction in solar radiation. Further reduction shall not be accommodated by variation in pump speed. The best static and dynamic responses have been achieved using GAFOPID controller (Figs. 12, 13, 14).
Performance indicators
Performance of the used controllers has been compared for Case 1 through four performance indicators which are integral absolute error (IAE), integral squared error (ISE), integral timeweighted absolute error (ITAE) and integral timeweighted squared error (ITSE). These indicators have been calculated by Eqs. 17–20. Figure 15 shows that FOPID and NPID controllers greatly reduce the error of the system.
where \( \left( \varepsilon \right) \) is the error of the system and equals the difference between the desired temperature and solar collector outlet temperature in kelvin. \( (t) \) is the simulation time in seconds.
Pump performance
The above results were concerned with the variation in collector outlet temperature using different controllers. However, one should examine also the corresponding variation in pump flow rate.
Figure 16 shows mass flow rate through the solar collectors to maintain the output temperature at 90 °C for Case 1. Although the temperature difference between the controllers is about 0.4 °C, the pump performance is very different. PID controller shows a time delay in starting the pump and has a huge variation in mass flow rate. FOPID and NPID controllers improve the variation, but FOPID controller has a better and faster response which leads to a better power consumption.
From practical point of view, these variations in mass flow rates and consequent variations in pump speed are not acceptable as it reduces the pump life. Some sort of tuning should be implemented to avoid this behaviour.
Performance of HDH plant
Simulation has been carried out using the present models and employing GAFOPID controller to compute the feed water production of the plant. Experimental data reported in [15] show that the plant production in March and August is 820 L/day and 950 L/day, respectively. Simulation result of the same days shows a prediction of 770 L/day and 1200 L/day, respectively. The plant operation has been also compared against the case of no control; it has been found that the application of FOPID controller extends the plant operation time as compared of no controller case. For a typical day in March, the controller extends plant operation by 3 h.
Conclusion
A complete model for a solardriven HDH plant has been constructed in MATLAB Simulink. The model has been validated by comparison with the experimental data obtained from a typical plant. The model is capable of predicting the solar collector and HDH unit performance with reasonable accuracy and can be used for further analysis of plant performance and fresh water production enhancement.
Three types of PID controllers optimized using genetic algorithm have been implemented for the control of solar collector outlet temperature. These include GAPID, GANPID and GAFOPID.
Test results at both normal operation and under abrupt changes of incident solar radiation show that GAFOPID has the best static and dynamic performance as compared to GAPID and GANPID. The GAFOPID is capable of controlling the collector outlet temperature at the set value with relatively low frequent disturbance of pump operation. In addition, full plant operation using GAFOPID results in extending the operation time and productivity of WDU in comparison with the case of no control.
Availability of data and materials
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request. The paper presents original work not previously published in similar form and not currently under consideration by another Journal.
Abbreviations
 HDH:

humidification and dehumidification
 PID:

proportional–integral–derivative
 FOPID:

fractionalorder proportional–integral–derivative
 NPID:

nonlinear proportional–integral–derivative
 ISE:

integral of square error
 ITAE:

integral of time multiplied by absolute error
 GA:

genetic algorithm
 WDU:

water destination unit
References
AlHallaj S, Arid MM, Tamirni AR (1998) Solar desalination with a humidification–dehumidification cycle: performance of the unit. Desalination 120:273–280
Dai YJ, Zhang HF (2000) Experimental investigation of a solar desalination unit with humidification–dehumidification. Desalination 130:169–175
Bourouni K, Chaibi MT, Tadrist L (2001) Water desalination by humidification and dehumidification of air: state of the art. Desalination 137:167–176
Ammar Y, Joyce S, Norman R, Wang Y, Roskilly AP (2012) Low grade thermal energy sources and uses from the process industry in the UK. Appl Energy 89:3–20
AlSulaiman FA, Narayan GP, Lienhard JH (2013) Exergy analysis of a high temperature steamdriven, variedpressure, humidificationdehumidification system coupled with reverse osmosis. Appl Energy 103:552–561
Nafey A, Fath HE, ElHelaby S, Soliman A (2004) Solar desalination using humidification–dehumidification processes. Part II. An experimental investigation. Energy Convers Manag 45:1263–1277
Orfi J, Galanis N, Laplante M (2007) Air humidification–dehumidification for a water desalination system using solar energy. Desalination 203:471–481
Antar MA, Sharqawy MH (2013) Experimental investigations on the performance of an air heated humidification–dehumidification desalination system. Desalin Water Treat 51:837–843
Gopi Krishna A, Divya M (2017) Design and comparison of closed loop solar water pumping system with PID and FUZZY controllers. IARJSET 6:122–130
Beschi M, Padula F, Visioli A (2016) Fractional robust PID control of a solar furnace. Practice 56:190–199
Podlubny I (1999) Fractionalorder systems and PID controllers. IEEE 44:208–214
Zaidner G, Korotkin S, Shteimberg E, Ellenbogen A, Arad M, Cohen Y (2010) Nonlinear PID and its application in process control, convention of electrical and electronics engineers. IEEE 26:574–577
Astrom KJ, Hagglund T, Controllers PID (1995) PID controllers: theory, design and tuning. Instrument Society of America, Pittsburgh
Buschert D (2014) Sun water project—an innovative water desalination system operated with solar thermal energy, Recklinghausen, Germany, Soest
Mostafa M (2014) Performance enhancement of solar desalination plant, M.Sc. thesis, Department of Mechanical Engineering, Helwan University, Cairo, Egypt
Carnot Block set (2013) Conventional and renewable energy systems optimization block set. Solar Institute
Suehrcke H, Appelbaum J, Reshef B (1997) Modelling a permanent magnet DC motor/centrifugal pump assembly in a photovoltaic energy system. Solar Energy 59:37–42
Krause PC (1965) Simulation of symmetrical induction machinery. IEEE 84:1038–1053
Rahman MI, Salim KM (2015) Comparison of conventional induction motor pump system with one containing a variable frequency drive: a quantitative performance analysis in lowvoltage conditions. Int J Electr Energy 3(2):68–73
Holland J (1975) Adaption in natural and artificial systems. The University of Michigan Press, Ann Arbor
Tang KS, Chen GR, Man KF, Kwong S (2005) Fuzzy logic and genetic algorithm methods in PID tuning. Springer, New York
Chopra V, Singla SK, Dewan L (2014) Comparative analysis of tuning a PID controller using intelligent methods. Acta Polytech Hung 11:235–249
Navatakke RR, Bichagatti J (2015) Optimal PID control of a brushless DC motor using PS technique. IOSR J Electr Electron Eng 10(3):13–17
Acknowledgements
Not applicable.
Funding
This study had no funding from any resource.
Author information
Affiliations
Contributions
MR gave idea and provided the previous data with advising and revision of mathematical modelling. AMAG designed the control system for the solar collector system. BG collected the simulation data and analysed them. BG and MAS wrote the paper with revision. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Gabra, B., Rady, M., Abdel Ghany, A.M. et al. Modelling and control of solardriven humidification–dehumidification desalination plant. Journal of Electrical Systems and Inf Technol 6, 7 (2019). https://doi.org/10.1186/s430670190006z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s430670190006z
Keywords
 Water desalination
 Solar thermal
 Modelling
 Control
 FOPID
 PID
 NPID
 Humidification
 Dehumidification