Coefficient matrix fitting method, system and device of demand response model and medium

By improving the perceptron model and building single-layer and multi-layer improved perceptron models, the problem that traditional single-layer perceptron models cannot handle nonlinear response relationships and multi-dimensional elastic coefficient matrix fitting is solved, reducing the risk of overfitting, and improving the coefficient matrix fitting accuracy and application effect of the demand response model in complex scenarios.

CN120146706AActive Publication Date: 2025-06-13SHANDONG UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510616702.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-06-13
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

In the prior art, traditional single-layer perceptron models cannot handle nonlinear response relationships, are difficult to fit multi-dimensional elastic coefficient matrices synchronously, and are sensitive to noise data, which is easy to cause overfitting.

Method used

The improved perceptron model is adopted to build a single-layer improved perceptron model for the linear demand response model, and a multi-layer improved perceptron model for the nonlinear demand response model. By introducing hidden layers and nonlinear activation functions, the nonlinear elastic coefficient is characterized, and the risk of overfitting is reduced through the improved loss function.

Benefits of technology

Effectively capture the complex relationship between load changes and multi-energy coupling effect, improve the processing ability of complex energy response relationships, reduce sensitivity to noise data, reduce the risk of overfitting, improve the fitting accuracy of coefficient matrix and the application effect of demand response models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146706A_ABST
    Figure CN120146706A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of demand response model optimization of an integrated energy system, in particular to a coefficient matrix fitting method, system and equipment of a demand response model and a medium, and the method comprises the steps: obtaining historical data of indexes of the integrated energy system, calculating a response index change rate and a corresponding load change rate, and forming a sample pair; forming a demand response historical data set; constructing an improved perceptron model according to the demand response model of the integrated energy system, and defining a loss function; training the improved perceptron model, and updating the weight matrix and the bias term until the loss function converges; and extracting a weight matrix of an output layer of the trained perceptron model as an elastic coefficient matrix of the demand response model of the integrated energy system. According to the method, nonlinear response behaviors can be processed, multi-dimensional coefficient matrix fitting is carried out, meanwhile, the sensitivity to noise data and the over-fitting risk are reduced, and the application effect of the demand response model in a complex scene is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the global energy structure transforming towards cleaner and lower-carbon, the integrated energy system has become a key means to improve energy utilization efficiency through multi-energy complementarity and collaborative optimization. As a core tool for regulating the supply-demand balance, the model accuracy of demand response technology directly affects the system regulation effect, and the accurate fitting of the elasticity coefficient matrix is the basis for establishing a high-precision demand response model. Traditional methods rely on empirical formulas or manual experience to determine the coefficient matrix, making it difficult to adapt to the complex and changing energy market environment.

[0003] In the prior art, machine learning methods (such as single-layer perceptrons) have been tried in the field of energy load forecasting. By constructing a linear regression model to handle the simple mapping relationship between price and load, and using historical data to train the weight parameters to achieve the prediction function. For example, in the analysis of electricity price elasticity, a single-layer perceptron is used to fit the linear price-load relationship, and the parameters are optimized by gradient descent to reduce the prediction error.

[0004] However, the prior art has obvious limitations: the traditional single-layer perceptron model is limited by the linear assumption and cannot represent non-linear response behaviors such as energy substitution and time-of-use transfer; the traditional perceptron is designed for binary classification tasks and is difficult to handle the fitting requirements of multi-dimensional elasticity coefficient matrices in the integrated energy system; the traditional single-layer perceptron model is sensitive to noisy data and is prone to overfitting when the data fluctuates greatly. These defects lead to insufficient fitting accuracy of the coefficient matrix of traditional methods in complex scenarios, restricting the practical application effect of the demand response model. Summary of the Invention

[0005] Aiming at the technical problems that the existing method of using the traditional single-layer perceptron model to fit the coefficient matrix of the demand response model of the integrated energy system cannot handle non-linear response relationships, is difficult to synchronously fit multi-dimensional elasticity coefficient matrices, and noisy data is prone to cause overfitting, this application provides a method, system, device and medium for fitting the coefficient matrix of the demand response model, which can handle non-linear response behaviors and perform multi-dimensional coefficient matrix fitting, while reducing the sensitivity to noisy data and the risk of overfitting, and further improving the fitting accuracy of the coefficient matrix and the application effect of the demand response model in complex scenarios.

[0006] In the first aspect, this application provides a method for fitting the coefficient matrix of a demand response model, including the following steps: S1. Obtain historical data of a set of integrated energy system indicators, calculate the change rate of the response indicator and the corresponding change rate of the load , form sample pairs, and form a demand response historical data set ; S2. Construct an improved perceptron model according to the demand response model of the integrated energy system. The input of the improved perceptron model is defined as the change rate of response indicators, and the output is defined as the predicted value of the load change rate; Among them, a single-layer improved perceptron model is constructed for the linear demand response model, and a multi-layer improved perceptron model is constructed for the non-linear demand response model; The multi-layer improved perceptron model includes an input layer, at least one hidden layer and an output layer. The output of each hidden layer is used as the input of the next layer. The expression is:

