An Orderly Power Utilization Scheme Based on an Intelligent Multi-Agent Apanage Management System

Orderly power utilization (OPU) is an important measure to alleviate contradiction between supply and demand in a power system peak load period. As a load management system becomes smarter, it is necessary to fully explore the interactive ability among users and make schemes for OPU more applicable. Therefore, an intelligent multi-agent apanage management system that includes a mutual aid mechanism (MAM) is proposed. In the decision-making scheme, users’ participation patterns and the potential of peak shifting and willingness are considered, as well as the interests of both power consumers and power grid are comprehensively considered. For residential users, the charging time for their electric vehicles (EVs) is managed to consume the locally distributed power generation. To fully exploit user response potential, the algorithm for improved clustering by fast search and find of density peaks (I-CFSFDP), i.e., clusters the power load curve, is proposed. To conduct electrical mutual aid among users and adjust the schemes reasonably, a multi-objective optimization model (M2OM) is established based on the cluster load curves. The objectives include the OPU control cost, the user’s electricity cost, and the consumption of distributed photovoltaic (PV). Our results of a case study show that the above method is effective and economical for improving interactive ability among users. Agents can coordinate their apanage power resources optimally. Experiments and examples verify the practicability and effectiveness of the improved algorithm proposed in this study.


Introduction
The smart grid plays an important role in improving the efficiency and quality of power supply. The peak clipping mode is widely used by power companies [1], but there are problems, such as severe peak power consumption and power shortage [2]. These problems can be solved by demand-side management (DSM), which mitigates power imbalance during peak load. The orderly power utilization (OPU) with the characteristic of "interaction" becomes the latest development direction of DSM [3].
DSM can improve patterns and efficiency of power consumption by stimulating demand-side resources (DSR) [4]. DSR includes electric vehicles (EVs), air conditioners, factories and companies, and other public places. The battery of an EV has energy storage characteristics that make it different from the conventional power load [5]. In the background of peak and valley electricity price, an effective guidance scheme can be developed through the load forecasting mechanism to make the (1) The initiative IMAS can achieve coordinated optimization within the jurisdiction, make decisions and adjustments to the power usage plan, and improve the efficiency of information transmission; (2) The proposed MAM can participate in the adjustment of the OPU plan, realize the mutual coordination between users, improve the user's interactive ability and establish a aid order table to ensure the fairness of electricity consumption; (3) The proposed I-CFSFDP algorithm can effectively reduce the difficulty of modeling and solving, and can fully consider its time based on uncertain modeling of electricity consumption behavior; (4) The established multi-objective OPU decision model comprehensively considers the interests of both users and the grid, users' willingness and taps the potential of users. FSS is used to solve the proposed model. It is verified by the load data from the Open Energy Information (Open EI) website of the U.S. Department of Energy [26]. The results show that the model is reasonable and the algorithm is effective. Definition of nomenclature are showed in Table 1.

System Architecture
According to the physical structure, a power grid is divided into three layers, "system-node-user". The node contains multiple users, while the system includes all nodes in the power grid. Then, the IMAS is established for the system, node and user to create the mathematical model. Finally, through interactions among agents, the allocation of the OPU gap indicators is completed. The structure is shown in Figure 1. considers the participation patterns, willingness of users, as well as the interests of both the power grid and users. The goal of the model is to minimize the total cost of both OPU control and users' electricity consumption and maximize the local consumption of the distributed photovoltaic (PV). The forbearing stratified sequencing (FSS) method is used to solve the model [25]. We fully consider the user's willingness, participation patterns and user's interests as compared with other decisionmaking methods. The focus is on the user's active features. Through a large number of comparative analysis, we show that the IMAS's OPU scheme can reduce peak power consumption, improve execution efficiency, and fully exploit the potential of user interaction. Considering the above issues, we proposes an IMAS with a MAM for OPU in a multilayer power grid. The major contributions are summarized as follows: (1) The initiative IMAS can achieve coordinated optimization within the jurisdiction, make decisions and adjustments to the power usage plan, and improve the efficiency of information transmission; (2) The proposed MAM can participate in the adjustment of the OPU plan, realize the mutual coordination between users, improve the user's interactive ability and establish a aid order table to ensure the fairness of electricity consumption; (3) The proposed I-CFSFDP algorithm can effectively reduce the difficulty of modeling and solving, and can fully consider its time based on uncertain modeling of electricity consumption behavior; (4) The established multi-objective OPU decision model comprehensively considers the interests of both users and the grid, users' willingness and taps the potential of users. FSS is used to solve the proposed model. It is verified by the load data from the Open Energy Information (Open EI) website of the U.S. Department of Energy [26]. The results show that the model is reasonable and the algorithm is effective. Definition of nomenclature are showed in Table 1.

