The Bi-Level Optimal Conﬁguration Model of the CCHP System Based on the Improved FCM Clustering Algorithm

: To improve the comprehensive beneﬁts of the CCHP system, this paper proposes a bi-level optimal conﬁguration model of the CCHP system based on the improved FCM clustering algorithm. Firstly, based on the traditional FCM clustering algorithm, the entropy method is used to introduce the PFS index and the Vp index in a weighted form to achieve a comprehensive evaluation of the clustering effect. The effectiveness of the improved FCM algorithm is veriﬁed by analyzing the clustering process of the load and meteorological data using the improved FCM algorithm. Then the best cluster number and fuzzy coefﬁcient is found using the traversal method. Secondly, a bi-level conﬁguration optimization model is constructed. The outer layer is the conﬁguration optimization layer, and the inner layer is the operation optimization layer. The model is solved by combining the NSGA-II and PSO algorithms. Finally, a bi-level optimal conﬁguration model is constructed for actual cases, and the clustering results of the improved FCM algorithm are brought into the model. The example calculation analyses show that, compared with existing methods, the proposed method signiﬁcantly reduces the operating cost and carbon dioxide emissions of the CCHP microgrid.


Introduction
The combined cooling, heating, and power (CCHP) system is a multi-energy integrated supply system with cogeneration equipment as its core, including multiple distributed units, such as power generation and energy storage, and multiple energy forms, including cooling, heating, and electricity [1]. CCHP is established based on energy cascade utilization, using primary energy to drive generators to generate electricity and then recover waste heat through various types of waste-heat utilization equipment, which improves energy utilization, has lower energy costs, a higher safety, and better environmental protection [2]. In addition, in view of the uncertainty and intermittency of clean renewable energy, such as wind power and photovoltaics, CCHP could be combined with wind power and photovoltaics to provide effective support for the development and utilization of distributed energy [3].
The economical and efficient operation of CCHP needs to solve the problem of dynamic energy balance between system supply and user demand. The user-side demand changes in real-time, so when the configuration is unreasonable, not only can the energysaving effect not be achieved, but it will increase the system's energy consumption [4]. Therefore, according to the load changes and the actual needs of users, realizing the core equipment parameter design and system optimization configuration, reasonably planning on equipment investment in the early stages, and accurately matching the energy supply and demand relationship as well as the coupling relationship of energy flow are essential prerequisites for the efficient operation of the system [5].
Domestic and foreign research on the optimization configuration of CCHP is mainly reflected in the following three aspects: (1) Different optimization goals. The general optimization goals are energy-saving, economy, and environmental protection. Presently, some scholars also list other optimization goals into the scope of consideration; specifically, investment and operating costs [4][5][6], carbon dioxide emissions [4][5][6], energy utilization efficiency [4][5][6], load power supply reliability [7], clean energy consumption rate [8], etc.
(2) Different optimization objects. Due to the different use environments and purposes of CCHP, the input system's source-load characteristics and configuration focus are also different [9]. For example, there is an optimization configuration problem for buildings, such as hospitals, hotels, office buildings, and residential buildings [10], and there is also an optimization configuration problem of the CCHP microgrid for an industrial park or an island [11]. (3) Existing research mainly adopt two methods to deal with the operation mode while conducting configuration optimization: a given set of fixed operation modes and the construction of a bi-level model for operation optimization [4,12]. The former cannot give full play to the complementary cooperation capabilities between various devices (especially energy storage devices), and cannot achieve optimal operation, which, in turn, affects the configuration optimization of the system. The latter has the problem of a large amount of calculations [13].
The optimization of the CCHP configuration needs to consider many factors. In the optimization model, long-term relevant data are generally needed for evaluation; usually a large amount of weather, load, and other data. However, although a large amount of data can ensure optimization result accuracy as much as possible, it greatly increases the amount of calculations. To overcome this problem, scholars have proposed using the clustering algorithm to reduce scenes; replacing a large number of scene features with a small number of scenes [14].
Fuzzy C-means (FCM) is a widely used clustering method. Unlike hard clustering, in which each sample object can and can only be classified into one class, FCM introduces the concept of membership degrees. When applying FCM clustering, each sample can belong to two or more classes with a certain membership degree, which is very suitable for the clustering requirements of meteorological and load data [15]. However, FCM itself has many shortcomings; for example, it is difficult to determine the optimal cluster number and the choice of the fuzzy degree coefficients will significantly affect clustering results [16]. The fuzzy degree coefficients are an important parameter in FCM, and their values determine the clustering result's fuzzy degree. In most of the existing research and applications of FCM, the value of the fuzzy degree is usually the default value, but different fuzzy degree values have a significant impact on clustering results [17]. In addition to this, the value of a cluster number also has a very large impact on subsequent calculations. A cluster number that is too large is not conducive to solving calculations, and, if too small, a cluster number will not be comprehensive. The cluster validity index is often used to evaluate the quality of different cluster divisions [18]. Therefore, this paper proposes an improved FCM algorithm suitable for load and weather scene reduction, starting from the cluster validity test, which can automatically find the optimal cluster number and fuzzy degree coefficients according to data distributions.
The existing literature has proposed many improved FCM algorithms for different research problems. The authors in [19] proposed an improved Canopy-FCM algorithm based on the max-min principle in order to solve the problem of the FCM algorithm being sensitive to the initial clustering center. Use of the parallel computing framework of MapReduce helped to realize the improved Canopy-FCM algorithm. The experimental results showed that the improved Canopy-FCM algorithm based on MapReduce had better clustering quality and running speed than Canopy-FCM and FCM. The authors in [20] proposed generalized FCM and hierarchical FCM to solve the problem of FCM's insufficient robustness to image noise and the sensitivity of Euclidean distance in FCM to Processes 2021, 9,907 3 of 29 outliers. The experimental results proved the robustness and effectiveness of the proposed algorithm. In [21], an improved FCM clustering algorithm was proposed for the problems of long iteration times, long convergence times, and the low accuracy of the FCM clustering algorithm. In addition, the improved FCM was used for the clustering of web log data. In [22], the concept of similarity was proposed and replaced the traditional similarity matrix with a similarity matrix, which improved FCM. However, the improvements to FCM in the abovementioned literature only focuses on the influence of the number of clusters on the clustering result, and do not consider the influence of the fuzzy coefficient on the clustering results. Related research shows that the fuzzy coefficient has a significant impact on clustering results, and the default fuzzy coefficient is not necessarily the best.
The existing literature has proposed many methods to determine the optimal number of clusters. In [23], in order to solve the problem of the large amount of calculations in using the validity index to determine the number of clusters, a method of using the R package "kpeaks" to quickly determine the optimal number of clusters before the start of clustering was proposed. In [24], a new adaptive fuzzy C-means clustering algorithm (A-FCM) based on the idea of hierarchical clustering was proposed in view of the shortcomings of traditional fuzzy clustering algorithms, which cannot automatically determine the number of clusters. Numerical experiments showed that this method had better results. A novel fuzzy clustering validity evaluation index has been proposed in the literature [25], and the simulation experimental results show that the proposed validity function can effectively partition a dataset. However, the abovementioned literature did not consider the influence of fuzzy coefficients on the clustering results when searching for the optimal number of clusters.
According to different components, a cluster validity index can be divided into the cluster validity index considering the dataset's geometric structure information and the cluster validity index considering the membership degree [26]. Among these, the dataset's geometric structure information refers to the information extracted from data partition features, such as compactness, separation, connectivity, and overlap degree. At present, the commonly used cluster validity indices that considers the geometric structure of the dataset mainly include: Dunn, CH, G, CI, DB, Sil, I, CS, SF, COP, SV, OS, etc. [26,27]. The abovementioned indicators only consider the geometric structure information in the clustering results. The scope of the application of most indicators is not clear. They perform well on general datasets, but, on some complex datasets, such as those with more noise points or a large overlap between classes, it is not always possible to determine optimal clustering results nor the optimal cluster number. In addition, although these indicators that only consider data partition information can also be used to evaluate the effectiveness of fuzzy clustering, they do not perform well in fuzzy clustering because they do not consider the membership degree and fuzzy degree in fuzzy clustering.
The fuzzy clustering validity indices that consider membership degree mainly include: the partition coefficient (PC) and partition entropy (PE), normalized partition coefficient (NPC) and normalized partition entropy (NPE), KYI, Vp, OS, etc. [28][29][30][31][32]. The indicators above only consider the membership degree information in the fuzzy division, and they usually experience the following three problems: (1) with a change in cluster number, the trend is monotonous; (2) they are sensitive to the value of the fuzzy coefficient; and (3) because the geometric structure information of clustering is not used, these indicators lack a direct connection to the dataset's geometric structure. Although most of the validity indicators that consider membership degree are relatively simple and have a small number of calculations, they are not ideal in accurately evaluating the cluster's quality and correctly identifying the cluster number.
Based on the above analysis, this paper makes the following contributions to the studied problems: (1) It improves the FCM clustering algorithm and introduces the PFS index to evaluate a dataset's geometric structure validity and the Vp index is used to evaluate the membership degree validity. It combines the two indexes using the entropy method to comprehensively evaluate the clustering effectiveness. Afterward, the traversal method automatically finds the optimal cluster number and fuzzy degree coefficients according to the data distribution. (2) It constructs a bi-level CCHP optimization configuration model. The outer layer is the configuration optimization layer, and the inner layer is the operation optimization layer. Additionally, it brings the clustering results of the improved FCM algorithm into the model. For actual cases, the feasibility and effectiveness of the proposed method are verified through comparative analyses.