[0007] In the formula, is the weighted input of the th layer, , the 0th layer is the input layer, and the th layer is the output layer; is the weight matrix of the th layer; is the activation value of the th layer, where is the input of the multi-layer improved perceptron model; is the bias term of the th layer; is the activation function of the th layer; The loss function of the multi-layer improved perceptron is:

[0008] In the formula, is the mean square error of the multi-layer perceptron; is the adjustment factor of the th layer; is the bias term of the th layer; is the th value of the activation value of the th layer; is the th actual value of the load change rate; S3. Train the improved perceptron model, update the weight matrix and the bias term until the loss function ≤ the allowable error; S4. Extract the weight matrix of the output layer of the trained perceptron model as the elastic coefficient matrix of the demand response model of the integrated energy system.

[0009] It should be further noted that in step S1, the comprehensive energy system indicators include the energy price change rate, the carbon intensity change rate, and the user load data before and after demand response. The calculation formula is:

[0010] In the formula, is the th energy price change rate; is the th carbon intensity change rate; The calculation formula of

[0011] is: is the user load data before demand response for the th; is the user load data after demand response for the th.

[0012] It should be further noted that in step S2, the formula of the linear demand response model is:

[0013] In the formula, is the elasticity coefficient matrix; The formula of the non - linear demand response model is:

[0014] In the formula, is the elasticity coefficient matrix; is the number of demand response times, .

[0015] It should be further noted that in step S2, the expression of the single - layer improved perceptron model is:

[0016] The single - layer improved perceptron loss function is:

[0017] In the formula, is the output of the single - layer improved perceptron model; is the input of the single - layer improved perceptron model; is the weight matrix; is the mean squared error of the single-layer perceptron; is the adjustment factor; is the bias term; is the actual value of the load change rate.

[0018] Furthermore, it should be noted that in step S2, the activation function of the hidden layer of the multi-layer improved perceptron model adopts the ReLU or Sigmoid function, and the output layer adopts the linear activation function.

[0019] Furthermore, it should be noted that in step S2, the steps to determine include: Calculate the standard deviation of in the demand response historical data set :

[0020] When , ; When , .

[0021] Furthermore, it should be noted that when ; when takes values in the range of 0.5 - 0.8; when takes values in the range of 0.3 - 0.5.

[0022] Furthermore, it should be noted that in step S3, the improved perceptron model is trained using the stochastic gradient descent method, the learning rate takes values in the range of (0, 1], and the weight matrix and bias term are updated through backpropagation.

[0023] Furthermore, it should be noted that in step S3, when the improved perceptron model is a single-layer improved perceptron model, the training steps are as follows: S301. Initialize the weight matrix and the bias term , and set the random seed; S302. Perform forward propagation for each sample and calculate the predicted value of the load change rate; S303. Calculate the loss function and backpropagate the gradient; S304. Update the parameter weight matrix and the bias term ; S305. Loop and execute S302 - S304 until ≤ allowable error, and complete the training.

[0024] Furthermore, it should be noted that in step S3, when the improved perceptron model is a multi - layer improved perceptron model, the training steps are as follows: S311. Initialize the weight matrices and bias terms of each hidden layer and the output layer; S312. Perform forward propagation for each sample, calculate the outputs of each hidden layer and the predicted value of the load change rate; S313. Calculate the loss function and backpropagate the gradients of each hidden layer and the output layer; S314. Update all weight matrices and bias terms; S315. Loop and execute S312 - S314 until ≤ allowable error, and complete the training.

[0025] Furthermore, it should be noted that in step S3, the allowable error is 0 - 0.05.

[0026] In the second aspect, the present application provides a coefficient matrix fitting system for a demand response model, which is used to implement the coefficient matrix fitting method for the demand response model of the above - mentioned integrated energy system, including: A data acquisition module, which is used to obtain historical data of integrated energy system indicators; A data pre - processing module, which is used to calculate the response index change rate and the corresponding load change rate according to the historical data of integrated energy system indicators, form sample pairs, and form a historical data set of demand response; A model construction module, which is used to construct an improved perceptron model according to the demand response model of the integrated energy system; A model training module, which is used to train the improved perceptron model; A matrix extraction module, which is used to extract the weight matrix of the output layer of the trained perceptron model as the elastic coefficient matrix of the demand response model of the integrated energy system.

[0027] In the third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor is used to implement the steps of the coefficient matrix fitting method for the demand response model when executing the computer program.

[0028] In the fourth aspect, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the coefficient matrix fitting method for the demand response model are implemented.

[0029] As can be seen from the above technical solutions, the present application has the following advantages: 1. For the linear demand response model, the present application constructs a single-layer improved perceptron model, and for the non-linear demand response model, a multi-layer improved perceptron model is constructed. In the multi-layer improved perceptron model, by introducing a hidden layer and a non-linear activation function, the rate of change of the response index in the input layer is cascaded and mapped through multiple layers, and the non-linear elastic coefficient is directly characterized by the weight matrix of the output layer, which can effectively capture the complex correlation between load changes and multi-energy coupling effects, and improve the processing ability of complex energy response relationships.