System Architecture
According to the physical structure, a power grid is divided into three layers, "system-nodeuser". The node contains multiple users, while the system includes all nodes in the power grid. Then, the IMAS is established for the system, node and user to create the mathematical model. Finally, through interactions among agents, the allocation of the OPU gap indicators is completed. The structure is shown in Figure 1.  The functions of different levels of agents are designed as follows: (1) The system agent is responsible for calculating the system gap index. First, it collects the energysaving characteristics of the subordinate nodes (including energy-saving potential and energysaving loss coefficient) from each node agent. Then, according to the energy-saving The functions of different levels of agents are designed as follows: (1) The system agent is responsible for calculating the system gap index. First, it collects the energy-saving characteristics of the subordinate nodes (including energy-saving potential and energy-saving loss coefficient) from each node agent. Then, according to the energy-saving characteristics, it calls the orderly allocation algorithm of the power gap index. Finally, the gap index is allocated to each node agent. (2) First, the node agent reports energy-saving characteristics to the system agent. Secondly, after getting the allocated gap indicators from the system agent, the node agent collects the energy-saving characteristics from the subordinate user agents and then, assigns the gap indicators to the user agents. (3) The user agents are the lowest layers in a IMAS. It abstracts the user and collects the user's energy-saving features and reports them to the node agent. (4) In the interactive module, the negotiation agent first collects the aid willingness of users to form a list. When a user is unable to perform the tasks as planned, the user agent can issue an aid request on the interactive platform. After querying the request, the negotiation agent quickly adjusts the OPU plan according to the user's aid willingness table. Then the agent updates the table according to the aid situation to ensure the fairness of electricity consumption.

Indicator Distribution Mechanism
The OPU scheme adjusts at any time based on the user's electricity consumption behavior. The scale of the distribution network is huge, and communication is hindered if it is repeatedly adjusted [21]. Insufficient interaction between users leads to a waste of energy and investment. Therefore, a user MAM that encourages mutual assistance is proposed. It reduces the pressure of system communication, improves the efficiency of solving large-scale planning problems, and ensures real-time information updates as follows: (1) Each layer of agent reports the energy-saving feature to the upper layer agent, and the upper layer agent summarizes the equivalent energy-saving characteristics; (2) After obtaining the energy-saving characteristics of the lower layer agent, the upper layer agent completes the gap index assignment task from the upper level to the lower level according to the allocated OPU gap indicator.
The key to MAM is that each user submits real energy-savings potential, then encourages users to respond to the aid requests of other users. With respect to prompting users to submit the real potential of energy-savings, it establishes an aid scoring mechanism for users. The user's aid score is set as the total contribution in the historical aid task. The scores of users who contribute more are high. MAM is shown in Figure 2. characteristics, it calls the orderly allocation algorithm of the power gap index. Finally, the gap index is allocated to each node agent. (2) First, the node agent reports energy-saving characteristics to the system agent. Secondly, after getting the allocated gap indicators from the system agent, the node agent collects the energysaving characteristics from the subordinate user agents and then, assigns the gap indicators to the user agents. (3) The user agents are the lowest layers in a IMAS. It abstracts the user and collects the user's energy-saving features and reports them to the node agent. (4) In the interactive module, the negotiation agent first collects the aid willingness of users to form a list. When a user is unable to perform the tasks as planned, the user agent can issue an aid request on the interactive platform. After querying the request, the negotiation agent quickly adjusts the OPU plan according to the user's aid willingness table. Then the agent updates the table according to the aid situation to ensure the fairness of electricity consumption.

Indicator Distribution Mechanism
The OPU scheme adjusts at any time based on the user's electricity consumption behavior. The scale of the distribution network is huge, and communication is hindered if it is repeatedly adjusted [21]. Insufficient interaction between users leads to a waste of energy and investment. Therefore, a user MAM that encourages mutual assistance is proposed. It reduces the pressure of system communication, improves the efficiency of solving large-scale planning problems, and ensures realtime information updates as follows: (1) Each layer of agent reports the energy-saving feature to the upper layer agent, and the upper layer agent summarizes the equivalent energy-saving characteristics; (2) After obtaining the energy-saving characteristics of the lower layer agent, the upper layer agent completes the gap index assignment task from the upper level to the lower level according to the allocated OPU gap indicator.
The key to MAM is that each user submits real energy-savings potential, then encourages users to respond to the aid requests of other users. With respect to prompting users to submit the real potential of energy-savings, it establishes an aid scoring mechanism for users. The user's aid score is set as the total contribution in the historical aid task. The scores of users who contribute more are high. MAM is shown in Figure 2.   The receiving assistance user i submits Q i to the negotiation agent, and ranks the recipient users according to W i . According to this order, Q i = [Q 1 , Q 2 , Q 3 . . . Q m ] is obtained. Users with high scores get aid first, so Q 1 gets aid first, followed by Q 2 , and finally Q m .