FCM Clustering Algorithm
FCM is a typical and widely used fuzzy clustering method. The algorithm is based on a given cluster number and cluster centers, and constantly updates the membership degree and cluster centers. The objective function is minimized until the cluster center no longer changes or the difference between the objective function values of the two iterations is within the allowable range [33]. The objective function of clustering is: where V is the cluster center matrix, The updated formulas of membership degree µ ij and cluster center v i are: FCM has the following shortcomings. First, the cluster number of the FCM needs to be given in advance, and different initialization condition settings will result in different clustering results. Second, the concept of the fuzzy degree is introduced in FCM, and different values of fuzzy degree have a greater impact on the performance of the algorithm. Therefore, it is necessary to determine the optimal number of clusters and fuzzy coefficients to avoid affecting the rationality and effectiveness of the clustering results.

Fuzzy Clustering Validity Index
According to the different components of the cluster validity index, it can be divided into a cluster validity index, considering the geometric structure information of the data set, and cluster validity index considering the degree of membership. The former can be used, not only for hard clustering, but also for validity tests of fuzzy clustering. The latter can only be used to evaluate the effectiveness of fuzzy clustering [26]. According to the analysis in the introduction, these two types of clustering effectiveness indicators have their own advantages and disadvantages, and they cannot be used on their own to comprehensively evaluate clustering results.
Therefore, in order to comprehensively evaluate the pros and cons of the FCM clustering results, this paper introduces PFS, considering the effectiveness of the geometric structure information clustering of the dataset and Vp considering the effectiveness of the membership degree clustering on the basis of the original algorithm. Additionally, the entropy method is used to combine the two in a weighted form to form a comprehensive clustering evaluation index. Pseudo F-statistics (PFS) is a statistic from the field of analysis of variance (ANOVA). For a sample of P (P ≥ 1) dimensional variables, "pseudo-F statistical ratio" is defined as follows [34]: where tr(S P B and tr(S P W are the traces of matrix S P B and S P W . m is the number of samples. c is the number of clusters. S P B and S P W are the inter-class and intra-class scatter matrices of P-dimensional variable samples, respectively, and their expressions are as follows: where x j is the j-th sample vector. v i is the cluster center of the i-th class. The expression of µ ij is as follows: In [34], it was pointed out that, as the c increases, the PFS value first rises and then decreases continuously. That is, the PFS may reach a maximum value at a certain c value, and that value is the optimal cluster number. Finding the optimal cluster number (c) is equivalent to finding the maximum PFS value.
The PFS index [34] and the CH+ index [35] have exactly the same structure. In [36], if was concluded that the performance of the CH+ index was the best in a comparative study of 30 clustering effectiveness indexes [34]. The authors of [33] performed a clustering result evaluation test for many clustering evaluation indicators, and the results proved that CH+ has a good performance. In [37], it was pointed out that the PFS index is closely related to data distribution.

Vp
The authors of [32] proposed the definition of the Vp index as: It can be seen that cluster validity measure Vp, is composed of two items. The first item reflects the compactness within a cluster. The closer kth sample x k is to a fuzzy cluster center, the closer the maximum membership degrees (max(µ ik )) is to the value of 1. Hence, fuzzy set max(µ ik ) is considered as a good indicator of the clustering quality for each pattern (x k ). On the other hand, the second item indicates the separation among clusters.
In fact, if x k is close to the fuzzy cluster center of v i , n ∑ k=1 min(µ ik , µ jk ) comes close to 0, and consequently fuzzy sets U i and U j are clearly separated. If n ∑ k=1 min(µ ik , µ jk ) is close to 1/p, x k belongs to all clusters that have equal membership degree and the fuzziest separation is unclear. The validity (Vp) criterion combines fuzzy compactness and separation.
The authors of [32] pointed out that, although the existing literature has proposed many clustering effectiveness indicators that consider the degree of membership, these indicators are not applicable when fuzzy parameter m changes in a relatively large range. When m changes in a relatively large range, the Vp index still has the ability to effectively Processes 2021, 9, 907 6 of 29 evaluate the results of FCM clustering. According to experimental results, the proposed validity index (Vp) works very well in the range of m ∈ [1. 5,5], which is quite usual in practice (m = 2 is, thus far, the most common choice) [32].

The Entropy Method
The entropy method is an objective method of determining weight, which borrows the concept of entropy from information theory. The information entropy in the information system is a measure of the disorder degree of information. The greater the information entropy, the higher the disorder degree of the information and the smaller the information's utility value. Conversely, the smaller the information entropy, the smaller the disorder degree of the information, and the greater the utility value of the information. For example, in terms of a certain attribute, when all schemes have the same result, this attribute plays a small role in decision-making. When all selected schemes have no difference under this attribute, this attribute can even be omitted.
For the obtained matrix, X = (x ij ) m×n , the specific steps of the entropy method are as follows [38]. m is the number of alternatives and n is the target number.
(1) Calculate the standardized matrix R = (r ij ) m×n , (2) Calculate the information entropy e j of each target, (3) Calculate the weight w j of each target,

The Calculation Process of Improved FCM Clustering Algorithm
On the basis of the traditional FCM clustering algorithm, this paper introduces the PFS index to evaluate the validity of the geometric structure of a dataset, and the Vp index is used to evaluate the validity of the membership degree. The entropy method is used to weight the two indicators to comprehensively evaluate the effect of clustering. Then, the best cluster number (c) and fuzzy coefficient (m) are determined using the traversal method. Supposing that the total amount of input data is n, to ensure the calculation speed, the clustering result is generally not greater than √ n. In addition, the authors of [39] pointed out that the best value range of m is [1,5]. The flow chart of the improved FCM clustering algorithm is shown in Figure 1.  (6) Calculate the comprehensive evaluation index vector, y3 = w1*y1 + w2*y2, corresponding to the fuzzy coefficient, m, and save it in matrix y. (7) Fuzzy coefficient m is increased by 0.1, and steps (2)-(6) are repeated until the fuzzy coefficient is greater than 5. Obtain comprehensive evaluation index matrix y under different fuzzy coefficients. (8) m and c corresponding to the largest comprehensive evaluation index in matrix y are the best fuzzy coefficients and cluster numbers. The clustering result obtained under this parameter is the best clustering result.
Processes 2021, 9, x FOR PEER REVIEW 7 of 31 [39] pointed out that the best value range of m is [1,5]. The flow chart of the improved FCM clustering algorithm is shown in Figure 1. The c and m corresponding to the largest PFS_Vp are the best cluster number and the best fuzzy coefficient

Clustering Validity Test for Load and Weather Data
Taking Xi'an, China, as an example, the improved FCM clustering algorithm was used to cluster the local temperature, light intensity, and load. Figure 2 shows the hourly temperature, light intensity in the region throughout 2019, and the electricity load data of the Westin Xi'an hotel.
It can be seen from Figure 2 that temperature, light intensity, and load have obvious time series characteristics, and their values change regularly with the change of seasons and moments. This means that a small number of typical scenes that can reflect the characteristics and laws of the overall data through scene clustering can be found.
Using the improved FCM algorithm proposed in this paper, the three types of data shown in Figure 2 are clustered separately, and the clustering results obtained are shown in Figure 3.

Clustering Validity Test for Load and Weather Data
Taking Xi'an, China, as an example, the improved FCM clustering algorithm was used to cluster the local temperature, light intensity, and load. Figure 2 shows the hourly temperature, light intensity in the region throughout 2019, and the electricity load data of the Westin Xi'an hotel. It can be seen from Figure 2 that temperature, light intensity, and load have obvious time series characteristics, and their values change regularly with the change of seasons and moments. This means that a small number of typical scenes that can reflect the characteristics and laws of the overall data through scene clustering can be found.
Using the improved FCM algorithm proposed in this paper, the three types of data shown in Figure 2 are clustered separately, and the clustering results obtained are shown in Figure 3. The probability of each clustering scene is shown in Table 1   It can be seen from Figure 2 that temperature, light intensity, and load have obvious time series characteristics, and their values change regularly with the change of seasons and moments. This means that a small number of typical scenes that can reflect the characteristics and laws of the overall data through scene clustering can be found.
Using the improved FCM algorithm proposed in this paper, the three types of data shown in Figure 2 are clustered separately, and the clustering results obtained are shown in Figure 3. The probability of each clustering scene is shown in Table 1  The probability of each clustering scene is shown in Table 1. 3.56% ---- 18 5.48% ---- Figure 4 shows the change relationship curve among the comprehensive evaluation index, fuzzy coefficient m, and number of clusters c when clustering the three data groups of temperature, light intensity, and load. 13 1. 3.56% ---- 18 5.48% ---- Figure 4 shows the change relationship curve among the comprehensive evaluation index, fuzzy coefficient m, and number of clusters c when clustering the three data groups of temperature, light intensity, and load.  Figure 4a shows that, with an increase in fuzzy coefficient m, the maximum cluster comprehensive evaluation index of the three types of data presents a trend of first increasing and then falling. The best evaluation indexes of temperature, light intensity, and load appear at m = 2.4, 3, and 4.4, respectively. Figure 4b shows the change in the comprehensive clustering evaluation index of the three types of data with the number of clusters (c) under the optimal fuzzy coefficient. It could be seen that with the increase in cluster number c, the comprehensive evaluation index of clustering of the three types of  Figure 4a shows that, with an increase in fuzzy coefficient m, the maximum cluster comprehensive evaluation index of the three types of data presents a trend of first increasing and then falling. The best evaluation indexes of temperature, light intensity, and load appear at m = 2.4, 3, and 4.4, respectively. Figure 4b shows the change in the comprehensive clustering evaluation index of the three types of data with the number of clusters (c) under the optimal fuzzy coefficient. It could be seen that with the increase in cluster number c, the comprehensive evaluation index of clustering of the three types of data presents a changing trend, first rising and then falling, where k = 18, 16, and 16, respectively, correspond to the maximum values of the evaluation index. Combining the two figures, the clustering evaluation method based on the weighting of the PFS index and the Vp index is effective at clustering temperature, light intensity, and load. There is a maximum value of evaluation index for these three types of data, and the best fuzzy coefficient and cluster number can be found.
It can be seen from Figure 2 that temperature, light intensity, and load have obvious time series characteristics, and their values change regularly with changes in seasons and moments. This means that a small number of typical scenes can be found that can reflect the characteristics and laws of the overall data through scene clustering.
In order to further analyze the calculation process and mechanism of the improved FCM algorithm, the following gives the changes of the main parameters in the algorithm when the improved FCM algorithm is applied to cluster the light intensity data.
(2) Keep the value of m unchanged, and calculate c = 2,3, . . . 19, using the traditional FCM algorithm to cluster the light intensity dataset, and the clustering results are recorded as S2, S3, . . . S19.  (2)-(5) until m is greater than 5 to stop the loop.  It can be seen that the PFS index is more sensitive to changes in c than in m. In Figure  5a, when c is greater than 7, the PFS index increases rapidly. When c is greater than 15, the PFS index is always at a higher value, and the change in m hardly affects the PFS index. This is mainly because the PFS index focuses on the evaluation of the geometric result information of the clustering results, and the number of clusters directly affects the geometric structure of the clustering results. When the number of clusters increases, the intra-class distance of the clustering result will tend to decrease, and the inter-class distance will tend to increase. This also shows that the PFS index lacks evaluation ambiguity, and it is impossible to evaluate the effectiveness of the fuzzy clustering method alone. Therefore, it is necessary to introduce an index to evaluate ambiguity. Figure 5b shows the Vp index value of the clustering results under different fuzzy It can be seen that the PFS index is more sensitive to changes in c than in m. In Figure 5a, when c is greater than 7, the PFS index increases rapidly. When c is greater than 15, the PFS index is always at a higher value, and the change in m hardly affects the PFS index. This is mainly because the PFS index focuses on the evaluation of the geometric result information of the clustering results, and the number of clusters directly affects the geometric structure of the clustering results. When the number of clusters increases, the intra-class distance of the clustering result will tend to decrease, and the inter-class distance will tend to increase. This also shows that the PFS index lacks evaluation ambiguity, and it is impossible to evaluate the effectiveness of the fuzzy clustering method alone. Therefore, it is necessary to introduce an index to evaluate ambiguity. Figure 5b shows the Vp index value of the clustering results under different fuzzy parameters and the number of clusters. Contrary to the PFS index, the Vp index is almost exclusively affected by the fuzzy coefficient and is extremely insensitive to the number of clusters. This is because the Vp index only considers the membership degree information of the clustering results when constructing, and it is impossible to comprehensively evaluate the quality of the clustering results. In addition, it can be seen that when m is less than 2, the impact on the Vp index is greater. When m is greater than 2, the Vp index is always at a higher value. This will directly affect the distribution of indicator weights. Figure 6 shows the two index weights obtained by using the entropy weight method under different fuzzy coefficients. It can be seen that the PFS index is more sensitive to changes in c than in m. In Figure  5a, when c is greater than 7, the PFS index increases rapidly. When c is greater than 15, the PFS index is always at a higher value, and the change in m hardly affects the PFS index. This is mainly because the PFS index focuses on the evaluation of the geometric result information of the clustering results, and the number of clusters directly affects the geometric structure of the clustering results. When the number of clusters increases, the intra-class distance of the clustering result will tend to decrease, and the inter-class distance will tend to increase. This also shows that the PFS index lacks evaluation ambiguity, and it is impossible to evaluate the effectiveness of the fuzzy clustering method alone. Therefore, it is necessary to introduce an index to evaluate ambiguity. Figure 5b shows the Vp index value of the clustering results under different fuzzy parameters and the number of clusters. Contrary to the PFS index, the Vp index is almost exclusively affected by the fuzzy coefficient and is extremely insensitive to the number of clusters. This is because the Vp index only considers the membership degree information of the clustering results when constructing, and it is impossible to comprehensively evaluate the quality of the clustering results. In addition, it can be seen that when m is less than 2, the impact on the Vp index is greater. When m is greater than 2, the Vp index is always at a higher value. This will directly affect the distribution of indicator weights. Figure 6 shows the two index weights obtained by using the entropy weight method under different fuzzy coefficients. It can be seen from the figure that when m is less than 2, the weight of the Vp index is greater. However, when m is greater than 2, the weight of the Vp index tends to be almost zero. This is because the entropy method is an objective weight calculation method that assigns weights according to data distribution. When m is less than 2, the Vp index changes drastically with the change in m, which has a greater impact on the selection of the best parameters. Therefore, the weight obtained by the entropy method is larger. When m is greater than 2, the value of Vp index is not much different under different m and c, which is of little significance for the selection of the best parameter. Therefore, the assigned weight is smaller. On the contrary, the weight of the PFS index starts to be smaller, and gradually increases with the increase in m.
The PFS index and the Vp index are divided by their respective maximum values, so that the value of each PFS index and the Vp index is between 0 and 1. The purpose of this is to make the values of these two indicators have the same size benchmark. After that, the two indicators are weighted according to the weights determined using the entropy method. The obtained comprehensive clustering effectiveness evaluation index PFS_Vp is shown in Figure 7.
Comparing Figures 5 and 7, it can be seen that PFS_Vp and PFS are roughly the same where m and c take larger values. Only when m and c are small can we see the effect of Vp on PFS_Vp. This is mainly due to the selection of weights.
From the above analysis, it can be seen that it is reasonable to introduce the PFS index and Vp index to comprehensively evaluate the clustering results in this paper. The focus of the evaluation of these two types of indicators is different. The objective weight selection through the entropy weight method can more comprehensively evaluate the pros and cons of fuzzy clustering results.
The PFS index and the Vp index are divided by their respective maximum values, so that the value of each PFS index and the Vp index is between 0 and 1. The purpose of this is to make the values of these two indicators have the same size benchmark. After that, the two indicators are weighted according to the weights determined using the entropy method. The obtained comprehensive clustering effectiveness evaluation index PFS_Vp is shown in Figure 7. From the above analysis, it can be seen that it is reasonable to introduce the PFS index and Vp index to comprehensively evaluate the clustering results in this paper. The focus of the evaluation of these two types of indicators is different. The objective weight selection through the entropy weight method can more comprehensively evaluate the pros and cons of fuzzy clustering results. Figure 8 shows a diagram of a typical CCHP microgrid structure. In the figure, a micro turbine is shown that uses natural gas as fuel to provide electricity to users. At the same time, the high-temperature flue gas and the heat carried by the jacket water can be transported to the absorption chiller and heat exchange device to meet a user's cold and heat load requirements.  Figure 8 shows a diagram of a typical CCHP microgrid structure. In the figure, a micro turbine is shown that uses natural gas as fuel to provide electricity to users. At the same time, the high-temperature flue gas and the heat carried by the jacket water can be transported to the absorption chiller and heat exchange device to meet a user's cold and heat load requirements.  In addition, photovoltaics, storage batteries, and urban power grids also participate in electrical energy supply. The heat storage tank can perform heat storage and release operations as required. Gas boilers and electric refrigeration units can supplement heating and cooling.

Micro Turbine
The micro turbine is the main energy supply equipment of the system and its operating efficiency varies greatly under different load rates. The mathematical model is as follows [4,40]: Figure 8. CCHP type microgrid structure diagram.
In addition, photovoltaics, storage batteries, and urban power grids also participate in electrical energy supply. The heat storage tank can perform heat storage and release operations as required. Gas boilers and electric refrigeration units can supplement heating and cooling.

Micro Turbine
The micro turbine is the main energy supply equipment of the system and its operating efficiency varies greatly under different load rates. The mathematical model is as follows [4,40]: where V mt is natural gas consumption, m 3 . P mt (t) is the output electric power, kW. is the waste heat power, kW. η mtP (t) and η mtQ (t) are power generation efficiency and waste heat efficiency, respectively. L gas is the calorific value of natural gas. In this paper, L gas takes the low calorific value of natural gas 9.7 (kW · h)/m 3 . ∆t is the scheduling time scale, and this value takes 1 h. Taking MWM's TCG2016 V16C micro gas turbine as an example, according to actual test data, using MATLAB to perform polynomial curve fitting, the functional relationship between power generation efficiency, waste heat efficiency, and the load factor can be obtained as follows.
where P mt0 is the rated power of the micro turbine, kW.

Absorption Refrigeration Unit and Electric Refrigeration Unit
The mathematical model of the absorption chiller is as follows [41]: where Q ac is the cooling power, kW. Q ac_in is the input heat power, kW. COP ac is the coefficient of refrigeration. The relationship between the cooling power of an electric refrigerator and the power consumption is [41] Q ec = COP ec P ec where Q ec is the cooling power, kW. P ec is the power consumption, kW. COP ec is the energy efficiency ratio.

Photovoltaic Panel
The power output of photovoltaic cells is related to light intensity and ambient temperature [42]: where P pv is photovoltaic power, kW. G is the light intensity, W · m −2 . P STC is the maximum test power under standard test conditions, kW. k pv is the power temperature coefficient, %/ • C. T c is the working temperature of the battery panel, and this value can be measured by ambient temperature T r .

Battery and Thermal Storage Tank
The mathematical model of energy storage devices, such as batteries and heat storage tanks, is [43]: where S s (t) is the remaining energy of the energy storage device during t period, kWh. P s,chr (t) and P s,dis (t) are the input and output power of energy storage in t period, kW. τ s is the loss coefficient of energy storage. η s,chr and η s,dis are the energy input and output conversion efficiency of energy storage, respectively.

Gas Boiler and Heat Exchanger
The mathematical model of gas boiler and heat exchange device is as follows [43]: where Q ex_in is the input heat power of the heat exchanger, kW. Q ex is the output heat power of the heat exchanger, kW. Q gb is the heating power of the gas boiler, kW. V gb is the gas consumption of gas boiler, m 3 . η gb and η ex are the efficiency of the gas boiler and heat exchanger, respectively.

System Energy Flow
According to the microgrid structure and the mathematical model of each device, the energy flow calculation model is constructed as follows: where k mt is the proportion of the waste heat of the micro turbine distributed to the absorption chiller for refrigeration. Q load.c and Q load.h are, respectively, the values of cold and heat load, kW. P load.c is the value of the electrical load other than the power consumption of the electric refrigerator, kW. P op is the system's own electric power, kW. k op is the system's own electricity consumption rate, kW. P grid is the power purchased by the grid, kW. Q hs is the heat release power of the heat storage tank, kW. P es is the battery discharge power, kW. P pv is the photovoltaic output power, kW.

Decision Variables and Objective Function
The outer layer optimization model takes the rated installation capacity of the photovoltaic, the rated installation capacity and the rated maximum charge and discharge power of the battery, and the rated installation capacity of the thermal storage tank as the optimization variables. Each objective and its function expression are as follows.
Objective 1: Annual conversion investment cost and annual operation and maintenance cost are minimized.
where y in is the annual conversion investment cost of the microgrid. k is the total number of scenes. T is the number of time periods divided in a day. y t op,s is the operating cost of the microgrid at time t in the s scenario, in yuan.
The specific expression of annual conversion investment cost is as follows: where p pvN and E hsN are the rated installation capacities of photovoltaic and thermal storage tanks, kW, kWh. p esN and E esN are the maximum charge and discharge power and rated installation capacity of the battery, kW, kWh. k pv and k esE are the unit capacity cost of photovoltaic and thermal storage tank, yuan/kW. k esp , k esE , L es are the unit power cost, unit capacity cost and service life of the battery, yuan/kW, yuan/kWh. n xt is the planned service life of the system, in years. l is the discount rate. Objective 2: Minimum annual carbon dioxide emissions f 2 .
where f 2 is the total carbon dioxide emissions of the system, kg. P s is the scene probability. F co 2 ,gas (t, s) and F co 2 ,grid (t, s) are, respectively, the carbon dioxide emissions produced by gas and the equivalent carbon dioxide emissions of the electricity purchased by the power grid, kg. For a certain scene, the calculation formula is as follows: F co 2 ,gas t) = K co 2 ,gas V gas (t) F co 2 ,grid t) = K co 2 ,grid P grid (t)∆t (22) where K co 2 ,gas and K co 2 ,grid are the carbon dioxide conversion coefficient of natural gas and utility power, kg/Nm 3 , kg/kWh.