[0030] 2. Based on the direct extraction mechanism of the weight matrix of the output layer of the perceptron model, the present application solves the limitations of traditional methods that rely on manual experience or single-dimensional fitting, and automatically encodes multi-dimensional elastic coefficients using the fully connected weight parameters from the input layer to the output layer, and synchronously generates the coefficient matrix of the demand response model, providing a high-precision multi-energy collaborative response quantification basis for the dynamic regulation of the integrated energy system.

[0031] 3. By jointly optimizing the mean square error and the bias term penalty term through an improved loss function, the present application can overcome the deficiency that noise data is prone to cause overfitting, balance the model accuracy and robustness during the training process, better optimize the model parameters, reduce the influence of noise data, reduce the risk of overfitting, improve the fitting accuracy of the coefficient matrix of the model in complex scenarios, and enhance the generalization ability of the coefficient matrix in fluctuating scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the present application, the drawings required for description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0033] Figure 1 is a flowchart of a method for fitting the coefficient matrix of a demand response model in an embodiment of the present application.

[0034] Figure 2 is a schematic diagram of the coefficient matrix of a demand response model in a residential area in an embodiment of the present application.

[0035] Figure 3 is a schematic diagram of the coefficient matrix of a demand response model in an industrial area in an embodiment of the present application.

[0036] Figure 4 is a schematic diagram of the coefficient matrix of a demand response model in a commercial area in an embodiment of the present application.

[0037] Figure 5It is a schematic block diagram of a coefficient matrix fitting system for a demand response model in an embodiment of the present application.

[0038] Figure 6 It is a schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. Specific implementation manners

[0039] To make the application objectives, features, and advantages of the present application more obvious and understandable, the technical solutions protected by the present application will be clearly and completely described below by using specific embodiments and the accompanying drawings. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this patent, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this patent.

[0040] The coefficient matrix fitting method for the demand response model involved in the present application mainly aims at the technical field of optimizing the demand response model of the integrated energy system. A single-layer improved perceptron model is constructed for the linear demand response model, and a multi-layer improved perceptron model is constructed for the nonlinear demand response model. The multi-layer improved perceptron model introduces a hidden layer and a non-linear activation function, and maps the change rate of the response index in the input layer through multi-level cascades. The non-linear elastic coefficient is directly characterized by the weight matrix of the output layer, which can effectively capture the complex correlation between load changes and multi-energy coupling effects, and improve the processing ability of complex energy response relationships. Based on the direct extraction mechanism of the weight matrix of the output layer of the perceptron model, it solves the limitations of traditional methods that rely on manual experience or single-dimensional fitting, automatically encodes multi-dimensional elastic coefficients using the full connection weight parameters from the input layer to the output layer, and synchronously generates the coefficient matrix of the demand response model, providing a high-precision multi-energy collaborative response quantization basis for the dynamic regulation of the integrated energy system. By jointly optimizing the mean square error and the bias term penalty term through an improved loss function, it can overcome the deficiency that noise data is prone to cause overfitting, balance the model accuracy and robustness during the training process, better optimize the model parameters, reduce the influence of noise data, reduce the risk of overfitting, improve the fitting accuracy of the coefficient matrix of the model in complex scenarios, and enhance the generalization ability of the coefficient matrix in fluctuating scenarios.

[0041] The coefficient matrix fitting method for the demand response model involved in the present application mainly has the technical problems that the existing method of using a traditional single-layer perceptron model to fit the coefficient matrix of the demand response model of the integrated energy system cannot handle non-linear response relationships, is difficult to synchronously fit the multi-dimensional elastic coefficient matrix, and noise data is prone to cause overfitting.

[0042] The coefficient matrix fitting method of the demand response model involved in the present application will be described in detail below. For illustration rather than limitation, specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details.

[0043] In the coefficient matrix fitting method of the demand response model involved in the present application, the term "including" indicates the existence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations. The terms "including", "comprising", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0044] For the convenience of clearly describing the technical solutions of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and roles. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily limit to being different.

[0045] The statements such as "an embodiment" or "some embodiments" described in the present application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of the present application. Thus, the statements such as "in an embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" and the like that appear in different parts of the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0046] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.

[0047] The coefficient matrix fitting method of the demand response model provided by the embodiments of the present application is executed by a computer device. Correspondingly, the coefficient matrix fitting system of the demand response model runs in the computer device.