CFSFDP Algorithm
The idea of CFSFDP is based on the following two points: (1) the local density of each clustering center is higher than the density of its domain sample points and (2) the distance between the clustering center and the sample point with a higher density is relatively large. The point is defined as Equation (1) [27].
In Equation (1), d c has a great impact on the clustering effect. If d c is too small, it can cause a cluster to be forced to split into several parts; if d c is too large, several clusters can be merged into one class. In the d c range of the average sample point, d c should make the ratio of the sample size to the data set τ (τ = 1-2%) [17]. To reduce the influence of truncation distance on clustering results, we propose to improve ρ i by using the Gauss kernel function. The minimum distance between each sample point and a point with a higher density is defined as follows: In Equation (3), for the sample i whose density is the highest, δ i = max j d ij .
The CFSFDP algorithm does not consider the local structure of datasets when calculating ρ. When the density difference among different clusters of datasets is large, it will lead to wrong clustering (merging of several clusters or splitting of one cluster). If the dataset size is n, the internal memory consumption of the CFSFDP algorithm is mainly used to store a distance matrix of size n × n. The execution time is mainly used to calculate the distance matrix, d c , ρ and δ. The ratio of calculating the distance matrix is the largest, especially when the data scale and dimension are large. The internal memory consumption and execution time of the CFSFDP algorithm will increase rapidly with an increase of data size. Therefore, application of the CFSFDP algorithm is limited by data size, and it is not appropriate for high-dimensional massive load curve clustering analysis.

KNN Algorithms and Their k-d Tree Implementation
The KNN algorithm is a simple and practical supervised learning classification method, which is widely used in clustering analysis, prediction analysis, and pattern recognition [28]. There are two ways to implement the KNN algorithm which include: (1) Linear scan, which calculates the distance among each sample to be classified and all training samples. However, it takes a lot of time to implement a large number of high-dimensional training sets [29] and (2) store training data through special structures to reduce the number of calculated distances. One of the efficient classical methods is k-d tree [30]. The k-d tree is a kind of tree data structure that stores instance points in k-dimensional space for fast retrieval. The k-d tree is used to divide the k-dimensional search space, and the KNN samples can be obtained by a correlative search in the neighborhood space of the sample, thus avoiding exhaustive search calculations and greatly reducing the number of search calculations.

Principal Component Analysis for Dimension Reduction
Dimension reduction technology is mainly divided into feature selection and feature extraction. The feature selection selects feature subsets that contain most of the information of the dataset from the original redundant feature set [31]. However, the existing original feature subset cannot fully reflect the time characteristics of the load curve. The selected feature subset loses more information on the load curve [32]. Through transformation, feature extraction transforms the original high-dimensional feature space into a new low-dimensional feature space. Compared with other dimensionality reduction methods, principal component analysis (PCA) has the highest clustering accuracy and efficiency [33]. PCA is an important linear dimension reduction method. Its basic idea is to transform p original variables into m new orthogonal variables (m p) after linear transformation [34].

Improvement of the CFSFDP Algorithm
According to the literature [17,27,35], these study have mainly improved the internal memory consumption and execution time of the original algorithm. The PCA is used to reduce the dimension of the normalized load curve set. To speed up the follow-up operation, we first calculate the Euclidean distance. Then the KNN matrix is generated by a fast KNN search for dimension reduced data using the k-d tree algorithm. Finally, the KNN matrix is used to replace the distance matrix of the original algorithm as the input data. On the basis of the improved KNN criterion for calculating local density and distance of samples, the load curve is clustered by CFSFDP. 1. Improvement of internal memory consumption in the CFSFDP algorithm CFSFDP cannot consider the local structure of the dataset when calculating the local density of the sample [36]. Therefore, the local density calculation standard introduces the idea of KNN and ρ i is defined as follows: In the formula, Equation (4) shows that ρ i decreases with the increase of the distance from sample i to k-nearest neighbors. The new ρ i only considers the KNN sample, which reflects mostly the local structure of sample i. To reduce the internal memory consumption of the CFSFDP algorithm, we use KNN to improve the calculation criterion of sample distance. Except for some sample points (such as cluster centers), there is at least one nearest neighbor sample with a density higher than the density of the sample point i, the minimum distance δ i of the sample point i and the point at which the density is higher is to be found from the k neighbor samples. Therefore, the improved δ i based on KNN is defined as follows: For the sample point i with the highest local density in the whole world, k is obtained by Equation (7). The ρ and δ of the samples are calculated based on the KNN algorithm.
Equation (7) shows that the proportion of KNN sample to the whole data scale is p, p is generally minimal, then i < n. The improved procedure for calculating sample distance δ is as follows: (1) The local sample density of the dataset is sorted in descending order and set to ρ = (ρ 1 , ρ 2 . . . ρ n ), so that i = 2. (2) Calculate the distance ρ i of density δ i according to Equation (5), i = i + 1.
(3) If i ≤ n, return to step (2); otherwise, i = 1. The distance δ i corresponding to the density ρ i is calculated according to Equation (6).

