<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2018.612009</article-id><article-id pub-id-type="publisher-id">JCC-89442</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Prediction of Solar Radiation Using Data Clustering and Time-Delay Neural Network
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Chee</surname><given-names>Keong Chan</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Yi</surname><given-names>Hong Ler</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore</addr-line></aff><pub-date pub-type="epub"><day>12</day><month>12</month><year>2018</year></pub-date><volume>06</volume><issue>12</issue><fpage>91</fpage><lpage>97</lpage><history><date date-type="received"><day>24,</day>	<month>August</month>	<year>2018</year></date><date date-type="rev-recd"><day>23,</day>	<month>December</month>	<year>2018</year>	</date><date date-type="accepted"><day>26,</day>	<month>December</month>	<year>2018</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  
    In this paper, a combination of data clustering and artificial intelligence techniques are used to predict incoming solar radiation on a daily basis. The data clustering technique known as Perceptually Important Points is proposed, where time-series data is grouped into clusters separated by key characteristic points, which are later used as training data for an artificial neural network. The type of network used is known as a Focused Time-Delay Neural Network, and an analysis of the data is performed using the Mean Absolute Percentage Error scheme. 
  
 
</p></abstract><kwd-group><kwd>Prediction</kwd><kwd> Clustering</kwd><kwd> Neural Networks</kwd><kwd> Artificial Intelligence</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Currently, fossil fuels such as crude oil, coal and gas are the main resources of energy that are used in today’s world. Fossil fuel reserves are expected to deplete in the near future, with studies showing the depletion of oil and gas as fuels expected to occur as soon as 35 to 37 years from the time of writing [<xref ref-type="bibr" rid="scirp.89442-ref1">1</xref>].</p><p>As a means to slow down the depletion of fossil fuels, renewable sources of energy are being utilized as alternatives to the aforementioned fossil fuels. Solar energy is one of the alternative sources of energy being researched, as the influx of solar radiation on the Earth’s surface is several magnitudes larger than the global power consumption of humanity as a whole [<xref ref-type="bibr" rid="scirp.89442-ref2">2</xref>].</p><p>The ability to accurately predict the incoming solar radiation is an important factor to improve the efficiency of a solar energy conversion system. One of the methods utilized to predict incoming solar radiation is the use of an empirical model. The empirical model is a technique which uses meteorological parameters as inputs to predict future values of solar radiation.</p><p>The main shortcomings of the empirical model are its focus on long-term prediction, its reliance on existing meteorological data, as well as its inability to identify abnormalities and account for sudden changes in data.</p><p>This paper proposes an alternative to the use of empirical models, which is the utilization of a combination of pattern recognition through data clustering techniques [<xref ref-type="bibr" rid="scirp.89442-ref3">3</xref>] as well as data modelling through artificial neural networks [<xref ref-type="bibr" rid="scirp.89442-ref4">4</xref>]. Through the clustering of data, an organized set of inputs can be used to more accurately train the neural network for use in predicting data. A focused time-delay neural network [<xref ref-type="bibr" rid="scirp.89442-ref5">5</xref>] is then used on each cluster.</p></sec><sec id="s2"><title>2. Perceptually Important Point (PIP)</title><p>Perceptually Important Point (PIP) is a concept introduced by Chung FL, Fu TC, Luk R, and Ng V [<xref ref-type="bibr" rid="scirp.89442-ref6">6</xref>]. The purpose of PIP is to define the shape of a graph using points on the graph that are shown to be “critical points”: points which signify a point of change in the trend of the graph. The graph can be divided into clusters separated by the PIPs, which allows for data to be grouped by trend similarity.</p><p>The process behind identifying PIPs is as follows:</p><p>1) The start and end of the graphs are set to be the starting and end points.</p><p>2) The point on the graph with the greatest vertical distance is set as the first PIP, and is also used as the end point of the first cluster, and the start point of the second cluster.</p><p>3) Subsequent PIPs are obtained by finding a point with the greatest vertical distance from the start and end points of each cluster, forming new clusters.</p><p>Algorithmically, the process behind segmenting the graph through PIPs can be explained as follows (<xref ref-type="fig" rid="fig1">Figure 1</xref>).</p><p>Points P1 and P2 on the time-series are established and a gradient is obtained between the two points.</p><p>A point on the gradient Pc and a point on the time-series Pn with the same x-axis value are obtained. Initially, (x<sub>1</sub> + 1) is selected as the initial x-axis value.</p><p>The difference in values of the y-axis of points Pn and Pc is obtained, and set as distance d.</p><p>The x-value of Pc and Pn are incremented by one step and the distance d is calculated again. If the value of d obtained is greater than the previous value of d, the new value is stored. Otherwise, the new value is discarded and the old value of d is kept as the greatest vertical distance.</p><p>The x-value of Pc and Pn is repeatedly incremented until P2 is reached.</p><p>The time-series can subsequently be segmented into cluster 1 (data from points P1 to Pn) and cluster 2 (data from points Pn to P2) (<xref ref-type="fig" rid="fig2">Figure 2</xref>).</p><p>The process is repeated recursively for cluster 1 and cluster 2 to obtain points Pm and Pl, which segments the time-series into 4 clusters: P1 to Pm, Pm to Pn, Pn to Pl and Pl to P2.</p></sec><sec id="s3"><title>3. FTDNN Using MATLAB</title><p>The algorithm for training and utilizing a Focused Time-Delay Neural Network (FTDNN) can be obtained from MathWorks’ Neural Network Toolbox [<xref ref-type="bibr" rid="scirp.89442-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.89442-ref8">8</xref>]. FTDNN was selected as the neural network of choice due to its speed relative to other forms of neural networks.</p><p>All values or names within &lt;&gt; braces are subject to change as per user specifications.</p><p>Firstly, the cluster dataset has to be loaded and converted into a time sequence using the following commands:</p><p>load</p><p>y = y(1: );</p><p>y = con2seq(y);</p><p>The FTDNN is then created using the following commands, with the tapped delay lines, hidden layer neurons and number of epochs being variable depending on optimal parameters:</p><p>= newfftd(y,y,[1: ], );</p><p>.trainParam.show = ;</p><p>.trainParam.epochs = ;</p><p>The prediction begins on the value in the series after the delay, and the initial values in the delay are also required to be loaded:</p><p>p = y( :end);</p><p>t = y( :end);</p><p>i = y(1: );</p><p>The network is then trained to perform one-step-ahead prediction:</p><p>= train( ,p,t,i);</p><p>The network is then ready for use through the calling of the network as a function:</p><p>= ( );</p><p>The resulting prediction can subsequently be converted for plotting:</p><p>= cell2mat( );</p><p>plot( );</p></sec><sec id="s4"><title>4. Results</title><p>Using the PIP method described earlier, 3 points are obtained. Due to the recursive nature of the PIP algorithm, an odd number of points will always be obtained.</p><p>For this paper, all solar radiation data is obtained from the Geography Weather Station of the National University of Singapore.</p><p>As shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>, the point (705, 784) is seen to be a PIP, indicating a turning point in the graph. (705, 784) in the context of <xref ref-type="fig" rid="fig3">Figure 3</xref> indicates that on the 705<sup>th</sup> minute of the day, there is an incoming solar energy of 784 WH/m<sup>2</sup>.</p><p>The first cluster is selected to be data from minute 405 to minute 705. The point at minute 480 is ignored to reduce the number of clusters due to the similarity in trend from the data prior to and after minute 480.</p><p>The next 17 readings are used to form cluster 2, and the subsequent 20 readings are used to form cluster 3. Readings before cluster 1 and after cluster 3 are</p><p>ignored due to them being approximately zero, which are not required for use as training data as it indicates that there is no solar radiation incident during that period of time.</p><p><xref ref-type="fig" rid="fig4">Figure 4</xref> shows a visual representation of the actual data (blue) plot against the predicted data (orange). The data is obtained using 1 day of training data as inputs for the network, to predict a day’s worth of solar radiation. Visually, the two sets of data are shown to be fairly close.</p><p>Using MAPE [<xref ref-type="bibr" rid="scirp.89442-ref9">9</xref>], it can be observed that for most of the readings, the percentage difference between the forecast and actual value are sub-10%, ignoring the values that are close to 0 due to the large deviation it causes in percentage errors when the values are small (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p><p><xref ref-type="fig" rid="fig6">Figure 6</xref> shows the result of utilizing the FTDNN on all 3 clusters individually, with 15 days of training data used as the input for each cluster.</p><p>The resulting adjusted MAPE values of cluster 1, 2 and 3 are 3.890%, 4.129% and 1.180% respectively.</p><p>While MAPE is shown to not be entirely exact in portraying the accuracy of the prediction, it is sufficient to show a basic level of competency of the network in performing predictions.</p></sec><sec id="s5"><title>5. Conclusions</title><p>In this paper, a system combining the use of data clustering and neural networks is proposed to optimize the prediction of solar radiation.</p><p>The paper provides a fundamental level of knowledge on Perceptually Important Points and the focused time-delay neural network that was used in the project.</p><p>The use of the methodologies discussed are not limited to the prediction of solar radiation, but can also be used in a more general case for other fields such as the prediction of stock market trends or water current strength for turbines.</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Chan, C.K. and Ler, Y.H. (2018) Prediction of Solar Radiation Using Data Clustering and Time-Delay Neural Network. Journal of Computer and Communications, 6, 91-97. https://doi.org/10.4236/jcc.2018.612009</p></sec></body><back><ref-list><title>References</title><ref id="scirp.89442-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Shafiee, S. and Topal, E. (2009) When Will Fossil Fuel Reserves Be Diminished? Energy Policy, 37, 181-189. https://doi.org/10.1016/j.enpol.2008.08.016</mixed-citation></ref><ref id="scirp.89442-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Lewis, N.S. (2007) Toward Cost-Effective Solar Energy Use. Science, 315, 798-801.  
https://doi.org/10.1126/science.1137014</mixed-citation></ref><ref id="scirp.89442-ref3"><label>3</label><mixed-citation publication-type="book" xlink:type="simple">De Soete G. and Carroll, J. (1994) K-Means Clustering in a Low-Dimensional Euclidean Space. In: Diday, E., Lechevallier, Y., Schader, M., Bertrand, P. and Burtschy, B., Eds., New Approaches in Classification and Data Analysis. Studies in Classification, Data Analysis, and Knowledge Organization. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-51175-2_24</mixed-citation></ref><ref id="scirp.89442-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Haykin, S. (2009) Neural Networks and Learning Machines. Prentice Hall/Pearson, New York.</mixed-citation></ref><ref id="scirp.89442-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Waibel, A., Hanazawa, T., Hinton, G., Shikano, K. and Lang, K. (1989) Phoneme Recognition Using Time Delay Neural Networks. IEEE Transactions on Acoustics, Speech and Signal Processing, 37, 328-339. https://doi.org/10.1109/29.21701</mixed-citation></ref><ref id="scirp.89442-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Fu, T.C., Chung, F.L., Ng, V. and Luk, R. (2001) Evolutionary Segmentation of Financial Time Series into Subsequences. Proceedings of 2001 Congress on Evolutionary Computation, Seoul, 27-30 May 2001, 426-430.</mixed-citation></ref><ref id="scirp.89442-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Miller, S. (2015) How to Build a Neural Network.  
https://stevenmiller888.github.io/mind-how-to-build-a-neural-network/</mixed-citation></ref><ref id="scirp.89442-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Mathworks (2017) Neural Network Toolbox (r2017b): Design Time Series Time-Delay Neural Networks.  
https://www.mathworks.com/help/nnet/ug/design-time-series-time-delay-neural-networks.html</mixed-citation></ref><ref id="scirp.89442-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Swamidass, P. (2000) MEAN ABSOLUTE PERCENTAGE ERROR (MAPE). Encyclopedia of Production and Manufacturing Management. Springer, Boston, MA.  
https://doi.org/10.1007/1-4020-0612-8_580</mixed-citation></ref></ref-list></back></article>