[0048] The following are some noun explanations in this solution to facilitate a better understanding of this solution: Integrated Energy System Demand Response Model: This model is a tool for optimizing and managing the dynamic response of user-side resources in multi-energy systems (such as electricity, natural gas, heat energy, and renewable energy). Its goal is to adjust users' energy consumption behaviors under the guidance of electricity price signals or incentive policies by coordinating the conversion and complementarity between different energy forms (such as power-to-heat conversion and energy storage regulation), so as to improve energy efficiency, reduce system operation costs, and enhance grid stability. For example, during peak electricity demand periods, the model may guide users to increase the use of heat storage equipment to reduce the grid load.

[0049] Coefficient Matrix of the Demand Response Model: The coefficient matrix is a key component in the demand response mathematical model, which quantifies the interaction relationships between variables in matrix form. The rows and columns of the matrix usually represent different variables (such as user types, time periods, energy types), and the element values are the corresponding response coefficients or efficiency coefficients. For example, in the electricity price elasticity model, the coefficient matrix may describe the sensitivity of users' electricity consumption at different time periods to electricity price changes, and is used to calculate the load adjustment amount. This matrix is commonly found in linear programming or optimization models and serves as the basis for constraint conditions or objective functions.

[0050] Single-Layer Perceptron: The single-layer perceptron is the simplest feedforward neural network, which only contains an input layer and an output layer, without a hidden layer. Its working principle is to perform a weighted sum of the input features and output a binary classification result (such as 0 or 1) through an activation function (such as the step function). It is suitable for linearly separable problems (such as logical AND / OR), but cannot handle non-linear problems (such as exclusive OR). Its training uses the perceptron learning rule to reduce classification errors by adjusting the weights.

[0051] Taking the typical single-layer perceptron model for handling binary classification problems as an example, define the input space is a subset of real numbers of dimension , where is the number of features; the output space , where 1 and -1 represent the two output categories. The following function from the input space to the output space

[0052] is called a perceptron.

[0053] In the formula, the vector , the vector , is the weight matrix, is the bias term, is the sign function, when takes 1, when takes -1.

[0054] It should be noted that the parameters involved in the above typical single-layer perceptron model have no association with the technical solution of this application, and are only used to demonstrate the architecture of a typical single-layer perceptron model.

[0055] Figure 1 It is a flowchart of a method for fitting the coefficient matrix of a demand response model according to an embodiment of this application. Among them, Figure 1 The execution subject can be a system for fitting the coefficient matrix of a demand response model. According to different requirements, the order of steps in this flowchart can be changed, and some can be omitted.

[0056] Such as Figure 1 shown, the method for fitting the coefficient matrix of the demand response model includes: Step S1, obtain groups of historical data of integrated energy system indicators, calculate the response index change rate and the corresponding load change rate , form sample pairs, and form a demand response historical data set .

[0057] By systematically collecting historical data and calculating the response index and load change rate, a sample data set with time series characteristics and scenario coverage is constructed, providing a multi-dimensional data basis for model training, ensuring that the demand response characteristics under different operating states are effectively learned, and supporting the accuracy and robustness of subsequent model training.

[0058] In some specific embodiments, the integrated energy system indicators include the energy price change rate, the carbon intensity change rate, and the user load data before and after demand response. The calculation formula of

[0059] is: is the th energy price change rate; is the th carbon intensity change rate; The calculation formula of

[0060] is: is the th user load data before demand response; is the th user load data after demand response.

[0061] Clarify the calculation methods and data sources of the integrated energy system indicators. By defining the standardized calculation formulas for the energy price change rate, carbon intensity change rate, and load data, ensure the dimensional consistency and comparability of the input data, reduce the model deviation caused by data noise or magnitude differences, and improve the standardization and reliability of the dataset construction.

[0062] Step S2, construct an improved perceptron model according to the demand response model of the integrated energy system. The input of the improved perceptron model is defined as the change rate of the response index, and the output is defined as the predicted value of the load change rate. Among them, for the linear demand response model, construct a single-layer improved perceptron model, and the expression is:

[0063] Single-layer improved perceptron loss function is:

[0064] In the formula, is the output of the single-layer improved perceptron model; is the input of the single-layer improved perceptron model; is the weight matrix; is the mean square error of the single-layer perceptron; is the adjustment factor; is the bias term; is the actual value of the load change rate of the For the non-linear demand response model, construct a multi-layer improved perceptron model, including an input layer, at least one hidden layer, and an output layer. The output of each hidden layer is used as the input of the next layer, and the expression is:

[0065] In the formula, is the weighted input of the layer, , the 0th layer is the input layer, and the layer is the output layer; is the weight matrix of the is the activation value of the layer, where is the input of the multi-layer improved perceptron model; is the bias term of the layer; is the layer activation function; Multi-layer improved perceptron loss function is:

[0066] In the formula, is the mean square error of the multi-layer perceptron; is the layer adjustment factor; is the layer bias term; is the th value of the activation value of the layer; is the th actual value of the load change rate.

[0067] Based on the linear and non-linear demand response models, a single-layer and multi-layer improved perceptron structure is designed respectively. By combining weighted inputs and activation functions, a flexible network hierarchy is constructed, which can accurately represent the linear or non-linear mapping relationship between indicators such as energy price and carbon intensity and load changes. At the same time, a regulation factor is introduced to optimize the loss function, effectively balancing the model complexity and fitting accuracy.

