A source network load storage scheduling method and system for an electrical load based on improved PSO
By improving the PSO algorithm and combining it with LSTM and XGBoost for multi-source data fusion and prediction, a dual-objective optimization function is designed to achieve load-level driven dynamic scheduling. This solves the problems of low energy utilization and poor scheduling adaptability in existing technologies, and realizes efficient and economical park-level energy management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BITA (SHANGHAI) DATA TECH CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-02
AI Technical Summary
Existing distributed energy management systems suffer from problems such as low energy utilization, severe curtailment of solar power, frequent shutdowns of energy storage systems, inability to adapt to changes in occupancy rates during the growth phase of a park, and poor global grid characteristics in park-level scheduling. Furthermore, traditional scheduling algorithms are prone to getting trapped in local optima and are difficult to meet real-time scheduling requirements.
An improved particle swarm optimization (PSO) algorithm is adopted, combined with long short-term memory neural network (LSTM) and extreme gradient boosting machine (XGBoost) for multi-source data fusion and prediction. A dual-objective optimization function is designed, and the charging and discharging strategy is optimized through dynamic inertia weight and adaptive learning factor. A load level-driven dynamic scheduling method is adopted to achieve real-time scheduling and feedback learning.
It has increased the self-consumption rate of photovoltaic power to over 82%, optimized operating costs to over 50%, adapted to the fluctuations in occupancy rates during the growth phase of the park, improved energy utilization efficiency and economy, met the real-time dispatch requirements at the park level, and adapted to the characteristics of the global power grid.
Smart Images