Restrictions
Taking the actual conditions of funds, venues, etc., into account, the construction of microgrids has the following restrictions:

Solving Algorithm and Multi-Attribute Decision Making
The optimization configuration model of the upper microgrid constructed in this section is a multi-objective nonlinear model. For this model, the NSGA-II is used to solve the model. The solution result of the multi-objective problem is a series of Pareto solutions. In this paper, the fuzzy multiple attribute decision-making method is used to select the best compromise solution. The specific formula is as follows [38]:

Decision Variables and Objective Function
The inner optimization model is established on the basis of the capacity configuration of each device in the microgrid given by the outer model. The power generation of the micro turbine, the ratio of waste heat distribution, the charge and discharge power of the battery, and the heat storage and release power of the heat storage tank are selected as the optimization variables at various times of the day, and the daily operation and maintenance costs of the system are minimized as the goal. The function expression is as follows: where f 1 is the total operating cost of the system, in yuan. P s is the probability of scene s. T is the period of the scheduling period. k is the number of scenes. F gas (t, s), F grid (t, s) and F op (t, s) are, respectively, the system fuel cost, grid power purchase cost, and operation and maintenance cost in t period under the s scenario, in yuan. The specific expression for a certain scene is as follows: where C gas and C grid are the price of natural gas and electricity, yuan/m 3 . C mt , C pv , C ac , C ec , C ex , C es and C hs are the operation and maintenance costs of micro turbine, photovoltaic, absorption chillers, electric chillers, heat exchangers, batteries, and heat storage tanks, yuan/kW.