[0068] Among them, in this application, the single-layer improved perceptron model is simplified and expressed as , and the bias term approaches 0, which means that the accuracy of the training data is relatively high by default, and the data-driven ability can be improved; The multi-layer improved perceptron model introduces hidden layers and non-linear activation functions to support complex relationship fitting.

[0069] In some specific embodiments, the formula of the linear demand response model is:

[0070] In the formula, is the elasticity coefficient matrix; The formula of the non-linear demand response model is:

[0071] In the formula, is the elasticity coefficient matrix is the number of demand response times, .

[0072] By formulating the direct correlation between the elasticity coefficient matrix and the load change in the linear demand response model, it provides a theoretical basis for the construction of the single-layer perceptron, simplifies the linear relationship modeling process, and at the same time lays a foundation for the physical meaning interpretation of the subsequent weight matrix, enhancing the interpretability and engineering practicability of the model.

[0073] In some specific embodiments, the activation function of the hidden layer of the multi-layer improved perceptron model adopts the ReLU or Sigmoid function, and the output layer adopts the linear activation function.

[0074] By defining the type of the hidden layer activation function and the linear activation method of the output layer, using the ReLU or Sigmoid function to solve the gradient disappearance problem of the multi-layer perceptron and enhance the non-linear expression ability, and the linear design of the output layer ensures the dimensional matching between the final output of the model and the actual load change rate, taking into account the model complexity and the rationality of the prediction result.

[0075] In some specific embodiments, determining includes the steps of: Calculating the standard deviation in the of the demand response historical data set :

[0076] When , ; When , .

[0077] By establishing a quantitative relationship between the adjustment factor λ and the standard deviation of the load change rate, the dynamic adaptation of the regularization strength is realized. When the data fluctuation is small, the bias term constraint is strengthened to avoid overfitting. When the fluctuation is significant, the constraint strength is reduced to retain the model flexibility, and the generalization performance and robustness of the model in different data distribution scenarios are improved.

[0078] In some specific embodiments, when ; when takes a value of 0.5 - 0.8; when takes a value of 0.3 - 0.5.

[0079] Step S3, training the improved perceptron model, updating the weight matrix and the bias term until the loss function ≤ the allowable error.

[0080] The random gradient descent method is combined with the backpropagation mechanism to iteratively update the weights and bias terms. By dynamically adjusting the learning rate and gradient direction, the rapid convergence of the loss function is achieved, ensuring that the model gradually approaches the optimal solution during training and finally reaches the preset allowable error threshold, thereby improving the training efficiency of the model and the stability of parameter optimization.

[0081] In some specific embodiments, the improved perceptron model is trained using the random gradient descent method. The value range of the learning rate is (0, 1], and the weight matrix and bias terms are updated through backpropagation.

[0082] The random gradient descent method is used as the optimization algorithm. By iteratively updating small batches of samples, the consumption of computing resources is reduced. Combining with the reasonable setting of the learning rate, the convergence of the model is accelerated, which is suitable for the efficient training of large-scale historical data. At the same time, the backpropagation mechanism is used to accurately calculate the parameter gradients, ensuring the correctness of the weight update direction.

[0083] In some specific embodiments, when the improved perceptron model is a single-layer improved perceptron model, the training steps are as follows: S301. Initialize the weight matrix and the bias term , and set a random seed; S302. Perform forward propagation for each sample to calculate the predicted value of the load change rate; S303. Calculate the loss function and backpropagate the gradient; S304. Update the parameter weight matrix and the bias term ; S305. Loop and execute S302 - S304 until ≤ allowable error, and complete the training.

[0084] By standardizing the training process of the single-layer improved perceptron model, clarifying the phased execution steps of parameter initialization, forward propagation, loss calculation, backpropagation, and parameter update, it ensures that the training process of the model under the single-layer linear structure is controllable and reproducible. By dynamically adjusting the learning rate and gradient direction, the efficient update of the weight matrix and bias term is achieved, avoiding the problem of unstable convergence caused by random initialization in the traditional perceptron. At the same time, the standardized iteration mechanism ensures that the model converges quickly within the allowable error range, improving the training efficiency and parameter optimization accuracy in the linear demand response scenario.

[0085] In some specific embodiments, when the improved perceptron model is a multi-layer improved perceptron model, the training steps are as follows: S311. Initialize the weight matrices and bias terms of each hidden layer and the output layer; S312. Perform forward propagation for each sample, calculate the outputs of each hidden layer and the predicted load change rate; S313. Calculate the loss function and backpropagate the gradients of each hidden layer and the output layer; S314. Update all weight matrices and bias terms; S315. Loop through S312 - S314 until ≤ the allowable error, and complete the training.