Improvement of CFSFDP algorithm execution time
It is very time-consuming to use the linear scanning method to build the KNN matrix on large-scale datasets, and the classical k-d tree algorithm can realize a fast KNN search to create KNN matrix [37]. Because the KNN search efficiency is high when the size of the training set is much larger than the spatial dimension (n ≥ k). The dimension increment causes a deviation of similarity measure and reduces the clustering effect [38]. To reduce the execution time of the CFSFDP algorithm, we first reduce the dimension of the dataset by PCA, then, use the k-d tree algorithm to establish the KNN matrix, and then, use Equations (4)-(7) to calculate the samples' ρ and distance δ.

I-CFSFDP Algorithm Step
The input of the load curve dataset is X, and the output of KNN proportional parameter p is a clustering result. The whole process of the I-CFSFDP algorithm is as follows: (1) The dataset X is normalized. This treatment fully reflects the morphological characteristics of each load curve, avoiding the influence of dimension and amplitude difference on the load curve clustering.
(2) The normalized dataset is dimensionally reduced by PCA to X * ; (3) The KNN matrix of X * is established by the k-d tree algorithm.
(4) Calculate the ρ and δ of samples according to Equations (4)- (7); (5) Since the difference between the order of magnitude ρ and δ makes the weights of the two different, the first ρ and δ are normalized, and the resulting decision curve avoids this problem. The larger γ point is selected as the cluster center. (6) The remaining samples are assigned, and each sample belongs to the same category as the denser and closest sample.

Establishment of Objective Function Model
From the perspective of the power grid, the objective is to minimize the total cost of OPU control.
From the user's point of view, the goal is to minimize the total electricity cost of the user and promote the local consumption of PV power generation.
In the formula, k is the number of days; C rotate i is the control cost of sequential rest; C stag i,k , C shi f t i,k and C clip i,k are the control costs of peak staggering, peak shifting, and peak clipping, respectively; Z i,k (t) is the power injected into grid when the output power of PV is higher than the user's consumption; and g(t) is the price of PV grid-connected.

Load Regulation Model
1. Peak staggering means that the user avoids load peak periods by delaying or by delaying the power consumption time of one day.  2. Peak shifting and valley filling mean that the user shifts part of the load during peak hours to the valley period.Users need to submit the type and period of participation in peak shifting and valley filling.
where i ∈ N; β is the type of peak shifting valley filling; β max is the total number of peak shifting valley filling classes; ξ shi f t β is the control cost coefficient of peak shifting valley filling; u shi f t i,k,β is 0-1 variable, taking 1 as a variable to participate in the peak shifting valley filling of β class; ∆P is the correction of iuser participating in the tperiod of peak shifting valley filling of β class; and ∆P shi f t i,k (t) is the total amount of peak shifting for i-user at t-period on k-day.
3. Peak clipping summit brings irreparable power loss to users, only when the power supply gap cannot be eliminated by the first three means. The user states the peak clipping, the single-stage peak clipping and the period of the maximum tolerable peak clipping level.
where i ∈ N; ∆P clip i (t) is the single-stage peak clipping correction of i-user in t-period; ∆P clip i,k (t) is the total peak clipping correction of i-user in k-day t-period.
4. Peak rotating is suitable for users with weekly-off. By changing working days and rest days, the peak load of the system can be avoided.
where k is the number of days; u is a variable of 0-1, 0 is the rest day, and 1 is the control cost coefficient of a working day, ξ rotate 1 and ξ rotate 2 are for one day and two days, respectively; P work i (t) is a load of a working day with weekly rest i-user in t-period; P rest i (t) is a load of a rest day with weekly rest i-user in t-period; P resident i,k (t) is a load of resident i-user in the k-day t-period; and P i,k (t) is a load of resident i-user in the k-day t-period after rotate days off.

