Load prediction and control method for industrial park
By combining variational short-time memory networks and latent variable models, the problems of inaccurate load forecasting and slow response speed in traditional power systems are solved, enabling more efficient power system management and resource allocation, and adapting to the nonlinear and time-varying properties of complex power systems.
Patent Information
- Application Number
- CN202410196894.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-22
- Publication Date
- 2026-02-06
AI Technical Summary
Traditional power system load forecasting is inaccurate, slow to respond, relies on cumbersome manual intervention, and cannot adapt to complex nonlinear and time-varying properties. This results in insufficient power supply during high load periods or wasted energy during low load periods, and makes it difficult to effectively cope with sudden changes.
Load forecasting is performed using variational short-time memory networks, which include a two-layer memory network and a latent variable model. Combined with sensor-acquired data, the two-layer memory network captures the complex dependencies in time series data, the latent variable model is used for data modeling, and PID or MPC controllers are used for power system output control.
It improves the accuracy of load forecasting and system stability, reduces operating costs, adapts to the nonlinear and time-varying nature of complex power systems, and enables more efficient allocation and management of power resources.
Smart Images

Figure CN121484832A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power control technology, and in particular to load forecasting and control methods for industrial parks. Background Technology
[0002] Power systems play a vital role in modern society, providing essential electricity to industry, commerce, and residential communities. However, the operation and management of power systems face numerous challenges, including the accuracy of load forecasting, real-time control of power output, system stability, and efficiency. Therefore, developing efficient and intelligent power system management technologies is crucial to improving the reliability and performance of power systems.
[0003] Traditional power system management typically employs load forecasting and control methods based on statistical approaches and empirical rules. These methods rely on historical data and human intervention, and therefore have several significant problems:
[0004] Inaccurate load forecasting: Traditional methods often rely on statistical models that fail to capture complex time dependencies and nonlinear relationships, resulting in limited accuracy in load forecasting. This can lead to the power system being insufficient to meet demand during periods of high load or wasting energy during periods of low load.
[0005] Slow response time: Traditional control methods typically have a slow response time and cannot adjust power output in a timely manner to adapt to system changes. This may lead to problems in the power system when faced with sudden load changes or instability, or even cause power system failures.
[0006] Manual intervention is cumbersome: Traditional methods require manual intervention and adjustments, which is not only time-consuming and labor-intensive but also prone to human error. Furthermore, manual intervention may not be effective for complex power systems.
[0007] Unsuitable for nonlinear and time-varying systems: Traditional methods are often unable to adapt to the nonlinear and time-varying properties of complex power systems, which limits their performance and applicability. Summary of the Invention
[0008] This application provides a method for load forecasting and control in industrial parks. This invention improves the accuracy of load forecasting and system stability, reduces the operating costs of industrial parks, and enhances the accuracy of power system control.
[0009] This application provides a method for load forecasting and control in industrial parks, the method comprising:
[0010] Step 1: Deploy sensors within the industrial park to periodically collect load data and obtain time-series data;
[0011] Step 2: Construct a variational short-term memory network for load prediction. The variational short-term memory network includes a two-layer memory network and a variational estimation part. The two-layer memory part consists of two memory networks: a first-layer memory network and a second-layer memory network. Each load data point in the time series data is input to the first-layer memory network to calculate the candidate hidden states, update gates, reset gates, and new hidden states. Using the new hidden states of the first-layer memory network as input, the candidate hidden states, update gates, reset gates, and new hidden states of the second-layer memory network are calculated. The variational estimation part includes a two-layer latent variable model, an encoder, and a decoder. The two-layer latent variable model includes a first-layer latent variable model and a second-layer latent variable model. Initialize the mean and variance of the first-layer latent variable model, and the mean and variance of the second-layer latent variable model; use the mean and variance parameters of the first-layer latent variable model to sample the first-layer latent variables from the standard normal distribution; use the mean and variance parameters of the second-layer latent variable model to sample the second-layer latent variables from the standard normal distribution; at each time step, the encoder first uses the newly calculated hidden state of the second-layer memory network as input, maps the new hidden state of the second-layer memory network to the mean and variance of the first-layer latent variable model, and maps the new hidden state of the second-layer memory network to the mean and variance of the second-layer latent variable model; the decoder maps the first-layer latent variables and the second-layer latent variables back to the observed data space, and calculates the load prediction distribution;
[0012] Step 3: Control the output of the power system in the industrial park based on the load forecast distribution.
[0013] Furthermore, let the time series data collected in step 1 be X = {x1, x2, ..., x...} t ,…,x T}, where x t This represents the load data at time step t; T is the upper limit of the time step; before constructing the variational short-term memory network, the steps also include initializing the parameters of the variational short-term memory network, specifically including: initializing the weight matrix W. x W h W z W r Sum of deviation vectors b h ,b z ,b r Simultaneously, initialize the hidden state h of the first layer of the memory network. -1 It is a zero vector.
[0014] Furthermore, the first-layer memory network is represented using the following formula:
[0015]
[0016] in, This represents the hidden state of the first layer of the memory network at time step t. These are candidate hidden states for the first layer of the memory network; It serves as the update gate for the first layer of the memory network, controlling the degree of fusion between new and old information at time step t. The sigmoid function is used to compress the input data to a range between 0 and 1. It serves as the reset gate for the first layer of the memory network, determining whether the hidden state information from the previous time step is forgotten at time step t. This is achieved through a nonlinear transformation using the sigmoid function. The weight matrix of the first layer of the memory network is W, which is the same as the initial weight matrix W. x W h W z W r One-to-one correspondence is equal; The bias vector of the first layer of the memory network is compared with the initial bias vector b. h ,b z ,b r One-to-one correspondence equals; σ is the sigmoid function; tanh is the hyperbolic tangent function; This represents the hidden state of the first-layer memory network at time step t-1.
[0017] Furthermore, the second-layer memory network is represented using the following formula:
[0018]
[0019] in, This represents the hidden state of the second-layer memory network at time step t. These are candidate hidden states for the second-layer memory network; This is the update gate for the second-layer memory network, controlling the degree of fusion between new and old information at time step t, and is transformed nonlinearly using the sigmoid function; r t (2) It serves as the reset gate for the second-layer memory network, determining whether the hidden state information from the previous time step is forgotten at time step t. This is achieved through a non-linear transformation using the sigmoid function. The weight matrix of the first layer of the memory network is W, which is the same as the initial weight matrix W. x W h W z W r One-to-one correspondence, equal;
[0020] The bias vector of the second-layer memory network is compared with the initial bias vector b. h ,bz ,b r One-to-one correspondence is equal; This represents the hidden state of the second-layer memory network at time step t-1.
[0021] Furthermore, the first-level latent variable model is as follows:
[0022]
[0023] in, The first level of latent variables represents the potential data representation at time step t; The mean of the first-level latent variables is used to describe... The central position; The variance of the first-level latent variables is used to describe The dispersion; This is the mean weight matrix of the first-level latent variable model; This represents the mean deviation of the first-level latent variable model; This is the variance weight matrix of the first-level latent variable model; Variance bias of the first-level latent variable model;
[0024] The variance of the first-level latent variables is calculated using the following formula:
[0025]
[0026] According to the mean and variance Generated using a sampling method based on a standard normal distribution.
[0027] Furthermore, the second-level latent variable model is as follows:
[0028]
[0029] in, The second layer of latent variables represents the latent data representation at time step t; The mean of the second-level latent variables is used to describe... The central position; The variance of the second-level latent variables is used to describe The dispersion; This is the mean weight matrix of the second-level latent variable model; The mean deviation of the second-level latent variable model; This is the variance weight matrix of the second-level latent variable model; Variance bias of the second-level latent variable model.
[0030] Furthermore, the encoder is represented using the following formula:
[0031]
[0032] in, Represents a given hidden state Under the condition, the first level of latent variables The posterior distribution of; Indicates that given the hidden state h t and first-level latent variables Under the condition, the second level of latent variables The posterior distribution.
[0033] Furthermore, the decoder is represented using the following formula:
[0034]
[0035] in, Indicates that given latent variables and Load forecast distribution under the given conditions; It is a mapping function from latent variables to observed data; W is the variance matrix of the time series data, a diagonal matrix, indicating that the variance of the time series data is the same in each dimension; f The weight matrix of the mapping function is used for linear combination of latent variables. and To calculate load forecasts; b f This is the deviation vector of the mapping function, used to adjust the value of the estimated value; This represents the operation of connecting two levels of potential variables.
[0036] Furthermore, in step 3, a PID controller or an MPC controller is used to control the output of the power system in the industrial park based on the load forecast distribution.
[0037] The industrial park load forecasting and control method provided in this application has the following beneficial effects: This invention employs variational short-time memory networks and latent variable models, which can learn complex time dependencies and latent structures from historical load data. Compared to traditional methods, the load forecasting of this invention is more accurate. This means that industrial parks can better plan power resources, avoid power shortages or waste, and improve power utilization. Due to more accurate load forecasting and automated control strategies, power system operators can allocate power resources more effectively, reduce unnecessary energy waste, and lower power procurement costs. Furthermore, it reduces the need for manual intervention and lowers operating costs. This invention introduces deep learning technology and latent variable modeling, enabling it to adapt to various complex power systems, including systems with nonlinear and time-varying properties. This means that this invention is not only applicable to traditional power systems but also to complex systems such as new energy integration and microgrids, providing a feasible solution for future power system management. Attached Figure Description
[0038] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0039] Figure 1 This is a schematic diagram of the method flow for the industrial park load prediction and control method provided in an embodiment of the present invention. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] Example 1: Reference Figure 1 A method for load forecasting and control in industrial parks, the method comprising:
[0042] Step 1: Deploy sensors within the industrial park to periodically collect load data and obtain time-series data;
[0043] Step 2: Construct a variational short-term memory network for load prediction. The variational short-term memory network includes a two-layer memory network and a variational estimation part. The two-layer memory part consists of two memory networks: a first-layer memory network and a second-layer memory network. Each load data point in the time series data is input to the first-layer memory network to calculate the candidate hidden states, update gates, reset gates, and new hidden states. Using the new hidden states of the first-layer memory network as input, the candidate hidden states, update gates, reset gates, and new hidden states of the second-layer memory network are calculated. The variational estimation part includes a two-layer latent variable model, an encoder, and a decoder. The two-layer latent variable model includes a first-layer latent variable model and a second-layer latent variable model. Initialize the mean and variance of the first-layer latent variable model, and the mean and variance of the second-layer latent variable model; use the mean and variance parameters of the first-layer latent variable model to sample the first-layer latent variables from the standard normal distribution; use the mean and variance parameters of the second-layer latent variable model to sample the second-layer latent variables from the standard normal distribution; at each time step, the encoder first uses the newly calculated hidden state of the second-layer memory network as input, maps the new hidden state of the second-layer memory network to the mean and variance of the first-layer latent variable model, and maps the new hidden state of the second-layer memory network to the mean and variance of the second-layer latent variable model; the decoder maps the first-layer latent variables and the second-layer latent variables back to the observed data space, and calculates the load prediction distribution;
[0044] Step 3: Control the output of the power system in the industrial park based on the load forecast distribution.
[0045] Specifically, the principle of the two-layer memory network is based on the concept of recurrent neural networks, but it employs a two-layer structure to better capture the complex dependencies in time-series data. The core idea of this network is to pass and process data between two memory network layers, thereby gradually extracting and encoding features at different levels in the time-series data. In the first layer, at each time step, the current load data is taken as input and processed by an RNN unit (typically a Long Short-Term Memory network, LSTM, or a Gated Recurrent Unit, GRU) to compute candidate hidden states, update gates, reset gates, and a new hidden state. The main purpose of this layer is to capture the local dependencies and short-term features of the load data, such as hourly load fluctuations. The input to the second layer is the new hidden state of the first layer's memory network. It uses a similar method to compute candidate hidden states, update gates, reset gates, and a new hidden state. However, the goal of this layer is to capture higher-level time dependencies and long-term features, such as daily, weekly, or monthly load trends. Through this two-layer structure, the model can gradually extract and encode features at different time scales in the time-series data.
[0046] The combination of first- and second-layer memory networks enables the model to capture load characteristics on both short-term and long-term timescales. The first-layer network focuses on local fluctuations and rapid changes, while the second-layer network focuses on trends and cyclical changes over longer periods. This multi-layered structure allows the model to abstract and represent data at different levels, thus better capturing the inherent structure of the data. This improves the model's expressiveness, making it more suitable for complex load forecasting problems.
[0047] Example 2: Let the time series data collected in step 1 be X = {x1, x2, ..., x...} t ,…,x T}, where x t This represents the load data at time step t; T is the upper limit of the time step; before constructing the variational short-term memory network, the steps also include initializing the parameters of the variational short-term memory network, specifically including: initializing the weight matrix W. x W h W z W r Sum of deviation vectors b h ,b z ,b r Simultaneously, initialize the hidden state h of the first layer of the memory network. -1 It is a zero vector.
[0048] Example 3: The first layer of the memory network is represented by the following formula:
[0049]
[0050] in, This represents the hidden state of the first layer of the memory network at time step t. These are candidate hidden states for the first layer of the memory network; It serves as the update gate for the first layer of the memory network, controlling the degree of fusion between new and old information at time step t. The sigmoid function is used to compress the input data to a range between 0 and 1. It serves as the reset gate for the first layer of the memory network, determining whether the hidden state information from the previous time step is forgotten at time step t. This is achieved through a nonlinear transformation using the sigmoid function. The weight matrix of the first layer of the memory network is W, which is the same as the initial weight matrix W. x W h W z W e One-to-one correspondence is equal; The bias vector of the first layer of the memory network is compared with the initial bias vector b. h ,b z ,b r One-to-one correspondence equals; σ is the sigmoid function; tanh is the hyperbolic tangent function; This represents the hidden state of the first-layer memory network at time step t-1.
[0051] Specifically, This represents the candidate hidden states of the first-layer memory network at time step t. Its computation involves the input data x. t The hidden state of the previous time step ht-1 (1) , and the corresponding weight matrix and bias vector. Its function is to perform a nonlinear transformation on the input data to generate a new candidate hidden state, which contains information from the current time step and the hidden state from the previous time step. This helps the network capture transient features and patterns in the data. It is an update gate, whose computation depends on the input data x. t The hidden state of the previous time step And perform nonlinear transformation using the sigmoid function. Its function is to control the degree of fusion between new and old information at time step t. If If the value is close to 1, then most of the new information will be retained, while if it is close to 0, then old information will dominate. This allows the network to dynamically select which information to pass on to the next time step. It is a reset gate, and its calculation also depends on the input data x. t The hidden state of the previous time step And perform nonlinear transformation using the sigmoid function. Its function is to determine whether to forget the hidden state information from the previous time step at time step t. If If the value is close to 1, then most of the information from the previous moment will be retained; if it is close to 0, then the information from the previous moment will be ignored. This allows the network to control how it uses past information. It is the hidden state of the first layer of the memory network at time step t, which is based on The hidden state HT-1 from the previous time step (1) Calculated. Its function is to store important information at the current time step, and its calculation is based on candidate hidden states. The hidden state HT-1 from the previous time step (1) At the same time, it is subject to the update gate and reset door This allows the network to determine how to update its hidden state based on patterns in the data, adapting to the characteristics of different time steps.
[0052] Example 4: The second-layer memory network is represented by the following formula:
[0053]
[0054] in, This represents the hidden state of the second-layer memory network at time step t. These are candidate hidden states for the second-layer memory network; It serves as the update gate for the second-layer memory network, controlling the degree of fusion between new and old information at time step t, and is transformed nonlinearly using the sigmoid function; It serves as the reset gate for the second-layer memory network, determining whether the hidden state information from the previous time step is forgotten at time step t. This is achieved through a non-linear transformation using the sigmoid function. The weight matrix of the first layer of the memory network is W, which is the same as the initial weight matrix W. x W h W z W r One-to-one correspondence, equal;
[0055] The bias vector of the second-layer memory network is compared with the initial bias vector b. h ,b z ,b r One-to-one correspondence is equal; This represents the hidden state of the second-layer memory network at time step t-1.
[0056] Specifically, This represents the candidate hidden state of the second-layer memory network at time step t. It is obtained through the hidden states of the first-layer memory network. The hidden state ht-1 of the second-layer memory network in the previous time step (2) The corresponding weight matrix and bias vector are calculated. Its function and the first layer of memory network Similarly, it is used to perform nonlinear transformations on the input data to generate a new candidate hidden state, which contains information from the current time step and the hidden state information from the previous time step of the second layer network. It is the update gate of the second-layer memory network, and its computation depends on the hidden states of the first-layer memory network. The hidden state of the second layer of the memory network in the previous time step And the corresponding weight matrix and bias vector. It undergoes a nonlinear transformation using the sigmoid function. Its function and the first layer of memory network Similarly, it controls the degree to which new and old information are integrated at time step t. It helps the network decide how to update the hidden state of the second layer. It is the reset gate for the second-layer memory network, and its calculation is similar to that of the first-layer memory network. It depends on the hidden states of the first-layer memory network. The hidden state of the second layer of the memory network in the previous time step The corresponding weight matrix and bias vector are then subjected to a nonlinear transformation using the sigmoid function. Its function and the first layer of memory network Similarly, it determines whether to forget the information of the second hidden state of the previous time step at time step t. It is the hidden state of the second-layer memory network at time step t, which is based on The second hidden state ht-1 of the previous time step (2) Calculated. Its function is to store important information at the current time step, and its calculation is based on candidate hidden states. Update Gate Reset door The second hidden state ht-1 of the previous time step (2) This allows the network to determine how to update the hidden state of the second layer based on patterns in the data, further improving its ability to model time series data.
[0057] The first layer of the memory network first receives time-series data x. t As input, its hidden state is calculated. Then, the second layer of memory network... As input, the hidden state of the second layer is further calculated. In this way, information is transferred and transformed between the two memory layers, allowing the network to extract higher-level feature representations from the original data. Both memory layers use the update gate z. t and reset door r t These gates control the flow of information. They determine the degree to which new and old information are integrated and forgotten at each time step. This gating mechanism enables the network to selectively retain and forget information to adapt to the data characteristics at different time steps.
[0058] The first-layer memory network is responsible for extracting and representing short-term features from the raw time-series data, capturing transient changes and short-term dependencies. The second-layer memory network further builds upon the representations of the first layer, learning and representing longer-term dependencies and abstract features. The input to the second-layer memory network is the output of the first layer; this hierarchical structure allows the network to use the features extracted by the first layer as input and build higher-level feature representations on top of them. This hierarchical feature extraction helps the network better understand the hierarchical structure of time-series data. The presence of the second-layer memory network enhances the overall modeling ability of the network because it can learn higher-level, more abstract feature representations. This helps the network better understand complex patterns and structures in time series data. Through this two-layer structure, the network can more accurately capture information and trends in time-series data, thereby improving predictive performance in tasks such as industrial park load forecasting. The complementary effect of the first and second-layer memory networks helps improve model performance.
[0059] Example 5: The first-level latent variable model is as follows:
[0060]
[0061] in, The first level of latent variables represents the potential data representation at time step t; The mean of the first-level latent variables is used to describe... The central position; The variance of the first-level latent variables is used to describe The dispersion; This is the mean weight matrix of the first-level latent variable model; This represents the mean deviation of the first-level latent variable model; This is the variance weight matrix of the first-level latent variable model; Variance bias of the first-level latent variable model;
[0062] The variance of the first-level latent variables is calculated using the following formula:
[0063]
[0064] According to the mean and variance Generated using a sampling method based on a standard normal distribution.
[0065] Specifically, the model first calculates the first layer of latent variables. mean mean Describes the potential data representation The center position. The mean is calculated based on the hidden states of the second-layer memory network. and weight matrix Sum of deviation vectors Next, the model calculates the variance of the first layer of latent variables. Variance is used to describe The dispersion. Variance is calculated using a weight matrix. Sum of deviation vectors and the hidden states of the second-layer memory network Based on the calculated mean and variance The model uses a standard normal distribution sampling method to generate the first layer of latent variables. This means The distribution will have a mean of variance is The normal distribution property. The main function of the first-level latent variable model is to generate the latent data representation at time step t. This latent representation can contain important information about time series data, such as patterns, trends, and correlations. It helps transform raw data into a representation in the latent space, enabling better modeling and analysis. By calculating the mean and variance, the model can account for the uncertainty of the data. (Variance) This describes the dispersion of the latent data representations, which can represent the model's confidence in the generated latent representations. This allows the model to handle uncertain data more flexibly. Through the sampling process, the model can generate multiple different latent representations. Even if the mean and variance are the same, this increases the model's ability to generate diverse data, helping to explore different aspects of the data more comprehensively.
[0066] Example 6: The second-level latent variable model is as follows:
[0067]
[0068] in, The second layer of latent variables represents the latent data representation at time step t; The mean of the second-level latent variables is used to describe... The central position; The variance of the second-level latent variables is used to describe The dispersion; This is the mean weight matrix of the second-level latent variable model; The mean deviation of the second-level latent variable model; This is the variance weight matrix of the second-level latent variable model; Variance bias of the second-level latent variable model.
[0069] Specifically, the model first calculates the second-level latent variables. mean mean Describes the potential data representation The center position. The mean is calculated based on the first layer of latent variables. and weight matrix Sum of deviation vectors Next, the model calculates the variance of the second-level latent variables. Variance is used to describe The dispersion. Variance is calculated using the weight matrix W. σ (2) Sum of deviation vectors and the first level of latent variables Based on the calculated mean and variance The model uses a normal distribution sampling method to generate the second layer of latent variables. This means The distribution will have a mean of variance is The normal distribution characteristic of the second-level latent variable model. The main function of the second-level latent variable model is to generate the second-level latent data representation at time step t. This latent representation can contain higher-level, more abstract features and information because it is based on the first-level latent variables. Further generation. By integrating the first-level latent variables. Second-level latent variable models can capture more complex data dependencies and feature representations. This enables the model to better understand abstract patterns and structures in time series data. By calculating the mean and variance, the model can account for the uncertainty of the second-level latent variables, as well as the uncertainty introduced in the first level. This helps to model the uncertainty of the data more comprehensively, allowing the model to handle different types of time series data more flexibly. Through the calculation of the mean and variance and the sampling process, the second-level latent variable model generates a second-level latent representation based on the information of the first-level latent variables, further improving the model's expressiveness and data modeling capabilities. This multi-level latent variable representation helps to better capture the complexity and abstract features in time series data.
[0070] The input to the first-layer latent variable model is the hidden state of the second-layer memory network. The input to the second-level latent variable model is the first-level latent variable. The information transfer between these two levels is bidirectional. The first-level latent variable model receives abstract feature representations from the second-level memory network, while the second-level latent variable model incorporates the latent variables generated by the first level into its generation process. The first-level latent variable model is responsible for generating lower-level feature representations, which may include short-term features of the original data. The second-level latent variable model is responsible for generating higher-level, more abstract feature representations based on the first level. This multi-level feature extraction helps to better capture information at different levels and scales in time series data.
[0071] The first-level latent variable model generates the first-level latent variables at time step t. This representation contains low-level information about the data. The second-level latent variable model further generates the second-level latent variables at time step t. This representation contains higher-level information and features. This hierarchical representation allows the network to better understand the multi-layered structure of time series data. In a two-layer memory network, the first and second layer memory networks model time series data at different levels of abstraction. The first layer memory network is responsible for capturing short-term and local dependencies, while the second layer memory network is responsible for capturing long-term and global dependencies. Similarly, the first and second layer latent variable models generate feature representations at their respective levels.
[0072] The collaboration between the first-layer and second-layer latent variable models enables the network to generate multi-level feature representations, thereby better capturing patterns and dependencies at different levels in time series data. This multi-level representation enhances the network's expressive power. The collaboration between the memory network and the latent variable model in the two-layer memory network constructs a hierarchical modeling framework. This allows the network to extract information at different levels of abstraction from the raw data, helping to more accurately capture the complexity of the data. The mutual cooperation between the first-layer memory network, the second-layer memory network, and the latent variable model forms a comprehensive modeling mechanism. This comprehensive modeling capability enables the network to more comprehensively understand time series data, resulting in better performance in tasks such as industrial park load forecasting and power system control. The first-layer and second-layer latent variable models, in cooperation with the first-layer and second-layer memory networks, form a multi-level, multi-layered modeling and feature extraction framework. This hierarchical structure allows the network to better handle multi-scale information in time series data, improving the network's modeling and expressive capabilities. Through this cooperation, the two-layer memory network can more comprehensively understand and analyze complex time series data.
[0073] Example 7: The encoder is represented by the following formula:
[0074]
[0075] in, Represents a given hidden state Under the condition, the first level of latent variables The posterior distribution of; Indicates that given the hidden state h t and first-level latent variables Under the condition, the second level of latent variables The posterior distribution.
[0076] Specifically, Represents the hidden states of a given second-layer memory network. Under the given conditions, calculate the first-level latent variables. The posterior distribution is based on the joint distribution of the observed data and the second-level hidden states, and is modeled using a normal distribution. Represents the hidden states of a given second-layer memory network. and first-level latent variables Under the given conditions, calculate the second-level latent variables. The encoder calculates the posterior distribution of the latent variables. This posterior distribution is also based on the joint distribution of the observed data, the second-layer hidden states, and the first-layer latent variables, and is modeled using a normal distribution. The encoder's main role is to estimate the posterior distribution of the latent variables. In the Bayesian framework, the posterior distribution provides information about the uncertainty and possible values of the latent variables. By calculating the posterior distribution, the possible range of values for the latent variables given the observed data and conditions can be obtained. The encoder models the posterior distribution of the latent variables based on the conditional inputs (the hidden states of the second-layer memory network and the first-layer latent variables). This allows the model to learn different latent representations given different conditions. For example, for the same input data, the posterior distribution of the latent variables can differ depending on the conditions, thus better adapting to different data patterns. The posterior distribution not only provides estimates of the latent variables but also information about their uncertainty, namely the mean and variance. This helps the model to more comprehensively understand and handle data uncertainty, especially when observational data is lacking. The encoder's role in a two-layer latent variable model is to calculate the posterior distribution of the latent variables, as well as the posterior distribution considering the conditional inputs. This helps the model better understand and model time series data, and provides important information about the estimation and uncertainty of latent variables. This modeling approach allows the two-level latent variable model to be more flexible in adapting to different data situations and tasks.
[0077] Example 8: The decoder is represented using the following formula:
[0078]
[0079] in, Indicates that given latent variables and Load forecast distribution under the given conditions; It is a mapping function from latent variables to observed data; W is the variance matrix of the time series data, a diagonal matrix, indicating that the variance of the time series data is the same in each dimension; f The weight matrix of the mapping function is used for linear combination of latent variables. and To calculate load forecasts; b f This is the deviation vector of the mapping function, used to adjust the value of the estimated value; This represents the operation of connecting two levels of potential variables.
[0080] Specifically, Indicates that given latent variables and Under the condition of, calculate the load data x t The predicted distribution. This predicted distribution is a normal distribution, and its mean is given by the mapping function. Given that the variance is a diagonal matrix This indicates that the variance of the time series data is the same across all dimensions. Mapping function Used to identify latent variables and Mapped to the mean of the observed data. This mapping is typically a linear transformation, denoted by the weight matrix W. f Sum of deviation vectors b f Control. This mapping function is responsible for transforming the representation of latent variables into predictions of observed data. The decoder's main role is to generate the predicted distribution of load data given the latent variables. This allows the model to generate estimates of load data for each time step and provides information about the uncertainty of the predicted values. This is crucial for load forecasting tasks in industrial parks. Mapping function This allows mapping the representation of latent variables to the mean of observed data. This mapping is achieved through the weight matrix W. f Sum of deviation vectors b f This allows us to capture the complex relationships between latent variables and observed data. (Variance matrix) Represents the variance of the observed data, where This is a constant representing that the variance of the observed data is the same across all dimensions. This variance information plays a crucial role in generating the forecast distribution, controlling for forecast uncertainty. The decoder's task is to generate the forecast distribution of load data by mapping the latent variables to the mean of the observed data through a mapping function, taking into account the variance information of the observed data. This allows the model to generate load forecasts for each time step and provides information about the uncertainty of the forecast, which is helpful for load forecasting in industrial parks and power system control.
[0081] Example 9: In step 3, a PID controller or MPC controller is used to control the output of the power system in the industrial park based on the load forecast distribution.
[0082] A PID controller is a classic feedback controller used to maintain the system output (in this case, the output of an electrical system) near a target value. It adjusts the control signal based on the difference between the current system output and the target value to reduce error and maintain system stability. A PID controller consists of three main parts: a proportional part, which generates a control output based on the current error and aims to reduce the difference between the control output and the target value; an integral part, which accumulates the error over time and generates a control output to reduce the system's static error; and a derivative part, which predicts the future rate of change of the error and generates a control output to reduce overshoot and oscillations. The output of a PID controller is a linear combination of these three parts, and the weights of each part can be adjusted according to the system's response characteristics. By continuously adjusting the control output, the PID controller can make the system reach the target state quickly and stably. An MPC controller is a predictive controller that optimizes the control signal over a future time period to optimize the system's performance. It considers not only the current system state but also possible future state changes, thus providing greater flexibility in handling the system's nonlinear and time-varying characteristics. An MPC controller predicts the future behavior of a system based on a system model. In each control step, it calculates a set of control signals to minimize a performance metric (such as a cost function). This performance metric can include the difference between the system output and the target value, the rate of change of the control signals, etc. At the core of the MPC controller is an optimization problem, the objective of which is to select the optimal control signal at each time step to minimize the performance metric. This problem typically involves a discretized model of the system dynamics and consideration of constraints.
[0083] Both PID and MPC controllers primarily adjust the power system output of an industrial park based on load forecasting to meet target performance and constraints. A PID controller is a classic feedback controller that adjusts the control output based on the current error. An MPC controller, on the other hand, is a predictive controller that optimizes the control signal over a future period to achieve optimal performance. The choice of controller depends on the system's complexity, nonlinear characteristics, and performance requirements.
[0084] This invention utilizes deep learning technology and latent variable modeling to learn and capture complex time dependencies and underlying structures from historical load data. A two-layer memory network captures features at different time scales, and the latent variable model provides a more flexible data representation. Encoders and decoders work together to associate latent variables with hidden states and generate a load forecast distribution. This load forecast distribution provides information on load forecasts and uncertainties at each time step, enabling power system operators to better understand future load trends and potential risks. The choice of controller (PID or MPC) allows for adjustments to the power system output based on the load forecast distribution. The PID controller adjusts the control signal through feedback to achieve steady-state control near the target. The MPC controller optimizes the sequence of control signals to achieve a more flexible system response and performance optimization. This invention can be used for power system management in industrial parks, including load forecasting, power output control, and power system performance optimization, thereby improving the stability and efficiency of the power system.
[0085] The present invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for industrial park load forecasting and control, characterized in that, The method comprises: Step 1: deploying sensors inside the industrial park, regularly collecting load data to obtain time series data; Step 2: constructing a variational short-term memory network for load prediction; the variational short-term memory network comprises a double-layer memory network part and a variational estimation part; the double-layer memory part comprises two layers of memory networks, namely a first layer of memory network and a second layer of memory network; each load data in the time series data is input into the first layer of memory network as input, the candidate hidden state, the update gate and the reset gate of the first layer of memory network are calculated, and the new hidden state is updated; the new hidden state of the first layer of memory network is used as input to calculate the candidate hidden state, the update gate and the reset gate of the second layer of memory network, and the new hidden state; the variational estimation part comprises a double-layer latent variable model, an encoder and a decoder; the double-layer latent variable model comprises a first layer of latent variable model and a second layer of latent variable model; the mean and variance of the first layer of latent variable model and the mean and variance of the second layer of latent variable model are initialized; the mean and variance parameters of the first layer of latent variable model are used to sample the first layer of latent variable from the standard normal distribution; the mean and variance parameters of the second layer of latent variable model are used to sample the second layer of latent variable from the standard normal distribution; the encoder uses the new hidden state of the second layer of memory network calculated at each time step as input to map the new hidden state of the second layer of memory network to the mean and variance of the first layer of latent variable model, and to map the new hidden state of the second layer of memory network to the mean and variance of the second layer of latent variable model; the decoder maps the latent variables of the first layer of latent variable and the second layer of latent variable back to the observation data space to calculate the load prediction distribution; Step 3: controlling the output of the power system of the industrial park according to the load prediction distribution.
2. The industrial park load forecasting and control method of claim 1, wherein, Let the time series data collected in step 1 be X = {x1, x2, …, xT}, where xt represents the load data at time step t; T is the upper limit of the time step. t ,…,x T} and T is the upper limit of the time step. t Before constructing the variational short-term memory network, the method further includes a step of initializing parameters of the variational short-term memory network, specifically including: initializing a weight matrix W x ,W h ,W z ,W r and a bias vector b h ,b z ,b r ; at the same time, initializing a hidden state h -1 of the first layer memory network as a zero vector.
3. The industrial park load forecasting and control method of claim 2, wherein, The first layer of memory network is represented by the following formula: wherein, is a hidden state of the first layer memory network at time step t; is a candidate hidden state of the first layer memory network; is an update gate of the first layer memory network, controlling the degree of fusion of new information and old information at time step t, compressing the input data to the range between 0 and 1 by the sigmoid function; r t (1) is a reset gate of the first layer memory network, deciding whether to forget the information of the hidden state of the previous time step at time step t, performing a nonlinear transformation by the sigmoid function; W x (1) ,W h (1) ,W z (1) ,W r (1) is the weight matrix of the first layer memory network, and the initialized weight matrix W x ,W h ,W z ,W r are one-to-one equal; is the bias vector of the first layer memory network, and the initialized bias vector b h ,b z ,b r are one-to-one equal; σ is a sigmoid function; tanh is a hyperbolic tangent function; is the hidden state of the first layer memory network at time step t-1.
4. The industrial park load forecasting and control method of claim 2, wherein, The second layer of memory network is represented by the following formula: wherein, is the hidden state of the second layer memory network at time step t; is the candidate hidden state of the second layer memory network; is the update gate of the second layer memory network, controlling the degree of fusion of new information and old information at time step t, and is nonlinearly transformed by a sigmoid function; r t (2) is the reset gate of the second layer memory network, determining whether to forget the information of the hidden state of the previous time step at time step t, and is nonlinearly transformed by a sigmoid function; W z (2) ,W r (2) is the weight matrix of the first layer memory network, which is equal to the initialized weight matrix W x ,W h ,W z ,W r correspond one by one. bias vector for the second layer of memory network, with initialized quantity bias vector b h ,b z ,b r one-to-one correspondence equality; is the hidden state of the second layer of memory network at time step t-1.
5. The industrial park load forecasting and control method of claim 4, wherein, The first layer of latent variable model is: wherein, a first layer of latent variables representing a latent data representation at time step t; is a mean of the first layer of latent variables for describing a central position of the ; is a variance of the first layer of latent variables for describing a dispersion of the ; is a mean weight matrix of the first layer of latent variables model; is a mean bias of the first layer of latent variables model; is a variance weight matrix of the first layer of latent variables model; a variance bias of the first layer of latent variables model; The variance of the first layer of latent variable is calculated by the following formula: According to the mean and variance generated using a sampling method of the standard normal distribution 6. The industrial park load forecasting and control method of claim 5, wherein, The second layer of latent variable model is: wherein, a second layer of latent variables representing a latent data representation at time step t; is a mean of the second layer of latent variables for describing a central position of the ; is a variance of the second layer of latent variables for describing a dispersion of the ; is a mean weight matrix of the second layer of latent variable model; is a mean bias of the second layer of latent variable model; is a variance weight matrix of the second layer of latent variable model; is a variance bias of the second layer of latent variable model.
7. The industrial park load forecasting and control method of claim 6, wherein, The encoder is represented by the following formula: wherein, denotes the posterior distribution of the first layer latent variables given the hidden state h denotes the posterior distribution of the second layer latent variables t z given the hidden state h and the first layer latent variables z 8. The industrial park load forecasting and control method of claim 7, wherein, The decoder is represented by the following formula: wherein, denotes the load prediction distribution under the condition of a given latent variable and ; is a mapping function of the latent variable to the observation data; is a variance matrix of the time series data, and is a diagonal matrix indicating that the variance of the time series data is the same in each dimension; W f is a weight matrix of the mapping function, used to linearly combine the latent variables and to calculate the load prediction; b f is a bias vector of the mapping function, used to adjust the value of the estimated value; denotes an operation of connecting two layers of latent variables.
9. The industrial park load forecasting and control method of claim 8, wherein, In step 3, a PID controller or an MPC controller is used to control the output of the power system of the industrial park according to the load prediction distribution.