[0086] For the complex network structure of the multi - layer improved perceptron model, a hierarchical initialization and gradient backpropagation mechanism is designed. By calculating the hidden layer outputs layer by layer and synchronously updating the weights and bias terms of each layer, the problem of gradient disappearance or explosion caused by parameter coupling in multi - layer neural networks is effectively solved. Combining the non - linear mapping ability of the activation function, the high - order correlation between the demand response index and the load change is accurately fitted. At the same time, through staged loop training, it is ensured that the loss function converges stably in the multi - hidden - layer scenario, significantly improving the generalization ability and dynamic adaptability of the non - linear demand response model.

[0087] In some specific embodiments, the allowable error is 0 - 0.05.

[0088] By setting the allowable error range to 0 - 0.05, a balance is established between the model accuracy and the computational cost, avoiding the risk of excessive training time or overfitting caused by excessive pursuit of low error. At the same time, it is ensured that the fitting result meets the accuracy requirements of actual engineering applications, enhancing the practicality and economy of model deployment.

[0089] Step S4, extract the weight matrix of the output layer of the trained perceptron model as the elastic coefficient matrix of the integrated energy system demand response model.

[0090] By directly extracting the weight matrix of the output layer to obtain the elastic coefficient matrix, the complex parameter derivation process in traditional fitting methods is avoided, simplifying the model deployment process and improving the computational efficiency, enabling the integrated energy system to quickly respond to dynamic demands and providing a high - precision coefficient basis for the formulation of real - time regulation strategies.

[0091] In a specific embodiment, the coefficient matrix fitting method of the demand response model includes: Step S1, obtain groups of historical data of integrated energy system indicators, calculate the response index change rate and the corresponding load change rate , form sample pairs to form a demand response historical data set ; The indicators of the integrated energy system include the energy price change rate, the carbon intensity change rate, and the user load data before and after demand response. The calculation formula is:

[0092] In the formula, is the th energy price change rate; is the th carbon intensity change rate; The calculation formula of

[0093] is: is the th user load data before demand response; is the th user load data after demand response; Step S2: Construct an improved perceptron model according to the demand response model of the integrated energy system. The input of the improved perceptron model is defined as the response index change rate, and the output is defined as the predicted value of the load change rate. Among them, the demand response model is a non - linear model, and the formula is:

[0094] In the formula, is the elasticity coefficient matrix is the number of demand response times, ; Construct a multi - layer improved perceptron model for the demand response model, which includes an input layer, L - 1 hidden layers and an output layer. The output of each hidden layer is used as the input of the next layer. The expression is:

[0095] In the formula, is the weighted input of the th layer, , the 0th layer is the input layer, and the th layer is the output layer; is the weight matrix of the th layer; is the activation value of the th layer, where is the input of the multi - layer improved perceptron model; is the bias term of the th layer; is the activation function of the layer, where the activation function of the hidden layer adopts the ReLU or Sigmoid function, and the output layer adopts the linear activation function; Loss function of the multi-layer improved perceptron is:

[0096] In the formula, is the mean square error of the multi-layer perceptron; is the adjustment factor of the layer; is the bias term of the layer; is the th value of the activation value of the layer; is the th actual value of the load change rate; Determining includes the steps of: Calculating the standard deviation in the demand response historical data set : :

[0097] When ; When takes the value of.8; When takes the value of 0.5; Step S3, training the improved perceptron model using the stochastic gradient descent method, the value range of the learning rate is (0,1], and updating the weight matrix and bias term through backpropagation. The training steps are: S311. Initialize the weight matrix and bias term of each hidden layer and the output layer; S312. Perform forward propagation on each sample, calculate the output of each hidden layer and the predicted value of the load change rate; S313. Calculate the loss function and backpropagate the gradients of each hidden layer and the output layer; S314. Update all weight matrices and bias terms; S315. Loop through S312 - S314 until ≤Allowable error, the allowable error is 0.01, and the training is completed; Step S4: Extract the weight matrix of the output layer of the trained perceptron model as the elasticity coefficient matrix of the integrated energy system demand response model.

[0098] Use the above method to fit the elasticity coefficient matrices of the three typical functional areas of residential, industrial, and commercial areas. Figures 2 - 4 They are the schematic diagrams of the demand response model coefficient matrices for the residential, industrial, and commercial areas respectively. Among them, the vertical time side represents the response ability at the current time under the response index of the current time period; the horizontal time side represents the influence of the corresponding indexes of other time periods on the current time period. The darker the color, the stronger the response ability.

[0099] Among them, Figure 2 is the schematic diagram of the demand response model coefficient matrix for the residential area. It can be seen from Figure 2 that the morning and evening rush hours in the residential area are from 7 to 9 o'clock and from 18 to 20 o'clock, and the response ability is weak. The response is good in the remaining time periods; Figure 3 is the schematic diagram of the demand response model coefficient matrix for the industrial area. It can be seen from Figure 3 that the daytime working hours in the industrial area are from 8 to 18 o'clock, and the user's independent load reduction is weak. The main method is replacement and transfer; 13 o'clock, 22 to 6 o'clock are the daytime lunch break and the non-stop working hours at night, and the response ability is greatly affected by the daytime working period; Figure 4 is the schematic diagram of the demand response model coefficient matrix for the commercial area. It can be seen from Figure 4 that the business hours in the commercial area are from 10 to 21 o'clock, and the load enters the sub-peak period during the non-lunch and dinner hours. The response ability is good except during this period.

