Flexible resource carrying capacity evaluation method and system based on tensor decomposition federated learning
By employing tensor decomposition federated learning, personalized models and tensor-based local models are constructed, solving the problems of high computational overhead and data privacy leakage in distributed flexible resource carrying capacity assessment. This enables efficient and accurate power quality assessment, supporting the safe and stable operation of power grid dispatch.
Patent Information
- Application Number
- CN202511597127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-11-04
AI Technical Summary
Existing technologies for assessing the carrying capacity of distributed flexible resources suffer from high computational overhead, poor real-time performance, high risk of data privacy leakage, and inability to meet the needs of efficient processing and distributed collaboration in smart grids. Consequently, they are difficult to accurately assess power quality issues caused by the access of distributed flexible resources.
We employ a tensor decomposition-based federated learning approach, which combines personalized models and tensor-based local models with tensor decomposition techniques for distributed collaborative training. This reduces communication costs, protects data privacy, and enables accurate assessment of the carrying capacity of distributed flexible resources.
It has achieved the ability to improve the real-time and accurate assessment of the carrying capacity of distributed flexible resources while ensuring data privacy, reduced the risk of data leakage, met the needs of smart grids for efficient assessment, and supported the safe and stable operation of power grid dispatch.
Smart Images

Figure CN121055330B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power cyber-physical system security technology, specifically relating to a flexible resource carrying capacity assessment method and system based on tensor decomposition federated learning. Background Technology
[0002] As the penetration rate of distributed flexible resources in distribution networks continues to increase, the resulting power quality problems are becoming increasingly prominent, manifesting as increased risks of voltage exceeding limits and voltage fluctuations, significant three-phase imbalance, and a marked increase in harmonic distortion rates. In distribution networks containing distributed flexible resources, adjusting the reactive and active power of connected sources is commonly used to improve node voltage levels and harmonic indicators. However, due to the relatively large ratio of line resistance to inductance in low-voltage distribution networks, active power regulation is more sensitive and efficient for voltage and harmonic control than reactive power regulation. Therefore, accurate assessment of the carrying capacity of distributed flexible resources is of great significance for ensuring the safe and stable operation of the power system.
[0003] Distributed flexible resource carrying capacity refers to the maximum active power output allowed for distributed flexible resources to be connected to the system under the constraints of safe and stable power grid operation. Currently, the mainstream methods for assessing distributed flexible resource carrying capacity mainly fall into two categories: dynamic simulation and mathematical optimization. Dynamic simulation typically uses specialized simulation software to simulate the operating state of the distribution network and then calculates the regulation capacity of distributed flexible resources. This method has a clear implementation path and is easy to operate, but suffers from high computational overhead and poor real-time performance. Mathematical optimization builds an optimization model based on the operating constraints of the distribution network and uses maximizing the carrying capacity of distributed flexible resources as the objective function, solving it through heuristic or deterministic algorithms. This method can obtain relatively accurate assessment results, but the model construction and solution process is complex, consuming significant computational resources, and is difficult to adapt to the dynamic and rapid response requirements of actual dispatching. Therefore, traditional methods have limitations in terms of assessment accuracy, computational efficiency, and adaptability, making it difficult to meet the urgent needs of new power systems for high precision, high timeliness, and intelligent control capabilities. There is an urgent need for a distributed flexible resource carrying capacity assessment method that integrates data-driven and model-reasoning capabilities, combining high efficiency and personalization.
[0004] Data-driven methods for assessing the carrying capacity of distributed flexible resources offer real-time online evaluation capabilities and possess strong advantages in data mining and feature extraction. Currently, few studies have introduced artificial intelligence into the field of distributed flexible resource carrying capacity assessment. Existing literature largely employs centralized learning frameworks, training and evaluating models for single distribution networks. This approach neglects communication and coordination between multiple distribution networks and also carries the risk of privacy breaches due to centralized data storage. Therefore, a novel technical solution is urgently needed that can achieve cross-network collaboration, ensure data privacy, and accurately model and assess the carrying capacity of distributed flexible resources online.
[0005] With the rapid development of smart grids, power systems and information and communication technologies are increasingly integrated, forming the core support for new power systems. However, while bringing high-efficiency operation, the new power system also places higher demands on the privacy protection and real-time processing capabilities of massive amounts of data. User electricity consumption data within the power system not only reflects sensitive information such as personal electricity habits and household routines, but also poses a serious threat to user privacy and system stability should a cyberattack or data breach occur. Traditional centralized machine learning methods rely on uploading datasets centrally to the cloud for unified training. This approach not only exacerbates the risk of data breaches but also fails to meet the actual needs of smart grids for efficient edge processing and distributed collaboration. In contrast, federated learning, as an emerging distributed machine learning framework, effectively balances data privacy protection and model training performance by sharing only local model parameters without directly transmitting raw data. Leveraging its advantages in privacy, security, and distributed computing, federated learning provides an innovative path for intelligent data processing and privacy protection in power systems and is expected to become a crucial supporting technology for ensuring the safe and stable operation of smart grids. Summary of the Invention
[0006] This invention aims to overcome the shortcomings of existing technologies in the scenario of distributed flexible resource access to distribution networks, and proposes a method and system for assessing the carrying capacity of flexible resources based on tensor decomposition federated learning. This method, while ensuring user data privacy, utilizes federated learning to achieve distributed collaborative training of power data from multiple regions, and combines tensor decomposition technology to perform structured modeling and compression of high-dimensional model parameters, thereby improving the model's personalized expressive ability and training efficiency. This invention can effectively address power quality problems such as node voltage exceeding limits and harmonic distortion caused by the large-scale access of distributed flexible resources, while reducing the risk of data leakage that may be caused by centralized model training. By constructing an intelligent assessment mechanism that integrates power system operating characteristics and privacy protection requirements, it improves the real-time and accurate assessment capability of the carrying capacity of distributed flexible resources, provides decision support for power grid dispatching and operation, and strongly supports the safe, efficient, and intelligent development of new power systems.
[0007] In a first aspect, the present invention provides a flexible resource carrying capacity assessment method based on tensor decomposition federated learning, comprising:
[0008] Step S1: To address the power quality issues caused by the integration of distributed flexible resources into the distribution network, a distributed flexible resource carrying capacity calculation model based on the backward / forward scanning distribution system harmonic analysis method is constructed to generate a dataset containing flexible resource carrying capacity data under different load scenarios.
[0009] Step S2: Optimize federated learning based on the characteristics of tensor decomposition, and construct a two-layer objective model that matches tensor decomposition federated learning, including a personalized model and a tensor local model.
[0010] Step S3: Using a dataset of flexible resource carrying capacity under different load scenarios, train a personalized model on the client with a local objective function, then train a tensorized local model based on the best personalized model obtained from the training, and upload the tensorized local model to the server;
[0011] Step S4: The server aggregates the tensorized local models uploaded by each client to obtain the global model, and then sends the aggregated global model to each client as the initial tensorized local model for the next round of training.
[0012] Step S5: Repeat steps S3 and S4 to perform tensor decomposition personalized federated learning until convergence. The final aggregated global model serves as a distributed flexible resource carrying capacity assessment model.
[0013] Step S6: Input the load scenario to be evaluated into the distributed flexible resource carrying capacity assessment model to achieve real-time assessment of the distributed flexible resource carrying capacity.
[0014] Further preferably, the local objective function is defined as:
[0015] ;
[0016] in, It is the local objective function of client m. It is a personalized model for client m, using a deep neural network as the personalization model. It is the expected loss assessment of the personalized model for the local data distribution of client m. It is a quantized local model. It includes an L1-norm regularization term and an L2-norm regularization term, used to control the distance between the personalized model and the tensorized local model. and Used to control the degree of regularization. It is the first parameter matrix of the m-th client. It is the Nth parameter matrix of the mth client.
[0017] Further optimization yields the following global objective function for tensor decomposition-based personalized federated learning:
[0018] ;
[0019] In the formula, It is the local dataset of client m. Represents the number of local samples. The number of samples across all clients; This is the g-th sample data. is the label of the g-th sample data, and M is the number of clients.
[0020] Further optimization involves using a power distribution system harmonic analysis method based on backward / forward scanning to solve for the active power output of distributed flexible resources under the limits of voltage deviation and total harmonic distortion rate.
[0021] Further preferably, the steps of the distributed flexible resource carrying capacity calculation model include:
[0022] Step S1-1: Give the initial calculation interval for the active power output of the distributed flexible resource. and the midpoint of the interval ; The upper limit of active power output for distributed flexible resources. This represents the lower limit of active power output for distributed flexible resources.
[0023] Step S1-2: Using the back / forward scanning-based power distribution system harmonic analysis method, the corresponding distributed photovoltaic power grid is connected to the power distribution network for power flow calculation to determine whether the node voltage deviation and total harmonic distortion rate have reached the maximum allowable value.
[0024] Step S1-3: If the node voltage deviation or total harmonic distortion rate has reached the maximum allowable value, then the active power output of the distributed flexible resource is the flexible resource carrying capacity under the current load scenario. If the node voltage does not meet the requirements, the following formula is used to calculate the range. Make corrections:
[0025] ;
[0026] Where U is the maximum voltage value among all nodes; The maximum allowable voltage deviation; THD is the maximum total harmonic distortion rate at each node; This represents the maximum permissible total harmonic distortion rate.
[0027] Step S1-4: Repeat steps S1-2 and S1-3 until the calculation output requirements are met to obtain the flexible resource carrying capacity.
[0028] Further preferably, the tensor local model is a tensor local model with a low-dimensional parameter matrix structure, including tensor fully connected layers and tensor convolutional layers.
[0029] Further preferred, the process of tensor decomposition personalized federated learning is as follows:
[0030] Phase 1, Global Initialization and Broadcast: First, the server uses the optimal personalized model as the initial global model and broadcasts it to the clients;
[0031] Phase 2, Round t of Global Communication: Assume there are a total of T global communications. In each global communication round... In this process, the client performs τ local updates, training the personalized model and the tensorized local model sequentially; in each local update round... In, each client First, train the optimal personalized model. This phase is repeated for T rounds until convergence.
[0032] Phase 3, Client Selection and Model Aggregation: Server selection has the same size A subset of clients Model aggregation is performed and the global model is broadcast updated. Each selected client sends its updated tensorized local model to the server. On the server side, two aggregation strategies are designed: parameter matrix aggregation and synthetic tensor aggregation. Parameter matrix aggregation is to perform a weighted average of the parameter matrices of each modality uploaded by all clients. Synthetic tensor aggregation first reconstructs the parameter matrices of each client into a complete global model on the server side, then aggregates them at the tensor level, and then re-decomposes the aggregation results into tensors to obtain the parameter matrix of the new round of global model.
[0033] Secondly, the present invention provides a flexible resource carrying capacity assessment system based on tensor decomposition federated learning, comprising:
[0034] The data acquisition module is configured to collect power data from sources including but not limited to: distributed ground flexible resources and industrial park distributed flexible resources, and simultaneously collect user load data corresponding to each node; the data acquisition module is also configured to transmit the collected data to the power grid's data acquisition and monitoring control system in real time for subsequent power quality analysis and carrying capacity assessment.
[0035] The calculation module addresses the power quality issues caused by the integration of distributed flexible resources into the distribution network by constructing a distributed flexible resource carrying capacity calculation model based on the backward / forward scanning distribution system harmonic analysis method, and thereby realizing a quantitative assessment of the output regulation capability of distributed flexible resources at various times.
[0036] The training module optimizes federated learning based on the characteristics of tensor decomposition, constructs a two-layer objective model that matches tensor decomposition federated learning, including a personalized model and a tensor local model; and designs a tensor decomposition personalized federated learning framework to enable collaborative training of power grids in various regions while ensuring data privacy, thereby establishing a distributed flexible resource carrying capacity assessment model.
[0037] The output module is configured to send the distributed flexible resource carrying capacity assessment results output by the distributed flexible resource carrying capacity assessment model to the corresponding power grid dispatch center to assist dispatchers in judging the operating status and formulating control strategies, thereby achieving effective guidance for power grid operation and dispatch.
[0038] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform steps of a flexible resource carrying capacity assessment method based on tensor decomposition federated learning.
[0039] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs a step of flexible resource carrying capacity assessment based on tensor decomposition federated learning.
[0040] This invention has the following beneficial effects: Addressing power quality issues such as node voltage exceeding limits and harmonic distortion caused by distributed flexible resources accessing the distribution network, a distributed flexible resource carrying capacity calculation model based on a backward / forward scanning method for distribution system harmonic analysis is obtained. Local data obtained from the distributed flexible resource carrying capacity calculation model is used to train personalized models and tensor-based local models. Based on a tensor decomposition-based personalized federated learning framework, a tensor decomposition-based personalized federated learning architecture is constructed, reducing communication costs when aggregating distributed independent and identically distributed data. This enables accurate assessment of the carrying capacity of distributed flexible resources while ensuring the privacy and security of power data. Attached Figure Description
[0041] Figure 1 This is a flowchart of the method of the present invention;
[0042] Figure 2This is a block diagram of the flexible resource carrying capacity assessment system based on tensor decomposition federated learning of the present invention.
[0043] Figure 3 This is a schematic diagram of the electronic device structure of the present invention.
[0044] Figure 4 To evaluate the curve of accuracy as a function of the number of iterations. Detailed Implementation
[0045] The present invention will be further described in detail below through specific embodiments. The following embodiments are merely descriptive and not limiting, and should not be used to limit the scope of protection of the present invention.
[0046] like Figure 1 As shown, the flexible resource carrying capacity assessment method based on tensor decomposition federated learning includes the following steps:
[0047] Step S1: To address the power quality issues caused by the integration of distributed flexible resources into the distribution network, a distributed flexible resource carrying capacity calculation model based on the backward / forward scanning distribution system harmonic analysis method is constructed to generate a dataset containing flexible resource carrying capacity data under different load scenarios.
[0048] Step S2: Optimize federated learning based on the characteristics of tensor decomposition, and construct a two-layer objective model that matches tensor decomposition federated learning, including a personalized model and a tensor local model.
[0049] Step S3: Using datasets of flexible resource carrying capacity under different load scenarios, train a personalized model on the client side with a local objective function. Then, based on the optimal personalized model obtained from the training, train a tensorized local model and upload the tensorized local model to the server. In this embodiment, the local objective function is defined as:
[0050] ;
[0051] in, It is the local objective function of client m. It is a personalized model for client m, using a deep neural network as the personalization model. It is the expected loss assessment of the personalized model for the local data distribution of client m. It is a quantized local model. It includes an L1-norm regularization term and an L2-norm regularization term, used to control the distance between the personalized model and the tensorized local model. and Used to control the degree of regularization. It is the first parameter matrix of the m-th client. It is the Nth parameter matrix of the mth client.
[0052] The optimal personalized model can be obtained by solving the local objective function. In the optimal personalized model Building upon this foundation, a tensor-based local model is trained using gradient descent. Specifically, the client employs mini-batch random sampling to iteratively obtain training samples from the local dataset, and updates the model parameters using optimization algorithms such as gradient descent to obtain the optimal personalized model. This process effectively captures the feature differences of local data, improving the model's adaptability in scenarios with non-independent and identically distributed models. To compress the model parameter space and improve modeling efficiency, a tensorized local model is trained based on gradient descent on the optimal solution of the trained personalized model. This tensorized local model not only effectively reduces the communication and storage overhead in the federated learning process but also provides structured support for subsequent personalized model fusion. By constraining the distribution differences between the tensorized local model and the personalized model, the model fusion effect and personalized performance are improved.
[0053] Step S4: The server aggregates the tensorized local models uploaded by each client to obtain the global model, and then sends the aggregated global model to each client as the initial tensorized local model for the next round of training.
[0054] Step S5: Repeat steps S3 and S4 to perform tensor decomposition personalized federated learning until convergence. The final aggregated global model serves as the distributed flexible resource carrying capacity assessment model. The global objective function of tensor decomposition personalized federated learning is:
[0055] ;
[0056] In the formula, It is the local dataset of client m. Represents the number of local samples. The number of samples across all clients; This is the g-th sample data. Here, M is the label of the g-th sample data, and M is the number of clients.
[0057] Step S6: Input the load scenario to be evaluated into the distributed flexible resource carrying capacity assessment model to achieve real-time assessment of the distributed flexible resource carrying capacity.
[0058] In this embodiment, the distributed flexible resource carrying capacity calculation model uses a power distribution system harmonic analysis method based on backward / forward scanning to solve for the active power output of distributed flexible resources under the voltage deviation and total harmonic distortion rate limits, including:
[0059] Step S1-1: Give the initial calculation interval for the active power output of the distributed flexible resource. and the midpoint of the interval ; The upper limit of active power output for distributed flexible resources. This represents the lower limit of active power output for distributed flexible resources; the distributed flexible resources referred to here generally refer to distributed photovoltaic power.
[0060] Step S1-2: Using the back / forward scanning-based power distribution system harmonic analysis method, the corresponding distributed photovoltaic power grid is connected to the power distribution network for power flow calculation to determine whether the node voltage deviation and total harmonic distortion rate have reached the maximum allowable value.
[0061] Step S1-3: If the node voltage deviation or total harmonic distortion rate has reached the maximum allowable value, then the active power output of the distributed flexible resource is the flexible resource carrying capacity under the current load scenario. If the node voltage does not meet the requirements, the following formula is used to calculate the range. Make corrections:
[0062] ;
[0063] Where U is the maximum voltage value among all nodes; The maximum allowable voltage deviation; THD is the maximum total harmonic distortion rate at each node; This represents the maximum permissible total harmonic distortion rate.
[0064] Step S1-4: Repeat steps S1-2 and S1-3 until the calculation output requirements are met to obtain the flexible resource carrying capacity.
[0065] Harmonic analysis methods for power distribution systems based on backward / forward scanning include:
[0066] Calculate the branch voltage drop caused by system harmonic currents:
[0067] ;
[0068] in, The voltage drop between bus i and j caused by the h-th harmonic in the k-th iteration. Let h be the branch impedance of the h-th harmonic in the k-th iteration. Let h be the vector of the h-th harmonic current coefficients between bus i and j in the k-th iteration. Let be the h-th harmonic current vector of the k-th iteration, and T denote matrix transpose.
[0069] The bus voltage vector is calculated using the following formula:
[0070] ;
[0071] in, Let h be the bus voltage vector caused by the h-th harmonic in the k-th iteration. Let h be the harmonic current vector of the k-th iteration. This is the matrix relating the bus voltage vector and the harmonic current vector caused by the h-th harmonic in the k-th iteration.
[0072] The bus voltage of the parallel capacitor can be expressed as:
[0073] ;
[0074] in, The voltage across the parallel capacitor bus is caused by the h-th harmonic in the k-th iteration. for The portion of the row vector relative to the busbar of the parallel capacitor.
[0075] By representing the bus voltage of the parallel capacitor, the above equation can be written as:
[0076] ;
[0077] in, The impedance of the n-parallel capacitor on the busbar caused by the h-th harmonic is... The current in the parallel capacitor is caused by the h-th harmonic in the k-th iteration. The h-th harmonic current vector contributed by the nonlinear load and linear impedance in the k-th iteration. Let h be the vector of the h-th harmonic current absorbed by the parallel capacitor in the k-th iteration. for Chinese correspondence Part of for Chinese correspondence The part.
[0078] The harmonic current absorbed by the parallel capacitor can be calculated using the above formula. The branch voltage drop and bus voltage are calculated separately. This process is iterated until the following condition is met, at which point the h-th harmonic calculation iteration stops.
[0079] ;
[0080] in, The branch voltage between bus i and j is caused by the h-th harmonic in the k-th iteration. This represents the maximum permissible error.
[0081] Tensor-quantized local models consist of multiple network layers, including but not limited to structured neural network components such as fully connected layers and convolutional layers. The parameters of each layer are represented and decomposed using tensor structures. In this embodiment, the tensor-quantized local model is a tensor-quantized local model with a low-dimensional parameter matrix structure, including tensor-quantized fully connected layers and tensor-quantized convolutional layers. The low-dimensional parameter matrix structure of the tensor-quantized local model improves the compactness of the model parameters and its generalization ability.
[0082] 1) Tensed Fully Connected Layer: In a tensed fully connected layer, the dimension of the weight matrix is related to the dimensions of the input and output vectors. The output vector of a tensed fully connected layer is equal to the sum of the input vector multiplied by the weight matrix and the offset; at the same time, the factorization of the weight matrix can be rewritten as a matrix product of factors.
[0083] 2) Tensorized Convolutional Layer: In a tensorized convolutional layer, the weights are a stack of convolutional kernels. Each kernel has two spatial dimensions and one channel dimension. During batch training, these kernels are organized as fourth-order tensors. This indicates that the width and height of the convolution window are... , , The number of input and output channels represents the number of input and output channels. Convolution is a linear mapping from the input tensor to the output tensor. After tensor decomposition, the weights of the tensor-quantized convolutional layers are essentially equivalent to a sequence of four convolutional layers. Tensor decomposition can map the original high-dimensional complete model to a low-dimensional subspace and provide a physically or statistically meaningful interpretation of this projection process, thereby effectively extracting the key features and structural information of the model and improving its representational power and computational efficiency.
[0084] In this embodiment, the process of tensor decomposition personalized federated learning is as follows:
[0085] Phase 1, Global Initialization and Broadcast: First, the server uses the optimal personalized model as the initial global model and broadcasts it to the clients;
[0086] Phase 2, Round t of Global Communication: Assume there are a total of T global communications. In each global communication round... In this process, the client performs τ local updates, training the personalized model and the tensorized local model sequentially. In each local update round... In, each client First, train the optimal personalized model. This phase is repeated for T rounds until convergence.
[0087] Phase 3, Client Selection and Model Aggregation: In federated learning, considering uncertainties such as communication load and power consumption, servers are often selected based on their size. A subset of clients Model aggregation is performed and the global model is broadcast updated. Each selected client sends its updated tensor-quantized local model to the server. On the server side, this application designs two aggregation strategies: parameter matrix aggregation and synthetic tensor aggregation. Parameter matrix aggregation is a weighted average of the parameter matrices of each modality uploaded by all clients. Synthetic tensor aggregation first reconstructs the parameter matrices of each client into a complete global model on the server side, then aggregates them at the tensor level, and finally re-decomposes the aggregation results into tensors to obtain the parameter matrix of a new round of global model.
[0088] An improved 189-node distribution network system (a three-phase unbalanced distribution network consisting of two IEEE 33-node distribution networks and one IEEE 123-node distribution network) was used as a case study to verify the method of this invention. In the three transformer substations, photovoltaics were connected to phase A of node 6. To demonstrate the superiority of tensor decomposition personalized federated learning, federated average learning was used as a comparative algorithm for analysis. The training times and learning rates of the two algorithms were set identically. The training accuracy was used to verify the accuracy of tensor decomposition personalized federated learning in assessing the carrying capacity of distributed photovoltaics. The training accuracy was the ratio of the number of samples where the difference between the assessed value and the actual value was less than 5% to the total number of samples. Figure 4 To evaluate the accuracy curve as a function of iterations, it can be seen that the accuracy of the photovoltaic carrying capacity assessment using tensor decomposition personalized federated learning is 96.70%, while the accuracy of the traditional federated average learning is 59.40%, thus verifying the effectiveness of the tensor decomposition personalized federated learning proposed in this invention.
[0089] like Figure 2 As shown, the flexible resource carrying capacity assessment system based on tensor decomposition federated learning includes a data acquisition module 210, a computation module 220, a training module 230, and an output module 240.
[0090] The data acquisition module 210 is configured to collect power data from sources including, but not limited to, distributed ground-based flexible resources and industrial park distributed flexible resources, while also collecting user load data corresponding to each node. The data acquisition module is further configured to transmit the collected data in real time to the power grid's data acquisition and monitoring control system for subsequent power quality analysis and capacity assessment.
[0091] The calculation module 220 constructs a calculation model for the carrying capacity of distributed flexible resources based on the harmonic analysis method of the distribution system using backward / forward scanning to address the power quality problems caused by the access of distributed flexible resources to the distribution network, and realizes a quantitative assessment of the output regulation capability of distributed flexible resources at each time point.
[0092] Training module 230 optimizes federated learning based on the characteristics of tensor decomposition, constructs a two-layer target model that matches tensor decomposition federated learning, including a personalized model and a tensor local model; and designs a tensor decomposition personalized federated learning framework to enable collaborative training of power grids in various regions while ensuring data privacy, thereby establishing a distributed flexible resource carrying capacity assessment model to achieve accurate modeling and assessment of distributed flexible resource carrying capacity.
[0093] The output module 240 is configured to send the distributed flexible resource carrying capacity assessment results output by the distributed flexible resource carrying capacity assessment model to the corresponding power grid dispatch center to assist dispatchers in judging the operating status and formulating control strategies, thereby achieving effective guidance for power grid operation and dispatch.
[0094] It should be understood that Figure 2 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.
[0095] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the flexible resource carrying capacity assessment method based on tensor decomposition federated learning in any of the above method embodiments.
[0096] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:
[0097] To address power quality issues such as voltage exceeding limits and increased harmonic distortion rate caused by the integration of distributed flexible resources into the distribution network, a harmonic analysis method for distribution systems based on backward / forward scanning is constructed. This method considers node voltage constraints and harmonic distortion rate limitations, and establishes a calculation model for the carrying capacity of distributed flexible resources.
[0098] Using the constructed distributed flexible resource carrying capacity calculation model, personalized models are trained based on locally collected data from each distribution network area to reflect the operational characteristics of distributed flexible resources in different regions. Simultaneously, a tensorized local model with a low-dimensional parameter matrix is designed to mine the potential structural features of local data in multi-dimensional space, enhancing the model's expressive and generalization capabilities, and providing a compact and information-rich model representation for subsequent federated modeling.
[0099] A personalized federated learning framework based on tensor decomposition is constructed to achieve global collaborative modeling by combining tensor-based local models from multiple distribution network regions, while maintaining the principle of data non-sharing locally. To effectively integrate the common features and individual differences among the local models, a two-layer loss function is designed: the first layer of loss constrains the evaluation error of the personalized model in the local task, and the second layer of loss limits the structural bias between the tensor-based local model and the personalized model, thereby balancing the model's individual adaptability and global generalization ability, and improving the accuracy and stability of distributed flexible resource carrying capacity assessment.
[0100] By introducing a low-dimensional tensor decomposition structure to compress the dimensionality of model parameters, communication overhead in the federated aggregation process is reduced, improving the efficiency of model training and updates. In this federated learning, each participant only needs to upload the tensor parameter matrix instead of the complete model parameters, thus significantly reducing bandwidth requirements and synchronization latency. Furthermore, this model fully utilizes local personalized features and global common structures, balancing model performance and data privacy protection, effectively improving the accuracy and generalization ability of assessing the carrying capacity of distributed flexible resources in distributed, non-independent, and identically distributed data environments, meeting the dual requirements of real-time performance and security for smart grids.
[0101] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the voltage regulation system of the active power distribution network, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely disposed relative to a processor, which can be connected to the voltage regulation system of the active power distribution network via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0102] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3Taking a bus connection as an example, memory 320 is the aforementioned computer-readable storage medium. Processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in memory 320, thereby realizing the aforementioned flexible resource carrying capacity assessment method based on tensor decomposition federated learning. Input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the flexible resource carrying capacity assessment system based on tensor decomposition federated learning. Output device 340 may include display devices such as a screen.
[0103] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.
[0104] In one implementation, the above-described electronic device is applied in a flexible resource carrying capacity assessment system based on tensor factorization federated learning, for a client, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0105] To address the power quality issues caused by the integration of distributed flexible resources into the distribution network, a calculation model for the carrying capacity of distributed flexible resources based on the harmonic analysis method of the distribution system using backward / forward scanning is derived.
[0106] A personalized model is trained using local data obtained from a distributed flexible resource carrying capacity calculation model. At the same time, a new tensor quantization local model with a low-dimensional parameter matrix is designed.
[0107] We construct a tensor decomposition personalized federated learning framework and design a two-layer loss function to control the gap between tensor-based local models and personalized models.
[0108] A tensor decomposition personalized federated learning model was constructed to reduce the communication cost when aggregating distributed independent and identically distributed data, and to achieve accurate assessment of the carrying capacity of distributed flexible resources while ensuring the privacy and security of power data.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flexible resource carrying capacity evaluation method based on tensor decomposition federated learning, characterized in that, The steps are as follows: Step S1: For the power quality problem caused by the access of distributed flexible resources to the distribution network, a distributed flexible resource carrying capacity calculation model of the power distribution system harmonic analysis method based on backward / forward scanning is constructed to generate a dataset containing flexible resource carrying capacity data under different load scenarios; Step S2: According to the characteristics of tensor decomposition, the federated learning is optimized, and a double-layer objective model matched with the tensor decomposition federated learning is constructed, including a personalized model and a tensorized local model; Step S3: Using the dataset of flexible resource carrying capacity under different load scenarios, the personalized model is trained at the client side using the local objective function, and then the tensorized local model is trained based on the optimal personalized model obtained by training, and the tensorized local model is uploaded to the server; Step S4: The server aggregates the tensorized local models uploaded by each client to obtain a global model, and then sends the aggregated global model to each client as the initial tensorized local model for the next round of training; Step S5: Repeat steps S3 and S4 to perform tensor decomposition personalized federated learning until convergence, and finally aggregate the global model as a distributed flexible resource carrying capacity evaluation model; Step S6: Input the load scenario to be evaluated into the distributed flexible resource carrying capacity evaluation model to realize real-time evaluation of the distributed flexible resource carrying capacity; The local objective function is defined as: ; wherein, is a local objective function of the client m, is a personalized model of the client m, taking a deep neural network as the personalized model, is a loss evaluation expectation of the personalized model on the local data distribution of the client m, is a tensorized local model; includes an L1 norm regularization term and an L2 norm regularization term, for controlling the distance between the personalized model and the tensorized local model, and for controlling the regularization degree, is the first parameter matrix of the mth client, is the Nth parameter matrix of the mth client. The distributed flexible resource carrying capacity calculation model uses the power distribution system harmonic analysis method based on backward / forward scanning to solve the active power output of the distributed flexible resource under the voltage deviation and harmonic total distortion rate limit; The steps of the distributed flexible resource carrying capacity calculation model include: Step S1-1: giving an initial calculation interval of the active power output of the distributed flexible resource and the interval midpoint ; is the upper limit of the active power output of the distributed flexible resource, is the lower limit of the active power output of the distributed flexible resource; Step S1-2: Using the power distribution system harmonic analysis method based on backward / forward scanning, the corresponding distributed photovoltaic access distribution network is subjected to power flow calculation, and it is judged whether the node voltage deviation and harmonic total distortion rate reach the allowed maximum value; Step S1-3: If the node voltage deviation or the total harmonic distortion has reached the maximum allowed value, the active power output of the distributed flexible resource is the flexible resource carrying capacity under the current load scenario. If the node voltage does not meet the requirements, the calculation interval is corrected by using the following formula: ; wherein U is the maximum voltage value in each node; is the maximum value of the allowed voltage deviation; THD is the maximum value of the total harmonic distortion in each node; is the maximum value of the allowed total harmonic distortion. Step S1-4: Repeat steps S1-2 and S1-3 until the calculation output requirements are met to obtain the flexible resource carrying capacity.
2. The method of claim 1, wherein, The global objective function of the tensor decomposition personalized federated learning is: ; wherein, is the local dataset of client m, represents the number of local samples, is the number of samples for all clients; is the gth sample data, is the label of the gth sample data, M is the number of clients.
3. The method of claim 1, wherein, The tensorized local model is a tensorized local model with a low-dimensional parameter matrix structure, including a tensorized fully connected layer and a tensorized convolution layer.
4. The method of claim 1, wherein, The process of the tensor decomposition personalized federated learning is as follows: Phase 1, global initialization and broadcast: first, the server broadcasts the optimal personalized model as the initial global model to the client; Stage 2, the t-th round of global communication: assuming a total of T global communications; in each global communication round , the client performs τ local updates, sequentially trains the personalized model and the tensorized local model; in each local update round , , each client first trains the optimal personalized model , this stage repeats T rounds until convergence; Stage 3, Client Selection and Model Aggregation: The server selects a subset of clients with the same size The server performs model aggregation and broadcasts the updated global model; each selected client sends its updated tensorized local model to the server. Two aggregation strategies are designed at the server side: parameter matrix aggregation and synthetic tensor aggregation; Parameter matrix aggregation is to weight and average each modality parameter matrix uploaded by all clients; synthetic tensor aggregation first reconstructs the parameter matrix of each client into a complete global model at the server side, then aggregates at the tensor level, and then re-performs tensor decomposition on the aggregation result to obtain the parameter matrix of the new round of global model.
5. A flexible resource carrying capacity evaluation system based on tensor decomposition federated learning, configured to perform the flexible resource carrying capacity evaluation method according to any one of claims 1 to 4, characterized in that, It includes: A data collection module, which functions to collect power data from sources including but not limited to distributed ground flexible resources and industrial park distributed flexible resources, and simultaneously collect user load data corresponding to each node; the data collection module is also configured to transmit the collected data to the data collection and monitoring control system of the power grid in real time for subsequent power quality analysis and carrying capacity evaluation; A calculation module, which constructs a distributed flexible resource carrying capacity calculation model based on the backward / forward scanning of the power distribution system harmonic analysis method for the power quality problems caused by the access of distributed flexible resources to the power distribution network, and realizes quantitative evaluation of the output adjustment capacity of distributed flexible resources at each moment; A training module, which optimizes federated learning according to the characteristics of tensor decomposition, constructs a double-layer target model matched with tensor decomposition federated learning, including a personalized model and a tensorized local model; designs a tensor decomposition personalized federated learning framework, realizes collaborative training of each power grid under the premise of ensuring data privacy, and thus establishes a distributed flexible resource carrying capacity evaluation model; An output module, which is configured to send the distributed flexible resource carrying capacity evaluation results output by the distributed flexible resource carrying capacity evaluation model to the corresponding power grid dispatching center for assisting dispatchers in operation state judgment and control strategy formulation.
6. An electronic device, comprising: Comprise: at least one processor, and a memory connected in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the flexible resource carrying capacity evaluation method of any one of claims 1 to 4.
7. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the flexible resource carrying capacity evaluation method of any one of claims 1 to 4.
Citation Information
Patent Citations
Flexible load prediction aggregation method and device based on multiple subjects, and storage medium
CN118520984A
Network-photovoltaic climbing cooperative attack identification method and system based on tensor decomposition personalized federated learning, and storage medium
CN119865328A