{'fraction_non_alphanumeric': 0.028215944135266385, 'fraction_numerical': 0.013434475913650703, 'mean_word_length': 5.023057216054654, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Solar irradiance forecasting using fuzzy logic and multilinear regression approach: a case study of Punjab, India

Received Sep 11, 2018 Revised Apr 5, 2019 Accepted May 2, 2019 The accurate forecasting of solar irradiance depends on various uncertain parameters like time of day, temperature, wind speed, humidity, and atmospheric pressure. All these play an important role in calculating PV power output. In this paper, a novel approach for forecasting of solar irradiance using flexible and accurate fuzzy logic and robust multi-linear regression approach has been proposed considering the above mentioned five variables. Based on the simultaneous consideration of those five variables, the solar irradiance is forecasted using the proposed methodology at a particular location in India, and the results are compared with the real time measured value of solar irradiance at that location on the days for which solar irradiance are forecasted. The proposed method is validated by comparing the results with real time data. The error analysis of the fuzzy logic based proposed system shows the root mean square error of 10.011 and mean absolute percentage error of 1.703%, while compared with real time data measured by instruments pyranometer, anemometer etc. The same results are found better while compared with the results obtained using multilinear regression approach.


INTRODUCTION
In the present energy scenario, the depletion of the natural fossil fuels, increased environmental pollution and the effect of ageing of the installed power plants are becoming a challenge for the society. Thus, integrating the renewable energy sources (REs) with the grid is one of the key solutions to such problems. But this integration also leads to some major challenges and problems like the uncertain nature of these resources especially solar in terms of power generation is a critical issue. These sustainable forms of energy depends and vary according to the weather conditions like temperature, atmospheric pressure, humidity, wind speed and also the time of the day. Apart from these parameters, the solar power generation mainly depends upon the solar irradiance which further depends upon the various weather based parameters. Thus, the foremost step in solar power prediction systems is the forecasting of Global Horizontal Irradiance (GHI) [1].
Focusing on the benefits of RES forecasting, in a recent time, a number of studies on solar irradiance forecasting have been proposed, most of which require the historical data of the dependent parameters. In [2], number of existing techniques for forecasting, their advantages and computation requirements has been discussed. Also, the various challenges faced by increased penetration of renewable energy resources in power system as well as microgrid have been briefly discussed. In [3], a study based on demand response of an isolated microgrid under the impact of uncertainties in renewable energy forecasts and its performance has been studied. The result shows less influence of uncertainty in solar than that in wind power on the dispatch cost at the generating end and for the management of the flexible loads. The energy management system for an isolated microgrid with PV, ESS and electric vehicles using the hybrid solar irradiance forecasting methodology for a short period of time has been presented in [4]. The proposed methodology, based on the data available online from satellite and the data of clear sky for the selected microgrid location uses Heliosat algorithm for determining the cloud cover from the satellite data. In [5], the problem of short term forecasting the estimated PV power for planning of a microgrid has been solved using neural networks. The historical data of parameters like PV production, global irradiance for learning and training available at the test facility has been considered. In [6], using the Markov switching model, solar forecasting for a remote microgrid has been presented. The proposed method uses the previous data available on the online portals for solar irradiance and clear sky irradiance, whereas using Fourier expansion, linear model for different conditions have been created for sunny, mildly cloudy and extremely cloudy days. Overcoming the problem of uncertainty in microgrid integrated with renewable sources of energy, holt-winters forecasting method has been used in [7]. The proposed forecasting methodology has been incorporated in the microgrid simulation with assumed residential load and battery storage system as back up source. The results of the work give an idea of reduced cost by forecasting the accurate value of solar in terms of energy management system (EMS) for a microgrid. The performance of intelligent neural network (NN) tool and statistical linear regression tool for forecasting the PV output has been analyzed in [8]. Using the previous online available data for solar irradiance, temperature, training and testing of the multilayer feed forward neural network have been done. The results show artificial NN (ANN) tool to be more accurate and flexible whereas statistical regression being more robust and easy to construct. In [9], short term solar irradiance forecasting focusing on the variable nature of the weather conditions as well as dependent radiation. The work compares seasonal autoregressive (SAR) linear models for solar irradiance forecasting with the nonlinear models, i.e. nonlinear autoregressive (NAR) based on computational intelligence technique and regression tree (RT). In [10], long term load demand forecasting using a regression based approach has been presented. The work focuses on various variables like historical data of the local power utility company, the present number of consumers and development plans of the set location.
Short term load forecasting for big data, i.e. huge historical data for various input parameters affecting the forecasting has been considered in [11]. Being more deterministic and robust multi linear regression methodology has been used for accurate forecasting. Various sensors and data science applications, historical data for load forecasting has been used. Focusing on the high matrix formulations, least number of parameters are considered with big data. The results of the work show 3.99% of the MAPE, considered to be under the tolerable limits. In [12], the forecasting of the electricity consumption in Thailand, as a case study, has been presented using artificial neural network and multi linear regression. Using the ANN technique the minimum cost of generation is calculated. Using the multi linear regression algorithm, depending on historical data of various parameters, electricity consumption has been calculated. In [13], dependent upon various meteorological parameters like temperature, dew point, humidity, visibility, wind speed and weather summary, short term solar irradiance forecasting has been proposed. Using the available meteorological data from various online sources, the forecasting problem has formulated as a structured output prediction problem. The proposed algorithm of long-short term memory has been compared with least square regression, persistence algorithm and different NN techniques. Based on historical data for cloud cover i.e. input parameters like azimuth, zenith angle and time of day. In [14], forecasting of solar irradiance using Labview software and regression based numerical algorithm has been proposed. Initially, dependent upon the parameters, solar irradiance has been forecasted and further combined with the local available temperature PV power output has been forecasted. [15] Presents multi-linear regression based solar power probabilistic forecasting, working with various inputs available at the weather stations. The system performance depends upon the cloud movement or the clear sky index is rated as better performance under the clear sky conditions. The results show that the accuracy of the system increases with the increase in historical data. In [16], the combined effect of relative humidity (RH) and air temperature (AT) on solar irradiance forecasting have been explored. Using the multivariate linear regression analysis carried out in different temperature range, the results come out to be more accurate and reliable in comparison to single variable dependent forecasting. Also, forecasting using the flexible fuzzy logic approach has been in trend among various authors in the recent years. In [17], focusing on the future aspects of energy planning, various techniques like neural networks, genetic algorithm and specially fuzzy logic approach along with the its application and advantages over the other; in terms of forecasting have been discussed. Overcoming the problem of uncertainty in weather conditions, in [18] solar radiation forecasting using fuzzy and neural net approach has been done. The results show the higher accuracy level and thus its application in the grid connected PV system. Similar to [18], considering the meteorological parameters like sky information, clearness index and temperature; solar radiation forecasting using a functional fuzzy logic approach has been suggested in [19]. Forecasting of solar energy using the fuzzy logic approach have been done focusing on the need of available solar energy data in [20] considering the sunshine per hour, temperature, latitude and longitude and time of year. With the increasing need of accurate forecasting using a fuzzy logic approach, forecasting of solar irradiance has been suggested in [21] normalizing the inputs and output to ISSN: 2252-8814  Solar irradiance forecasting using fuzzy logic and multilinear regression approach … (Sahil Mehta) 127 eliminate convergence problems. The results show a high accuracy level of forecasted value with respect to measured value for short term forecasting. In a recent trend, i.e. planning and designing of a microgrid with installed RES, in [22] the fuzzy logic approach for forecasting of renewable energy based sources considering the data of meteorological parameters of a set location has been shown. The comparative results show better accuracy of the fuzzy logic approach in comparison to the neural network and vector autoregressive forecasting models. With the increasing need of forecasting in microgrid applications, in [23] the focus is on energy management system, i.e. uncertain renewable energy based source and variable load. For this purpose, a real microgrid system in Chile with wind and PV and variable load have been considered and day ahead forecasting using the fuzzy logic approach has been carried out. Hence, for the planning of a microgrid considering particular longitude and latitude, it is very necessary to have the accurate forecasted value of energy generation through the available renewable energy resources.
Thus, from the literature survey using the historical data available at the online portals, the individual effect of few meteorological parameters such as temperature, sky movement, cloud cover, humidity and wind on solar irradiance forecasting has been studied. It is observed that the combined effect of five parameters such as temperature, wind, humidity, time of day and the atmospheric pressure at the location has not been considered simultaneously for solar irradiance forecasting because of complex system characteristics.
On the basis of above discussion the main objective of the present work have been considered as solar irradiance forecasting and power calculation using the high dimension fuzzy logic and multilinear regression approach. In high dimension fuzzy logic approach a large number of rules (1200) combining the effect of above mentioned parameters are formed to get more reliable and accurate results whereas, the robust multilinear regression (MLR) approach has also been implemented to develop the mathematical relation between all the parameters and forecasted solar irradiance for different time intervals. For the purpose of validation, the forecasted values of solar irradiance, as the output of both fuzzy logic and multilinear regression approach, are compared with the real time solar irradiance using Pyranometer device. The work presented in this paper is organized as follows: The introduction of the article is covered in section 1 followed by description of measuring devices and data collection methodology in section 2. The design and development of the high dimensional fuzzy logic system and multilinear regression approach have been discussed in section 3. The results and discussion for the proposed approach is presented in section 4 and the conclusions in section 5 followed by references.

MEASURING DEVICES AND DATA COLLECTION
Focusing on the major objective of work, the data collection of various parameters is initiated. The parameters are identified as temperature in °C, wind speed in m/s, humidity in percentage, time of day in hours: minutes, atmospheric pressure in hectopascals (hpa) and solar irradiance in W/m 2 . The advantage of measuring and collecting the actual real time data at a specific location is the high accuracy and system reliability. In Section 2.1 (A), 2.1(B) and 2.1 (C) the devices used for the measurement of such parameters at the set location at 30.356008, 76.372142 (30° 21′ 21.63″ N and 76° 22′ 19.71″ E) in the Thapar University campus have been discussed along with the data logging system in 2.1 (D).

Measuring devices 2.1.1. Pyranometer
The Pyranometer device; Hand-Held terminal model (HHT-13) used for the measurement of global horizontal irradiance is shown in Figure 1 (a). It is a portable electronic device to which the GHI sensor shown in Figure 1 (b) can be attached. The major benefit of using the HHT-13 terminal model for measuring the GHI is the data logging facility. The real time GHI for a specific location can be stored as well as logged in the personal laptops using the installed software.

Anemometer
The multipurpose device used to measure various meteorological parameters is the Lutron AM-4214SD Hot wire Anemometer shown in Figure 1 (c). This device is used to measure various parameters like wind speed in m/s as well as in km/hr, temperature in °C and °F; and humidity in percentage in the real time.
The benefit of such a device is the online monitoring as well as the data logging option which offers flexible operation of the device. The figure shows the anemometer device connected to one of the two separate probes which are used for the measurement purpose. Probe at the first port is used to measure the wind speed in m/s or km/hr where as at port two the probe for measuring humidity and the temperature can be connected.

. Barometer
Highly sensitive multipurpose electronic digital device capable of measuring the atmospheric pressure in hpa has been used in the presented work. Shown in Figure 1 (d), the device is capable of representing the altitude in meter (m), compass for direction and the atmospheric pressure.

. Data logging system
Using the above mentioned devices; data have been logged for necessary experiment. Figure 2 shows the block layout of the data logging system. Hence, focusing on the measured parameters; through anemometer device connected to two different probes (humidity and temperature probe, wind speed probe) various meteorological parameters like wind speed in m/s and km/hr, temperature in °C and °F and humidity in percentage can be logged. The device stores the data in an external SD card through which the data in the form of Microsoft excel sheet can be transferred to the laptop memory. The atmospheric pressure has been measured by the electronic barometer device. The other major parameter is the solar irradiance which is measured using the Pyranometer device and GHI sensor. Pyranometer device connected via USB cable to the personal laptop through hand held terminal software (HHT-13) has been well utilized to download the recorded data of solar irradiance in W/m 2 . Thus, based on the above layout of data logging system, Table A1 (submitted as supplementary sheet) shows the set of logged data measured at the set location of Patiala, Punjab, India (30.356008, 76.372142). The data have been measured using the above discussed devices (Anemometer, Barometer and Pyranometer). The table shows, the recorded value of relative temperature in °C, relative humidity in %, the wind speed in m/second, atmospheric pressure at the set geographical location in hectopascals (hpa) and the solar irradiance in W/m 2 . It is to be noted that the data is collected in the real time with 1 minute interval, whereas here a random sample set of data has been given for the 3 different days for which data are measured.

PROPOSED METHODOLOGY
Being user defined, simple and reliable, the fuzzy logic can also be termed as the simplified form of the classical logics involved in forecasting. The working of fuzzy logics is based on the non-linear mapping of input and output variables resulting in flexible output, i.e. rule viewer window, whereas multilinear regression approach truly depends upon the historical data of all inputs and gives the result in mathematical equations. Figure 3 shows the layout of the designed system with five uncertain weather based inputs which are temperature, humidity, wind speed, time of day, and atmospheric pressure and its output as solar irradiance. The inputs to the system, i.e. uncertain parameters are fuzzified in respective membership function in the range of [0, 1].

Figure 3. Layout of proposed fuzzy logic model (FIS)
Based on the observed minimum and maximum value for each parameter distribution of the linguistic variables has been done.
The membership functions for various inputs and output variable is shown in Figure 4, where the x-axis presents the parameter dependent value. For example; dependent upon the minimum and maximum values of temperature axis has been defined, whereas the divisions have been marked on the basis of observations and level of variations in Figure 4. The membership function of the temperature as the input given to the FIS system shown in Figure 4 (a) is distributed in five linguistic variables, i.e. Very Low (VL), Low (L), Medium (M), High (H) and Very High (VH). Similar to Figure 4 (a), other dependent variables, i.e. humidity and wind speed are mentioned in Figure 4 (b) and Figure 4 (c) respectively with different number of linguistic variables. The output of the system, i.e. solar irradiance has been shown in Figure 4 (d). With the above proposed system, solar irradiance is forecasted depending upon different input parameters.

Multilinear regression approach
Multiple linear regression model shows the relationship between multiple independent variables and a dependent variable. The mathematical model of the approach can be represented as where, y is the dependent variable, , ,……., are k independent variables, is the regression coefficients and is represented as the error term. For multiple observations, we can write as where, The matrix X and y represents the historical data of all independent and dependent variables respectively where as using the least square method, of (1) can be calculated by the following equation: From above known regression coefficient , output, i.e. forecasted solar irradiance can be calculated from the multiple linear regression model as below: For the measured historical data of various parameters, is the forecasted value of y and the difference of those two is the error in forecasting. After collecting future independent variable matrix , the forecasted independent variable is calculated as below.
Dependent upon the number of independent variables and a number of historical datasets, i.e. for a big set of data, number of rows are huge in X and y increasing the complexity in the linear regression which results in time consuming and complex solving. Hence multi-core parallel processing is used for big matrix transpose, multiplication and inverse operations which have been used in [24][25][26]. In the present work, five independent variables such as time of day, temperature, wind speed, humidity and atmospheric pressure and the dependent variable as the forecasted solar irradiance; the job of data handling and processing has been done for reducing the complexity of parallel processing, using the Matlab software. ISSN: 2252-8814  Solar irradiance forecasting using fuzzy logic and multilinear regression approach … (Sahil Mehta)

131
The step by step procedure for calculating the mathematical expression between independent and dependent parameters is given below: Step 1: Measure and log the data of the independent and dependent variables and develop y and X matrices. For forecasting the dependent variable, read future data of independent variables only. Calculate correlations and exclude unrelated variables.
Step 2: Use (3) to derive regression coefficients using Matlab software.
Step 3: Forecast dependent variable using regression coefficients and future independent variables using (5) depending on the requirement.

Model validation and error computation
Many methods for error calculation have been applied to the forecasting techniques for the need of evaluating the forecasted value. The most used methods include mean bias error (MBE), mean absolute error (MAE) root mean square error (RMSE), normalized root mean square error (nRMSE), mean square error (MSE) and Mean Absolute Percentage Error (MAPE) [3]. The input for the methods is the forecasted value of the parameter at a particular time calculated using a set of data along with the other input which is the real or actual value of the parameter w.r.t. the given time.
In the presented work, the performance evaluation of the developed fuzzy system and multilinear regression approach for forecasting of solar irradiance is determined by calculating Mean Bias Error (MBE), Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE) given by (6) to (8).
Where, Y is the predicted or the forecasted value and Y is the actual value measured in real time and N is the size of the test data set. The choice of method depends upon the decision maker.