Constraints and Solving Algorithms
The operating constraints of each device are as follows: where P es,chr.max and P es,dis.max are the maximum charging and discharging power of the battery, kW. θ es.min and θ es.max are the ratio of the minimum and maximum load capacity of the battery. The energy balance constraint expression is as follows: P pv (t) + P mt (t) + P grid (t) + P es.chr (t) = P L (t) + P ec (t) + P op (t) + P es.dis (t) The optimization operation model of the inner microgrid constructed in this section is a nonlinear optimization model. For this model, this paper uses the PSO algorithm to solve it.

Model Flow Chart
The calculation process of the CCHP bi-level optimization configuration model proposed in this paper is shown in Figure 9.  First, the improved FCM algorithm is used to cluster meteorological data such as temperature, light intensity, and cold, heat, and electrical load data on a monthly basis to obtain typical scenarios. After that, the bi-level optimal configuration model is constructed and solved. Finally, after the model is solved and the Pareto front obtained, the fuzzy multi-attribute decision-making method is used to select the best compromise solution.
The bi-level model's solution process is: First, the outer model randomly generates a population and sends it to the inner model. Second, the inner model uses the PSO algorithm to solve the optimal operation plan based on the equipment capacity information input from the outer layer and returns it to the outer model according to the weather and load data. Third, the outer model performs non-dominated sorting and crowding calculation according to the operation plan returned by the inner model, and performs selection, crossover, and mutation to generate a new population. Finally, the new population is sent to the inner model for cyclic iterative calculation. When the number of iterations reaches a specified value, the loop stops, and the final generation population is output.

