<?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.2015.35011</article-id><article-id pub-id-type="publisher-id">JCC-56586</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>
 
 
  Cluster Analysis of Electrical Behavior
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Lin</surname><given-names>Liu</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Lin Liu, School of Electrical and Electronic Engineering, North China Electric Power University, Beijing, China</addr-line></aff><author-notes><corresp id="cor1">* E-mail:</corresp></author-notes><pub-date pub-type="epub"><day>25</day><month>05</month><year>2015</year></pub-date><volume>03</volume><issue>05</issue><fpage>88</fpage><lpage>93</lpage><history><date date-type="received"><day>February</day>	<month>2015</month>	</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, we apply clustering analysis of data mining into power system. We adapt K-means clustering algorithm to analyze customer load, analyzing similar behavior between customer of electricity, and we adapt principal component analysis to get the clustering result visible, Simulation and analysis using matlab, and this well verify cluster rationality. The conclusion of this paper can provide important basis to the peak for the power system, stable operation the power system security. 
 
</p></abstract><kwd-group><kwd>K-Means Clustering Analysis</kwd><kwd> Principle Component Analysis</kwd><kwd> The Power System</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>On the one hand, in the age of big data such a massive information, data affects our works and lives every second, data mining and clustering analysis is becoming more and more important, on the other hand, With the rapid development of our national economy, the power consumption is larger and larger. And our current power source is mainly rely on thermal power, in order to ensure the stable operation of power system, power dispatch and peak becomes more and more important. The clustering analysis to customer power load is a key link in power decision. Therefore, this paper will focus on the application of large data in power system. Clustering algorithm can be divided into different classification with different standards. Commonly used algorithms in clustering analysis include K-means clustering algorithm, agglomerative hierarchical clustering algorithm, SOM of neural network clustering algorithm, the FCM of fuzzy clustering algorithm, and so on [<xref ref-type="bibr" rid="scirp.56586-ref1">1</xref>]. By comparison, we discover that the K-MEANS program and the FCM program have good comprehensive performance, however the FCM program are too complex for us to use. The power system data is produced every second, so the K- MEAN program are outstanding for its highly efficiency. We select K-means clustering algorithm to analyze the customer power load. Thus may balance power load according to different classification. And this can provide different service to different kinds of customers. The characteristic of this article is: every detail is analyzed from rom the generation of customer power load to data clustering.</p></sec><sec id="s2"><title>2. The Source Data of Power Load</title><p>The source of data used for clustering analysis in this paper comes from reference [<xref ref-type="bibr" rid="scirp.56586-ref2">2</xref>]. We sample the reference data, then interpolate, this makes data regeneration. We select 4 classifications of power load, each classification respectively have 100 sets of data, a total of 400 sets of data. To analyze one day’s power load, every 10 minutes for a sample, each data set contains 144 numerical (as is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>).</p><sec id="s2_1"><title>3.1. The Algorithm and Process</title><p>Clustering is one of the important research topics in data mining, is the process of physical objects into multiple classes or clusters [<xref ref-type="bibr" rid="scirp.56586-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.56586-ref4">4</xref>]. The objects in the same cluster are as similar as possible, while objects in different clusters as different as possible. Clustering can handle different field types and discover clusters of arbitrary shape, it can process the abnormal data, Clustering is not sensitive to data order and less dependent of professional knowledge. K-means algorithm is one of the most classic clustering algorithms commonly used in the present, it has advantages in the following three aspects [<xref ref-type="bibr" rid="scirp.56586-ref5">5</xref>]:</p><p>It’s quick and sample;</p><p>For large data sets with high efficiency and scalability;</p><p>It has nearly linear time complexity, and it is suitable for mining large data sets. K-Means clustering algorithm's time complexity is a function of n, k, and t. Where n stands for the number of objects in data sets, t stands for number of the iteration algorithm, k stands for the number of clusters.</p><p>So this paper uses the K-means clustering algorithm to analyze customer load, and design a flow chart as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p></sec><sec id="s2_2"><title>3.2. The Steps of K-Means Algorithm</title><p>Randomly select k points as the initial clustering center <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x3.png" xlink:type="simple"/></inline-formula> in the data sets <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x4.png" xlink:type="simple"/></inline-formula> and N is the number of samples</p><p>On the i of sample points <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x5.png" xlink:type="simple"/></inline-formula> in the data sets<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x6.png" xlink:type="simple"/></inline-formula>, calculate Euclidean distance between it and the clustering center, and get its category label</p><disp-formula id="scirp.56586-formula286"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/56586x7.png"  xlink:type="simple"/></disp-formula><p>Recalculate the k cluster centers, according to type (2)</p><disp-formula id="scirp.56586-formula287"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/56586x8.png"  xlink:type="simple"/></disp-formula><p>In the formula, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x9.png" xlink:type="simple"/></inline-formula>is the number of objects in clusters <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x10.png" xlink:type="simple"/></inline-formula></p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Source data: customer load</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/56586x11.png"/></fig><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Flow chart</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/56586x12.png"/></fig><p>Repeat step 2) and step 3), until it reaches the convergence criterion function. The evaluation of convergence is based on the square error criterion, as shown in Formula (3).</p><disp-formula id="scirp.56586-formula288"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/56586x13.png"  xlink:type="simple"/></disp-formula><p>In the formula, E is the sum of square error of all the objects in the database; x is a point in space; <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x14.png" xlink:type="simple"/></inline-formula>is the average value of the cluster<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x15.png" xlink:type="simple"/></inline-formula>. This objective function makes the generated clusters as compact as possible and independent.</p><p>Using the above K-means algorithm, cluster analysis was performed on the data obtained, thus draw customer load can be divided into 4 categories obviously, and the clustering center is shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p></sec></sec><sec id="s3"><title>4. Visualization of Clustering Results</title><p>Because of the use of the large amount of data, selected 144 sampling moments every day, we can’t express the clustering results directly. In order to get the clustering results visual, we use the method of principal component analysis (PCA) to study the clustering results.</p><p>PCA is a mathematical method of dimensionality reduction. It can take many variables with certain correlation into a set of new independent variables [<xref ref-type="bibr" rid="scirp.56586-ref6">6</xref>]. Use as few variables as possible to express as much information as possible, this is one of the basic principles of PCA. By clustering analysis, 144 dimensional data is mapped to a 3 dimensional space, then analysis. That is, select 3 principal components.</p><p>The following is the introduction about the calculation steps of PCA standardization processing of the original data.</p><p>Assuming the sample observation data matrix is</p><disp-formula id="scirp.56586-formula289"><graphic  xlink:href="http://html.scirp.org/file/56586x16.png"  xlink:type="simple"/></disp-formula><p>Then the original data were standardized according to the following methods</p><disp-formula id="scirp.56586-formula290"><graphic  xlink:href="http://html.scirp.org/file/56586x17.png"  xlink:type="simple"/></disp-formula><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x18.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.56586-formula291"><graphic  xlink:href="http://html.scirp.org/file/56586x19.png"  xlink:type="simple"/></disp-formula><p>Calculation of sample correlation coefficient matrix</p><p>For the sake of convenience, assuming that the original data standardization is still denoted by<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x20.png" xlink:type="simple"/></inline-formula>, the correlation coefficient matrix after data standardization is</p><disp-formula id="scirp.56586-formula292"><graphic  xlink:href="http://html.scirp.org/file/56586x21.png"  xlink:type="simple"/></disp-formula><p>where</p><disp-formula id="scirp.56586-formula293"><graphic  xlink:href="http://html.scirp.org/file/56586x22.png"  xlink:type="simple"/></disp-formula><p>The calculation of characteristic value and corresponding characteristic vector of relation coefficient matrix R.</p><p>Characteristic value: <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x23.png" xlink:type="simple"/></inline-formula></p><p>Characteristic vector:</p><disp-formula id="scirp.56586-formula294"><graphic  xlink:href="http://html.scirp.org/file/56586x24.png"  xlink:type="simple"/></disp-formula><p>Select the important principal components, and give the expression</p><p>Through principal component analysis, we can get p principal components, but because the variance of each principal component is decreasing, the quantity of information is declining. In practical analysis, according to the principal component contribution to select the first k principal components, usually the accumulative contribution rate can reach more than 85%, in order to ensure the integrated variables carry most information of original variables.</p><p>where</p><p>contribution rate <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x25.png" xlink:type="simple"/></inline-formula></p><p>The calculation of principal component scores</p><p>According to the original data standardization, the principal component values are calculated from the expression for each sample, you can get all new sample data in each principal component, that is, the principal component scores. The specific form is as follows:</p><disp-formula id="scirp.56586-formula295"><graphic  xlink:href="http://html.scirp.org/file/56586x26.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/56586x27.png" xlink:type="simple"/></inline-formula></p><p>Since we finished the clustering analysis, principal component analysis, then make the scatter of clustering results, by MATLAB. As shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p></sec><sec id="s4"><title>5. Simulation Analysis</title><p>In order to verify the rationality of K-means algorithm used in this paper, this paper uses MATLAB simulation analysis to explain.</p><p><xref ref-type="fig" rid="fig1">Figure 1</xref> is the customer load source data before clustering analysis, <xref ref-type="fig" rid="fig3">Figure 3</xref> is each clustering center after clustering, two picture comparison, all customer load 1 were clustered into the D category, the customer load 2 were clustered into the B category, the customer load 3 were clustered into A category, the customer load 4 were clustered into the C category, which can prove that our clustering method is reasonable.</p><p><xref ref-type="fig" rid="fig4">Figure 4</xref> depicts all points to the clustering center distance. Where</p><p>Subgraph A conveys the distance from all 4 kinds of customer load to A clustering center, we can see that all points of customer load 3 is nearest to A clustering center</p><p>Subgraph B conveys the distance from all 4 kinds of customer load to B clustering center, we can see that all points of customer load 2 is nearest to B clustering center</p><p>Subgraph C conveys the distance from all 4 kinds of customer load to C clustering center, we can see that all points of customer load 4 is nearest to C clustering center</p><p>Subgraph D conveys the distance from all 4 kinds of customer load to D clustering center, we can see that all points of customer load 1 is nearest to D clustering center</p><p>This is consistent with the definition of the clustering center, the relationship is also compatible with <xref ref-type="fig" rid="fig1">Figure 1</xref> and <xref ref-type="fig" rid="fig3">Figure 3</xref> exhibited by.</p><p>In the earlier analysis based K-means clustering and principal component analysis, draw the visualization map according to clustering analysis results, as <xref ref-type="fig" rid="fig5">Figure 5</xref>, from the figure, we can also directly obtained that the customer load can be divided into 4 categories, these four categories corresponding to four types of customer load types in the source data, further proved the correctness of this clustering analysis.</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Clustering center</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/56586x28.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> The distance between each point and each clustering center</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/56586x29.png"/></fig><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> The scatter of the clustering results</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/56586x30.png"/></fig></sec><sec id="s5"><title>6. Conclusion</title><p>In this paper, the K-means clustering method in data mining was used in power system on the clustering analysis power load of customer, and the method of principal component analysis was used on the clustering results visualization, fully prove the rationality and correctness of the clustering. To provide an important basis for the power system decision, and ensure the stable operation of power system.</p></sec><sec id="s6"><title>Cite this paper</title><p>Lin Liu, (2015) Cluster Analysis of Electrical Behavior. Journal of Computer and Communications,03,88-93. doi: 10.4236/jcc.2015.35011</p></sec></body><back><ref-list><title>References</title><ref id="scirp.56586-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Feng, X.P. and Zhang, T.F. (2010) Comparison of Four Clustering Methods. Microcomputer and Application, 16.</mixed-citation></ref><ref id="scirp.56586-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, M.M., Chen, J.Q., Wang, K., Peng, B. and Wu, H. (2014) The Multi Time Scale Coordinated Orderly Power Use Centralized Decision Method. Automation of Electric Power Systems, 38, 70-77.</mixed-citation></ref><ref id="scirp.56586-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Xu, J., Huang, Y.L. and Li, F. (2004) Research on Comparing the Sequential Learning with Batch Learning for K-Means. Computer Science, 31, 156-158.</mixed-citation></ref><ref id="scirp.56586-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Keogh, E. and Pazzani, M. (1998) An Enhanced Representation of Time Series Which Allows Fast and Accurate Classification, Clustering and Relevance Feedback. Proceedings of the 3rd International Conference of Knowledge Discovery and Data Mining, The Association for the Advancement of Artificial Intelligence, New York, 239-241.</mixed-citation></ref><ref id="scirp.56586-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, S.X., Liu, J.M., Zhao, B.Z. and Cao, J.P. (2013) Analysis of Cloud Computing of Residential Consumption Behavior Model Based on. Power System Technology, 37, 1542-1546.</mixed-citation></ref><ref id="scirp.56586-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Zhuo, J.W., Li, B.W., Wei, Y.S. and Qin, J. (2014) Application of MTLAB in Mathematical Modeling. The Beihang University Press, Beijing, 39-41.</mixed-citation></ref></ref-list></back></article>