Figure CN122134028A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed energy management technology, specifically a source-grid-load-storage scheduling method and system for electricity loads based on an improved PSO. Background Technology
[0002] With the continuous development of distributed energy management technology, the application of integrated photovoltaic, energy storage, and charging pile (photovoltaic-storage-charging) systems in scenarios such as office parks, industrial parks, and science and technology innovation parks is becoming increasingly common. As a core link in achieving efficient energy allocation, the coordinated scheduling of energy sources, grids, loads, and energy storage is becoming increasingly important.
[0003] Current scheduling technologies still have many shortcomings in practical applications that need to be addressed. Traditional scheduling systems mostly use fixed rules for energy allocation, such as daily timed charging and discharging, and fixed threshold grid connection for photovoltaic power. These methods cannot flexibly respond to real-time market price signals, random fluctuations in photovoltaic output, and dynamic changes in user load, resulting in low energy utilization, severe curtailment of solar power, and frequent outages of energy storage systems. Furthermore, existing technologies often focus on single-objective optimization, aiming only to minimize operating costs or maximize photovoltaic self-consumption, making it difficult to simultaneously consider both economic efficiency and energy efficiency. Even when some solutions use weighted summation to transform multi-objective optimization into single-objective optimization, the weighting of these weights is still problematic. Lacking scientific basis, the standard Particle Swarm Optimization (PSO) algorithm is prone to getting trapped in local optima during scheduling optimization, failing to find the globally optimal charging and discharging strategy. Furthermore, its convergence speed is slow, making it difficult to meet the real-time scheduling requirements of park-level systems at the second or minute level. Its fixed algorithm parameters also cannot cope with changes in external environments such as park occupancy rates and weather. In addition, existing scheduling schemes are mostly designed based on fixed load models, lacking the ability to adapt to changes in occupancy rates during the park's growth phase. Moreover, they mostly adopt time-driven scheduling methods, relying on specific regional time periods, which cannot adapt to different global power grid characteristics, thus limiting their universality and adaptability. Therefore, it is necessary to improve it. Summary of the Invention
[0004] The purpose of this invention is to provide a source-grid-load-storage scheduling method and system for electrical loads based on an improved PSO, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a source-grid-load-storage scheduling method for electrical loads based on an improved PSO, the specific steps of which are as follows: Step 1: Data Acquisition and Fusion Processing First, real-time data from multiple energy sources in the park, including photovoltaic, energy storage, charging piles, and office load, is collected. The sampling period and key indicators for each data source are defined: 10-second sampling period for aggregated data from photovoltaic inverters, energy storage PCS, and charging piles; 1-minute sampling period for office load data; 30-minute sampling period for meteorological data; and 1-hour sampling period for market price information. A fused data vector is then constructed using the following formula: In the formula: For photovoltaic power, For energy storage power, For charging power, For load power, In a charged state, Irradiance, For temperature, Price level, unit is kW or equivalent; Linear interpolation is used when the interval is less than five minutes, and forward padding is used to handle missing values when the interval is less than thirty minutes. Anomalies exceeding 3σ are identified by the Isolation Forest algorithm. All data are unified to second-level timestamps to ensure time alignment accuracy <1 second. Step 2: Two-level prediction and adaptive correction A Long Short-Term Memory (LSTM) neural network is used, taking historical photovoltaic (PV) data and meteorological data from the past 72 hours as input, and outputting hourly PV output forecasts for the next 72 hours. An XGBoost model is used to combine five key features—time features, historical features, weather features, park features, and event features—to predict the load data for the next 24 hours, with weights of 25%, 35%, 15%, 15%, and 10%, respectively. An adaptive correction model based on park occupancy rate is established to dynamically adjust the load forecast values, yielding the final load forecast result. The adaptive correction formula for the load forecast is: In the formula: This is the corrected load forecast (kW). This represents the original predicted value (kW) from the XGBoost model. This represents the current occupancy rate of the park. As a benchmark occupancy rate, For time slot correction coefficients, the range is... ; A weighted fusion method is used to mix and fuse photovoltaic and load forecast results to improve forecast accuracy; Step 3: Improve PSO multi-objective optimization calculation The design employs a dual-objective optimization function. Objective 1 is to minimize operating costs, achieved by calculating the sum of the differences between grid purchase costs and grid-connected revenue for each time slot. Objective 2 is to maximize photovoltaic self-consumption rate, which is transformed into a minimization problem. A dynamic inertia weighting strategy is adopted, with an upper bound set for the inertia weights. Lower Boundary The convergence speed is improved by dynamically adjusting the exponential function with the number of iterations; an adaptive learning factor is designed, with the maximum value of the individual learning factor c1 and the minimum value of the social learning factor c2 both being 2.5 and 0.5 respectively, which are linearly adjusted with the number of iterations to improve the final fitness; the optimal charging and discharging power sequence is obtained by combining the dual objective functions through a weighted method, with the weight coefficients λ1 and λ2 satisfying λ1+λ2=1. Step 4: Load Level-Driven Dynamic Scheduling The load level is automatically identified by the ratio of the current total load to the historical 30-day average load, and is divided into four categories: peak load (>120% of average), high load (100%-120% of average), medium load (80%-100% of average), and low load (<80% of average). Differentiated scheduling strategies are formulated for different load levels: During peak load, the goal is to maximize peak shaving, with energy storage prioritizing full-power discharge and minimizing power purchases during high-price periods; during high load, the priority is to meet charging needs, with surplus photovoltaic power prioritized for charging, and energy storage providing auxiliary compensation when necessary; during medium load, decisions are made based on the SOC status, with charging preparation initiated when SOC is <50% and charging stopped or put into standby when SOC is ≥50%, to reserve power for low load periods; during low load, the goal is to achieve large-scale charging at the lowest cost, with energy storage charging at rated maximum power to SOC ≥95%, while meeting the constraints of battery temperature of 20-35℃ and continuous charging time ≤12h. Step 5: Real-time Execution and Feedback Learning The improved PSO algorithm runs every 5 minutes with a calculation time of less than 30 seconds, generating power instructions for the next 60 minutes, which are then finely adjusted and executed by the lower-level controller every second. It is equipped with multiple abnormal protection mechanisms for sudden photovoltaic power drop, abnormal energy storage SOC, and charging pile failure. The model is updated weekly based on the deviation between actual execution data and predicted values to achieve adaptive optimization. By replacing the traditional time-driven approach with load level-driven approach, it automatically adapts to the characteristics of different regional power grids, seasonal changes, and fluctuations in park occupancy rates without manual intervention.
[0006] Preferably, the formula for calculating the dynamic inertia weight in step three is: In the formula: For the first The inertial weight of the next iteration is dimensionless. This is the upper bound of the initial inertial weight; This serves as the lower bound for the later-stage inertia weight. This represents the number of iterations. The total number of time slots; the exponent coefficient is 2; The formula for calculating the adaptive learning factor is: In the formula: For individual learning factors, , ; As a social learning factor, , ; This represents the current iteration number; Maximum number of iterations, range .
[0007] Preferably, the photovoltaic output prediction accuracy index in step two is MAPE < 5% within 6 hours, MAPE < 8% within 12 hours, MAPE < 10% within 24 hours, and MAPE < 12% within 72 hours.
[0008] Preferably, in step three, the weighting coefficients λ1 and λ2 are balanced and set to λ1=λ2=0.5, λ1=0.7, and λ2=0.3 for cost priority.
[0009] Preferably, the peak load phase described in step four aims to maximize peak reduction, and the power purchased by the power grid is determined by energy balance. In the formula: Power purchased (kW) The total load of the park (kW). Photovoltaic power (kW). Indicates the energy storage discharge power; And set a control reference that prioritizes full-power discharge during peak periods: In the formula: For energy storage decision variables, To store the maximum discharge power, SOC (%) The lower limit for SOC safety is set at 20%. The execution priority is from high to low: photovoltaic self-consumption is given priority, and local photovoltaic output is given priority to meet office load; energy storage discharge is fully utilized, and the stored energy is fully released during high-price periods, with a rated full power of 390kW; grid power purchase is minimized, and electricity is only purchased from the grid when the first two cannot be met. During periods of high load, priority is given to meeting charging needs, with surplus photovoltaic power prioritized for charging. Energy storage provides supplementary compensation when necessary. The aggregated power of the charging piles can be expressed as: In the formula: Aggregate charging power (kW) for charging piles. The maximum power of the charging pile (kW) is 600kW in this embodiment; This is the allocation coefficient for energy storage discharge to compensate the charging side. It is 0 when energy storage is only used for peak shaving and does not compensate for charging, and can be 1 when compensation is allowed. This represents the energy storage discharge power; if it is necessary to maintain the consistency of "grid supplementary supply" under high load conditions, the power purchase power expression can be given: Execution priority from high to low: Solar power first meets office load; surplus power is prioritized for charging; energy storage assists in charging; grid supplements supply. During the medium load phase, the system makes decisions based on the SOC status. When the SOC is less than 50%, it prepares for charging; when the SOC is greater than or equal to 50%, it stops charging or goes into standby mode to reserve energy for low load periods. when At this time, it enters the charging preparation stage. ): when When charging stops or the device remains in standby mode: In the formula: The SOC decision threshold is set to 50%. The expected charging power reference value (kW) can be given by combining the next day's photovoltaic forecast, load forecast, and price signals; the negative sign indicates the corresponding charging power. ; During the low-load phase, the goal is to charge on a large scale at the lowest cost. The energy storage is charged to SOC≥95% at the rated maximum power, while meeting the constraints of battery temperature 20-35℃ and continuous charging time ≤12h. In the formula: The maximum charging power is set to 390kW; The maximum charging capacity is set to 95%. And add health protection constraints: In the formula: Battery temperature (°C). , ; The cumulative duration of continuous charging (h). ; Execution strategy: Charge at rated maximum power; automatically stop when SOC reaches 95%; electric vehicle charging is supported, and the power of charging piles is not limited.
[0010] Preferably, the formula for objective one of the dual objective functions in step three is: In the formula: For the first Power purchased from the grid during time slots For the unit cost of electricity purchase, To supply power to the grid, For the benefit of the unit accessing the Internet; The formula for objective two is: In the formula: For photovoltaic output power, For local power consumption, the negative sign indicates that the maximization problem is transformed into a minimization problem; The overall objective function is: In the formula: The decision variable is the charge / discharge power sequence. For the first The objective function value, For the first An ideal reference point for a goal These are the weighting coefficients.
[0011] To achieve the aforementioned other objective, the present invention provides the following technical solution: a source-grid-load-storage scheduling system for power loads based on improved PSO, the system being used to implement the aforementioned source-grid-load-storage scheduling method for power loads based on improved PSO, comprising the following modules: Data fusion and preprocessing module: used to collect multi-source data from photovoltaics, energy storage, charging piles, office load, meteorology, and market prices, perform missing value processing, outlier detection and time synchronization, and output standardized fused data vectors; Multidimensional prediction and correction module: Integrates LSTM photovoltaic prediction unit, XGBoost load prediction unit, hybrid fusion unit and adaptive calibration unit to achieve 72-hour photovoltaic output and 24-hour load prediction, and improves prediction accuracy through dynamic correction of occupancy rate; Improved PSO optimization decision module: Includes a dual objective function definition unit, an improved PSO algorithm unit, a dynamic weight and adaptive learning factor unit, and a constraint processing unit, which solves for the optimal charge and discharge power sequence and outputs the optimization decision results; Load level dynamic dispatching module: Automatically identifies four load levels: peak, high, medium and low. Based on the market signal characteristics and dispatching priorities of different levels, it executes differentiated dispatching strategies to achieve global grid characteristic adaptation. Real-time execution and feedback learning module: Generates and issues real-time power commands for execution, equipped with multiple anomaly protection mechanisms, updates scheduling commands every 5 minutes, and performs weekly model iteration optimization to achieve closed-loop control.
[0012] Preferably, the feature engineering of the multidimensional prediction and correction module includes five types of features: time, history, weather, park, and event, with weight ratios of 25%, 35%, 15%, 15%, and 10%, respectively.
[0013] Preferably, the response time of the real-time execution and feedback learning module is <100ms, and the energy storage charging and discharging control accuracy is ±2%.
[0014] The beneficial effects of this invention are as follows: By improving the PSO algorithm with dynamic inertia weights and adaptive learning factors, the convergence time is optimized to 1.5-1.8 minutes, which is 4-6 times faster than the standard PSO, and the convergence accuracy reaches 99.2%, effectively avoiding the local optimum problem. At the same time, by scientifically setting the weight coefficients of the dual objective function, the system achieves the dual effects of photovoltaic self-consumption rate ≥82% and operating cost optimization ≥50%, significantly improving the energy utilization efficiency and economy of the park. With the help of the park occupancy rate adaptive correction model, it can adapt to occupancy rate fluctuations of 50%-120%, so that the scheduling strategy automatically evolves with the growth stage of the park, solving the problem of poor adaptability of traditional fixed load models. The load level driven scheduling method can automatically adapt to load fluctuations, significantly improving the scheduling versatility. Through multi-source data fusion processing and dual-level high-precision prediction, reliable data support is provided for optimization decisions. Combined with real-time execution and feedback learning mechanisms, the system response time is <100ms, the energy storage charging and discharging control accuracy is ±2%, and the operation and maintenance stability is excellent. It is suitable for various scenarios such as office parks, industrial parks, and science and technology parks. Attached Figure Description
[0015] Figure 1 This is a system block diagram of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] like Figure 1 As shown in the figure, this embodiment of the invention provides a source-grid-load-storage scheduling method for electrical loads based on an improved PSO (Power Optimization and Storage) method. The specific steps are as follows: Step 1: Data Acquisition and Fusion Processing First, real-time data from multiple energy sources in the park, including photovoltaic, energy storage, charging piles, and office load, is collected. The sampling period and key indicators for each data source are defined: 10-second sampling period for aggregated data from photovoltaic inverters, energy storage PCS, and charging piles; 1-minute sampling period for office load data; 30-minute sampling period for meteorological data; and 1-hour sampling period for market price information. A fused data vector is then constructed using the following formula: In the formula: For photovoltaic power, For energy storage power, For charging power, For load power, In a charged state, Irradiance, For temperature, Price level, unit is kW or equivalent; Linear interpolation is used when the interval is less than five minutes, and forward padding is used to handle missing values when the interval is less than thirty minutes. Anomalies exceeding 3σ are identified by the Isolation Forest algorithm. All data are unified to second-level timestamps to ensure time alignment accuracy <1 second. Step 2: Two-level prediction and adaptive correction A Long Short-Term Memory (LSTM) neural network is used, taking historical photovoltaic (PV) data and meteorological data from the past 72 hours as input, and outputting hourly PV output forecasts for the next 72 hours. An XGBoost model is used to combine five key features—time features, historical features, weather features, park features, and event features—to predict the load data for the next 24 hours, with weights of 25%, 35%, 15%, 15%, and 10%, respectively. An adaptive correction model based on park occupancy rate is established to dynamically adjust the load forecast values, yielding the final load forecast result. The adaptive correction formula for the load forecast is: In the formula: This is the corrected load forecast (kW). This represents the original predicted value (kW) from the XGBoost model. This represents the current occupancy rate of the park. As a benchmark occupancy rate, For time slot correction coefficients, the range is... ; A weighted fusion method is used to mix and fuse photovoltaic and load forecast results to improve forecast accuracy; Step 3: Improve PSO multi-objective optimization calculation The design employs a dual-objective optimization function. Objective 1 is to minimize operating costs, achieved by calculating the sum of the differences between grid purchase costs and grid-connected revenue for each time slot. Objective 2 is to maximize photovoltaic self-consumption rate, which is transformed into a minimization problem. A dynamic inertia weighting strategy is adopted, with an upper bound set for the inertia weights. Lower Boundary The convergence speed is improved by dynamically adjusting the exponential function with the number of iterations; an adaptive learning factor is designed, with the maximum value of the individual learning factor c1 and the minimum value of the social learning factor c2 both being 2.5 and 0.5 respectively, which are linearly adjusted with the number of iterations to improve the final fitness; the optimal charging and discharging power sequence is obtained by combining the dual objective functions through a weighted method, with the weight coefficients λ1 and λ2 satisfying λ1+λ2=1. Step 4: Load Level-Driven Dynamic Scheduling The load level is automatically identified by the ratio of the current total load to the historical 30-day average load, and is divided into four categories: peak load (>120% of average), high load (100%-120% of average), medium load (80%-100% of average), and low load (<80% of average). Differentiated scheduling strategies are formulated for different load levels: During peak load, the goal is to maximize peak shaving, with energy storage prioritizing full-power discharge and minimizing power purchases during high-price periods; during high load, the priority is to meet charging needs, with surplus photovoltaic power prioritized for charging, and energy storage providing auxiliary compensation when necessary; during medium load, decisions are made based on the SOC status, with charging preparation initiated when SOC is <50% and charging stopped or put into standby when SOC is ≥50%, to reserve power for low load periods; during low load, the goal is to achieve large-scale charging at the lowest cost, with energy storage charging at rated maximum power to SOC ≥95%, while meeting the constraints of battery temperature of 20-35℃ and continuous charging time ≤12h. Step 5: Real-time Execution and Feedback Learning The improved PSO algorithm runs every 5 minutes with a calculation time of less than 30 seconds, generating power instructions for the next 60 minutes, which are then finely adjusted and executed by the lower-level controller every second. It is equipped with multiple abnormal protection mechanisms for sudden photovoltaic power drop, abnormal energy storage SOC, and charging pile failure. The model is updated weekly based on the deviation between actual execution data and predicted values to achieve adaptive optimization. By replacing the traditional time-driven approach with load level-driven approach, it automatically adapts to the characteristics of different regional power grids, seasonal changes, and fluctuations in park occupancy rates without manual intervention.
[0018] By integrating multi-source data to ensure data reliability, combining dual-level forecasting with adaptive correction based on occupancy rate to improve forecast accuracy, improving the PSO algorithm to achieve rapid multi-objective optimization, adapting the load level-driven strategy to global grid characteristics, and forming a closed loop through real-time feedback learning, the system effectively solves the problems of rigidity in traditional scheduling strategies and difficulty in multi-objective optimization. This enables the park's energy management to be upgraded from passive response to proactive optimization, significantly improving the self-consumption rate of photovoltaic power and the economic efficiency of operation, while adapting to the growth stage of the park and the characteristics of different regional grids.
[0019] The formula for calculating the dynamic inertia weight in step three is as follows: In the formula: For the first The inertial weight of the next iteration is dimensionless. This is the upper bound of the initial inertial weight; This serves as the lower bound for the later-stage inertia weight. This represents the number of iterations. The total number of time slots; the exponent coefficient is 2; The formula for calculating the adaptive learning factor is: In the formula: For individual learning factors, , ; As a social learning factor, , ; This represents the current iteration number; Maximum number of iterations, range .
[0020] Compared to the standard PSO algorithm, it can dynamically balance global search and local search capabilities, which accelerates the convergence speed by 35-45% and improves the final fitness by 20-30%, effectively avoiding getting trapped in local optima and ensuring that a global approximate optimal solution is found within 1.5-1.8 minutes, meeting the time requirements for real-time scheduling of park-level systems.
[0021] Among them, the accuracy indicators for photovoltaic output prediction in step two are MAPE < 5% within 6 hours, MAPE < 8% within 12 hours, MAPE < 10% within 24 hours, and MAPE < 12% within 72 hours.
[0022] Clearly defined MAPE accuracy indicators for photovoltaic power output across multiple time periods provide reliable data support for subsequent multi-objective optimization calculations and dynamic scheduling strategy formulation, reducing the impact of prediction errors on scheduling decisions and ensuring the rationality of energy allocation and the stability of optimization effects.
[0023] In step three, the weight coefficients λ1 and λ2 are balanced and set to λ1=λ2=0.5, λ1=0.7, and λ2=0.3 for cost priority.
[0024] Setting λ1=λ2=0.5 in a balanced manner can equally take into account the minimization of operating costs and the maximization of photovoltaic self-consumption rate. Setting λ1=0.7 and λ2=0.3 in a cost-priority manner can accurately match the operational needs of the park that focus on cost control, avoiding the blindness of setting multiple objectives without scientific basis in the existing technology.
[0025] In step four, the peak load phase aims to maximize peak reduction, and the power purchased by the grid is determined by the energy balance. In the formula: Power purchased (kW) The total load of the park (kW). Photovoltaic power (kW). Indicates the energy storage discharge power; And set a control reference that prioritizes full-power discharge during peak periods: In the formula: For energy storage decision variables, To store the maximum discharge power, SOC (%) The lower limit for SOC safety is set at 20%. The execution priority is from high to low: photovoltaic self-consumption is given priority, and local photovoltaic output is given priority to meet office load; energy storage discharge is fully utilized, and the stored energy is fully released during high-price periods, with a rated full power of 390kW; grid power purchase is minimized, and electricity is only purchased from the grid when the first two cannot be met. During periods of high load, priority is given to meeting charging needs, with surplus photovoltaic power prioritized for charging. Energy storage provides supplementary compensation when necessary. The aggregated power of the charging piles can be expressed as: In the formula: Aggregate charging power (kW) for charging piles. The maximum power of the charging pile (kW) is 600kW in this embodiment; This is the allocation coefficient for energy storage discharge to compensate the charging side. It is 0 when energy storage is only used for peak shaving and does not compensate for charging, and can be 1 when compensation is allowed. This represents the energy storage discharge power; if it is necessary to maintain the consistency of "grid supplementary supply" under high load conditions, the power purchase power expression can be given: Execution priority from high to low: Solar power first meets office load; surplus power is prioritized for charging; energy storage assists in charging; grid supplements supply. During the medium load phase, the system makes decisions based on the SOC status. When the SOC is less than 50%, it prepares for charging; when the SOC is greater than or equal to 50%, it stops charging or goes into standby mode to reserve energy for low load periods. when At this time, it enters the charging preparation stage. ): when When charging stops or the device remains in standby mode: In the formula: The SOC decision threshold is set to 50%. The expected charging power reference value (kW) can be given by combining the next day's photovoltaic forecast, load forecast, and price signals; the negative sign indicates the corresponding charging power. ; During the low-load phase, the goal is to charge on a large scale at the lowest cost. The energy storage is charged to SOC≥95% at the rated maximum power, while meeting the constraints of battery temperature 20-35℃ and continuous charging time ≤12h. In the formula: The maximum charging power is set to 390kW; The maximum charging capacity is set to 95%. And add health protection constraints: In the formula: Battery temperature (°C). , ; The cumulative duration of continuous charging (h). ; Execution strategy: Charge at rated maximum power; automatically stop when SOC reaches 95%; electric vehicle charging is supported, and the power of charging piles is not limited.
[0026] The core power calculation logic, scheduling objectives, and execution priorities were clearly defined for different load levels, achieving precise control over peak load maximization of peak shaving, high load optimized charging, medium load balancing and reserve, and low load low-cost charging. This not only makes full use of surplus photovoltaic power and reduces high-priced electricity purchases, but also ensures battery safety through energy storage charging and discharging constraints, while meeting the power demand of charging piles, thus achieving a dual improvement in energy utilization efficiency and economy.
[0027] In step three, the formula for objective one of the dual objective functions is: In the formula: For the first Power purchased from the grid during time slots For the unit cost of electricity purchase, To supply power to the grid, For the benefit of the unit accessing the Internet; The formula for objective two is: In the formula: For photovoltaic output power, For local power consumption, the negative sign indicates that the maximization problem is transformed into a minimization problem; The overall objective function is: In the formula: The decision variable is the charge / discharge power sequence. For the first The objective function value, For the first An ideal reference point for a goal These are the weighting coefficients.
[0028] By using a dual objective function and a comprehensive optimization formula, the minimization of operating costs and the maximization of photovoltaic self-consumption rate are scientifically combined. By setting reasonable weights to balance the two objectives, the limitations of single-objective optimization are avoided. At the same time, the maximization of photovoltaic self-consumption rate is transformed into a minimization problem, which is easier to solve and improves the efficiency of optimization calculation, ensuring that the final photovoltaic self-consumption rate is ≥82% and the operating cost is optimized by ≥50%.
[0029] A source-grid-load-storage dispatching system for electricity loads based on improved PSO, the system being used to implement the aforementioned source-grid-load-storage dispatching method for electricity loads based on improved PSO, includes the following modules: Data fusion and preprocessing module: used to collect multi-source data from photovoltaics, energy storage, charging piles, office load, meteorology, and market prices, perform missing value processing, outlier detection and time synchronization, and output standardized fused data vectors; Multidimensional prediction and correction module: Integrates LSTM photovoltaic prediction unit, XGBoost load prediction unit, hybrid fusion unit and adaptive calibration unit to achieve 72-hour photovoltaic output and 24-hour load prediction, and improves prediction accuracy through dynamic correction of occupancy rate; Improved PSO optimization decision module: Includes a dual objective function definition unit, an improved PSO algorithm unit, a dynamic weight and adaptive learning factor unit, and a constraint processing unit, which solves for the optimal charge and discharge power sequence and outputs the optimization decision results; Load level dynamic dispatching module: Automatically identifies four load levels: peak, high, medium and low. Based on the market signal characteristics and dispatching priorities of different levels, it executes differentiated dispatching strategies to achieve global grid characteristic adaptation. Real-time execution and feedback learning module: Generates and issues real-time power commands for execution, equipped with multiple anomaly protection mechanisms, updates scheduling commands every 5 minutes, and performs weekly model iteration optimization to achieve closed-loop control.
[0030] By designing modules covering the entire process of data fusion, multidimensional prediction, improved PSO optimization, load level scheduling, and real-time execution, the modules have clear division of labor and collaborative linkage, forming a complete closed loop from data perception to decision execution and feedback optimization. This ensures the efficient implementation of scheduling methods, improves the intelligence and automation level of system operation, and has good scalability and compatibility, adapting to different development stages of the park.
[0031] The feature engineering of the multidimensional prediction and correction module includes five types of features: time, history, weather, park, and event, with weights of 25%, 35%, 15%, 15%, and 10%, respectively.
[0032] The multidimensional prediction module clearly defines five categories of features: time, history, weather, park, and event, along with their corresponding weights. This comprehensively covers the key factors affecting load and photovoltaic output. By combining LSTM and XGBoost dual models and hybrid fusion technology, the accuracy of 72-hour photovoltaic output and 24-hour load prediction is effectively improved. This provides reliable input data for improving PSO multi-objective optimization and ensures the scientific nature of optimization decisions.
[0033] Among them, the response time of the real-time execution and feedback learning module is <100ms, and the energy storage charging and discharging control accuracy is ±2%.
[0034] The feedback learning module has a response time of <100ms and an energy storage charging and discharging control accuracy of ±2%, ensuring the rapid issuance and precise execution of power commands.
[0035] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0036] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A source-grid-load-storage scheduling method for electrical loads based on an improved PSO, characterized in that, The specific steps are as follows: Step 1: Data Acquisition and Fusion Processing First, real-time data from multiple energy sources in the park, including photovoltaic, energy storage, charging piles, and office load, is collected. The sampling period and key indicators for each data source are defined: 10-second sampling period for aggregated data from photovoltaic inverters, energy storage PCS, and charging piles; 1-minute sampling period for office load data; 30-minute sampling period for meteorological data; and 1-hour sampling period for market price information. A fused data vector is then constructed using the following formula: In the formula: For photovoltaic power, For energy storage power, For charging power, For load power, In a charged state, Irradiance, For temperature, Price level, unit is kW or equivalent; Linear interpolation is used when the interval is less than five minutes, and forward padding is used to handle missing values when the interval is less than thirty minutes. Anomalies exceeding 3σ are identified by the Isolation Forest algorithm. All data are unified to second-level timestamps to ensure time alignment accuracy <1 second. Step 2: Two-level prediction and adaptive correction A Long Short-Term Memory (LSTM) neural network is used, taking historical photovoltaic (PV) data and meteorological data from the past 72 hours as input, and outputting hourly PV output forecasts for the next 72 hours. An XGBoost model is used to combine five key features—time features, historical features, weather features, park features, and event features—to predict the load data for the next 24 hours, with weights of 25%, 35%, 15%, 15%, and 10%, respectively. An adaptive correction model based on park occupancy rate is established to dynamically adjust the load forecast values, yielding the final load forecast result. The adaptive correction formula for the load forecast is: In the formula: This is the corrected load forecast (kW). This represents the original predicted value (kW) from the XGBoost model. This represents the current occupancy rate of the park. As a benchmark occupancy rate, For time slot correction coefficients, the range is... ; A weighted fusion method is used to mix and fuse photovoltaic and load forecast results to improve forecast accuracy; Step 3: Improve PSO multi-objective optimization calculation The design employs a dual-objective optimization function. Objective 1 is to minimize operating costs, achieved by calculating the sum of the differences between grid purchase costs and grid-connected revenue for each time slot. Objective 2 is to maximize photovoltaic self-consumption rate, which is transformed into a minimization problem. A dynamic inertia weighting strategy is adopted, with an upper bound set for the inertia weights. Lower Boundary The convergence speed is improved by dynamically adjusting the exponential function with the number of iterations; an adaptive learning factor is designed, with the maximum value of the individual learning factor c1 and the minimum value of the social learning factor c2 both being 2.5 and 0.5 respectively, which are linearly adjusted with the number of iterations to improve the final fitness; the optimal charging and discharging power sequence is obtained by combining the dual objective functions through a weighted method, with the weight coefficients λ1 and λ2 satisfying λ1+λ2=1. Step 4: Load Level-Driven Dynamic Scheduling The load level is automatically identified by the ratio of the current total load to the historical 30-day average load, and is divided into four categories: peak load (>120% of average), high load (100%-120% of average), medium load (80%-100% of average), and low load (<80% of average). Differentiated dispatch strategies are formulated for different load levels: during peak load periods, the goal is to maximize peak shaving, with energy storage being prioritized to discharge at full power and the purchase of electricity during high-price periods being minimized; during high load periods, the priority is to meet charging needs, with surplus photovoltaic power being prioritized for charging, and energy storage providing auxiliary compensation when necessary. During the medium load phase, the decision is made based on the SOC status. When the SOC is <50%, charging preparation is carried out, and when it is ≥50%, charging is stopped or standby is activated to reserve energy for low load periods. During the low load phase, the goal is to charge on a large scale at the lowest cost. The energy storage is charged at the rated maximum power to SOC ≥95%, while meeting the constraints of battery temperature being 20-35℃ and continuous charging time ≤12h. Step 5: Real-time Execution and Feedback Learning The improved PSO algorithm runs every 5 minutes with a calculation time of less than 30 seconds, generating power instructions for the next 60 minutes, which are then finely adjusted and executed by the lower-level controller every second. It is equipped with multiple abnormal protection mechanisms for sudden photovoltaic power drop, abnormal energy storage SOC, and charging pile failure. The model is updated weekly based on the deviation between actual execution data and predicted values to achieve adaptive optimization. By replacing the traditional time-driven approach with load level-driven approach, it automatically adapts to the characteristics of different regional power grids, seasonal changes, and fluctuations in park occupancy rates without manual intervention.
2. The source-grid-load-storage scheduling method for electrical loads based on improved PSO according to claim 1, characterized in that: The formula for calculating the dynamic inertia weight in step three is as follows: In the formula: For the first The inertial weight of the next iteration is dimensionless. This is the upper bound of the initial inertial weight; This serves as the lower bound for the later-stage inertia weight. This represents the number of iterations. The total number of time slots; the exponent coefficient is 2; The formula for calculating the adaptive learning factor is: In the formula: For individual learning factors, , ; As a social learning factor, , ; This represents the current iteration number; Maximum number of iterations, range .
3. The source-grid-load-storage scheduling method for electrical loads based on improved PSO according to claim 1, characterized in that: The photovoltaic output prediction accuracy index mentioned in step two is MAPE < 5% within 6 hours, MAPE < 8% within 12 hours, MAPE < 10% within 24 hours, and MAPE < 12% within 72 hours.
4. The source-grid-load-storage scheduling method for electrical loads based on improved PSO according to claim 1, characterized in that: In step three, the weighting coefficients λ1 and λ2 are balanced and set to λ1=λ2=0.5, λ1=0.7, and λ2=0.3 for cost priority.
5. The source-grid-load-storage scheduling method for electrical loads based on improved PSO according to claim 1, characterized in that: Step four describes a peak load phase aimed at maximizing peak reduction, with the grid's power purchase capacity determined by energy balance. In the formula: Power purchased (kW) The total load of the park (kW). Photovoltaic power (kW). Indicates the energy storage discharge power; And set a control reference that prioritizes full-power discharge during peak periods: In the formula: For energy storage decision variables, To store the maximum discharge power, SOC (%) The lower limit for SOC safety is set at 20%. The execution priority is from high to low: photovoltaic self-consumption is given priority, and local photovoltaic output is given priority to meet office load; energy storage discharge is fully utilized, and the stored energy is fully released during high-price periods, with a rated full power of 390kW; grid power purchase is minimized, and electricity is only purchased from the grid when the first two cannot be met. During periods of high load, priority is given to meeting charging needs, with surplus photovoltaic power prioritized for charging. Energy storage provides supplementary compensation when necessary. The aggregated power of the charging piles can be expressed as: In the formula: Aggregate charging power (kW) for charging piles. The maximum power of the charging pile (kW) is 600kW in this embodiment; This is the allocation coefficient for energy storage discharge to compensate the charging side. It is 0 when energy storage is only used for peak shaving and does not compensate for charging, and can be 1 when compensation is allowed. This represents the energy storage discharge power; if it is necessary to maintain the consistency of "grid supplementary supply" under high load conditions, the power purchase expression can be given: Execution priority from high to low: Solar power first meets office load; surplus power is prioritized for charging; energy storage assists in charging; grid supplements supply. During the medium load phase, the system makes decisions based on the SOC status. When the SOC is less than 50%, it prepares for charging; when the SOC is greater than or equal to 50%, it stops charging or goes into standby mode to reserve energy for low load periods. when At this time, it enters the charging preparation stage. ): when When charging stops or the device remains in standby mode: In the formula: The SOC decision threshold is set to 50%. The expected charging power reference value (kW) can be given by combining the next day's photovoltaic forecast, load forecast, and price signals; the negative sign indicates the corresponding charging power. ; During the low-load phase, the goal is to charge on a large scale at the lowest cost. The energy storage is charged to SOC≥95% at the rated maximum power, while meeting the constraints of battery temperature 20-35℃ and continuous charging time ≤12h. In the formula: The maximum charging power is set to 390kW; The maximum charging capacity is set to 95%. And add health protection constraints: In the formula: Battery temperature (°C). , ; The cumulative duration of continuous charging (h). ; Execution strategy: Charge at rated maximum power; automatically stop when SOC reaches 95%; electric vehicle charging is supported, and the power of charging piles is not limited.
6. The source-grid-load-storage scheduling method for electrical loads based on improved PSO according to claim 1, characterized in that: The formula for objective one of the dual objective functions mentioned in step three is: In the formula: For the first Power purchased from the grid during time slots For the unit cost of electricity purchase, To supply power to the grid, For the benefit of the unit accessing the Internet; The formula for objective two is: In the formula: For photovoltaic output power, For local power consumption, the negative sign indicates that the maximization problem is transformed into a minimization problem; The overall objective function is: In the formula: The decision variable is the charge / discharge power sequence. For the first The objective function value, For the first An ideal reference point for a goal These are the weighting coefficients.
7. A source-grid-load-storage scheduling system for electrical loads based on improved PSO, the system being used to implement the source-grid-load-storage scheduling method for electrical loads based on improved PSO as described in any one of claims 1 to 6, characterized in that, Includes the following modules: Data fusion and preprocessing module: used to collect multi-source data from photovoltaics, energy storage, charging piles, office load, meteorology, and market prices, perform missing value processing, outlier detection and time synchronization, and output standardized fused data vectors; Multidimensional prediction and correction module: Integrates LSTM photovoltaic prediction unit, XGBoost load prediction unit, hybrid fusion unit and adaptive calibration unit to achieve 72-hour photovoltaic output and 24-hour load prediction, and improves prediction accuracy through dynamic correction of occupancy rate; Improved PSO optimization decision module: Includes a dual objective function definition unit, an improved PSO algorithm unit, a dynamic weight and adaptive learning factor unit, and a constraint processing unit, which solves for the optimal charge and discharge power sequence and outputs the optimization decision results; Load level dynamic dispatching module: Automatically identifies four load levels: peak, high, medium and low. Based on the market signal characteristics and dispatching priorities of different levels, it executes differentiated dispatching strategies to achieve global grid characteristic adaptation. Real-time execution and feedback learning module: Generates and issues real-time power commands for execution, equipped with multiple anomaly protection mechanisms, updates scheduling commands every 5 minutes, and performs weekly model iteration optimization to achieve closed-loop control.
8. A source-grid-load-storage dispatching system for electrical loads based on an improved PSO, as described in claim 7, characterized in that: The feature engineering of the multidimensional prediction and correction module includes five types of features: time, history, weather, park, and event, with weights of 25%, 35%, 15%, 15%, and 10%, respectively.
9. A source-grid-load-storage dispatching system for electrical loads based on an improved PSO, as described in claim 7, characterized in that: The response time of the real-time execution and feedback learning module is <100ms, and the energy storage charging and discharging control accuracy is ±2%.