Description of the Problem
Taking the Westin Hotel in Xi'an, China, as an example, the methods described in this paper are used to optimize the configuration of electricity, thermal energy storage, and photovoltaics to achieve maximum economy and environmental protection. The First, the improved FCM algorithm is used to cluster meteorological data such as temperature, light intensity, and cold, heat, and electrical load data on a monthly basis to obtain typical scenarios. After that, the bi-level optimal configuration model is constructed and solved. Finally, after the model is solved and the Pareto front obtained, the fuzzy multi-attribute decision-making method is used to select the best compromise solution.
The bi-level model's solution process is: First, the outer model randomly generates a population and sends it to the inner model. Second, the inner model uses the PSO algorithm to solve the optimal operation plan based on the equipment capacity information input from the outer layer and returns it to the outer model according to the weather and load data. Third, the outer model performs non-dominated sorting and crowding calculation according to the operation plan returned by the inner model, and performs selection, crossover, and mutation to generate a new population. Finally, the new population is sent to the inner model for cyclic iterative calculation. When the number of iterations reaches a specified value, the loop stops, and the final generation population is output.

Description of the Problem
Taking the Westin Hotel in Xi'an, China, as an example, the methods described in this paper are used to optimize the configuration of electricity, thermal energy storage, and photovoltaics to achieve maximum economy and environmental protection. The hourly load and weather data for the hotel in 2019 are shown in Section 2.5 The existing CCHP system parameters of the hotel are shown in Table 3. Currently, the Westin Hotel CCHP system does not have electricity, thermal energy storage, and photovoltaic installations. The energy storage device can effectively suppress the fluctuation in the load, and realize the decoupling of energy production and consumption in time, thereby effectively solving the contradiction of energy supply and demand mismatch. Photovoltaic power generation is clean, environmentally friendly, and economical, which can reduce the cost of power supplies in hotels. To improve the comprehensive operating benefits of the hotel's CCHP system, this paper will use the proposed method to equip it with suitable capacity batteries, thermal storage tanks, and photovoltaics on the basis of existing equipment to maximize economic and environmental benefits.