Modeling of Household PV Generation Devices
Household PV devices can directly supply power to users. The PV output power has strong nonlinear characteristics as a function of light intensity and temperature, and in cloudy weather, its output power will change rapidly for a short time [39].Its output power P DC,k (t) is affected by environmental factors [40]. The mathematical model is as follows:

Modeling of EV
In the OPU scheme, the charging time can be adjusted to achieve the purpose of peak shifting and valley filling. The EV real power profile is not constant and strongly depends on the type of EV and the type of EV supply equipment [5,39,40]. Users need to declare the number of EVs available for a call and the adjustable charging time. The mathematical model of EV charging is as follows:

User Load Curve after OPU
After implementing the ordered power consumption strategy, the user's power load curve is: In the formula, P i,k (t) is the load of the user in the first k-day t-period after OPU, and the positive part of PV output is subtracted. When the value of P i,k (t) − ∆P i,k (t) − P DG,k (t) > 0, ∆P i,k (t) is the total OPU correction of the user in the t-period on the first day.

Constraints Condition
(1) Maximum output constraints of the system (2) Constraints of peak shifting and peak clipping The number of hours of the peak staggering should not exceed h 1max and h 2max and the peak clipping level should not exceed the maximum tolerable level M max .

(3) Peak avoidance constraint
Each user uses at most one peak avoidance method one day.
In the formula, u stag i,k takes 1 to indicate that i-user participates in peak shifting on k-day; u shi f t i,k,0 takes 0 to indicate i-user participates in peak shifting and valley filling on k-day; u clip i,k takes 1 to indicate i-user participates in peak clipping on k-day; u work i,k takes 0 to indicate that i-user participates in peak shifting on k-day as a rest day.
D i denotes the number of working days one week for the user. The above formula means that the total number of working days per user a week is fixed. Usually, D i = 5. (5) Daily participation restriction.
The meaning of the Formula (30) is that each user can only participate in one peak avoidance mode every day.

Solution Algorithm
The FSS can transform the multi-objective optimization problem into a single-objective solution, which sorts all the objectives according to the importance degree, first finds the optimal solution of the most critical objective, and then finds the next important objective [25,41]. It works the premise of guaranteeing the optimal solution of the former objective until the last one is obtained [42].
Solving m objects at the same time makes calculation difficult. First, the objects are ranked according to the importance of each object. The order of arrangement is: First, solve the first object h 1 (x) and find the set R 1 of the optimal solution; then, in R 1 , solve the optimal solution R 2 of the second object h 2 (x); in R 2 , solve the optimal solution R 3 of the third object h 3 (x). This continues until the optimal solution R m of the mth object h m (x) is obtained.
In the study, it can be considered that the object of to minimize the total cost of OPU control is more important, and the constraint is appropriately relaxed to solve the second object after solving the first object.After solving the objective Formula (9), the constraints should be relaxed to solve the objective Formula (10).
The OPU scheme in this study takes one week as the time unit, and combines it with the relevant parameters declared by users, preferentially calls low power value score users. The order of users' load management mode calls is peak staggering, peak rotating, peak shifting and peak clipping. This process is equivalent to peak shifting and valley filling. For other users, the load of an EV has been considered in its peak shifting and valley filling load. The mathematical optimization solver CPLEX 12.4 is used to optimize the solution in Matlab.

Adjustment of OPU Scheme
First, the user is ranked according to the degree of aid willingness to form a ranking table. When a user requests aid, the negotiation agent identifies the set of users that are preferentially responded to in the ranking order. If the set is not feasible, and the current adjustment capability is insufficient, the negotiation agent adds more users to the aid model one-by-one according to the sequence table. We can ensure that the adjustment cost is minimized based on the user's willingness. The process of OPU adjustment is shown in Figure 3.
process is equivalent to peak shifting and valley filling. For other users, the load of an EV has been considered in its peak shifting and valley filling load. The mathematical optimization solver CPLEX 12.4 is used to optimize the solution in Matlab.

Adjustment of OPU Scheme
First, the user is ranked according to the degree of aid willingness to form a ranking table. When a user requests aid, the negotiation agent identifies the set of users that are preferentially responded to in the ranking order. If the set is not feasible, and the current adjustment capability is insufficient, the negotiation agent adds more users to the aid model one-by-one according to the sequence table. We can ensure that the adjustment cost is minimized based on the user's willingness. The process of OPU adjustment is shown in Figure 3.   1. The negotiation agent inquires on the user interaction platform whether the user has issued an aid request, and if so, enters step 2.
2. Query the ranking table of user support intention, judge whether the user participates in the adjustment, construct the support user set, and add the corresponding constraints to the support model.
3. Make adjustments based on the original OPU scheme. The goal is to minimize the adjustment cost of the scheme as follows: 4. Determine whether the power supply gap can be eliminated or not, if satisfied, update the user aid willingness ranking table and rank the users participating at the end of the ranking table in turn; if not, enter step 5.
5. Based on the original aid user set, add users one-by-one according to the sequence table, and update the aid model to step 3 until the sequence table is traversed.