CASE STUDY, RESULTS AND ERROR EVALUATION 4.1. Case study: Location selection and data measurement
With the availability of various measurement devices, the real time data for 3 complete days have been monitored and logged. For the purpose of forecasting and its benefit in the planning of a microgrid, the location of TIET, Patiala (Punjab), India with longitude and latitude (30.356008, 76.372142) has been considered. Figure 5 shows the variation in recorded parameters with the course of time and the solar irradiance respectively. For 3 consecutive days, the data for different parameters including relative temperature, humidity, wind speed, atmospheric pressure and solar irradiance were recorded using the above mentioned devices. Figure 5 (a) to 5 (c) represents the variation in temperature, humidity and wind speed from morning to evening for 3 days, whereas Figure 5 (d) shows uncertain solar irradiance dependent upon various input parameters for the same time.

High dimensional fuzzy logic based approach
Corresponding to the five input parameters; time of day, temperature, humidity, wind speed and atmospheric pressure, high dimensional fuzzy logic systems have been developed. Considering the linguistic variables of each parameter the calculated number of rules are 1200, out of which sample rules are given in Table A2 (submitted as supplementary material). For the results of the developed system, the input values: time of day-evening hours, temperature 31.6 °C, wind 2.61 m/s, humidity 41.9% and atmospheric pressure 1018.1 has been considered as shown in Figure 6. The rule viewer window for the designed high order fuzzy logic system shows the crisp value of all input variables and its corresponding output i.e. forecasted solar irradiance. Thus, the result obtained from the developed system, which is forecasted solar irradiance for a particular value of time of day, temperature, humidity, wind speed and atmospheric pressure; is given by 275 W/m 2 whereas; the actual solar irradiance observed was 273 W/m 2 .