Load and Weather Data Clustering Based on Improved FCM Algorithm
The 2019 Westin Hotel's cold, heating, electrical load, temperature, and light intensity meteorological data is taken as a whole, and then the improved FCM algorithm described in Section 2.4 is used to progressively reduce the scene. The results of the reduction are shown in Figure 10.
The relationship among the fuzzy coefficient, the cluster number, and the comprehensive evaluation index during the reduction process is shown in Figure 11.

Optimization Configuration Results
A bi-level optimal configuration model is constructed as described in Section 3, and the reduced scene is input into the model. The resulting Pareto frontier is shown in Figure 12. The resulting Pareto solution set is shown in Table 4.
It can be seen from Figure 12a that the average annual investment operating cost and the annual carbon dioxide emissions are contradictory, and there is no ideal optimal solution. According to the multi-attribute decision-making method described in Section 4.1.3, the comprehensive rating coefficient (w) of each scheme is calculated, as shown in Figure 12b. It can be seen from the figure that the solution of the No. 46 scheme has the largest w value, so the No. 46 solution was selected as the best compromise solution. environmental benefits.

Load and Weather Data Clustering Based on Improved FCM Algorithm
The 2019 Westin Hotel's cold, heating, electrical load, temperature, and light intensity meteorological data is taken as a whole, and then the improved FCM algorithm described in Section 2.4 is used to progressively reduce the scene. The results of the reduction are shown in Figure 10. The relationship among the fuzzy coefficient, the cluster number, and the comprehensive evaluation index during the reduction process is shown in Figure 11.

Optimization Configuration Results
A bi-level optimal configuration model is constructed as described in Section 3, and the reduced scene is input into the model. The resulting Pareto frontier is shown in Figure  12. The resulting Pareto solution set is shown in Table 4.

Optimization Configuration Results
A bi-level optimal configuration model is constructed as described in Section 3, and the reduced scene is input into the model. The resulting Pareto frontier is shown in Figure  12. The resulting Pareto solution set is shown in Table 4.

Analysis and Comparison
To verify the effectiveness of the method proposed in this paper, it is compared with the single-level optimization configuration model based on a given operation mode and the configuration model based on the traditional FCM clustering algorithm.