Examples and Analysis of Planning Results
This study uses the commercial user load data published by the Open EI website of the U.S. Department of Energy. Each user includes 24 data every day.
The whole data includes 1600 summer workday load curves of 16 industry categories. The I-CFSFDP algorithm is used to clustering the sample set, as shown in Figure 4.

Examples and Analysis of Planning Results
This study uses the commercial user load data published by the Open EI website of the U.S. Department of Energy. Each user includes 24 data every day.
The whole data includes 1600 summer workday load curves of 16 industry categories. The I-CFSFDP algorithm is used to clustering the sample set, as shown in Figure 4. In Figure 4a,b, and d, categories 1, 2, and 4 are single peak loads, which include office buildings (companies), schools and hospitals. These loads are mainly characterized by large daytime power consumption, a smooth load curve, and slight microwave fluctuation due to users' rest load around In Figure 4a,b,d, categories 1, 2, and 4 are single peak loads, which include office buildings (companies), schools and hospitals. These loads are mainly characterized by large daytime power consumption, a smooth load curve, and slight microwave fluctuation due to users' rest load around 13:00. In the peak period, the duration of these three categories of load patterns is also slightly different. For example, the peak period of category 1 load is about from 7:00 to 17:00, which includes hospitals; the peak period of category 2 load is about from 9:00 to 16:00, which only includes warehouses; and the peak period of category 4 load is about from 9:00 to 17:00, which includes office buildings, schools and supermarkets. In Figure 4e, f, category 5 and 6 of loads have three peaks, which include hotels and restaurants. Among them, the difference in load forms of the categories 3 and 4 is shown in the time and duration of the peak period. In Figure 4c, the load peak appears at 7:00, 12:00, 18:00 and lasts about two hours. This category of load includes full-service restaurants, fast-service restaurants and small hotels. For example, category 5 of the load peak appears at 7:00, 18:00, 21:00 and lasts for a short time, which only includes large hotels. Category 6 of load is bimodal, which only includes apartments. The peak occurs at 8:00 and 19:00, and the peak period lasts about 2 h. Categories 2 and 3 contain household PV devices and the rated capacity is about 4500 kW. The price of PV during sunny weather is $0.0713/(kW·h). The resident users have 1000 EVs with a rated charging power of 4 kW. They work during the day and charge after 18:00. It is assumed that 30% of EVs can participate in OPU, and the charging period can be adjusted to the daytime. The total load curve of the system in this region is the sum of all user load curves (except PV output). The peak load of a working day is about 38 MW, and the electricity price of each period is shown in Table 2.