Multilinear regression based forecasting
From Table 1, the (9) to (15) represents the mathematical expressions for different time intervals of the day, i.e. very short term time interval based forecasting represented by (9) to (13) where the complete day has been divided into 4 time intervals; 07.00AM to 10.00AM, 10.00AM to 01.00PM, 01.00PM to 04.00PM and 04.00PM to 06.00PM. The advantage of such very short time interval is high forecasting accuracy. Also, (13) and (14) represent short term forecasting where the complete day from 07.00AM to 06.00PM has been divided in 2 intervals. Similarly (15) represents long term based forecasting expression. Figure 7 shows the forecasting results of the proposed methodologies with both the fuzzy and multilinear regression approach.

Error evaluation
Using (6) to (8), error analysis in the proposed fuzzy logic system and multilinear regression approach has been presented in Table 2. The results show very low RMSE and MAPE error in the flexible fuzzy approach in comparison to the multilinear regression approach. Also, dividing the total time of the day in various time intervals, i.e. very short term (MLR EQ. 9 to MLR EQ. 12), short term (MLR EQ. 13, MLR EQ. 14) and long term interval (MLR EQ. 15); the analysis shows less error in very short term based forecasting compared to long term forecasting. Thus, the future work will focus on the expansion of fuzzy logic in the forecasting of renewable energy sources and comparing it with an artificial neural network approach taking all the basic meteorological parameters in consideration.