[0100] It can be seen that the performance of the elasticity coefficient matrix of each typical functional area conforms to the load spatio-temporal characteristics of this functional area, and can accurately represent the response ability at each time period and the interactive influence between time periods. Therefore, the coefficient matrix fitting method of the demand response model in this application can complete the correct fitting of the multi-dimensional parameters of the integrated energy system demand response model.

[0101] The following is an embodiment of the coefficient matrix fitting system of the demand response model provided by the present disclosure. The coefficient matrix fitting system of the demand response model and the coefficient matrix fitting method of the demand response model in the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the coefficient matrix fitting system of the demand response model, reference can be made to the embodiment of the coefficient matrix fitting method of the demand response model.

[0102] As Figure 5 shown, the coefficient matrix fitting system of the demand response model includes: A data acquisition module for obtaining historical data of the integrated energy system indicators; A data preprocessing module, configured to calculate a response index change rate and a corresponding load change rate according to historical data of integrated energy system indexes, form sample pairs, and form a demand response historical data set; A model construction module, configured to construct an improved perceptron model according to the demand response model of the integrated energy system; A model training module, configured to train the improved perceptron model; A matrix extraction module, configured to extract the weight matrix of the output layer of the trained perceptron model as the elasticity coefficient matrix of the demand response model of the integrated energy system.

[0103] The coefficient matrix fitting system of the demand response model of the integrated energy system in this embodiment is used to implement the coefficient matrix fitting method of the demand response model. The steps include: S1. Obtain historical data of a group of integrated energy system indexes, calculate the response index change rate and the corresponding load change rate , form sample pairs, and form a demand response historical data set ; S2. Construct an improved perceptron model according to the demand response model of the integrated energy system. The input of the improved perceptron model is defined as the response index change rate, and the output is defined as the predicted value of the load change rate; Among them, a single-layer improved perceptron model is constructed for the linear demand response model, and the expression is:

[0104] The loss function of the single-layer improved perceptron is:

[0105] In the formula, is the output of the single-layer improved perceptron model; is the input of the single-layer improved perceptron model; is the weight matrix; is the mean square error of the single-layer perceptron; is the adjustment factor; is the bias term; is the th actual value of the load change rate; Construct a multi-layer improved perceptron model for the non-linear demand response model, which includes an input layer, at least one hidden layer, and an output layer. The output of each hidden layer serves as the input of the next layer, and the expression is:

[0106] In the formula, is the weighted input of the th layer, , the 0th layer is the input layer, and the th layer is the output layer; is the weight matrix of the th layer; is the activation value of the th layer, where is the input of the multi-layer improved perceptron model; is the bias term of the th layer; is the activation function of the th layer; The loss function of the multi-layer improved perceptron is:

[0107] In the formula, is the mean square error of the multi-layer perceptron; is the adjustment factor of the th layer; is the bias term of the th layer; is the th value of the activation value of the th layer; is the th actual value of the load change rate; S3. Train the improved perceptron model, update the weight matrix and the bias term until the loss function ≤ the allowable error; S4. Extract the weight matrix of the output layer of the trained perceptron model as the elasticity coefficient matrix of the demand response model of the integrated energy system.

[0108] This application also provides an electronic device for implementing each embodiment of this application. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor.

[0109] Those skilled in the art can understand that the structure of the electronic device involved in the embodiments of the present application does not limit the electronic device. The electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0110] Figure 6 Schematic diagram of the hardware structure of an electronic device for implementing each embodiment of the present application.

[0111] The electronic device includes, but is not limited to, components such as a processor and a memory. Those skilled in the art can understand that the structure of the electronic device involved in the embodiments of the present application does not limit the electronic device. The electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0112] In the embodiments of the present application, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.

[0113] In the embodiments of the present application, the processor may be implemented by using at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to execute the functions described herein. In some cases, such an implementation may be implemented in the controller. For a software implementation, an implementation of a process or function may be implemented with a separate software module that allows execution of at least one function or operation. The software code may be implemented by a software application (or program) written in any suitable programming language. The software code may be stored in the memory and executed by the controller.

[0114] In addition, the electronic device includes some functional modules not shown herein and will not be elaborated herein.

[0115] Those skilled in the art to which the present application pertains can understand that various aspects of the electronic device provided by the present application can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to herein as "circuitry", "module", or "system".

[0116] The present application also provides a storage medium in which a program product capable of implementing the coefficient matrix fitting method of the demand response model is stored. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.