Compared with a Single-Tier Optimal Configuration Model Based on a Given Operating Mode
The bi-level optimization configuration model proposed in this paper is compared with the single-level optimization configuration model of the given operation mode in the literature [44]. The two commonly used operating modes are as follows.
(1) Following the electrical load (FEL) mode. The gas generator set in the CCHP system determines its power generation capacity according to the building's heat under the premise of not exceeding the design capacity. When the heat generated by the system does not meet the demand for cooling and heating loads, it is supplemented by electric refrigerators and electric boilers. When the power generated by the system does not meet the electrical load demand, it is supplemented by the external grid.
Since there is no excess heat problem in the system's operating mode at this time, the energy storage device is not considered. (2) Following the thermal load (FTL) mode. The gas generator set of the CCHP system determines its power generation capacity according to the electrical load required by the building under the premise of not exceeding its design capacity. When the power generated by the system does not meet the electrical load demand, it is supplemented by the external grid. When the system generates excess heat, the excess heat is stored in the energy storage device. When the heat generated by the system does not meet the demand for cooling and heating loads, it is first replenished by the energy storage device. If it is still not satisfied, it will be supplemented by an electric boiler and an electric refrigerator.
In addition to replacing the inner optimization operation model with a given operation mode, other processing methods of the single-layer optimization model include data clustering, the energy flow calculation model of the CCHP system, the construction of the outer model and the solving algorithm are the same as the two-layer optimization optimization model. The resulting Pareto solution set is shown in Figure 13. Since there is no excess heat problem in the system's operating mode at this time, the energy storage device is not considered. (2) Following the thermal load (FTL) mode. The gas generator set of the CCHP system determines its power generation capacity according to the electrical load required by the building under the premise of not exceeding its design capacity. When the power generated by the system does not meet the electrical load demand, it is supplemented by the external grid. When the system generates excess heat, the excess heat is stored in the energy storage device. When the heat generated by the system does not meet the demand for cooling and heating loads, it is first replenished by the energy storage device. If it is still not satisfied, it will be supplemented by an electric boiler and an electric refrigerator.
In addition to replacing the inner optimization operation model with a given operation mode, other processing methods of the single-layer optimization model include data clustering, the energy flow calculation model of the CCHP system, the construction of the outer model and the solving algorithm are the same as the two-layer optimization optimization model. The resulting Pareto solution set is shown in Figure 13. It can be seen that the overall inferiority of the Pareto frontier obtained by the optimal configuration model under a given operating mode is the same as the method proposed in this article. The compromise solution selected from the Pareto solution set is shown in Figure 13b. It can be seen from the figure that the average annual investment and operating costs of the optimization configuration scheme obtained by the method proposed in this paper are 10.78% lower than the FEL model and 4.99% lower than the FTL model; the annual carbon dioxide emissions are 6.70% lower than the FEL model and 18.36% lower than the FTL model. It can be seen that the overall inferiority of the Pareto frontier obtained by the optimal configuration model under a given operating mode is the same as the method proposed in this article. The compromise solution selected from the Pareto solution set is shown in Figure 13b. It can be seen from the figure that the average annual investment and operating costs of the optimization configuration scheme obtained by the method proposed in this paper are 10.78% lower than the FEL model and 4.99% lower than the FTL model; the annual carbon dioxide emissions are 6.70% lower than the FEL model and 18.36% lower than the FTL model.

Compared with the Configuration Model Based on the Traditional FCM Clustering Algorithm
The traditional FCM algorithm is used to cluster the graph data. m = 2, and the cluster center is set to a maximum value of 19. The clustering results are shown in Figure 14. The obtained scene reduction is brought into the optimization model, and the results are shown in Figure 15.
It can be seen from Figure 15 that the Pareto frontier based on the configuration model of the traditional FCM clustering algorithm is, overall, still inferior to the method proposed in this article. As in the previous section, the compromise solution is selected from it. It can be calculated that the average annual investment and operating cost of the optimized configuration scheme obtained by the method proposed in this paper are reduced by 10.25% and the annual carbon dioxide emissions are reduced by 0.83%.
To further verify the superiority of the improved FCM clustering algorithm proposed in this paper compared with the traditional FCM clustering algorithm, in solving the problem of CCHP optimization configuration, this paper inputs the actual load and weather data from 2019, as well as the two optimized configuration schemes obtained, into the inner optimization operation model described in Section 4.2. Then the actual operating costs and carbon dioxide emissions are calculated under the two schemes. The obtained scene reduction is brought into the optimization model, and the results are shown in Figure 15.  It can be seen from Figure 15 that the Pareto frontier based on the configuration model of the traditional FCM clustering algorithm is, overall, still inferior to the method proposed in this article. As in the previous section, the compromise solution is selected from it. It can be calculated that the average annual investment and operating cost of the optimized configuration scheme obtained by the method proposed in this paper are reduced by 10.25% and the annual carbon dioxide emissions are reduced by 0.83%.
To further verify the superiority of the improved FCM clustering algorithm proposed in this paper compared with the traditional FCM clustering algorithm, in solving the problem of CCHP optimization configuration, this paper inputs the actual load and weather data from 2019, as well as the two optimized configuration schemes obtained, into the inner optimization operation model described in Section 4.2. Then the actual operating costs and carbon dioxide emissions are calculated under the two schemes. Figure 16 shows the daily operating cost and the total annual cost under the two configuration schemes. It can be seen from Figure 16 that, in most cases, compared with the traditional FCM algorithm, the operating cost of the optimized configuration scheme obtained by applying the improved FCM algorithm is lower. The annual operating cost dropped by 358,962 yuan, with a drop rate of 4.68%. The average annual investment cost dropped by 140,090 yuan, and the rate of decrease was 10.07%. The total cost fell by 499,052 yuan, a rate of decrease of 5.51%. Figure 17 shows the daily carbon dioxide emissions and the total annual carbon dioxide emissions under the two configuration schemes. It can be seen from Figure 16 that, in most cases, compared with the traditional FCM algorithm, the operating cost of the optimized configuration scheme obtained by applying the improved FCM algorithm is lower. The annual operating cost dropped by 358,962 yuan, with a drop rate of 4.68%. The average annual investment cost dropped by 140,090 yuan, and the rate of decrease was 10.07%. The total cost fell by 499,052 yuan, a rate of decrease of 5.51%. Figure 17 shows the daily carbon dioxide emissions and the total annual carbon dioxide emissions under the two configuration schemes.
It can be seen from Figure 17 that, in most cases, compared to the traditional FCM algorithm, the optimization configuration scheme obtained by applying the improved FCM algorithm has lower carbon dioxide emissions. The total emissions in three months fell by 365,065 kg, a decrease rate of 4.19%. It can be seen from Figure 17 that, in most cases, compared to the traditional FCM algorithm, the optimization configuration scheme obtained by applying the improved FCM algorithm has lower carbon dioxide emissions. The total emissions in three months fell by 365,065 kg, a decrease rate of 4.19%.
The analysis of the above examples fully shows that, in solving the problem of CCHP optimal configuration, compared with the traditional FCM clustering algorithm, the improved FCM clustering algorithm proposed in this paper has a better clustering effect. The method can better reflect the overall characteristics and laws of weather and load, so the configuration scheme obtained by the optimization model is more suitable in practice, and the economic and environmental protection of the CCHP system are improved.

Comparison of System Operating Costs before and after Optimized Configuration
In order to verify the effectiveness of the optimized configuration of the system, this section compares the CCHP system without electricity, thermal energy storage devices, and photovoltaics with the optimized configuration. The operating costs of the two systems are calculated in 18 typical scenarios obtained by clustering. The calculation results are shown in Figure 18. The analysis of the above examples fully shows that, in solving the problem of CCHP optimal configuration, compared with the traditional FCM clustering algorithm, the improved FCM clustering algorithm proposed in this paper has a better clustering effect. The method can better reflect the overall characteristics and laws of weather and load, so the configuration scheme obtained by the optimization model is more suitable in practice, and the economic and environmental protection of the CCHP system are improved.