Power calculation
For the purpose of calculating the power output of solar PV array, (9) shows the relation between all the major parameters, i.e. at both Standard Test Condition (STC) and the forecasted irradiance [27,28].
Where, P , is forecasted power output in kW, Y is the rated capacity of the PV array, i.e. the power output of the panel under standard test conditions in kW, f is the derating factor of the system in %, G , is the forecasted solar irradiance at time T in kW/m 2 , G , is solar irradiance at STC (1000 W/m 2 ), α is the temperature coefficient of power in %/°C, T and T represents the cell temperature and reference temperature in °C.
Based on (9), Figure 8 shows the comparison plot of power output for different cases which are; actual irradiance, fuzzy forecasted irradiance and MLR forecasted irradiance. As per the rated standard test conditions, Y is taken as 25kW, f is taken as 0.66, T is taken as 25 °C and temperature coefficient of power i.e. α as 0.0167.

CONCLUSION
In this paper, considering relative temperature, relative humidity, wind speed, time of the day and atmospheric pressure as independent uncertain input variables, a high dimensional fuzzy logic system along with multilinear regression approach for short term solar irradiance forecasting has been proposed. For the purpose of real time data measurement of parameters at the set location, i.e. 30.356008, 76.372142 at the Library lawns, Thapar Institute of Engineering and Technology, Patiala (India), various devices like Pyranometer, anemometer and barometer devices have been used. The results of the proposed fuzzy logic based system dependent upon the designed rule base of 1200 rules show crisp value for forecasted solar irradiance with an error of 10.011 RMSE and 1.703% MAPE in comparison to the real time observed solar irradiance. For the multilinear regression based approach, different mathematical equations dependent upon the time intervals have been produced, which shows the least error in case of very short term forecasting. Comparing the error analysis of multilinear regression based approach with the fuzzy logic based approach shows the later to be more acceptable. Thus, depending on the forecasted values of solar irradiance and the standard test conditions of solar panel, solar energy generation and the variations present in it has been shown.