[0117] The storage medium can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0118] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A coefficient matrix fitting method for a demand response model, characterized in that: include: S1. Acquisition Calculate the historical data of comprehensive energy system indicators and the change rate of response indicators And the corresponding load change rate ,constitute sample pairs to form a historical data set of demand response ; S2. An improved perceptron model is constructed based on the demand response model of the integrated energy system. The input of the improved perceptron model is defined as the response index change rate, and the output is defined as the load change rate prediction value; Among them, a single-layer improved perceptron model is constructed for the linear demand response model, and a multi-layer improved perceptron model is constructed for the nonlinear demand response model; The multi-layer improved perceptron model includes an input layer, at least one hidden layer and an output layer. The output of each hidden layer is used as the input of the next layer. The expression is: In the formula, For the The weighted input of the layer, , the 0th layer is the input layer, the Layer is the output layer; For the The weight matrix of the layer; For the The activation value of the layer, where Improve the input of the perceptron model for multiple layers; For the The bias term of the layer; For the Layer activation function; Multi-layer improved perceptron loss function for: In the formula, is the mean square error of the multi-layer perceptron; For the Layer adjustment factor; For the The bias term of the layer; For the The activation value of the layer values; For the The actual value of the load change rate; S3. Train the improved perceptron model and update the weight matrix and bias term until the loss function is ≤ the allowed error; S4. Extract the weight matrix of the output layer of the trained perceptron model as the elasticity coefficient matrix of the integrated energy system demand response model.

2. The coefficient matrix fitting method according to claim 1, characterized in that: In step S1, the comprehensive energy system indicators include energy price change rate, carbon intensity change rate, and user load data before and after demand response. The calculation formula is: In the formula, For the The rate of change of energy prices; For the The carbon intensity change rate; The calculation formula is: In the formula, For the User load data before demand response; For the User load data after demand response.

3. The coefficient matrix fitting method according to claim 1, characterized in that: In step S2, the formula of the linear demand response model is: In the formula, is the elastic coefficient matrix; The expression of the single-layer improved perceptron model is: Single-layer improved perceptron loss function for: In the formula, Improve the output of the perceptron model for a single layer; Improve the input of the perceptron model for a single layer; is the weight matrix; is the mean square error of a single-layer perceptron; is the regulating factor; is the bias term; For the The actual value of the load change rate; The formula for the nonlinear demand response model is: In the formula, is the elastic coefficient matrix; is the number of demand responses, .

4. The coefficient matrix fitting method according to claim 1, characterized in that: In step S2, determine The steps include: Computing demand response historical datasets middle Standard Deviation : when hour, ; when hour, .

5. The coefficient matrix fitting method according to claim 1, wherein: In step S3, the stochastic gradient descent method is used to train the improved perceptron model, the learning rate range is (0,1], and the weight matrix and bias term are updated through back propagation.

6. The coefficient matrix fitting method according to claim 5, characterized in that: In step S3, when the improved perceptron model is a single-layer improved perceptron model, the training steps are: S301. Initialize weight matrix and the bias term , set the random seed; S302. Perform forward propagation for each sample to calculate the load change rate prediction value; S303. Calculate the loss function And back-propagate the gradient; S304. Update parameter weight matrix and the bias term ; S305. Loop through S302-S304 until ≤ allowable error, training is completed.

7. The coefficient matrix fitting method according to claim 5, characterized in that: In step S3, when the improved perceptron model is a multi-layer improved perceptron model, the training steps are: S311. Initialize the weight matrix and bias items of each hidden layer and output layer; S312. Perform forward propagation for each sample to calculate the output of each hidden layer and the load change rate prediction value; S313. Calculate the loss function And back-propagate the gradients of each hidden layer and output layer; S314. Update all weight matrices and bias items; S315. Loop through S312-S314 until ≤ allowable error, training is completed.

8. A coefficient matrix fitting system for a demand response model, characterized in that: The method for implementing the coefficient matrix fitting method according to any one of claims 1 to 7 comprises: Data collection module, used to obtain historical data of comprehensive energy system indicators; A data preprocessing module is used to calculate the response indicator change rate and the corresponding load change rate based on the historical data of the comprehensive energy system indicators, form a sample pair, and form a demand response historical data set; A model building module, used to build an improved perceptron model based on the demand response model of the integrated energy system; Model training module, used to train and improve the perceptron model; The matrix extraction module is used to extract the weight matrix of the output layer of the trained perceptron model as the elasticity coefficient matrix of the integrated energy system demand response model.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the steps of the coefficient matrix fitting method as described in any one of claims 1 to 7 when executing the computer program.

10. A storage medium, characterized in that: A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the coefficient matrix fitting method as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Dynamic load time domain identification method based on multilayer perceptron

    CN111539157A

  • Load and price prediction method

    CN112862143A

  • Learning identification method and system for comprehensive demand response characteristics of comprehensive energy system

    CN115775039A

  • Micro-grid low-carbon economic dispatching method, system, equipment and medium

    CN116780546A

  • New energy power system frequency stability rapid analysis method

    CN118174323A