User
Monday Tuesday Wednesday Thursday Friday Saturday Sunday From Monday to Friday, all the resident users' callable EVs participate in the OPU decision-making. Category 1, category 4, category 5 and category 6 take one day rotate days off, and category 1, category 4 and category 6 take the means of peak staggering periods for rotate days off. From the analysis of profitability, for power companies, they tend to give priority to users with low power value scores and use low-cost means. For users, they prefer the lowest total electricity cost if the load management method is adopted.
After OPU, the total load does not exceed the maximum supply and the power supply gap reduction. Figure 5 shows the total load curve of the system on Monday before and after OPU.  The change of the load curve in a week is shown in Figure 6.  The change of the load curve in a week is shown in Figure 6. After using the peak staggering mode, the power curve of category 1 is advanced 1 h, which reduces the peak load by 2621 kW at 16:00; the loss of electricity can be compensated in a day. In Figure 6a, the peak load on Tuesday is reduced by 4563 kW after using the rotate days off mode, and the loss of power can be compensated on Saturdays (Figure 6b). After using the peak staggering mode, the power curve of category 1 is advanced 1 h, which reduces the peak load by 2621 kW at 16:00; the loss of electricity can be compensated in a day. In Figure 6a, the peak load on Tuesday is reduced by 4563 kW after using the rotate days off mode, and the loss of power can be compensated on Saturdays (Figure 6b).
EVs participate in peak shifting is shown in Figure 7. EVs participate in peak shifting is shown in Figure 7. The analysis of category 6 shows that before OPU, the charging arrangement of EV set A (150 EVs) concentrates between 19:00 and 1:00 the next day. After OPU, according to the user's wishes, it transfers to between 9:00 and 15:00 for charging and EV set B (150 EVs) transfers to between 17:00 and 23:00 for charging. Charging is carried out from 7:00 to 8:00, 10:00 to 12:00, and 13:00 to 16:00. The peak load can be reduced by 1200 kW by the peak shifting and valley filling method, and the loss The analysis of category 6 shows that before OPU, the charging arrangement of EV set A (150 EVs) concentrates between 19:00 and 1:00 the next day. After OPU, according to the user's wishes, it transfers to between 9:00 and 15:00 for charging and EV set B (150 EVs) transfers to between 17:00 and 23:00 for charging. Charging is carried out from 7:00 to 8:00, 10:00 to 12:00, and 13:00 to 16:00. The peak load can be reduced by 1200 kW by the peak shifting and valley filling method, and the loss of electricity can be compensated for in a day. The condition of PV power plant consumption before and after the OPU is shown in Figure 8. The analysis of category 6 shows that before OPU, the charging arrangement of EV set A (150 EVs) concentrates between 19:00 and 1:00 the next day. After OPU, according to the user's wishes, it transfers to between 9:00 and 15:00 for charging and EV set B (150 EVs) transfers to between 17:00 and 23:00 for charging. Charging is carried out from 7:00 to 8:00, 10:00 to 12:00, and 13:00 to 16:00. The peak load can be reduced by 1200 kW by the peak shifting and valley filling method, and the loss of electricity can be compensated for in a day. The condition of PV power plant consumption before and after the OPU is shown in Figure 8. Residents have no orderly electricity load Residents' orderly electricity load PV power system output Residents' unordered total electricity load Residents' orderly total electricity load Before OPU, the net load of residential users is less than 0 from 8:00 to 15:00 and the PV output is not fully consumed. At 10:00, the waste of PV reaches a maximum, which is 1707 kW. As shown in Figure 8, when the EV participates in the OPU, the day net load curve changed significantly. The unabsorbed amount of 10:00 PV power decreased to 307 kW, and the total amount of PV power fed into the power grid decreased showing that an adjustment of the charging period for an EV can effectively promote the local consumption of distributed generation.
Electric quantity change after the OPU in this week is shown in Figure 9. Before OPU, the net load of residential users is less than 0 from 8:00 to 15:00 and the PV output is not fully consumed. At 10:00, the waste of PV reaches a maximum, which is 1707 kW. As shown in Figure 8, when the EV participates in the OPU, the day net load curve changed significantly. The unabsorbed amount of 10:00 PV power decreased to 307 kW, and the total amount of PV power fed into the power grid decreased showing that an adjustment of the charging period for an EV can effectively promote the local consumption of distributed generation.
Electric quantity change after the OPU in this week is shown in Figure 9. As shown in Figure 9, all users' power losses from Monday to Friday can be compensated for on Saturdays and Sundays. The OPU mode ensures that the total power consumption of users will remain unchanged within a week. Through calculation, the savings for total electricity cost of users would be $1756.452 this week, and the grid could reduce the install capacity by approximately 3.8 MW.

Scenario 2:
In the Process of Implementation, the User Needs to be Aided

First aid
In the third week, the region needs to eliminate 16% of the power supply gap. If category 1 cannot participate in OPU at this time to request aid, then, according to the user aid willingness list, As shown in Figure 9, all users' power losses from Monday to Friday can be compensated for on Saturdays and Sundays. The OPU mode ensures that the total power consumption of users will remain unchanged within a week. Through calculation, the savings for total electricity cost of users would be $1756.452 this week, and the grid could reduce the install capacity by approximately 3.8 MW.

Scenario 2:
In the Process of Implementation, the User Needs to be Aided

First aid
In the third week, the region needs to eliminate 16% of the power supply gap. If category 1 cannot participate in OPU at this time to request aid, then, according to the user aid willingness list, add user 5 to the aid model and adjust the scheme. User 5 has made adjustments to Wednesday and Friday's work schedule. On Wednesday, there are two types of peak shifting and valley filling, and on Friday, there are rotation breaks. According to the calculation, without OPU, user 1 wasted $272.494 of electricity cost, while user 5 saved $112.08 of electricity cost because of OPU. Subsequently, the aid willingness ranking table is updated to provide a reference for the next aid. The rotation situation is shown in Table 4.  Table 4, β 12 means participating in peak and valley shifting of the first and second categories.

Second aid
In the sixth week, the gap of power supply in this area is 8%, but user 3 cannot participate in the OPU. According to the sequence table, user 4 joins aid. The results show that the model has no solution, so it expands the available area of the aid user set, increases user 1 to aid model, and solves it again. The updated user aid willingness list provides a reference for the next aid.