Comparison of System Operating Costs before and after Optimized Configuration
In order to verify the effectiveness of the optimized configuration of the system, this section compares the CCHP system without electricity, thermal energy storage devices, and photovoltaics with the optimized configuration. The operating costs of the two systems are calculated in 18 typical scenarios obtained by clustering. The calculation results are shown in Figure 18. It can be seen from Figure 17 that, in most cases, compared to the traditional FCM algorithm, the optimization configuration scheme obtained by applying the improved FCM algorithm has lower carbon dioxide emissions. The total emissions in three months fell by 365,065 kg, a decrease rate of 4.19%.
The analysis of the above examples fully shows that, in solving the problem of CCHP optimal configuration, compared with the traditional FCM clustering algorithm, the improved FCM clustering algorithm proposed in this paper has a better clustering effect. The method can better reflect the overall characteristics and laws of weather and load, so the configuration scheme obtained by the optimization model is more suitable in practice, and the economic and environmental protection of the CCHP system are improved.

Comparison of System Operating Costs before and after Optimized Configuration
In order to verify the effectiveness of the optimized configuration of the system, this section compares the CCHP system without electricity, thermal energy storage devices, and photovoltaics with the optimized configuration. The operating costs of the two systems are calculated in 18 typical scenarios obtained by clustering. The calculation results are shown in Figure 18. It can be seen from Figure 18a that the daily operating cost of the system after configuration in the 18 typical scenarios is less than the operating cost of the system before the configuration. This is mainly because the system can use sunlight to generate electricity after the optimized configuration, and the two energy storage devices of electricity and heat realize a reasonable adjustment of energy, avoiding a waste of energy. Figure 18b shows the total cost before and after the daily configuration of the 18 scenarios. Compared with before the configuration, the operating cost after configuration is reduced by 21.63%, and the increased equipment cost is allocated to each day, and the total cost after configuration is reduced by 4.95%.
It can be seen from Figure 19a that the daily carbon dioxide emissions of the system after configuration in the 18 typical scenarios are all less than before the configuration. This is mainly because the optimized configuration of the system uses clean solar energy, which reduces the use of natural gas and city electricity. In addition, the energy storage device realizes reasonable energy adjustment and avoids energy waste. Figure 19b shows the total carbon dioxide emissions before and after the daily configuration of the 18 scenarios. Compared with before configuration, carbon dioxide emissions after the configuration are reduced by 5.31%. It can be seen from Figure 18a that the daily operating cost of the system after configuration in the 18 typical scenarios is less than the operating cost of the system before the configuration. This is mainly because the system can use sunlight to generate electricity after the optimized configuration, and the two energy storage devices of electricity and heat realize a reasonable adjustment of energy, avoiding a waste of energy. Figure 18b shows the total cost before and after the daily configuration of the 18 scenarios. Compared with before the configuration, the operating cost after configuration is reduced by 21.63%, and the increased equipment cost is allocated to each day, and the total cost after configuration is reduced by 4.95%.
It can be seen from Figure 19a that the daily carbon dioxide emissions of the system after configuration in the 18 typical scenarios are all less than before the configuration. This is mainly because the optimized configuration of the system uses clean solar energy, which reduces the use of natural gas and city electricity. In addition, the energy storage device realizes reasonable energy adjustment and avoids energy waste. Figure 19b shows the total carbon dioxide emissions before and after the daily configuration of the 18 scenarios. Compared with before configuration, carbon dioxide emissions after the configuration are reduced by 5.31%. By comparing the operation of the system before and after the configuration, it can be seen that it is necessary for the CCHP system to have a reasonable configuration of photovoltaics, and electric and thermal energy storage as it can significantly reduce system operating costs and carbon dioxide emissions, and better take advantage of the high energy efficiency, energy saving and environmental protection of the CCHP system.

Conclusions
To address the problem that the optimal fuzzy coefficients and the number of clusters are difficult to determine in the FCM algorithm, this paper introduces the PFS index to evaluate the geometric information of clustering results and the Vp index to evaluate the affiliation information based on the traditional FCM algorithm from the evaluation of clustering effectiveness. The optimal fuzzy coefficient and the number of clusters are found. The validity test of the improved algorithm shows that (1) the evaluation focus of PFS and Vp indicators are different. The PFS indicator is more sensitive to the number of clusters. The VP indicator is more sensitive to smaller fuzzy coefficients and extremely By comparing the operation of the system before and after the configuration, it can be seen that it is necessary for the CCHP system to have a reasonable configuration of photovoltaics, and electric and thermal energy storage as it can significantly reduce system operating costs and carbon dioxide emissions, and better take advantage of the high energy efficiency, energy saving and environmental protection of the CCHP system.

Conclusions
To address the problem that the optimal fuzzy coefficients and the number of clusters are difficult to determine in the FCM algorithm, this paper introduces the PFS index to evaluate the geometric information of clustering results and the Vp index to evaluate the affiliation information based on the traditional FCM algorithm from the evaluation of clustering effectiveness. The optimal fuzzy coefficient and the number of clusters are found. The validity test of the improved algorithm shows that (1) the evaluation focus of PFS and Vp indicators are different. The PFS indicator is more sensitive to the number of clusters. The VP indicator is more sensitive to smaller fuzzy coefficients and extremely insensitive to the number of clusters. (2) The method of using the entropy weighting method to weigh PFS indicators and Vp indicators is effective. On the one hand, the evaluation effects of these two indicators can complement each other. On the other hand, the optimal fuzzy coefficients and the number of clusters that make the comprehensive evaluation index reach the maximum value are found in the clustering test on the actual data. In addition, the method of determining the optimal number of clusters and the optimal fuzzy coefficient proposed in this paper does not contain any subjective factors. The entropy weight method used to determine the weight is a completely objective method to determine the weight according to the law of data distribution.
Based on the improvement of the clustering algorithm, we constructed a bi-layer optimal configuration model for the optimal configuration problem of the CCHP system. The model takes the clustering results of load and meteorological data using the improved FCM algorithm as the input. The best CCHP system configuration solution is taken as the output. The algorithm analysis shows that the optimized configuration method obtained by the improved FCM algorithm is better than the traditional FCM clustering algorithm. This shows that the improved FCM algorithm is more suitable for load and weather scenario reductions for the CCHP system optimization configuration problem. It is able to find typical scenarios that are more consistent with the overall characteristics and variation patterns of load and meteorology.
The starting point of the improved FCM algorithm proposed in this paper is to better serve the problem of optimal configuration of the CCHP system. Algorithm analysis also verifies that the improved algorithm is effective for the results of this problem. However, whether the improved FCM algorithm is applicable to clustering random datasets without physical background needs further validation. In addition, both the PFS index and the Vp index are evaluation indices that perform better individually, but it cannot be determined if their combination is necessarily better than other possible combinations, which remains to be studied.  Data Availability Statement: The study did not report any data.

Conflicts of Interest:
The authors declare no conflict of interest. Following the thermal load m the fuzzy coefficient c the number of clusters V mt natural gas consumption of the micro turbine P mt the electric power output of the micro turbine Q mt the waste heat power of the micro turbine η mtP power generation efficiency of the micro turbine η mtQ waste heat efficiency of the micro turbine L gas the calorific value of natural gas P mt0 the rated power of the micro turbine Q ac the cooling power of absorption refrigeration unit