After 12 weeks of OPU
The traditional aid method is to give priority to users with a low-value score or strong regulation ability, which lacks fairness. The aid method not only considers the willingness of users to aid but also takes turns to participate in the scheme adjustment. This method ensures the fairness of electricity consumption and realizes the coordination and autonomy of regional electric energy. The total electricity expenditure would be reduced by $12,816.91 in the summer. The number of users participating in aid is shown in Table 5.

Comparison of Algorithm
Several traditional clustering algorithms and the I-CFSFDP algorithm are used for cluster analysis, and the overall internal memory consumption and execution time of each algorithm are compared. The experimental results are shown in Figure 10.

Comparison of Algorithm
Several traditional clustering algorithms and the I-CFSFDP algorithm are used for cluster analysis, and the overall internal memory consumption and execution time of each algorithm are compared. The experimental results are shown in Figure 10. In terms of overall execution time, the I-CFSFDP algorithm is only worse than the k-means algorithm, which is better than the FCM algorithm and far better than other algorithms; in terms of overall internal memory consumption, the I-CFSFDP and FCM algorithms can handle datasets larger than 140,000. The rest of the algorithm has a memory overflow when the dataset size exceeds 8000, indicating that the internal memory consumption of the I-CFSFDP algorithm is within a reasonable range, which is much smaller than most clustering algorithms.
In summary, the internal memory consumption and execution time required by the I-CFSFDP algorithm are not high, far better than most traditional clustering algorithms, which verifies the applicability of the I-CFSFDP algorithm in high-dimensional massive load curve clustering analysis. Although the k-means algorithm is far superior to the I-CFSFDP algorithm, its clustering effect is poor and the results are unstable.

Conclusions
This study mainly focuses on OPU decision making under the mode of active user response. The active response and the potential of user response should be fully tapped. On the basis of IMAS technology, we propose an OPU scheme. The module divides the power grid into a three-tier agent structure of "system-node-user". It separates the original complex OPU metrics into several simpler subtasks and encourages users to collaborate through proxy negotiation machines. The system realizes the second allocation of negotiation among user agents. By using the multilevel, adaptive and interactive allocation of the OPU gap index, when the first allocation of OPU index is inaccurate, users can adjust the gap index by the second optimization of the negotiation mechanism. Considering the user's willingness and participation in peak avoidance, we analyzed the user's electricity usage behavior. In terms of overall execution time, the I-CFSFDP algorithm is only worse than the k-means algorithm, which is better than the FCM algorithm and far better than other algorithms; in terms of overall internal memory consumption, the I-CFSFDP and FCM algorithms can handle datasets larger than 140,000. The rest of the algorithm has a memory overflow when the dataset size exceeds 8000, indicating that the internal memory consumption of the I-CFSFDP algorithm is within a reasonable range, which is much smaller than most clustering algorithms.
In summary, the internal memory consumption and execution time required by the I-CFSFDP algorithm are not high, far better than most traditional clustering algorithms, which verifies the applicability of the I-CFSFDP algorithm in high-dimensional massive load curve clustering analysis. Although the k-means algorithm is far superior to the I-CFSFDP algorithm, its clustering effect is poor and the results are unstable.

Conclusions
This study mainly focuses on OPU decision making under the mode of active user response. The active response and the potential of user response should be fully tapped. On the basis of IMAS technology, we propose an OPU scheme. The module divides the power grid into a three-tier agent structure of "system-node-user". It separates the original complex OPU metrics into several simpler subtasks and encourages users to collaborate through proxy negotiation machines. The system realizes the second allocation of negotiation among user agents. By using the multilevel, adaptive and interactive allocation of the OPU gap index, when the first allocation of OPU index is inaccurate, users can adjust the gap index by the second optimization of the negotiation mechanism. Considering the user's willingness and participation in peak avoidance, we analyzed the user's electricity usage behavior.
The I-CFSFDP clustering algorithm is used to transform the uncertain model into a deterministic model. The clustering result is stable and productive. It also effectively reduces the internal memory consumption and execution time of the original algorithm. It better achieves large-scale power load curve clustering and assists load forecasting, price setting, and demand-side response in a big data environment.
On the basis of the the load characteristic curve obtained by the clustering algorithm, an M2OM is established. It aims to minimize the total cost of OPU control and the total cost of users' power consumption. The model also promotes the local absorption of household PV. With high calculation efficiency, low-power score users' wishes are respected. The model considers the interests of both users and the grid, as well as taps the user's potential.
We propose an orderly adjustment method of OPU, which is realized by the negotiation agent, to achieve mutual coordination. In addition, we establishe an aid willingness ranking table to ensure